From: "Andrew Savchenko" <bircoph@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/qcl/files/, sci-physics/qcl/
Date: Wed, 30 Jan 2019 05:44:29 +0000 (UTC) [thread overview]
Message-ID: <1548826872.f7e784db2ef31b9df95670407c28cd6d740a597a.bircoph@gentoo> (raw)
commit: f7e784db2ef31b9df95670407c28cd6d740a597a
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 30 05:41:12 2019 +0000
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Wed Jan 30 05:41:12 2019 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f7e784db
sci-physics/qcl: multiple improvements
- Update to EAPI 7
- Fix dependencies (RDEPEND were wrong)
- Install additional documentation
- Respect CFLAGS for qc lib as well
- Fix install paths so that qcl can find its lib
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
sci-physics/qcl/files/qcl-0.6.4-Makefile.patch | 69 ++++++++++++++++++++++++++
sci-physics/qcl/qcl-0.6.4-r2.ebuild | 55 ++++++++++++++++++++
2 files changed, 124 insertions(+)
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
+}
next reply other threads:[~2019-01-30 5:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 5:44 Andrew Savchenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-30 5:44 [gentoo-commits] proj/sci:master commit in: sci-physics/qcl/files/, sci-physics/qcl/ Andrew Savchenko
2014-06-02 20:30 Jauhien Piatlicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1548826872.f7e784db2ef31b9df95670407c28cd6d740a597a.bircoph@gentoo \
--to=bircoph@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox