1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00

podofo: fix library path in pkg-config file

The lib/ directory was being moved to the $lib output post-build without
correcting the path in libpodofo.pc.
This commit is contained in:
rnhmjoj 2024-04-03 09:51:02 +02:00
parent d9bb2c0160
commit bd9f1f2155
No known key found for this signature in database
GPG key ID: BFBAF4C975F76450
2 changed files with 7 additions and 6 deletions

View file

@ -53,10 +53,6 @@ stdenv.mkDerivation (finalAttrs: {
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
];
postInstall = ''
moveToOutput lib "$lib"
'';
meta = {
homepage = "https://github.com/podofo/podofo";
description = "A library to work with the PDF file format";

View file

@ -24,8 +24,13 @@ stdenv.mkDerivation rec {
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
];
postInstall = ''
moveToOutput lib "$lib"
postPatch = ''
# Use GNU directories to fix multiple outputs
failNoMatches='t yes; b no; :yes h; :no p; $ {x; /./{x;q}; q1}'
sed -ni src/podofo/CMakeLists.txt \
-e 's/LIBDIRNAME/CMAKE_INSTALL_LIBDIR/' -e "$failNoMatches"
sed -ni src/podofo/libpodofo.pc.in \
-e 's/^libdir=.*/libdir=@CMAKE_INSTALL_LIBDIR@/' -e "$failNoMatches"
'';
meta = with lib; {