pngpp: darwin support
1) Building with clang is addressed by navigating a minor #if in some of the code. 2) I noticed that even when things were building correctly, passing `${out}` as a variable assignment to `make` was actually not working: there were compiler warnings about missing include directories whose bogus paths involved the literal string `out`. I ended up fixing this by performing the assignment to the make variable `PREFIX` in the `Makefile` itself.
This commit is contained in:
parent
310ad4345b
commit
ed559bf5d3
@ -21,13 +21,17 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postCheck = "cat test/test.log";
|
postCheck = "cat test/test.log";
|
||||||
|
|
||||||
buildInputs = [ ]
|
buildInputs = stdenv.lib.optional docSupport doxygen;
|
||||||
++ stdenv.lib.optional docSupport doxygen;
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ libpng ];
|
propagatedBuildInputs = [ libpng ];
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=\${out}" ]
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
++ stdenv.lib.optional docSupport "docs";
|
substituteInPlace error.hpp --replace "#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE" "#if (__clang__ || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE"
|
||||||
|
'' + ''
|
||||||
|
sed "s|\(PNGPP := .\)|PREFIX := ''${out}\n\\1|" -i Makefile
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeFlags = stdenv.lib.optional docSupport "docs";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -35,7 +39,7 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = http://www.nongnu.org/pngpp/;
|
homepage = http://www.nongnu.org/pngpp/;
|
||||||
description = "C++ wrapper for libpng library";
|
description = "C++ wrapper for libpng library";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.ramkromberg ];
|
maintainers = [ maintainers.ramkromberg ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user