summaryrefslogtreecommitdiff
path: root/textproc/mendexk
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2014-02-13 00:58:22 +0000
committerminskim <minskim@pkgsrc.org>2014-02-13 00:58:22 +0000
commitd33b9ef8cdb505621881e7876763fa16dca95714 (patch)
tree680fae88a7bb5a319bfa3b4895e7f1ef47b53753 /textproc/mendexk
parent83d055b7031f54028df28877c03fcac7bfe80c76 (diff)
downloadpkgsrc-d33b9ef8cdb505621881e7876763fa16dca95714.tar.gz
Fix Debian Bug #534641. Patch from TeX Live repo.
Suggested by Makoto Fujiwara.
Diffstat (limited to 'textproc/mendexk')
-rw-r--r--textproc/mendexk/Makefile4
-rw-r--r--textproc/mendexk/distinfo3
-rw-r--r--textproc/mendexk/patches/patch-fwrite.c25
3 files changed, 29 insertions, 3 deletions
diff --git a/textproc/mendexk/Makefile b/textproc/mendexk/Makefile
index b234e983825..148c866af0f 100644
--- a/textproc/mendexk/Makefile
+++ b/textproc/mendexk/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2013/12/06 02:36:54 minskim Exp $
+# $NetBSD: Makefile,v 1.5 2014/02/13 00:58:22 minskim Exp $
DISTNAME= texlive-20130530-source
PKGNAME= mendexk-2.6f
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= textproc
MASTER_SITES= ftp://tug.org/historic/systems/texlive/2013/
EXTRACT_SUFX= .tar.xz
diff --git a/textproc/mendexk/distinfo b/textproc/mendexk/distinfo
index 2aac64ab01c..af64c722eb7 100644
--- a/textproc/mendexk/distinfo
+++ b/textproc/mendexk/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2013/12/06 02:36:54 minskim Exp $
+$NetBSD: distinfo,v 1.4 2014/02/13 00:58:22 minskim Exp $
SHA1 (texlive-20130530-source.tar.xz) = 42f0a6fa3f49435991182f14e01276b2ee3fce61
RMD160 (texlive-20130530-source.tar.xz) = 2d779ae5de979be86a9258b224dfc15cbcd76b18
Size (texlive-20130530-source.tar.xz) = 179963948 bytes
+SHA1 (patch-fwrite.c) = 39b81b60edd4d056260723962879aff6b340a677
diff --git a/textproc/mendexk/patches/patch-fwrite.c b/textproc/mendexk/patches/patch-fwrite.c
new file mode 100644
index 00000000000..29901ca6095
--- /dev/null
+++ b/textproc/mendexk/patches/patch-fwrite.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-fwrite.c,v 1.1 2014/02/13 00:58:22 minskim Exp $
+
+Fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534641.
+Patch from TeX Live svn r31621.
+
+--- fwrite.c.orig 2012-10-16 08:06:04.000000000 +0000
++++ fwrite.c
+@@ -15,7 +15,7 @@ static int range_check(struct index ind,
+ static void linecheck(char *lbuff, char *tmpbuff);
+ static void crcheck(char *lbuff, FILE *fp);
+
+-#define TAIL(x) (x+strlen(x))
++#define TAIL(x) ((x)+strlen(x))
+
+ /* if we don't have vsnprintf() */
+ /* #define vsnprintf(buff,len,format,argptr) vsprintf(buff,format,argptr) */
+@@ -385,7 +385,7 @@ static int range_check(struct index ind,
+ }
+ if (strlen(ind.p[j].enc)>0) {
+ sprintf(tmpbuff,"%s%s%s",encap_prefix,ind.p[j].enc,encap_infix);
+- sprintf(tmpbuff,"%s%s%s",ind.p[j].page,encap_suffix,delim_n);
++ sprintf(TAIL(tmpbuff),"%s%s%s",ind.p[j].page,encap_suffix,delim_n);
+ linecheck(lbuff,tmpbuff);
+ }
+ }