mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
libretro-mupen64plus-rpi: merge into libretro-mupen64plus
add an rpi build option for armv6/7, but should work all the same
This commit is contained in:
parent
d9ec54fc6f
commit
96035cce44
6 changed files with 25 additions and 112 deletions
1
srcpkgs/libretro-mupen64plus-rpi
Symbolic link
1
srcpkgs/libretro-mupen64plus-rpi
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
libretro-mupen64plus
|
|
@ -1,24 +0,0 @@
|
||||||
--- a/Makefile
|
|
||||||
+++ b/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
|
|
||||||
--- a/libretro-common/include/glsm/glsm.h
|
|
||||||
+++ b/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)
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/GLideN64/src/ShaderUtils.h 2019-05-31 19:25:22.000000000 +0200
|
|
||||||
+++ b/GLideN64/src/ShaderUtils.h 2021-03-02 14:30:43.395732704 +0100
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
#ifndef SHADER_UTILS_H
|
|
||||||
#define SHADER_UTILS_H
|
|
||||||
|
|
||||||
+#include <string>
|
|
||||||
#include "OpenGL.h"
|
|
||||||
#include "Combiner.h"
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
This is needed to build on armv6/7 musl.
|
|
||||||
--- a/mupen64plus-core/src/r4300/new_dynarec/new_dynarec.c
|
|
||||||
+++ b/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
|
|
||||||
--- a/mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.c
|
|
||||||
+++ b/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"
|
|
|
@ -1,35 +0,0 @@
|
||||||
# Template file for 'libretro-mupen64plus-rpi'
|
|
||||||
pkgname=libretro-mupen64plus-rpi
|
|
||||||
version=20190611
|
|
||||||
revision=1
|
|
||||||
archs="armv6l* armv7l*"
|
|
||||||
_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
|
|
||||||
hostmakedepends="pkg-config unzip"
|
|
||||||
makedepends="rpi-userland-devel zlib-devel"
|
|
||||||
short_desc="Libretro port of Mupen64 Plus"
|
|
||||||
maintainer="Orphaned <orphan@voidlinux.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"
|
|
||||||
|
|
||||||
CFLAGS="-fcommon"
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'libretro-mupen64plus'
|
# Template file for 'libretro-mupen64plus'
|
||||||
pkgname=libretro-mupen64plus
|
pkgname=libretro-mupen64plus
|
||||||
version=20190611
|
version=20190611
|
||||||
revision=1
|
revision=2
|
||||||
_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
|
_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
|
||||||
hostmakedepends="pkg-config unzip"
|
hostmakedepends="pkg-config unzip"
|
||||||
makedepends="MesaLib-devel zlib-devel"
|
makedepends="MesaLib-devel zlib-devel"
|
||||||
|
@ -11,16 +11,16 @@ license="GPL-3.0-or-later"
|
||||||
homepage="http://www.libretro.com/"
|
homepage="http://www.libretro.com/"
|
||||||
distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
|
distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
|
||||||
checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
|
checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
|
||||||
conflicts="ĺibretro-mupen64plus-rpi>=0"
|
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686*) hostmakedepends+=" nasm";;
|
i686*) hostmakedepends+=" nasm";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
build_options="gles gles3"
|
build_options="gles gles3 rpi"
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
armv*|aarch64*) build_options_default="gles";;
|
armv*) build_options_default="rpi";;
|
||||||
|
aarch64*) build_options_default="gles";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CFLAGS="-fcommon"
|
CFLAGS="-fcommon"
|
||||||
|
@ -30,22 +30,32 @@ do_build() {
|
||||||
|
|
||||||
# setting ARCH makes sure proper dynarec is selected
|
# setting ARCH makes sure proper dynarec is selected
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686*) _args="ARCH=i686";;
|
armv*) _args=(ARCH=arm);;
|
||||||
arm*) _args="ARCH=arm";;
|
*) _args=(ARCH="${XBPS_TARGET_MACHINE%-musl}");;
|
||||||
aarch64*) _args="ARCH=aarch64";;
|
|
||||||
x86_64*) _args="ARCH=x86_64";;
|
|
||||||
*) _args="ARCH=${XBPS_TARGET_MACHINE%-musl}";;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$build_option_gles3" ]; then
|
if [ "$build_option_rpi" ]; then
|
||||||
_args+=" FORCE_GLES3=1"
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
elif [ "$builld_option_gles" ]; then
|
armv6*) _args+=(platform="rpi mesa");;
|
||||||
_args+=" FORCE_GLES=1"
|
armv7*) _args+=(platform="rpi2 mesa");;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make CC=$CC ${_args} ${makejobs}
|
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() {
|
do_install() {
|
||||||
vinstall mupen64plus_libretro.so 755 usr/lib/libretro
|
vinstall mupen64plus_libretro.so 755 usr/lib/libretro
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libretro-mupen64plus-rpi_package() {
|
||||||
|
build_style=meta
|
||||||
|
short_desc+=" (transitional dummy package)"
|
||||||
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue