From 9ffeec29ad8a7d43cfdb5d50bec29a054bef1696 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 18 Jan 2025 15:31:54 +0100 Subject: [PATCH] gpac: fix build - follow up to #6004 - PLIST must contain own files only - update revision.h patching - remove variable in DEPENDS for #6255 --- cross/gpac/Makefile | 19 +++++++++++-------- cross/gpac/PLIST | 4 ---- cross/gpac/patches/001-configure.patch | 2 ++ spk/gpac/Makefile | 4 +++- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/cross/gpac/Makefile b/cross/gpac/Makefile index 24388d273f0..43cee053830 100644 --- a/cross/gpac/Makefile +++ b/cross/gpac/Makefile @@ -1,6 +1,6 @@ PKG_NAME = gpac PKG_VERS = 2.2.1 -PKG_REV = 1 +GPAC_GIT_REVISION = "1 (SynoCommunity)" PKG_EXT = tar.gz PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://github.com/gpac/gpac/archive @@ -11,18 +11,21 @@ HOMEPAGE = https://gpac.io COMMENT = Home of MP4Box. LICENSE = LGPLv2 -# incompatible toolchain +# toolchains lacking atomic support UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) DEPENDS = cross/zlib -CONFIGURE_ARGS = --enable-pic -CONFIGURE_ARGS += --extra-cflags="-Wno-pointer-sign" +GNU_CONFIGURE = 1 -PRE_COMPILE_TARGET = gpac_precompile +# suppress some compiler warnings +CONFIGURE_ARGS = --extra-cflags="-Wno-pointer-sign -Wno-array-bounds -Wno-maybe-uninitialized" + +PRE_COMPILE_TARGET = gpac_pre_compile include ../../mk/spksrc.cross-cc.mk -.PHONY: gpac_precompile -gpac_precompile: - @echo "#define GPAC_GIT_REVISION \"$(PKG_REV) (SynoCommunity)\"" > $(WORK_DIR)/$(PKG_DIR)/include/gpac/revision.h +.PHONY: gpac_pre_compile +gpac_pre_compile: + @$(MSG) "Patch revision.h to avoid UNKNOWN_REV (used when build is not in gpac git repository)" + @sed -e 's/"UNKNOWN_REV"/$(GPAC_GIT_REVISION)/' -i $(WORK_DIR)/$(PKG_DIR)/include/gpac/revision.h diff --git a/cross/gpac/PLIST b/cross/gpac/PLIST index 9f7e17d4183..d23802dfcf6 100644 --- a/cross/gpac/PLIST +++ b/cross/gpac/PLIST @@ -4,8 +4,4 @@ lib:lib/gpac/gm_validator.so lnk:lib/libgpac.so lnk:lib/libgpac.so.12 lib:lib/libgpac.so.12.10.1 -lnk:lib/libz.so -lnk:lib/libz.so.1 -lib:lib/libz.so.1.2.13 rsc:share/gpac/ -rsc:share/man/ diff --git a/cross/gpac/patches/001-configure.patch b/cross/gpac/patches/001-configure.patch index 77e7c6ea8cb..b95f5acf5fb 100644 --- a/cross/gpac/patches/001-configure.patch +++ b/cross/gpac/patches/001-configure.patch @@ -1,3 +1,5 @@ +# prefere tools defined as environment variables +# --- configure +++ configure @@ -48,13 +48,13 @@ if test "$cxx_orig" = "" ; then diff --git a/spk/gpac/Makefile b/spk/gpac/Makefile index e81a8bc62a2..9bf25ea4835 100644 --- a/spk/gpac/Makefile +++ b/spk/gpac/Makefile @@ -4,7 +4,9 @@ SPK_REV = 1 SPK_ICON = src/gpac.png -DEPENDS = cross/$(SPK_NAME) +DEPENDS = cross/gpac + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) MAINTAINER = wmanth DISPLAY_NAME = GPAC