summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-06-13 10:43:15 +0000
committernia <nia@pkgsrc.org>2020-06-13 10:43:15 +0000
commitbe00927557d39cfe9ca1bde886d9ecd78e6aa582 (patch)
treeef6a43429d4ef20f0c4f2b4943bb56bf76c19626
parent65eea0570a58deac2da33c23166cd998abd88e4e (diff)
downloadpkgsrc-be00927557d39cfe9ca1bde886d9ecd78e6aa582.tar.gz
libretro-ppsspp: Unbundle deps. Add theoretical aarch64 support.
Bump PKGREVISION.
-rw-r--r--emulators/libretro-ppsspp/Makefile9
-rw-r--r--emulators/libretro-ppsspp/distinfo6
-rw-r--r--emulators/libretro-ppsspp/patches/patch-libretro_Makefile15
-rw-r--r--emulators/libretro-ppsspp/patches/patch-libretro_Makefile.common105
4 files changed, 125 insertions, 10 deletions
diff --git a/emulators/libretro-ppsspp/Makefile b/emulators/libretro-ppsspp/Makefile
index 003ee7ac099..139208dfb04 100644
--- a/emulators/libretro-ppsspp/Makefile
+++ b/emulators/libretro-ppsspp/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2020/05/31 18:51:00 nia Exp $
+# $NetBSD: Makefile,v 1.8 2020/06/13 10:43:15 nia Exp $
PKGNAME= libretro-ppsspp-1.7.5
+PKGREVISION= 1
CATEGORIES= emulators
MAINTAINER= pkgsrc-users@NetBSD.org
@@ -45,12 +46,15 @@ ONLY_FOR_PLATFORM= *-*-*arm* *-*-x86_64 *-*-i386
.if !empty(MACHINE_ARCH:M*arm*)
CFLAGS+= -marm
MAKE_FLAGS+= TARGET_ARCH=arm
+.elif ${MACHINE_ARCH} == "aarch64"
+MAKE_FLAGS+= TARGET_ARCH=arm64
.elif ${MACHINE_ARCH} == "x86_64"
MAKE_FLAGS+= TARGET_ARCH=x86_64
.elif ${MACHINE_ARCH} == "i386"
MAKE_FLAGS+= TARGET_ARCH=x86
.endif
+LDFLAGS+= -lpng -lsnappy -lxxhash
LDFLAGS+= ${BUILDLINK_LDADD.libexecinfo}
post-extract:
@@ -61,5 +65,8 @@ post-extract:
.include "options.mk"
.include "../../emulators/retroarch/core.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../devel/snappy/buildlink3.mk"
+.include "../../devel/xxhash/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
.include "../../multimedia/ffmpeg4/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/libretro-ppsspp/distinfo b/emulators/libretro-ppsspp/distinfo
index cfe4da9bec5..b33ec2163ec 100644
--- a/emulators/libretro-ppsspp/distinfo
+++ b/emulators/libretro-ppsspp/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2020/05/14 19:34:44 joerg Exp $
+$NetBSD: distinfo,v 1.4 2020/06/13 10:43:15 nia Exp $
SHA1 (ppsspp-1.7.5/ppsspp-armips.tar.gz) = bcb620c901b139a9ab28fdce41436d1a88da351d
RMD160 (ppsspp-1.7.5/ppsspp-armips.tar.gz) = a3b2c9388f4253a069275679d83c8ae9c07fa98a
@@ -17,5 +17,5 @@ RMD160 (ppsspp-1.7.5/ppsspp.tar.gz) = 62c542117d39e2d182c2e424d5ec705447afabbb
SHA512 (ppsspp-1.7.5/ppsspp.tar.gz) = 7e1f93754e8969fee671c2cd8424cdff84b6351b4493f65c71fab4e9b99fc2a7c21c3a41fd051915f5293cda18957625649ba5ea69b88ed3efba9f4128252298
Size (ppsspp-1.7.5/ppsspp.tar.gz) = 19487276 bytes
SHA1 (patch-ext_glslang_glslang_Include_PoolAlloc.h) = 2eb3ed7637c9e26011c6e29fda79c72e8aee78c5
-SHA1 (patch-libretro_Makefile) = ff14d98bb21d87b5a27f40b180d73beef7ab2f74
-SHA1 (patch-libretro_Makefile.common) = eebde48b059d8a0a2ec5ae7805e7a2c083f44c1c
+SHA1 (patch-libretro_Makefile) = f892e451167139b15fc3cda98ddb15fb7a687ba4
+SHA1 (patch-libretro_Makefile.common) = d76acea02468c0e96d45ce949b6a2ee26911d0a9
diff --git a/emulators/libretro-ppsspp/patches/patch-libretro_Makefile b/emulators/libretro-ppsspp/patches/patch-libretro_Makefile
index 773cbf0395a..a3e0581d6fa 100644
--- a/emulators/libretro-ppsspp/patches/patch-libretro_Makefile
+++ b/emulators/libretro-ppsspp/patches/patch-libretro_Makefile
@@ -1,8 +1,10 @@
-$NetBSD: patch-libretro_Makefile,v 1.1 2018/08/14 12:55:41 nia Exp $
+$NetBSD: patch-libretro_Makefile,v 1.2 2020/06/13 10:43:15 nia Exp $
Use ffmpeg from pkgsrc.
---- libretro/Makefile.orig 2018-06-05 17:58:41.000000000 +0000
+Don't pass CFLAGS to as.
+
+--- libretro/Makefile.orig 2018-12-04 13:43:39.000000000 +0000
+++ libretro/Makefile
@@ -40,7 +40,6 @@ endif
@@ -23,3 +25,12 @@ Use ffmpeg from pkgsrc.
fpic = -fPIC
ifneq (,$(findstring gles,$(platform)))
GLES = 1
+@@ -429,7 +426,7 @@ endif
+ all: $(TARGET)
+
+ %.o: %.S
+- $(AS) $(CFLAGS) -c $(OBJOUT)$@ $<
++ $(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
+
+ %.o: %.c
+ $(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
diff --git a/emulators/libretro-ppsspp/patches/patch-libretro_Makefile.common b/emulators/libretro-ppsspp/patches/patch-libretro_Makefile.common
index c37fe1239b0..5f3ab8e1b7b 100644
--- a/emulators/libretro-ppsspp/patches/patch-libretro_Makefile.common
+++ b/emulators/libretro-ppsspp/patches/patch-libretro_Makefile.common
@@ -1,4 +1,6 @@
-$NetBSD: patch-libretro_Makefile.common,v 1.2 2019/01/02 19:52:51 nia Exp $
+$NetBSD: patch-libretro_Makefile.common,v 1.3 2020/06/13 10:43:15 nia Exp $
+
+Avoid using bundled copy of zlib, libpng, xxhash, snappy.
Fix "Build error: undefined references".
@@ -6,7 +8,53 @@ https://github.com/libretro/ppsspp/commit/68634705b9d6b5bc8db2232bc92b6ae06f0b31
--- libretro/Makefile.common.orig 2018-12-04 13:43:39.000000000 +0000
+++ libretro/Makefile.common
-@@ -229,6 +229,7 @@ SOURCES_CXX += \
+@@ -12,8 +12,6 @@ INCFLAGS += \
+ -I$(COMMONDIR) \
+ -I$(CORE_DIR)/libretro \
+ -I$(EXTDIR)/native \
+- -I$(EXTDIR)/zlib \
+- -I$(EXTDIR)/snappy \
+ -I$(FFMPEGDIR) \
+ $(FFMPEGINCFLAGS) \
+ -I$(EXTDIR)/cityhash \
+@@ -22,7 +20,6 @@ INCFLAGS += \
+ -I$(NATIVEDIR) \
+ -I$(EXTDIR)/libkirk \
+ -I$(EXTDIR)/xbrz \
+- -I$(EXTDIR)/xxhash \
+ -I$(EXTDIR)/glew
+
+ ifeq ($(PLATFORM_EXT), android)
+@@ -99,28 +96,7 @@ SOURCES_C += \
+ $(EXTDIR)/libkirk/ec.c \
+ $(EXTDIR)/libkirk/kirk_engine.c
+
+-SOURCES_C += \
+- $(NATIVEDIR)/ext/libpng17/png.c \
+- $(NATIVEDIR)/ext/libpng17/pngerror.c \
+- $(NATIVEDIR)/ext/libpng17/pngget.c \
+- $(NATIVEDIR)/ext/libpng17/pngmem.c \
+- $(NATIVEDIR)/ext/libpng17/pngread.c \
+- $(NATIVEDIR)/ext/libpng17/pngrio.c \
+- $(NATIVEDIR)/ext/libpng17/pngrtran.c \
+- $(NATIVEDIR)/ext/libpng17/pngrutil.c \
+- $(NATIVEDIR)/ext/libpng17/pngset.c \
+- $(NATIVEDIR)/ext/libpng17/pngtrans.c \
+- $(NATIVEDIR)/ext/libpng17/pngwio.c \
+- $(NATIVEDIR)/ext/libpng17/pngwrite.c \
+- $(NATIVEDIR)/ext/libpng17/pngwtran.c \
+- $(NATIVEDIR)/ext/libpng17/pngwutil.c
+-
+ SOURCES_C += $(EXTDIR)/sfmt19937/SFMT.c
+-SOURCES_C += $(EXTDIR)/xxhash.c
+-
+-SOURCES_CXX += \
+- $(EXTDIR)/snappy/snappy-c.cpp \
+- $(EXTDIR)/snappy/snappy.cpp
+
+ SOURCES_CXX += $(EXTDIR)/xbrz/xbrz.cpp
+
+@@ -229,6 +205,7 @@ SOURCES_CXX += \
$(EXTDIR)/glslang/glslang/MachineIndependent/ShaderLang.cpp \
$(EXTDIR)/glslang/glslang/MachineIndependent/SymbolTable.cpp \
$(EXTDIR)/glslang/glslang/MachineIndependent/Versions.cpp \
@@ -14,7 +62,7 @@ https://github.com/libretro/ppsspp/commit/68634705b9d6b5bc8db2232bc92b6ae06f0b31
$(EXTDIR)/glslang/glslang/MachineIndependent/glslang_tab.cpp \
$(EXTDIR)/glslang/glslang/MachineIndependent/intermOut.cpp \
$(EXTDIR)/glslang/glslang/MachineIndependent/iomapper.cpp \
-@@ -392,6 +393,7 @@ SOURCES_CXX += $(NATIVEDIR)/math/datacon
+@@ -392,6 +369,7 @@ SOURCES_CXX += $(NATIVEDIR)/math/datacon
$(COREDIR)/HLE/sceMpeg.cpp \
$(COREDIR)/HLE/sceNet.cpp \
$(COREDIR)/HLE/sceNetAdhoc.cpp \
@@ -22,7 +70,7 @@ https://github.com/libretro/ppsspp/commit/68634705b9d6b5bc8db2232bc92b6ae06f0b31
$(COREDIR)/HLE/proAdhocServer.cpp \
$(COREDIR)/HLE/proAdhoc.cpp \
$(COREDIR)/HLE/sceOpenPSID.cpp \
-@@ -454,6 +456,7 @@ SOURCES_CXX += $(NATIVEDIR)/math/datacon
+@@ -454,6 +432,7 @@ SOURCES_CXX += $(NATIVEDIR)/math/datacon
$(COREDIR)/MemMap.cpp \
$(COREDIR)/MemMapFunctions.cpp \
$(COREDIR)/PSPLoaders.cpp \
@@ -30,3 +78,52 @@ https://github.com/libretro/ppsspp/commit/68634705b9d6b5bc8db2232bc92b6ae06f0b31
$(COREDIR)/Reporting.cpp \
$(COREDIR)/SaveState.cpp \
$(COREDIR)/Screenshot.cpp \
+@@ -494,10 +473,7 @@ ifeq ($(WITH_DYNAREC),1)
+ $(COMMONDIR)/ColorConvNEON.cpp \
+ $(GPUDIR)/Common/TextureDecoderNEON.cpp
+
+- SOURCES_C += $(NATIVEDIR)/ext/libpng17/arm/arm_init.c \
+- $(NATIVEDIR)/ext/libpng17/arm/filter_neon_intrinsics.c
+- ASMFILES += $(NATIVEDIR)/math/fast/fast_matrix_neon.S \
+- $(NATIVEDIR)/ext/libpng17/arm/filter_neon.S
++ ASMFILES += $(NATIVEDIR)/math/fast/fast_matrix_neon.S
+ endif
+ else ifeq ($(TARGET_ARCH),arm64)
+ DYNAFLAGS += -D_ARCH_64
+@@ -523,10 +499,7 @@ ifeq ($(WITH_DYNAREC),1)
+ $(COMMONDIR)/ColorConvNEON.cpp \
+ $(GPUDIR)/Common/TextureDecoderNEON.cpp
+
+- SOURCES_C += $(NATIVEDIR)/ext/libpng17/arm/arm_init.c \
+- $(NATIVEDIR)/ext/libpng17/arm/filter_neon_intrinsics.c
+- ASMFILES += $(NATIVEDIR)/math/fast/fast_matrix_neon.S \
+- $(NATIVEDIR)/ext/libpng17/arm/filter_neon.S
++ ASMFILES += $(NATIVEDIR)/math/fast/fast_matrix_neon.S
+ endif
+ else
+ ifneq (,$(findstring msvc,$(platform)))
+@@ -656,24 +629,6 @@ SOURCES_CXX += \
+ $(LIBRETRODIR)/LibretroGraphicsContext.cpp \
+ $(LIBRETRODIR)/LibretroGLContext.cpp
+
+-ifneq ($(STATIC_LINKING), 1)
+-SOURCES_C += \
+- $(EXTDIR)/zlib/adler32.c \
+- $(EXTDIR)/zlib/compress.c \
+- $(EXTDIR)/zlib/crc32.c \
+- $(EXTDIR)/zlib/deflate.c \
+- $(EXTDIR)/zlib/gzclose.c \
+- $(EXTDIR)/zlib/gzlib.c \
+- $(EXTDIR)/zlib/gzread.c \
+- $(EXTDIR)/zlib/gzwrite.c \
+- $(EXTDIR)/zlib/inffast.c \
+- $(EXTDIR)/zlib/inflate.c \
+- $(EXTDIR)/zlib/inftrees.c \
+- $(EXTDIR)/zlib/trees.c \
+- $(EXTDIR)/zlib/uncompr.c \
+- $(EXTDIR)/zlib/zutil.c
+-endif
+-
+ GIT_VERSION_SRC = $(CORE_DIR)/git-version.cpp
+ GIT_VERSION := $(shell git describe --always || echo v1.4.2-git)
+ GIT_VERSION_NO_UPDATE = $(findstring 1,$(shell grep -s PPSSPP_GIT_VERSION_NO_UPDATE $(GIT_VERSION_SRC)))