From 97d9368471542388dd761a1a4654c52cd7ddbea7 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 26 Apr 2016 14:20:32 -0500 Subject: qmakeHook: move libtool archives and qmake project files to $dev/lib --- pkgs/development/libraries/qt-5/5.5/default.nix | 1 - pkgs/development/libraries/qt-5/5.5/qmake-hook.sh | 11 +++++++++++ pkgs/development/libraries/qt-5/5.5/qtbase/default.nix | 13 +++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix index 034e25662ea18..9cfc052e730e1 100644 --- a/pkgs/development/libraries/qt-5/5.5/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/default.nix @@ -45,7 +45,6 @@ let nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ self.fixQtModuleCMakeConfig self.qmakeHook ]; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; - dontFixLibtool = args.dontFixLibtool or true; outputs = args.outputs or [ "dev" "out" ]; setOutputFlags = args.setOutputFlags or false; diff --git a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh index f059c19e03bb7..aa20779f4ec05 100644 --- a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh +++ b/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh @@ -53,6 +53,17 @@ _qtMultioutModuleDevs() { # The destination directory must exist or moveToOutput will do nothing mkdir -p "${!outputDev}/share" moveToOutput "share/doc" "${!outputDev}" + + # Move libtool archives and qmake project files to $dev/lib + if [ "z${!outputLib}" != "z${!outputDev}" ]; then + pushd "${!outputLib}" + find lib -name '*.a' -o -name '*.la' -o -name '*.prl' -print0 | \ + while read -r -d $'\0' file; do + mkdir -p "${!outputDev}/$(dirname "$file")" + mv "${!outputLib}/$file" "${!outputDev}/$file" + done + popd + fi } qmakeConfigurePhase() { diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index 7d68116d71685..f8dd82c88226b 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -235,6 +235,19 @@ stdenv.mkDerivation { # freetype-2.5.4 changed signedness of some struct fields NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare"; + preFixup = '' + # Move libtool archives and qmake projects + if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then + pushd "''${!outputLib}" + find lib -name '*.a' -o -name '*.la' -o -name '*.prl' | \ + while read -r file; do + mkdir -p "''${!outputDev}/$(dirname "$file")" + mv "''${!outputLib}/$file" "''${!outputDev}/$file" + done + popd + fi + ''; + postFixup = '' # Don't retain build-time dependencies like gdb and ruby. -- cgit 1.4.1