aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/gladtex
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/gladtex')
-rw-r--r--textproc/gladtex/Makefile43
-rw-r--r--textproc/gladtex/distinfo3
-rw-r--r--textproc/gladtex/files/patch-Makefile26
-rw-r--r--textproc/gladtex/files/patch-eqn2img.c21
-rw-r--r--textproc/gladtex/files/patch-gladtex15
-rw-r--r--textproc/gladtex/pkg-descr5
-rw-r--r--textproc/gladtex/pkg-plist5
7 files changed, 118 insertions, 0 deletions
diff --git a/textproc/gladtex/Makefile b/textproc/gladtex/Makefile
new file mode 100644
index 000000000000..63de20d0a2e1
--- /dev/null
+++ b/textproc/gladtex/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: gladtex
+# Date created: 2006-02-04
+# Whom: Nicola Vitale <nivit@email.it>
+#
+# $FreeBSD$
+#
+
+PORTNAME= gladtex
+PORTVERSION= 0.3
+CATEGORIES= textproc math www
+MASTER_SITES= http://www.math.uio.no/~martingu/gladtex/dl/ \
+ http://nivi.interfree.it/distfiles/${PORTNAME}/
+
+MAINTAINER= nivit@email.it
+COMMENT= A program to replace LaTeX formulas in HTML files with images
+
+LIB_DEPENDS= ungif.5:${PORTSDIR}/graphics/libungif \
+ png.5:${PORTSDIR}/graphics/png
+RUN_DEPENDS= latex:${PORTSDIR}/print/teTeX \
+ dvips:${PORTSDIR}/print/dvipsk-tetex
+
+USE_PERL5_RUN= yes
+
+BINPATH= ${PREFIX}/bin
+INCPATH= -I${LOCALBASE}/include
+LIBPATH= -L${LOCALBASE}/lib
+
+MAKE_ENV+= BINPATH=${BINPATH} INCPATH=${INCPATH} LIBPATH=${LIBPATH}
+
+DOCSFILES= README
+
+post-extract:
+ @@cd ${WRKSRC};
+ ${RM} -f eqn2img
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @cd ${WRKSRC}; \
+ ${MKDIR} ${DOCSDIR}; \
+ ${INSTALL_DATA} ${DOCSFILES} ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/textproc/gladtex/distinfo b/textproc/gladtex/distinfo
new file mode 100644
index 000000000000..258e15b45e3b
--- /dev/null
+++ b/textproc/gladtex/distinfo
@@ -0,0 +1,3 @@
+MD5 (gladtex-0.3.tar.gz) = f01aa455cc4de0bd5b937255fb8142d9
+SHA256 (gladtex-0.3.tar.gz) = 8d6204427f3bcefd26a00b971683a4479fdf1a04a2176d2a60983bde239ef9b8
+SIZE (gladtex-0.3.tar.gz) = 29730
diff --git a/textproc/gladtex/files/patch-Makefile b/textproc/gladtex/files/patch-Makefile
new file mode 100644
index 000000000000..af539c45f66f
--- /dev/null
+++ b/textproc/gladtex/files/patch-Makefile
@@ -0,0 +1,26 @@
+$FreeBSD$
+--- Makefile Wed Oct 30 13:24:34 2002
++++ Makefile.port Sat Feb 4 21:43:23 2006
+@@ -1,14 +1,17 @@
+-BINPATH = /usr/local/bin
++BINPATH?= /usr/local/bin
++LIBPATH?= /usr/local/lib
++INCPATH?= /usr/local/include
+
+-CC = gcc -O2 -DGIF
+-LIB = -lm -lz -lungif -lpng
++CC = gcc
++CFLAGS+= -DGIF ${INCPATH}
++LIB = -lm -lz ${LIBPATH} -lungif -lpng
+ OBJ = eqn2img.o
+
+ all: ${OBJ}
+- ${CC} -o eqn2img ${LIB} ${OBJ}
++ ${CC} ${CFLAGS} -o eqn2img ${LIB} ${OBJ}
+
+ eqn2img.o: eqn2img.c
+- ${CC} -c eqn2img.c
++ ${CC} ${CFLAGS} -c eqn2img.c
+
+ install: all
+ install -m 755 -s eqn2img ${BINPATH}
diff --git a/textproc/gladtex/files/patch-eqn2img.c b/textproc/gladtex/files/patch-eqn2img.c
new file mode 100644
index 000000000000..f49db0a4a36c
--- /dev/null
+++ b/textproc/gladtex/files/patch-eqn2img.c
@@ -0,0 +1,21 @@
+$FreeBSD$
+--- eqn2img.c Tue Nov 5 18:10:13 2002
++++ eqn2img.c.port Sat Feb 4 21:29:22 2006
+@@ -675,7 +675,7 @@
+ fprintf(stderr, " -> ps");
+
+ cmd = NEW(char, 2*strlen(basename) + 35);
+- sprintf(cmd, "dvips -E -o %s.ps %s.dvi &> /dev/null", basename, basename);
++ sprintf(cmd, "dvips -q -E -o %s.ps %s.dvi", basename, basename);
+ if(system(cmd)) {
+ fprintf(stderr, "\nError running dvips\n");
+ return -1;
+@@ -714,7 +714,7 @@
+ basename, dpi*supersample, xsize, ysize, basename);
+ gs = popen(cmd, "w");
+ fprintf(gs, "%i neg %i neg translate\n", xoffset, yoffset);
+- fclose(gs);
++ pclose(gs);
+ sprintf(cmd, "%s.ps", basename);
+ unlink(cmd);
+ free(cmd);
diff --git a/textproc/gladtex/files/patch-gladtex b/textproc/gladtex/files/patch-gladtex
new file mode 100644
index 000000000000..ce4d6fdef7ec
--- /dev/null
+++ b/textproc/gladtex/files/patch-gladtex
@@ -0,0 +1,15 @@
+$FreeBSD$
+--- gladtex Tue Nov 5 18:07:14 2002
++++ gladtex.port Sat Feb 4 21:37:09 2006
+@@ -116,9 +116,9 @@
+ # remove ./
+ $dest =~ s/\.\///g;
+ # remove //
+- while($dest =~ s{//}{/}gc) {};
++ while($dest =~ s{//}{/}g) {};
+ # remove ../
+- while($dest =~ s{/([^/]*/)\.\./}{$1}gc) {};
++ while($dest =~ s{/([^/]*/)\.\./}{$1}g) {};
+ # remove trailing /
+ $dest =~ s/\/$//;
+
diff --git a/textproc/gladtex/pkg-descr b/textproc/gladtex/pkg-descr
new file mode 100644
index 000000000000..e9661b6aff0d
--- /dev/null
+++ b/textproc/gladtex/pkg-descr
@@ -0,0 +1,5 @@
+Gladtex reads a 'htex' file (html with LaTeX maths embedded in <EQ></EQ>)
+and produces html with equations substituted by images.
+
+Author: Martin G. Gulbrandsen <martingu@math.uio.no>
+WWW: http://www.math.uio.no/~martingu/gladtex/
diff --git a/textproc/gladtex/pkg-plist b/textproc/gladtex/pkg-plist
new file mode 100644
index 000000000000..3605fcd1d29d
--- /dev/null
+++ b/textproc/gladtex/pkg-plist
@@ -0,0 +1,5 @@
+@comment $FreeBSD$
+bin/gladtex
+bin/eqn2img
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%@dirrm %%DOCSDIR%%