qt58.qtbase: replace mkspecs patch with sed script
This commit is contained in:
parent
1f62bf01d3
commit
9d9ab3de98
|
@ -39,8 +39,7 @@ stdenv.mkDerivation {
|
|||
patches =
|
||||
copyPathsToStore (lib.readPathsFromFile ./. ./series)
|
||||
++ [(if stdenv.isDarwin then ./cmake-paths-darwin.patch else ./cmake-paths.patch)]
|
||||
++ lib.optional decryptSslTraffic ./decrypt-ssl-traffic.patch
|
||||
++ lib.optionals mesaSupported [ ./mkspecs-libgl.patch ];
|
||||
++ lib.optional decryptSslTraffic ./decrypt-ssl-traffic.patch;
|
||||
|
||||
postPatch =
|
||||
''
|
||||
|
@ -53,11 +52,14 @@ stdenv.mkDerivation {
|
|||
sed -i 's/NO_DEFAULT_PATH//' "src/gui/Qt5GuiConfigExtras.cmake.in"
|
||||
sed -i 's/PATHS.*NO_DEFAULT_PATH//' "mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in"
|
||||
''
|
||||
|
||||
+ lib.optionalString mesaSupported ''
|
||||
substituteInPlace mkspecs/common/linux.conf \
|
||||
--replace "@mesa_lib@" "${mesa.out}" \
|
||||
--replace "@mesa_inc@" "${mesa.dev or mesa}"
|
||||
''+ lib.optionalString stdenv.isDarwin ''
|
||||
sed -i mkspecs/common/linux.conf \
|
||||
-e "/^QMAKE_INCDIR_OPENGL/ s|$|${mesa.dev or mesa}/include|" \
|
||||
-e "/^QMAKE_LIBDIR_OPENGL/ s|$|${mesa.out}/lib|"
|
||||
''
|
||||
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
sed -i \
|
||||
-e 's|! /usr/bin/xcode-select --print-path >/dev/null 2>&1;|false;|' \
|
||||
-e 's|! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1;|false;|' \
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
Index: qtbase-opensource-src-5.5.1/mkspecs/common/linux.conf
|
||||
===================================================================
|
||||
--- qtbase-opensource-src-5.5.1.orig/mkspecs/common/linux.conf
|
||||
+++ qtbase-opensource-src-5.5.1/mkspecs/common/linux.conf
|
||||
@@ -12,8 +12,8 @@ QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
-QMAKE_INCDIR_OPENGL =
|
||||
-QMAKE_LIBDIR_OPENGL =
|
||||
+QMAKE_INCDIR_OPENGL = @mesa_inc@/include
|
||||
+QMAKE_LIBDIR_OPENGL = @mesa_lib@/lib
|
||||
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
|
||||
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
|
||||
QMAKE_INCDIR_EGL =
|
Loading…
Reference in New Issue