ports/76984: update for 'qcl' port
Brad Huntting
huntting at glarp.com
Tue Feb 1 23:10:23 UTC 2005
>Number: 76984
>Category: ports
>Synopsis: update for 'qcl' port
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Feb 01 23:10:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Brad Huntting
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
little
>Environment:
System: FreeBSD hunkular.glarp.com 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root at harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Update for the (currently broken) emulators/qcl port
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# qcl
# qcl/files
# qcl/files/patch-aa
# qcl/files/patch-bb
# qcl/Makefile
# qcl/distinfo
# qcl/pkg-descr
# qcl/pkg-plist
#
echo c - qcl
mkdir -p qcl > /dev/null 2>&1
echo c - qcl/files
mkdir -p qcl/files > /dev/null 2>&1
echo x - qcl/files/patch-aa
sed 's/^X//' >qcl/files/patch-aa << 'END-of-qcl/files/patch-aa'
X--- Makefile.orig Mon Mar 29 15:24:31 2004
X+++ Makefile Tue Feb 1 01:37:09 2005
X@@ -14,25 +14,25 @@
X
X # Directory for Standard .qcl files
X
X-QCLDIR = /usr/local/lib/qcl
X+QCLDIR = ${PREFIX}/share/qcl
X
X # Path for qcl binaries
X
X-QCLBIN = /usr/local/bin
X+QCLBIN = ${PREFIX}/bin
X
X # Debugging options
X
X #DEBUG = -g -pg -DQCL_DEBUG -DQC_DEBUG
X #DEBUG = -g -DQCL_DEBUG -DQC_DEBUG
X-DEBUG = -O2 -g -DQCL_DEBUG -DQC_DEBUG
X+DEBUG = -DQCL_DEBUG -DQC_DEBUG
X #DEBUG = -O2
X
X # Plotting support
X #
X # Comment out if you don't have GNU libplotter and X
X
X-PLOPT = -DQCL_PLOT
X-PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -lXt -lXext -lXpm -lSM -lICE -lX11
X+#PLOPT = -DQCL_PLOT
X+#PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -lXt -lXext -lXpm -lSM -lICE -lX11
X #PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -lXt -lXext -lX11
X #PLLIB = -L/usr/X11/lib -lplotter -lXaw -lXmu -Xt -lSM -ICE -lXext -lX11
X
X@@ -42,8 +42,8 @@
X # explicit linking against libtermcap or libncurses may be required
X
X RLOPT = -DQCL_USE_READLINE
X-#RLLIB = -lreadline
X-RLLIB = -lreadline -lncurses
X+RLLIB = -lreadline
X+#RLLIB = -lreadline -lncurses
X
X # Interrupt support
X #
X@@ -51,12 +51,6 @@
X
X IRQOPT = -DQCL_IRQ
X
X-# Replace with lex and yacc on non-GNU systems (untested)
X-
X-LEX = flex
X-YACC = bison
X-INSTALL = install
X-
X ##### You shouldn't have to edit the stuff below #####
X
X DATE = `date +"%y.%m.%d-%H%M"`
X@@ -65,13 +59,11 @@
X QCLIB = $(QCDIR)/libqc.a
X QCLINC = lib
X
X-CC = g++
X-CPP = $(CC) -E
X-CFLAGS = -c -Wall $(DEBUG) $(PLOPT) $(RLOPT) $(IRQOPT) -I$(QCDIR) -DDEF_INCLUDE_PATH="\"$(QCLDIR)\""
X-LFLAGS = -L$(QCDIR) $(DEBUG) $(PLLIB) -lm -lfl -lqc $(RLLIB)
X+CXXFLAGS += $(DEBUG) $(PLOPT) $(RLOPT) $(IRQOPT) -I$(QCDIR) -DDEF_INCLUDE_PATH="\"$(QCLDIR)\""
X+LDFLAGS += -L$(QCDIR) $(DEBUG) $(PLLIB) -lm -lfl -lqc $(RLLIB)
X
X-FILESCC = $(wildcard *.cc)
X-FILESH = $(wildcard *.h)
X+FILESCC = *.cc
X+FILESH = *.h
X
X SOURCE = $(FILESCC) $(FILESH) qcl.lex qcl.y Makefile
X
X@@ -79,23 +71,11 @@
X lex.o yacc.o print.o quheap.o extern.o eval.o exec.o \
X parse.o options.o debug.o cond.o dump.o plot.o format.o
X
X-all: do-it-all
X+all: build
X
X-ifeq (.depend,$(wildcard .depend))
X-include .depend
X-do-it-all: build
X-else
X-do-it-all: dep
X- make
X-endif
X-
X-#### Rules for depend
X-
X-dep: lex.cc yacc.cc yacc.h $(QCLIB)
X- for i in *.cc; do \
X- $(CPP) -I$(QCDIR) -MM $$i; \
X- echo -e '\t$(CC) $(CFLAGS)' $$i '\n'; \
X- done > .depend
X+
X+dep:
X+ mkdep ${CXXFLAGS} ${FILESCC}
X
X lex.cc: qcl.lex
X $(LEX) -olex.cc qcl.lex
X@@ -107,26 +87,26 @@
X mv yacc.*?h yacc.h
X
X $(QCLIB):
X- cd $(QCDIR) && make libqc.a
X+ +cd ${QCDIR} && ${MAKE} ${MAKEFLAGS} libqc.a
X
X #### Rules for build
X
X build: qcl $(QCLINC)/default.qcl
X
X qcl: $(OBJECTS) qcl.o $(QCLIB)
X- $(CC) $(OBJECTS) qcl.o $(LFLAGS) -o qcl
X+ $(CXX) $(OBJECTS) qcl.o $(LDFLAGS) -o qcl
X
X qcl-static: $(OBJECTS) qcl.o $(QCLIB)
X- $(CC) -static $(OBJECTS) qcl.o $(LFLAGS) -o qcl-static
X+ $(CXX) -static $(OBJECTS) qcl.o $(LDFLAGS) -o qcl-static
X strip qcl-static
X
X $(QCLINC)/default.qcl: extern.cc
X grep "^//!" extern.cc | cut -c5- > $(QCLINC)/default.qcl
X
X install: build
X- $(INSTALL) -m 0755 -d $(QCLBIN) $(QCLDIR)
X- $(INSTALL) -m 0755 ./qcl $(QCLBIN)
X- $(INSTALL) -m 0644 ./lib/*.qcl $(QCLDIR)
X+ umask 022; mkdir -p $(QCLDIR); chmod 0755 $(QCLDIR)
X+ ${INSTALL} -m 0755 ./qcl $(QCLBIN)
X+ ${INSTALL} -m 0644 ./lib/*.qcl $(QCLDIR)
X
X uninstall:
X rm -f $(QCLBIN)
END-of-qcl/files/patch-aa
echo x - qcl/files/patch-bb
sed 's/^X//' >qcl/files/patch-bb << 'END-of-qcl/files/patch-bb'
X--- qc/Makefile.orig Mon Mar 29 15:24:31 2004
X+++ qc/Makefile Tue Feb 1 01:27:33 2005
X@@ -12,7 +12,7 @@
X
X # Debugging options
X
X-DEBUG = -g -O2 -DQC_DEBUG
X+DEBUG = -DQC_DEBUG
X #DEBUG = -g -pg -DQC_DEBUG
X #DEBUG = -O2
X
X@@ -21,10 +21,8 @@
X
X #PRGOPT = -DQC_USE_RAND48
X
X-CC = g++
X-CFLAGS = -c -pedantic -Wall $(DEBUG) $(PRGOPT)
X-
X-LNKOPT = -L. -lm -lqc
X+CXXFLAGS += $(DEBUG) $(PRGOPT)
X+LDFLAGS += -L. -lm -lqc
X
X FILESCC = bitvec.cc terms.cc qustates.cc operator.cc
X FILESH = bitvec.h terms.h qustates.h operator.h qc.h
X@@ -36,23 +34,9 @@
X ar rc libqc.a bitvec.o terms.o qustates.o operator.o
X ranlib libqc.a
X
X-bitvec.o: bitvec.cc bitvec.h
X- $(CC) bitvec.cc -o bitvec.o $(CFLAGS)
X-
X-terms.o: terms.cc terms.h bitvec.h
X- $(CC) terms.cc -o terms.o $(CFLAGS)
X-
X-qustates.o: qustates.cc qustates.h terms.h bitvec.h
X- $(CC) qustates.cc -o qustates.o $(CFLAGS)
X-
X-operator.o: operator.cc operator.h qustates.h terms.h bitvec.h
X- $(CC) operator.cc -o operator.o $(CFLAGS)
X-
X-shor.o: shor.cc qustates.h terms.h bitvec.h
X- $(CC) shor.cc -o shor.o $(CFLAGS)
X
X shor: shor.o libqc.a
X- $(CC) shor.o -o shor $(LNKOPT)
X+ $(CXX) shor.o -o shor $(LDFLAGS)
X
X # Other Functions
X
END-of-qcl/files/patch-bb
echo x - qcl/Makefile
sed 's/^X//' >qcl/Makefile << 'END-of-qcl/Makefile'
X# ports collection makefile for: qcl
X# Date created: 2005-02-01
X# Whom: Brad Huntting <huntting at glarp.com>
X#
X# $FreeBSD: ports/emulators/qcl/Makefile,v 1.6 2003/09/24 09:37:05 osa Exp $
X#
X
XPORTNAME= qcl
XPORTVERSION= 0.6.1
XPORTREVISION= 1
XCATEGORIES= science math
XMASTER_SITES= http://tph.tuwien.ac.at/~oemer/tgz/
XEXTRACT_SUFX= .tgz
X
XMAINTAINER= huntting at glarp.com
XCOMMENT= A quantum computer simulator
X
XUSE_GETOPT_LONG=yes
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 500000
XUSE_GCC= 3.3
X.endif
X
Xdo-configure:
X echo 'PREFIX=${PREFIX}' >>${WRKSRC}/Makefile
X cd ${WRKSRC} && make dep
X
X.include <bsd.port.post.mk>
END-of-qcl/Makefile
echo x - qcl/distinfo
sed 's/^X//' >qcl/distinfo << 'END-of-qcl/distinfo'
XMD5 (qcl-0.6.1.tgz) = ec5def302a468f95370a4ccc9f8aa35a
XSIZE (qcl-0.6.1.tgz) = 130922
END-of-qcl/distinfo
echo x - qcl/pkg-descr
sed 's/^X//' >qcl/pkg-descr << 'END-of-qcl/pkg-descr'
XThis is a port of qcl, a quantum computer simulator.
X
XWWW: http://tph.tuwien.ac.at/~oemer/qcl.html
X
X- brad.huntting at glarp.com
END-of-qcl/pkg-descr
echo x - qcl/pkg-plist
sed 's/^X//' >qcl/pkg-plist << 'END-of-qcl/pkg-plist'
Xbin/qcl
Xshare/qcl/default.qcl
Xshare/qcl/deutsch.qcl
Xshare/qcl/dft.qcl
Xshare/qcl/examples.qcl
Xshare/qcl/grover.qcl
Xshare/qcl/linalg.qcl
Xshare/qcl/modarith.qcl
Xshare/qcl/primes.qcl
Xshare/qcl/shor.qcl
Xshare/qcl/test.qcl
X at dirrm share/qcl
END-of-qcl/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list