about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-02-16 00:49:28 +0100
committerGitHub <noreply@github.com>2022-02-16 00:49:28 +0100
commit5c5a8df72404bee0968947af1ae4159be1164d91 (patch)
tree894a6f236a1ca90629ca22b0cbcb2344cb33fdae
parente43b87552d411864d840204d2ad7685364ba7852 (diff)
parent507b23f0d1f21923dd29ebd889f06375c16343a0 (diff)
Merge pull request #156420 from azuwis/transfig
-rw-r--r--pkgs/applications/graphics/fig2dev/default.nix4
-rw-r--r--pkgs/applications/science/chemistry/chemtool/default.nix1
-rw-r--r--pkgs/applications/science/misc/simgrid/default.nix4
-rw-r--r--pkgs/applications/virtualization/xen/generic.nix4
-rw-r--r--pkgs/development/tools/parsing/ragel/default.nix4
-rw-r--r--pkgs/tools/graphics/transfig/default.nix63
-rw-r--r--pkgs/tools/graphics/transfig/patch-fig2dev-Imakefile.patch75
-rw-r--r--pkgs/tools/graphics/transfig/patch-fig2dev-dev-Imakefile.patch15
-rw-r--r--pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c.patch21
-rw-r--r--pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h.patch19
-rw-r--r--pkgs/tools/graphics/transfig/patch-transfig-Imakefile.patch22
-rw-r--r--pkgs/tools/typesetting/skribilo/default.nix4
-rw-r--r--pkgs/tools/typesetting/tex/dblatex/default.nix8
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix4
15 files changed, 17 insertions, 232 deletions
diff --git a/pkgs/applications/graphics/fig2dev/default.nix b/pkgs/applications/graphics/fig2dev/default.nix
index 8fa85803bfd80..984d67f6ba7b9 100644
--- a/pkgs/applications/graphics/fig2dev/default.nix
+++ b/pkgs/applications/graphics/fig2dev/default.nix
@@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
 
   GSEXE="${ghostscript}/bin/gs";
 
+  configureFlags = [ "--enable-transfig" ];
+
   postInstall = ''
     wrapProgram $out/bin/fig2ps2tex \
         --set PATH ${lib.makeBinPath [ coreutils bc gnugrep gawk ]}
@@ -36,7 +38,7 @@ stdenv.mkDerivation rec {
     description = "Tool to convert Xfig files to other formats";
     homepage = "http://mcj.sourceforge.net/";
     license = licenses.xfig;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ lesuisse ];
   };
 }
diff --git a/pkgs/applications/science/chemistry/chemtool/default.nix b/pkgs/applications/science/chemistry/chemtool/default.nix
index 3b5d144ba22ba..bf78aeb825d5d 100644
--- a/pkgs/applications/science/chemistry/chemtool/default.nix
+++ b/pkgs/applications/science/chemistry/chemtool/default.nix
@@ -46,5 +46,6 @@ stdenv.mkDerivation rec {
     '';
     license = licenses.mit;
     maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/science/misc/simgrid/default.nix b/pkgs/applications/science/misc/simgrid/default.nix
index 23815442da7e6..002c383dcaf65 100644
--- a/pkgs/applications/science/misc/simgrid/default.nix
+++ b/pkgs/applications/science/misc/simgrid/default.nix
@@ -3,7 +3,7 @@
 # Lua 5.3 needed and not available now
 #, luaSupport ? false, lua5
 , fortranSupport ? false, gfortran
-, buildDocumentation ? false, transfig, ghostscript, doxygen
+, buildDocumentation ? false, fig2dev, ghostscript, doxygen
 , buildJavaBindings ? false, openjdk
 , modelCheckingSupport ? false, libunwind, libevent, elfutils # Inside elfutils: libelf and libdw
 , debug ? false
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake perl python3 valgrind ]
       ++ optionals fortranSupport [ gfortran ]
       ++ optionals buildJavaBindings [ openjdk ]
-      ++ optionals buildDocumentation [ transfig ghostscript doxygen ]
+      ++ optionals buildDocumentation [ fig2dev ghostscript doxygen ]
       ++ optionals modelCheckingSupport [ libunwind libevent elfutils ];
 
   #buildInputs = optional luaSupport lua5;
