Merge pull request #419 from MarcWeber/submit/lprof

lprof: add
This commit is contained in:
Vladimír Čunát 2013-04-03 08:15:30 -07:00
commit 96d5b0fc26
3 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,46 @@
{ stdenv, fetchurl, scons, qt3, lcms1, libtiff, vigra }:
/* how to calibrate your monitor:
Eg see https://wiki.archlinux.org/index.php/ICC_Profiles#Loading_ICC_Profiles
*/
stdenv.mkDerivation {
name = "lprof-1.11.4.1";
buildInputs = [ scons qt3 lcms1 libtiff vigra ];
preConfigure = ''
export QTDIR=${qt3}
export qt_directory=${qt3}
'';
src = fetchurl {
url = mirror://sourceforge/lprof/lprof/lprof-1.11.4/lprof-1.11.4.1.tar.gz;
sha256 = "0q8x24fm5yyvm151xrl3l03p7hvvciqnkbviprfnvlr0lyg9wsrn";
};
# The sed commands disable header checks and add LDFLAGS NIX_CFLAGS_COMPILE
# to the gcc environment
buildPhase = ''
mkdir -p $out
export CXX=g++
sed -i SConstruct \
-e 's/def CheckForQt(context):/def CheckForQt(context):\n return 1/' \
-e "s/not config.CheckHeader('lcms.h')/False/" \
-e "s/not config.CheckHeader('tiff.h')/False/" \
-e "s/not config.CheckCXXHeader('vigra\/impex.hxx')/False/" \
\
-e "s/^\( 'LDFLAGS'.*\)/\1\n,'NIX_CFLAGS_COMPILE' : os.environ['NIX_CFLAGS_COMPILE']/" \
-e "s/^\( 'LDFLAGS'.*\)/\1\n,'NIX_LDFLAGS' : os.environ['NIX_LDFLAGS']/"
scons PREFIX=$out SYSLIBS=1 install
'';
installPhase = ":";
patches = [ ./lcms-1.17.patch ];
meta = {
description = "Little CMS ICC profile construction set";
homepage = "http://sourceforge.net/projects/lprof";
license = stdenv.lib.licenses.gpl2;
};
}

View File

@ -0,0 +1,13 @@
--- a/src/liblprof/lcmsprf.h 2007-08-31 15:36:20.000000000 -0700
+++ b/src/liblprof/lcmsprf.h 2007-08-31 15:37:39.000000000 -0700
@@ -67,6 +67,9 @@
#define mmax(a,b) ((a) > (b)?(a):(b))
#endif
+#if LCMS_VERSION > 116
+typedef int BOOL;
+#endif
/* Misc operations ------------------------------------------------------------------------ */

View File

@ -772,6 +772,8 @@ let
libbsd = callPackage ../development/libraries/libbsd { };
lprof = callPackage ../tools/graphics/lprof { };
flvtool2 = callPackage ../tools/video/flvtool2 { };
fontforge = lowPrio (callPackage ../tools/misc/fontforge { });