Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 449238 - media-video/gpac-0.5.0 should use --extra-cflags in configure instead of overriding OPTFLAGS
Summary: media-video/gpac-0.5.0 should use --extra-cflags in configure instead of over...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-12-29 20:26 UTC by Stef Simoens
Modified: 2013-08-14 20:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stef Simoens 2012-12-29 20:26:27 UTC
OPTFLAGS is used by the configure script to define -DGPAC_HAVE_CONFIG_H
overriding it at the make-command fails the build

Reproducible: Always

Steps to Reproduce:
1. Use normal CFLAGS in /etc/portage/make.conf
Actual Results:  
Build fails

Expected Results:  
Build succeeds

the provided configure script defines -DGPAC_HAVE_CONFIG via OPTFLAGS
redefining OPTFLAGS during the build, fails the build (at least if you don't want GL, as I have)
The configure script does provide --extra-cflags

Possible fix (but OPTFLAGS probably needs more quoting)

--- /usr/portage/media-video/gpac/gpac-0.5.0.ebuild	2012-11-01 19:31:21.000000000 +0100
+++ /usr/local/portage/media-video/gpac/gpac-0.5.0-r50.ebuild	2012-12-29 21:13:49.827765517 +0100
@@ -126,6 +126,7 @@
 		$(my_use a52) \
 		--cc="$(tc-getCC)" \
 		--libdir="/$(get_libdir)" \
+		--extra-cflags="${CFLAGS}"
 		${myconf}
 
 	#temporary build fix
@@ -135,12 +136,12 @@
 src_compile() {
 #	#emake OPTFLAGS="${CFLAGS} -fPIC"
 #	LD="$(tc-getCC)" \
-	emake OPTFLAGS="${CFLAGS}"
+	emake
 }
 
 src_install() {
-	emake STRIP="true" OPTFLAGS="${CFLAGS}" DESTDIR="${D}" install
-	emake STRIP="true" OPTFLAGS="${CFLAGS}" DESTDIR="${D}" install-lib
+	emake STRIP="true" DESTDIR="${D}" install
+	emake STRIP="true" DESTDIR="${D}" install-lib
 	dodoc AUTHORS BUGS Changelog README TODO INSTALLME
 	dodoc doc/*.txt
 	dohtml doc/*.html
Comment 1 Alexis Ballier gentoo-dev 2013-08-14 20:25:08 UTC
   14 Aug 2013; Alexis Ballier <aballier@gentoo.org> gpac-0.5.0.ebuild:
+  Pass extra-cflags to configure instead, bug #449238 by Stef Simoens.
+  Simplifies the ebuild.
+