aboutsummaryrefslogtreecommitdiff
path: root/science/qcl
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-02-09 22:31:42 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-02-09 22:31:42 +0000
commit34fc69aa636856310997ba57cfaa3e6b56bdf035 (patch)
treea9acd57718da8d4f89c9dbcd71d39cd850303abd /science/qcl
parentf52c4ef985fc20b70219362e9d1d8e7626204492 (diff)
downloadports-34fc69aa636856310997ba57cfaa3e6b56bdf035.tar.gz
ports-34fc69aa636856310997ba57cfaa3e6b56bdf035.zip
Notes
Diffstat (limited to 'science/qcl')
-rw-r--r--science/qcl/Makefile14
-rw-r--r--science/qcl/distinfo4
-rw-r--r--science/qcl/files/patch-aa92
-rw-r--r--science/qcl/files/patch-qc-Makefile49
-rw-r--r--science/qcl/pkg-plist13
-rw-r--r--science/qcl/scripts/configure5
6 files changed, 116 insertions, 61 deletions
diff --git a/science/qcl/Makefile b/science/qcl/Makefile
index ed7ece66ec39..ca4ec25ab4aa 100644
--- a/science/qcl/Makefile
+++ b/science/qcl/Makefile
@@ -6,9 +6,8 @@
#
PORTNAME= qcl
-PORTVERSION= 0.4.1
-PORTREVISION= 1
-CATEGORIES= emulators math
+PORTVERSION= 0.6.1
+CATEGORIES= science math
MASTER_SITES= http://tph.tuwien.ac.at/~oemer/tgz/
EXTRACT_SUFX= .tgz
@@ -19,11 +18,12 @@ USE_GETOPT_LONG=yes
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile (bad C++ code)"
+.if ${OSVERSION} < 500000
+BROKEN= Does not compile
.endif
-post-install:
- ${STRIP_CMD} ${PREFIX}/bin/qcl
+do-configure:
+ echo 'PREFIX=${PREFIX}' >>${WRKSRC}/Makefile
+ cd ${WRKSRC} && make dep
.include <bsd.port.post.mk>
diff --git a/science/qcl/distinfo b/science/qcl/distinfo
index 056d3205e1ea..4a5ed447cc80 100644
--- a/science/qcl/distinfo
+++ b/science/qcl/distinfo
@@ -1,2 +1,2 @@
-MD5 (qcl-0.4.1.tgz) = 0ff6cdb3c29cc3c533f3b27018662a57
-SIZE (qcl-0.4.1.tgz) = 97862
+MD5 (qcl-0.6.1.tgz) = ec5def302a468f95370a4ccc9f8aa35a
+SIZE (qcl-0.6.1.tgz) = 130922
diff --git a/science/qcl/files/patch-aa b/science/qcl/files/patch-aa
index 9b3bc17cd883..8e8a53392ec3 100644
--- a/science/qcl/files/patch-aa
+++ b/science/qcl/files/patch-aa
@@ -1,6 +1,6 @@
---- Makefile.orig Wed Jan 17 13:17:06 2001
-+++ Makefile Thu May 24 15:51:01 2001
-@@ -14,29 +14,25 @@
+--- 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
@@ -14,56 +14,71 @@
# Debugging options
--DEBUG = -g -DQCL_DEBUG -DQC_DEBUG
--#DEBUG = -O2
-+DEBUG =
+ #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
- # Comment out if you don't have GNU readline on your system
+ # 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 @@
- # Replace with lex and yacc on non-GNU systems (untested)
+ IRQOPT = -DQCL_IRQ
+-# Replace with lex and yacc on non-GNU systems (untested)
+-
-LEX = flex
--YACC = bison
+-YACC = bison
-INSTALL = install
-+INSTALL = install -c
-
+-
##### You shouldn't have to edit the stuff below #####
-@@ -44,13 +40,15 @@
+ 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) $(RLOPT) -I$(QCDIR) -DDEF_INCLUDE_PATH="\"$(QCLDIR)\""
--LFLAGS = -L$(QCDIR) $(DEBUG) -lm -lfl -lqc $(RLLIB)
-+CXXFLAGS += -Wall $(DEBUG) $(RLOPT) -I$(QCDIR) -I${PREFIX}/include -DDEF_INCLUDE_PATH="\"$(QCLDIR)\""
-+LDFLAGS += -L$(QCDIR) $(DEBUG) -L${PREFIX}/lib -lgnugetopt -lm -lfl -lqc $(RLLIB)
-+
-+FILESCC = debug.cc error.cc eval.cc exec.cc extern.cc lex.cc \
-+ options.cc parse.cc print.cc qcl.cc quheap.cc symbols.cc \
-+ syntax.cc typcheck.cc types.cc yacc.cc
-+FILESH = debug.h error.h extern.h options.h parse.h quheap.h \
-+ symbols.h syntax.h types.h yacc.h
+-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
-@@ -58,23 +56,11 @@
+@@ -79,23 +71,11 @@
lex.o yacc.o print.o quheap.o extern.o eval.o exec.o \
- parse.o options.o debug.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
@@ -80,17 +95,18 @@
- $(CPP) -I$(QCDIR) -MM $$i; \
- echo -e '\t$(CC) $(CFLAGS)' $$i '\n'; \
- done > .depend
-+dep: $(FILESCC) $(FILESH)
-+ $(CXX) -M $(CXXFLAGS) $(FILESCC) >.depend
++
++dep:
++ mkdep ${CXXFLAGS} ${FILESCC}
lex.cc: qcl.lex
$(LEX) -olex.cc qcl.lex
-@@ -86,24 +72,24 @@
- mv yacc.cc.h yacc.h
+@@ -107,26 +87,26 @@
+ mv yacc.*?h yacc.h
$(QCLIB):
- cd $(QCDIR) && make libqc.a
-+ cd $(QCDIR) && $(MAKE) $(MAKEFLAGS) libqc.a
++ +cd ${QCDIR} && ${MAKE} ${MAKEFLAGS} libqc.a
#### Rules for build
@@ -110,15 +126,11 @@
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/default.qcl $(QCLDIR)
- $(INSTALL) -m 0644 ./lib/dft.qcl $(QCLDIR)
-@@ -115,6 +101,7 @@
- $(INSTALL) -m 0644 ./lib/roulette.qcl $(QCLDIR)
- $(INSTALL) -m 0644 ./lib/shor.qcl $(QCLDIR)
- $(INSTALL) -m 0644 ./lib/swap.qcl $(QCLDIR)
-+ $(INSTALL) -m 0644 ./lib/grover.qcl $(QCLDIR)
-
- #### Other Functions
++ ${INSTALL} -m 0755 ./qcl $(QCLBIN)
++ ${INSTALL} -m 0644 ./lib/*.qcl $(QCLDIR)
+ uninstall:
+ rm -f $(QCLBIN)
diff --git a/science/qcl/files/patch-qc-Makefile b/science/qcl/files/patch-qc-Makefile
new file mode 100644
index 000000000000..ae6da3f42dc4
--- /dev/null
+++ b/science/qcl/files/patch-qc-Makefile
@@ -0,0 +1,49 @@
+--- 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 --git a/science/qcl/pkg-plist b/science/qcl/pkg-plist
index 3df3c22741f3..5a6cf3f01213 100644
--- a/science/qcl/pkg-plist
+++ b/science/qcl/pkg-plist
@@ -1,13 +1,12 @@
bin/qcl
share/qcl/default.qcl
+share/qcl/deutsch.qcl
share/qcl/dft.qcl
-share/qcl/expmod.qcl
-share/qcl/fanout.qcl
-share/qcl/functions.qcl
+share/qcl/examples.qcl
+share/qcl/grover.qcl
+share/qcl/linalg.qcl
share/qcl/modarith.qcl
-share/qcl/qufunct.qcl
-share/qcl/roulette.qcl
+share/qcl/primes.qcl
share/qcl/shor.qcl
-share/qcl/swap.qcl
-share/qcl/grover.qcl
+share/qcl/test.qcl
@dirrm share/qcl
diff --git a/science/qcl/scripts/configure b/science/qcl/scripts/configure
deleted file mode 100644
index 24c2ff96fdd1..000000000000
--- a/science/qcl/scripts/configure
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-cd $WRKSRC
-rm -f .depend
-make dep