Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] libretro-mupen64plus: update to 20190611
@ 2019-06-11 15:53 voidlinux-github
  2019-06-11 15:54 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (32 more replies)
  0 siblings, 33 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 15:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 2506 bytes --]

From 73b6e1b08d697c5482c39c4a3a2cd52d127b6768 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 srcpkgs/libretro-mupen64plus/template | 29 +++++++++++++++++----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e98aaabba44..1b3dc0b6492 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,37 +1,44 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="opengl rpi"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
+	i686*|x86_64*|aarch64*|ppc*)  build_options_default="opengl";;
 	armv[67]*) build_options_default="rpi";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
  2019-06-11 15:54 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 15:54 ` voidlinux-github
  2019-06-11 16:20 ` voidlinux-github
                   ` (30 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 15:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 2555 bytes --]

From 487e75cb6a74e7c856a2dd2f8287363f21bbb7e6 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 srcpkgs/libretro-mupen64plus/template | 30 ++++++++++++++++-----------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..1b3dc0b6492 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,44 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="opengl rpi"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
+	i686*|x86_64*|aarch64*|ppc*)  build_options_default="opengl";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
@ 2019-06-11 15:54 ` voidlinux-github
  2019-06-11 15:54 ` voidlinux-github
                   ` (31 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 15:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 2555 bytes --]

From 487e75cb6a74e7c856a2dd2f8287363f21bbb7e6 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 srcpkgs/libretro-mupen64plus/template | 30 ++++++++++++++++-----------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..1b3dc0b6492 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,44 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="opengl rpi"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
+	i686*|x86_64*|aarch64*|ppc*)  build_options_default="opengl";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
  2019-06-11 15:54 ` [PR PATCH] [Updated] " voidlinux-github
  2019-06-11 15:54 ` voidlinux-github
@ 2019-06-11 16:20 ` voidlinux-github
  2019-06-11 16:20 ` voidlinux-github
                   ` (29 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 16:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 2501 bytes --]

From 24928a77ce058efeb653f1e4c322078252210918 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 srcpkgs/libretro-mupen64plus/template | 30 ++++++++++++++++-----------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..08eb68e16b4 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,44 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="rpi"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
+	i686*) hostmakedepends+=" nasm";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (2 preceding siblings ...)
  2019-06-11 16:20 ` voidlinux-github
@ 2019-06-11 16:20 ` voidlinux-github
  2019-06-11 16:21 ` voidlinux-github
                   ` (28 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 16:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 2501 bytes --]

From 24928a77ce058efeb653f1e4c322078252210918 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 srcpkgs/libretro-mupen64plus/template | 30 ++++++++++++++++-----------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..08eb68e16b4 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,44 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="rpi"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
+	i686*) hostmakedepends+=" nasm";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (3 preceding siblings ...)
  2019-06-11 16:20 ` voidlinux-github
@ 2019-06-11 16:21 ` voidlinux-github
  2019-06-11 16:41 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (27 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 16:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500917123
Comment:
Turns out MesaLib-devel is required for OpenGL(ES) headers every time, so removed the `opengl` option and made it implicit. Also we needed `nasm` for i686 in `hostmakedepends`.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (5 preceding siblings ...)
  2019-06-11 16:41 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 16:41 ` voidlinux-github
  2019-06-11 16:42 ` voidlinux-github
                   ` (25 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 16:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 2666 bytes --]

From 96bd34275f4c40679c67f8275a9788faf75794bc Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 srcpkgs/libretro-mupen64plus/template | 36 ++++++++++++++++++---------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..9b56051476d 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,50 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="rpi"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
+	i686*) hostmakedepends+=" nasm";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
 esac
 
+pre_build() {
+	# conflicting declaration with headers
+	sed -i 's/typedef GLfloat GLdouble/typedef double GLdouble/' \
+	 libretro-common/include/glsm/glsm.h
+}
+
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (4 preceding siblings ...)
  2019-06-11 16:21 ` voidlinux-github
@ 2019-06-11 16:41 ` voidlinux-github
  2019-06-11 16:41 ` voidlinux-github
                   ` (26 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 16:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 2666 bytes --]

From 96bd34275f4c40679c67f8275a9788faf75794bc Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 srcpkgs/libretro-mupen64plus/template | 36 ++++++++++++++++++---------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..9b56051476d 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,50 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="rpi"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
+	i686*) hostmakedepends+=" nasm";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
 esac
 
