aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Beyer <beyert@cs.ucr.edu>2022-06-27 07:08:54 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2022-06-27 07:08:54 +0000
commiteb935d1066f6c36361138dae21cf0ef016b4e97b (patch)
tree2a1402a9960878f1b87a7c8979e372be486ee0bc
parent98bb3ae46e2e6a4da0c039fbf4e1d28b3fdd1de8 (diff)
downloadports-eb935d1066f6c36361138dae21cf0ef016b4e97b.tar.gz
ports-eb935d1066f6c36361138dae21cf0ef016b4e97b.zip
emulators/libretro-flycast: Fix 32-bit / i386 build
PR: 264217
-rw-r--r--emulators/libretro-flycast/Makefile16
-rw-r--r--emulators/libretro-flycast/files/patch-core_rec-x86_rec__x86__driver.cpp11
2 files changed, 22 insertions, 5 deletions
diff --git a/emulators/libretro-flycast/Makefile b/emulators/libretro-flycast/Makefile
index fe5e75d0f23f..6b4a1454ab6c 100644
--- a/emulators/libretro-flycast/Makefile
+++ b/emulators/libretro-flycast/Makefile
@@ -1,14 +1,14 @@
-# $FreeBSD$
+# Created by: Timothy Beyer <beyert@cs.ucr.edu>
PORTNAME= libretro-flycast
PORTVERSION= 0.20210608
+PORTREVISION= 1
CATEGORIES= emulators games
MAINTAINER= beyert@cs.ucr.edu
COMMENT= Standalone port of flycast to libretro
LICENSE= GPLv2
-#LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 i386
@@ -21,7 +21,7 @@ LIB_DEPENDS+= libao.so:audio/libao \
libudev.so:devel/libudev-devd \
libvulkan.so:graphics/vulkan-loader
-USES= compiler:c++11-lib dos2unix gl gmake xorg
+USES= compiler:c++11-lib dos2unix gl gmake pkgconfig xorg
USE_LDCONFIG= yes
USE_GITHUB= yes
@@ -29,7 +29,7 @@ GH_ACCOUNT= libretro
GH_PROJECT= flycast
GH_TAGNAME= 8e4fa54e
-USE_GL+= gl glew glu
+USE_GL+= egl gl glew glu
CFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -I${LOCALBASE}/include
@@ -51,12 +51,18 @@ MAKE_ARGS= HAVE_GENERIC_JIT=0 \
MAKE_ARGS+= WITH_DYNAREC=x86_64
.elif ${ARCH} == i386
MAKE_ARGS+= WITH_DYNAREC=x86
+USE_BINUTILS= yes
+LDFLAGS+= -Wl,-z,notext
.endif
PLIST_FILES= lib/libretro/flycast_libretro.so
+post-patch:
+ @${REINPLACE_CMD} 's|/usr/local|${PREFIX}|' \
+ ${WRKSRC}/Makefile
+
do-install:
- ${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
+ @${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
${INSTALL_LIB} ${WRKSRC}/flycast_libretro.so \
${STAGEDIR}/${PREFIX}/lib/libretro/flycast_libretro.so;
diff --git a/emulators/libretro-flycast/files/patch-core_rec-x86_rec__x86__driver.cpp b/emulators/libretro-flycast/files/patch-core_rec-x86_rec__x86__driver.cpp
new file mode 100644
index 000000000000..0391177b7edc
--- /dev/null
+++ b/emulators/libretro-flycast/files/patch-core_rec-x86_rec__x86__driver.cpp
@@ -0,0 +1,11 @@
+--- core/rec-x86/rec_x86_driver.cpp.orig 2022-05-20 09:34:27 UTC
++++ core/rec-x86/rec_x86_driver.cpp
+@@ -31,7 +31,7 @@ RuntimeBlockInfo* ngen_AllocateBlock(void)
+
+ x86_block* x86e;
+
+-static int cycle_counter;
++int cycle_counter;
+
+ void* loop_no_update;
+ void* intc_sched;