mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
media-video/gpac: drop vulnerable 2.0.0, 2.2.1-r1
Bug: https://bugs.gentoo.org/835341 Bug: https://bugs.gentoo.org/891305 Bug: https://bugs.gentoo.org/907256 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -1,3 +1 @@
|
||||
DIST gpac-2.0.0.tar.gz 11362932 BLAKE2B a8489831efb77c374d13e2edb3951e60a94907c4cd8601919e1390aee0e9002249e97a9200fd006c2aa783c516f701f7695aa84b5f3596a3bc90290916ff4086 SHA512 e95e6d78167fc306917b3ac89e56ba511bbcb0c825da118f5ba374504499352104b5c1f3ee71e7ec018015b8e302f9b07162d22287ddb21c8564b097d900913f
|
||||
DIST gpac-2.2.1.tar.gz 11377184 BLAKE2B 44b47459da0f203d0e4c0eed5836a59f44fb508db4e601b46e9ffdb53d89bb49e22ccdfe7951b17581130f186c47ae8efc0d9002685d5cf9a3547159356d2d9e SHA512 873df4c2fdc3594a0f3bce66d511cee14669643042ab1ca8d7f370ad3f50636c32c31f79818051d00bf844de30a5533ae30c81ed168baf2626a152771b6a6845
|
||||
DIST gpac-2.4.0.tar.gz 9914579 BLAKE2B 09d7eeb390b4d10a6d144bf4046a7b53283fa05be01c663e0cd82e8b7b8d9dece30ef42747c12a7477f5b13ca7c7e18905f36d3f20396bb50937a249729fd3a8 SHA512 164d8a1ff235413852cc2077b5153c36b094862b61fdda12065bf6810926caabd1a1f6f30b7aac9a5b640f51fe92a6ca911518a424cab7220b635920d95da99f
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
Index: gpac-1.0.0/src/utils/gzio.c
|
||||
===================================================================
|
||||
--- gpac-1.0.0.orig/src/utils/gzio.c
|
||||
+++ gpac-1.0.0/src/utils/gzio.c
|
||||
@@ -93,10 +93,10 @@ typedef struct gz_stream {
|
||||
//local gzFile gz_open OF((const char *path, const char *mode, int fd));
|
||||
//local int do_flush OF((gzFile file, int flush));
|
||||
//local int get_byte OF((gz_stream *s));
|
||||
-local void check_header OF((gz_stream *s));
|
||||
-local int destroy OF((gz_stream *s));
|
||||
+local void check_header _Z_OF((gz_stream *s));
|
||||
+local int destroy _Z_OF((gz_stream *s));
|
||||
//local void putLong OF((FILE *file, uLong x));
|
||||
-local uLong getLong OF((gz_stream *s));
|
||||
+local uLong getLong _Z_OF((gz_stream *s));
|
||||
|
||||
/* ===========================================================================
|
||||
Opens a gzip (.gz) file for reading or writing. The mode parameter
|
||||
Index: gpac-1.0.0/src/utils/zutil.h
|
||||
===================================================================
|
||||
--- gpac-1.0.0.orig/src/utils/zutil.h
|
||||
+++ gpac-1.0.0/src/utils/zutil.h
|
||||
@@ -262,8 +262,8 @@ extern void z_error OF((char *m));
|
||||
#endif
|
||||
|
||||
|
||||
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
|
||||
-void zcfree OF((voidpf opaque, voidpf ptr));
|
||||
+voidpf zcalloc _Z_OF((voidpf opaque, unsigned items, unsigned size));
|
||||
+void zcfree _Z_OF((voidpf opaque, voidpf ptr));
|
||||
|
||||
#define ZALLOC(strm, items, size) \
|
||||
(*((strm)->zalloc))((strm)->opaque, (items), (size))
|
||||
@@ -1,113 +0,0 @@
|
||||
* Makes static libs optional
|
||||
* Removes auto-SSE2 detection
|
||||
----
|
||||
Index: gpac-2.0.0/Makefile
|
||||
===================================================================
|
||||
--- gpac-2.0.0.orig/Makefile
|
||||
+++ gpac-2.0.0/Makefile
|
||||
@@ -298,8 +298,9 @@ ifeq ($(GPAC_ENST),yes)
|
||||
endif
|
||||
|
||||
$(INSTALL) -d "$(DESTDIR)$(prefix)/$(lib_dir)"
|
||||
+ifeq ($(STATIC_LIBS), yes)
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(lib_dir)" || true
|
||||
-
|
||||
+endif
|
||||
$(INSTALL) -d $(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 gpac.pc "$(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig"
|
||||
|
||||
Index: gpac-2.0.0/configure
|
||||
===================================================================
|
||||
--- gpac-2.0.0.orig/configure
|
||||
+++ gpac-2.0.0/configure
|
||||
@@ -106,6 +106,7 @@ has_dvb4linux="no"
|
||||
has_openjpeg="no"
|
||||
gprof_build="no"
|
||||
static_build="no"
|
||||
+static_libs="no"
|
||||
want_pic="no"
|
||||
want_gcov="no"
|
||||
has_joystick="no"
|
||||
@@ -271,6 +272,7 @@ GPAC configuration options:
|
||||
--static-modules use static modules in libgpac rather than dynamic library modules
|
||||
--static-build link statically against libgpac but still allow dependencies to shared libraries (enable --static-modules)
|
||||
--enable-static-bin old name for --static-build, deprecated
|
||||
+ --enable-static-lib GPAC static libraries build
|
||||
--static-bin enable static linking of MP4Box and gpac only (enable --static-build), disable MP4Client and all libraries not linkable statically.
|
||||
--static-mp4box old name for --static-bin, deprecated
|
||||
--enable-depth enables depth handling in the compositor
|
||||
@@ -741,14 +743,6 @@ if docc -lz -Wno-pointer-sign ; then
|
||||
fi
|
||||
|
||||
|
||||
-#GCC opt
|
||||
-if test "$no_gcc_opt" = "no"; then
|
||||
- CFLAGS="-O3 $CFLAGS"
|
||||
-else
|
||||
- CFLAGS="-O0 $CFLAGS"
|
||||
-fi
|
||||
-
|
||||
-
|
||||
#GCC PIC
|
||||
if test "$cross_prefix" != "" ; then
|
||||
want_pic="no"
|
||||
@@ -776,10 +770,6 @@ cat > $TMPC << EOF
|
||||
int main( void ) { return 0; }
|
||||
EOF
|
||||
|
||||
-if docc -msse2 $LDFLAGS ; then
|
||||
- CFLAGS="$CFLAGS -msse2"
|
||||
-fi
|
||||
-
|
||||
|
||||
#look for zlib
|
||||
cat > $TMPC << EOF
|
||||
@@ -1790,6 +1780,8 @@ for opt do
|
||||
echo "$opt deprecated, use --static-build instead"
|
||||
static_build="yes";
|
||||
;;
|
||||
+ --enable-static-libs) static_libs="yes";
|
||||
+ ;;
|
||||
--disable-ipv6) has_ipv6="no"
|
||||
;;
|
||||
--disable-platinum) has_platinum="no"
|
||||
@@ -2521,6 +2513,7 @@ else
|
||||
fi
|
||||
echo "debug version: $debuginfo"
|
||||
echo "GProf enabled: $gprof_build"
|
||||
+echo "Static libs enabled: $static_libs"
|
||||
echo "Memory tracking enabled: $use_memory_tracking"
|
||||
echo "Sanitizer enabled: $enable_sanitizer"
|
||||
echo "Fixed-Point Version: $use_fixed_point"
|
||||
@@ -3252,6 +3245,7 @@ echo "DEBUGBUILD=$debuginfo" >> config.m
|
||||
echo "GPROFBUILD=$gprof_build" >> config.mak
|
||||
echo "STATIC_BINARY=$static_bin" >> config.mak
|
||||
echo "STATICBUILD=$static_build" >> config.mak
|
||||
+echo "STATICLIBS=$static_libs" >> config.mak
|
||||
|
||||
echo "CONFIG_IPV6=$has_ipv6" >> config.mak
|
||||
if test "$has_ipv6" = "yes" ; then
|
||||
Index: gpac-2.0.0/src/Makefile
|
||||
===================================================================
|
||||
--- gpac-2.0.0.orig/src/Makefile
|
||||
+++ gpac-2.0.0/src/Makefile
|
||||
@@ -387,7 +387,6 @@ jsmods: $(LIBGPAC_JSMODS)
|
||||
# @echo "LIBS $(EXTRALIBS)"
|
||||
|
||||
ifeq ($(CONFIG_DARWIN),yes)
|
||||
-
|
||||
$(LIBTOOL) -s -o ../bin/gcc/libgpac_static.a $(OBJS)
|
||||
$(RANLIB) ../bin/gcc/libgpac_static.a
|
||||
ifneq ($(STATICBUILD),yes)
|
||||
@@ -395,9 +394,10 @@ ifneq ($(STATICBUILD),yes)
|
||||
endif
|
||||
|
||||
else
|
||||
-
|
||||
+ifeq ($(STATICLIBS), yes)
|
||||
$(AR) cr ../bin/gcc/libgpac_static.a $(OBJS)
|
||||
$(RANLIB) ../bin/gcc/libgpac_static.a
|
||||
+endif
|
||||
ifneq ($(STATICBUILD),yes)
|
||||
$(CC) $(SHFLAGS) $(LD_SONAME) -o $@ $(OBJS) $(EXTRALIBS) $(LDFLAGS)
|
||||
mv $@ $@.$(VERSION_SONAME)
|
||||
@@ -1,104 +0,0 @@
|
||||
* Makes static libs optional
|
||||
* Removes auto-SSE2 detection
|
||||
|
||||
Index: gpac-2.2.0/Makefile
|
||||
===================================================================
|
||||
--- gpac-2.2.0.orig/Makefile
|
||||
+++ gpac-2.2.0/Makefile
|
||||
@@ -276,7 +276,9 @@ install-lib:
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 config.h "$(DESTDIR)$(prefix)/include/gpac/configuration.h" || true
|
||||
|
||||
$(INSTALL) -d "$(DESTDIR)$(prefix)/$(lib_dir)"
|
||||
+ifeq ($(STATIC_LIBS), yes)
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(lib_dir)" || true
|
||||
+endif
|
||||
|
||||
$(INSTALL) -d $(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 gpac.pc "$(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig"
|
||||
Index: gpac-2.2.0/configure
|
||||
===================================================================
|
||||
--- gpac-2.2.0.orig/configure
|
||||
+++ gpac-2.2.0/configure
|
||||
@@ -74,6 +74,7 @@ enable_sanitizer="no"
|
||||
libgpac_cflags=""
|
||||
libgpac_extralibs=""
|
||||
static_build="no"
|
||||
+static_libs="no"
|
||||
static_bin="no"
|
||||
static_modules="no"
|
||||
lm_lib=""
|
||||
@@ -273,6 +274,7 @@ GPAC build options:
|
||||
--disable-opt disable GCC optimizations
|
||||
--static-build link statically against libgpac but still allow dependencies to shared libraries (enable --static-modules)
|
||||
--static-bin enable static linking of MP4Box and gpac only (will enable --static-build), disable all libraries not linkable statically.
|
||||
+ --enable-static-lib GPAC static libraries build
|
||||
--sdl-cfg=SDL_PATH specify path to sdl-config for local install [$sdl_path]
|
||||
--enable-sdl-static use static SDL linking [default=no]
|
||||
--X11-path=X11_PATH specify path for X11 includes and libraries [$X11_PATH]
|
||||
@@ -552,6 +554,8 @@ for opt do
|
||||
echo "$opt deprecated, use --static-build instead"
|
||||
static_build="yes";
|
||||
;;
|
||||
+ --enable-static-libs) static_libs="yes";
|
||||
+ ;;
|
||||
--enable-fixed-point) use_fixed_point="yes"
|
||||
;;
|
||||
--strip) INSTFLAGS="-s $INSTFLAGS"
|
||||
@@ -943,14 +947,6 @@ if docc -lz -Wno-pointer-sign ; then
|
||||
fi
|
||||
|
||||
|
||||
-#GCC opt
|
||||
-if test "$no_gcc_opt" = "no"; then
|
||||
- CFLAGS="-O3 $CFLAGS"
|
||||
-else
|
||||
- CFLAGS="-O0 $CFLAGS"
|
||||
-fi
|
||||
-
|
||||
-
|
||||
#GCC PIC
|
||||
if test "$cross_prefix" != "" ; then
|
||||
want_pic="no"
|
||||
@@ -978,11 +974,6 @@ cat > $TMPC << EOF
|
||||
int main( void ) { return 0; }
|
||||
EOF
|
||||
|
||||
-if docc -msse2 $LDFLAGS ; then
|
||||
- CFLAGS="$CFLAGS -msse2"
|
||||
-fi
|
||||
-
|
||||
-
|
||||
#check dlopen support
|
||||
has_dlopen="no"
|
||||
cat > $TMPC << EOF
|
||||
@@ -1888,6 +1879,7 @@ else
|
||||
fi
|
||||
echo "debug version: $debuginfo"
|
||||
echo "GProf enabled: $gprof_build"
|
||||
+echo "Static libs enabled: $static_libs"
|
||||
echo "Memory tracking enabled: $use_memory_tracking"
|
||||
echo "Sanitizer enabled: $enable_sanitizer"
|
||||
echo "Fixed-Point Version: $use_fixed_point"
|
||||
@@ -2604,6 +2596,7 @@ echo "DEBUGBUILD=$debuginfo" >> config.m
|
||||
echo "GPROFBUILD=$gprof_build" >> config.mak
|
||||
echo "STATIC_BINARY=$static_bin" >> config.mak
|
||||
echo "STATIC_BUILD=$static_build" >> config.mak
|
||||
+echo "STATIC_LIBS=$static_libs" >> config.mak
|
||||
|
||||
echo "CONFIG_IPV6=$has_ipv6" >> config.mak
|
||||
if test "$has_ipv6" = "yes" ; then
|
||||
Index: gpac-2.2.0/src/Makefile
|
||||
===================================================================
|
||||
--- gpac-2.2.0.orig/src/Makefile
|
||||
+++ gpac-2.2.0/src/Makefile
|
||||
@@ -369,8 +369,10 @@ endif
|
||||
|
||||
else
|
||||
|
||||
+ifeq ($(STATIC_LIBS), yes)
|
||||
$(AR) cr ../bin/gcc/libgpac_static.a $(OBJS)
|
||||
$(RANLIB) ../bin/gcc/libgpac_static.a
|
||||
+endif
|
||||
ifneq ($(STATIC_BUILD),yes)
|
||||
$(CC) $(SHFLAGS) $(LD_SONAME) -o $@ $(OBJS) $(ALL_LIBS) $(LDFLAGS)
|
||||
mv $@ $@.$(VERSION_SONAME)
|
||||
@@ -1,46 +0,0 @@
|
||||
https://bugs.gentoo.org/903550
|
||||
|
||||
From ba14e34dd7a3c4cef5a56962898e9f863dd4b4f3 Mon Sep 17 00:00:00 2001
|
||||
From: jeanlf <jeanlf@gpac.io>
|
||||
Date: Mon, 13 Mar 2023 09:43:52 +0100
|
||||
Subject: [PATCH] fixed compil with ffmpeg 6 - cf #2406
|
||||
|
||||
--- a/src/filters/ff_mx.c
|
||||
+++ b/src/filters/ff_mx.c
|
||||
@@ -503,7 +503,11 @@ static GF_Err ffmx_close_seg(GF_Filter *filter, GF_FFMuxCtx *ctx, Bool send_evt_
|
||||
evt.seg_size.is_init = 0;
|
||||
}
|
||||
evt.seg_size.media_range_start = ctx->offset_at_seg_start;
|
||||
+#if LIBAVFORMAT_VERSION_MAJOR >= 60
|
||||
evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->bytes_written-1) : 0;
|
||||
+#else
|
||||
+ evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->written-1) : 0;
|
||||
+#endif
|
||||
ctx->offset_at_seg_start = evt.seg_size.media_range_end;
|
||||
|
||||
gf_filter_pid_send_event(pid, &evt);
|
||||
@@ -1013,13 +1017,21 @@ static GF_Err ffmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_r
|
||||
ff_codec_id = ffmpeg_codecid_from_gpac(codec_id, &ff_codec_tag);
|
||||
}
|
||||
|
||||
+
|
||||
+ res = 1;
|
||||
+#if LIBAVFORMAT_VERSION_MAJOR < 60
|
||||
if (ctx->muxer->oformat) {
|
||||
res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, 1);
|
||||
- if (!res) {
|
||||
- GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
|
||||
- return GF_NOT_SUPPORTED;
|
||||
- }
|
||||
}
|
||||
+#else
|
||||
+ res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, FF_COMPLIANCE_NORMAL);
|
||||
+#endif
|
||||
+
|
||||
+ if (!res) {
|
||||
+ GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
|
||||
+ return GF_NOT_SUPPORTED;
|
||||
+ }
|
||||
+
|
||||
const AVCodec *c = avcodec_find_decoder(ff_codec_id);
|
||||
if (!c) return GF_NOT_SUPPORTED;
|
||||
@@ -1,24 +0,0 @@
|
||||
Index: gpac-2.2.0/src/filters/ff_mx.c
|
||||
===================================================================
|
||||
--- gpac-2.2.0.orig/src/filters/ff_mx.c
|
||||
+++ gpac-2.2.0/src/filters/ff_mx.c
|
||||
@@ -503,7 +503,7 @@ static GF_Err ffmx_close_seg(GF_Filter *
|
||||
evt.seg_size.is_init = 0;
|
||||
}
|
||||
evt.seg_size.media_range_start = ctx->offset_at_seg_start;
|
||||
- evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->written-1) : 0;
|
||||
+ evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->bytes_written-1) : 0;
|
||||
ctx->offset_at_seg_start = evt.seg_size.media_range_end;
|
||||
|
||||
gf_filter_pid_send_event(pid, &evt);
|
||||
@@ -1013,8 +1013,8 @@ static GF_Err ffmx_configure_pid(GF_Filt
|
||||
ff_codec_id = ffmpeg_codecid_from_gpac(codec_id, &ff_codec_tag);
|
||||
}
|
||||
|
||||
- if (ctx->muxer->oformat && ctx->muxer->oformat->query_codec) {
|
||||
- res = ctx->muxer->oformat->query_codec(ff_codec_id, 1);
|
||||
+ if (ctx->muxer->oformat) {
|
||||
+ res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, 1);
|
||||
if (!res) {
|
||||
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
|
||||
return GF_NOT_SUPPORTED;
|
||||
@@ -1,22 +0,0 @@
|
||||
From b0ad643014e567f47d1231771b473d25986c512e Mon Sep 17 00:00:00 2001
|
||||
From: Aurelien David <aurelien.david@telecom-paristech.fr>
|
||||
Date: Tue, 20 Dec 2022 15:48:42 +0100
|
||||
Subject: [PATCH] fix bigendian build (#2363)
|
||||
|
||||
---
|
||||
src/evg/stencil.c | 8 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/evg/stencil.c b/src/evg/stencil.c
|
||||
index 6528722c69..95e6ea7d9e 100644
|
||||
--- a/src/evg/stencil.c
|
||||
+++ b/src/evg/stencil.c
|
||||
@@ -1860,7 +1860,7 @@ u32 get_pix_yuv420p(EVG_Texture *_this, u32 x, u32 y, EVGRasterCtx *ctx)
|
||||
#define GET_LE_10BIT_AS_16(_ptr) ( (((u16)(_ptr)[1])<<8 | (u16)(_ptr)[0] ) << 6 )
|
||||
|
||||
//#define GET_LE_10BIT_LEFT_AS_8(_ptr) ( (((u16)(_ptr)[1])<<8 | (u16)(_ptr)[0] ) >> 8 )
|
||||
-#define GET_LE_10BIT_LEFT_AS_8(_ptr) (_ptr[1] )
|
||||
+#define GET_LE_10BIT_LEFT_AS_8(_ptr) ((_ptr)[1] )
|
||||
#define GET_LE_10BIT_LEFT_AS_16(_ptr) ( (((u16)(_ptr)[1])<<8 | (u16)(_ptr)[0] ) & 0xFFC0 )
|
||||
|
||||
#define GET_BE_10BIT_AS_8(_ptr) ( (*(u16 *)(_ptr)) >> 2 )
|
||||
@@ -1,156 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
SCM="git-r3"
|
||||
EGIT_REPO_URI="https://github.com/gpac/gpac"
|
||||
else
|
||||
SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 ppc ppc64 sparc x86"
|
||||
fi
|
||||
|
||||
inherit toolchain-funcs ${SCM} xdg
|
||||
|
||||
DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
|
||||
HOMEPAGE="https://gpac.wp.imt.fr/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
# subslot == libgpac major
|
||||
SLOT="0/11"
|
||||
IUSE="a52 aac alsa cpu_flags_x86_sse2 debug dvb ffmpeg ipv6 jack jpeg jpeg2k mad opengl oss png
|
||||
pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
RDEPEND="
|
||||
media-libs/libogg
|
||||
sys-libs/zlib
|
||||
a52? ( media-libs/a52dec )
|
||||
aac? ( media-libs/faad2 )
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
ffmpeg? ( media-video/ffmpeg:0= )
|
||||
jack? ( virtual/jack )
|
||||
jpeg? ( virtual/jpeg:0 )
|
||||
jpeg2k? ( media-libs/openjpeg:2 )
|
||||
mad? ( media-libs/libmad )
|
||||
opengl? (
|
||||
media-libs/freeglut
|
||||
virtual/glu
|
||||
virtual/opengl
|
||||
)
|
||||
png? ( media-libs/libpng:0= )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
theora? ( media-libs/libtheora )
|
||||
truetype? ( media-libs/freetype:2 )
|
||||
sdl? ( media-libs/libsdl )
|
||||
ssl? (
|
||||
dev-libs/openssl:0=
|
||||
)
|
||||
vorbis? ( media-libs/libvorbis )
|
||||
X? (
|
||||
x11-libs/libXt
|
||||
x11-libs/libX11
|
||||
x11-libs/libXv
|
||||
x11-libs/libXext
|
||||
)
|
||||
xml? ( dev-libs/libxml2:2= )
|
||||
xvid? ( media-libs/xvid )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dvb? ( sys-kernel/linux-headers )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.0.0-configure.patch"
|
||||
)
|
||||
|
||||
DOCS=(
|
||||
share/doc/CODING_STYLE
|
||||
share/doc/GPAC\ UPnP.doc
|
||||
share/doc/ISO\ 639-2\ codes.txt
|
||||
share/doc/SceneGenerators
|
||||
share/doc/ipmpx_syntax.bt
|
||||
Changelog
|
||||
README.md
|
||||
)
|
||||
|
||||
HTML_DOCS="share/doc/*.html"
|
||||
|
||||
my_use() {
|
||||
local flag="$1" pflag="${2:-$1}"
|
||||
if use ${flag}; then
|
||||
echo "--use-${pflag}=system"
|
||||
else
|
||||
echo "--use-${pflag}=no"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
|
||||
|
||||
# TODO: remove when old zlib is no longer in tree
|
||||
has_version "<sys-libs/zlib-1.3" && eapply "${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC CXX AR RANLIB
|
||||
|
||||
local myeconfargs=(
|
||||
--cc="$(tc-getCC)"
|
||||
--libdir="$(get_libdir)"
|
||||
--verbose
|
||||
--enable-pic
|
||||
--enable-svg
|
||||
--disable-amr
|
||||
--use-js=no
|
||||
--use-ogg=system
|
||||
$(use_enable alsa)
|
||||
$(use_enable debug)
|
||||
$(use_enable dvb dvb4linux)
|
||||
$(use_enable ipv6)
|
||||
$(use_enable jack jack yes)
|
||||
$(use_enable opengl 3d)
|
||||
$(use_enable oss oss-audio)
|
||||
$(use_enable pulseaudio pulseaudio yes)
|
||||
$(use_enable sdl)
|
||||
$(use_enable ssl)
|
||||
$(use_enable static-libs static-lib)
|
||||
$(use_enable X x11)
|
||||
$(use_enable X x11-shm)
|
||||
$(use_enable X x11-xv)
|
||||
$(my_use a52)
|
||||
$(my_use aac faad)
|
||||
$(my_use dvb dvbx)
|
||||
$(my_use ffmpeg)
|
||||
$(my_use jpeg)
|
||||
$(my_use jpeg2k openjpeg)
|
||||
$(my_use mad)
|
||||
$(my_use png)
|
||||
$(my_use theora)
|
||||
$(my_use truetype ft)
|
||||
$(my_use vorbis)
|
||||
$(my_use xvid)
|
||||
)
|
||||
|
||||
if use amd64 || use x86 ; then
|
||||
# Don't pass -mno-sse2 on non amd64/x86
|
||||
myeconfargs+=(
|
||||
--extra-cflags="${CFLAGS} $(usex cpu_flags_x86_sse2 '-msse2' '-mno-sse2')"
|
||||
)
|
||||
else
|
||||
myeconfargs+=(
|
||||
--extra-cflags="${CFLAGS}"
|
||||
)
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
emake STRIP="true" DESTDIR="${ED}" install
|
||||
emake STRIP="true" DESTDIR="${ED}" install-lib
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
SCM="git-r3"
|
||||
EGIT_REPO_URI="https://github.com/gpac/gpac"
|
||||
else
|
||||
SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 ppc ppc64 ~sparc x86"
|
||||
fi
|
||||
|
||||
inherit toolchain-funcs ${SCM} xdg
|
||||
|
||||
DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
|
||||
HOMEPAGE="https://gpac.wp.imt.fr/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
# subslot == libgpac major
|
||||
SLOT="0/11"
|
||||
IUSE="a52 aac alsa cpu_flags_x86_sse2 debug dvb ffmpeg jack jpeg jpeg2k mad opengl oss png
|
||||
pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
RDEPEND="
|
||||
media-libs/libogg
|
||||
sys-libs/zlib
|
||||
a52? ( media-libs/a52dec )
|
||||
aac? ( media-libs/faad2 )
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
ffmpeg? ( media-video/ffmpeg:0= )
|
||||
jack? ( virtual/jack )
|
||||
jpeg? ( media-libs/libjpeg-turbo:0= )
|
||||
jpeg2k? ( media-libs/openjpeg:2 )
|
||||
mad? ( media-libs/libmad )
|
||||
opengl? (
|
||||
media-libs/freeglut
|
||||
virtual/glu
|
||||
virtual/opengl
|
||||
)
|
||||
png? ( media-libs/libpng:0= )
|
||||
pulseaudio? ( media-libs/libpulse )
|
||||
theora? ( media-libs/libtheora )
|
||||
truetype? ( media-libs/freetype:2 )
|
||||
sdl? ( media-libs/libsdl )
|
||||
ssl? (
|
||||
dev-libs/openssl:0=
|
||||
)
|
||||
vorbis? ( media-libs/libvorbis )
|
||||
X? (
|
||||
x11-libs/libXt
|
||||
x11-libs/libX11
|
||||
x11-libs/libXv
|
||||
x11-libs/libXext
|
||||
)
|
||||
xml? ( dev-libs/libxml2:2= )
|
||||
xvid? ( media-libs/xvid )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dvb? ( sys-kernel/linux-headers )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.2.0-configure.patch"
|
||||
"${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch"
|
||||
"${FILESDIR}/${PN}-2.2.0-ffmpeg6-deux.patch"
|
||||
"${FILESDIR}/${P}-fix-bigendian.patch" # bug 911634
|
||||
)
|
||||
|
||||
DOCS=(
|
||||
share/doc/CODING_STYLE
|
||||
share/doc/GPAC\ UPnP.doc
|
||||
share/doc/ISO\ 639-2\ codes.txt
|
||||
share/doc/SceneGenerators
|
||||
share/doc/ipmpx_syntax.bt
|
||||
Changelog
|
||||
README.md
|
||||
)
|
||||
|
||||
my_use() {
|
||||
local flag="$1" pflag="${2:-$1}"
|
||||
if use ${flag}; then
|
||||
echo "--use-${pflag}=system"
|
||||
else
|
||||
echo "--use-${pflag}=no"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# TODO: remove when old zlib is no longer in tree
|
||||
has_version "<sys-libs/zlib-1.3" && eapply "${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC CXX AR RANLIB
|
||||
|
||||
local myeconfargs=(
|
||||
--cc="$(tc-getCC)"
|
||||
--libdir="$(get_libdir)"
|
||||
--verbose
|
||||
--enable-pic
|
||||
--enable-svg
|
||||
--use-ogg=system
|
||||
$(use_enable alsa)
|
||||
$(use_enable debug)
|
||||
$(use_enable dvb dvb4linux)
|
||||
$(use_enable jack jack yes)
|
||||
$(use_enable opengl 3d)
|
||||
$(use_enable oss oss-audio)
|
||||
$(use_enable pulseaudio pulseaudio yes)
|
||||
$(use_enable sdl)
|
||||
$(use_enable ssl)
|
||||
$(use_enable static-libs static-lib)
|
||||
$(use_enable X x11)
|
||||
$(use_enable X x11-shm)
|
||||
$(use_enable X x11-xv)
|
||||
$(my_use a52)
|
||||
$(my_use aac faad)
|
||||
$(use_enable dvb dvbx)
|
||||
$(my_use ffmpeg)
|
||||
$(my_use jpeg)
|
||||
$(my_use jpeg2k openjpeg)
|
||||
$(my_use mad)
|
||||
$(my_use png)
|
||||
$(my_use theora)
|
||||
$(my_use truetype freetype)
|
||||
$(my_use vorbis)
|
||||
$(my_use xvid)
|
||||
)
|
||||
|
||||
if use amd64 || use x86 ; then
|
||||
# Don't pass -mno-sse2 on non amd64/x86
|
||||
myeconfargs+=(
|
||||
--extra-cflags="${CFLAGS} $(usex cpu_flags_x86_sse2 '-msse2' '-mno-sse2')"
|
||||
)
|
||||
else
|
||||
myeconfargs+=(
|
||||
--extra-cflags="${CFLAGS}"
|
||||
)
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
emake STRIP="true" DESTDIR="${ED}" install
|
||||
emake STRIP="true" DESTDIR="${ED}" install-lib
|
||||
}
|
||||
Reference in New Issue
Block a user