From tkato432@yahoo.com  Mon Oct  7 18:01:03 2013
Return-Path: <tkato432@yahoo.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 8AE6DD90
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon,  7 Oct 2013 18:00:53 +0000 (UTC)
	(envelope-from tkato432@yahoo.com)
Received: from omta02.auone-net.jp (mail-or2-f145.auone-net.jp [111.87.219.145])
	by mx1.freebsd.org (Postfix) with ESMTP id 4ABBB2624
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon,  7 Oct 2013 18:00:53 +0000 (UTC)
Received: from coppermine.my.domain (ZT029202.ppp.dion.ne.jp [59.128.29.202])
	by omta02.auone-net.jp (au one net mail) with ESMTP id 29EC41560095
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue,  8 Oct 2013 03:00:48 +0900 (JST)
Message-Id: <20131008025106.450f37bea44e6fd1cdb9fed1@yahoo.com>
Date: Tue, 8 Oct 2013 02:51:06 +0900
From: KATO Tsuguru <tkato432@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: science/qcl: Update to version 0.6.3

>Number:         182800
>Category:       ports
>Synopsis:       science/qcl: Update to version 0.6.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 07 18:10:01 UTC 2013
>Closed-Date:    Wed Oct 30 17:57:53 UTC 2013
>Last-Modified:  Wed Oct 30 18:00:00 UTC 2013
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
- Update to version 0.6.3

New file:
files/patch-options.cc

Remove file:
files/patch-aa
files/patch-qc-Makefile
pkg-plist

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/science/qcl/Makefile science/qcl/Makefile
--- /usr/ports/science/qcl/Makefile	2013-09-22 01:15:06.000000000 +0900
+++ science/qcl/Makefile	2013-10-08 00:00:00.000000000 +0900
@@ -2,17 +2,57 @@
 # $FreeBSD: head/science/qcl/Makefile 327767 2013-09-20 22:48:30Z bapt $
 
 PORTNAME=	qcl
-PORTVERSION=	0.6.1
+PORTVERSION=	0.6.3
 CATEGORIES=	science math
 MASTER_SITES=	http://tph.tuwien.ac.at/~oemer/tgz/
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A quantum computer simulator
+COMMENT=	Quantum computer simulator
+
+LICENSE=	GPLv2 # (or later)
+
+OPTIONS_DEFINE=	PLOTUTILS
+PLOTUTILS_DESC=	Plotting support via plotutils
 
 NO_STAGE=	yes
-do-configure:
-	echo 'PREFIX=${PREFIX}' >>${WRKSRC}/Makefile
-	cd ${WRKSRC} && make dep
+
+USES=		bison gmake readline
+USE_GCC=	any
+
+PLIST_FILES=	bin/qcl \
+		%%DATADIR%%/default.qcl %%DATADIR%%/deutsch.qcl \
+		%%DATADIR%%/dft.qcl %%DATADIR%%/examples.qcl \
+		%%DATADIR%%/grover.qcl %%DATADIR%%/linalg.qcl \
+		%%DATADIR%%/modarith.qcl %%DATADIR%%/primes.qcl \
+		%%DATADIR%%/shor.qcl %%DATADIR%%/test.qcl
+PLIST_DIRS=	%%DATADIR%%
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MPLOTUTILS}
+LIB_DEPENDS+=	plotter:${PORTSDIR}/graphics/plotutils
+CXXFLAGS+=	-I${LOCALBASE}/include -DQCL_PLOT
+LDFLAGS+=	-L${LOCALBASE}/lib -lplotter
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} -e \
+		's|/usr/local|${PREFIX}| ; \
+		 s|lib/qcl|share/qcl| ; \
+		 s|-O2 -g|| ; \
+		 s|^PLOPT|#PLOPT| ; \
+		 s|^PLLIB|#PLLIB| ; \
+		 /^CXXFLAGS/s| =| +=| ; \
+		 /^LDFLAGS/s| =| +=|' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e \
+		's|-g -O2|| ; \
+		 /^CXXFLAGS/s| =| +=| ; \
+		 /^LDFLAGS/s| =| +=|' ${WRKSRC}/qc/Makefile
+
+do-install:
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} qcl ${STAGEDIR}${PREFIX}/bin)
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	(cd ${WRKSRC}/lib && ${INSTALL_DATA} *.qcl ${STAGEDIR}${DATADIR})
 
 .include <bsd.port.mk>
