qt5: factor out common definitions and remove symlink farm
The module definitions are factored out and shared between qt56 and qt59. The symlink farm which was created during builds is no longer needed.
This commit is contained in:
parent
4866f16fba
commit
fe0ab944db
|
@ -45,64 +45,39 @@ let
|
||||||
mirror = "http://download.qt.io";
|
mirror = "http://download.qt.io";
|
||||||
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
||||||
|
|
||||||
mkDerivation = args:
|
patches = {
|
||||||
stdenv.mkDerivation (args // {
|
qtbase = [ ./qtbase.patch ];
|
||||||
|
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||||
|
qtscript = [ ./qtscript.patch ];
|
||||||
|
qtserialport = [ ./qtserialport.patch ];
|
||||||
|
qttools = [ ./qttools.patch ];
|
||||||
|
qtwebengine =
|
||||||
|
[ ./qtwebengine.patch ]
|
||||||
|
++ optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
||||||
|
qtwebkit = [ ./qtwebkit.patch ];
|
||||||
|
};
|
||||||
|
|
||||||
qmakeFlags =
|
mkDerivation =
|
||||||
(args.qmakeFlags or [])
|
import ../mkDerivation.nix
|
||||||
++ optional (debug != null)
|
{ inherit stdenv; inherit (stdenv) lib; }
|
||||||
(if debug then "CONFIG+=debug" else "CONFIG+=release");
|
{ inherit debug; };
|
||||||
|
|
||||||
cmakeFlags =
|
qtModule =
|
||||||
(args.cmakeFlags or [])
|
import ../qtModule.nix
|
||||||
++ [ "-DBUILD_TESTING=OFF" ]
|
{ inherit mkDerivation perl; inherit (stdenv) lib; }
|
||||||
++ optional (debug != null)
|
{ inherit self srcs patches; };
|
||||||
(if debug then "-DCMAKE_BUILD_TYPE=Debug"
|
|
||||||
else "-DCMAKE_BUILD_TYPE=Release");
|
|
||||||
|
|
||||||
enableParallelBuilding = args.enableParallelBuilding or true;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
qtSubmodule = args:
|
|
||||||
let
|
|
||||||
inherit (args) name;
|
|
||||||
version = args.version or srcs."${name}".version;
|
|
||||||
src = args.src or srcs."${name}".src;
|
|
||||||
in mkDerivation (args // {
|
|
||||||
name = "${name}-${version}";
|
|
||||||
inherit src;
|
|
||||||
|
|
||||||
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
|
|
||||||
nativeBuildInputs =
|
|
||||||
(args.nativeBuildInputs or [])
|
|
||||||
++ [ perl self.qmake ];
|
|
||||||
|
|
||||||
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
|
|
||||||
|
|
||||||
outputs = args.outputs or [ "out" "dev" ];
|
|
||||||
setOutputFlags = args.setOutputFlags or false;
|
|
||||||
|
|
||||||
setupHook = ../qtsubmodule-setup-hook.sh;
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://www.qt.io;
|
|
||||||
description = "A cross-platform application framework for C++";
|
|
||||||
license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
|
|
||||||
maintainers = with maintainers; [ qknight ttuegel periklis ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
} // (args.meta or {});
|
|
||||||
});
|
|
||||||
|
|
||||||
addPackages = self: with self;
|
addPackages = self: with self;
|
||||||
let
|
let
|
||||||
callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; };
|
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
|
||||||
in {
|
in {
|
||||||
|
|
||||||
inherit mkDerivation;
|
inherit mkDerivation;
|
||||||
|
|
||||||
qtbase = callPackage ./qtbase {
|
qtbase = callPackage ../modules/qtbase.nix {
|
||||||
inherit bison cups harfbuzz mesa;
|
inherit bison cups harfbuzz mesa;
|
||||||
|
inherit (srcs.qtbase) src version;
|
||||||
|
patches = patches.qtbase;
|
||||||
inherit developerBuild decryptSslTraffic;
|
inherit developerBuild decryptSslTraffic;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,47 +85,46 @@ let
|
||||||
/* qtactiveqt = not packaged */
|
/* qtactiveqt = not packaged */
|
||||||
/* qtandroidextras = not packaged */
|
/* qtandroidextras = not packaged */
|
||||||
/* qtcanvas3d = not packaged */
|
/* qtcanvas3d = not packaged */
|
||||||
qtconnectivity = callPackage ./qtconnectivity.nix {};
|
qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
|
||||||
qtdeclarative = callPackage ./qtdeclarative {};
|
qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
|
||||||
qtdoc = callPackage ./qtdoc.nix {};
|
qtdoc = callPackage ../modules/qtdoc.nix {};
|
||||||
qtenginio = callPackage ./qtenginio.nix {};
|
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
|
||||||
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
qtimageformats = callPackage ../modules/qtimageformats.nix {};
|
||||||
qtimageformats = callPackage ./qtimageformats.nix {};
|
qtlocation = callPackage ../modules/qtlocation.nix {};
|
||||||
qtlocation = callPackage ./qtlocation.nix {};
|
|
||||||
/* qtmacextras = not packaged */
|
/* qtmacextras = not packaged */
|
||||||
qtmultimedia = callPackage ./qtmultimedia.nix {
|
qtmultimedia = callPackage ../modules/qtmultimedia.nix {
|
||||||
inherit gstreamer gst-plugins-base;
|
inherit gstreamer gst-plugins-base;
|
||||||
};
|
};
|
||||||
qtquick1 = null;
|
qtquick1 = null;
|
||||||
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
|
qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
|
||||||
qtquickcontrols2 = callPackage ./qtquickcontrols2.nix {};
|
qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
|
||||||
qtscript = callPackage ./qtscript {};
|
qtscript = callPackage ../modules/qtscript.nix {};
|
||||||
qtsensors = callPackage ./qtsensors.nix {};
|
qtsensors = callPackage ../modules/qtsensors.nix {};
|
||||||
qtserialport = callPackage ./qtserialport {};
|
qtserialport = callPackage ../modules/qtserialport.nix {};
|
||||||
qtsvg = callPackage ./qtsvg.nix {};
|
qtsvg = callPackage ../modules/qtsvg.nix {};
|
||||||
qttools = callPackage ./qttools {};
|
qttools = callPackage ../modules/qttools.nix {};
|
||||||
qttranslations = callPackage ./qttranslations.nix {};
|
qttranslations = callPackage ../modules/qttranslations.nix {};
|
||||||
qtwayland = callPackage ./qtwayland.nix {};
|
qtwayland = callPackage ../modules/qtwayland.nix {};
|
||||||
qtwebchannel = callPackage ./qtwebchannel.nix {};
|
qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
|
||||||
qtwebengine = callPackage ./qtwebengine {};
|
qtwebengine = callPackage ../modules/qtwebengine.nix {};
|
||||||
qtwebkit = callPackage ./qtwebkit {};
|
qtwebkit = callPackage ../modules/qtwebkit.nix {};
|
||||||
qtwebsockets = callPackage ./qtwebsockets.nix {};
|
qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
|
||||||
/* qtwinextras = not packaged */
|
/* qtwinextras = not packaged */
|
||||||
qtx11extras = callPackage ./qtx11extras.nix {};
|
qtx11extras = callPackage ../modules/qtx11extras.nix {};
|
||||||
qtxmlpatterns = callPackage ./qtxmlpatterns.nix {};
|
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
|
||||||
|
|
||||||
env = callPackage ../qt-env.nix {};
|
env = callPackage ../qt-env.nix {};
|
||||||
full = env "qt-${qtbase.version}" [
|
full = env "qt-${qtbase.version}" [
|
||||||
qtconnectivity qtdeclarative qtdoc qtenginio qtgraphicaleffects
|
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects qtimageformats
|
||||||
qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
|
qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtscript
|
||||||
qtscript qtsensors qtserialport qtsvg qttools qttranslations qtwayland
|
qtsensors qtserialport qtsvg qttools qttranslations qtwayland
|
||||||
qtwebchannel qtwebengine qtwebkit qtwebsockets qtx11extras qtxmlpatterns
|
qtwebchannel qtwebengine qtwebkit qtwebsockets qtx11extras qtxmlpatterns
|
||||||
];
|
];
|
||||||
|
|
||||||
qmake = makeSetupHook {
|
qmake = makeSetupHook {
|
||||||
deps = [ self.qtbase.dev ];
|
deps = [ self.qtbase.dev ];
|
||||||
substitutions = { inherit (stdenv) isDarwin; };
|
substitutions = { inherit (stdenv) isDarwin; };
|
||||||
} ../qmake-hook.sh;
|
} ../hooks/qmake-hook.sh;
|
||||||
};
|
};
|
||||||
|
|
||||||
self = makeScope newScope addPackages;
|
self = makeScope newScope addPackages;
|
||||||
|
|
|
@ -0,0 +1,773 @@
|
||||||
|
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
|
||||||
|
index 11fb52a0b1..a4cca1fdcb 100644
|
||||||
|
--- a/mkspecs/features/create_cmake.prf
|
||||||
|
+++ b/mkspecs/features/create_cmake.prf
|
||||||
|
@@ -21,7 +21,7 @@ load(cmake_functions)
|
||||||
|
# at cmake time whether package has been found via a symlink, and correct
|
||||||
|
# that to an absolute path. This is only done for installations to
|
||||||
|
# the /usr or / prefix.
|
||||||
|
-CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
|
||||||
|
+CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/)
|
||||||
|
contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
|
||||||
|
|
||||||
|
CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake
|
||||||
|
@@ -47,47 +47,22 @@ split_incpath {
|
||||||
|
$$cmake_extra_source_includes.output
|
||||||
|
}
|
||||||
|
|
||||||
|
-CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
|
||||||
|
-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
|
||||||
|
- CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
|
||||||
|
- CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
||||||
|
-}
|
||||||
|
+CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/
|
||||||
|
+CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
||||||
|
|
||||||
|
!exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true
|
||||||
|
|
||||||
|
-CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
||||||
|
-contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
|
||||||
|
- CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
|
||||||
|
- CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
||||||
|
-} else {
|
||||||
|
- CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
|
||||||
|
- # We need to go up another two levels because the CMake files are
|
||||||
|
- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||||
|
- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
|
||||||
|
-}
|
||||||
|
+CMAKE_LIB_DIR = $$NIX_OUTPUT_DEV/lib/
|
||||||
|
+CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
||||||
|
|
||||||
|
-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
|
||||||
|
-contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
|
||||||
|
- CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
|
||||||
|
- CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
||||||
|
-}
|
||||||
|
+CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/
|
||||||
|
+CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
||||||
|
|
||||||
|
-CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])
|
||||||
|
-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
|
||||||
|
- CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/
|
||||||
|
- CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
|
||||||
|
-}
|
||||||
|
+CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/
|
||||||
|
+CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
|
||||||
|
|
||||||
|
-win32:!wince:!static:!staticlib {
|
||||||
|
- CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
|
||||||
|
- contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
|
||||||
|
- CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
|
||||||
|
- CMAKE_DLL_DIR_IS_ABSOLUTE = True
|
||||||
|
- }
|
||||||
|
-} else {
|
||||||
|
- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
|
||||||
|
- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
|
||||||
|
-}
|
||||||
|
+CMAKE_DLL_DIR = $$NIX_OUTPUT_DEV/lib/
|
||||||
|
+CMAKE_DLL_DIR_IS_ABSOLUTE = True
|
||||||
|
|
||||||
|
static|staticlib:CMAKE_STATIC_TYPE = true
|
||||||
|
|
||||||
|
@@ -167,7 +142,7 @@ contains(CONFIG, plugin) {
|
||||||
|
cmake_target_file
|
||||||
|
|
||||||
|
cmake_qt5_plugin_file.files = $$cmake_target_file.output
|
||||||
|
- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||||
|
+ cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||||
|
INSTALLS += cmake_qt5_plugin_file
|
||||||
|
|
||||||
|
return()
|
||||||
|
@@ -314,7 +289,7 @@ exists($$cmake_macros_file.input) {
|
||||||
|
cmake_qt5_module_files.files += $$cmake_macros_file.output
|
||||||
|
}
|
||||||
|
|
||||||
|
-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||||
|
+cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||||
|
|
||||||
|
# We are generating cmake files. Most developers of Qt are not aware of cmake,
|
||||||
|
# so we require automatic tests to be available. The only module which should
|
||||||
|
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||||
|
index d2358cae4b..61d8cc0471 100644
|
||||||
|
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||||
|
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||||
|
@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
|
||||||
|
endif()
|
||||||
|
!!ENDIF
|
||||||
|
|
||||||
|
-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
|
||||||
|
-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
||||||
|
-!!ELSE
|
||||||
|
-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
|
||||||
|
-# Use original install prefix when loaded through a
|
||||||
|
-# cross-prefix symbolic link such as /lib -> /usr/lib.
|
||||||
|
-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
|
||||||
|
-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
|
||||||
|
-if(_realCurr STREQUAL _realOrig)
|
||||||
|
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
|
||||||
|
-else()
|
||||||
|
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
||||||
|
-endif()
|
||||||
|
-unset(_realOrig)
|
||||||
|
-unset(_realCurr)
|
||||||
|
-unset(_IMPORT_PREFIX)
|
||||||
|
-!!ENDIF
|
||||||
|
-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
||||||
|
-!!ELSE
|
||||||
|
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
||||||
|
-!!ENDIF
|
||||||
|
-
|
||||||
|
!!IF !equals(TEMPLATE, aux)
|
||||||
|
# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
|
||||||
|
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)")
|
||||||
|
@@ -58,11 +34,7 @@ endmacro()
|
||||||
|
macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
|
||||||
|
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
|
||||||
|
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
|
||||||
|
\"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
|
||||||
|
@@ -75,11 +47,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
||||||
|
)
|
||||||
|
|
||||||
|
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
|
||||||
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
|
||||||
|
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
|
||||||
|
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
|
||||||
|
@@ -95,24 +63,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||||
|
!!IF !no_module_headers
|
||||||
|
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
|
||||||
|
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\"
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
|
||||||
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\"
|
||||||
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
|
||||||
|
)
|
||||||
|
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
||||||
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
||||||
|
- )
|
||||||
|
-!!ELSE
|
||||||
|
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
||||||
|
-!!ENDIF
|
||||||
|
-!!ELSE
|
||||||
|
-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
||||||
|
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
|
||||||
|
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
||||||
|
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
|
||||||
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
|
||||||
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
||||||
|
)
|
||||||
|
!!ELSE
|
||||||
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
||||||
|
@@ -128,7 +85,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||||
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
||||||
|
!!ENDIF
|
||||||
|
!!ENDIF
|
||||||
|
-!!ENDIF
|
||||||
|
!!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
|
||||||
|
include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
|
||||||
|
!!ENDIF
|
||||||
|
@@ -254,25 +210,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||||
|
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
|
||||||
|
!!IF isEmpty(CMAKE_DEBUG_TYPE)
|
||||||
|
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
||||||
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
||||||
|
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
||||||
|
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
||||||
|
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
||||||
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
|
||||||
|
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
||||||
|
if (EXISTS
|
||||||
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
||||||
|
-!!ELSE
|
||||||
|
\"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
||||||
|
-!!ENDIF
|
||||||
|
AND EXISTS
|
||||||
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
||||||
|
-!!ELSE
|
||||||
|
\"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
||||||
|
-!!ENDIF
|
||||||
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
||||||
|
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
|
||||||
|
endif()
|
||||||
|
@@ -291,25 +235,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||||
|
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
|
||||||
|
!!IF isEmpty(CMAKE_RELEASE_TYPE)
|
||||||
|
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
||||||
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
||||||
|
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
||||||
|
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
||||||
|
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
||||||
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
|
||||||
|
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
||||||
|
if (EXISTS
|
||||||
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
||||||
|
-!!ELSE
|
||||||
|
\"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
||||||
|
-!!ENDIF
|
||||||
|
AND EXISTS
|
||||||
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
||||||
|
-!!ELSE
|
||||||
|
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
||||||
|
-!!ENDIF
|
||||||
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
||||||
|
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
|
||||||
|
endif()
|
||||||
|
@@ -328,11 +260,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||||
|
macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
|
||||||
|
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
|
||||||
|
set_target_properties(Qt5::${Plugin} PROPERTIES
|
||||||
|
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
|
||||||
|
diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
|
||||||
|
index b09d42a0a4..f076265bdd 100644
|
||||||
|
--- a/mkspecs/features/qml_module.prf
|
||||||
|
+++ b/mkspecs/features/qml_module.prf
|
||||||
|
@@ -17,10 +17,7 @@ fq_qml_files = $$_PRO_FILE_PWD_/qmldir
|
||||||
|
|
||||||
|
for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)
|
||||||
|
|
||||||
|
-qml1_target: \
|
||||||
|
- instbase = $$[QT_INSTALL_IMPORTS]
|
||||||
|
-else: \
|
||||||
|
- instbase = $$[QT_INSTALL_QML]
|
||||||
|
+instbase = $$NIX_OUTPUT_QML
|
||||||
|
|
||||||
|
# Install rules
|
||||||
|
qmldir.base = $$_PRO_FILE_PWD_
|
||||||
|
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
|
||||||
|
index ebec1db8da..62ace84a6c 100644
|
||||||
|
--- a/mkspecs/features/qml_plugin.prf
|
||||||
|
+++ b/mkspecs/features/qml_plugin.prf
|
||||||
|
@@ -46,13 +46,8 @@ exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
|
||||||
|
|
||||||
|
load(qt_build_paths)
|
||||||
|
|
||||||
|
-qml1_target {
|
||||||
|
- DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH
|
||||||
|
- instbase = $$[QT_INSTALL_IMPORTS]
|
||||||
|
-} else {
|
||||||
|
- DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
|
||||||
|
- instbase = $$[QT_INSTALL_QML]
|
||||||
|
-}
|
||||||
|
+DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
|
||||||
|
+instbase = $$NIX_OUTPUT_QML
|
||||||
|
|
||||||
|
target.path = $$instbase/$$TARGETPATH
|
||||||
|
INSTALLS += target
|
||||||
|
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
|
||||||
|
index 46aca50cc2..4f4e634724 100644
|
||||||
|
--- a/mkspecs/features/qt_app.prf
|
||||||
|
+++ b/mkspecs/features/qt_app.prf
|
||||||
|
@@ -29,7 +29,7 @@ host_build:force_bootstrap {
|
||||||
|
target.path = $$[QT_HOST_BINS]
|
||||||
|
} else {
|
||||||
|
!build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release
|
||||||
|
- target.path = $$[QT_INSTALL_BINS]
|
||||||
|
+ target.path = $$NIX_OUTPUT_BIN/bin
|
||||||
|
CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
|
||||||
|
}
|
||||||
|
INSTALLS += target
|
||||||
|
diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
|
||||||
|
index 1848f00e90..2af93675c5 100644
|
||||||
|
--- a/mkspecs/features/qt_build_paths.prf
|
||||||
|
+++ b/mkspecs/features/qt_build_paths.prf
|
||||||
|
@@ -23,6 +23,6 @@ exists($$MODULE_BASE_INDIR/.git): \
|
||||||
|
!force_independent {
|
||||||
|
# If the module is not built independently, everything ends up in qtbase.
|
||||||
|
# This is the case in non-prefix builds, except for selected modules.
|
||||||
|
- MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
|
||||||
|
- MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
|
||||||
|
+ MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT
|
||||||
|
+ MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT
|
||||||
|
}
|
||||||
|
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
|
||||||
|
index c1809468af..0a12ec24db 100644
|
||||||
|
--- a/mkspecs/features/qt_common.prf
|
||||||
|
+++ b/mkspecs/features/qt_common.prf
|
||||||
|
@@ -30,8 +30,8 @@ contains(TEMPLATE, .*lib) {
|
||||||
|
qqt_libdir = \$\$\$\$[QT_HOST_LIBS]
|
||||||
|
qt_libdir = $$[QT_HOST_LIBS]
|
||||||
|
} else {
|
||||||
|
- qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS]
|
||||||
|
- qt_libdir = $$[QT_INSTALL_LIBS]
|
||||||
|
+ qqt_libdir = \$\$\$\$NIX_OUTPUT_OUT/lib
|
||||||
|
+ qt_libdir = $$NIX_OUTPUT_OUT/lib
|
||||||
|
}
|
||||||
|
contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) {
|
||||||
|
lib_replace.match = "[^ ']*$$rplbase/lib"
|
||||||
|
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
|
||||||
|
index 183d0c9502..17982b04ec 100644
|
||||||
|
--- a/mkspecs/features/qt_docs.prf
|
||||||
|
+++ b/mkspecs/features/qt_docs.prf
|
||||||
|
@@ -41,7 +41,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
|
||||||
|
|
||||||
|
QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
|
||||||
|
!build_online_docs: \
|
||||||
|
- QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
|
||||||
|
+ QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC)
|
||||||
|
PREP_DOC_INDEXES =
|
||||||
|
DOC_INDEXES =
|
||||||
|
!isEmpty(QTREPOS) {
|
||||||
|
@@ -60,8 +60,8 @@ DOC_INDEXES =
|
||||||
|
DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
|
||||||
|
} else {
|
||||||
|
prepare_docs: \
|
||||||
|
- PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
||||||
|
- DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
||||||
|
+ PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
|
||||||
|
+ DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
|
||||||
|
}
|
||||||
|
doc_command = $$QDOC $$QMAKE_DOCS
|
||||||
|
prepare_docs {
|
||||||
|
@@ -75,12 +75,12 @@ prepare_docs {
|
||||||
|
qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
|
||||||
|
|
||||||
|
inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
|
||||||
|
- inst_html_docs.path = $$[QT_INSTALL_DOCS]
|
||||||
|
+ inst_html_docs.path = $$NIX_OUTPUT_DOC
|
||||||
|
inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
|
||||||
|
INSTALLS += inst_html_docs
|
||||||
|
|
||||||
|
inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
|
||||||
|
- inst_qch_docs.path = $$[QT_INSTALL_DOCS]
|
||||||
|
+ inst_qch_docs.path = $$NIX_OUTPUT_DOC
|
||||||
|
inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
|
||||||
|
INSTALLS += inst_qch_docs
|
||||||
|
|
||||||
|
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
|
||||||
|
index 4c68cfd72f..f422f18266 100644
|
||||||
|
--- a/mkspecs/features/qt_example_installs.prf
|
||||||
|
+++ b/mkspecs/features/qt_example_installs.prf
|
||||||
|
@@ -70,7 +70,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
|
||||||
|
$$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
|
||||||
|
$$DBUS_ADAPTORS $$DBUS_INTERFACES
|
||||||
|
addInstallFiles(sources.files, $$sourcefiles)
|
||||||
|
- sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
|
||||||
|
+ sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
|
||||||
|
INSTALLS += sources
|
||||||
|
|
||||||
|
check_examples {
|
||||||
|
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
|
||||||
|
index 4a1d265a8b..abe0da95f6 100644
|
||||||
|
--- a/mkspecs/features/qt_functions.prf
|
||||||
|
+++ b/mkspecs/features/qt_functions.prf
|
||||||
|
@@ -70,7 +70,7 @@ defineTest(qtHaveModule) {
|
||||||
|
defineTest(qtPrepareTool) {
|
||||||
|
cmd = $$eval(QT_TOOL.$${2}.binary)
|
||||||
|
isEmpty(cmd) {
|
||||||
|
- cmd = $$[QT_HOST_BINS]/$$2
|
||||||
|
+ cmd = $$system("type -p $$2")
|
||||||
|
exists($${cmd}.pl) {
|
||||||
|
cmd = perl -w $$system_path($${cmd}.pl)
|
||||||
|
} else: contains(QMAKE_HOST.os, Windows) {
|
||||||
|
diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
|
||||||
|
index 3a5dbb6274..24f321bd82 100644
|
||||||
|
--- a/mkspecs/features/qt_installs.prf
|
||||||
|
+++ b/mkspecs/features/qt_installs.prf
|
||||||
|
@@ -12,16 +12,10 @@
|
||||||
|
#library
|
||||||
|
!qt_no_install_library {
|
||||||
|
win32 {
|
||||||
|
- host_build: \
|
||||||
|
- dlltarget.path = $$[QT_HOST_BINS]
|
||||||
|
- else: \
|
||||||
|
- dlltarget.path = $$[QT_INSTALL_BINS]
|
||||||
|
+ dlltarget.path = $$NIX_OUTPUT_BIN/bin
|
||||||
|
INSTALLS += dlltarget
|
||||||
|
}
|
||||||
|
- host_build: \
|
||||||
|
- target.path = $$[QT_HOST_LIBS]
|
||||||
|
- else: \
|
||||||
|
- target.path = $$[QT_INSTALL_LIBS]
|
||||||
|
+ target.path = $$NIX_OUTPUT_OUT/lib
|
||||||
|
!static: target.CONFIG = no_dll
|
||||||
|
INSTALLS += target
|
||||||
|
}
|
||||||
|
@@ -29,33 +23,33 @@
|
||||||
|
#headers
|
||||||
|
qt_install_headers {
|
||||||
|
class_headers.files = $$SYNCQT.HEADER_CLASSES
|
||||||
|
- class_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
|
||||||
|
+ class_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
|
||||||
|
INSTALLS += class_headers
|
||||||
|
|
||||||
|
targ_headers.files = $$SYNCQT.HEADER_FILES
|
||||||
|
- targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
|
||||||
|
+ targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
|
||||||
|
INSTALLS += targ_headers
|
||||||
|
|
||||||
|
private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES
|
||||||
|
- private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
|
||||||
|
+ private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
|
||||||
|
INSTALLS += private_headers
|
||||||
|
|
||||||
|
qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES
|
||||||
|
- qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
|
||||||
|
+ qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
|
||||||
|
INSTALLS += qpa_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
#module
|
||||||
|
qt_install_module {
|
||||||
|
!isEmpty(MODULE_PRI) {
|
||||||
|
- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
||||||
|
+ pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
|
||||||
|
pritarget.files = $$MODULE_PRI
|
||||||
|
INSTALLS += pritarget
|
||||||
|
} else: isEmpty(MODULE_PRIVATE_PRI) {
|
||||||
|
warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.")
|
||||||
|
}
|
||||||
|
!isEmpty(MODULE_PRIVATE_PRI) {
|
||||||
|
- privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
||||||
|
+ privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
|
||||||
|
privpritarget.files = $$MODULE_PRIVATE_PRI
|
||||||
|
INSTALLS += privpritarget
|
||||||
|
}
|
||||||
|
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
|
||||||
|
index 3cf6c7349c..83e68025a5 100644
|
||||||
|
--- a/mkspecs/features/qt_plugin.prf
|
||||||
|
+++ b/mkspecs/features/qt_plugin.prf
|
||||||
|
@@ -82,7 +82,7 @@ CONFIG(static, static|shared)|prefix_build {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
|
||||||
|
+target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE
|
||||||
|
INSTALLS += target
|
||||||
|
|
||||||
|
TARGET = $$qt5LibraryTarget($$TARGET)
|
||||||
|
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
||||||
|
index 91a4eb619a..08b533e69c 100644
|
||||||
|
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
|
||||||
|
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
||||||
|
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake)
|
||||||
|
add_executable(Qt5::qmake IMPORTED)
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ENDIF
|
||||||
|
@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::moc)
|
||||||
|
add_executable(Qt5::moc IMPORTED)
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ENDIF
|
||||||
|
@@ -35,7 +35,7 @@ if (NOT TARGET Qt5::rcc)
|
||||||
|
add_executable(Qt5::rcc IMPORTED)
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ENDIF
|
||||||
|
@@ -131,7 +131,7 @@ if (NOT TARGET Qt5::WinMain)
|
||||||
|
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
|
||||||
|
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||||
|
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
||||||
|
!!ENDIF
|
||||||
|
@@ -145,7 +145,7 @@ if (NOT TARGET Qt5::WinMain)
|
||||||
|
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
||||||
|
!!ENDIF
|
||||||
|
diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
||||||
|
index c357237d0e..6f0c75de3c 100644
|
||||||
|
--- a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
||||||
|
+++ b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE)
|
||||||
|
-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
||||||
|
+set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
||||||
|
!!ELSE
|
||||||
|
set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
|
||||||
|
!!ENDIF
|
||||||
|
diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
||||||
|
index 706304cf34..546420f6ad 100644
|
||||||
|
--- a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
||||||
|
+++ b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE)
|
||||||
|
-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
||||||
|
+set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
||||||
|
!!ELSE
|
||||||
|
set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
|
||||||
|
!!ENDIF
|
||||||
|
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
|
||||||
|
index f5b15207cc..f85e0524bb 100644
|
||||||
|
--- a/src/corelib/kernel/qcoreapplication.cpp
|
||||||
|
+++ b/src/corelib/kernel/qcoreapplication.cpp
|
||||||
|
@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPaths()
|
||||||
|
QStringList *app_libpaths = new QStringList;
|
||||||
|
coreappdata()->app_libpaths.reset(app_libpaths);
|
||||||
|
|
||||||
|
+ // Add library paths derived from PATH
|
||||||
|
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
|
||||||
|
+ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
|
||||||
|
+ for (const QString &path: paths) {
|
||||||
|
+ if (!path.isEmpty()) {
|
||||||
|
+ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
|
||||||
|
if (!libPathEnv.isEmpty()) {
|
||||||
|
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
|
||||||
|
diff --git a/src/corelib/tools/qtimezoneprivate_tz.cpp b/src/corelib/tools/qtimezoneprivate_tz.cpp
|
||||||
|
index c13c9a5223..6936851511 100644
|
||||||
|
--- a/src/corelib/tools/qtimezoneprivate_tz.cpp
|
||||||
|
+++ b/src/corelib/tools/qtimezoneprivate_tz.cpp
|
||||||
|
@@ -64,7 +64,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash;
|
||||||
|
// Parse zone.tab table, assume lists all installed zones, if not will need to read directories
|
||||||
|
static QTzTimeZoneHash loadTzTimeZones()
|
||||||
|
{
|
||||||
|
- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
|
||||||
|
+ // Try TZDIR first, in case we're running on NixOS.
|
||||||
|
+ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab");
|
||||||
|
+ // Fallback to traditional paths in case we are not on NixOS.
|
||||||
|
+ if (!QFile::exists(path))
|
||||||
|
+ path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
|
||||||
|
if (!QFile::exists(path))
|
||||||
|
path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
|
||||||
|
|
||||||
|
@@ -636,12 +640,16 @@ void QTzTimeZonePrivate::init(const QByteArray &ianaId)
|
||||||
|
if (!tzif.open(QIODevice::ReadOnly))
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
- // Open named tz, try modern path first, if fails try legacy path
|
||||||
|
- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
||||||
|
+ // Try TZDIR first, in case we're running on NixOS
|
||||||
|
+ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId));
|
||||||
|
if (!tzif.open(QIODevice::ReadOnly)) {
|
||||||
|
- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
||||||
|
- if (!tzif.open(QIODevice::ReadOnly))
|
||||||
|
- return;
|
||||||
|
+ // Open named tz, try modern path first, if fails try legacy path
|
||||||
|
+ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
||||||
|
+ if (!tzif.open(QIODevice::ReadOnly)) {
|
||||||
|
+ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
||||||
|
+ if (!tzif.open(QIODevice::ReadOnly))
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
|
||||||
|
index 1d947159e2..b36865fc48 100644
|
||||||
|
--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
|
||||||
|
+++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
|
||||||
|
@@ -2,11 +2,7 @@
|
||||||
|
if (NOT TARGET Qt5::qdbuscpp2xml)
|
||||||
|
add_executable(Qt5::qdbuscpp2xml IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
||||||
|
_qt5_DBus_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::qdbuscpp2xml PROPERTIES
|
||||||
|
@@ -17,11 +13,7 @@ endif()
|
||||||
|
if (NOT TARGET Qt5::qdbusxml2cpp)
|
||||||
|
add_executable(Qt5::qdbusxml2cpp IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
||||||
|
_qt5_DBus_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
|
||||||
|
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||||
|
index 07869efd7d..37b95d1b6b 100644
|
||||||
|
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||||
|
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
||||||
|
-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
||||||
|
+set(Qt5Gui_EGL_INCLUDE_DIRS \"$$NIX_OUTPUT_DEV/$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
||||||
|
!!ELSE
|
||||||
|
set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
||||||
|
!!ENDIF
|
||||||
|
@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATIO
|
||||||
|
set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_OUT/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||||
|
!!ENDIF
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
||||||
|
+ set(imported_implib \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
||||||
|
!!ENDIF
|
||||||
|
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
|
||||||
|
index 584f0b0f0e..24d80063f2 100644
|
||||||
|
--- a/src/network/kernel/qdnslookup_unix.cpp
|
||||||
|
+++ b/src/network/kernel/qdnslookup_unix.cpp
|
||||||
|
@@ -83,7 +83,7 @@ static bool resolveLibraryInternal()
|
||||||
|
if (!lib.load())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
- lib.setFileName(QLatin1String("resolv"));
|
||||||
|
+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV));
|
||||||
|
if (!lib.load())
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
|
||||||
|
index dabf1913cc..53bb867e07 100644
|
||||||
|
--- a/src/network/kernel/qhostinfo_unix.cpp
|
||||||
|
+++ b/src/network/kernel/qhostinfo_unix.cpp
|
||||||
|
@@ -94,7 +94,7 @@ static bool resolveLibraryInternal()
|
||||||
|
if (!lib.load())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
- lib.setFileName(QLatin1String("resolv"));
|
||||||
|
+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV));
|
||||||
|
if (!lib.load())
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
|
||||||
|
index 68caaeb6dc..fef4a81474 100644
|
||||||
|
--- a/src/network/ssl/qsslcontext_openssl.cpp
|
||||||
|
+++ b/src/network/ssl/qsslcontext_openssl.cpp
|
||||||
|
@@ -340,7 +340,7 @@ init_context:
|
||||||
|
|
||||||
|
const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
|
||||||
|
if (!qcurves.isEmpty()) {
|
||||||
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
|
||||||
|
// Set the curves to be used
|
||||||
|
if (q_SSLeay() >= 0x10002000L) {
|
||||||
|
// SSL_CTX_ctrl wants a non-const pointer as last argument,
|
||||||
|
@@ -354,7 +354,7 @@ init_context:
|
||||||
|
return sslContext;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
|
||||||
|
+#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
|
||||||
|
{
|
||||||
|
// specific curves requested, but not possible to set -> error
|
||||||
|
sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
|
||||||
|
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
||||||
|
index 44f1d7e6ba..e24fe54326 100644
|
||||||
|
--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
||||||
|
+++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
||||||
|
@@ -251,12 +251,9 @@ void TableGenerator::initPossibleLocations()
|
||||||
|
// the QTCOMPOSE environment variable
|
||||||
|
if (qEnvironmentVariableIsSet("QTCOMPOSE"))
|
||||||
|
m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE")));
|
||||||
|
- m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale"));
|
||||||
|
- m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale"));
|
||||||
|
- m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale"));
|
||||||
|
- m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale"));
|
||||||
|
m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale"));
|
||||||
|
m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale"));
|
||||||
|
+ m_possibleLocations.append(QLatin1String(NIXPKGS_QTCOMPOSE));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString TableGenerator::findComposeFile()
|
||||||
|
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||||
|
index 9bdedcc830..2559b2066b 100644
|
||||||
|
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||||
|
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||||
|
@@ -570,7 +570,14 @@ void (*QGLXContext::getProcAddress(const QByteArray &procName)) ()
|
||||||
|
#ifndef QT_NO_LIBRARY
|
||||||
|
extern const QString qt_gl_library_name();
|
||||||
|
// QLibrary lib(qt_gl_library_name());
|
||||||
|
+ // Check system library paths first
|
||||||
|
QLibrary lib(QLatin1String("GL"));
|
||||||
|
+#ifdef NIXPKGS_MESA_GL
|
||||||
|
+ if (!lib.load()) {
|
||||||
|
+ // Fallback to Mesa driver
|
||||||
|
+ lib.setFileName(QLatin1String(NIXPKGS_MESA_GL));
|
||||||
|
+ }
|
||||||
|
+#endif // NIXPKGS_MESA_GL
|
||||||
|
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
|
||||||
|
index b321ed95dc..9e7a72521c 100644
|
||||||
|
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
|
||||||
|
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
|
||||||
|
@@ -303,10 +303,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
|
||||||
|
#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
|
||||||
|
static bool function_ptrs_not_initialized = true;
|
||||||
|
if (function_ptrs_not_initialized) {
|
||||||
|
- QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
|
||||||
|
+ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1);
|
||||||
|
bool xcursorFound = xcursorLib.load();
|
||||||
|
if (!xcursorFound) { // try without the version number
|
||||||
|
- xcursorLib.setFileName(QLatin1String("Xcursor"));
|
||||||
|
+ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR));
|
||||||
|
xcursorFound = xcursorLib.load();
|
||||||
|
}
|
||||||
|
if (xcursorFound) {
|
||||||
|
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
||||||
|
index 99d87e2e46..a4eab2aa72 100644
|
||||||
|
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
||||||
|
+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
||||||
|
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic)
|
||||||
|
add_executable(Qt5::uic IMPORTED)
|
||||||
|
|
||||||
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
||||||
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
||||||
|
!!ENDIF
|
|
@ -1,8 +1,8 @@
|
||||||
Index: qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp
|
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
|
||||||
===================================================================
|
index dfdf2edbe..7ee96049d 100644
|
||||||
--- qtdeclarative-opensource-src-5.8.0.orig/src/qml/qml/qqmlimport.cpp
|
--- a/src/qml/qml/qqmlimport.cpp
|
||||||
+++ qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp
|
+++ b/src/qml/qml/qqmlimport.cpp
|
||||||
@@ -1630,6 +1630,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q
|
@@ -1568,6 +1568,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
||||||
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
||||||
addImportPath(installImportsPath);
|
addImportPath(installImportsPath);
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
From abd80356449bb36c8adcc5c9ca1df6b47715d265 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Tuegel <ttuegel@gmail.com>
|
|
||||||
Date: Sun, 23 Aug 2015 09:13:34 -0500
|
|
||||||
Subject: [PATCH] glib-2.32
|
|
||||||
|
|
||||||
---
|
|
||||||
src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
|
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
|
||||||
index 1f6d25e..087c3fb 100644
|
index 1f6d25e..087c3fb 100644
|
||||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
|
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
|
||||||
|
@ -20,6 +11,3 @@ index 1f6d25e..087c3fb 100644
|
||||||
typedef struct _GCond GCond;
|
typedef struct _GCond GCond;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Index: qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h
|
diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h
|
||||||
===================================================================
|
index 6f2cabd..cd3c0ed 100644
|
||||||
--- qtserialport-opensource-src-5.8.0.orig/src/serialport/qtudev_p.h
|
--- a/src/serialport/qtudev_p.h
|
||||||
+++ qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h
|
+++ b/src/serialport/qtudev_p.h
|
||||||
@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QL
|
@@ -105,9 +105,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN
|
||||||
inline bool resolveSymbols(QLibrary *udevLibrary)
|
inline bool resolveSymbols(QLibrary *udevLibrary)
|
||||||
{
|
{
|
||||||
if (!udevLibrary->isLoaded()) {
|
if (!udevLibrary->isLoaded()) {
|
|
@ -0,0 +1,64 @@
|
||||||
|
diff --git a/src/assistant/help/Qt5HelpConfigExtras.cmake.in b/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
||||||
|
index 5a5bd5ce..1c6727d4 100644
|
||||||
|
--- a/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
||||||
|
+++ b/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
||||||
|
@@ -2,14 +2,13 @@
|
||||||
|
if (NOT TARGET Qt5::qcollectiongenerator)
|
||||||
|
add_executable(Qt5::qcollectiongenerator IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
+ if(NOT EXISTS \"${imported_location}\")
|
||||||
|
+ set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
+ endif()
|
||||||
|
_qt5_Help_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::qcollectiongenerator PROPERTIES
|
||||||
|
IMPORTED_LOCATION ${imported_location}
|
||||||
|
)
|
||||||
|
-endif()
|
||||||
|
+endif()
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/src/linguist/Qt5LinguistToolsConfig.cmake.in b/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
index 4318b16f..d60db4ff 100644
|
||||||
|
--- a/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
+++ b/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
@@ -44,11 +44,7 @@ endmacro()
|
||||||
|
if (NOT TARGET Qt5::lrelease)
|
||||||
|
add_executable(Qt5::lrelease IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_LinguistTools_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::lrelease PROPERTIES
|
||||||
|
@@ -59,11 +55,7 @@ endif()
|
||||||
|
if (NOT TARGET Qt5::lupdate)
|
||||||
|
add_executable(Qt5::lupdate IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_LinguistTools_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::lupdate PROPERTIES
|
||||||
|
@@ -74,11 +66,7 @@ endif()
|
||||||
|
if (NOT TARGET Qt5::lconvert)
|
||||||
|
add_executable(Qt5::lconvert IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_LinguistTools_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::lconvert PROPERTIES
|
|
@ -0,0 +1,77 @@
|
||||||
|
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
|
||||||
|
index 1f4866d66..bb61e4ba3 100644
|
||||||
|
--- a/Source/WTF/WTF.pri
|
||||||
|
+++ b/Source/WTF/WTF.pri
|
||||||
|
@@ -12,7 +12,7 @@ mac {
|
||||||
|
# Mac OS does ship libicu but not the associated header files.
|
||||||
|
# Therefore WebKit provides adequate header files.
|
||||||
|
INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
|
||||||
|
- LIBS += -licucore
|
||||||
|
+ LIBS += /usr/lib/libicucore.dylib
|
||||||
|
} else:!use?(wchar_unicode): {
|
||||||
|
win32 {
|
||||||
|
CONFIG(static, static|shared) {
|
||||||
|
diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
index a923d49aa..46772a4bb 100644
|
||||||
|
--- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
+++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* module = 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef NIXPKGS_LIBGTK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (library.load()) {
|
||||||
|
typedef void *(*gtk_init_check_ptr)(int*, char***);
|
||||||
|
gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
|
||||||
|
diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
index de06a2fea..86fe39ef1 100644
|
||||||
|
--- a/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
+++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
@@ -697,7 +697,11 @@ static Display *getPluginDisplay()
|
||||||
|
// support gdk based plugins (like flash) that use a different X connection.
|
||||||
|
// The code below has the same effect as this one:
|
||||||
|
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
|
||||||
|
+#ifdef NIXPKGS_LIBGDK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!library.load())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
index 8de65216b..38f5c05e5 100644
|
||||||
|
--- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
+++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr
|
||||||
|
|
||||||
|
static bool initializeGtk()
|
||||||
|
{
|
||||||
|
+#ifdef NIXPKGS_LIBGTK2
|
||||||
|
+ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!gtkLibrary.load())
|
||||||
|
return false;
|
||||||
|
typedef void* (*gtk_init_ptr)(void*, void*);
|
||||||
|
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
index d734ff684..0f6ff63d1 100644
|
||||||
|
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
@@ -64,7 +64,11 @@ static Display* getPluginDisplay()
|
||||||
|
// The code below has the same effect as this one:
|
||||||
|
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
|
||||||
|
|
||||||
|
+#ifdef NIXPKGS_LIBGDK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!library.load())
|
||||||
|
return 0;
|
||||||
|
|
|
@ -36,96 +36,68 @@ let
|
||||||
mirror = "http://download.qt.io";
|
mirror = "http://download.qt.io";
|
||||||
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
||||||
|
|
||||||
mkDerivation = args:
|
patches = {
|
||||||
stdenv.mkDerivation (args // {
|
qtbase = [ ./qtbase.patch ];
|
||||||
|
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||||
|
qtscript = [ ./qtscript.patch ];
|
||||||
|
qtserialport = [ ./qtserialport.patch ];
|
||||||
|
qttools = [ ./qttools.patch ];
|
||||||
|
qtwebengine = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
||||||
|
qtwebkit = [ ./qtwebkit.patch ];
|
||||||
|
};
|
||||||
|
|
||||||
qmakeFlags =
|
mkDerivation =
|
||||||
(args.qmakeFlags or [])
|
import ../mkDerivation.nix
|
||||||
++ optional (debug != null)
|
{ inherit stdenv; inherit (stdenv) lib; }
|
||||||
(if debug then "CONFIG+=debug" else "CONFIG+=release");
|
{ inherit debug; };
|
||||||
|
|
||||||
cmakeFlags =
|
qtModule =
|
||||||
(args.cmakeFlags or [])
|
import ../qtModule.nix
|
||||||
++ [ "-DBUILD_TESTING=OFF" ]
|
{ inherit mkDerivation perl; inherit (stdenv) lib; }
|
||||||
++ optional (debug != null)
|
{ inherit self srcs patches; };
|
||||||
(if debug then "-DCMAKE_BUILD_TYPE=Debug"
|
|
||||||
else "-DCMAKE_BUILD_TYPE=Release");
|
|
||||||
|
|
||||||
enableParallelBuilding = args.enableParallelBuilding or true;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
qtSubmodule = args:
|
|
||||||
let
|
|
||||||
inherit (args) name;
|
|
||||||
version = args.version or srcs."${name}".version;
|
|
||||||
src = args.src or srcs."${name}".src;
|
|
||||||
in mkDerivation (args // {
|
|
||||||
name = "${name}-${version}";
|
|
||||||
inherit src;
|
|
||||||
|
|
||||||
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
|
|
||||||
nativeBuildInputs =
|
|
||||||
(args.nativeBuildInputs or [])
|
|
||||||
++ [ perl self.qmake ];
|
|
||||||
|
|
||||||
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
|
|
||||||
|
|
||||||
outputs = args.outputs or [ "out" "dev" ];
|
|
||||||
setOutputFlags = args.setOutputFlags or false;
|
|
||||||
|
|
||||||
setupHook = ../qtsubmodule-setup-hook.sh;
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://www.qt.io;
|
|
||||||
description = "A cross-platform application framework for C++";
|
|
||||||
license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
|
|
||||||
maintainers = with maintainers; [ qknight ttuegel periklis ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
} // (args.meta or {});
|
|
||||||
});
|
|
||||||
|
|
||||||
addPackages = self: with self;
|
addPackages = self: with self;
|
||||||
let
|
let
|
||||||
callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; };
|
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
|
||||||
in {
|
in {
|
||||||
|
|
||||||
inherit mkDerivation;
|
inherit mkDerivation;
|
||||||
|
|
||||||
qtbase = callPackage ./qtbase {
|
qtbase = callPackage ../modules/qtbase.nix {
|
||||||
inherit (srcs.qtbase) src version;
|
inherit (srcs.qtbase) src version;
|
||||||
|
patches = patches.qtbase;
|
||||||
inherit bison cups harfbuzz mesa;
|
inherit bison cups harfbuzz mesa;
|
||||||
inherit dconf gtk3;
|
withGtk3 = true; inherit dconf gtk3;
|
||||||
inherit developerBuild decryptSslTraffic;
|
inherit developerBuild decryptSslTraffic;
|
||||||
};
|
};
|
||||||
|
|
||||||
qtcharts = callPackage ./qtcharts.nix {};
|
qtcharts = callPackage ../modules/qtcharts.nix {};
|
||||||
qtconnectivity = callPackage ./qtconnectivity.nix {};
|
qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
|
||||||
qtdeclarative = callPackage ./qtdeclarative {};
|
qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
|
||||||
qtdoc = callPackage ./qtdoc.nix {};
|
qtdoc = callPackage ../modules/qtdoc.nix {};
|
||||||
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
|
||||||
qtimageformats = callPackage ./qtimageformats.nix {};
|
qtimageformats = callPackage ../modules/qtimageformats.nix {};
|
||||||
qtlocation = callPackage ./qtlocation.nix {};
|
qtlocation = callPackage ../modules/qtlocation.nix {};
|
||||||
qtmacextras = callPackage ./qtmacextras.nix {};
|
qtmacextras = callPackage ../modules/qtmacextras.nix {};
|
||||||
qtmultimedia = callPackage ./qtmultimedia.nix {
|
qtmultimedia = callPackage ../modules/qtmultimedia.nix {
|
||||||
inherit gstreamer gst-plugins-base;
|
inherit gstreamer gst-plugins-base;
|
||||||
};
|
};
|
||||||
qtquick1 = null;
|
qtquick1 = null;
|
||||||
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
|
qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
|
||||||
qtquickcontrols2 = callPackage ./qtquickcontrols2.nix {};
|
qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
|
||||||
qtscript = callPackage ./qtscript {};
|
qtscript = callPackage ../modules/qtscript.nix {};
|
||||||
qtsensors = callPackage ./qtsensors.nix {};
|
qtsensors = callPackage ../modules/qtsensors.nix {};
|
||||||
qtserialport = callPackage ./qtserialport {};
|
qtserialport = callPackage ../modules/qtserialport.nix {};
|
||||||
qtsvg = callPackage ./qtsvg.nix {};
|
qtsvg = callPackage ../modules/qtsvg.nix {};
|
||||||
qttools = callPackage ./qttools {};
|
qttools = callPackage ../modules/qttools.nix {};
|
||||||
qttranslations = callPackage ./qttranslations.nix {};
|
qttranslations = callPackage ../modules/qttranslations.nix {};
|
||||||
qtwayland = callPackage ./qtwayland.nix {};
|
qtwayland = callPackage ../modules/qtwayland.nix {};
|
||||||
qtwebchannel = callPackage ./qtwebchannel.nix {};
|
qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
|
||||||
qtwebengine = callPackage ./qtwebengine {};
|
qtwebengine = callPackage ../modules/qtwebengine.nix {};
|
||||||
qtwebkit = callPackage ./qtwebkit {};
|
qtwebkit = callPackage ../modules/qtwebkit.nix {};
|
||||||
qtwebsockets = callPackage ./qtwebsockets.nix {};
|
qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
|
||||||
qtx11extras = callPackage ./qtx11extras.nix {};
|
qtx11extras = callPackage ../modules/qtx11extras.nix {};
|
||||||
qtxmlpatterns = callPackage ./qtxmlpatterns.nix {};
|
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
|
||||||
|
|
||||||
env = callPackage ../qt-env.nix {};
|
env = callPackage ../qt-env.nix {};
|
||||||
full = env "qt-${qtbase.version}" ([
|
full = env "qt-${qtbase.version}" ([
|
||||||
|
@ -138,8 +110,12 @@ let
|
||||||
|
|
||||||
qmake = makeSetupHook {
|
qmake = makeSetupHook {
|
||||||
deps = [ self.qtbase.dev ];
|
deps = [ self.qtbase.dev ];
|
||||||
substitutions = { inherit (stdenv) isDarwin; };
|
substitutions = {
|
||||||
} ../qmake-hook.sh;
|
inherit (stdenv) isDarwin;
|
||||||
|
qtbase_dev = self.qtbase.dev;
|
||||||
|
fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
|
||||||
|
};
|
||||||
|
} ../hooks/qmake-hook.sh;
|
||||||
};
|
};
|
||||||
|
|
||||||
self = makeScope newScope addPackages;
|
self = makeScope newScope addPackages;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,359 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
||||||
@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
|
|
||||||
endif()
|
|
||||||
!!ENDIF
|
|
||||||
|
|
||||||
-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
|
|
||||||
-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
|
||||||
-!!ELSE
|
|
||||||
-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
|
|
||||||
-# Use original install prefix when loaded through a
|
|
||||||
-# cross-prefix symbolic link such as /lib -> /usr/lib.
|
|
||||||
-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
|
|
||||||
-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
|
|
||||||
-if(_realCurr STREQUAL _realOrig)
|
|
||||||
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
|
|
||||||
-else()
|
|
||||||
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
|
||||||
-endif()
|
|
||||||
-unset(_realOrig)
|
|
||||||
-unset(_realCurr)
|
|
||||||
-unset(_IMPORT_PREFIX)
|
|
||||||
-!!ENDIF
|
|
||||||
-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
|
||||||
-!!ELSE
|
|
||||||
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
|
||||||
-!!ENDIF
|
|
||||||
-
|
|
||||||
!!IF !equals(TEMPLATE, aux)
|
|
||||||
# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
|
|
||||||
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)")
|
|
||||||
@@ -59,7 +35,10 @@ macro(_populate_$${CMAKE_MODULE_NAME}_ta
|
|
||||||
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
||||||
+ set(imported_location \"@NIX_OUT@/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
||||||
+ if(NOT EXISTS \"${imported_location}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
||||||
+ endif()
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
||||||
!!ENDIF
|
|
||||||
@@ -74,19 +53,6 @@ macro(_populate_$${CMAKE_MODULE_NAME}_ta
|
|
||||||
\"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
|
|
||||||
)
|
|
||||||
|
|
||||||
-!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
|
|
||||||
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
||||||
-!!ELSE
|
|
||||||
- set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
||||||
-!!ENDIF
|
|
||||||
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
|
|
||||||
- if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
|
|
||||||
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
|
|
||||||
- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
|
|
||||||
- )
|
|
||||||
- endif()
|
|
||||||
-!!ENDIF
|
|
||||||
endmacro()
|
|
||||||
!!ENDIF
|
|
||||||
|
|
||||||
@@ -95,24 +61,24 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
|
|
||||||
!!IF !no_module_headers
|
|
||||||
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
|
|
||||||
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\"
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
|
|
||||||
+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\"
|
|
||||||
+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
|
|
||||||
)
|
|
||||||
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
|
||||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
|
||||||
+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
|
|
||||||
+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
|
||||||
)
|
|
||||||
!!ELSE
|
|
||||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
||||||
!!ENDIF
|
|
||||||
!!ELSE
|
|
||||||
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
|
||||||
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
|
|
||||||
+ set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"@NIX_DEV@/$$CMAKE_INCLUDE_DIR\" \"@NIX_DEV@/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
|
|
||||||
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
|
||||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
|
|
||||||
+ \"@NIX_DEV@/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
|
|
||||||
+ \"@NIX_DEV@/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
|
|
||||||
)
|
|
||||||
!!ELSE
|
|
||||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
||||||
@@ -281,7 +247,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
|
|
||||||
!!IF isEmpty(CMAKE_DEBUG_TYPE)
|
|
||||||
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
|
||||||
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
||||||
+ if (EXISTS \"@NIX_OUT@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
||||||
!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
||||||
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
||||||
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
||||||
@@ -289,13 +255,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
|
|
||||||
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
|
||||||
if (EXISTS
|
|
||||||
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
|
||||||
+ \"@NIX_OUT@/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
|
||||||
!!ELSE
|
|
||||||
\"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
|
||||||
!!ENDIF
|
|
||||||
AND EXISTS
|
|
||||||
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
||||||
+ \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
||||||
!!ELSE
|
|
||||||
\"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
||||||
!!ENDIF
|
|
||||||
@@ -318,7 +284,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
|
|
||||||
!!IF isEmpty(CMAKE_RELEASE_TYPE)
|
|
||||||
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
|
||||||
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
||||||
+ if (EXISTS \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
||||||
!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
||||||
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
||||||
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
||||||
@@ -326,13 +292,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
|
|
||||||
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
|
||||||
if (EXISTS
|
|
||||||
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
|
||||||
+ \"@NIX_OUT@/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
|
||||||
!!ELSE
|
|
||||||
\"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
|
||||||
!!ENDIF
|
|
||||||
AND EXISTS
|
|
||||||
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
||||||
+ \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
||||||
!!ELSE
|
|
||||||
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
||||||
!!ENDIF
|
|
||||||
@@ -354,11 +320,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
|
|
||||||
macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
|
|
||||||
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
||||||
|
|
||||||
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
|
||||||
-!!ELSE
|
|
||||||
- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
|
||||||
-!!ENDIF
|
|
||||||
+ set(imported_location \"${PLUGIN_LOCATION}\")
|
|
||||||
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
|
|
||||||
set_target_properties(Qt5::${Plugin} PROPERTIES
|
|
||||||
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
|
|
||||||
Index: qtbase-opensource-src-5.9.0/src/gui/Qt5GuiConfigExtras.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/gui/Qt5GuiConfigExtras.cmake.in
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
|
||||||
-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
|
||||||
+set(Qt5Gui_EGL_INCLUDE_DIRS \"@NIX_DEV@/$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
|
||||||
!!ELSE
|
|
||||||
set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
|
||||||
!!ENDIF
|
|
||||||
@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_propert
|
|
||||||
set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
||||||
+ set(imported_location \"@NIX_OUT@/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
||||||
!!ENDIF
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
||||||
+ set(imported_implib \"@NIX_DEV@/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
||||||
!!ENDIF
|
|
||||||
Index: qtbase-opensource-src-5.9.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
|
||||||
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic)
|
|
||||||
add_executable(Qt5::uic IMPORTED)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ENDIF
|
|
||||||
Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake)
|
|
||||||
add_executable(Qt5::qmake IMPORTED)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ENDIF
|
|
||||||
@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::moc)
|
|
||||||
add_executable(Qt5::moc IMPORTED)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ENDIF
|
|
||||||
@@ -35,7 +35,7 @@ if (NOT TARGET Qt5::rcc)
|
|
||||||
add_executable(Qt5::rcc IMPORTED)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ENDIF
|
|
||||||
@@ -133,7 +133,7 @@ if (NOT TARGET Qt5::WinMain)
|
|
||||||
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
|
|
||||||
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
|
||||||
!!ENDIF
|
|
||||||
@@ -147,7 +147,7 @@ if (NOT TARGET Qt5::WinMain)
|
|
||||||
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
|
||||||
!!ENDIF
|
|
||||||
Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE)
|
|
||||||
-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
||||||
+set(_qt5_corelib_extra_includes \"@NIX_DEV@/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
||||||
!!ELSE
|
|
||||||
set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
|
|
||||||
!!ENDIF
|
|
||||||
Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE)
|
|
||||||
-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
||||||
+set(_qt5_corelib_extra_includes \"@NIX_DEV@/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
||||||
!!ELSE
|
|
||||||
set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
|
|
||||||
!!ENDIF
|
|
||||||
Index: qtbase-opensource-src-5.9.0/src/dbus/Qt5DBusConfigExtras.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/dbus/Qt5DBusConfigExtras.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/dbus/Qt5DBusConfigExtras.cmake.in
|
|
||||||
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml)
|
|
||||||
add_executable(Qt5::qdbuscpp2xml IMPORTED)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ENDIF
|
|
||||||
@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp)
|
|
||||||
add_executable(Qt5::qdbusxml2cpp IMPORTED)
|
|
||||||
|
|
||||||
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ELSE
|
|
||||||
set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
|
||||||
!!ENDIF
|
|
||||||
Index: qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
|
||||||
+++ qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
|
||||||
@@ -2,10 +2,10 @@
|
|
||||||
add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
|
|
||||||
|
|
||||||
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
|
|
||||||
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
|
|
||||||
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_BIN@/$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
|
|
||||||
!!ENDIF
|
|
||||||
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
|
|
||||||
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
|
|
||||||
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_BIN@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
|
|
||||||
!!ENDIF
|
|
||||||
|
|
||||||
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
|
|
||||||
Index: qtbase-opensource-src-5.9.0/mkspecs/features/create_cmake.prf
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/mkspecs/features/create_cmake.prf
|
|
||||||
+++ qtbase-opensource-src-5.9.0/mkspecs/features/create_cmake.prf
|
|
||||||
@@ -136,28 +136,28 @@ contains(CONFIG, plugin) {
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
isEmpty(CMAKE_STATIC_TYPE) {
|
|
||||||
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
|
|
||||||
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.dll
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.dll
|
|
||||||
} else:mingw {
|
|
||||||
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a
|
|
||||||
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}.a
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}d.a
|
|
||||||
} else { # MSVC static
|
|
||||||
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib
|
|
||||||
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.lib
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.lib
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mac {
|
|
||||||
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
|
|
||||||
else: CMAKE_PlUGIN_EXT = .a
|
|
||||||
|
|
||||||
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
} else {
|
|
||||||
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .so
|
|
||||||
else: CMAKE_PlUGIN_EXT = .a
|
|
||||||
|
|
||||||
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
|
|
|
@ -1,18 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.9.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
|
||||||
@@ -265,12 +265,9 @@ void TableGenerator::initPossibleLocatio
|
|
||||||
m_possibleLocations.reserve(7);
|
|
||||||
if (qEnvironmentVariableIsSet("QTCOMPOSE"))
|
|
||||||
m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE")));
|
|
||||||
- m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale"));
|
|
||||||
- m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale"));
|
|
||||||
- m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale"));
|
|
||||||
- m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale"));
|
|
||||||
m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale"));
|
|
||||||
m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale"));
|
|
||||||
+ m_possibleLocations.append(QLatin1String(NIXPKGS_QTCOMPOSE));
|
|
||||||
}
|
|
||||||
|
|
||||||
QString TableGenerator::findComposeFile()
|
|
|
@ -1,36 +0,0 @@
|
||||||
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
|
||||||
index 341d3bc..3368234 100644
|
|
||||||
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
|
||||||
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
|
||||||
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
|
|
||||||
QMacAutoReleasePool pool;
|
|
||||||
userProfiles.clear();
|
|
||||||
|
|
||||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
|
||||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
|
||||||
for (NSString *ifName in wifiInterfaces) {
|
|
||||||
|
|
||||||
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
|
|
||||||
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
|
|
||||||
|
|
||||||
QMacAutoReleasePool pool;
|
|
||||||
|
|
||||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
|
||||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
|
||||||
for (NSString *ifName in wifiInterfaces) {
|
|
||||||
scanThread->interfaceName = QString::fromNSString(ifName);
|
|
||||||
scanThread->start();
|
|
||||||
QString TableGenerator::findComposeFile()
|
|
||||||
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
|
||||||
index 59b7637..b91139d 100644
|
|
||||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
|
||||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
|
||||||
@@ -320,7 +320,7 @@ static void qt_closePopups()
|
|
||||||
+ (void)applicationActivationChanged:(NSNotification*)notification
|
|
||||||
{
|
|
||||||
const id sender = self;
|
|
||||||
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
|
|
||||||
+ NSEnumerator *windowEnumerator = nullptr;
|
|
||||||
NSApplication *application = [NSApplication sharedApplication];
|
|
||||||
|
|
||||||
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
|
|
|
@ -1,3 +0,0 @@
|
||||||
mkspecs-common-mac.patch
|
|
||||||
mkspecs-features-mac.patch
|
|
||||||
darwin-cf.patch
|
|
|
@ -1,19 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
|
||||||
@@ -580,7 +580,14 @@ QFunctionPointer QGLXContext::getProcAdd
|
|
||||||
#if QT_CONFIG(library)
|
|
||||||
extern const QString qt_gl_library_name();
|
|
||||||
// QLibrary lib(qt_gl_library_name());
|
|
||||||
+ // Check system library paths first
|
|
||||||
QLibrary lib(QLatin1String("GL"));
|
|
||||||
+#ifdef NIXPKGS_MESA_GL
|
|
||||||
+ if (!lib.load()) {
|
|
||||||
+ // Fallback to Mesa driver
|
|
||||||
+ lib.setFileName(QLatin1String(NIXPKGS_MESA_GL));
|
|
||||||
+ }
|
|
||||||
+#endif // NIXPKGS_MESA_GL
|
|
||||||
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
|
|
||||||
#endif
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.5.1/src/widgets/styles/qgtk2painter.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.5.1.orig/src/widgets/styles/qgtk2painter.cpp
|
|
||||||
+++ qtbase-opensource-src-5.5.1/src/widgets/styles/qgtk2painter.cpp
|
|
||||||
@@ -96,7 +96,7 @@ static void initGtk()
|
|
||||||
static bool initialized = false;
|
|
||||||
if (!initialized) {
|
|
||||||
// enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
|
|
||||||
- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
|
|
||||||
+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0);
|
|
||||||
|
|
||||||
QGtk2PainterPrivate::gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new");
|
|
||||||
QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable");
|
|
||||||
Index: qtbase-opensource-src-5.5.1/src/widgets/styles/qgtkstyle_p.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.5.1.orig/src/widgets/styles/qgtkstyle_p.cpp
|
|
||||||
+++ qtbase-opensource-src-5.5.1/src/widgets/styles/qgtkstyle_p.cpp
|
|
||||||
@@ -327,7 +327,7 @@ void QGtkStylePrivate::gtkWidgetSetFocus
|
|
||||||
void QGtkStylePrivate::resolveGtk() const
|
|
||||||
{
|
|
||||||
// enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
|
|
||||||
- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
|
|
||||||
+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0);
|
|
||||||
|
|
||||||
gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
|
|
||||||
gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new");
|
|
||||||
@@ -425,8 +425,8 @@ void QGtkStylePrivate::resolveGtk() cons
|
|
||||||
pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family");
|
|
||||||
pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style");
|
|
||||||
|
|
||||||
- gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync");
|
|
||||||
- gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init");
|
|
||||||
+ gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("@libgnomeui@/lib/libgnomeui-2"), 0, "gnome_icon_lookup_sync");
|
|
||||||
+ gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("@gnome_vfs@/lib/libgnomevfs-2"), 0, "gnome_vfs_init");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* \internal
|
|
||||||
@@ -594,9 +594,9 @@ void QGtkStylePrivate::cleanupGtkWidgets
|
|
||||||
static bool resolveGConf()
|
|
||||||
{
|
|
||||||
if (!QGtkStylePrivate::gconf_client_get_default) {
|
|
||||||
- QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_default");
|
|
||||||
- QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_string");
|
|
||||||
- QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_bool");
|
|
||||||
+ QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_default");
|
|
||||||
+ QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_string");
|
|
||||||
+ QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_bool");
|
|
||||||
}
|
|
||||||
return (QGtkStylePrivate::gconf_client_get_default !=0);
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/qxcbcursor.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/plugins/platforms/xcb/qxcbcursor.cpp
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/qxcbcursor.cpp
|
|
||||||
@@ -311,10 +311,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *c
|
|
||||||
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
|
||||||
static bool function_ptrs_not_initialized = true;
|
|
||||||
if (function_ptrs_not_initialized) {
|
|
||||||
- QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
|
|
||||||
+ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1);
|
|
||||||
bool xcursorFound = xcursorLib.load();
|
|
||||||
if (!xcursorFound) { // try without the version number
|
|
||||||
- xcursorLib.setFileName(QLatin1String("Xcursor"));
|
|
||||||
+ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR));
|
|
||||||
xcursorFound = xcursorLib.load();
|
|
||||||
}
|
|
||||||
if (xcursorFound) {
|
|
|
@ -1,26 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.9.0/src/network/kernel/qdnslookup_unix.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/network/kernel/qdnslookup_unix.cpp
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/network/kernel/qdnslookup_unix.cpp
|
|
||||||
@@ -92,7 +92,7 @@ static bool resolveLibraryInternal()
|
|
||||||
if (!lib.load())
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
- lib.setFileName(QLatin1String("resolv"));
|
|
||||||
+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV));
|
|
||||||
if (!lib.load())
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Index: qtbase-opensource-src-5.9.0/src/network/kernel/qhostinfo_unix.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/network/kernel/qhostinfo_unix.cpp
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/network/kernel/qhostinfo_unix.cpp
|
|
||||||
@@ -102,7 +102,7 @@ static bool resolveLibraryInternal()
|
|
||||||
if (!lib.load())
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
- lib.setFileName(QLatin1String("resolv"));
|
|
||||||
+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV));
|
|
||||||
if (!lib.load())
|
|
||||||
return false;
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.9.0/src/corelib/kernel/qcoreapplication.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/corelib/kernel/qcoreapplication.cpp
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/corelib/kernel/qcoreapplication.cpp
|
|
||||||
@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPat
|
|
||||||
QStringList *app_libpaths = new QStringList;
|
|
||||||
coreappdata()->app_libpaths.reset(app_libpaths);
|
|
||||||
|
|
||||||
+ // Add library paths derived from PATH
|
|
||||||
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
|
|
||||||
+ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
|
|
||||||
+ for (const QString &path: paths) {
|
|
||||||
+ if (!path.isEmpty()) {
|
|
||||||
+ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
|
|
||||||
if (!libPathEnv.isEmpty()) {
|
|
||||||
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
|
|
|
@ -1,33 +0,0 @@
|
||||||
From 81494e67eccba04fc3fe554d76a9ca6fe7f2250e Mon Sep 17 00:00:00 2001
|
|
||||||
From: hasufell <hasufell@gentoo.org>
|
|
||||||
Date: Sat, 10 Oct 2015 01:15:01 +0200
|
|
||||||
Subject: [PATCH] Fix compilation with libressl
|
|
||||||
|
|
||||||
By additionally checking for defined(SSL_CTRL_SET_CURVES), which
|
|
||||||
is defined in openssl, but not in libressl.
|
|
||||||
---
|
|
||||||
src/network/ssl/qsslcontext_openssl.cpp | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
Index: qtbase-opensource-src-5.8.0/src/network/ssl/qsslcontext_openssl.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.8.0.orig/src/network/ssl/qsslcontext_openssl.cpp
|
|
||||||
+++ qtbase-opensource-src-5.8.0/src/network/ssl/qsslcontext_openssl.cpp
|
|
||||||
@@ -351,7 +351,7 @@ init_context:
|
|
||||||
|
|
||||||
const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
|
|
||||||
if (!qcurves.isEmpty()) {
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
|
|
||||||
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
|
|
||||||
// Set the curves to be used
|
|
||||||
if (q_SSLeay() >= 0x10002000L) {
|
|
||||||
// SSL_CTX_ctrl wants a non-const pointer as last argument,
|
|
||||||
@@ -364,7 +364,7 @@ init_context:
|
|
||||||
sslContext->errorCode = QSslError::UnspecifiedError;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
|
|
||||||
+#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
|
|
||||||
{
|
|
||||||
// specific curves requested, but not possible to set -> error
|
|
||||||
sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- qtbase-opensource-src-5.9.1.orig/mkspecs/common/mac.conf 2017-09-16 16:40:30.000000000 +0800
|
|
||||||
+++ qtbase-opensource-src-5.9.1/mkspecs/common/mac.conf 2017-09-16 16:41:27.000000000 +0800
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
|
|
||||||
QMAKE_FIX_RPATH = install_name_tool -id
|
|
||||||
|
|
||||||
-QMAKE_LFLAGS_RPATH = -Wl,-rpath,
|
|
||||||
+QMAKE_LFLAGS_RPATH =
|
|
||||||
QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip
|
|
||||||
|
|
||||||
QMAKE_LFLAGS_REL_RPATH =
|
|
|
@ -1,292 +0,0 @@
|
||||||
diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_post.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_post.prf
|
|
||||||
--- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_post.prf 2017-10-14 12:31:04.000000000 +0800
|
|
||||||
+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_post.prf 2017-10-14 12:42:02.000000000 +0800
|
|
||||||
@@ -24,166 +24,3 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
-# Add the same default rpaths as Xcode does for new projects.
|
|
||||||
-# This is especially important for iOS/tvOS/watchOS where no other option is possible.
|
|
||||||
-!no_default_rpath {
|
|
||||||
- QMAKE_RPATHDIR += @executable_path/Frameworks
|
|
||||||
- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-# Don't pass -headerpad_max_install_names when using Bitcode.
|
|
||||||
-# In that case the linker emits a warning stating that the flag is ignored when
|
|
||||||
-# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962).
|
|
||||||
-# Using this flag is also unnecessary in practice on UIKit platforms since they
|
|
||||||
-# are sandboxed, and only UIKit platforms support bitcode to begin with.
|
|
||||||
-!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD
|
|
||||||
-
|
|
||||||
-app_extension_api_only {
|
|
||||||
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
||||||
- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
||||||
- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
||||||
- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-macx-xcode {
|
|
||||||
- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
|
|
||||||
- debug_information_format.name = DEBUG_INFORMATION_FORMAT
|
|
||||||
- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT
|
|
||||||
- debug_information_format.build = debug
|
|
||||||
- QMAKE_MAC_XCODE_SETTINGS += debug_information_format
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- QMAKE_XCODE_ARCHS =
|
|
||||||
-
|
|
||||||
- arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
|
|
||||||
- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS
|
|
||||||
- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
|
|
||||||
- QMAKE_MAC_XCODE_SETTINGS += arch_device
|
|
||||||
-
|
|
||||||
- simulator {
|
|
||||||
- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]"
|
|
||||||
- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS
|
|
||||||
- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS
|
|
||||||
- QMAKE_MAC_XCODE_SETTINGS += arch_simulator
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- only_active_arch.name = ONLY_ACTIVE_ARCH
|
|
||||||
- only_active_arch.value = YES
|
|
||||||
- only_active_arch.build = debug
|
|
||||||
- QMAKE_MAC_XCODE_SETTINGS += only_active_arch
|
|
||||||
-} else {
|
|
||||||
- device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS
|
|
||||||
- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
|
|
||||||
- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
|
|
||||||
-
|
|
||||||
- isEmpty(VALID_ARCHS): \
|
|
||||||
- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
|
|
||||||
-
|
|
||||||
- single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
|
|
||||||
-
|
|
||||||
- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
|
|
||||||
- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
|
|
||||||
-
|
|
||||||
- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS
|
|
||||||
-
|
|
||||||
- arch_flags = $(EXPORT_ARCH_ARGS)
|
|
||||||
-
|
|
||||||
- QMAKE_CFLAGS += $$arch_flags
|
|
||||||
- QMAKE_CXXFLAGS += $$arch_flags
|
|
||||||
- QMAKE_LFLAGS += $$arch_flags
|
|
||||||
-
|
|
||||||
- QMAKE_PCH_ARCHS = $$VALID_ARCHS
|
|
||||||
-
|
|
||||||
- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
|
|
||||||
- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
|
|
||||||
- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET
|
|
||||||
- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
|
|
||||||
-
|
|
||||||
- # If we're doing a simulator and device build, device and simulator
|
|
||||||
- # architectures use different paths and flags for the sysroot and
|
|
||||||
- # deployment target switch, so we must multiplex them across multiple
|
|
||||||
- # architectures using -Xarch. Otherwise we fall back to the simple path.
|
|
||||||
- # This is not strictly necessary, but results in cleaner command lines
|
|
||||||
- # and makes it easier for people to override EXPORT_VALID_ARCHS to limit
|
|
||||||
- # individual rules to a different set of architecture(s) from the overall
|
|
||||||
- # build (such as machtest in QtCore).
|
|
||||||
- simulator:device {
|
|
||||||
- QMAKE_XARCH_CFLAGS =
|
|
||||||
- QMAKE_XARCH_LFLAGS =
|
|
||||||
- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
|
|
||||||
-
|
|
||||||
- for (arch, VALID_ARCHS) {
|
|
||||||
- contains(VALID_SIMULATOR_ARCHS, $$arch) {
|
|
||||||
- sdk = $$simulator.sdk
|
|
||||||
- version_identifier = $$simulator.deployment_identifier
|
|
||||||
- } else {
|
|
||||||
- sdk = $$device.sdk
|
|
||||||
- version_identifier = $$device.deployment_identifier
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- version_min_flags = \
|
|
||||||
- -Xarch_$${arch} \
|
|
||||||
- -m$${version_identifier}-version-min=$$deployment_target
|
|
||||||
- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \
|
|
||||||
- -Xarch_$${arch} \
|
|
||||||
- -isysroot$$xcodeSDKInfo(Path, $$sdk)
|
|
||||||
- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
|
|
||||||
- -Xarch_$${arch} \
|
|
||||||
- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk)
|
|
||||||
-
|
|
||||||
- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
|
|
||||||
- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
|
|
||||||
-
|
|
||||||
- QMAKE_EXTRA_VARIABLES += \
|
|
||||||
- QMAKE_XARCH_CFLAGS_$${arch} \
|
|
||||||
- QMAKE_XARCH_LFLAGS_$${arch}
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
|
|
||||||
- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
|
|
||||||
- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
|
|
||||||
- } else {
|
|
||||||
- simulator: \
|
|
||||||
- version_identifier = $$simulator.deployment_identifier
|
|
||||||
- else: \
|
|
||||||
- version_identifier = $$device.deployment_identifier
|
|
||||||
- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
|
|
||||||
- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
|
|
||||||
- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
|
|
||||||
- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- # Enable precompiled headers for multiple architectures
|
|
||||||
- QMAKE_CFLAGS_USE_PRECOMPILE =
|
|
||||||
- for (arch, VALID_ARCHS) {
|
|
||||||
- icc_pch_style: \
|
|
||||||
- use_flag = "-pch-use "
|
|
||||||
- else: \
|
|
||||||
- use_flag = -include
|
|
||||||
-
|
|
||||||
- # Only use Xarch with multi-arch, as the option confuses ccache
|
|
||||||
- count(VALID_ARCHS, 1, greaterThan): \
|
|
||||||
- QMAKE_CFLAGS_USE_PRECOMPILE += \
|
|
||||||
- -Xarch_$${arch}
|
|
||||||
-
|
|
||||||
- QMAKE_CFLAGS_USE_PRECOMPILE += \
|
|
||||||
- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}}
|
|
||||||
- }
|
|
||||||
- icc_pch_style {
|
|
||||||
- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT}
|
|
||||||
- QMAKE_CFLAGS_USE_PRECOMPILE =
|
|
||||||
- } else {
|
|
||||||
- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
||||||
- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
||||||
- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT}
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
|
|
||||||
-!isEmpty(QMAKE_XCODE_VERSION): \
|
|
||||||
- cache(QMAKE_XCODE_VERSION, stash)
|
|
||||||
-
|
|
||||||
-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
|
|
||||||
diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_pre.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_pre.prf
|
|
||||||
--- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_pre.prf 2017-10-14 12:31:04.000000000 +0800
|
|
||||||
+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_pre.prf 2017-10-14 12:42:02.000000000 +0800
|
|
||||||
@@ -1,56 +1,2 @@
|
|
||||||
CONFIG = asset_catalogs rez $$CONFIG
|
|
||||||
load(default_pre)
|
|
||||||
-
|
|
||||||
-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
|
|
||||||
- # Get path of Xcode's Developer directory
|
|
||||||
- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
|
|
||||||
- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
|
|
||||||
- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
|
|
||||||
-
|
|
||||||
- # Make sure Xcode path is valid
|
|
||||||
- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \
|
|
||||||
- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-isEmpty(QMAKE_XCODEBUILD_PATH): \
|
|
||||||
- QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")
|
|
||||||
-
|
|
||||||
-!isEmpty(QMAKE_XCODEBUILD_PATH) {
|
|
||||||
- # Make sure Xcode is set up properly
|
|
||||||
- !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \
|
|
||||||
- error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.")
|
|
||||||
-
|
|
||||||
- isEmpty(QMAKE_XCODE_VERSION) {
|
|
||||||
- # Extract Xcode version using xcodebuild
|
|
||||||
- xcode_version = $$system("/usr/bin/xcrun xcodebuild -version")
|
|
||||||
- QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
|
|
||||||
- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
|
|
||||||
- unset(xcode_version)
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
|
|
||||||
- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist
|
|
||||||
- exists($$QMAKE_XCODE_PREFERENCES_FILE): \
|
|
||||||
- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null")
|
|
||||||
-
|
|
||||||
- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \
|
|
||||||
- cache(QMAKE_TARGET_BUNDLE_PREFIX)
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon
|
|
||||||
-
|
|
||||||
-# Make the default debug info format for static debug builds
|
|
||||||
-# DWARF instead of DWARF with dSYM. This cuts down build times
|
|
||||||
-# for application debug builds significantly, as Xcode doesn't
|
|
||||||
-# have to pull out all the DWARF info from the Qt static libs
|
|
||||||
-# and put it into a dSYM file. We don't need that dSYM file in
|
|
||||||
-# the first place, since the information is available in the
|
|
||||||
-# object files inside the archives (static libraries).
|
|
||||||
-macx-xcode:qtConfig(static): \
|
|
||||||
- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf
|
|
||||||
-
|
|
||||||
-# This variable is used by the xcode_dynamic_library_suffix
|
|
||||||
-# feature, which allows Xcode to choose the Qt libraries to link to
|
|
||||||
-# at build time, depending on the current Xcode SDK and configuration.
|
|
||||||
-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
|
|
||||||
diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/sdk.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/sdk.prf
|
|
||||||
--- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/sdk.prf 2017-10-14 12:31:04.000000000 +0800
|
|
||||||
+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/sdk.prf 2017-10-14 12:42:10.000000000 +0800
|
|
||||||
@@ -1,58 +0,0 @@
|
|
||||||
-
|
|
||||||
-isEmpty(QMAKE_MAC_SDK): \
|
|
||||||
- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
|
|
||||||
-
|
|
||||||
-contains(QMAKE_MAC_SDK, .*/.*): \
|
|
||||||
- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)")
|
|
||||||
-
|
|
||||||
-defineReplace(xcodeSDKInfo) {
|
|
||||||
- info = $$1
|
|
||||||
- equals(info, "Path"): \
|
|
||||||
- info = --show-sdk-path
|
|
||||||
- equals(info, "PlatformPath"): \
|
|
||||||
- info = --show-sdk-platform-path
|
|
||||||
- equals(info, "SDKVersion"): \
|
|
||||||
- info = --show-sdk-version
|
|
||||||
- sdk = $$2
|
|
||||||
- isEmpty(sdk): \
|
|
||||||
- sdk = $$QMAKE_MAC_SDK
|
|
||||||
-
|
|
||||||
- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
|
|
||||||
- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null")
|
|
||||||
- # --show-sdk-platform-path won't work for Command Line Tools; this is fine
|
|
||||||
- # only used by the XCTest backend to testlib
|
|
||||||
- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \
|
|
||||||
- error("Could not resolve SDK $$info for \'$$sdk\'")
|
|
||||||
- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info}))
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
|
|
||||||
-QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
|
|
||||||
-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
|
|
||||||
-
|
|
||||||
-sysrootified =
|
|
||||||
-for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
|
|
||||||
-QMAKE_INCDIR_OPENGL = $$sysrootified
|
|
||||||
-
|
|
||||||
-QMAKESPEC_NAME = $$basename(QMAKESPEC)
|
|
||||||
-
|
|
||||||
-# Resolve SDK version of various tools
|
|
||||||
-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL)) {
|
|
||||||
- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
|
|
||||||
- !isEmpty($$tool_variable) {
|
|
||||||
- $$tool = $$eval($$tool_variable)
|
|
||||||
- next()
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- value = $$eval($$tool)
|
|
||||||
- isEmpty(value): next()
|
|
||||||
-
|
|
||||||
- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null")
|
|
||||||
- isEmpty(sysrooted): next()
|
|
||||||
-
|
|
||||||
- $$tool = $$sysrooted $$member(value, 1, -1)
|
|
||||||
- cache($$tool_variable, set stash, $$tool)
|
|
||||||
-}
|
|
|
@ -1,36 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.8.0.orig/src/plugins/platformthemes/gtk3/main.cpp
|
|
||||||
+++ qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp
|
|
||||||
@@ -39,6 +39,7 @@
|
|
||||||
|
|
||||||
#include <qpa/qplatformthemeplugin.h>
|
|
||||||
#include "qgtk3theme.h"
|
|
||||||
+#include <QFile>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
@@ -54,8 +55,22 @@ public:
|
|
||||||
QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList ¶ms)
|
|
||||||
{
|
|
||||||
Q_UNUSED(params);
|
|
||||||
- if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive))
|
|
||||||
+ if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) {
|
|
||||||
+
|
|
||||||
+#ifdef NIXPKGS_QGTK3_XDG_DATA_DIRS
|
|
||||||
+ QStringList XDG_DATA_DIRS = QFile::decodeName(qgetenv("XDG_DATA_DIRS")).split(':');
|
|
||||||
+ XDG_DATA_DIRS << QLatin1String(NIXPKGS_QGTK3_XDG_DATA_DIRS);
|
|
||||||
+ qputenv("XDG_DATA_DIRS", QFile::encodeName(XDG_DATA_DIRS.join(':')));
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifdef NIXPKGS_QGTK3_GIO_EXTRA_MODULES
|
|
||||||
+ QStringList GIO_EXTRA_MODULES = QFile::decodeName(qgetenv("GIO_EXTRA_MODULES")).split(':');
|
|
||||||
+ GIO_EXTRA_MODULES << QLatin1String(NIXPKGS_QGTK3_GIO_EXTRA_MODULES);
|
|
||||||
+ qputenv("GIO_EXTRA_MODULES", QFile::encodeName(GIO_EXTRA_MODULES.join(':')));
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
return new QGtk3Theme;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.8.0/src/network/socket/qnativesocketengine_unix.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.8.0.orig/src/network/socket/qnativesocketengine_unix.cpp
|
|
||||||
+++ qtbase-opensource-src-5.8.0/src/network/socket/qnativesocketengine_unix.cpp
|
|
||||||
@@ -979,7 +979,8 @@ qint64 QNativeSocketEnginePrivate::nativ
|
|
||||||
if (cmsgptr->cmsg_len == CMSG_LEN(sizeof(int))
|
|
||||||
&& ((cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_HOPLIMIT)
|
|
||||||
|| (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL))) {
|
|
||||||
- header->hopLimit = *reinterpret_cast<int *>(CMSG_DATA(cmsgptr));
|
|
||||||
+ int *ttl = reinterpret_cast<int *>(CMSG_DATA(cmsgptr));
|
|
||||||
+ header->hopLimit = *ttl;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef QT_NO_SCTP
|
|
|
@ -1,9 +0,0 @@
|
||||||
dlopen-resolv.patch
|
|
||||||
tzdir.patch
|
|
||||||
dlopen-libXcursor.patch
|
|
||||||
library-paths.patch
|
|
||||||
libressl.patch
|
|
||||||
dlopen-gl.patch
|
|
||||||
compose-search-path.patch
|
|
||||||
cmake-paths.patch
|
|
||||||
qgtk-env.patch
|
|
|
@ -1,39 +0,0 @@
|
||||||
Index: qtbase-opensource-src-5.9.0/src/corelib/tools/qtimezoneprivate_tz.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtbase-opensource-src-5.9.0.orig/src/corelib/tools/qtimezoneprivate_tz.cpp
|
|
||||||
+++ qtbase-opensource-src-5.9.0/src/corelib/tools/qtimezoneprivate_tz.cpp
|
|
||||||
@@ -70,7 +70,11 @@ typedef QHash<QByteArray, QTzTimeZone> Q
|
|
||||||
// Parse zone.tab table, assume lists all installed zones, if not will need to read directories
|
|
||||||
static QTzTimeZoneHash loadTzTimeZones()
|
|
||||||
{
|
|
||||||
- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
|
|
||||||
+ // Try TZDIR first, in case we're running on NixOS.
|
|
||||||
+ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab");
|
|
||||||
+ // Fallback to traditional paths in case we are not on NixOS.
|
|
||||||
+ if (!QFile::exists(path))
|
|
||||||
+ path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
|
|
||||||
if (!QFile::exists(path))
|
|
||||||
path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
|
|
||||||
|
|
||||||
@@ -643,12 +647,16 @@ void QTzTimeZonePrivate::init(const QByt
|
|
||||||
if (!tzif.open(QIODevice::ReadOnly))
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
- // Open named tz, try modern path first, if fails try legacy path
|
|
||||||
- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
||||||
+ // Try TZDIR first, in case we're running on NixOS
|
|
||||||
+ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId));
|
|
||||||
if (!tzif.open(QIODevice::ReadOnly)) {
|
|
||||||
- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
||||||
- if (!tzif.open(QIODevice::ReadOnly))
|
|
||||||
- return;
|
|
||||||
+ // Open named tz, try modern path first, if fails try legacy path
|
|
||||||
+ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
||||||
+ if (!tzif.open(QIODevice::ReadOnly)) {
|
|
||||||
+ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
||||||
+ if (!tzif.open(QIODevice::ReadOnly))
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ qtSubmodule, qtbase, qtdeclarative }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtcharts";
|
|
||||||
qtInputs = [ qtbase qtdeclarative ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ qtSubmodule, qtbase, qtdeclarative }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtconnectivity";
|
|
||||||
qtInputs = [ qtbase qtdeclarative ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
|
||||||
|
index ee5b38717..bbccef8c4 100644
|
||||||
|
--- a/src/qml/qml/qqmlimport.cpp
|
||||||
|
+++ b/src/qml/qml/qqmlimport.cpp
|
||||||
|
@@ -1678,6 +1678,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
||||||
|
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
||||||
|
addImportPath(installImportsPath);
|
||||||
|
|
||||||
|
+ // Add import paths derived from PATH
|
||||||
|
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
|
||||||
|
+ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX);
|
||||||
|
+ for (const QString &path: paths) {
|
||||||
|
+ if (!path.isEmpty()) {
|
||||||
|
+ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// env import paths
|
||||||
|
if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) {
|
||||||
|
const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
|
||||||
|
diff --git a/tools/qmlcachegen/qmlcache.prf b/tools/qmlcachegen/qmlcache.prf
|
||||||
|
index 330da358b..cdf570205 100644
|
||||||
|
--- a/tools/qmlcachegen/qmlcache.prf
|
||||||
|
+++ b/tools/qmlcachegen/qmlcache.prf
|
||||||
|
@@ -44,7 +44,7 @@ defineReplace(qmlCacheOutputFileName) {
|
||||||
|
}
|
||||||
|
|
||||||
|
qmlcacheinst.base = $$QMLCACHE_DESTDIR
|
||||||
|
-qmlcacheinst.path = $$[QT_INSTALL_QML]/$$TARGETPATH
|
||||||
|
+qmlcacheinst.path = $$NIX_OUTPUT_QML/$$TARGETPATH
|
||||||
|
qmlcacheinst.CONFIG = no_check_exist
|
||||||
|
|
||||||
|
qmlcachegen.input = CACHEGEN_FILES
|
|
@ -1,20 +0,0 @@
|
||||||
{ stdenv, qtSubmodule, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }:
|
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtdeclarative";
|
|
||||||
patches = copyPathsToStore (readPathsFromFile ./. ./series);
|
|
||||||
qtInputs = [ qtbase qtsvg qtxmlpatterns ];
|
|
||||||
nativeBuildInputs = [ python2 ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\""
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtPluginPrefix" "$bin"
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
import-paths.patch
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ qtSubmodule, qtbase, qtmultimedia }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtlocation";
|
|
||||||
qtInputs = [ qtbase qtmultimedia ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtPluginPrefix" "$bin"
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
# Linking with -lclipper fails with parallel build enabled
|
|
||||||
enableParallelBuilding = false;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ qtSubmodule, qtdeclarative }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtquickcontrols2";
|
|
||||||
qtInputs = [ qtdeclarative ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
|
||||||
|
index 1f6d25e..087c3fb 100644
|
||||||
|
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
|
||||||
|
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
|
||||||
|
@@ -81,7 +81,7 @@
|
||||||
|
#include <pthread.h>
|
||||||
|
#elif PLATFORM(GTK)
|
||||||
|
#include <wtf/gtk/GOwnPtr.h>
|
||||||
|
-typedef struct _GMutex GMutex;
|
||||||
|
+typedef union _GMutex GMutex;
|
||||||
|
typedef struct _GCond GCond;
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ qtSubmodule, qtbase, qttools }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtscript";
|
|
||||||
qtInputs = [ qtbase qttools ];
|
|
||||||
patches = [ ./0001-glib-2.32.patch ];
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ stdenv, qtSubmodule, qtbase, qtdeclarative }:
|
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtsensors";
|
|
||||||
qtInputs = [ qtbase qtdeclarative ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtPluginPrefix" "$bin"
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h
|
||||||
|
index af2dab2..8e17f64 100644
|
||||||
|
--- a/src/serialport/qtudev_p.h
|
||||||
|
+++ b/src/serialport/qtudev_p.h
|
||||||
|
@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN
|
||||||
|
inline bool resolveSymbols(QLibrary *udevLibrary)
|
||||||
|
{
|
||||||
|
if (!udevLibrary->isLoaded()) {
|
||||||
|
+#ifdef NIXPKGS_LIBUDEV
|
||||||
|
+ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1);
|
||||||
|
+#else
|
||||||
|
udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1);
|
||||||
|
+#endif
|
||||||
|
if (!udevLibrary->load()) {
|
||||||
|
+#ifdef NIXPKGS_LIBUDEV
|
||||||
|
+ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0);
|
||||||
|
+#else
|
||||||
|
udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!udevLibrary->load()) {
|
||||||
|
qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0);
|
||||||
|
return false;
|
|
@ -1 +0,0 @@
|
||||||
qtserialport-dlopen-udev.patch
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ qtSubmodule, qtbase }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtsvg";
|
|
||||||
qtInputs = [ qtbase ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtPluginPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
diff --git a/src/assistant/help/Qt5HelpConfigExtras.cmake.in b/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
||||||
|
index 3b97923a..63336bd5 100644
|
||||||
|
--- a/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
||||||
|
+++ b/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
||||||
|
@@ -2,11 +2,10 @@
|
||||||
|
if (NOT TARGET Qt5::qcollectiongenerator)
|
||||||
|
add_executable(Qt5::qcollectiongenerator IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
+ if(NOT EXISTS \"${imported_location}\")
|
||||||
|
+ set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
+ endif()
|
||||||
|
_qt5_Help_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::qcollectiongenerator PROPERTIES
|
||||||
|
@@ -17,11 +16,7 @@ endif()
|
||||||
|
if (NOT TARGET Qt5::qhelpgenerator)
|
||||||
|
add_executable(Qt5::qhelpgenerator IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_Help_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::qhelpgenerator PROPERTIES
|
||||||
|
diff --git a/src/linguist/Qt5LinguistToolsConfig.cmake.in b/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
index 4318b16f..d60db4ff 100644
|
||||||
|
--- a/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
+++ b/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
@@ -44,11 +44,7 @@ endmacro()
|
||||||
|
if (NOT TARGET Qt5::lrelease)
|
||||||
|
add_executable(Qt5::lrelease IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_LinguistTools_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::lrelease PROPERTIES
|
||||||
|
@@ -59,11 +55,7 @@ endif()
|
||||||
|
if (NOT TARGET Qt5::lupdate)
|
||||||
|
add_executable(Qt5::lupdate IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_LinguistTools_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::lupdate PROPERTIES
|
||||||
|
@@ -74,11 +66,7 @@ endif()
|
||||||
|
if (NOT TARGET Qt5::lconvert)
|
||||||
|
add_executable(Qt5::lconvert IMPORTED)
|
||||||
|
|
||||||
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
||||||
|
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ELSE
|
||||||
|
set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
||||||
|
-!!ENDIF
|
||||||
|
_qt5_LinguistTools_check_file_exists(${imported_location})
|
||||||
|
|
||||||
|
set_target_properties(Qt5::lconvert PROPERTIES
|
|
@ -1,88 +0,0 @@
|
||||||
Index: qttools-opensource-src-5.8.0/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qttools-opensource-src-5.8.0.orig/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
|
||||||
+++ qttools-opensource-src-5.8.0/src/assistant/help/Qt5HelpConfigExtras.cmake.in
|
|
||||||
@@ -2,11 +2,10 @@
|
|
||||||
if (NOT TARGET Qt5::qcollectiongenerator)
|
|
||||||
add_executable(Qt5::qcollectiongenerator IMPORTED)
|
|
||||||
|
|
||||||
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ELSE
|
|
||||||
- set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ENDIF
|
|
||||||
+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ if(NOT EXISTS \"${imported_location}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ endif()
|
|
||||||
_qt5_Help_check_file_exists(${imported_location})
|
|
||||||
|
|
||||||
set_target_properties(Qt5::qcollectiongenerator PROPERTIES
|
|
||||||
@@ -17,11 +16,10 @@ endif()
|
|
||||||
if (NOT TARGET Qt5::qhelpgenerator)
|
|
||||||
add_executable(Qt5::qhelpgenerator IMPORTED)
|
|
||||||
|
|
||||||
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ELSE
|
|
||||||
- set(imported_location \"$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ENDIF
|
|
||||||
+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ if(NOT EXISTS \"${imported_location}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ endif()
|
|
||||||
_qt5_Help_check_file_exists(${imported_location})
|
|
||||||
|
|
||||||
set_target_properties(Qt5::qhelpgenerator PROPERTIES
|
|
||||||
Index: qttools-opensource-src-5.8.0/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
|
||||||
===================================================================
|
|
||||||
--- qttools-opensource-src-5.8.0.orig/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
|
||||||
+++ qttools-opensource-src-5.8.0/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
|
||||||
@@ -44,11 +44,10 @@ endmacro()
|
|
||||||
if (NOT TARGET Qt5::lrelease)
|
|
||||||
add_executable(Qt5::lrelease IMPORTED)
|
|
||||||
|
|
||||||
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ELSE
|
|
||||||
- set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ENDIF
|
|
||||||
+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ if(NOT EXISTS \"${imported_location}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ endif()
|
|
||||||
_qt5_LinguistTools_check_file_exists(${imported_location})
|
|
||||||
|
|
||||||
set_target_properties(Qt5::lrelease PROPERTIES
|
|
||||||
@@ -59,11 +58,10 @@ endif()
|
|
||||||
if (NOT TARGET Qt5::lupdate)
|
|
||||||
add_executable(Qt5::lupdate IMPORTED)
|
|
||||||
|
|
||||||
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ELSE
|
|
||||||
- set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ENDIF
|
|
||||||
+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ if(NOT EXISTS \"${imported_location}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ endif()
|
|
||||||
_qt5_LinguistTools_check_file_exists(${imported_location})
|
|
||||||
|
|
||||||
set_target_properties(Qt5::lupdate PROPERTIES
|
|
||||||
@@ -74,11 +72,10 @@ endif()
|
|
||||||
if (NOT TARGET Qt5::lconvert)
|
|
||||||
add_executable(Qt5::lconvert IMPORTED)
|
|
||||||
|
|
||||||
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
||||||
- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ELSE
|
|
||||||
- set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
|
||||||
-!!ENDIF
|
|
||||||
+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ if(NOT EXISTS \"${imported_location}\")
|
|
||||||
+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
|
|
||||||
+ endif()
|
|
||||||
_qt5_LinguistTools_check_file_exists(${imported_location})
|
|
||||||
|
|
||||||
set_target_properties(Qt5::lconvert PROPERTIES
|
|
|
@ -1,16 +0,0 @@
|
||||||
{ stdenv, qtSubmodule, copyPathsToStore, qtbase }:
|
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qttools";
|
|
||||||
qtInputs = [ qtbase ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
patches = copyPathsToStore (readPathsFromFile ./. ./series);
|
|
||||||
# qmake moves all binaries to $dev in preFixup
|
|
||||||
postFixup = ''
|
|
||||||
moveToOutput "bin/qdbus" "$bin"
|
|
||||||
moveToOutput "bin/qdbusviewer" "$bin"
|
|
||||||
moveToOutput "bin/qtpaths" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
cmake-paths.patch
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ qtSubmodule, qtbase, qtquickcontrols, wayland, pkgconfig }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtwayland";
|
|
||||||
qtInputs = [ qtbase qtquickcontrols ];
|
|
||||||
buildInputs = [ wayland ];
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtPluginPrefix" "$bin"
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ qtSubmodule, qtbase, qtdeclarative }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtwebchannel";
|
|
||||||
qtInputs = [ qtbase qtdeclarative ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
|
||||||
|
index 69e4cd1f3..3f729a75e 100644
|
||||||
|
--- a/Source/WTF/WTF.pri
|
||||||
|
+++ b/Source/WTF/WTF.pri
|
||||||
|
@@ -12,7 +12,7 @@ mac {
|
||||||
|
# Mac OS does ship libicu but not the associated header files.
|
||||||
|
# Therefore WebKit provides adequate header files.
|
||||||
|
INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
|
||||||
|
- LIBS += -licucore
|
||||||
|
+ LIBS += /usr/lib/libicucore.dylib
|
||||||
|
} else:!use?(wchar_unicode): {
|
||||||
|
win32 {
|
||||||
|
CONFIG(static, static|shared) {
|
||||||
|
diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
index a923d49aa..46772a4bb 100644
|
||||||
|
--- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
+++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* module = 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef NIXPKGS_LIBGTK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (library.load()) {
|
||||||
|
typedef void *(*gtk_init_check_ptr)(int*, char***);
|
||||||
|
gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
|
||||||
|
diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
index de06a2fea..86fe39ef1 100644
|
||||||
|
--- a/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
+++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
@@ -697,7 +697,11 @@ static Display *getPluginDisplay()
|
||||||
|
// support gdk based plugins (like flash) that use a different X connection.
|
||||||
|
// The code below has the same effect as this one:
|
||||||
|
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
|
||||||
|
+#ifdef NIXPKGS_LIBGDK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!library.load())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
index 8de65216b..38f5c05e5 100644
|
||||||
|
--- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
+++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr
|
||||||
|
|
||||||
|
static bool initializeGtk()
|
||||||
|
{
|
||||||
|
+#ifdef NIXPKGS_LIBGTK2
|
||||||
|
+ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!gtkLibrary.load())
|
||||||
|
return false;
|
||||||
|
typedef void* (*gtk_init_ptr)(void*, void*);
|
||||||
|
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
index d734ff684..0f6ff63d1 100644
|
||||||
|
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
@@ -64,7 +64,11 @@ static Display* getPluginDisplay()
|
||||||
|
// The code below has the same effect as this one:
|
||||||
|
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
|
||||||
|
|
||||||
|
+#ifdef NIXPKGS_LIBGDK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!library.load())
|
||||||
|
return 0;
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
|
||||||
+++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
|
||||||
@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* modu
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifdef NIXPKGS_LIBGTK2
|
|
||||||
+ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
|
||||||
+#else
|
|
||||||
QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
|
|
||||||
+#endif
|
|
||||||
if (library.load()) {
|
|
||||||
typedef void *(*gtk_init_check_ptr)(int*, char***);
|
|
||||||
gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
|
|
||||||
Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
|
||||||
+++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
|
||||||
@@ -697,7 +697,11 @@ static Display *getPluginDisplay()
|
|
||||||
// support gdk based plugins (like flash) that use a different X connection.
|
|
||||||
// The code below has the same effect as this one:
|
|
||||||
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
|
|
||||||
+#ifdef NIXPKGS_LIBGDK2
|
|
||||||
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
|
||||||
+#else
|
|
||||||
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
|
||||||
+#endif
|
|
||||||
if (!library.load())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
|
||||||
+++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
|
||||||
@@ -64,7 +64,11 @@ static Display* getPluginDisplay()
|
|
||||||
// The code below has the same effect as this one:
|
|
||||||
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
|
|
||||||
|
|
||||||
+#ifdef NIXPKGS_LIBGDK2
|
|
||||||
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
|
||||||
+#else
|
|
||||||
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
|
||||||
+#endif
|
|
||||||
if (!library.load())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
|
||||||
===================================================================
|
|
||||||
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
|
||||||
+++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
|
||||||
@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType typ
|
|
||||||
|
|
||||||
static bool initializeGtk()
|
|
||||||
{
|
|
||||||
+#ifdef NIXPKGS_LIBGTK2
|
|
||||||
+ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
|
||||||
+#else
|
|
||||||
QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
|
|
||||||
+#endif
|
|
||||||
if (!gtkLibrary.load())
|
|
||||||
return false;
|
|
||||||
typedef void* (*gtk_init_ptr)(void*, void*);
|
|
|
@ -1,13 +0,0 @@
|
||||||
Index: qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri
|
|
||||||
===================================================================
|
|
||||||
--- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri
|
|
||||||
+++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri
|
|
||||||
@@ -12,7 +12,7 @@ mac {
|
|
||||||
# Mac OS does ship libicu but not the associated header files.
|
|
||||||
# Therefore WebKit provides adequate header files.
|
|
||||||
INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
|
|
||||||
- LIBS += -licucore
|
|
||||||
+ LIBS += /usr/lib/libicucore.dylib
|
|
||||||
} else:!use?(wchar_unicode): {
|
|
||||||
win32 {
|
|
||||||
CONFIG(static, static|shared) {
|
|
|
@ -1,3 +0,0 @@
|
||||||
qtwebkit-dlopen-gtk.patch
|
|
||||||
qtwebkit-dlopen-udev.patch
|
|
||||||
qtwebkit-icucore-darwin.patch
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ qtSubmodule, qtbase, qtdeclarative }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtwebsockets";
|
|
||||||
qtInputs = [ qtbase qtdeclarative ];
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ qtSubmodule, qtbase }:
|
|
||||||
|
|
||||||
qtSubmodule {
|
|
||||||
name = "qtxmlpatterns";
|
|
||||||
qtInputs = [ qtbase ];
|
|
||||||
}
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
# fixQtBuiltinPaths
|
||||||
|
#
|
||||||
|
# Usage: fixQtBuiltinPaths _dir_ _pattern_
|
||||||
|
#
|
||||||
|
# Fix Qt builtin paths in files matching _pattern_ under _dir_.
|
||||||
|
#
|
||||||
|
fixQtBuiltinPaths() {
|
||||||
|
local dir="$1"
|
||||||
|
local pattern="$2"
|
||||||
|
local bin="${!outputBin}"
|
||||||
|
local dev="${!outputDev}"
|
||||||
|
local doc="${!outputDoc}"
|
||||||
|
local lib="${!outputLib}"
|
||||||
|
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
find "$dir" -name "$pattern" | while read pr_; do
|
||||||
|
if grep -q '\$\$\[QT_' "${pr_:?}"; then
|
||||||
|
echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${pr_:?}'..."
|
||||||
|
sed -i "${pr_:?}" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
elif [ -e "$dir" ]; then
|
||||||
|
if grep -q '\$\$\[QT_' "${dir:?}"; then
|
||||||
|
echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${dir:?}'..."
|
||||||
|
sed -i "${dir:?}" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
|
||||||
|
-e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist"
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
# fixQtModulePaths
|
||||||
|
#
|
||||||
|
# Usage: fixQtModulePaths _dir_
|
||||||
|
#
|
||||||
|
# Find Qt module definitions in directory _dir_ and patch the module paths.
|
||||||
|
#
|
||||||
|
fixQtModulePaths () {
|
||||||
|
local dir="$1"
|
||||||
|
local bin="${!outputBin}"
|
||||||
|
local dev="${!outputDev}"
|
||||||
|
local lib="${!outputLib}"
|
||||||
|
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
find "$dir" -name 'qt_*.pri' | while read pr; do
|
||||||
|
if grep -q '\$\$QT_MODULE_' "${pr:?}"; then
|
||||||
|
echo "fixQtModulePaths: Fixing module paths in \`${pr:?}'..."
|
||||||
|
sed -i "${pr:?}" \
|
||||||
|
-e "s|\\\$\\\$QT_MODULE_LIB_BASE|$dev/lib|g" \
|
||||||
|
-e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$dev/lib|g" \
|
||||||
|
-e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$dev/include|g" \
|
||||||
|
-e "s|\\\$\\\$QT_MODULE_BIN_BASE|$dev/bin|g"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
elif [ -e "$dir" ]; then
|
||||||
|
echo "fixQtModulePaths: Warning: \`$dir' is not a directory"
|
||||||
|
else
|
||||||
|
echo "fixQtModulePaths: Warning: \`$dir' does not exist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "z$dev" != "z$lib" ]; then
|
||||||
|
if [ -d "$lib/lib" ]; then
|
||||||
|
mkdir -p "$dev/lib"
|
||||||
|
lndir -silent "$lib/lib" "$dev/lib"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "z$bin" != "z$dev" ]; then
|
||||||
|
if [ -d "$bin/bin" ]; then
|
||||||
|
mkdir -p "$dev/bin"
|
||||||
|
lndir -silent "$bin/bin" "$dev/bin"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
# fixQtStaticLibs
|
||||||
|
#
|
||||||
|
# Usage: fixQtStaticLibs _lib_ _dev_
|
||||||
|
#
|
||||||
|
# Find static Qt libraries in output _lib_ and move them to the corresponding
|
||||||
|
# path in output _dev_. Any QMake library definitions (*.prl files) are also
|
||||||
|
# moved and library paths are patched.
|
||||||
|
#
|
||||||
|
fixQtStaticLibs() {
|
||||||
|
local lib="$1"
|
||||||
|
local dev="$2"
|
||||||
|
|
||||||
|
pushd "$lib"
|
||||||
|
if [ -d "lib" ]; then
|
||||||
|
find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \
|
||||||
|
while read -r -d $'\0' file; do
|
||||||
|
mkdir -p "$dev/$(dirname "$file")"
|
||||||
|
mv "$lib/$file" "$dev/$file"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
|
||||||
|
if [ -d "$dev" ]; then
|
||||||
|
find "$dev" -name '*.prl' | while read prl; do
|
||||||
|
echo "fixQtStaticLibs: Fixing built-in paths in \`$prl'..."
|
||||||
|
sed -i "$prl" \
|
||||||
|
-e '/^QMAKE_PRL_BUILD_DIR =/d' \
|
||||||
|
-e '/^QMAKE_PRO_INPUT =/d' \
|
||||||
|
-e "s|-L\\\$\\\$NIX_OUTPUT_OUT/lib|-L$lib/lib -L$dev/lib|g"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
updateToolPath() {
|
||||||
|
local tool="$1"
|
||||||
|
local target="$2"
|
||||||
|
local original="${!outputBin}/$tool"
|
||||||
|
local actual="${!outputDev}/$tool"
|
||||||
|
if grep -q "$original" "$target"; then
|
||||||
|
echo "updateToolPath: Updating \`$original' in \`$target\'..."
|
||||||
|
sed -i "$target" -e "s|$original|$actual|"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
moveQtDevTools() {
|
||||||
|
if [ -n "$devTools" ]; then
|
||||||
|
for tool in $devTools; do
|
||||||
|
moveToOutput "$tool" "${!outputDev}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -d "${!outputDev}/mkspecs" ]; then
|
||||||
|
find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do
|
||||||
|
for tool in $devTools; do
|
||||||
|
updateToolPath "$tool" "$pr_"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "${!outputDev}/lib/cmake" ]; then
|
||||||
|
find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do
|
||||||
|
for tool in $devTools; do
|
||||||
|
updateToolPath "$tool" "$cmake"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
qmakeConfigurePhase() {
|
||||||
|
runHook preConfigure
|
||||||
|
|
||||||
|
qmake PREFIX=$out \
|
||||||
|
NIX_OUTPUT_OUT=$out \
|
||||||
|
NIX_OUTPUT_DEV=${!outputDev} \
|
||||||
|
NIX_OUTPUT_BIN=${!outputBin} \
|
||||||
|
NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?} \
|
||||||
|
NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?} \
|
||||||
|
NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?} \
|
||||||
|
$qmakeFlags
|
||||||
|
|
||||||
|
runHook postConfigure
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
|
||||||
|
configurePhase=qmakeConfigurePhase
|
||||||
|
fi
|
|
@ -0,0 +1,87 @@
|
||||||
|
qtPluginPrefix=@qtPluginPrefix@
|
||||||
|
qtQmlPrefix=@qtQmlPrefix@
|
||||||
|
qtDocPrefix=@qtDocPrefix@
|
||||||
|
|
||||||
|
. @fix_qt_builtin_paths@
|
||||||
|
. @fix_qt_module_paths@
|
||||||
|
. @fix_qt_static_libs@
|
||||||
|
|
||||||
|
providesQtRuntime() {
|
||||||
|
[ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build tools are often confused if QMAKE is unset.
|
||||||
|
QMAKE=@dev@/bin/qmake
|
||||||
|
export QMAKE
|
||||||
|
|
||||||
|
QMAKEPATH=
|
||||||
|
export QMAKEPATH
|
||||||
|
|
||||||
|
QMAKEMODULES=
|
||||||
|
export QMAKEMODULES
|
||||||
|
|
||||||
|
addToQMAKEPATH() {
|
||||||
|
if [ -d "$1/mkspecs" ]; then
|
||||||
|
QMAKEMODULES="${QMAKEMODULES}${QMAKEMODULES:+:}/mkspecs"
|
||||||
|
QMAKEPATH="${QMAKEPATH}${QMAKEPATH:+:}$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Propagate any runtime dependency of the building package.
|
||||||
|
# Each dependency is propagated to the user environment and as a build
|
||||||
|
# input so that it will be re-propagated to the user environment by any
|
||||||
|
# package depending on the building package. (This is necessary in case
|
||||||
|
# the building package does not provide runtime dependencies itself and so
|
||||||
|
# would not be propagated to the user environment.)
|
||||||
|
qtCrossEnvHook() {
|
||||||
|
addToQMAKEPATH "$1"
|
||||||
|
if providesQtRuntime "$1"; then
|
||||||
|
if [ "z${!outputBin}" != "z${!outputDev}" ]; then
|
||||||
|
propagatedBuildInputs+=" $1"
|
||||||
|
fi
|
||||||
|
propagatedUserEnvPkgs+=" $1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
crossEnvHooks+=(qtCrossEnvHook)
|
||||||
|
|
||||||
|
qtEnvHook() {
|
||||||
|
addToQMAKEPATH "$1"
|
||||||
|
if providesQtRuntime "$1"; then
|
||||||
|
if [ "z${!outputBin}" != "z${!outputDev}" ]; then
|
||||||
|
propagatedNativeBuildInputs+=" $1"
|
||||||
|
fi
|
||||||
|
if [ -z "$crossConfig" ]; then
|
||||||
|
propagatedUserEnvPkgs+=" $1"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
envHooks+=(qtEnvHook)
|
||||||
|
|
||||||
|
postPatchMkspecs() {
|
||||||
|
local bin="${!outputBin}"
|
||||||
|
local dev="${!outputDev}"
|
||||||
|
local doc="${!outputDoc}"
|
||||||
|
local lib="${!outputLib}"
|
||||||
|
|
||||||
|
moveToOutput "mkspecs" "$dev"
|
||||||
|
|
||||||
|
if [ -d "$dev/mkspecs/modules" ]; then
|
||||||
|
fixQtModulePaths "$dev/mkspecs/modules"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$dev/mkspecs" ]; then
|
||||||
|
fixQtBuiltinPaths "$dev/mkspecs" '*.pr?'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
if [ -z "$dontPatchMkspecs" ]; then
|
||||||
|
postPhases="${postPhases}${postPhases:+ }postPatchMkspecs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
postMoveQtStaticLibs() {
|
||||||
|
if [ "z${!outputLib}" != "z${!outputDev}" ]; then
|
||||||
|
fixQtStaticLibs "${!outputLib}" "${!outputDev}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
if [ -z "$dontMoveQtStaticLibs" ]; then
|
||||||
|
postPhases="${postPhases}${postPhases:+ }postMoveQtStaticLibs"
|
||||||
|
fi
|
|
@ -0,0 +1 @@
|
||||||
|
qmakeFlags="$qmakeFlags${qmakeFlags:+ }QMAKE_LRELEASE=@dev@/bin/lrelease"
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ stdenv, lib }:
|
||||||
|
|
||||||
|
let inherit (lib) optional; in
|
||||||
|
|
||||||
|
{ debug }:
|
||||||
|
|
||||||
|
args:
|
||||||
|
|
||||||
|
let
|
||||||
|
args_ = {
|
||||||
|
|
||||||
|
qmakeFlags =
|
||||||
|
(args.qmakeFlags or [])
|
||||||
|
++ optional (debug != null)
|
||||||
|
(if debug then "CONFIG+=debug" else "CONFIG+=release");
|
||||||
|
|
||||||
|
cmakeFlags =
|
||||||
|
(args.cmakeFlags or [])
|
||||||
|
++ [ "-DBUILD_TESTING=OFF" ]
|
||||||
|
++ optional (debug != null)
|
||||||
|
(if debug then "-DCMAKE_BUILD_TYPE=Debug"
|
||||||
|
else "-DCMAKE_BUILD_TYPE=Release");
|
||||||
|
|
||||||
|
enableParallelBuilding = args.enableParallelBuilding or false;
|
||||||
|
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation (args // args_)
|
|
@ -1,20 +1,21 @@
|
||||||
{
|
{
|
||||||
stdenv, lib, copyPathsToStore,
|
stdenv, lib,
|
||||||
src, version, qtCompatVersion,
|
src, patches, version, qtCompatVersion,
|
||||||
|
|
||||||
coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2,
|
coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2,
|
||||||
ruby,
|
ruby,
|
||||||
# darwin support
|
# darwin support
|
||||||
darwin, libiconv, libcxx,
|
darwin, libiconv, libcxx,
|
||||||
|
|
||||||
dbus, dconf, fontconfig, freetype, glib, gtk3, harfbuzz, icu, libX11, libXcomposite,
|
dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite,
|
||||||
libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libtiff,
|
libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libtiff,
|
||||||
libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre2, sqlite, udev,
|
libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, pcre2, sqlite, udev,
|
||||||
xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, xlibs,
|
xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, xlibs,
|
||||||
zlib,
|
zlib,
|
||||||
|
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
cups ? null, mysql ? null, postgresql ? null,
|
cups ? null, mysql ? null, postgresql ? null,
|
||||||
|
withGtk3 ? false, dconf ? null, gtk3 ? null,
|
||||||
|
|
||||||
# options
|
# options
|
||||||
mesaSupported ? (!stdenv.isDarwin),
|
mesaSupported ? (!stdenv.isDarwin),
|
||||||
|
@ -25,6 +26,9 @@
|
||||||
decryptSslTraffic ? false
|
decryptSslTraffic ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert withGtk3 -> dconf != null;
|
||||||
|
assert withGtk3 -> gtk3 != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64;
|
system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64;
|
||||||
in
|
in
|
||||||
|
@ -36,7 +40,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
[
|
[
|
||||||
libxml2 libxslt openssl pcre2 sqlite zlib
|
libxml2 libxslt openssl sqlite zlib
|
||||||
|
|
||||||
# Text rendering
|
# Text rendering
|
||||||
harfbuzz icu
|
harfbuzz icu
|
||||||
|
@ -44,6 +48,8 @@ stdenv.mkDerivation {
|
||||||
# Image formats
|
# Image formats
|
||||||
libjpeg libpng libtiff
|
libjpeg libpng libtiff
|
||||||
]
|
]
|
||||||
|
++ (if builtins.compareVersions version "5.9.0" >= 0
|
||||||
|
then [ pcre2 ] else [ pcre16 ])
|
||||||
|
|
||||||
++ lib.optional (mesaSupported && !stdenv.isDarwin) mesa
|
++ lib.optional (mesaSupported && !stdenv.isDarwin) mesa
|
||||||
|
|
||||||
|
@ -66,7 +72,8 @@ stdenv.mkDerivation {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
buildInputs = [ ]
|
buildInputs = [ ]
|
||||||
++ lib.optionals (!stdenv.isDarwin) [ gtk3 libinput ]
|
++ lib.optional (!stdenv.isDarwin && withGtk3) gtk3
|
||||||
|
++ lib.optional (!stdenv.isDarwin) libinput
|
||||||
++ lib.optional developerBuild gdb
|
++ lib.optional developerBuild gdb
|
||||||
++ lib.optional (cups != null) cups
|
++ lib.optional (cups != null) cups
|
||||||
++ lib.optional (mysql != null) mysql.lib
|
++ lib.optional (mysql != null) mysql.lib
|
||||||
|
@ -76,14 +83,31 @@ stdenv.mkDerivation {
|
||||||
[ bison flex gperf lndir perl pkgconfig python2 ]
|
[ bison flex gperf lndir perl pkgconfig python2 ]
|
||||||
++ lib.optional (!stdenv.isDarwin) patchelf;
|
++ lib.optional (!stdenv.isDarwin) patchelf;
|
||||||
|
|
||||||
|
propagatedNativeBuildInputs = [ lndir ];
|
||||||
|
|
||||||
outputs = [ "bin" "dev" "out" ];
|
outputs = [ "bin" "dev" "out" ];
|
||||||
|
|
||||||
patches =
|
inherit patches;
|
||||||
copyPathsToStore (lib.readPathsFromFile ./. ./series)
|
|
||||||
++ stdenv.lib.optional stdenv.isDarwin (copyPathsToStore (lib.readPathsFromFile ./. ./darwin-series));
|
fix_qt_static_libs = ../hooks/fix-qt-static-libs.sh;
|
||||||
|
fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
|
||||||
|
fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh;
|
||||||
|
preHook = ''
|
||||||
|
. "$fix_qt_static_libs"
|
||||||
|
. "$fix_qt_builtin_paths"
|
||||||
|
. "$fix_qt_module_paths"
|
||||||
|
. ${../hooks/move-qt-dev-tools.sh}
|
||||||
|
'';
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
''
|
''
|
||||||
|
for prf in qml_plugin.prf qt_plugin.prf qt_docs.prf qml_module.prf create_cmake.prf; do
|
||||||
|
substituteInPlace "mkspecs/features/$prf" \
|
||||||
|
--subst-var qtPluginPrefix \
|
||||||
|
--subst-var qtQmlPrefix \
|
||||||
|
--subst-var qtDocPrefix
|
||||||
|
done
|
||||||
|
|
||||||
substituteInPlace configure --replace /bin/pwd pwd
|
substituteInPlace configure --replace /bin/pwd pwd
|
||||||
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
|
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
|
||||||
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf
|
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf
|
||||||
|
@ -126,13 +150,33 @@ stdenv.mkDerivation {
|
||||||
setOutputFlags = false;
|
setOutputFlags = false;
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH"
|
||||||
export MAKEFLAGS=-j$NIX_BUILD_CORES
|
${lib.optionalString (builtins.compareVersions version "5.9.0" < 0) ''
|
||||||
|
# We need to set LD to CXX or otherwise we get nasty compile errors
|
||||||
|
export LD=$CXX
|
||||||
|
''}
|
||||||
|
|
||||||
configureFlags+="\
|
configureFlags+="\
|
||||||
-plugindir $out/$qtPluginPrefix \
|
-plugindir $out/$qtPluginPrefix \
|
||||||
-qmldir $out/$qtQmlPrefix \
|
-qmldir $out/$qtQmlPrefix \
|
||||||
-docdir $out/$qtDocPrefix"
|
-docdir $out/$qtDocPrefix"
|
||||||
|
|
||||||
|
createQmakeCache() {
|
||||||
|
cat >>"$1" <<EOF
|
||||||
|
NIX_OUTPUT_BIN = $bin
|
||||||
|
NIX_OUTPUT_DEV = $dev
|
||||||
|
NIX_OUTPUT_OUT = $out
|
||||||
|
NIX_OUTPUT_DOC = $dev/$qtDocPrefix
|
||||||
|
NIX_OUTPUT_QML = $bin/$qtQmlPrefix
|
||||||
|
NIX_OUTPUT_PLUGIN = $bin/$qtPluginPrefix
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
find . -name '.qmake.conf' | while read conf; do
|
||||||
|
cache=$(dirname $conf)/.qmake.cache
|
||||||
|
echo "Creating \`$cache'"
|
||||||
|
createQmakeCache "$cache"
|
||||||
|
done
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
|
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -148,7 +192,7 @@ stdenv.mkDerivation {
|
||||||
++ lib.optional (mesaSupported && !stdenv.isDarwin)
|
++ lib.optional (mesaSupported && !stdenv.isDarwin)
|
||||||
''-DNIXPKGS_MESA_GL="${mesa.out}/lib/libGL"''
|
''-DNIXPKGS_MESA_GL="${mesa.out}/lib/libGL"''
|
||||||
|
|
||||||
++ lib.optionals (!stdenv.isDarwin)
|
++ lib.optionals (!stdenv.isDarwin && withGtk3)
|
||||||
[
|
[
|
||||||
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
||||||
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
|
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
|
||||||
|
@ -189,6 +233,11 @@ stdenv.mkDerivation {
|
||||||
"-system-proxies"
|
"-system-proxies"
|
||||||
"-pkg-config"
|
"-pkg-config"
|
||||||
]
|
]
|
||||||
|
++ lib.optionals (builtins.compareVersions version "5.9.0" < 0)
|
||||||
|
[
|
||||||
|
"-c++11"
|
||||||
|
"-no-reduce-relocations"
|
||||||
|
]
|
||||||
++ lib.optionals developerBuild [
|
++ lib.optionals developerBuild [
|
||||||
"-developer-build"
|
"-developer-build"
|
||||||
"-no-warnings-are-errors"
|
"-no-warnings-are-errors"
|
||||||
|
@ -202,8 +251,10 @@ stdenv.mkDerivation {
|
||||||
"-pch"
|
"-pch"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
++ (if builtins.compareVersions version "5.9.0" >= 0
|
||||||
|
then [ (if system-x86_64 then "-sse2" else "-no-sse2") ]
|
||||||
|
else lib.optional (!system-x86_64) "-no-sse2")
|
||||||
++ [
|
++ [
|
||||||
''${lib.optionalString (!system-x86_64) "-no"}-sse2''
|
|
||||||
"-no-sse3"
|
"-no-sse3"
|
||||||
"-no-ssse3"
|
"-no-ssse3"
|
||||||
"-no-sse4.1"
|
"-no-sse4.1"
|
||||||
|
@ -232,7 +283,7 @@ stdenv.mkDerivation {
|
||||||
]
|
]
|
||||||
|
|
||||||
++ lib.optionals (!stdenv.isDarwin) [
|
++ lib.optionals (!stdenv.isDarwin) [
|
||||||
"-rpath"
|
"-${lib.optionalString (builtins.compareVersions version "5.9.0" < 0) "no-"}rpath"
|
||||||
|
|
||||||
"-system-xcb"
|
"-system-xcb"
|
||||||
"-xcb"
|
"-xcb"
|
||||||
|
@ -250,14 +301,14 @@ stdenv.mkDerivation {
|
||||||
''-${lib.optionalString (cups == null) "no-"}cups''
|
''-${lib.optionalString (cups == null) "no-"}cups''
|
||||||
"-dbus-linked"
|
"-dbus-linked"
|
||||||
"-glib"
|
"-glib"
|
||||||
"-gtk"
|
|
||||||
"-inotify"
|
|
||||||
"-system-libjpeg"
|
"-system-libjpeg"
|
||||||
"-system-libpng"
|
"-system-libpng"
|
||||||
# gold linker of binutils 2.28 generates duplicate symbols
|
# gold linker of binutils 2.28 generates duplicate symbols
|
||||||
# TODO: remove for newer version of binutils
|
# TODO: remove for newer version of binutils
|
||||||
"-no-use-gold-linker"
|
"-no-use-gold-linker"
|
||||||
]
|
]
|
||||||
|
++ lib.optional withGtk3 "-gtk"
|
||||||
|
++ lib.optional (builtins.compareVersions version "5.9.0" >= 0) "-inotify"
|
||||||
|
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.isDarwin [
|
||||||
"-platform macx-clang"
|
"-platform macx-clang"
|
||||||
|
@ -270,62 +321,43 @@ stdenv.mkDerivation {
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
# Hardcode some CMake module paths.
|
|
||||||
''
|
|
||||||
find "$out" -name "*.cmake" | while read file; do
|
|
||||||
substituteInPlace "$file" \
|
|
||||||
--subst-var-by NIX_OUT "''${!outputLib}" \
|
|
||||||
--subst-var-by NIX_DEV "''${!outputDev}" \
|
|
||||||
--subst-var-by NIX_BIN "''${!outputBin}"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
preFixup =
|
|
||||||
# Move selected outputs.
|
# Move selected outputs.
|
||||||
''
|
''
|
||||||
moveToOutput "bin" "$dev"
|
|
||||||
moveToOutput "include" "$dev"
|
|
||||||
moveToOutput "mkspecs" "$dev"
|
moveToOutput "mkspecs" "$dev"
|
||||||
|
|
||||||
mkdir -p "$dev/share"
|
|
||||||
moveToOutput "share/doc" "$dev"
|
|
||||||
|
|
||||||
moveToOutput "$qtPluginPrefix" "$bin"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
devTools = [
|
||||||
|
"bin/fixqt4headers.pl"
|
||||||
|
"bin/moc"
|
||||||
|
"bin/qdbuscpp2xml"
|
||||||
|
"bin/qdbusxml2cpp"
|
||||||
|
"bin/qlalr"
|
||||||
|
"bin/qmake"
|
||||||
|
"bin/rcc"
|
||||||
|
"bin/syncqt.pl"
|
||||||
|
"bin/uic"
|
||||||
|
];
|
||||||
|
|
||||||
postFixup =
|
postFixup =
|
||||||
# Don't retain build-time dependencies like gdb.
|
# Don't retain build-time dependencies like gdb.
|
||||||
''
|
''
|
||||||
sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
|
sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
|
||||||
''
|
''
|
||||||
|
|
||||||
# Move libtool archives into $dev
|
|
||||||
+ ''
|
+ ''
|
||||||
if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then
|
fixQtModulePaths "''${!outputDev}/mkspecs/modules"
|
||||||
pushd "''${!outputLib}"
|
fixQtBuiltinPaths "''${!outputDev}" '*.pr?'
|
||||||
find lib -name '*.a' -o -name '*.la' | while read -r file; do
|
|
||||||
mkdir -p "''${!outputDev}/$(dirname "$file")"
|
|
||||||
mv "''${!outputLib}/$file" "''${!outputDev}/$file"
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
''
|
''
|
||||||
|
|
||||||
# Move qmake project files into $dev.
|
# Move static libraries and QMake library definitions into $dev.
|
||||||
# Don't move .prl files on darwin because they end up in
|
+ ''
|
||||||
# "dev/lib/Foo.framework/Foo.prl" which interferes with subsequent
|
fixQtStaticLibs "''${!outputLib}" "''${!outputDev}"
|
||||||
# use of lndir in the qtbase setup-hook. On Linux, the .prl files
|
''
|
||||||
# are in lib, and so do not cause a subsequent recreation of deep
|
|
||||||
# framework directory trees.
|
# Move development tools to $dev
|
||||||
+ lib.optionalString (!stdenv.isDarwin) ''
|
+ ''
|
||||||
if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then
|
moveQtDevTools
|
||||||
pushd "''${!outputLib}"
|
moveToOutput bin "$dev"
|
||||||
find lib -name '*.prl' | while read -r file; do
|
|
||||||
mkdir -p "''${!outputDev}/$(dirname "$file")"
|
|
||||||
mv "''${!outputLib}/$file" "''${!outputDev}/$file"
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
''
|
''
|
||||||
|
|
||||||
# fixup .pc file (where to find 'moc' etc.)
|
# fixup .pc file (where to find 'moc' etc.)
|
||||||
|
@ -350,10 +382,7 @@ stdenv.mkDerivation {
|
||||||
fixDarwinDylibNames_rpath "QtConcurrent" "QtPrintSupport" "QtCore" "QtSql" "QtDBus" "QtTest" "QtGui" "QtWidgets" "QtNetwork" "QtXml" "QtOpenGL"
|
fixDarwinDylibNames_rpath "QtConcurrent" "QtPrintSupport" "QtCore" "QtSql" "QtDBus" "QtTest" "QtGui" "QtWidgets" "QtNetwork" "QtXml" "QtOpenGL"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inherit lndir;
|
setupHook = ../hooks/qtbase-setup-hook.sh;
|
||||||
setupHook = if stdenv.isDarwin
|
|
||||||
then ../../qtbase-setup-hook-darwin.sh
|
|
||||||
else ../../qtbase-setup-hook.sh;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = http://www.qt.io;
|
homepage = http://www.qt.io;
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ qtModule, qtbase, qtdeclarative }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtcharts";
|
||||||
|
qtInputs = [ qtbase qtdeclarative ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ qtModule, qtbase, qtdeclarative, bluez }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtconnectivity";
|
||||||
|
qtInputs = [ qtbase qtdeclarative ];
|
||||||
|
buildInputs = [ bluez ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ qtModule, lib, python2, qtbase, qtsvg, qtxmlpatterns }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtdeclarative";
|
||||||
|
qtInputs = [ qtbase qtsvg qtxmlpatterns ];
|
||||||
|
nativeBuildInputs = [ python2 ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
preConfigure = ''
|
||||||
|
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\""
|
||||||
|
'';
|
||||||
|
devTools = [
|
||||||
|
"bin/qml"
|
||||||
|
"bin/qmlcachegen"
|
||||||
|
"bin/qmleasing"
|
||||||
|
"bin/qmlimportscanner"
|
||||||
|
"bin/qmllint"
|
||||||
|
"bin/qmlmin"
|
||||||
|
"bin/qmlplugindump"
|
||||||
|
"bin/qmlprofiler"
|
||||||
|
"bin/qmlscene"
|
||||||
|
"bin/qmltestrunner"
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{ qtSubmodule, qtdeclarative }:
|
{ qtModule, qtdeclarative }:
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtdoc";
|
name = "qtdoc";
|
||||||
qtInputs = [ qtdeclarative ];
|
qtInputs = [ qtdeclarative ];
|
||||||
outputs = [ "out" ];
|
outputs = [ "out" ];
|
|
@ -1,6 +1,7 @@
|
||||||
{ qtSubmodule, qtdeclarative }:
|
{ qtModule, qtdeclarative }:
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtgraphicaleffects";
|
name = "qtgraphicaleffects";
|
||||||
qtInputs = [ qtdeclarative ];
|
qtInputs = [ qtdeclarative ];
|
||||||
|
outputs = [ "out" ];
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{ qtSubmodule, qtbase }:
|
{ qtModule, qtbase }:
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtimageformats";
|
name = "qtimageformats";
|
||||||
qtInputs = [ qtbase ];
|
qtInputs = [ qtbase ];
|
||||||
}
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ qtModule, qtbase, qtmultimedia }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtlocation";
|
||||||
|
qtInputs = [ qtbase qtmultimedia ];
|
||||||
|
outputs = [ "bin" "out" "dev" ];
|
||||||
|
# Linking with -lclipper fails with parallel build enabled
|
||||||
|
enableParallelBuilding = false;
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{ qtSubmodule, qtbase, lib }:
|
{ qtModule, qtbase, lib }:
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtmacextras";
|
name = "qtmacextras";
|
||||||
qtInputs = [ qtbase ];
|
qtInputs = [ qtbase ];
|
||||||
meta = with lib; {
|
meta = with lib; {
|
|
@ -1,11 +1,11 @@
|
||||||
{ stdenv, qtSubmodule, qtbase, qtdeclarative, pkgconfig
|
{ qtModule, stdenv, qtbase, qtdeclarative, pkgconfig
|
||||||
, alsaLib, gstreamer, gst-plugins-base, libpulseaudio
|
, alsaLib, gstreamer, gst-plugins-base, libpulseaudio
|
||||||
, darwin
|
, darwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtmultimedia";
|
name = "qtmultimedia";
|
||||||
qtInputs = [ qtbase qtdeclarative ];
|
qtInputs = [ qtbase qtdeclarative ];
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -14,8 +14,4 @@ qtSubmodule {
|
||||||
outputs = [ "bin" "dev" "out" ];
|
outputs = [ "bin" "dev" "out" ];
|
||||||
qmakeFlags = [ "GST_VERSION=1.0" ];
|
qmakeFlags = [ "GST_VERSION=1.0" ];
|
||||||
NIX_LDFLAGS = optionalString (stdenv.isDarwin) "-lobjc";
|
NIX_LDFLAGS = optionalString (stdenv.isDarwin) "-lobjc";
|
||||||
postInstall = ''
|
|
||||||
moveToOutput "$qtPluginPrefix" "$bin"
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{ qtSubmodule, qtdeclarative }:
|
{ qtModule, qtdeclarative }:
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtquickcontrols";
|
name = "qtquickcontrols";
|
||||||
qtInputs = [ qtdeclarative ];
|
qtInputs = [ qtdeclarative ];
|
||||||
}
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ qtModule, qtdeclarative }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtquickcontrols2";
|
||||||
|
qtInputs = [ qtdeclarative ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ qtModule, qtbase, qttools }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtscript";
|
||||||
|
qtInputs = [ qtbase qttools ];
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ qtModule, qtbase, qtdeclarative }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtsensors";
|
||||||
|
qtInputs = [ qtbase qtdeclarative ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
{ stdenv, qtSubmodule, lib, copyPathsToStore, qtbase, substituteAll, systemd }:
|
{ qtModule, stdenv, lib, qtbase, substituteAll, systemd }:
|
||||||
|
|
||||||
let inherit (lib) getLib optional; in
|
let inherit (lib) getLib optional; in
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtserialport";
|
name = "qtserialport";
|
||||||
qtInputs = [ qtbase ];
|
qtInputs = [ qtbase ];
|
||||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
|
||||||
NIX_CFLAGS_COMPILE =
|
NIX_CFLAGS_COMPILE =
|
||||||
optional stdenv.isLinux
|
optional stdenv.isLinux
|
||||||
''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
|
''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ qtModule, qtbase }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtsvg";
|
||||||
|
qtInputs = [ qtbase ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ qtModule, lib, qtbase }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qttools";
|
||||||
|
qtInputs = [ qtbase ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
|
||||||
|
# fixQtBuiltinPaths overwrites a builtin path we should keep
|
||||||
|
postPatch = ''
|
||||||
|
sed -i "src/linguist/linguist.pro" \
|
||||||
|
-e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${getDev qtbase}|'
|
||||||
|
'';
|
||||||
|
|
||||||
|
devTools = [
|
||||||
|
"bin/qcollectiongenerator"
|
||||||
|
"bin/linguist"
|
||||||
|
"bin/assistant"
|
||||||
|
"bin/qdoc"
|
||||||
|
"bin/lconvert"
|
||||||
|
"bin/designer"
|
||||||
|
"bin/qtattributesscanner"
|
||||||
|
"bin/lrelease"
|
||||||
|
"bin/pixeltool"
|
||||||
|
"bin/lupdate"
|
||||||
|
"bin/qtdiag"
|
||||||
|
"bin/qhelpgenerator"
|
||||||
|
"bin/qtplugininfo"
|
||||||
|
"bin/qthelpconverter"
|
||||||
|
];
|
||||||
|
|
||||||
|
setupHook = ../hooks/qttools-setup-hook.sh;
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{ qtSubmodule, qttools }:
|
{ qtModule, qttools }:
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qttranslations";
|
name = "qttranslations";
|
||||||
qtInputs = [ qttools ];
|
qtInputs = [ qttools ];
|
||||||
}
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ qtModule, qtbase, qtquickcontrols, wayland, pkgconfig }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtwayland";
|
||||||
|
qtInputs = [ qtbase qtquickcontrols ];
|
||||||
|
buildInputs = [ wayland ];
|
||||||
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ qtModule, qtbase, qtdeclarative }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtwebchannel";
|
||||||
|
qtInputs = [ qtbase qtdeclarative ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ qtSubmodule, qtquickcontrols, qtlocation, qtwebchannel
|
{ qtModule, qtCompatVersion,
|
||||||
|
qtdeclarative, qtquickcontrols, qtlocation, qtwebchannel
|
||||||
|
|
||||||
, bison, coreutils, flex, git, gperf, ninja, pkgconfig, python2, which
|
, bison, coreutils, flex, git, gperf, ninja, pkgconfig, python2, which
|
||||||
|
|
||||||
|
@ -18,9 +19,11 @@
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
qtSubmodule {
|
let qt56 = qtCompatVersion == "5.6"; in
|
||||||
|
|
||||||
|
qtModule {
|
||||||
name = "qtwebengine";
|
name = "qtwebengine";
|
||||||
qtInputs = [ qtquickcontrols qtlocation qtwebchannel ];
|
qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
bison coreutils flex git gperf ninja pkgconfig python2 which
|
bison coreutils flex git gperf ninja pkgconfig python2 which
|
||||||
];
|
];
|
||||||
|
@ -38,9 +41,9 @@ qtSubmodule {
|
||||||
+ ''
|
+ ''
|
||||||
substituteInPlace ./src/3rdparty/chromium/build/common.gypi \
|
substituteInPlace ./src/3rdparty/chromium/build/common.gypi \
|
||||||
--replace /bin/echo ${coreutils}/bin/echo
|
--replace /bin/echo ${coreutils}/bin/echo
|
||||||
substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/toolchain.gypi \
|
substituteInPlace ./src/3rdparty/chromium/v8/${if qt56 then "build" else "gypfiles"}/toolchain.gypi \
|
||||||
--replace /bin/echo ${coreutils}/bin/echo
|
--replace /bin/echo ${coreutils}/bin/echo
|
||||||
substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/standalone.gypi \
|
substituteInPlace ./src/3rdparty/chromium/v8/${if qt56 then "build" else "gypfiles"}/standalone.gypi \
|
||||||
--replace /bin/echo ${coreutils}/bin/echo
|
--replace /bin/echo ${coreutils}/bin/echo
|
||||||
''
|
''
|
||||||
# Patch library paths in Qt sources
|
# Patch library paths in Qt sources
|
||||||
|
@ -62,6 +65,10 @@ qtSubmodule {
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export MAKEFLAGS=-j$NIX_BUILD_CORES
|
export MAKEFLAGS=-j$NIX_BUILD_CORES
|
||||||
|
|
||||||
|
if [ -d "$PWD/tools/qmake" ]; then
|
||||||
|
QMAKEPATH="$PWD/tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
qmakeFlags =
|
qmakeFlags =
|
||||||
|
@ -99,7 +106,6 @@ qtSubmodule {
|
||||||
xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst
|
xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst
|
||||||
xlibs.libXcomposite
|
xlibs.libXcomposite
|
||||||
];
|
];
|
||||||
patches = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
|
||||||
|
|
||||||
dontUseNinjaBuild = true;
|
dontUseNinjaBuild = true;
|
||||||
dontUseNinjaInstall = true;
|
dontUseNinjaInstall = true;
|
||||||
|
@ -111,7 +117,5 @@ qtSubmodule {
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
paxmark m $out/libexec/QtWebEngineProcess
|
paxmark m $out/libexec/QtWebEngineProcess
|
||||||
|
|
||||||
moveToOutput "$qtQmlPrefix" "$bin"
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ qtSubmodule, stdenv, copyPathsToStore, lib
|
{ qtModule, stdenv, lib
|
||||||
, qtdeclarative, qtlocation, qtsensors
|
, qtbase, qtdeclarative, qtlocation, qtsensors
|
||||||
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
||||||
, sqlite, systemd, glib, gst_all_1
|
, sqlite, systemd, glib, gst_all_1
|
||||||
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
||||||
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
let inherit (lib) optional optionals getLib; in
|
let inherit (lib) optional optionals getLib; in
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtwebkit";
|
name = "qtwebkit";
|
||||||
qtInputs = [ qtdeclarative qtlocation qtsensors ];
|
qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ];
|
||||||
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
|
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
|
||||||
++ optionals (stdenv.isDarwin) (with darwin.apple_sdk.frameworks; [ OpenGL ]);
|
++ optionals (stdenv.isDarwin) (with darwin.apple_sdk.frameworks; [ OpenGL ]);
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -23,7 +23,12 @@ qtSubmodule {
|
||||||
"/usr/lib/libicucore.dylib"
|
"/usr/lib/libicucore.dylib"
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
# QtWebKit overrides qmake's default_pre and default_post features,
|
||||||
|
# so its custom qmake files must be found first at the front of QMAKEPATH.
|
||||||
|
preConfigure = ''
|
||||||
|
QMAKEPATH="$PWD/Tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
|
||||||
|
fixQtBuiltinPaths . '*.pr?'
|
||||||
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE =
|
NIX_CFLAGS_COMPILE =
|
||||||
optionals flashplayerFix
|
optionals flashplayerFix
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ qtModule, qtbase, qtdeclarative }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtwebsockets";
|
||||||
|
qtInputs = [ qtbase qtdeclarative ];
|
||||||
|
outputs = [ "out" "dev" "bin" ];
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{ qtSubmodule, qtbase }:
|
{ qtModule, qtbase }:
|
||||||
|
|
||||||
qtSubmodule {
|
qtModule {
|
||||||
name = "qtx11extras";
|
name = "qtx11extras";
|
||||||
qtInputs = [ qtbase ];
|
qtInputs = [ qtbase ];
|
||||||
}
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ qtModule, qtbase }:
|
||||||
|
|
||||||
|
qtModule {
|
||||||
|
name = "qtxmlpatterns";
|
||||||
|
qtInputs = [ qtbase ];
|
||||||
|
devTools = [ "bin/xmlpatterns" "bin/xmlpatternsvalidator" ];
|
||||||
|
}
|
|
@ -1,47 +0,0 @@
|
||||||
qmakeConfigurePhase() {
|
|
||||||
runHook preConfigure
|
|
||||||
|
|
||||||
qmake PREFIX=$out $qmakeFlags
|
|
||||||
|
|
||||||
runHook postConfigure
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
|
|
||||||
configurePhase=qmakeConfigurePhase
|
|
||||||
fi
|
|
||||||
|
|
||||||
_qtModuleMultioutDevsPre() {
|
|
||||||
# We cannot simply set these paths in configureFlags because libQtCore retains
|
|
||||||
# references to the paths it was built with.
|
|
||||||
moveToOutput "bin" "${!outputDev}"
|
|
||||||
moveToOutput "include" "${!outputDev}"
|
|
||||||
|
|
||||||
# The destination directory must exist or moveToOutput will do nothing
|
|
||||||
mkdir -p "${!outputDev}/share"
|
|
||||||
moveToOutput "share/doc" "${!outputDev}"
|
|
||||||
}
|
|
||||||
|
|
||||||
_qtModuleMultioutDevsPost() {
|
|
||||||
local -a findopts=(-name '*.a' -o -name '*.la')
|
|
||||||
if [ -z "@isDarwin@" ]; then
|
|
||||||
findopts+=(-o -name '*.prl')
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Move libtool archives and qmake project files to $dev/lib
|
|
||||||
if [ "z${!outputLib}" != "z${!outputDev}" ]; then
|
|
||||||
pushd "${!outputLib}"
|
|
||||||
if [ -d "lib" ]; then
|
|
||||||
find lib \( "${findopts[@]}" \) -print0 | \
|
|
||||||
while read -r -d $'\0' file; do
|
|
||||||
mkdir -p "${!outputDev}/$(dirname "$file")"
|
|
||||||
mv "${!outputLib}/$file" "${!outputDev}/$file"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -n "$NIX_QT_SUBMODULE" ]; then
|
|
||||||
preFixupHooks+=(_qtModuleMultioutDevsPre)
|
|
||||||
postFixupHooks+=(_qtModuleMultioutDevsPost)
|
|
||||||
fi
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
{ lib, mkDerivation, perl }:
|
||||||
|
|
||||||
|
let inherit (lib) licenses maintainers platforms; in
|
||||||
|
|
||||||
|
{ self, srcs, patches }:
|
||||||
|
|
||||||
|
args:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (args) name;
|
||||||
|
version = args.version or srcs."${name}".version;
|
||||||
|
src = args.src or srcs."${name}".src;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkDerivation (args // {
|
||||||
|
name = "${name}-${version}";
|
||||||
|
inherit src;
|
||||||
|
patches = args.patches or patches."${name}" or [];
|
||||||
|
|
||||||
|
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
|
||||||
|
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
|
||||||
|
|
||||||
|
outputs = args.outputs or [ "out" "dev" ];
|
||||||
|
setOutputFlags = args.setOutputFlags or false;
|
||||||
|
|
||||||
|
preHook = ''
|
||||||
|
. ${./hooks/move-qt-dev-tools.sh}
|
||||||
|
. ${./hooks/fix-qt-builtin-paths.sh}
|
||||||
|
'';
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
${args.preConfigure or ""}
|
||||||
|
|
||||||
|
fixQtBuiltinPaths . '*.pr?'
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
if [ -d "''${!outputDev}/lib/pkgconfig" ]; then
|
||||||
|
find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do
|
||||||
|
sed -i "$pc" \
|
||||||
|
-e "/^prefix=/ c prefix=''${!outputLib}" \
|
||||||
|
-e "/^exec_prefix=/ c exec_prefix=''${!outputBin}" \
|
||||||
|
-e "/^includedir=/ c includedir=''${!outputDev}/include"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
moveQtDevTools
|
||||||
|
|
||||||
|
${args.postFixup or ""}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://www.qt.io;
|
||||||
|
description = "A cross-platform application framework for C++";
|
||||||
|
license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
|
||||||
|
maintainers = with maintainers; [ qknight ttuegel periklis ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
} // (args.meta or {});
|
||||||
|
})
|
|
@ -1,192 +0,0 @@
|
||||||
qtPluginPrefix=@qtPluginPrefix@
|
|
||||||
qtQmlPrefix=@qtQmlPrefix@
|
|
||||||
qtDocPrefix=@qtDocPrefix@
|
|
||||||
|
|
||||||
_qtRmCMakeLink() {
|
|
||||||
find "${!outputLib}" -name "*.cmake" -type l | xargs rm
|
|
||||||
}
|
|
||||||
|
|
||||||
postInstallHooks+=(_qtRmCMakeLink)
|
|
||||||
|
|
||||||
addToSearchPathOnceWithCustomDelimiter() {
|
|
||||||
local delim="$1"
|
|
||||||
local search="$2"
|
|
||||||
local target="$3"
|
|
||||||
local dirs
|
|
||||||
local exported
|
|
||||||
IFS="$delim" read -a dirs <<< "${!search}"
|
|
||||||
local canonical
|
|
||||||
if canonical=$(readlink -e "$target"); then
|
|
||||||
for dir in ${dirs[@]}; do
|
|
||||||
if [ "z$dir" == "z$canonical" ]; then exported=1; fi
|
|
||||||
done
|
|
||||||
if [ -z $exported ]; then
|
|
||||||
eval "export ${search}=\"${!search}${!search:+$delim}$canonical\""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
addToSearchPathOnce() {
|
|
||||||
addToSearchPathOnceWithCustomDelimiter ':' "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
propagateOnce() {
|
|
||||||
addToSearchPathOnceWithCustomDelimiter ' ' "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
_qtPropagate() {
|
|
||||||
for dir in $qtPluginPrefix $qtQmlPrefix; do
|
|
||||||
if [ -d "$1/$dir" ]; then
|
|
||||||
propagateOnce propagatedBuildInputs "$1"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
addToSearchPathOnce QT_PLUGIN_PATH "$1/$qtPluginPrefix"
|
|
||||||
addToSearchPathOnce QML2_IMPORT_PATH "$1/$qtQmlPrefix"
|
|
||||||
}
|
|
||||||
|
|
||||||
crossEnvHooks+=(_qtPropagate)
|
|
||||||
|
|
||||||
_qtPropagateNative() {
|
|
||||||
for dir in $qtPluginPrefix $qtQmlPrefix; do
|
|
||||||
if [ -d "$1/$dir" ]; then
|
|
||||||
propagateOnce propagatedNativeBuildInputs "$1"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -z "$crossConfig" ]; then
|
|
||||||
addToSearchPathOnce QT_PLUGIN_PATH "$1/$qtPluginPrefix"
|
|
||||||
addToSearchPathOnce QML2_IMPORT_PATH "$1/$qtQmlPrefix"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
envHooks+=(_qtPropagateNative)
|
|
||||||
|
|
||||||
_qtMultioutDevs() {
|
|
||||||
# This is necessary whether the package is a Qt module or not
|
|
||||||
moveToOutput "mkspecs" "${!outputDev}"
|
|
||||||
}
|
|
||||||
|
|
||||||
preFixupHooks+=(_qtMultioutDevs)
|
|
||||||
|
|
||||||
_qtSetCMakePrefix() {
|
|
||||||
export CMAKE_PREFIX_PATH="$NIX_QT5_TMP${CMAKE_PREFIX_PATH:+:}${CMAKE_PREFIX_PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
_qtRmTmp() {
|
|
||||||
if [ -z "$NIX_QT_SUBMODULE" ]; then
|
|
||||||
rm -fr "$NIX_QT5_TMP"
|
|
||||||
else
|
|
||||||
cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read file; do
|
|
||||||
if [ ! -d "$NIX_QT5_TMP/$file" ]; then
|
|
||||||
rm -f "$NIX_QT5_TMP/$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read dir; do
|
|
||||||
if [ -d "$NIX_QT5_TMP/$dir" ]; then
|
|
||||||
rmdir --ignore-fail-on-non-empty -p "$NIX_QT5_TMP/$dir"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
rm "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_qtSetQmakePath() {
|
|
||||||
export PATH="$NIX_QT5_TMP/bin${PATH:+:}$PATH"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z "$NIX_QT5_TMP" ]; then
|
|
||||||
if [ -z "$NIX_QT_SUBMODULE" ]; then
|
|
||||||
NIX_QT5_TMP=$(pwd)/.nix_qt5
|
|
||||||
else
|
|
||||||
NIX_QT5_TMP=$out
|
|
||||||
fi
|
|
||||||
postInstallHooks+=(_qtRmTmp)
|
|
||||||
|
|
||||||
mkdir -p "$NIX_QT5_TMP/nix-support"
|
|
||||||
for subdir in bin include mkspecs share; do
|
|
||||||
mkdir -p "$NIX_QT5_TMP/$subdir"
|
|
||||||
echo "$subdir/" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
done
|
|
||||||
mkdir -p "$NIX_QT5_TMP/lib"
|
|
||||||
|
|
||||||
postHooks+=(_qtSetCMakePrefix)
|
|
||||||
|
|
||||||
ln -sf "@dev@/bin/qmake" "$NIX_QT5_TMP/bin"
|
|
||||||
echo "bin/qmake" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
|
|
||||||
cat >"$NIX_QT5_TMP/bin/qt.conf" <<EOF
|
|
||||||
[Paths]
|
|
||||||
Prefix = $NIX_QT5_TMP
|
|
||||||
Plugins = $qtPluginPrefix
|
|
||||||
Qml2Imports = $qtQmlPrefix
|
|
||||||
Documentation = $qtDocPrefix
|
|
||||||
EOF
|
|
||||||
echo "bin/qt.conf" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
|
|
||||||
export QMAKE="$NIX_QT5_TMP/bin/qmake"
|
|
||||||
|
|
||||||
# Set PATH to find qmake first in a preConfigure hook
|
|
||||||
# It must run after all the envHooks!
|
|
||||||
preConfigureHooks+=(_qtSetQmakePath)
|
|
||||||
fi
|
|
||||||
|
|
||||||
qt5LinkModuleDir() {
|
|
||||||
if [ -d "$1/$2" ]; then
|
|
||||||
@lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2"
|
|
||||||
find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
qt5LinkDarwinModuleLibDir() {
|
|
||||||
for fw in $(find "$1"/lib -maxdepth 1 -name '*.framework'); do
|
|
||||||
if [ ! -L "$fw" ]; then
|
|
||||||
ln -s "$fw" "$NIX_QT5_TMP"/lib
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for file in $(find "$1"/lib -maxdepth 1 -type f); do
|
|
||||||
if [ ! -L "$file" ]; then
|
|
||||||
ln -s "$file" "$NIX_QT5_TMP"/lib
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for dir in $(find "$1"/lib -maxdepth 1 -mindepth 1 -type d ! -name '*.framework'); do
|
|
||||||
mkdir -p "$NIX_QT5_TMP"/lib/$(basename "$dir")
|
|
||||||
@lndir@/bin/lndir -silent "$dir" "$NIX_QT5_TMP"/lib/$(basename "$dir")
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@"
|
|
||||||
NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@"
|
|
||||||
|
|
||||||
_qtLinkAllModules() {
|
|
||||||
IFS=: read -a modules <<< $NIX_QT5_MODULES
|
|
||||||
for module in ${modules[@]}; do
|
|
||||||
qt5LinkDarwinModuleLibDir "$module"
|
|
||||||
done
|
|
||||||
|
|
||||||
IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV
|
|
||||||
for module in ${modules[@]}; do
|
|
||||||
qt5LinkModuleDir "$module" "bin"
|
|
||||||
qt5LinkModuleDir "$module" "include"
|
|
||||||
qt5LinkDarwinModuleLibDir "$module"
|
|
||||||
qt5LinkModuleDir "$module" "mkspecs"
|
|
||||||
qt5LinkModuleDir "$module" "share"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
preConfigureHooks+=(_qtLinkAllModules)
|
|
||||||
|
|
||||||
_qtFixCMakePaths() {
|
|
||||||
find "${!outputLib}" -name "*.cmake" | while read file; do
|
|
||||||
substituteInPlace "$file" \
|
|
||||||
--subst-var-by NIX_OUT "${!outputLib}" \
|
|
||||||
--subst-var-by NIX_DEV "${!outputDev}" \
|
|
||||||
--subst-var-by NIX_BIN "${!outputBin}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -n "$NIX_QT_SUBMODULE" ]; then
|
|
||||||
postInstallHooks+=(_qtFixCMakePaths)
|
|
||||||
fi
|
|
|
@ -1,155 +0,0 @@
|
||||||
qtPluginPrefix=@qtPluginPrefix@
|
|
||||||
qtQmlPrefix=@qtQmlPrefix@
|
|
||||||
qtDocPrefix=@qtDocPrefix@
|
|
||||||
|
|
||||||
NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@"
|
|
||||||
NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@"
|
|
||||||
|
|
||||||
providesQtRuntime() {
|
|
||||||
[ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Propagate any runtime dependency of the building package.
|
|
||||||
# Each dependency is propagated to the user environment and as a build
|
|
||||||
# input so that it will be re-propagated to the user environment by any
|
|
||||||
# package depending on the building package. (This is necessary in case
|
|
||||||
# the building package does not provide runtime dependencies itself and so
|
|
||||||
# would not be propagated to the user environment.)
|
|
||||||
_qtCrossEnvHook() {
|
|
||||||
if providesQtRuntime "$1"; then
|
|
||||||
propagatedBuildInputs+=" $1"
|
|
||||||
propagatedUserEnvPkgs+=" $1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ -z "$NIX_QT5_TMP" ]; then
|
|
||||||
crossEnvHooks+=(_qtCrossEnvHook)
|
|
||||||
fi
|
|
||||||
|
|
||||||
_qtEnvHook() {
|
|
||||||
if providesQtRuntime "$1"; then
|
|
||||||
propagatedNativeBuildInputs+=" $1"
|
|
||||||
if [ -z "$crossConfig" ]; then
|
|
||||||
propagatedUserEnvPkgs+=" $1"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ -z "$NIX_QT5_TMP" ]; then
|
|
||||||
envHooks+=(_qtEnvHook)
|
|
||||||
fi
|
|
||||||
|
|
||||||
_qtPreFixupHook() {
|
|
||||||
moveToOutput "mkspecs" "${!outputDev}"
|
|
||||||
}
|
|
||||||
if [ -z "$NIX_QT5_TMP" ]; then
|
|
||||||
preFixupHooks+=(_qtPreFixupHook)
|
|
||||||
fi
|
|
||||||
|
|
||||||
_qtPostInstallHook() {
|
|
||||||
# Clean up temporary installation files created by this setup hook.
|
|
||||||
# For building Qt modules, this is necessary to prevent including
|
|
||||||
# dependencies in the output. For all other packages, this is necessary
|
|
||||||
# to induce patchelf to remove the temporary paths from the RPATH of
|
|
||||||
# dynamically-linked objects.
|
|
||||||
if [ -z "$NIX_QT_SUBMODULE" ]; then
|
|
||||||
rm -fr "$NIX_QT5_TMP"
|
|
||||||
else
|
|
||||||
cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read file; do
|
|
||||||
if [ ! -d "$NIX_QT5_TMP/$file" ]; then
|
|
||||||
rm -f "$NIX_QT5_TMP/$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read dir; do
|
|
||||||
if [ -d "$NIX_QT5_TMP/$dir" ]; then
|
|
||||||
rmdir --ignore-fail-on-non-empty -p "$NIX_QT5_TMP/$dir"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
rm "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Patch CMake modules
|
|
||||||
if [ -n "$NIX_QT_SUBMODULE" ]; then
|
|
||||||
find "${!outputLib}" -name "*.cmake" | while read file; do
|
|
||||||
substituteInPlace "$file" \
|
|
||||||
--subst-var-by NIX_OUT "${!outputLib}" \
|
|
||||||
--subst-var-by NIX_DEV "${!outputDev}" \
|
|
||||||
--subst-var-by NIX_BIN "${!outputBin}"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ -z "$NIX_QT5_TMP" ]; then
|
|
||||||
preConfigureHooks+=(_qtPreConfigureHook)
|
|
||||||
fi
|
|
||||||
|
|
||||||
_qtLinkModuleDir() {
|
|
||||||
if [ -d "$1/$2" ]; then
|
|
||||||
@lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2"
|
|
||||||
find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_qtPreConfigureHook() {
|
|
||||||
# Find the temporary qmake executable first.
|
|
||||||
# This must run after all the environment hooks!
|
|
||||||
export PATH="$NIX_QT5_TMP/bin${PATH:+:}$PATH"
|
|
||||||
|
|
||||||
# Link all runtime module dependencies into the temporary directory.
|
|
||||||
IFS=: read -a modules <<< $NIX_QT5_MODULES
|
|
||||||
for module in ${modules[@]}; do
|
|
||||||
_qtLinkModuleDir "$module" "lib"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Link all the build-time module dependencies into the temporary directory.
|
|
||||||
IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV
|
|
||||||
for module in ${modules[@]}; do
|
|
||||||
_qtLinkModuleDir "$module" "bin"
|
|
||||||
_qtLinkModuleDir "$module" "include"
|
|
||||||
_qtLinkModuleDir "$module" "lib"
|
|
||||||
_qtLinkModuleDir "$module" "mkspecs"
|
|
||||||
_qtLinkModuleDir "$module" "share"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
if [ -z "$NIX_QT5_TMP" ]; then
|
|
||||||
postInstallHooks+=(_qtPostInstallHook)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$NIX_QT5_TMP" ]; then
|
|
||||||
if [ -z "$NIX_QT_SUBMODULE" ]; then
|
|
||||||
if [ -z "$IN_NIX_SHELL" ]; then
|
|
||||||
NIX_QT5_TMP=$(pwd)/__nix_qt5__
|
|
||||||
else
|
|
||||||
NIX_QT5_TMP=$(mktemp -d)
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
NIX_QT5_TMP=$out
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$NIX_QT5_TMP/nix-support"
|
|
||||||
for subdir in bin include lib mkspecs share; do
|
|
||||||
mkdir -p "$NIX_QT5_TMP/$subdir"
|
|
||||||
echo "$subdir/" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
done
|
|
||||||
|
|
||||||
cp "@dev@/bin/qmake" "$NIX_QT5_TMP/bin"
|
|
||||||
echo "bin/qmake" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
|
|
||||||
cat >"$NIX_QT5_TMP/bin/qt.conf" <<EOF
|
|
||||||
[Paths]
|
|
||||||
Prefix = $NIX_QT5_TMP
|
|
||||||
Plugins = $qtPluginPrefix
|
|
||||||
Qml2Imports = $qtQmlPrefix
|
|
||||||
Documentation = $qtDocPrefix
|
|
||||||
EOF
|
|
||||||
echo "bin/qt.conf" >> "$NIX_QT5_TMP/nix-support/qt-inputs"
|
|
||||||
|
|
||||||
export QMAKE="$NIX_QT5_TMP/bin/qmake"
|
|
||||||
fi
|
|
||||||
|
|
||||||
_qtShellCleanupHook () {
|
|
||||||
rm -fr $NIX_QT5_TMP
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -n "$IN_NIX_SHELL" ]; then
|
|
||||||
trap _qtShellCleanupHook EXIT
|
|
||||||
fi
|
|
|
@ -1,2 +0,0 @@
|
||||||
NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@"
|
|
||||||
NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@"
|
|
Loading…
Reference in New Issue