pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/multimedia/gpac
Module Name: pkgsrc
Committed By: nia
Date: Fri Sep 17 00:10:21 UTC 2021
Modified Files:
pkgsrc/multimedia/gpac: Makefile PLIST distinfo options.mk
pkgsrc/multimedia/gpac/patches: patch-Makefile
Added Files:
pkgsrc/multimedia/gpac/patches: patch-include_gpac_Remotery.h
patch-src_quickjs_cutils.h patch-src_quickjs_quickjs.c
patch-src_utils_Remotery.c patch-src_utils_os__config__init.c
Log Message:
gpac: Fix building on notdarwin.
To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 pkgsrc/multimedia/gpac/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/multimedia/gpac/PLIST
cvs rdiff -u -r1.18 -r1.19 pkgsrc/multimedia/gpac/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/multimedia/gpac/options.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/multimedia/gpac/patches/patch-Makefile
cvs rdiff -u -r0 -r1.1 \
pkgsrc/multimedia/gpac/patches/patch-include_gpac_Remotery.h \
pkgsrc/multimedia/gpac/patches/patch-src_quickjs_cutils.h \
pkgsrc/multimedia/gpac/patches/patch-src_quickjs_quickjs.c \
pkgsrc/multimedia/gpac/patches/patch-src_utils_Remotery.c \
pkgsrc/multimedia/gpac/patches/patch-src_utils_os__config__init.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/multimedia/gpac/Makefile
diff -u pkgsrc/multimedia/gpac/Makefile:1.82 pkgsrc/multimedia/gpac/Makefile:1.83
--- pkgsrc/multimedia/gpac/Makefile:1.82 Fri Jul 30 12:27:02 2021
+++ pkgsrc/multimedia/gpac/Makefile Fri Sep 17 00:10:21 2021
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.82 2021/07/30 12:27:02 ryoon Exp $
+# $NetBSD: Makefile,v 1.83 2021/09/17 00:10:21 nia Exp $
DISTNAME= gpac-1.0.1
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_GITHUB:=gpac/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@@ -21,7 +21,8 @@ CONFIGURE_ARGS+= --extra-cflags="${CFLAG
CONFIGURE_ARGS+= --extra-ldflags="${LDFLAGS}"
CFLAGS+= -I${BUILDLINK_PREFIX.faad2}/${BUILDLINK_INCDIRS.faad2}
-.include "options.mk"
+# malloc_usable_size()
+LDFLAGS.NetBSD+= -ljemalloc
# Pre-generate header and avoid git dependency.
pre-build:
@@ -29,37 +30,33 @@ pre-build:
.include "../../mk/bsd.prefs.mk"
+PLIST_VARS+= darwin notdarwin
.if ${SHLIB_TYPE} == "dylib"
+PLIST.darwin= yes
PLIST_SUBST+= LIBEXT=dylib
post-install:
cd ${DESTDIR}${PREFIX} && find lib/gpac -name "*.dylib" | while read lib; do \
install_name_tool -id ${PREFIX}/$${lib} $${lib}; \
done
.else
-PLIST_SUBST+= LIBEXT=so
+PLIST.notdarwin= yes
+PLIST_SUBST+= LIBEXT=so
.endif
+.include "options.mk"
.include "../../audio/faad2/buildlink3.mk"
.include "../../audio/liba52/buildlink3.mk"
.include "../../audio/libmad/buildlink3.mk"
.include "../../audio/libvorbis/buildlink3.mk"
-.include "../../audio/pulseaudio/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
-# doesn't work yet
-#.include "../../lang/spidermonkey/buildlink3.mk"
.include "../../multimedia/ffmpeg4/buildlink3.mk"
.include "../../multimedia/libogg/buildlink3.mk"
.include "../../multimedia/libtheora/buildlink3.mk"
.include "../../multimedia/xvidcore/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/xmlrpc-c/buildlink3.mk"
-PLIST_VARS+= oss
-.if ${OPSYS} != "Darwin"
-.include "../../mk/oss.buildlink3.mk"
-PLIST.oss= yes
-.endif
.include "../../mk/jpeg.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/multimedia/gpac/PLIST
diff -u pkgsrc/multimedia/gpac/PLIST:1.10 pkgsrc/multimedia/gpac/PLIST:1.11
--- pkgsrc/multimedia/gpac/PLIST:1.10 Wed Jul 14 01:35:23 2021
+++ pkgsrc/multimedia/gpac/PLIST Fri Sep 17 00:10:21 2021
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.10 2021/07/14 01:35:23 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.11 2021/09/17 00:10:21 nia Exp $
bin/MP4Box
bin/MP4Client
bin/gpac
@@ -95,12 +95,15 @@ include/gpac/version.h
include/gpac/webvtt.h
include/gpac/xml.h
lib/gpac/gm_ft_font.${LIBEXT}
-${PLIST.oss}lib/gpac/gm_oss_audio.${LIBEXT}
-lib/gpac/gm_pulseaudio.${LIBEXT}
+${PLIST.alsa}lib/gpac/gm_alsa.${LIBEXT}
+${PLIST.jack}lib/gpac/gm_jack.${LIBEXT}
+${PLIST.pulseaudio}lib/gpac/gm_pulseaudio.${LIBEXT}
lib/gpac/gm_validator.${LIBEXT}
${PLIST.x11}lib/gpac/gm_x11_out.${LIBEXT}
-lib/libgpac.10.1.0.${LIBEXT}
-lib/libgpac.10.${LIBEXT}
+${PLIST.darwin}lib/libgpac.10.1.0.${LIBEXT}
+${PLIST.darwin}lib/libgpac.10.${LIBEXT}
+${PLIST.notdarwin}lib/libgpac.${LIBEXT}.10.1.0
+${PLIST.notdarwin}lib/libgpac.${LIBEXT}.10
lib/libgpac.${LIBEXT}
lib/libgpac_static.a
lib/pkgconfig/gpac.pc
@@ -108,6 +111,7 @@ man/man1/gpac-filters.1
man/man1/gpac.1
man/man1/mp4box.1
man/man1/mp4client.1
+share/applications/gpac.desktop
share/gpac/default.cfg
share/gpac/gui/extensions/H2B2VS/H2B2VS.png
share/gpac/gui/extensions/H2B2VS/h2b2vs.js
@@ -199,3 +203,4 @@ share/gpac/scripts/ttml-renderer.js
share/gpac/scripts/webvtt-renderer.js
share/gpac/shaders/fragment.glsl
share/gpac/shaders/vertex.glsl
+share/pixmaps/gpac.png
Index: pkgsrc/multimedia/gpac/distinfo
diff -u pkgsrc/multimedia/gpac/distinfo:1.18 pkgsrc/multimedia/gpac/distinfo:1.19
--- pkgsrc/multimedia/gpac/distinfo:1.18 Wed Jul 14 01:35:23 2021
+++ pkgsrc/multimedia/gpac/distinfo Fri Sep 17 00:10:21 2021
@@ -1,8 +1,13 @@
-$NetBSD: distinfo,v 1.18 2021/07/14 01:35:23 schmonz Exp $
+$NetBSD: distinfo,v 1.19 2021/09/17 00:10:21 nia Exp $
SHA1 (gpac-1.0.1.tar.gz) = ceda4a9ffc2fb51958fa292b432d1f0f9a457a60
RMD160 (gpac-1.0.1.tar.gz) = 1e19dba1a2770268f64947f6ba34fb458028764f
SHA512 (gpac-1.0.1.tar.gz) = 533371d59e72250bef315be03ec3437cd66782d0fb6bdb6486a6f4d57d06a6a7deff1b31fe8bfd360be1d1c848b33b5d25e7268f56f27f8e92cbcb7da1aba82b
Size (gpac-1.0.1.tar.gz) = 10352926 bytes
-SHA1 (patch-Makefile) = 4fa2a8034ef1e01bc3c716f8b3b60be976e620f1
+SHA1 (patch-Makefile) = 1478bc37c42f8e62dbf44e9dfe2fa988ef68e0b5
SHA1 (patch-configure) = b76d24b134b7e10c613411f08d8374f0e0202599
+SHA1 (patch-include_gpac_Remotery.h) = 0a8775a6cb7b16e2c5c7b6018c940bf9a049cc31
+SHA1 (patch-src_quickjs_cutils.h) = df7662578bf2c727da43dce91d94bc380f6da84d
+SHA1 (patch-src_quickjs_quickjs.c) = 276e3d2dfa51a64bf99795b294bb7e16405a9627
+SHA1 (patch-src_utils_Remotery.c) = dfd01780211bcccfc574c572690241c91d941ce0
+SHA1 (patch-src_utils_os__config__init.c) = 99e339d969e319a0a29fc8b366f6335c19ca4c50
Index: pkgsrc/multimedia/gpac/options.mk
diff -u pkgsrc/multimedia/gpac/options.mk:1.3 pkgsrc/multimedia/gpac/options.mk:1.4
--- pkgsrc/multimedia/gpac/options.mk:1.3 Sat Sep 19 03:38:07 2020
+++ pkgsrc/multimedia/gpac/options.mk Fri Sep 17 00:10:21 2021
@@ -1,11 +1,45 @@
-# $NetBSD: options.mk,v 1.3 2020/09/19 03:38:07 schmonz Exp $
+# $NetBSD: options.mk,v 1.4 2021/09/17 00:10:21 nia Exp $
-PKG_OPTIONS_VAR= PKG_OPTIONS.gpac
-PKG_SUPPORTED_OPTIONS= x11
-PKG_SUGGESTED_OPTIONS= x11
+PKG_OPTIONS_VAR= PKG_OPTIONS.gpac
+PKG_SUPPORTED_OPTIONS= alsa jack pulseaudio x11
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${OPSYS} == "Linux"
+PKG_SUGGESTED_OPTIONS= alsa x11
+.else
+PKG_SUGGESTED_OPTIONS= x11
+.endif
.include "../../mk/bsd.options.mk"
+PLIST_VARS+= alsa
+.if !empty(PKG_OPTIONS:Malsa)
+PLIST.alsa= yes
+CONFIGURE_ARGS+= --enable-alsa
+.include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-alsa
+.endif
+
+PLIST_VARS+= jack
+.if !empty(PKG_OPTIONS:Mjack)
+PLIST.jack= yes
+CONFIGURE_ARGS+= --enable-jack
+.include "../../audio/jack/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-jack
+.endif
+
+PLIST_VARS+= pulseaudio
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+PLIST.pulseaudio= yes
+CONFIGURE_ARGS+= --enable-pulseaudio
+.include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-pulseaudio
+.endif
+
PLIST_VARS+= x11
.if !empty(PKG_OPTIONS:Mx11)
CONFIGURE_ARGS+= --X11-path=${X11BASE}
Index: pkgsrc/multimedia/gpac/patches/patch-Makefile
diff -u pkgsrc/multimedia/gpac/patches/patch-Makefile:1.4 pkgsrc/multimedia/gpac/patches/patch-Makefile:1.5
--- pkgsrc/multimedia/gpac/patches/patch-Makefile:1.4 Wed Jul 14 01:35:24 2021
+++ pkgsrc/multimedia/gpac/patches/patch-Makefile Fri Sep 17 00:10:21 2021
@@ -1,10 +1,25 @@
-$NetBSD: patch-Makefile,v 1.4 2021/07/14 01:35:24 schmonz Exp $
+$NetBSD: patch-Makefile,v 1.5 2021/09/17 00:10:21 nia Exp $
-Remove non-standard cp(1) option.
+- Install desktop files on Darwin too.
+- Remove non-standard cp(1) option.
--- Makefile.orig 2020-09-10 16:38:49.000000000 +0000
+++ Makefile
-@@ -171,15 +171,9 @@ endif
+@@ -156,13 +156,11 @@ endif
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/res/gpac.png $(DESTDIR)$(prefix)/share/gpac/res/
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/default.cfg $(DESTDIR)$(prefix)/share/gpac/
+
+-ifneq ($(CONFIG_DARWIN),yes)
+ $(INSTALL) -d "$(DESTDIR)$(prefix)/share/pixmaps"
+ $(INSTALL) -d "$(DESTDIR)$(prefix)/share/applications"
+
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/res/gpac.png "$(DESTDIR)$(prefix)/share/pixmaps/"
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/gpac.desktop "$(DESTDIR)$(prefix)/share/applications/"
+-endif
+
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/gui/gui.bt "$(DESTDIR)$(prefix)/share/gpac/gui/"
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/gui/gui.js "$(DESTDIR)$(prefix)/share/gpac/gui/"
+@@ -171,15 +169,9 @@ endif
$(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/scripts/ttml-renderer.js "$(DESTDIR)$(prefix)/share/gpac/scripts/"
Added files:
Index: pkgsrc/multimedia/gpac/patches/patch-include_gpac_Remotery.h
diff -u /dev/null pkgsrc/multimedia/gpac/patches/patch-include_gpac_Remotery.h:1.1
--- /dev/null Fri Sep 17 00:10:21 2021
+++ pkgsrc/multimedia/gpac/patches/patch-include_gpac_Remotery.h Fri Sep 17 00:10:21 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-include_gpac_Remotery.h,v 1.1 2021/09/17 00:10:21 nia Exp $
+
+Add support for NetBSD.
+
+--- include/gpac/Remotery.h.orig 2020-09-10 16:38:49.000000000 +0000
++++ include/gpac/Remotery.h
+@@ -120,7 +120,7 @@ documented just below this comment.
+ // Platform identification
+ #if defined(_WINDOWS) || defined(_WIN32)
+ #define RMT_PLATFORM_WINDOWS
+-#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#elif defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #define RMT_PLATFORM_LINUX
+ #define RMT_PLATFORM_POSIX
+ #elif defined(__APPLE__)
Index: pkgsrc/multimedia/gpac/patches/patch-src_quickjs_cutils.h
diff -u /dev/null pkgsrc/multimedia/gpac/patches/patch-src_quickjs_cutils.h:1.1
--- /dev/null Fri Sep 17 00:10:21 2021
+++ pkgsrc/multimedia/gpac/patches/patch-src_quickjs_cutils.h Fri Sep 17 00:10:21 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_quickjs_cutils.h,v 1.1 2021/09/17 00:10:21 nia Exp $
+
+Avoid colliding with NetBSD libc functions.
+
+--- src/quickjs/cutils.h.orig 2020-09-10 16:38:49.000000000 +0000
++++ src/quickjs/cutils.h
+@@ -266,6 +266,9 @@ static inline void put_u8(uint8_t *tab,
+ *tab = val;
+ }
+
++#ifdef __NetBSD__
++#include <sys/endian.h>
++#else
+ static inline uint16_t bswap16(uint16_t x)
+ {
+ return (x >> 8) | (x << 8);
+@@ -288,6 +291,7 @@ static inline uint64_t bswap64(uint64_t
+ ((v & ((uint64_t)0xff << (1 * 8))) << (5 * 8)) |
+ ((v & ((uint64_t)0xff << (0 * 8))) << (7 * 8));
+ }
++#endif
+
+ /* XXX: should take an extra argument to pass slack information to the caller */
+ typedef void *DynBufReallocFunc(void *opaque, void *ptr, size_t size);
Index: pkgsrc/multimedia/gpac/patches/patch-src_quickjs_quickjs.c
diff -u /dev/null pkgsrc/multimedia/gpac/patches/patch-src_quickjs_quickjs.c:1.1
--- /dev/null Fri Sep 17 00:10:21 2021
+++ pkgsrc/multimedia/gpac/patches/patch-src_quickjs_quickjs.c Fri Sep 17 00:10:21 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_quickjs_quickjs.c,v 1.1 2021/09/17 00:10:21 nia Exp $
+
+Add support for NetBSD.
+
+--- src/quickjs/quickjs.c.orig 2020-09-10 16:38:49.000000000 +0000
++++ src/quickjs/quickjs.c
+@@ -36,7 +36,7 @@
+ #include <math.h>
+ #if defined(__APPLE__)
+ #include <malloc/malloc.h>
+-#elif defined(__linux__) || defined(__NX__)
++#elif defined(__linux__) || defined(__NX__) || defined(__NetBSD__)
+ #include <malloc.h>
+ #endif
+
Index: pkgsrc/multimedia/gpac/patches/patch-src_utils_Remotery.c
diff -u /dev/null pkgsrc/multimedia/gpac/patches/patch-src_utils_Remotery.c:1.1
--- /dev/null Fri Sep 17 00:10:21 2021
+++ pkgsrc/multimedia/gpac/patches/patch-src_utils_Remotery.c Fri Sep 17 00:10:21 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_utils_Remotery.c,v 1.1 2021/09/17 00:10:21 nia Exp $
+
+Add support for NetBSD.
+
+--- src/utils/Remotery.c.orig 2020-09-10 16:38:49.000000000 +0000
++++ src/utils/Remotery.c
+@@ -114,7 +114,7 @@ static rmtBool g_SettingsInitialized = R
+ #include <time.h>
+ #if defined(__FreeBSD__) || defined(__OpenBSD__)
+ #include <pthread_np.h>
+- #else
++ #elif !defined(__NetBSD__)
+ #include <sys/prctl.h>
+ #endif
+ #endif
+@@ -5269,6 +5269,8 @@ static void SetDebuggerThreadName(const
+ strncat_s(name_clamp, sizeof(name_clamp), name, 15);
+ #if defined(__FreeBSD__) || defined(__OpenBSD__)
+ pthread_set_name_np(pthread_self(), name_clamp);
++ #elif defined(__NetBSD__)
++ pthread_setname_np(pthread_self(), "%s", name_clamp);
+ #else
+ prctl(PR_SET_NAME,name_clamp,0,0,0);
+ #endif
Index: pkgsrc/multimedia/gpac/patches/patch-src_utils_os__config__init.c
diff -u /dev/null pkgsrc/multimedia/gpac/patches/patch-src_utils_os__config__init.c:1.1
--- /dev/null Fri Sep 17 00:10:21 2021
+++ pkgsrc/multimedia/gpac/patches/patch-src_utils_os__config__init.c Fri Sep 17 00:10:21 2021
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_utils_os__config__init.c,v 1.1 2021/09/17 00:10:21 nia Exp $
+
+Support NetBSD.
+
+--- src/utils/os_config_init.c.orig 2020-09-10 16:38:49.000000000 +0000
++++ src/utils/os_config_init.c
+@@ -71,6 +71,10 @@
+ #define TEST_MODULE "gm_"
+ #endif
+
++#if defined(__NetBSD__)
++#include <sys/sysctl.h>
++#endif
++
+ #endif
+
+ #if !defined(GPAC_STATIC_MODULES) && !defined(GPAC_MP4BOX_MINI)
+@@ -295,6 +299,10 @@ static Bool get_default_install_path(cha
+ #if (defined(__DARWIN__) || defined(__APPLE__) || defined(GPAC_CONFIG_LINUX))
+ u32 size;
+ #endif
++#if defined(__NetBSD__)
++ int mib[] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME };
++ size_t size;
++#endif
+
+ /*on OSX, Linux & co, user home is where we store the cfg file*/
+ if (path_type==GF_PATH_CFG) {
+@@ -342,6 +350,15 @@ static Bool get_default_install_path(cha
+ return 1;
+ }
+
++#elif defined(__NetBSD__)
++ size = sizeof(app_path);
++ if (sysctl(mib, 4, app_path, &size, NULL, 0) != -1) {
++ realpath(app_path, file_path);
++ sep = strrchr(file_path, '/');
++ if (sep) sep[0] = 0;
++ return 1;
++ }
++
+ #elif defined(GPAC_CONFIG_LINUX)
+ size = readlink("/proc/self/exe", file_path, GF_MAX_PATH-1);
+ if (size>0) {
Home |
Main Index |
Thread Index |
Old Index