+pre_build() {
+	# conflicting declaration with headers
+	sed -i 's/typedef GLfloat GLdouble/typedef double GLdouble/' \
+	 libretro-common/include/glsm/glsm.h
+}
+
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (6 preceding siblings ...)
  2019-06-11 16:41 ` voidlinux-github
@ 2019-06-11 16:42 ` voidlinux-github
  2019-06-11 17:02 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (24 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 16:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500926143
Comment:
Seems almost fine, though there was one more fix needed, to prevent a conflicting typedef. Let's see now.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (8 preceding siblings ...)
  2019-06-11 17:02 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 17:02 ` voidlinux-github
  2019-06-11 17:03 ` voidlinux-github
                   ` (22 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 3821 bytes --]

From 83962c550f17d0045c6c801650cd2f678ee2e220 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 .../libretro-mupen64plus/patches/rpi.patch    | 24 ++++++++++++
 srcpkgs/libretro-mupen64plus/template         | 39 ++++++++++++-------
 2 files changed, 50 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/rpi.patch

diff --git a/srcpkgs/libretro-mupen64plus/patches/rpi.patch b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..e705bb874b2 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,51 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="rpi gles gles3"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
-	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	i686*) hostmakedepends+=" nasm";;
+	armv[67]*) build_options_default="rpi gles";;
+	aarch64*) build_options_default="gles";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
+	fi
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (7 preceding siblings ...)
  2019-06-11 16:42 ` voidlinux-github
@ 2019-06-11 17:02 ` voidlinux-github
  2019-06-11 17:02 ` voidlinux-github
                   ` (23 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 3821 bytes --]

From 83962c550f17d0045c6c801650cd2f678ee2e220 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 .../libretro-mupen64plus/patches/rpi.patch    | 24 ++++++++++++
 srcpkgs/libretro-mupen64plus/template         | 39 ++++++++++++-------
 2 files changed, 50 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/rpi.patch

diff --git a/srcpkgs/libretro-mupen64plus/patches/rpi.patch b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..e705bb874b2 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,51 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel $(vopt_if rpi rpi-firmware) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+build_options="rpi gles gles3"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
-	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	i686*) hostmakedepends+=" nasm";;
+	armv[67]*) build_options_default="rpi gles";;
+	aarch64*) build_options_default="gles";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
+	fi
+
 	if [ "$build_option_rpi" ]; then
 		install -d /opt/vc/lib
 		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (9 preceding siblings ...)
  2019-06-11 17:02 ` voidlinux-github
@ 2019-06-11 17:03 ` voidlinux-github
  2019-06-11 17:25 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (21 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500934670
Comment:
OK, trying one more thing... also added options for gles/gles3

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (10 preceding siblings ...)
  2019-06-11 17:03 ` voidlinux-github
@ 2019-06-11 17:25 ` voidlinux-github
  2019-06-11 17:25 ` voidlinux-github
                   ` (20 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 4153 bytes --]

From add7e7154973ca0145986ff47fbf587cb11ada2b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 .../libretro-mupen64plus/patches/rpi.patch    | 24 +++++++++
 srcpkgs/libretro-mupen64plus/template         | 53 ++++++++++++++-----
 2 files changed, 64 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/rpi.patch

diff --git a/srcpkgs/libretro-mupen64plus/patches/rpi.patch b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..837b065c1aa 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,65 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-userland-devel) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="rpi opengl gles gles3"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	aarch64*) build_options_default="opengl gles";;
+	*) build_options_default="opengl";;
 esac
 
+if [ "$build_option_gles" -o "$build_option_gles3" ]; then
+	if [ -z "$build_option_opengl" ]; then
+		broken="must enable opengl to use gles"
+	fi
+fi
+
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
+	fi
+
 	if [ "$build_option_rpi" ]; then
+		if [ "$build_option_opengl" ]; then
+			_args+=" platform=rpi,mesa"
+		else
+			_args+=" platform=rpi"
+		fi
 		install -d /opt/vc/lib
-		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (11 preceding siblings ...)
  2019-06-11 17:25 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 17:25 ` voidlinux-github
  2019-06-11 17:33 ` voidlinux-github
                   ` (19 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 4153 bytes --]

From add7e7154973ca0145986ff47fbf587cb11ada2b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 .../libretro-mupen64plus/patches/rpi.patch    | 24 +++++++++
 srcpkgs/libretro-mupen64plus/template         | 53 ++++++++++++++-----
 2 files changed, 64 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/rpi.patch

diff --git a/srcpkgs/libretro-mupen64plus/patches/rpi.patch b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..837b065c1aa 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,65 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-userland-devel) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="rpi opengl gles gles3"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	aarch64*) build_options_default="opengl gles";;
+	*) build_options_default="opengl";;
 esac
 
+if [ "$build_option_gles" -o "$build_option_gles3" ]; then
+	if [ -z "$build_option_opengl" ]; then
+		broken="must enable opengl to use gles"
+	fi
+fi
+
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
+	fi
+
 	if [ "$build_option_rpi" ]; then
+		if [ "$build_option_opengl" ]; then
+			_args+=" platform=rpi,mesa"
+		else
+			_args+=" platform=rpi"
+		fi
 		install -d /opt/vc/lib
