diff options
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/qcl/Manifest | 7 | ||||
-rw-r--r-- | sci-physics/qcl/files/qcl-0.6.4-Makefile.patch | 69 | ||||
-rw-r--r-- | sci-physics/qcl/qcl-0.6.4-r2.ebuild | 55 |
3 files changed, 128 insertions, 3 deletions
diff --git a/sci-physics/qcl/Manifest b/sci-physics/qcl/Manifest index e5942b401..d4dabd88e 100644 --- a/sci-physics/qcl/Manifest +++ b/sci-physics/qcl/Manifest @@ -1,4 +1,5 @@ +DIST ccquprog.pdf 198557 BLAKE2B 43b6b40d82b01493869a1e17f5462aeb488761cdef6f0adbe25ad7e170274ed9488dcf0d32c568b80dcb53349d4a00ab1bd99414de7ebf56e23b5c449ed0de7b SHA512 8edb86af2f878dd34065e3b8d1fccf7367d77363c659478ac12341b6140d8c65a203f064570678057debc76f10940280f5ea240ceab89328382f3147531b59e4 DIST qcl-0.6.4.tgz 137396 BLAKE2B 757036ca36bfe5b311b142001d803d10e73eafdd51f4c7d3fee9cdd64072f00447be5183c4251782adf5f2f2e28a12eec63d247638b92bf7ba8ec055653d4cd1 SHA512 389b6eb14af40e7061b999cadd94e4d406e48ecd0c339f0460efb100de00d2f2e055b8e6066e5526778e3cd080fa3f3d14fd26cca7ee90ad40f71c250587eee4 -DIST qcldoc.pdf 435240 SHA256 a47f7e814b7848ba54d9e3749b66cc727376758dfdcb98c66531be01540f5886 SHA512 077bc1069e108e97805e597c70f3f5283e99db4f0e4b54539ab10b8fa9ee10cc4f255a99803fb966b30e30a155ded3243423a5a8c5196d3642097c27c1b79fd6 WHIRLPOOL fdbed632853669c2f228113f0a3c96138cd539f02db7a47a55d3e7baf3e56750f9077ed75aa12e68f4a12993cc9fac8243b8c8ec3ec1d43e12d4b62d71f4aa36 -DIST quprog.pdf 528894 SHA256 071d1e6be857a378584e13d680c86de5a6f40606c769bcfc396f6fff5296ed80 SHA512 7cac2bd9344b39254dcd224a06ea3e35f0df0f9b8d58675f0734a085631578a3d96298bc2d9739f0b5388e71554813585c15ea3fd531170dff6a9aea5b6cf3ec WHIRLPOOL 13af398724e130551150d88367bcb59f2b4994b27507127044c4a00c3c004736872fe88e105316b0bacdbbd7a501ab36d4e3ea6e2209207ed2dda339068563ac -DIST structquprog.pdf 662519 SHA256 0e5ea3f025c9c5eecb75ac1e408188ed1579aced1f4a45bbe7ff7b1b849d1c42 SHA512 05c094df1244098acdc3ce0e8ec98638f37351b58244dacd6b67d5e55fe4b516c95e823bed4af7127b95d729191a7a2150597f27d08a4d5bae7189ae3848e8b6 WHIRLPOOL 093de384efa2672136c4194c6bcc49f5e1acffb84acef40fa438ce3142d6bcf34f5b5375b3d2ee2a3827c7f9c93e06abd1fdb227a65594112c604582e80c4058 +DIST qcldoc.pdf 435240 BLAKE2B a178cc4a6c03885ca00a323b6c56901c2b61d51761a8d1a6356e0b564ee1a34e55110a611e6c9724ef1ad587075e0ee5862761313ff47c8a525a7d7af6754d4d SHA512 077bc1069e108e97805e597c70f3f5283e99db4f0e4b54539ab10b8fa9ee10cc4f255a99803fb966b30e30a155ded3243423a5a8c5196d3642097c27c1b79fd6 +DIST quprog.pdf 528894 BLAKE2B f66fcfe06480385c99e52f03caab0ec4fd87849e55c30a8f07e5d9f1d567fc4486ada35b5d8cfa1caf045809fa506b122349063cc80ff0aebb929beeb594f0c9 SHA512 7cac2bd9344b39254dcd224a06ea3e35f0df0f9b8d58675f0734a085631578a3d96298bc2d9739f0b5388e71554813585c15ea3fd531170dff6a9aea5b6cf3ec +DIST structquprog.pdf 662519 BLAKE2B 4f615152a1b62558163a8248a8a11e1dc15508d96236093c35def2e812f11ffebc4ce860e7dec425a2af46ef5dc5c8b54c049e8aa7f47cdee3443753b99f401a SHA512 05c094df1244098acdc3ce0e8ec98638f37351b58244dacd6b67d5e55fe4b516c95e823bed4af7127b95d729191a7a2150597f27d08a4d5bae7189ae3848e8b6 diff --git a/sci-physics/qcl/files/qcl-0.6.4-Makefile.patch b/sci-physics/qcl/files/qcl-0.6.4-Makefile.patch new file mode 100644 index 000000000..bbc3f0abd --- /dev/null +++ b/sci-physics/qcl/files/qcl-0.6.4-Makefile.patch @@ -0,0 +1,69 @@ +diff --git a/Makefile b/Makefile +index 2735f71..80f9b30 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,11 +14,11 @@ VERSION=0.6.4 + + # Directory for Standard .qcl files + +-QCLDIR = /usr/local/lib/qcl ++QCLDIR = /usr/lib/qcl + + # Path for qcl binaries + +-QCLBIN = /usr/local/bin ++QCLBIN = /usr/bin + + ARCH = `g++ -dumpmachine || echo bin` + +@@ -32,7 +32,7 @@ ARCH = `g++ -dumpmachine || echo bin` + + #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 +@@ -81,8 +81,8 @@ QCLINC = lib + + #CXX = g++ + #CPP = $(CC) -E +-CXXFLAGS = -c $(ARCHOPT) $(DEBUG) $(PLOPT) $(RLOPT) $(IRQOPT) $(ENCOPT) -I$(QCDIR) -DDEF_INCLUDE_PATH="\"$(QCLDIR)\"" +-LDFLAGS = $(ARCHOPT) -L$(QCDIR) $(DEBUG) $(PLLIB) -lm -lfl -lqc $(RLLIB) ++CXXFLAGS += -c $(DEBUG) $(PLOPT) $(RLOPT) $(IRQOPT) $(ENCOPT) -I$(QCDIR) -DDEF_INCLUDE_PATH="\"$(QCLDIR)\"" ++LIBS = -L$(QCDIR) $(PLLIB) -lm -lfl -lqc $(RLLIB) + + FILESCC = $(wildcard *.cc) + FILESH = $(wildcard *.h) +@@ -127,7 +127,7 @@ $(QCLIB): + build: qcl $(QCLINC)/default.qcl + + qcl: $(OBJECTS) qcl.o $(QCLIB) +- $(CXX) $(OBJECTS) qcl.o $(LDFLAGS) -o qcl ++ $(CXX) $(LDFLAGS) $(OBJECTS) qcl.o $(LIBS) -o qcl + + $(QCLINC)/default.qcl: extern.cc + grep "^//!" extern.cc | cut -c5- > $(QCLINC)/default.qcl +diff --git a/qc/Makefile b/qc/Makefile +index 191ffe5..79724a9 100644 +--- a/qc/Makefile ++++ b/qc/Makefile +@@ -16,7 +16,7 @@ + + # Debugging options + +-DEBUG = -g -O2 -DQC_DEBUG ++#DEBUG = -g -O2 -DQC_DEBUG + #DEBUG = -g -pg -DQC_DEBUG + #DEBUG = -O2 + +@@ -25,7 +25,7 @@ DEBUG = -g -O2 -DQC_DEBUG + + #PRGOPT = -DQC_USE_RAND48 + +-CXXFLAGS = $(ARCHOPT) -c -pedantic -Wall $(DEBUG) $(PRGOPT) ++CXXFLAGS += $(ARCHOPT) -c -pedantic -Wall $(DEBUG) $(PRGOPT) + + LDFLAGS = $(ARCHOPT) -L. -lm -lqc + diff --git a/sci-physics/qcl/qcl-0.6.4-r2.ebuild b/sci-physics/qcl/qcl-0.6.4-r2.ebuild new file mode 100644 index 000000000..b7eb2536b --- /dev/null +++ b/sci-physics/qcl/qcl-0.6.4-r2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Quantum Computation Language with an emulator of a quantum computer" +HOMEPAGE="http://tph.tuwien.ac.at/~oemer/qcl.html" +SRC_URI=" + http://tph.tuwien.ac.at/~oemer/tgz/${P}.tgz + doc? ( + http://tph.tuwien.ac.at/~oemer/doc/structquprog.pdf + http://tph.tuwien.ac.at/~oemer/doc/qcldoc.pdf + http://tph.tuwien.ac.at/~oemer/doc/quprog.pdf + https://dev.gentoo.org/~bircoph/distfiles/0211100.pdf -> ccquprog.pdf + )" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="doc plotutils readline" + +BDEPEND=" + sys-devel/bison + sys-devel/flex" +DEPEND=" + plotutils? ( media-libs/plotutils[X,png] ) + readline? ( + sys-libs/ncurses:0= + sys-libs/readline:0= + )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}"-0.6.3-gcc43.patch + "${FILESDIR}/${P}"-Makefile.patch +) + +src_configure() { + # there is no configure, Makefile must be modified + if ! use plotutils; then + sed -i 's/^PL/#PL/' Makefile || die + fi + if ! use readline; then + sed -i 's/^RL/#RL/' Makefile || die + fi +} + +src_install() { + emake \ + QCLDIR="${D}/usr/lib/${PN}" \ + QCLBIN="${D}/usr/bin" \ + install + dodoc CHANGES README + use doc && dodoc "${DISTDIR}/"{ccquprog,structquprog,qcldoc,quprog}.pdf +} |