Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/files/, media-video/gpac/
Date: Thu, 20 Aug 2020 12:31:00
Message-Id: 1597926644.4b34462e1b49b4b30ed014713f3011d5a246a91e.sam@gentoo
1 commit: 4b34462e1b49b4b30ed014713f3011d5a246a91e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 20 12:12:54 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 20 12:30:44 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b34462e
7
8 media-video/gpac: security bump to 0.8.1
9
10 We're bumping to 0.8.1 before 1.0.0 because there was
11 a substantial rewrite. The aim is to stabilise this release
12 first, give 1.0.0 (later commit) a few days in ~arch, then do that.
13
14 Bug: https://bugs.gentoo.org/711262
15 Closes: https://bugs.gentoo.org/701538
16 Closes: https://bugs.gentoo.org/654418
17 Closes: https://bugs.gentoo.org/658062
18 Package-Manager: Portage-3.0.3, Repoman-3.0.0
19 Signed-off-by: Sam James <sam <AT> gentoo.org>
20
21 media-video/gpac/Manifest | 1 +
22 media-video/gpac/files/gpac-0.8.1-configure.patch | 100 +++++++++++++++
23 media-video/gpac/gpac-0.8.1.ebuild | 149 ++++++++++++++++++++++
24 3 files changed, 250 insertions(+)
25
26 diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
27 index ce5adb32da3..8340f361bd6 100644
28 --- a/media-video/gpac/Manifest
29 +++ b/media-video/gpac/Manifest
30 @@ -1 +1,2 @@
31 DIST gpac-0.7.1.tar.gz 10654838 BLAKE2B 795fd11d6bf02bb0d27d97f2c98017e9875aae26ea7d99c5587c7ec5ccc8273283fbce6444389ff4371a34d0e7d03102982ff8a8ec014c7f0c2ddd36c684cba9 SHA512 0377d9471db9e5ccf75f85dfd0c9f4e37a211108b5e128a5411ac015bd9c906257320d517717f0fa03d434e1fce24bd8a9c3a73200fac5c21b80895b716ab403
32 +DIST gpac-0.8.1.tar.gz 11432459 BLAKE2B 5c08d6c903b4865c19818c5cee07c0a0ebd1775f168740eadc3722d6b19ed685d4f6089cee4bbd68a52bf7cce4cf564c083deb629c47ba35eac66c754f3136cf SHA512 f2039fe91a502ea8c54330abf893d52d10fb57d4459f5f3aae28122f565ab8964011b67e6af0d79c170fa55b125ac1385fd1d280021da7d1d37b27c74ee5b6c1
33
34 diff --git a/media-video/gpac/files/gpac-0.8.1-configure.patch b/media-video/gpac/files/gpac-0.8.1-configure.patch
35 new file mode 100644
36 index 00000000000..4a6c97b6cf3
37 --- /dev/null
38 +++ b/media-video/gpac/files/gpac-0.8.1-configure.patch
39 @@ -0,0 +1,100 @@
40 +diff --git a/Makefile b/Makefile
41 +index 61241cd..7481027 100644
42 +--- a/Makefile
43 ++++ b/Makefile
44 +@@ -270,7 +270,9 @@ ifeq ($(GPAC_ENST), yes)
45 + $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/include/gpac/enst/*.h "$(DESTDIR)$(prefix)/include/gpac/enst"
46 + endif
47 + mkdir -p "$(DESTDIR)$(prefix)/$(libdir)"
48 ++ifeq ($(STATIC_LIBS),yes)
49 + $(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(libdir)"
50 ++endif
51 + if [ -d $(DESTDIR)$(prefix)/$(libdir)/pkgconfig ] ; then \
52 + $(INSTALL) $(INSTFLAGS) -m 644 gpac.pc "$(DESTDIR)$(prefix)/$(libdir)/pkgconfig" ; \
53 + fi
54 +diff --git a/configure b/configure
55 +index 6ef2258..240b6b0 100755
56 +--- a/configure
57 ++++ b/configure
58 +@@ -108,6 +108,7 @@ has_xmlrpc="no"
59 + has_openjpeg="no"
60 + gprof_build="no"
61 + static_build="no"
62 ++static_libs="no"
63 + want_pic="no"
64 + want_gcov="no"
65 + has_joystick="no"
66 +@@ -266,6 +267,7 @@ GPAC configuration options:
67 + --enable-amr-wb enable AMR WB library
68 + --enable-amr enable both AMR NB and WB libraries
69 + --enable-static-bin link statically against libgpac
70 ++ --enable-static-lib GPAC static libraries build
71 + --static-mp4box configure for static linking of MP4Box only.
72 + --enable-depth enables depth handling in the compositor
73 +
74 +@@ -715,15 +717,6 @@ if docc -lz -Wno-pointer-sign ; then
75 + CFLAGS="$CFLAGS -Wno-pointer-sign"
76 + fi
77 +
78 +-
79 +-#GCC opt
80 +-if test "$no_gcc_opt" = "no"; then
81 +- CFLAGS="-O3 $CFLAGS"
82 +-else
83 +- CFLAGS="-O0 $CFLAGS"
84 +-fi
85 +-
86 +-
87 + #GCC PIC
88 + if test "$cross_prefix" != "" ; then
89 + want_pic="no"
90 +@@ -1931,6 +1924,8 @@ for opt do
91 + ;;
92 + --enable-static-bin) static_build="yes";
93 + ;;
94 ++ --enable-static-lib) static_libs="yes";
95 ++ ;;
96 + --disable-ipv6) has_ipv6="no"
97 + ;;
98 + --disable-wx) has_wx="no"
99 +@@ -2622,6 +2617,7 @@ echo "** GPAC $version rev$revision Core Configuration **"
100 + echo "debug version: $debuginfo"
101 + echo "GProf enabled: $gprof_build"
102 + echo "Static build enabled: $static_build"
103 ++echo "Static libs enabled: $static_libs"
104 + echo "Memory tracking enabled: $use_memory_tracking"
105 + echo "Sanitizer enabled: $enable_sanitizer"
106 + echo "Fixed-Point Version: $use_fixed_point"
107 +@@ -3291,6 +3287,7 @@ echo "DEBUGBUILD=$debuginfo" >> config.mak
108 + echo "GPROFBUILD=$gprof_build" >> config.mak
109 + echo "MP4BOX_STATIC=$static_mp4box" >> config.mak
110 + echo "STATICBUILD=$static_build" >> config.mak
111 ++echo "STATICLIBS=$static_libs" >> config.mak
112 +
113 + echo "CONFIG_IPV6=$has_ipv6" >> config.mak
114 + if test "$has_ipv6" = "yes" ; then
115 +diff --git a/src/Makefile b/src/Makefile
116 +index 935ffff..b3464b7 100644
117 +--- a/src/Makefile
118 ++++ b/src/Makefile
119 +@@ -269,16 +269,19 @@ compositor: $(LIBGPAC_COMPOSITOR)
120 +
121 + ifeq ($(CONFIG_DARWIN),yes)
122 +
123 ++ifeq ($(STATICLIBS),yes)
124 + $(LIBTOOL) -s -o ../bin/gcc/libgpac_static.a $(OBJS)
125 + $(RANLIB) ../bin/gcc/libgpac_static.a
126 ++endif
127 + ifneq ($(STATICBUILD),yes)
128 + $(CC) $(SHFLAGS) $(LD_SONAME) -o $@ $(OBJS) $(EXTRALIBS) $(LDFLAGS)
129 + endif
130 +
131 + else
132 +-
133 ++ifeq ($(STATICLIBS), yes)
134 + $(AR) cr ../bin/gcc/libgpac_static.a $(OBJS)
135 + $(RANLIB) ../bin/gcc/libgpac_static.a
136 ++endif
137 + ifneq ($(STATICBUILD),yes)
138 + $(CC) $(SHFLAGS) $(LD_SONAME) -o $@ $(OBJS) $(EXTRALIBS) $(LDFLAGS)
139 + mv $@ $@.$(VERSION_SONAME)
140
141 diff --git a/media-video/gpac/gpac-0.8.1.ebuild b/media-video/gpac/gpac-0.8.1.ebuild
142 new file mode 100644
143 index 00000000000..82441609b59
144 --- /dev/null
145 +++ b/media-video/gpac/gpac-0.8.1.ebuild
146 @@ -0,0 +1,149 @@
147 +# Copyright 1999-2020 Gentoo Authors
148 +# Distributed under the terms of the GNU General Public License v2
149 +
150 +EAPI=7
151 +
152 +if [[ ${PV} == *9999 ]] ; then
153 + SCM="git-r3"
154 + EGIT_REPO_URI="https://github.com/gpac/gpac"
155 +else
156 + SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
157 + KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
158 +fi
159 +
160 +inherit flag-o-matic toolchain-funcs ${SCM}
161 +
162 +DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
163 +HOMEPAGE="https://gpac.wp.imt.fr/ https://github.com/gpac/gpac"
164 +
165 +LICENSE="GPL-2"
166 +# subslot == libgpac major
167 +SLOT="0/8"
168 +IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k libressl mad opengl oss png
169 + pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X"
170 +
171 +BDEPEND="virtual/pkgconfig"
172 +RDEPEND="
173 + media-libs/libogg
174 + a52? ( media-libs/a52dec )
175 + aac? ( media-libs/faad2 )
176 + alsa? ( media-libs/alsa-lib )
177 + ffmpeg? ( media-video/ffmpeg:0= )
178 + jack? ( virtual/jack )
179 + jpeg? ( virtual/jpeg:0 )
180 + jpeg2k? ( media-libs/openjpeg:0 )
181 + mad? ( media-libs/libmad )
182 + opengl? (
183 + media-libs/freeglut
184 + virtual/glu
185 + virtual/opengl
186 + )
187 + png? ( media-libs/libpng:0= )
188 + pulseaudio? ( media-sound/pulseaudio )
189 + theora? ( media-libs/libtheora )
190 + truetype? ( media-libs/freetype:2 )
191 + sdl? ( media-libs/libsdl )
192 + ssl? (
193 + !libressl? ( dev-libs/openssl:0= )
194 + libressl? ( dev-libs/libressl:0= )
195 + )
196 + vorbis? ( media-libs/libvorbis )
197 + X? (
198 + x11-libs/libXt
199 + x11-libs/libX11
200 + x11-libs/libXv
201 + x11-libs/libXext
202 + )
203 + xml? ( dev-libs/libxml2:2 )
204 + xvid? ( media-libs/xvid )
205 +"
206 +# disabled upstream, see applications/Makefile
207 +# wxwidgets? ( =x11-libs/wxGTK-2.8* )
208 +DEPEND="${RDEPEND}
209 + dvb? ( sys-kernel/linux-headers )
210 +"
211 +
212 +# DOCS="AUTHORS BUGS Changelog README.md TODO doc/CODING_STYLE doc/*.doc doc/*.bt doc/SceneGenerators doc/ipmpx_syntax.bt doc/*.txt"
213 +PATCHES=(
214 + "${FILESDIR}/${PN}-0.8.1-configure.patch"
215 +)
216 +
217 +DOCS=(
218 + doc/CODING_STYLE
219 + doc/GPAC\ UPnP.doc
220 + doc/ISO\ 639-2\ codes.txt
221 + doc/SceneGenerators
222 + doc/ipmpx_syntax.bt
223 + Changelog
224 + AUTHORS
225 + BUGS
226 + README.md
227 + TODO
228 +)
229 +
230 +HTML_DOCS="doc/*.html"
231 +
232 +my_use() {
233 + local flag="$1" pflag="${2:-$1}"
234 + if use ${flag}; then
235 + echo "--use-${pflag}=system"
236 + else
237 + echo "--use-${pflag}=no"
238 + fi
239 +}
240 +
241 +src_prepare() {
242 + default
243 + sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
244 +}
245 +
246 +src_configure() {
247 + tc-export CC CXX AR RANLIB
248 +
249 + local myeconfargs=(
250 + --extra-cflags="${CFLAGS}"
251 + --cc="$(tc-getCC)"
252 + --cxx="$(tc-getCXX)"
253 + --libdir="/$(get_libdir)"
254 + --verbose
255 + --enable-pic
256 + --enable-svg
257 + --disable-amr
258 + --disable-wx
259 + --use-js=no
260 + --use-ogg=system
261 + $(use_enable alsa)
262 + $(use_enable debug)
263 + $(use_enable dvb dvb4linux)
264 + $(use_enable ipv6)
265 + $(use_enable jack jack yes)
266 + $(use_enable opengl 3d)
267 + $(use_enable oss oss-audio)
268 + $(use_enable pulseaudio pulseaudio yes)
269 + $(use_enable sdl)
270 + $(use_enable ssl)
271 + $(use_enable static-libs static-lib)
272 + $(use_enable X x11)
273 + $(use_enable X x11-shm)
274 + $(use_enable X x11-xv)
275 + $(my_use a52)
276 + $(my_use aac faad)
277 + $(my_use dvb dvbx)
278 + $(my_use ffmpeg)
279 + $(my_use jpeg)
280 + $(my_use jpeg2k openjpeg)
281 + $(my_use mad)
282 + $(my_use png)
283 + $(my_use theora)
284 + $(my_use truetype ft)
285 + $(my_use vorbis)
286 + $(my_use xvid)
287 + )
288 + econf "${myeconfargs[@]}"
289 +}
290 +
291 +src_install() {
292 + einstalldocs
293 + emake STRIP="true" DESTDIR="${D}" install
294 + emake STRIP="true" DESTDIR="${D}" install-lib
295 +}