games-emulation/sdlmame: fix compile when qt5 isn't installed (bug #581972)
authorMichael Sterrett <mr_bones_@gentoo.org>
Tue, 3 May 2016 17:58:21 +0000 (13:58 -0400)
committerMichael Sterrett <mr_bones_@gentoo.org>
Tue, 3 May 2016 17:58:37 +0000 (13:58 -0400)
Package-Manager: portage-2.2.26

games-emulation/sdlmame/files/sdlmame-0.173-qt.patch [new file with mode: 0644]
games-emulation/sdlmame/sdlmame-0.173.ebuild

diff --git a/games-emulation/sdlmame/files/sdlmame-0.173-qt.patch b/games-emulation/sdlmame/files/sdlmame-0.173-qt.patch
new file mode 100644 (file)
index 0000000..f9c384d
--- /dev/null
@@ -0,0 +1,29 @@
+No point in adding qt-related things to the compile line unless the qt debugger is wanted
+
+--- scripts/src/osd/sdl_cfg.lua.orig
++++ scripts/src/osd/sdl_cfg.lua
+@@ -115,14 +115,16 @@
+       configuration { }\r
\r
+ elseif _OPTIONS["targetos"]=="linux" then\r
+-      if _OPTIONS["QT_HOME"]~=nil then\r
+-              buildoptions {\r
+-                      "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"),\r
+-              }\r
+-      else\r
+-              buildoptions {\r
+-                      backtick("pkg-config --cflags Qt5Widgets"),\r
+-              }\r
++      if _OPTIONS["USE_QTDEBUG"]=="1" then\r
++              if _OPTIONS["QT_HOME"]~=nil then\r
++                      buildoptions {\r
++                              "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"),\r
++                      }\r
++              else\r
++                      buildoptions {\r
++                              backtick("pkg-config --cflags Qt5Widgets"),\r
++                      }\r
++              end\r
+       end\r
+ elseif _OPTIONS["targetos"]=="macosx" then\r
+       defines {\r
index adc1cb718175afeba3e15400d8a1e01905a0bc02..7fa0a7cd5af83285b55424dff327baf0a0f15f28 100644 (file)
@@ -73,6 +73,7 @@ src_unpack() {
 }
 
 src_prepare() {
+       epatch "${FILESDIR}"/${P}-qt.patch
        # Disable using bundled libraries
        enable_feature USE_SYSTEM_LIB_EXPAT
        enable_feature USE_SYSTEM_LIB_FLAC