netpbm: split into multiple outputs
This commit is contained in:
parent
90180905a2
commit
9555834399
@ -49,7 +49,7 @@ stdenv.mkDerivation {
|
|||||||
"${ghostscript}/bin:" +
|
"${ghostscript}/bin:" +
|
||||||
(if aspell == null then "" else "${aspell}/bin:") +
|
(if aspell == null then "" else "${aspell}/bin:") +
|
||||||
(if tex == null then "" else "${tex}/bin:") +
|
(if tex == null then "" else "${tex}/bin:") +
|
||||||
(if netpbm == null then "" else "${netpbm}/bin:") +
|
(if netpbm == null then "" else "${stdenv.lib.getBin netpbm}/bin:") +
|
||||||
(if imagemagick == null then "" else "${imagemagick}/bin:");
|
(if imagemagick == null then "" else "${imagemagick}/bin:");
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
|||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder "out"}"
|
"PREFIX=${placeholder "out"}"
|
||||||
"LEX=flex"
|
"LEX=flex"
|
||||||
"RGBDEF=${netpbm}/share/netpbm/misc/rgb.txt"
|
"RGBDEF=${netpbm.out}/share/netpbm/misc/rgb.txt"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -19,6 +19,8 @@ stdenv.mkDerivation {
|
|||||||
# https://sourceforge.net/p/netpbm/code/HEAD/log/?path=/advanced
|
# https://sourceforge.net/p/netpbm/code/HEAD/log/?path=/advanced
|
||||||
name = "netpbm-10.89.1";
|
name = "netpbm-10.89.1";
|
||||||
|
|
||||||
|
outputs = [ "bin" "out" "dev" ];
|
||||||
|
|
||||||
src = fetchsvn {
|
src = fetchsvn {
|
||||||
url = "https://svn.code.sf.net/p/netpbm/code/advanced";
|
url = "https://svn.code.sf.net/p/netpbm/code/advanced";
|
||||||
rev = "3735";
|
rev = "3735";
|
||||||
@ -96,6 +98,8 @@ stdenv.mkDerivation {
|
|||||||
wrapProgram "$out/bin/$prog" --prefix PATH : "$out/bin"
|
wrapProgram "$out/bin/$prog" --prefix PATH : "$out/bin"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
moveToOutput bin "''${!outputBin}"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
rm cmake/FindNETPBM.cmake
|
rm cmake/FindNETPBM.cmake
|
||||||
echo "SET(NETPBM_LIBRARY `find ${netpbm} -name "*.${stdenv.hostPlatform.extensions.sharedLibrary}*" -type f`)" >> cmake/FindNETPBM.cmake
|
echo "SET(NETPBM_LIBRARY `find ${stdenv.lib.getLib netpbm} -name "*.${stdenv.hostPlatform.extensions.sharedLibrary}*" -type f`)" >> cmake/FindNETPBM.cmake
|
||||||
echo "SET(NETPBM_LIBRARIES `find ${netpbm} -name "*.${stdenv.hostPlatform.extensions.sharedLibrary}*" -type f`)" >> cmake/FindNETPBM.cmake
|
echo "SET(NETPBM_LIBRARIES `find ${stdenv.lib.getLib netpbm} -name "*.${stdenv.hostPlatform.extensions.sharedLibrary}*" -type f`)" >> cmake/FindNETPBM.cmake
|
||||||
echo "SET(NETPBM_INCLUDE_DIR ${netpbm}/include/netpbm)" >> cmake/FindNETPBM.cmake
|
echo "SET(NETPBM_INCLUDE_DIR ${stdenv.lib.getDev netpbm}/include/netpbm)" >> cmake/FindNETPBM.cmake
|
||||||
echo "INCLUDE(FindPackageHandleStandardArgs)" >> cmake/FindNETPBM.cmake
|
echo "INCLUDE(FindPackageHandleStandardArgs)" >> cmake/FindNETPBM.cmake
|
||||||
echo "FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETPBM DEFAULT_MSG NETPBM_LIBRARY NETPBM_INCLUDE_DIR)" >> cmake/FindNETPBM.cmake
|
echo "FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETPBM DEFAULT_MSG NETPBM_LIBRARY NETPBM_INCLUDE_DIR)" >> cmake/FindNETPBM.cmake
|
||||||
'';
|
'';
|
||||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ libpng ];
|
buildInputs = [ libpng ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-rgbtxt=${netpbm}/share/netpbm/misc/rgb.txt"
|
"--with-rgbtxt=${netpbm.out}/share/netpbm/misc/rgb.txt"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
|
|||||||
sed -i src/form.c -e '21i#include <stdlib.h>'
|
sed -i src/form.c -e '21i#include <stdlib.h>'
|
||||||
|
|
||||||
# there is no point to bring in the whole netpbm package just for this file
|
# there is no point to bring in the whole netpbm package just for this file
|
||||||
install -Dm644 ${netpbm}/share/netpbm/misc/rgb.txt $out/share/yad/rgb.txt
|
install -Dm644 ${netpbm.out}/share/netpbm/misc/rgb.txt $out/share/yad/rgb.txt
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postAutoreconf = ''
|
postAutoreconf = ''
|
||||||
|
@ -29,13 +29,13 @@ stdenv.mkDerivation rec {
|
|||||||
--replace "psselect" "${psutils}/bin/psselect"
|
--replace "psselect" "${psutils}/bin/psselect"
|
||||||
'' + stdenv.lib.optionalString (netpbm != null) ''
|
'' + stdenv.lib.optionalString (netpbm != null) ''
|
||||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||||
--replace "pnmcut" "${netpbm}/bin/pnmcut" \
|
--replace "pnmcut" "${stdenv.lib.getBin netpbm}/bin/pnmcut" \
|
||||||
--replace "pnmcrop" "${netpbm}/bin/pnmcrop" \
|
--replace "pnmcrop" "${stdenv.lib.getBin netpbm}/bin/pnmcrop" \
|
||||||
--replace "pnmtopng" "${netpbm}/bin/pnmtopng"
|
--replace "pnmtopng" "${stdenv.lib.getBin netpbm}/bin/pnmtopng"
|
||||||
substituteInPlace tmac/www.tmac \
|
substituteInPlace tmac/www.tmac \
|
||||||
--replace "pnmcrop" "${netpbm}/bin/pnmcrop" \
|
--replace "pnmcrop" "${stdenv.lib.getBin netpbm}/bin/pnmcrop" \
|
||||||
--replace "pngtopnm" "${netpbm}/bin/pngtopnm" \
|
--replace "pngtopnm" "${stdenv.lib.getBin netpbm}/bin/pngtopnm" \
|
||||||
--replace "@PNMTOPS_NOSETPAGE@" "${netpbm}/bin/pnmtops -nosetpage"
|
--replace "@PNMTOPS_NOSETPAGE@" "${stdenv.lib.getBin netpbm}/bin/pnmtops -nosetpage"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ ghostscript psutils netpbm perl ];
|
buildInputs = [ ghostscript psutils netpbm perl ];
|
||||||
|
Loading…
Reference in New Issue
Block a user