Re: Update: graphics/dpic 2014.01.01 -> 2017.08.01

2017-09-08 Thread Anthony J. Bentley
Nigel Taylor writes:
> On 08/27/17 23:27, Nigel Taylor wrote:
> > On 08/23/17 22:47, Nigel Taylor wrote:
> >> On 08/23/17 20:58, Nigel Taylor wrote:
> >>> Hasn't been updated in a while.
> >>>
> >>> patched for clang
> >>> tests added, by running all examples, requires manual checks of results
> >>> afterwards.
> >>>
> >>> Tried only on amd64.
> >>>
> >>> Ok?
> >>>
> >>>
> >> Missed the attachment again.
> >>
> > Ok?
> > 
> > 
>
> Ping

ok bentley@



Re: Update: graphics/dpic 2014.01.01 -> 2017.08.01

2017-09-07 Thread Nigel Taylor
On 08/27/17 23:27, Nigel Taylor wrote:
> On 08/23/17 22:47, Nigel Taylor wrote:
>> On 08/23/17 20:58, Nigel Taylor wrote:
>>> Hasn't been updated in a while.
>>>
>>> patched for clang
>>> tests added, by running all examples, requires manual checks of results
>>> afterwards.
>>>
>>> Tried only on amd64.
>>>
>>> Ok?
>>>
>>>
>> Missed the attachment again.
>>
> Ok?
> 
> 

Ping



Re: Update: graphics/dpic 2014.01.01 -> 2017.08.01

2017-08-27 Thread Nigel Taylor
On 08/23/17 22:47, Nigel Taylor wrote:
> On 08/23/17 20:58, Nigel Taylor wrote:
>> Hasn't been updated in a while.
>>
>> patched for clang
>> tests added, by running all examples, requires manual checks of results
>> afterwards.
>>
>> Tried only on amd64.
>>
>> Ok?
>>
>>
> Missed the attachment again.
> 
Ok?



Re: Update: graphics/dpic 2014.01.01 -> 2017.08.01

2017-08-23 Thread Nigel Taylor
On 08/23/17 20:58, Nigel Taylor wrote:
> Hasn't been updated in a while.
> 
> patched for clang
> tests added, by running all examples, requires manual checks of results
> afterwards.
> 
> Tried only on amd64.
> 
> Ok?
> 
> 
Missed the attachment again.
Index: Makefile
===
RCS file: /home/cvs/ports/graphics/dpic/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile	23 Oct 2014 13:43:04 -	1.5
+++ Makefile	6 Aug 2017 12:47:10 -
@@ -2,8 +2,7 @@
 
 COMMENT =		pic-like interpreter for producing line graphics
 
-DISTNAME =		dpic-2014.Jan.01
-PKGNAME =		${DISTNAME:S/Jan/01/}
+DISTNAME =		dpic-2017.08.01
 
 CATEGORIES =		graphics
 
@@ -13,18 +12,26 @@ HOMEPAGE =		https://ece.uwaterloo.ca/~ap
 PERMIT_PACKAGE_CDROM =	Yes
 
 WANTLIB +=		c m
-WRKDIST =		${WRKDIR}/dpic
 
 ALL_TARGET =		dpic
 
 MASTER_SITES =		${HOMEPAGE}
 
