Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] libretro-mupen64plus: update to 20190611
Date: Tue, 11 Jun 2019 19:51:20 +0200	[thread overview]
Message-ID: <20190611175120.nkWtla-m4HnNgO-33puKaJ1gcnXv-tYumqV9oeETpuc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-12400@inbox.vuxu.org>

[-- 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() {

  parent reply	other threads:[~2019-06-11 17:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 15:53 [PR PATCH] " 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 ` voidlinux-github [this message]
2019-06-11 17:51 ` [PR PATCH] [Updated] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611175120.nkWtla-m4HnNgO-33puKaJ1gcnXv-tYumqV9oeETpuc@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).