mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
qmakeHook: move libtool archives and qmake project files to $dev/lib
This commit is contained in:
parent
f67be47333
commit
97d9368471
@ -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;
|
||||
|
@ -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() {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user