diff --git a/pkgs/applications/virtualization/xen/generic.nix b/pkgs/applications/virtualization/xen/generic.nix
index 0a2febd0589fd..c85e70116682e 100644
--- a/pkgs/applications/virtualization/xen/generic.nix
+++ b/pkgs/applications/virtualization/xen/generic.nix
@@ -18,7 +18,7 @@ config:
 
 # Documentation
 # python2Packages.markdown
-, transfig, ghostscript, texinfo, pandoc
+, fig2dev, ghostscript, texinfo, pandoc
 
 , binutils-unwrapped
 
@@ -81,7 +81,7 @@ stdenv.mkDerivation (rec {
     python2Packages.wrapPython
 
     # Documentation
-    python2Packages.markdown transfig ghostscript texinfo pandoc
+    python2Packages.markdown fig2dev ghostscript texinfo pandoc
 
     # Others
   ] ++ (concatMap (x: x.buildInputs or []) (attrValues config.xenfiles))
diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix
index c23b352deceaf..8e000cd0fc29a 100644
--- a/pkgs/development/tools/parsing/ragel/default.nix
+++ b/pkgs/development/tools/parsing/ragel/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, transfig, tex, ghostscript, colm
+{ lib, stdenv, fetchurl, fig2dev, tex, ghostscript, colm
 , build-manual ? false
 }:
 
@@ -13,7 +13,7 @@ let
         inherit sha256;
       };
 
-      buildInputs = lib.optional build-manual [ transfig ghostscript tex ];
+      buildInputs = lib.optional build-manual [ fig2dev ghostscript tex ];
 
       preConfigure = lib.optionalString build-manual ''
         sed -i "s/build_manual=no/build_manual=yes/g" DIST
diff --git a/pkgs/tools/graphics/transfig/default.nix b/pkgs/tools/graphics/transfig/default.nix
deleted file mode 100644
index 617ecbf90ee98..0000000000000
--- a/pkgs/tools/graphics/transfig/default.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-{ lib, stdenv, fetchurl, zlib, libjpeg, libpng, imake, gccmakedep }:
-
-stdenv.mkDerivation rec {
-  pname = "transfig";
-  version = "3.2.4";
-
-  src = fetchurl {
-    url = "ftp://ftp.tex.ac.uk/pub/archive/graphics/transfig/transfig.${version}.tar.gz";
-    sha256 = "0429snhp5acbz61pvblwlrwv8nxr6gf12p37f9xxwrkqv4ir7dd4";
-  };
-
-  nativeBuildInputs = [ imake gccmakedep ];
-  buildInputs = [ zlib libjpeg libpng ];
-
-  patches = [
-    ./patch-fig2dev-dev-Imakefile.patch
-    ./patch-fig2dev-Imakefile.patch
-    ./patch-transfig-Imakefile.patch
-    ./patch-fig2dev-fig2dev.h.patch
-    ./patch-fig2dev-dev-gensvg.c.patch
-  ];
-
-  patchPhase = ''
-    runHook prePatch
-
-    configureImakefiles() {
-        local sedcmd=$1
-
-        sed "$sedcmd" fig2dev/Imakefile > tmpsed
-        cp tmpsed fig2dev/Imakefile
-
-        sed "$sedcmd" fig2dev/dev/Imakefile > tmpsed
-        cp tmpsed fig2dev/dev/Imakefile
-
-        sed "$sedcmd" transfig/Imakefile > tmpsed
-        cp tmpsed transfig/Imakefile
-    }
-
-    for i in $patches; do
-        header "applying patch $i" 3
-        patch -p0 < $i
-        stopNest
-    done
-
-    configureImakefiles "s:__PREFIX_PNG:${libpng}:"
-    configureImakefiles "s:__PREFIX:$out:"
-
-    runHook postPatch
-  '';
-
-  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
-
-  preInstall = ''
-    mkdir -p $out
-    mkdir -p $out/lib
-  '';
-
-  hardeningDisable = [ "format" ];
-
-  meta = {
-    platforms = lib.platforms.unix;
-  };
-}
diff --git a/pkgs/tools/graphics/transfig/patch-fig2dev-Imakefile.patch b/pkgs/tools/graphics/transfig/patch-fig2dev-Imakefile.patch
deleted file mode 100644
index 9c1895b15196e..0000000000000
--- a/pkgs/tools/graphics/transfig/patch-fig2dev-Imakefile.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- fig2dev/Imakefile.orig	Thu Mar 25 22:39:10 2004
-+++ fig2dev/Imakefile	Thu Mar 25 22:41:01 2004
-@@ -16,17 +16,23 @@
- XCOMM party to do so, with the only requirement being that this copyright 
- XCOMM notice remain intact.
- 
-+BINDIR = __PREFIX/bin
-+DESTDIR = __DESTROOT
-+MKDIRHIER = mkdirhier
-+MANDIR = __PREFIX/share/man/$(MANSUFFIX)
-+INSTALLFLAGS = -c
-+
- XCOMM ******
- XCOMM You should point XFIGLIBDIR to the same directory you did when you compiled
- XCOMM and installed xfig.
- 
--XFIGLIBDIR =	/usr/local/lib/X11/xfig
-+XFIGLIBDIR =	__PREFIX/lib/xfig
- 
- XCOMM ******
- XCOMM If your system has the strerror() function (doesn't have sys_errlist) then
- XCOMM comment out NEED_STRERROR with an XCOMM comment.
- 
--NEED_STRERROR = -DNEED_STRERROR
-+XCOMM NEED_STRERROR = -DNEED_STRERROR
- 
- XCOMM The following probably only applies to Windows 9x/NT:
- XCOMM If your system can open files in text and binary modes and has the
-@@ -39,7 +45,7 @@
- XCOMM inline functions. With the "INLINE" keyword, you should notice that
- XCOMM the display will be a bit faster in complex figures
- 
--XCOMM USEINLINE = -DUSE_INLINE
-+USEINLINE = -DUSE_INLINE
- 
- XCOMM ****************
- XCOMM Change RGB if necessary, to point to your rgb.txt color database
-@@ -60,8 +66,8 @@
- XCOMM are in different places
- 
- #ifdef USEPNG
--PNGLIBDIR = $(USRLIBDIR)
--PNGINC = -I/usr/include/X11
-+PNGLIBDIR = __PREFIX_PNG/lib
-+PNGINC = -I__PREFIX_PNG/include
- #endif
- 
- XCOMM ****************
-@@ -73,7 +79,7 @@
- XCOMM Change XPMINC if necessary to point to the include file for xpm (xpm.h)
- XCOMM
- 
--XCOMM #define USEXPM
-+XCOMM #define USEXPM
- 
- #ifdef USEXPM
- XPMLIBDIR = $(USRLIBDIR)
-@@ -126,7 +132,7 @@
- 
- #ifdef I18N
- I18N_DEFS = -DI18N 
--FIG2DEV_LIBDIR = /usr/local/lib/fig2dev
-+FIG2DEV_LIBDIR = __PREFIX/lib/fig2dev
- I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR=\\\"$(FIG2DEV_LIBDIR)\\\"
- 
- install::
-@@ -177,7 +183,7 @@
- 
- IMAKE_DEFINES = $(DUSEPNG) $(DUSEXPM)
- 
--DEVDEFINES = $(DUSEPNG) $(DUSEXPM) $(XPMINC) $(DDNFSS) $(DDA4) \
-+DEVDEFINES = $(DUSEPNG) $(DUSEXPM) $(PNGINC) $(XPMINC) $(DDNFSS) $(DDA4) \
- 		$(DDLATEX2E_GRAPHICS) $(DDEPSFIG) $(DDIBMGEC) $(DDDVIPS) $(I18N_DEV_DEFS)
- 
- #define IHaveSubdirs
diff --git a/pkgs/tools/graphics/transfig/patch-fig2dev-dev-Imakefile.patch b/pkgs/tools/graphics/transfig/patch-fig2dev-dev-Imakefile.patch
deleted file mode 100644
index 87f01f70d302b..0000000000000
--- a/pkgs/tools/graphics/transfig/patch-fig2dev-dev-Imakefile.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- fig2dev/dev/Imakefile.orig	Thu Mar 25 22:47:18 2004
-+++ fig2dev/dev/Imakefile	Thu Mar 25 22:47:51 2004
-@@ -18,6 +18,12 @@
- XCOMM party to do so, with the only requirement being that this copyright 
- XCOMM notice remain intact.
- 
-+BINDIR = __PREFIX/bin
-+USRLIBDIR = __PREFIX/lib
-+DESTDIR = __DESTROOT
-+MKDIRHIER = mkdirhier
-+MANDIR = __PREFIX/share/man/$(MANSUFFIX)
-+
- INCLUDES = -I.. -I../..
- 
- #ifdef USE_PNG
diff --git a/pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c.patch b/pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c.patch
deleted file mode 100644
index 5bd05c97be8e2..0000000000000
--- a/pkgs/tools/graphics/transfig/patch-fig2dev-dev-gensvg.c.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- fig2dev/dev/gensvg.c.orig	Wed Jul 23 16:39:14 2003
-+++ fig2dev/dev/gensvg.c	Wed Jul 23 16:39:52 2003
-@@ -692,16 +692,14 @@
-     if (t->angle != 0) {
- 	fprintf (tfp, "<g transform=\"translate(%d,%d) rotate(%d)\" >\n",
- 		 (int) (t->base_x * mag), (int) (t->base_y * mag), degrees (t->angle));
--	fprintf (tfp, "<text x=\"0\" y=\"0\" fill=\"#%6.6x\"  font-family=\"%s\" 
--		 font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
-+	fprintf (tfp, "<text x=\"0\" y=\"0\" fill=\"#%6.6x\"  font-family=\"%s\" font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
- 		 rgbColorVal (t->color), family[(int) ceil ((t->font + 1) / 4)],
- 		 (t->font % 2 == 0 ? "normal" : "italic"),
- 		 (t->font % 4 < 2 ? "normal" : "bold"), (int) (ceil (t->size * 12 * mag)),
- 		 anchor[t->type]);
-     }
-     else
--	fprintf (tfp, "<text x=\"%d\" y=\"%d\" fill=\"#%6.6x\"  font-family=\"%s\" 
--		 font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
-+	fprintf (tfp, "<text x=\"%d\" y=\"%d\" fill=\"#%6.6x\"  font-family=\"%s\" font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\" >\n",
- 		 (int) (t->base_x * mag), (int) (t->base_y * mag), rgbColorVal (t->color),
- 		 family[(int) ceil ((t->font + 1) / 4)],
- 		 (t->font % 2 == 0 ? "normal" : "italic"),
diff --git a/pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h.patch b/pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h.patch
deleted file mode 100644
index 3f330c164e7e7..0000000000000
--- a/pkgs/tools/graphics/transfig/patch-fig2dev-fig2dev.h.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- fig2dev/fig2dev.h.orig	Thu Dec 19 07:45:28 2002
-+++ fig2dev/fig2dev.h	Tue Jan  7 20:08:45 2003
-@@ -22,7 +22,6 @@
- #include <sys/file.h>
- #include <signal.h>
- #include <string.h>
--#include <varargs.h>
- #include <pwd.h>
- #include <errno.h>
- #include <time.h>
-@@ -210,7 +209,7 @@
- #endif /* MAXPATHLEN */
- #endif /* PATH_MAX */
- 
--#if ( !defined(__NetBSD__) && !defined(__DARWIN__))
-+#if ( !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DARWIN__))
- extern int		sys_nerr, errno;
- #endif
- 
diff --git a/pkgs/tools/graphics/transfig/patch-transfig-Imakefile.patch b/pkgs/tools/graphics/transfig/patch-transfig-Imakefile.patch
deleted file mode 100644
index 4639658dccd83..0000000000000
--- a/pkgs/tools/graphics/transfig/patch-transfig-Imakefile.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- transfig/Imakefile.orig	Thu Mar 25 22:10:42 2004
-+++ transfig/Imakefile	Thu Mar 25 22:14:04 2004
-@@ -14,11 +14,18 @@
- XCOMM party to do so, with the only requirement being that this copyright 
- XCOMM notice remain intact.
- 
-+BINDIR = __PREFIX/bin
-+USRLIBDIR = __PREFIX/lib
-+DESTDIR = __DESTROOT
-+MKDIRHIER = mkdirhier
-+MANDIR = __PREFIX/share/man/$(MANSUFFIX)
-+INSTALLFLAGS = -c
-+
- XCOMM Uncomment the USELATEX2E flag in the transfig/Imakefile file to use the
- XCOMM \\usepackage{} command for LaTeX2e. 
- XCOMM The default is to use \\documentstyle{} for LaTeX209.
- 
--XCOMM USELATEX2E = -DLATEX2E
-+USELATEX2E = -DLATEX2E
- 
- XCOMM ******* DON'T CHANGE ANYTHIN BELOW THIS POINT *******
- 
diff --git a/pkgs/tools/typesetting/skribilo/default.nix b/pkgs/tools/typesetting/skribilo/default.nix
index e80c4326651cb..85031f9008494 100644
--- a/pkgs/tools/typesetting/skribilo/default.nix
+++ b/pkgs/tools/typesetting/skribilo/default.nix
@@ -10,7 +10,7 @@
 , makeWrapper
 , pkg-config
 , ploticus
-, transfig
+, fig2dev
 , enableEmacs ? false, emacs
 , enableLout ? true, lout
 , enableTex ? true, tex
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec{
     guile-reader
     imagemagick
     ploticus
-    transfig
+    fig2dev
   ]
   ++ optional enableEmacs emacs
   ++ optional enableLout lout
diff --git a/pkgs/tools/typesetting/tex/dblatex/default.nix b/pkgs/tools/typesetting/tex/dblatex/default.nix
index dbd4fed1474d6..1411fb2d99b0e 100644
--- a/pkgs/tools/typesetting/tex/dblatex/default.nix
+++ b/pkgs/tools/typesetting/tex/dblatex/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, python3, libxslt, texlive
-, enableAllFeatures ? false, imagemagick ? null, transfig ? null, inkscape ? null, fontconfig ? null, ghostscript ? null
+, enableAllFeatures ? false, imagemagick ? null, fig2dev ? null, inkscape ? null, fontconfig ? null, ghostscript ? null
 
 , tex ? texlive.combine { # satisfy all packages that ./configure mentions
     inherit (texlive) scheme-basic epstopdf anysize appendix changebar
@@ -15,7 +15,7 @@
 
 assert enableAllFeatures ->
   imagemagick != null &&
-  transfig != null &&
+  fig2dev != null &&
   inkscape != null &&
   fontconfig != null &&
   ghostscript != null;
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ python3 libxslt tex ]
-    ++ lib.optionals enableAllFeatures [ imagemagick transfig ];
+    ++ lib.optionals enableAllFeatures [ imagemagick fig2dev ];
 
   # TODO: dblatex tries to execute texindy command, but nixpkgs doesn't have
   # that yet. In Ubuntu, texindy is a part of the xindy package.
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
             -e 's|"fc-match"|"${fontconfig.bin}/bin/fc-match"|g' \
             -e 's|"fc-list"|"${fontconfig.bin}/bin/fc-list"|g' \
             -e 's|cmd = "inkscape|cmd = "${inkscape}/bin/inkscape|g' \
-            -e 's|cmd = "fig2dev|cmd = "${transfig}/bin/fig2dev|g' \
+            -e 's|cmd = "fig2dev|cmd = "${fig2dev}/bin/fig2dev|g' \
             -e 's|cmd = \["ps2pdf|cmd = ["${ghostscript}/bin/ps2pdf|g' \
             -e 's|cmd = "convert|cmd = "${imagemagick.out}/bin/convert|g' \
             -i "$file"
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index 8c503ee782dcb..afce83f9c5e06 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -1189,6 +1189,7 @@ mapAliases ({
   torch-repl = throw "torch-repl has been removed, as the upstream project has been abandoned"; # Added 2020-03-28
   torchPackages = throw "torchPackages has been removed, as the upstream project has been abandoned"; # Added 2020-03-28
   trang = jing-trang; # Added 2018-04-25
+  transfig = fig2dev; # Added 2022-02-15
   transmission-remote-cli = "transmission-remote-cli has been removed, as the upstream project has been abandoned. Please use tremc instead"; # Added 2020-10-14
   transmission_gtk = transmission-gtk; # Added 2018-01-06
   transmission_remote_gtk = transmission-remote-gtk; # Added 2018-01-06
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1ba2f12c46f9b..2745bbbf14beb 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10960,10 +10960,6 @@ with pkgs;
 
   ts = callPackage ../tools/system/ts { };
 
-  transfig = callPackage ../tools/graphics/transfig {
-    libpng = libpng12;
-  };
-
   ttmkfdir = callPackage ../tools/misc/ttmkfdir { };
 
   ttwatch = callPackage ../tools/misc/ttwatch { };