diff --git a/pkgs/tools/graphics/ploticus/builder.sh b/pkgs/tools/graphics/ploticus/builder.sh deleted file mode 100644 index 2fb16b259bdc..000000000000 --- a/pkgs/tools/graphics/ploticus/builder.sh +++ /dev/null @@ -1,33 +0,0 @@ -source $stdenv/setup - -preBuild() { - cd src -} - -preInstall() { - mkdir -p $out/bin -} - -postInstall() { - # Install the "prefabs". - mkdir -p $out/share/ploticus/prefabs && \ - cd .. && \ - cp -rv prefabs/* $out/share/ploticus/prefabs - - # Create a wrapper that knows where to find them. Debian's package - # does something similar by patching directly the C file that looks - # for `$PLOTICUS_PREFABS'. - cat > $out/bin/ploticus < + #include "plg.h" + +-#define PREFABS_DIR "" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */ ++#define PREFABS_DIR "@out@/share/ploticus/prefabs" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */ + + #define PLVERSION "2.42-May2013" /* see also the Copyright page, and page headers and footers */ + diff --git a/pkgs/tools/graphics/ploticus/use-gd-package.patch b/pkgs/tools/graphics/ploticus/use-gd-package.patch new file mode 100644 index 000000000000..9a72489ddaad --- /dev/null +++ b/pkgs/tools/graphics/ploticus/use-gd-package.patch @@ -0,0 +1,34 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -91,10 +91,10 @@ + + + ########### Option 1: use bundled GD16 (PNG only). Requires libpng and zlib. +-exetarget: plpng +-GD16LIBS = -lpng -lz +-GD16H = -I/usr/local/include +-ZFLAG = -DWZ ++# exetarget: plpng ++# GD16LIBS = -lpng -lz ++# GD16H = -I/usr/local/include ++# ZFLAG = -DWZ + ### These should remain commented unless your libs are not in usual places, then alter to suit... + ### GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a + ### GD16H = -I/home/scg/lib +@@ -111,11 +111,11 @@ + + ########### Option 4: use your own GD resource with FreeType2 (ttf) fonts enabled. + ########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype +-# exetarget: plgd18 +-# GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype +-# GD18H = +-# GDFREETYPE = -DGDFREETYPE +-# ZFLAG = -DWZ ++exetarget: plgd18 ++GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype ++GD18H = ++GDFREETYPE = -DGDFREETYPE ++ZFLAG = -DWZ + + ########### Option 5: don't use GD at all. + # exetarget: plnogd