transfig: Remove package, replaced with fig2dev

This commit is contained in:
Zhong Jianxin 2022-01-24 10:41:34 +08:00
parent e8f3914985
commit 12f6d0d3a0
6 changed files with 0 additions and 215 deletions

View file

@ -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;
};
}

View file

@ -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

View file

@ -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

View file

@ -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"),

View file

@ -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

View file

@ -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 *******