-		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (12 preceding siblings ...)
  2019-06-11 17:25 ` voidlinux-github
@ 2019-06-11 17:33 ` voidlinux-github
  2019-06-11 17:33 ` voidlinux-github
                   ` (18 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500917123
Comment:
Turns out MesaLib-devel is required for OpenGL(ES) headers every time, so removed the `opengl` option and made it implicit. Also we needed `nasm` for i686 in `hostmakedepends`.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (13 preceding siblings ...)
  2019-06-11 17:33 ` voidlinux-github
@ 2019-06-11 17:33 ` voidlinux-github
  2019-06-11 17:33 ` voidlinux-github
                   ` (17 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500926143
Comment:
Seems almost fine, though there was one more fix needed, to prevent a conflicting typedef. Let's see now.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (14 preceding siblings ...)
  2019-06-11 17:33 ` voidlinux-github
@ 2019-06-11 17:33 ` voidlinux-github
  2019-06-11 17:36 ` voidlinux-github
                   ` (16 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500934670
Comment:
OK, trying one more thing... also added options for gles/gles3

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (15 preceding siblings ...)
  2019-06-11 17:33 ` voidlinux-github
@ 2019-06-11 17:36 ` voidlinux-github
  2019-06-11 17:44 ` voidlinux-github
                   ` (15 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500947458
Comment:
Looks like this is now fixed. Total change log:

- Added new build options `gles`, `gles3` which force GLES2 and GLES3 respectively when used with `opengl`.
- Made it possible to use `opengl` with `rpi`, which effectively uses Mesa (setting `platform=rpi,mesa` for the build)
- Fixed `rpi` (needed to install `rpi-userland-devel` instead of `rpi-firmware`)
- Fixed i686 (needed to install `nasm` on host)
- `aarch64` uses GLES2
- `armv6/7` uses rpi (i.e. as before)
- everything else uses standard OpenGL, and all platforms are now enabled.

Questions:

- Since raspberry pi is hardly a generic target, should we remove it and create a separate `-rpi` suffixed package for that, then use the same settings on `armv*` and `aarch64*`? We already have this elsewhere; see e.g. `EmulationStation` and `EmulationStation-rpi`.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (16 preceding siblings ...)
  2019-06-11 17:36 ` voidlinux-github
@ 2019-06-11 17:44 ` voidlinux-github
  2019-06-11 17:51 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (14 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500950132
Comment:
(though looks like `new_dynarec` is still failing on `musl` because it uses glibc internal types... sigh)

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (18 preceding siblings ...)
  2019-06-11 17:51 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 17:51 ` voidlinux-github
  2019-06-11 18:50 ` voidlinux-github
                   ` (12 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 5306 bytes --]

From 72acff761206732efca8abb6633bb4b3bc7c0b0f Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 .../libretro-mupen64plus/patches/rpi.patch    | 24 +++++++++
 .../libretro-mupen64plus/patches/types.patch  | 29 ++++++++++
 srcpkgs/libretro-mupen64plus/template         | 53 ++++++++++++++-----
 3 files changed, 93 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/rpi.patch
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/types.patch

diff --git a/srcpkgs/libretro-mupen64plus/patches/rpi.patch b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/patches/types.patch b/srcpkgs/libretro-mupen64plus/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..837b065c1aa 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,65 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-userland-devel) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="rpi opengl gles gles3"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	aarch64*) build_options_default="opengl gles";;
+	*) build_options_default="opengl";;
 esac
 
+if [ "$build_option_gles" -o "$build_option_gles3" ]; then
+	if [ -z "$build_option_opengl" ]; then
+		broken="must enable opengl to use gles"
+	fi
+fi
+
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
+	fi
+
 	if [ "$build_option_rpi" ]; then
+		if [ "$build_option_opengl" ]; then
+			_args+=" platform=rpi,mesa"
+		else
+			_args+=" platform=rpi"
+		fi
 		install -d /opt/vc/lib
-		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (17 preceding siblings ...)
  2019-06-11 17:44 ` voidlinux-github
@ 2019-06-11 17:51 ` voidlinux-github
  2019-06-11 17:51 ` voidlinux-github
                   ` (13 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 17:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 5306 bytes --]

From 72acff761206732efca8abb6633bb4b3bc7c0b0f Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 17:35:54 +0200
Subject: [PATCH] libretro-mupen64plus: update to 20190611

---
 .../libretro-mupen64plus/patches/rpi.patch    | 24 +++++++++
 .../libretro-mupen64plus/patches/types.patch  | 29 ++++++++++
 srcpkgs/libretro-mupen64plus/template         | 53 ++++++++++++++-----
 3 files changed, 93 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/rpi.patch
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/types.patch

diff --git a/srcpkgs/libretro-mupen64plus/patches/rpi.patch b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/patches/types.patch b/srcpkgs/libretro-mupen64plus/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..837b065c1aa 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,38 +1,65 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-userland-devel) zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="rpi opengl gles gles3"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
 	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	aarch64*) build_options_default="opengl gles";;
+	*) build_options_default="opengl";;
 esac
 
+if [ "$build_option_gles" -o "$build_option_gles3" ]; then
+	if [ -z "$build_option_opengl" ]; then
+		broken="must enable opengl to use gles"
+	fi
+fi
+
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
+	fi
+
 	if [ "$build_option_rpi" ]; then
+		if [ "$build_option_opengl" ]; then
+			_args+=" platform=rpi,mesa"
+		else
+			_args+=" platform=rpi"
+		fi
 		install -d /opt/vc/lib
-		_args+=" platform=rpi"
 		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
 		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
 do_install() {

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (19 preceding siblings ...)
  2019-06-11 17:51 ` voidlinux-github
@ 2019-06-11 18:50 ` voidlinux-github
  2019-06-11 19:36 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (11 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 18:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500975163
Comment:
Seems fixed now. Only the above remains

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (21 preceding siblings ...)
  2019-06-11 19:36 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 19:36 ` voidlinux-github
  2019-06-11 19:36 ` voidlinux-github
                   ` (9 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 19:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 9043 bytes --]

From ad45ad57428f180bf889b088ac81e4272b63bebe Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:50 +0200
Subject: [PATCH 1/2] libretro-mupen64plus: update to 20190611

---
 .../patches/gl-typedefs.patch                 | 13 ++++++
 .../libretro-mupen64plus/patches/types.patch  | 29 ++++++++++++
 srcpkgs/libretro-mupen64plus/template         | 46 +++++++++++--------
 srcpkgs/libretro-mupen64plus/update           |  1 -
 4 files changed, 70 insertions(+), 19 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/types.patch
 delete mode 100644 srcpkgs/libretro-mupen64plus/update

diff --git a/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
new file mode 100644
index 00000000000..eccef9cca71
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
@@ -0,0 +1,13 @@
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/patches/types.patch b/srcpkgs/libretro-mupen64plus/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..b768a51869b 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,40 +1,50 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus-rpi>=0"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
-	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="gles gles3"
+
+case "$XBPS_TARGET_MACHINE" in
+	armv*|aarch64*) build_options_default="gles";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
-	if [ "$build_option_rpi" ]; then
-		install -d /opt/vc/lib
-		_args+=" platform=rpi"
-		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
-		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
+
 do_install() {
 	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
 }
diff --git a/srcpkgs/libretro-mupen64plus/update b/srcpkgs/libretro-mupen64plus/update
deleted file mode 100644
index aa6807450d2..00000000000
--- a/srcpkgs/libretro-mupen64plus/update
+++ /dev/null
@@ -1 +0,0 @@
-pkgname=mupen64plus-libretro

From f25fc1956ad49bd028ff2687b34a6bd09f39950f Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:16 +0200
Subject: [PATCH 2/2] New package: libretro-mupen64plus-rpi-20190611

---
 .../patches/rpi.patch                         | 24 ++++++++++++
 .../patches/types.patch                       | 29 +++++++++++++++
 srcpkgs/libretro-mupen64plus-rpi/template     | 37 +++++++++++++++++++
 3 files changed, 90 insertions(+)
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/template

diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus-rpi/template b/srcpkgs/libretro-mupen64plus-rpi/template
new file mode 100644
index 00000000000..7365927e058
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/template
@@ -0,0 +1,37 @@
+# Template file for 'libretro-mupen64plus-rpi'
+pkgname=libretro-mupen64plus-rpi
+version=20190611
+revision=1
+archs="armv6l* armv7l*"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
+hostmakedepends="pkg-config unzip"
+makedepends="rpi-userland-devel zlib-devel"
+short_desc="Libretro port of Mupen64 Plus"
+maintainer="q66 <daniel@octaforge.org>"
+license="GPL-3.0-or-later"
+homepage="http://www.libretro.com/"
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus>=0"
+
+build_options="mesa"
+
+do_build() {
+	local _args="ARCH=arm"
+
+	if [ "$build_option_mesa" ]; then
+		_args+=" platform=rpi,mesa"
+	else
+		_args+=" platform=rpi"
+	fi
+	install -d /opt/vc/lib
+	sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
+	sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	make CC=$CC ${_args} ${makejobs}
+}
+
+do_install() {
+	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
+}

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (20 preceding siblings ...)
  2019-06-11 18:50 ` voidlinux-github
@ 2019-06-11 19:36 ` voidlinux-github
  2019-06-11 19:36 ` voidlinux-github
                   ` (10 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 19:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 9043 bytes --]

From ad45ad57428f180bf889b088ac81e4272b63bebe Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:50 +0200
Subject: [PATCH 1/2] libretro-mupen64plus: update to 20190611

---
 .../patches/gl-typedefs.patch                 | 13 ++++++
 .../libretro-mupen64plus/patches/types.patch  | 29 ++++++++++++
 srcpkgs/libretro-mupen64plus/template         | 46 +++++++++++--------
 srcpkgs/libretro-mupen64plus/update           |  1 -
 4 files changed, 70 insertions(+), 19 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/types.patch
 delete mode 100644 srcpkgs/libretro-mupen64plus/update

diff --git a/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
new file mode 100644
index 00000000000..eccef9cca71
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
@@ -0,0 +1,13 @@
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/patches/types.patch b/srcpkgs/libretro-mupen64plus/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..b768a51869b 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,40 +1,50 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus-rpi>=0"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
-	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="gles gles3"
+
+case "$XBPS_TARGET_MACHINE" in
+	armv*|aarch64*) build_options_default="gles";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
-	if [ "$build_option_rpi" ]; then
-		install -d /opt/vc/lib
-		_args+=" platform=rpi"
-		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
-		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
+
 do_install() {
 	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
 }
diff --git a/srcpkgs/libretro-mupen64plus/update b/srcpkgs/libretro-mupen64plus/update
deleted file mode 100644
index aa6807450d2..00000000000
--- a/srcpkgs/libretro-mupen64plus/update
+++ /dev/null
@@ -1 +0,0 @@
-pkgname=mupen64plus-libretro

From f25fc1956ad49bd028ff2687b34a6bd09f39950f Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:16 +0200
Subject: [PATCH 2/2] New package: libretro-mupen64plus-rpi-20190611

---
 .../patches/rpi.patch                         | 24 ++++++++++++
 .../patches/types.patch                       | 29 +++++++++++++++
 srcpkgs/libretro-mupen64plus-rpi/template     | 37 +++++++++++++++++++
 3 files changed, 90 insertions(+)
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/template

diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus-rpi/template b/srcpkgs/libretro-mupen64plus-rpi/template
new file mode 100644
index 00000000000..7365927e058
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/template
@@ -0,0 +1,37 @@
+# Template file for 'libretro-mupen64plus-rpi'
+pkgname=libretro-mupen64plus-rpi
+version=20190611
+revision=1
+archs="armv6l* armv7l*"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
+hostmakedepends="pkg-config unzip"
+makedepends="rpi-userland-devel zlib-devel"
+short_desc="Libretro port of Mupen64 Plus"
+maintainer="q66 <daniel@octaforge.org>"
+license="GPL-3.0-or-later"
+homepage="http://www.libretro.com/"
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus>=0"
+
+build_options="mesa"
+
+do_build() {
+	local _args="ARCH=arm"
+
+	if [ "$build_option_mesa" ]; then
+		_args+=" platform=rpi,mesa"
+	else
+		_args+=" platform=rpi"
+	fi
+	install -d /opt/vc/lib
+	sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
+	sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	make CC=$CC ${_args} ${makejobs}
+}
+
+do_install() {
+	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
+}

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (22 preceding siblings ...)
  2019-06-11 19:36 ` voidlinux-github
@ 2019-06-11 19:36 ` voidlinux-github
  2019-06-11 19:58 ` voidlinux-github
                   ` (8 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 19:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500991653
Comment:
Trying the split.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (23 preceding siblings ...)
  2019-06-11 19:36 ` voidlinux-github
@ 2019-06-11 19:58 ` voidlinux-github
  2019-06-11 20:25 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (7 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 19:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500999823
Comment:
Looks like this works.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (25 preceding siblings ...)
  2019-06-11 20:25 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 20:25 ` voidlinux-github
  2019-06-11 21:06 ` voidlinux-github
                   ` (5 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 20:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 9029 bytes --]

From ad45ad57428f180bf889b088ac81e4272b63bebe Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:50 +0200
Subject: [PATCH 1/2] libretro-mupen64plus: update to 20190611

---
 .../patches/gl-typedefs.patch                 | 13 ++++++
 .../libretro-mupen64plus/patches/types.patch  | 29 ++++++++++++
 srcpkgs/libretro-mupen64plus/template         | 46 +++++++++++--------
 srcpkgs/libretro-mupen64plus/update           |  1 -
 4 files changed, 70 insertions(+), 19 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/types.patch
 delete mode 100644 srcpkgs/libretro-mupen64plus/update

diff --git a/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
new file mode 100644
index 00000000000..eccef9cca71
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
@@ -0,0 +1,13 @@
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/patches/types.patch b/srcpkgs/libretro-mupen64plus/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..b768a51869b 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,40 +1,50 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus-rpi>=0"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
-	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="gles gles3"
+
+case "$XBPS_TARGET_MACHINE" in
+	armv*|aarch64*) build_options_default="gles";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
-	if [ "$build_option_rpi" ]; then
-		install -d /opt/vc/lib
-		_args+=" platform=rpi"
-		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
-		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
+
 do_install() {
 	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
 }
diff --git a/srcpkgs/libretro-mupen64plus/update b/srcpkgs/libretro-mupen64plus/update
deleted file mode 100644
index aa6807450d2..00000000000
--- a/srcpkgs/libretro-mupen64plus/update
+++ /dev/null
@@ -1 +0,0 @@
-pkgname=mupen64plus-libretro

From e006621448835a6a0e47b0be5105f8f9686f0ac2 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:16 +0200
Subject: [PATCH 2/2] New package: libretro-mupen64plus-rpi-20190611

---
 .../patches/rpi.patch                         | 24 +++++++++++++
 .../patches/types.patch                       | 29 ++++++++++++++++
 srcpkgs/libretro-mupen64plus-rpi/template     | 34 +++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/template

diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus-rpi/template b/srcpkgs/libretro-mupen64plus-rpi/template
new file mode 100644
index 00000000000..3d7e80733dd
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/template
@@ -0,0 +1,34 @@
+# Template file for 'libretro-mupen64plus-rpi'
+pkgname=libretro-mupen64plus-rpi
+version=20190611
+revision=1
+archs="armv6l* armv7l*"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
+hostmakedepends="pkg-config unzip"
+makedepends="rpi-userland-devel zlib-devel"
+short_desc="Libretro port of Mupen64 Plus"
+maintainer="q66 <daniel@octaforge.org>"
+license="GPL-3.0-or-later"
+homepage="http://www.libretro.com/"
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus>=0"
+
+do_build() {
+	local _args="ARCH=arm"
+
+	case "$XBPS_TARGET_MACHINE" in
+		armv6*) _args+=" platform=rpi";;
+		armv7*) _args+=" platform=rpi2";;
+	esac
+	install -d /opt/vc/lib
+	sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
+	sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	make CC=$CC ${_args} ${makejobs}
+}
+
+do_install() {
+	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
+}

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (24 preceding siblings ...)
  2019-06-11 19:58 ` voidlinux-github
@ 2019-06-11 20:25 ` voidlinux-github
  2019-06-11 20:25 ` voidlinux-github
                   ` (6 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 20:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-power/void-packages libretro-mupen64plus
https://github.com/void-linux/void-packages/pull/12400

libretro-mupen64plus: update to 20190611
Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

A patch file from https://github.com/void-linux/void-packages/pull/12400.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libretro-mupen64plus-12400.patch --]
[-- Type: application/text/x-diff, Size: 9029 bytes --]

From ad45ad57428f180bf889b088ac81e4272b63bebe Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:50 +0200
Subject: [PATCH 1/2] libretro-mupen64plus: update to 20190611

---
 .../patches/gl-typedefs.patch                 | 13 ++++++
 .../libretro-mupen64plus/patches/types.patch  | 29 ++++++++++++
 srcpkgs/libretro-mupen64plus/template         | 46 +++++++++++--------
 srcpkgs/libretro-mupen64plus/update           |  1 -
 4 files changed, 70 insertions(+), 19 deletions(-)
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
 create mode 100644 srcpkgs/libretro-mupen64plus/patches/types.patch
 delete mode 100644 srcpkgs/libretro-mupen64plus/update

diff --git a/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
new file mode 100644
index 00000000000..eccef9cca71
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/gl-typedefs.patch
@@ -0,0 +1,13 @@
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus/patches/types.patch b/srcpkgs/libretro-mupen64plus/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus/template b/srcpkgs/libretro-mupen64plus/template
index e76143e9d4b..b768a51869b 100644
--- a/srcpkgs/libretro-mupen64plus/template
+++ b/srcpkgs/libretro-mupen64plus/template
@@ -1,40 +1,50 @@
 # Template file for 'libretro-mupen64plus'
 pkgname=libretro-mupen64plus
-version=20150204
+version=20190611
 revision=1
-wrksrc="mupen64plus-libretro-master"
-build_options="opengl rpi"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
 hostmakedepends="pkg-config unzip"
-makedepends="$(vopt_if opengl MesaLib-devel) $(vopt_if rpi rpi-firmware)"
+makedepends="MesaLib-devel zlib-devel"
 short_desc="Libretro port of Mupen64 Plus"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
 homepage="http://www.libretro.com/"
-distfiles="http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/retroarch/mupen64plus-libretro-${version}.zip"
-checksum=643379eaa840d632cd8fa046fc4858cc8ccd5a57ce5991771ab16f1ef675cee2
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus-rpi>=0"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)  build_options_default="opengl";;
-	armv[67]*) build_options_default="rpi";;
-	ppc*) broken="not supported in this release";;
+	i686*) hostmakedepends+=" nasm";;
+esac
+
+build_options="gles gles3"
+
+case "$XBPS_TARGET_MACHINE" in
+	armv*|aarch64*) build_options_default="gles";;
 esac
 
 do_build() {
 	local _args
 
+	# setting ARCH makes sure proper dynarec is selected
 	case "$XBPS_TARGET_MACHINE" in
-		i686*) _args="DYNAREC=x86";;
-		x86_64*) _args="DYNAREC=x86_64";;
-		arm*) _args="DYNAREC=arm";;
+		i686*) _args="ARCH=i686";;
+		arm*) _args="ARCH=arm";;
+		aarch64*) _args="ARCH=aarch64";;
+		x86_64*) _args="ARCH=x86_64";;
+		*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
 	esac
-	if [ "$build_option_rpi" ]; then
-		install -d /opt/vc/lib
-		_args+=" platform=rpi"
-		sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
-		sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	if [ "$build_option_gles3" ]; then
+		_args+=" FORCE_GLES3=1"
+	elif [ "$builld_option_gles" ]; then
+		_args+=" FORCE_GLES=1"
 	fi
+
 	make CC=$CC ${_args} ${makejobs}
 }
+
 do_install() {
 	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
 }
diff --git a/srcpkgs/libretro-mupen64plus/update b/srcpkgs/libretro-mupen64plus/update
deleted file mode 100644
index aa6807450d2..00000000000
--- a/srcpkgs/libretro-mupen64plus/update
+++ /dev/null
@@ -1 +0,0 @@
-pkgname=mupen64plus-libretro

From e006621448835a6a0e47b0be5105f8f9686f0ac2 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 11 Jun 2019 21:32:16 +0200
Subject: [PATCH 2/2] New package: libretro-mupen64plus-rpi-20190611

---
 .../patches/rpi.patch                         | 24 +++++++++++++
 .../patches/types.patch                       | 29 ++++++++++++++++
 srcpkgs/libretro-mupen64plus-rpi/template     | 34 +++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
 create mode 100644 srcpkgs/libretro-mupen64plus-rpi/template

diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
new file mode 100644
index 00000000000..8d16c944337
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/rpi.patch
@@ -0,0 +1,24 @@
+--- Makefile
++++ Makefile
+@@ -99,7 +99,7 @@ else ifneq (,$(findstring rpi,$(platform)))
+       GL_LIB := -lGLESv2
+    else
+       LLE = 0
+-      CPUFLAGS += -DVC
++      CPUFLAGS += -DVC -DGL_GLEXT_PROTOTYPES
+       GL_LIB := -L/opt/vc/lib -lbrcmGLESv2
+       EGL_LIB := -lbrcmEGL
+       INCFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads
+--- libretro-common/include/glsm/glsm.h
++++ libretro-common/include/glsm/glsm.h
+@@ -32,8 +32,8 @@
+ RETRO_BEGIN_DECLS
+ 
+ #ifdef HAVE_OPENGLES2
+-typedef GLfloat GLdouble;
+-typedef GLclampf GLclampd;
++typedef double GLdouble;
++typedef double GLclampd;
+ #endif
+ 
+ #if defined(HAVE_OPENGLES2)
diff --git a/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
new file mode 100644
index 00000000000..423ed76f406
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/patches/types.patch
@@ -0,0 +1,29 @@
+This is needed to build on armv6/7 musl.
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
+@@ -25,12 +25,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+ 
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
++++ mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
+@@ -24,10 +24,7 @@
+ #include <string.h>
+ #include <assert.h>
+ 
+-#if defined(__APPLE__)
+ #include <sys/types.h> // needed for u_int, u_char, etc
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
+ 
+ #include "new_dynarec.h"
+ #include "main/main.h"
diff --git a/srcpkgs/libretro-mupen64plus-rpi/template b/srcpkgs/libretro-mupen64plus-rpi/template
new file mode 100644
index 00000000000..3d7e80733dd
--- /dev/null
+++ b/srcpkgs/libretro-mupen64plus-rpi/template
@@ -0,0 +1,34 @@
+# Template file for 'libretro-mupen64plus-rpi'
+pkgname=libretro-mupen64plus-rpi
+version=20190611
+revision=1
+archs="armv6l* armv7l*"
+_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
+wrksrc="mupen64plus-libretro-${_gitrev}"
+hostmakedepends="pkg-config unzip"
+makedepends="rpi-userland-devel zlib-devel"
+short_desc="Libretro port of Mupen64 Plus"
+maintainer="q66 <daniel@octaforge.org>"
+license="GPL-3.0-or-later"
+homepage="http://www.libretro.com/"
+distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
+checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
+conflicts="ĺibretro-mupen64plus>=0"
+
+do_build() {
+	local _args="ARCH=arm"
+
+	case "$XBPS_TARGET_MACHINE" in
+		armv6*) _args+=" platform=rpi";;
+		armv7*) _args+=" platform=rpi2";;
+	esac
+	install -d /opt/vc/lib
+	sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
+	sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
+
+	make CC=$CC ${_args} ${makejobs}
+}
+
+do_install() {
+	vinstall mupen64plus_libretro.so 755 usr/lib/libretro
+}

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (26 preceding siblings ...)
  2019-06-11 20:25 ` voidlinux-github
@ 2019-06-11 21:06 ` voidlinux-github
  2019-06-11 21:06 ` voidlinux-github
                   ` (4 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 21:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500950132
Comment:
(though looks like `new_dynarec` is still failing on `musl` because it uses glibc internal types... sigh)

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (27 preceding siblings ...)
  2019-06-11 21:06 ` voidlinux-github
@ 2019-06-11 21:06 ` voidlinux-github
  2019-06-11 21:06 ` voidlinux-github
                   ` (3 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 21:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500975163
Comment:
Seems fixed now. Only the above remains

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (28 preceding siblings ...)
  2019-06-11 21:06 ` voidlinux-github
@ 2019-06-11 21:06 ` voidlinux-github
  2019-06-11 21:06 ` voidlinux-github
                   ` (2 subsequent siblings)
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 21:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500991653
Comment:
Trying the split.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (29 preceding siblings ...)
  2019-06-11 21:06 ` voidlinux-github
@ 2019-06-11 21:06 ` voidlinux-github
  2019-06-11 21:08 ` voidlinux-github
  2019-06-15 12:43 ` [PR PATCH] [Merged]: " voidlinux-github
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 21:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500999823
Comment:
Looks like this works.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (30 preceding siblings ...)
  2019-06-11 21:06 ` voidlinux-github
@ 2019-06-11 21:08 ` voidlinux-github
  2019-06-15 12:43 ` [PR PATCH] [Merged]: " voidlinux-github
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-11 21:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/12400#issuecomment-500947458
Comment:
Looks like this is now fixed. Total change log:

- Fixed the Raspberry Pi build and split into `libretro-mupen64plus` and `libretro-mupen64plus-rpi`; the former is generic, the latter is only for `armv6*` and `armv7*`, compiling with rpi specific platform (`rpi2` for `armv7*`)
- Added new build options `gles`, `gles3` which force GLES2 and GLES3 respectively; `opengl` is implicit/default for the standard package
- Fixed i686 (needed to install `nasm` on host)
- `aarch64` uses GLES2, as does `armv*` in the standard package
- everything else uses standard desktop OpenGL, and all platforms are now enabled.


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PR PATCH] [Merged]: libretro-mupen64plus: update to 20190611
  2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
                   ` (31 preceding siblings ...)
  2019-06-11 21:08 ` voidlinux-github
@ 2019-06-15 12:43 ` voidlinux-github
  32 siblings, 0 replies; 34+ messages in thread
From: voidlinux-github @ 2019-06-15 12:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

There's a merged pull request on the void-packages repository

libretro-mupen64plus: update to 20190611
https://github.com/void-linux/void-packages/pull/12400
Description: Our 2015something version is aging and I don't think it's worth it to do any more fixes on it, especially considering there have been many commits upstream since and updating also allows building on ppc platforms and so on. However, there are no releases, ever, so trying a github commit snapshot (dunno if that's the right thing to do, but it can't be worse than using a random netbsd distfile...)

I also wonder if the default `rpi` option for armv6/7 is right, as that will make it not work on anything but... rpi, which is not exactly a generic target, we have many different ones now. Maybe we should switch that to standard mesa opengl. Thoughts?

I tested cross-compiling to aarch64, but not the others. I'll let the CI handle that.

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2019-06-15 12:43 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 15:53 [PR PATCH] libretro-mupen64plus: update to 20190611 voidlinux-github
2019-06-11 15:54 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 15:54 ` voidlinux-github
2019-06-11 16:20 ` voidlinux-github
2019-06-11 16:20 ` voidlinux-github
2019-06-11 16:21 ` voidlinux-github
2019-06-11 16:41 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 16:41 ` voidlinux-github
2019-06-11 16:42 ` voidlinux-github
2019-06-11 17:02 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 17:02 ` voidlinux-github
2019-06-11 17:03 ` voidlinux-github
2019-06-11 17:25 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 17:25 ` voidlinux-github
2019-06-11 17:33 ` voidlinux-github
2019-06-11 17:33 ` voidlinux-github
2019-06-11 17:33 ` voidlinux-github
2019-06-11 17:36 ` voidlinux-github
2019-06-11 17:44 ` voidlinux-github
2019-06-11 17:51 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 17:51 ` voidlinux-github
2019-06-11 18:50 ` voidlinux-github
2019-06-11 19:36 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 19:36 ` voidlinux-github
2019-06-11 19:36 ` voidlinux-github
2019-06-11 19:58 ` voidlinux-github
2019-06-11 20:25 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 20:25 ` voidlinux-github
2019-06-11 21:06 ` voidlinux-github
2019-06-11 21:06 ` voidlinux-github
2019-06-11 21:06 ` voidlinux-github
2019-06-11 21:06 ` voidlinux-github
2019-06-11 21:08 ` voidlinux-github
2019-06-15 12:43 ` [PR PATCH] [Merged]: " voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).