Skip to content

Commit

Permalink
media-gfx/opencsg: fix build with GCC 6
Browse files Browse the repository at this point in the history
Gentoo-bug: 623840
Package-Manager: Portage-2.3.6, Repoman-2.3.2
  • Loading branch information
maurerpe authored and Michael Palimaka committed Jul 6, 2017
1 parent 3de9167 commit dfbc1b4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
25 changes: 25 additions & 0 deletions media-gfx/opencsg/files/opencsg-1.4.2-includepath.patch
Original file line number Diff line number Diff line change
@@ -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 \
10 changes: 5 additions & 5 deletions media-gfx/opencsg/opencsg-1.4.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit dfbc1b4

Please sign in to comment.