media-gfx/opencsg: fix build with GCC 6
authormaurerpe <junk4me46806@yahoo.com>
Thu, 6 Jul 2017 12:55:30 +0000 (22:55 +1000)
committerMichael Palimaka <kensington@gentoo.org>
Thu, 6 Jul 2017 12:56:08 +0000 (22:56 +1000)
Gentoo-bug: 623840
Package-Manager: Portage-2.3.6, Repoman-2.3.2

media-gfx/opencsg/files/opencsg-1.4.2-includepath.patch [new file with mode: 0644]
media-gfx/opencsg/opencsg-1.4.2.ebuild

diff --git a/media-gfx/opencsg/files/opencsg-1.4.2-includepath.patch b/media-gfx/opencsg/files/opencsg-1.4.2-includepath.patch
new file mode 100644 (file)
index 0000000..9b66ae4
--- /dev/null
@@ -0,0 +1,25 @@
+* Fix build with GCC 6
+* Don't hardcode libdir
+
+Gentoo-bug: 623840
+
+--- a/src.pro
++++ b/src.pro
+@@ -7,14 +7,14 @@
+ }
+ 
+ CONFIG += opengl warn_on release
+-INCLUDEPATH += ../include ../ $$INSTALLDIR/include
++INCLUDEPATH += ../include ..
+ CONFIG -= qt
+-LIBS += -L$$INSTALLDIR/lib -lGLEW
++LIBS += -lGLEW
+ 
+ DESTDIR = ../lib
+ headers.files = ../include/opencsg.h
+ headers.path = $$INSTALLDIR/include
+-target.path = $$INSTALLDIR/lib
++target.path = $$INSTALLDIR/$$LIBDIR
+ INSTALLS += target headers
+ 
+ HEADERS               = ../include/opencsg.h \
index 1c905349bf89a90d95309485709f4a5387893b68..9f02e2a9c1d1a9dc6f8c9749fcc654736db4a8c7 100644 (file)
@@ -22,19 +22,19 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/${MY_P}/src"
 
+PATCHES=(
+       "${FILESDIR}/${P}-includepath.patch"
+)
+
 src_prepare() {
        default
 
        # removes duplicated headers
        rm -r ../glew || die "failed to remove bundled glew"
-
-       sed -i -e "s:^target.path.*:target.path = \$\$INSTALLDIR/$(get_libdir):" \
-               src.pro \
-               || die 'failed to fix target.path in src.pro'
 }
 
 src_configure() {
-       eqmake5 src.pro INSTALLDIR="/usr"
+       eqmake5 src.pro INSTALLDIR="/usr" LIBDIR="$(get_libdir)"
 }
 
 src_install() {