Update to dpic-2021.01.01 (fixes for -fno-common)

This commit is contained in:
jca 2021-02-22 22:44:27 +00:00
parent 05687123a7
commit 7e6a7df4dd
5 changed files with 26 additions and 52 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.9 2020/04/01 15:42:40 fcambus Exp $
# $OpenBSD: Makefile,v 1.10 2021/02/22 22:44:27 jca Exp $
COMMENT = pic-like interpreter for producing line graphics
DISTNAME = dpic-2020.03.01
DISTNAME = dpic-2021.01.01
CATEGORIES = graphics
@ -27,7 +27,7 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/doc/dpic.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dpic/
cd ${WRKSRC}/examples/ && \
pax -rw sources Examples.txt Makefile README ${PREFIX}/share/examples/dpic/
pax -rw sources Examples.txt Makefile README.txt ${PREFIX}/share/examples/dpic/
do-test:
cd ${WRKSRC}/examples/ && \

View File

@ -1,2 +1,2 @@
SHA256 (dpic-2020.03.01.tar.gz) = shoEFOEl8/fNxfdnDRuT2X5Q3njFfgacz75xlCpaQfE=
SIZE (dpic-2020.03.01.tar.gz) = 890473
SHA256 (dpic-2021.01.01.tar.gz) = vrBiTQqdaIslDd/WWMbdgornRkZmC2m+RF2J78F5Pm8=
SIZE (dpic-2021.01.01.tar.gz) = 918686

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-Makefile_in,v 1.3 2021/02/22 22:44:27 jca Exp $
Respect CFLAGS
Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
@@ -41,7 +41,7 @@ DEFS= @defrand@ @defno_snprintf@ @safe_mode@
LIBS += -lm @iberty@
CC=@CC@
-CFLAGS += $(DEBUG) $(SAFEMODE) $(DEFS) -O
+CFLAGS += $(DEBUG) $(SAFEMODE) $(DEFS)
LDFLAGS += $(LIBS)
CPPFLAGS +=

View File

@ -1,45 +0,0 @@
$OpenBSD: patch-pdf_c,v 1.2 2020/04/01 15:42:40 fcambus Exp $
Index: pdf.c
--- pdf.c.orig
+++ pdf.c
@@ -154,7 +154,7 @@ pdfwfloat (double y) {
ix = ixd;
} while ((ix != 0) || (j <= 6));
for (j = 1; j <= ln; j++) {
- sprintf (STR1, "%c", ts[ln - j]);
+ snprintf (STR1, sizeof(STR1), "%c", ts[ln - j]);
pdfstream (STR1, 1, &cx);
}
}
@@ -311,10 +311,10 @@ pdfwstring (nametype * p) {
iswhite = ((c == etxch) || (c == nlch) || (c == tabch) || (c == ' '));
if ((!iswhite) || (!waswhite)) {
if ((c == bslch) || (c == ')') || (c == '(')) {
- sprintf (STR1, "%c", bslch);
+ snprintf (STR1, sizeof(STR1), "%c", bslch);
pdfstream (STR1, 1, &cx);
}
- sprintf (STR1, "%c", c);
+ snprintf (STR1, sizeof(STR1), "%c", c);
pdfstream (STR1, 1, &cx);
}
waswhite = iswhite;
@@ -850,7 +850,7 @@ pdfdraw (primitive * node) {
pdfwpos (node->Upr.Uline.endpos);
pdfstream (" l", 2, &cx);
if (node->son != NULL) {
- sprintf (STR1, "%c", nlch);
+ snprintf (STR1, sizeof(STR1), "%c", nlch);
pdfstream (STR1, 1, &cx);
} else {
pdfwln (" S", 2, &cx);
@@ -929,7 +929,7 @@ pdfdraw (primitive * node) {
case XLaTeX:
if (node->textp != NULL) {
pdfwstring (node->textp);
- sprintf (STR1, "%c", nlch);
+ snprintf (STR1, sizeof(STR1), "%c", nlch);
pdfstream (STR1, 1, &cx);
}
break;

View File

@ -1,11 +1,12 @@
@comment $OpenBSD: PLIST,v 1.3 2019/10/17 20:44:24 fcambus Exp $
@comment $OpenBSD: PLIST,v 1.4 2021/02/22 22:44:27 jca Exp $
@bin bin/dpic
@man man/man1/dpic.1
share/examples/dpic/
share/examples/dpic/Examples.txt
share/examples/dpic/Makefile
share/examples/dpic/README
share/examples/dpic/README.txt
share/examples/dpic/sources/
share/examples/dpic/sources/Zalgebra.pic
share/examples/dpic/sources/arcs.pic
share/examples/dpic/sources/arrowheads.pic
share/examples/dpic/sources/arrows.pic
@ -20,6 +21,7 @@ share/examples/dpic/sources/diag9.pic
share/examples/dpic/sources/diagA.pic
share/examples/dpic/sources/diagB.pic
share/examples/dpic/sources/diagC.pic
share/examples/dpic/sources/dpictools.pic
share/examples/dpic/sources/man.tex
share/examples/dpic/sources/man01.pic
share/examples/dpic/sources/man02.pic
@ -61,6 +63,7 @@ share/examples/dpic/sources/man47.pic
share/examples/dpic/sources/man48.pic
share/examples/dpic/sources/man49.pic
share/examples/dpic/sources/mode.tex
share/examples/dpic/sources/plotlib.pic
share/examples/dpic/sources/test1.tex
share/examples/dpic/sources/test2.tex
share/examples/dpic/sources/test3.tex