commit:     dfbc1b4b7a8ad01f03defd04329140d5bb1e1a9e
Author:     maurerpe <junk4me46806 <AT> yahoo <DOT> com>
AuthorDate: Thu Jul  6 12:55:30 2017 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Jul  6 12:56:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfbc1b4b

media-gfx/opencsg: fix build with GCC 6

Gentoo-bug: 623840
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 .../opencsg/files/opencsg-1.4.2-includepath.patch  | 25 ++++++++++++++++++++++
 media-gfx/opencsg/opencsg-1.4.2.ebuild             | 10 ++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)

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
index 00000000000..9b66ae44ed0
--- /dev/null
+++ b/media-gfx/opencsg/files/opencsg-1.4.2-includepath.patch
@@ -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 \

diff --git a/media-gfx/opencsg/opencsg-1.4.2.ebuild 
b/media-gfx/opencsg/opencsg-1.4.2.ebuild
index 1c905349bf8..9f02e2a9c1d 100644
--- a/media-gfx/opencsg/opencsg-1.4.2.ebuild
+++ b/media-gfx/opencsg/opencsg-1.4.2.ebuild
@@ -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() {

Reply via email to