diff -urN /usr/ports/science/qcl/distinfo science/qcl/distinfo
--- /usr/ports/science/qcl/distinfo	2013-06-21 03:53:59.000000000 +0900
+++ science/qcl/distinfo	2013-10-08 00:00:00.000000000 +0900
@@ -1,2 +1,2 @@
-SHA256 (qcl-0.6.1.tgz) = 3e7195fd0a2a65aed5868d40d4dfeccbc0151674682a68d4214332f65ee4338c
-SIZE (qcl-0.6.1.tgz) = 130922
+SHA256 (qcl-0.6.3.tgz) = c9f459b265ca181fdd4023cfb0d41a93a245eb5d47948a4002263384658d7cbb
+SIZE (qcl-0.6.3.tgz) = 133786
diff -urN /usr/ports/science/qcl/files/patch-aa science/qcl/files/patch-aa
--- /usr/ports/science/qcl/files/patch-aa	2013-06-21 03:53:59.000000000 +0900
+++ science/qcl/files/patch-aa	1970-01-01 09:00:00.000000000 +0900
@@ -1,136 +0,0 @@
---- Makefile.orig	Mon Mar 29 15:24:31 2004
-+++ Makefile	Tue Feb  1 01:37:09 2005
-@@ -14,25 +14,25 @@
- 
- # Directory for Standard .qcl files
- 
--QCLDIR = /usr/local/lib/qcl
-+QCLDIR = ${PREFIX}/share/qcl
- 
- # Path for qcl binaries
- 
--QCLBIN = /usr/local/bin
-+QCLBIN = ${PREFIX}/bin
- 
- # Debugging options
- 
- #DEBUG = -g -pg -DQCL_DEBUG -DQC_DEBUG
- #DEBUG = -g -DQCL_DEBUG -DQC_DEBUG
--DEBUG = -O2 -g -DQCL_DEBUG -DQC_DEBUG
-+DEBUG = -DQCL_DEBUG -DQC_DEBUG
- #DEBUG = -O2
- 
- # Plotting support 
- #
- # Comment out if you don't have GNU libplotter and X
- 
--PLOPT = -DQCL_PLOT
--PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -lXt -lXext -lXpm -lSM -lICE -lX11
-+#PLOPT = -DQCL_PLOT
-+#PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -lXt -lXext -lXpm -lSM -lICE -lX11
- #PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -lXt -lXext -lX11 
- #PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -Xt -lSM -ICE -lXext -lX11 
- 
-@@ -42,8 +42,8 @@
- # explicit linking against libtermcap or libncurses may be required
- 
- RLOPT = -DQCL_USE_READLINE
--#RLLIB = -lreadline
--RLLIB = -lreadline -lncurses
-+RLLIB = -lreadline
-+#RLLIB = -lreadline -lncurses
- 
- # Interrupt support
- #
-@@ -51,12 +51,6 @@
- 
- IRQOPT = -DQCL_IRQ
- 
--# Replace with lex and yacc on non-GNU systems (untested)
--
--LEX = flex
--YACC = bison 
--INSTALL = install
--
- ##### You shouldn't have to edit the stuff below #####
- 
- DATE = `date +"%y.%m.%d-%H%M"`
-@@ -65,13 +59,11 @@
- QCLIB = $(QCDIR)/libqc.a
- QCLINC = lib
- 
--CC = g++
--CPP = $(CC) -E
--CFLAGS = -c -Wall $(DEBUG) $(PLOPT) $(RLOPT) $(IRQOPT) -I$(QCDIR) -DDEF_INCLUDE_PATH="\"$(QCLDIR)\""
--LFLAGS = -L$(QCDIR) $(DEBUG) $(PLLIB) -lm -lfl -lqc $(RLLIB) 
-+CXXFLAGS += $(DEBUG) $(PLOPT) $(RLOPT) $(IRQOPT) -I$(QCDIR) -DDEF_INCLUDE_PATH="\"$(QCLDIR)\""
-+LDFLAGS += -L$(QCDIR) $(DEBUG) $(PLLIB) -lm -lfl -lqc $(RLLIB) 
- 
--FILESCC = $(wildcard *.cc)
--FILESH = $(wildcard *.h)
-+FILESCC = *.cc
-+FILESH = *.h
- 
- SOURCE = $(FILESCC) $(FILESH) qcl.lex qcl.y Makefile
- 
-@@ -79,23 +71,11 @@
-           lex.o yacc.o print.o quheap.o extern.o eval.o exec.o \
-           parse.o options.o debug.o cond.o dump.o plot.o format.o
- 
--all: do-it-all
-+all: build
- 
--ifeq (.depend,$(wildcard .depend))
--include .depend
--do-it-all: build
--else
--do-it-all: dep
--	make
--endif
--
--#### Rules for depend
--
--dep: lex.cc yacc.cc yacc.h $(QCLIB)
--	for i in *.cc; do \
--	  $(CPP) -I$(QCDIR) -MM $$i; \
--	  echo -e '\t$(CC) $(CFLAGS)' $$i '\n'; \
--	done > .depend
-+
-+dep:
-+	mkdep ${CXXFLAGS} ${FILESCC}
- 
- lex.cc: qcl.lex
- 	$(LEX) -olex.cc qcl.lex
-@@ -107,26 +87,26 @@
- 	mv yacc.*?h yacc.h
- 
- $(QCLIB):
--	cd $(QCDIR) && make libqc.a
-+	+cd ${QCDIR} && ${MAKE} ${MAKEFLAGS} libqc.a
- 
- #### Rules for build
- 
- build: qcl $(QCLINC)/default.qcl
- 
- qcl: $(OBJECTS) qcl.o $(QCLIB)
--	$(CC) $(OBJECTS) qcl.o $(LFLAGS) -o qcl
-+	$(CXX) $(OBJECTS) qcl.o $(LDFLAGS) -o qcl
- 
- qcl-static: $(OBJECTS) qcl.o $(QCLIB)
--	$(CC) -static $(OBJECTS) qcl.o $(LFLAGS) -o qcl-static
-+	$(CXX) -static $(OBJECTS) qcl.o $(LDFLAGS) -o qcl-static
- 	strip qcl-static
- 
- $(QCLINC)/default.qcl: extern.cc
- 	grep "^//!" extern.cc | cut -c5- > $(QCLINC)/default.qcl
- 
- install: build
--	$(INSTALL) -m 0755 -d $(QCLBIN) $(QCLDIR)
--	$(INSTALL) -m 0755 ./qcl $(QCLBIN)
--	$(INSTALL) -m 0644 ./lib/*.qcl $(QCLDIR)
-+	umask 022; mkdir -p $(QCLDIR); chmod 0755 $(QCLDIR)
-+	${INSTALL} -m 0755 ./qcl $(QCLBIN)
-+	${INSTALL} -m 0644 ./lib/*.qcl $(QCLDIR)
- 
- uninstall:
- 	rm -f $(QCLBIN)
diff -urN /usr/ports/science/qcl/files/patch-options.cc science/qcl/files/patch-options.cc
--- /usr/ports/science/qcl/files/patch-options.cc	1970-01-01 09:00:00.000000000 +0900
+++ science/qcl/files/patch-options.cc	2013-10-08 00:00:00.000000000 +0900
@@ -0,0 +1,14 @@
+--- options.cc.orig
++++ options.cc
+@@ -13,8 +13,9 @@
+ ************************************************************************/
+ 
+ 
+-#include <stdio.h>
+-#include <time.h>
++#include <cstdio>
++#include <cstring>
++#include <ctime>
+ 
+ #include "options.h"
+ #include "error.h"
diff -urN /usr/ports/science/qcl/files/patch-qc-Makefile science/qcl/files/patch-qc-Makefile
--- /usr/ports/science/qcl/files/patch-qc-Makefile	2013-06-21 03:53:59.000000000 +0900
+++ science/qcl/files/patch-qc-Makefile	1970-01-01 09:00:00.000000000 +0900
@@ -1,49 +0,0 @@
---- qc/Makefile.orig	Mon Mar 29 15:24:31 2004
-+++ qc/Makefile	Tue Feb  1 01:27:33 2005
-@@ -12,7 +12,7 @@
- 
- # Debugging options
- 
--DEBUG = -g -O2 -DQC_DEBUG
-+DEBUG = -DQC_DEBUG
- #DEBUG = -g -pg -DQC_DEBUG
- #DEBUG = -O2
- 
-@@ -21,10 +21,8 @@
- 
- #PRGOPT = -DQC_USE_RAND48
- 
--CC = g++
--CFLAGS = -c -pedantic -Wall $(DEBUG) $(PRGOPT)
--
--LNKOPT = -L. -lm -lqc
-+CXXFLAGS += $(DEBUG) $(PRGOPT)
-+LDFLAGS += -L. -lm -lqc
- 
- FILESCC = bitvec.cc terms.cc qustates.cc operator.cc
- FILESH = bitvec.h terms.h qustates.h operator.h qc.h
-@@ -36,23 +34,9 @@
- 	ar rc libqc.a bitvec.o terms.o qustates.o operator.o
- 	ranlib libqc.a
- 
--bitvec.o: bitvec.cc bitvec.h
--	$(CC) bitvec.cc -o bitvec.o $(CFLAGS)
--
--terms.o: terms.cc terms.h bitvec.h
--	$(CC) terms.cc -o terms.o $(CFLAGS)
--
--qustates.o: qustates.cc qustates.h terms.h bitvec.h
--	$(CC) qustates.cc -o qustates.o $(CFLAGS)
--
--operator.o: operator.cc operator.h qustates.h terms.h bitvec.h
--	$(CC) operator.cc -o operator.o $(CFLAGS)
--
--shor.o: shor.cc qustates.h terms.h bitvec.h 
--	$(CC) shor.cc -o shor.o $(CFLAGS)
- 
- shor: shor.o libqc.a 
--	$(CC)  shor.o -o shor $(LNKOPT)
-+	$(CXX)  shor.o -o shor $(LDFLAGS)
- 
- # Other Functions
- 
diff -urN /usr/ports/science/qcl/pkg-plist science/qcl/pkg-plist
--- /usr/ports/science/qcl/pkg-plist	2013-06-21 03:53:59.000000000 +0900
+++ science/qcl/pkg-plist	1970-01-01 09:00:00.000000000 +0900
@@ -1,12 +0,0 @@
-bin/qcl
-share/qcl/default.qcl
-share/qcl/deutsch.qcl
-share/qcl/dft.qcl
-share/qcl/examples.qcl
-share/qcl/grover.qcl
-share/qcl/linalg.qcl
-share/qcl/modarith.qcl
-share/qcl/primes.qcl
-share/qcl/shor.qcl
-share/qcl/test.qcl
-@dirrm share/qcl
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pawel 
Responsible-Changed-By: pawel 
Responsible-Changed-When: Wed Oct 30 17:15:13 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182800 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Wed Oct 30 17:57:52 UTC 2013 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182800 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182800: commit references a PR
Date: Wed, 30 Oct 2013 17:57:41 +0000 (UTC)

 Author: pawel
 Date: Wed Oct 30 17:57:33 2013
 New Revision: 332159
 URL: http://svnweb.freebsd.org/changeset/ports/332159
 
 Log:
   - Update to version 0.6.3
   - Add PLOTUTILS option
   - Support staging
   
   PR:		ports/182800
   Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
 
 Added:
   head/science/qcl/files/patch-options.cc   (contents, props changed)
 Deleted:
   head/science/qcl/files/patch-aa
   head/science/qcl/files/patch-qc-Makefile
   head/science/qcl/pkg-plist
 Modified:
   head/science/qcl/Makefile
   head/science/qcl/distinfo   (contents, props changed)
 
 Modified: head/science/qcl/Makefile
 ==============================================================================
 --- head/science/qcl/Makefile	Wed Oct 30 17:47:48 2013	(r332158)
 +++ head/science/qcl/Makefile	Wed Oct 30 17:57:33 2013	(r332159)
 @@ -2,17 +2,51 @@
  # $FreeBSD$
  
  PORTNAME=	qcl
 -PORTVERSION=	0.6.1
 +PORTVERSION=	0.6.3
  CATEGORIES=	science math
  MASTER_SITES=	http://tph.tuwien.ac.at/~oemer/tgz/
  EXTRACT_SUFX=	.tgz
  
  MAINTAINER=	ports@FreeBSD.org
 -COMMENT=	A quantum computer simulator
 +COMMENT=	Quantum computer simulator
  
 -NO_STAGE=	yes
 -do-configure:
 -	echo 'PREFIX=${PREFIX}' >>${WRKSRC}/Makefile
 -	cd ${WRKSRC} && make dep
 +LICENSE=	GPLv2 # (or later)
 +
 +OPTIONS_DEFINE=	PLOTUTILS
 +PLOTUTILS_DESC=	Plotting support via plotutils
 +
 +USES=		bison gmake readline
 +USE_GCC=	any
 +
 +PLIST_FILES=	bin/qcl \
 +		%%DATADIR%%/default.qcl %%DATADIR%%/deutsch.qcl \
 +		%%DATADIR%%/dft.qcl %%DATADIR%%/examples.qcl \
 +		%%DATADIR%%/grover.qcl %%DATADIR%%/linalg.qcl \
 +		%%DATADIR%%/modarith.qcl %%DATADIR%%/primes.qcl \
 +		%%DATADIR%%/shor.qcl %%DATADIR%%/test.qcl
 +PLIST_DIRS=	%%DATADIR%%
 +
 +PLOTUTILS_LIB_DEPENDS=	libplotter.so:${PORTSDIR}/graphics/plotutils
 +PLOTUTILS_CXXFLAGS=	-I${LOCALBASE}/include -DQCL_PLOT
 +PLOTUTILS_LDFLAGS=	-L${LOCALBASE}/lib -lplotter
 +
 +post-patch:
 +	@${REINPLACE_CMD} -e \
 +		's|/usr/local|${PREFIX}| ; \
 +		 s|lib/qcl|share/qcl| ; \
 +		 s|-O2 -g|| ; \
 +		 s|^PLOPT|#PLOPT| ; \
 +		 s|^PLLIB|#PLLIB| ; \
 +		 /^CXXFLAGS/s| =| +=| ; \
 +		 /^LDFLAGS/s| =| +=|' ${WRKSRC}/Makefile
 +	@${REINPLACE_CMD} -e \
 +		's|-g -O2|| ; \
 +		 /^CXXFLAGS/s| =| +=| ; \
 +		 /^LDFLAGS/s| =| +=|' ${WRKSRC}/qc/Makefile
 +
 +do-install:
 +	(cd ${WRKSRC} && ${INSTALL_PROGRAM} qcl ${STAGEDIR}${PREFIX}/bin)
 +	@${MKDIR} ${STAGEDIR}${DATADIR}
 +	(cd ${WRKSRC}/lib && ${INSTALL_DATA} *.qcl ${STAGEDIR}${DATADIR})
  
  .include <bsd.port.mk>
 
 Modified: head/science/qcl/distinfo
 ==============================================================================
 --- head/science/qcl/distinfo	Wed Oct 30 17:47:48 2013	(r332158)
 +++ head/science/qcl/distinfo	Wed Oct 30 17:57:33 2013	(r332159)
 @@ -1,2 +1,2 @@
 -SHA256 (qcl-0.6.1.tgz) = 3e7195fd0a2a65aed5868d40d4dfeccbc0151674682a68d4214332f65ee4338c
 -SIZE (qcl-0.6.1.tgz) = 130922
 +SHA256 (qcl-0.6.3.tgz) = c9f459b265ca181fdd4023cfb0d41a93a245eb5d47948a4002263384658d7cbb
 +SIZE (qcl-0.6.3.tgz) = 133786
 
 Added: head/science/qcl/files/patch-options.cc
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/science/qcl/files/patch-options.cc	Wed Oct 30 17:57:33 2013	(r332159)
 @@ -0,0 +1,14 @@
 +--- options.cc.orig
 ++++ options.cc
 +@@ -13,8 +13,9 @@
 + ************************************************************************/
 + 
 + 
 +-#include <stdio.h>
 +-#include <time.h>
 ++#include <cstdio>
 ++#include <cstring>
 ++#include <ctime>
 + 
 + #include "options.h"
 + #include "error.h"
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
