1 |
commit: b50d5fdee658b196969eac6a9f5a4a4394e18943 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 12 21:36:01 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 12 21:42:43 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b50d5fde |
7 |
|
8 |
media-video/gpac: bump to 1.0.1 |
9 |
|
10 |
Changes: |
11 |
* Introduce CPU_FLAGS_X86_SSE2 |
12 |
* Refresh configure patch (avoids static libs) |
13 |
|
14 |
Closes: https://bugs.gentoo.org/731088 |
15 |
Package-Manager: Portage-3.0.6, Repoman-3.0.1 |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
media-video/gpac/Manifest | 1 + |
19 |
media-video/gpac/files/gpac-1.0.1-configure.patch | 117 ++++++++++++++++++ |
20 |
media-video/gpac/gpac-1.0.1.ebuild | 143 ++++++++++++++++++++++ |
21 |
3 files changed, 261 insertions(+) |
22 |
|
23 |
diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest |
24 |
index 261a41794a2..85687ad16fe 100644 |
25 |
--- a/media-video/gpac/Manifest |
26 |
+++ b/media-video/gpac/Manifest |
27 |
@@ -1,2 +1,3 @@ |
28 |
DIST gpac-0.8.1.tar.gz 11432459 BLAKE2B 5c08d6c903b4865c19818c5cee07c0a0ebd1775f168740eadc3722d6b19ed685d4f6089cee4bbd68a52bf7cce4cf564c083deb629c47ba35eac66c754f3136cf SHA512 f2039fe91a502ea8c54330abf893d52d10fb57d4459f5f3aae28122f565ab8964011b67e6af0d79c170fa55b125ac1385fd1d280021da7d1d37b27c74ee5b6c1 |
29 |
DIST gpac-1.0.0.tar.gz 10289999 BLAKE2B 9bd1134a53c59fae59bb18a2e4f8c5db0639fbbc7e2270a16d8a621c3cb37529c7bdf536b0ac71227579b3b6c09305960775f6676a1f4d0f15b3cf3ae99b91ef SHA512 930b4b02f1d68554a99b9fde3faf6a429d78a86522b52da7601a40907d41e159724c935952becc008ae626001cb23543e446125dfb58764513d5808197ec4e29 |
30 |
+DIST gpac-1.0.1.tar.gz 10352926 BLAKE2B 80bdbd568551f9028a44acfa0cfeba585b69f24392393c1fb1bfe16f4b614eb79cda5f641f0b61854734f0dd85eb17520c2012040d3c47d68f66e5beb66fb2db SHA512 533371d59e72250bef315be03ec3437cd66782d0fb6bdb6486a6f4d57d06a6a7deff1b31fe8bfd360be1d1c848b33b5d25e7268f56f27f8e92cbcb7da1aba82b |
31 |
|
32 |
diff --git a/media-video/gpac/files/gpac-1.0.1-configure.patch b/media-video/gpac/files/gpac-1.0.1-configure.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..e471157af6b |
35 |
--- /dev/null |
36 |
+++ b/media-video/gpac/files/gpac-1.0.1-configure.patch |
37 |
@@ -0,0 +1,117 @@ |
38 |
+* Makes static libs optional |
39 |
+* Removes auto-SSE2 detection |
40 |
+---- |
41 |
+diff --git a/Makefile b/Makefile |
42 |
+index 303a413..1ef750e 100644 |
43 |
+--- a/Makefile |
44 |
++++ b/Makefile |
45 |
+@@ -284,8 +284,9 @@ ifeq ($(GPAC_ENST),yes) |
46 |
+ endif |
47 |
+ |
48 |
+ $(INSTALL) -d "$(DESTDIR)$(prefix)/$(lib_dir)" |
49 |
++ifeq ($(STATIC_LIBS), yes) |
50 |
+ $(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(lib_dir)" || true |
51 |
+- |
52 |
++endif |
53 |
+ $(INSTALL) -d $(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig |
54 |
+ $(INSTALL) $(INSTFLAGS) -m 644 gpac.pc "$(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig" |
55 |
+ |
56 |
+diff --git a/configure b/configure |
57 |
+index de8ea99..4f5a6a8 100755 |
58 |
+--- a/configure |
59 |
++++ b/configure |
60 |
+@@ -105,6 +105,7 @@ has_dvb4linux="no" |
61 |
+ has_openjpeg="no" |
62 |
+ gprof_build="no" |
63 |
+ static_build="no" |
64 |
++static_libs="no" |
65 |
+ want_pic="no" |
66 |
+ want_gcov="no" |
67 |
+ has_joystick="no" |
68 |
+@@ -264,6 +265,7 @@ GPAC configuration options: |
69 |
+ --enable-amr-wb enable AMR WB library |
70 |
+ --enable-amr enable both AMR NB and WB libraries |
71 |
+ --enable-static-bin link statically against libgpac |
72 |
++ --enable-static-lib GPAC static libraries build |
73 |
+ --static-mp4box configure for static linking of MP4Box only. |
74 |
+ --enable-depth enables depth handling in the compositor |
75 |
+ |
76 |
+@@ -706,14 +708,6 @@ if docc -lz -Wno-pointer-sign ; then |
77 |
+ fi |
78 |
+ |
79 |
+ |
80 |
+-#GCC opt |
81 |
+-if test "$no_gcc_opt" = "no"; then |
82 |
+- CFLAGS="-O3 $CFLAGS" |
83 |
+-else |
84 |
+- CFLAGS="-O0 $CFLAGS" |
85 |
+-fi |
86 |
+- |
87 |
+- |
88 |
+ #GCC PIC |
89 |
+ if test "$cross_prefix" != "" ; then |
90 |
+ want_pic="no" |
91 |
+@@ -1710,6 +1704,8 @@ for opt do |
92 |
+ ;; |
93 |
+ --enable-static-bin) static_build="yes"; |
94 |
+ ;; |
95 |
++ --enable-static-libs) static_libs="yes"; |
96 |
++ ;; |
97 |
+ --disable-ipv6) has_ipv6="no" |
98 |
+ ;; |
99 |
+ --disable-platinum) has_platinum="no" |
100 |
+@@ -2357,6 +2353,7 @@ echo "** GPAC $version rev$revision Core Configuration **" |
101 |
+ echo "debug version: $debuginfo" |
102 |
+ echo "GProf enabled: $gprof_build" |
103 |
+ echo "Static build enabled: $static_build" |
104 |
++echo "Static libs enabled: $static_libs" |
105 |
+ echo "Memory tracking enabled: $use_memory_tracking" |
106 |
+ echo "Sanitizer enabled: $enable_sanitizer" |
107 |
+ echo "Fixed-Point Version: $use_fixed_point" |
108 |
+@@ -3049,6 +3046,7 @@ echo "DEBUGBUILD=$debuginfo" >> config.mak |
109 |
+ echo "GPROFBUILD=$gprof_build" >> config.mak |
110 |
+ echo "MP4BOX_STATIC=$static_mp4box" >> config.mak |
111 |
+ echo "STATICBUILD=$static_build" >> config.mak |
112 |
++echo "STATICLIBS=$static_libs" >> config.mak |
113 |
+ |
114 |
+ echo "CONFIG_IPV6=$has_ipv6" >> config.mak |
115 |
+ if test "$has_ipv6" = "yes" ; then |
116 |
+diff --git a/src/Makefile b/src/Makefile |
117 |
+index c483c8d..b24d5bb 100644 |
118 |
+--- a/src/Makefile |
119 |
++++ b/src/Makefile |
120 |
+@@ -347,7 +347,6 @@ filters_svc: $(LIBGPAC_FILTERS_SVC) |
121 |
+ @echo "LIBS $(EXTRALIBS)" |
122 |
+ |
123 |
+ ifeq ($(CONFIG_DARWIN),yes) |
124 |
+- |
125 |
+ $(LIBTOOL) -s -o ../bin/gcc/libgpac_static.a $(OBJS) |
126 |
+ $(RANLIB) ../bin/gcc/libgpac_static.a |
127 |
+ ifneq ($(STATICBUILD),yes) |
128 |
+@@ -355,9 +354,10 @@ ifneq ($(STATICBUILD),yes) |
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 |
+diff --git a/configure b/configure |
141 |
+index 4f5a6a8..baba248 100755 |
142 |
+--- a/configure |
143 |
++++ b/configure |
144 |
+@@ -735,10 +735,6 @@ cat > $TMPC << EOF |
145 |
+ int main( void ) { return 0; } |
146 |
+ EOF |
147 |
+ |
148 |
+-if docc -msse2 $LDFLAGS ; then |
149 |
+- CFLAGS="$CFLAGS -msse2" |
150 |
+-fi |
151 |
+- |
152 |
+ |
153 |
+ #look for zlib |
154 |
+ cat > $TMPC << EOF |
155 |
|
156 |
diff --git a/media-video/gpac/gpac-1.0.1.ebuild b/media-video/gpac/gpac-1.0.1.ebuild |
157 |
new file mode 100644 |
158 |
index 00000000000..a32cc796a65 |
159 |
--- /dev/null |
160 |
+++ b/media-video/gpac/gpac-1.0.1.ebuild |
161 |
@@ -0,0 +1,143 @@ |
162 |
+# Copyright 1999-2020 Gentoo Authors |
163 |
+# Distributed under the terms of the GNU General Public License v2 |
164 |
+ |
165 |
+EAPI=7 |
166 |
+ |
167 |
+if [[ ${PV} == *9999 ]] ; then |
168 |
+ SCM="git-r3" |
169 |
+ EGIT_REPO_URI="https://github.com/gpac/gpac" |
170 |
+else |
171 |
+ SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
172 |
+ KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" |
173 |
+fi |
174 |
+ |
175 |
+inherit flag-o-matic toolchain-funcs ${SCM} xdg |
176 |
+ |
177 |
+DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C" |
178 |
+HOMEPAGE="https://gpac.wp.imt.fr/" |
179 |
+ |
180 |
+LICENSE="GPL-2" |
181 |
+# subslot == libgpac major |
182 |
+SLOT="0/10" |
183 |
+IUSE="a52 aac alsa cpu_flags_x86_sse2 debug dvb ffmpeg ipv6 jack jpeg jpeg2k libressl mad opengl oss png |
184 |
+ pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X" |
185 |
+ |
186 |
+BDEPEND="virtual/pkgconfig" |
187 |
+RDEPEND=" |
188 |
+ media-libs/libogg |
189 |
+ a52? ( media-libs/a52dec ) |
190 |
+ aac? ( media-libs/faad2 ) |
191 |
+ alsa? ( media-libs/alsa-lib ) |
192 |
+ ffmpeg? ( media-video/ffmpeg:0= ) |
193 |
+ jack? ( virtual/jack ) |
194 |
+ jpeg? ( virtual/jpeg:0 ) |
195 |
+ jpeg2k? ( media-libs/openjpeg:2 ) |
196 |
+ mad? ( media-libs/libmad ) |
197 |
+ opengl? ( |
198 |
+ media-libs/freeglut |
199 |
+ virtual/glu |
200 |
+ virtual/opengl |
201 |
+ ) |
202 |
+ png? ( media-libs/libpng:0= ) |
203 |
+ pulseaudio? ( media-sound/pulseaudio ) |
204 |
+ theora? ( media-libs/libtheora ) |
205 |
+ truetype? ( media-libs/freetype:2 ) |
206 |
+ sdl? ( media-libs/libsdl ) |
207 |
+ ssl? ( |
208 |
+ !libressl? ( dev-libs/openssl:0= ) |
209 |
+ libressl? ( dev-libs/libressl:0= ) |
210 |
+ ) |
211 |
+ vorbis? ( media-libs/libvorbis ) |
212 |
+ X? ( |
213 |
+ x11-libs/libXt |
214 |
+ x11-libs/libX11 |
215 |
+ x11-libs/libXv |
216 |
+ x11-libs/libXext |
217 |
+ ) |
218 |
+ xml? ( dev-libs/libxml2:2= ) |
219 |
+ xvid? ( media-libs/xvid ) |
220 |
+" |
221 |
+DEPEND=" |
222 |
+ ${RDEPEND} |
223 |
+ dvb? ( sys-kernel/linux-headers ) |
224 |
+" |
225 |
+ |
226 |
+PATCHES=( |
227 |
+ "${FILESDIR}/${PN}-1.0.1-configure.patch" |
228 |
+ "${FILESDIR}/${PN}-1.0.0-zlib-compile.patch" |
229 |
+) |
230 |
+ |
231 |
+DOCS=( |
232 |
+ share/doc/CODING_STYLE |
233 |
+ share/doc/GPAC\ UPnP.doc |
234 |
+ share/doc/ISO\ 639-2\ codes.txt |
235 |
+ share/doc/SceneGenerators |
236 |
+ share/doc/ipmpx_syntax.bt |
237 |
+ Changelog |
238 |
+ README.md |
239 |
+) |
240 |
+ |
241 |
+HTML_DOCS="share/doc/*.html" |
242 |
+ |
243 |
+my_use() { |
244 |
+ local flag="$1" pflag="${2:-$1}" |
245 |
+ if use ${flag}; then |
246 |
+ echo "--use-${pflag}=system" |
247 |
+ else |
248 |
+ echo "--use-${pflag}=no" |
249 |
+ fi |
250 |
+} |
251 |
+ |
252 |
+src_prepare() { |
253 |
+ default |
254 |
+ sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die |
255 |
+} |
256 |
+ |
257 |
+src_configure() { |
258 |
+ tc-export CC CXX AR RANLIB |
259 |
+ |
260 |
+ local myeconfargs=( |
261 |
+ --extra-cflags="${CFLAGS} $(usex cpu_flags_x86_sse2 '-msse2' '')" |
262 |
+ --cc="$(tc-getCC)" |
263 |
+ --libdir="$(get_libdir)" |
264 |
+ --verbose |
265 |
+ --enable-pic |
266 |
+ --enable-svg |
267 |
+ --disable-amr |
268 |
+ --use-js=no |
269 |
+ --use-ogg=system |
270 |
+ $(use_enable alsa) |
271 |
+ $(use_enable debug) |
272 |
+ $(use_enable dvb dvb4linux) |
273 |
+ $(use_enable ipv6) |
274 |
+ $(use_enable jack jack yes) |
275 |
+ $(use_enable opengl 3d) |
276 |
+ $(use_enable oss oss-audio) |
277 |
+ $(use_enable pulseaudio pulseaudio yes) |
278 |
+ $(use_enable sdl) |
279 |
+ $(use_enable ssl) |
280 |
+ $(use_enable static-libs static-lib) |
281 |
+ $(use_enable X x11) |
282 |
+ $(use_enable X x11-shm) |
283 |
+ $(use_enable X x11-xv) |
284 |
+ $(my_use a52) |
285 |
+ $(my_use aac faad) |
286 |
+ $(my_use dvb dvbx) |
287 |
+ $(my_use ffmpeg) |
288 |
+ $(my_use jpeg) |
289 |
+ $(my_use jpeg2k openjpeg) |
290 |
+ $(my_use mad) |
291 |
+ $(my_use png) |
292 |
+ $(my_use theora) |
293 |
+ $(my_use truetype ft) |
294 |
+ $(my_use vorbis) |
295 |
+ $(my_use xvid) |
296 |
+ ) |
297 |
+ econf "${myeconfargs[@]}" |
298 |
+} |
299 |
+ |
300 |
+src_install() { |
301 |
+ einstalldocs |
302 |
+ emake STRIP="true" DESTDIR="${ED}" install |
303 |
+ emake STRIP="true" DESTDIR="${ED}" install-lib |
304 |
+} |