+
+TEST_DEPENDS =		print/texlive/base \
+			print/texlive/texmf,-main
+
+CONFIGURE_STYLE =	gnu
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/dpic ${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/doc/dpic.1 ${PREFIX}/man/man1
 	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dpic/
-	cd ${WRKSRC}/examples/ && pax -rw * ${PREFIX}/share/examples/dpic/
+	cd ${WRKSRC}/examples/ && \
+		pax -rw sources Examples.txt Makefile README ${PREFIX}/share/examples/dpic/
 
-NO_TEST =		Yes
+do-test:
+	cd ${WRKSRC}/examples/ && \
+	make -e DPIC=${WRKSRC}/dpic all
 
 .include 
Index: distinfo
===
RCS file: /home/cvs/ports/graphics/dpic/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo	23 Oct 2014 13:43:05 -	1.4
+++ distinfo	5 Aug 2017 07:00:52 -
@@ -1,2 +1,2 @@
-SHA256 (dpic-2014.Jan.01.tar.gz) = Bb5z+hrYrkPonP4cDqkF0RtL5eezWcbn805Rpx6nv8U=
-SIZE (dpic-2014.Jan.01.tar.gz) = 584351
+SHA256 (dpic-2017.08.01.tar.gz) = 0GbWBx4BNqqJpYiiWAuMcFdKg29a7PbOFfRBbV923j0=
+SIZE (dpic-2017.08.01.tar.gz) = 1246842
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile	23 Oct 2014 13:43:05 -	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.3 2014/10/23 13:43:05 nigel Exp $
-Honour CC and CFLAGS
 Makefile.orig	Mon May 16 13:59:42 2011
-+++ Makefile	Sun Mar 17 23:54:29 2013
-@@ -44,8 +44,8 @@ DEST = ${DESTDIR}/${PREFIX}/bin
- # CC=xlc
- 
- # other.  cc usually works too.
--CFLAGS += $(DEFINEA) $(DEFINEB) $(SAFEMODE) -O
--CC=gcc
-+CFLAGS += $(DEFINEA) $(DEFINEB) $(SAFEMODE)
-+CC?=gcc
- # CC?=gcc
- 
- OBJECTS = dpic.o p2clib.o
Index: patches/patch-Makefile_in
===
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null	1 Jan 1970 00:00:00 -
+++ patches/patch-Makefile_in	23 Jul 2017 16:20:22 -
@@ -0,0 +1,27 @@
+$OpenBSD$
+Index: Makefile.in
+--- Makefile.in.orig
 Makefile.in
+@@ -1,10 +1,9 @@
+ # For Linux (expects "make DESTDIR=xxx PREFIX=yyy install"):
+ DESTDIR = /usr
+-PREFIX = .
+-DEST = ${DESTDIR}/${PREFIX}/bin
++DEST = ${PREFIX}/bin
+ 
+-MANDIR = $(DESTDIR)/$(PREFIX)/share/man/man1
+-DOCDIR = $(DESTDIR)/$(PREFIX)/share/doc/dpic
++MANDIR = $(PREFIX)/share/man/man1
++DOCDIR = $(PREFIX)/share/doc/dpic
+ 
+ #---
+ 
+@@ -47,7 +46,7 @@ installdocs: doc/dpicdoc.pdf
+ 	install -m 644 doc/dpicdoc.pdf $(DOCDIR)
+ 	install -m 644 doc/dpictools.pic $(DOCDIR)
+ #	install -m 644 doc/dpic.1 $(SPECMANDIR)
+-	cat doc/dpic.1 | gzip > $(MANDIR)/dpic.1.gz
++	install -m 644 doc/dpic.1 $(MANDIR)
+ #Ubuntu files:
+ #/usr/bin/dpic
+ #/usr/share/doc/dpic/CHANGES.gz
Index: patches/patch-dpic_c
===
RCS file: patches/patch-dpic_c
diff -N patches/patch-dpic_c
--- /dev/null	1 Jan 1970 00:00:00 -
+++ patches/patch-dpic_c	5 Aug 2017 07:03:05 -
@@ -0,0 +1,244 @@
+$OpenBSD$
+Index: dpic.c
+--- dpic.c.orig
 dpic.c
+@@ -1241,11 +1241,11 @@ void wfloat(FILE **iou, double y)
+ { char buf[25];
+   int i;
+   if (fabs(y)==distmax)
+- sprintf(buf,"%24.6e", y);
++ snprintf(buf,sizeof(buf), "%24.6e", y);
+   else if (y >= 0.0)
+- sprintf(buf,"%24.6f", floor( 100*y+0.5)/100.0 );
++ snprintf(buf,sizeof(buf), "%24.6f", floor( 100*y+0.5)/100.0 );
+   else
+- sprintf(buf,"%24.6f",-floor(-100*y+0.5)/100.0 );
++ snprintf(buf,sizeof(buf), "%24.6f",-floor(-100*y+0.5)/100.0 );
+   for (i=23; buf[i]=='0'; ) i-- ;
+   if (buf[i]=='.') buf[i] = (char)0;
+   else buf[i+1] = (char)0;
+@@ -1897,7 +1897,7 @@ boolean drawn(primitive *node, int linesp, double fill
+   return true;
+   }
+   else if (linesp == XLdotted || linesp == XLdashed || linesp == XLsolid ||
+-	   fill >= 0.0 && fill <= 1.0) {
++	   (fill >= 0.0 && fill <= 1.0)) {
+  

Update: graphics/dpic 2014.01.01 -> 2017.08.01

2017-08-23 Thread Nigel Taylor
Hasn't been updated in a while.

patched for clang
tests added, by running all examples, requires manual checks of results
afterwards.

Tried only on amd64.

Ok?