Gentoo Archives: gentoo-commits

From: Christoph Junghans <junghans@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/votca-ctp/
Date: Thu, 31 Jan 2019 20:16:10
Message-Id: 1548965750.e7249adcf0d036b82685cb11898e5ad86f314dc1.junghans@gentoo
commit:     e7249adcf0d036b82685cb11898e5ad86f314dc1
Author:     Christoph Junghans <junghans <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 31 20:07:28 2019 +0000
Commit:     Christoph Junghans <junghans <AT> gentoo <DOT> org>
CommitDate: Thu Jan 31 20:15:50 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7249adc

sci-chemistry/votca-ctp: version bump

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Christoph Junghans <junghans <AT> gentoo.org>

 sci-chemistry/votca-ctp/Manifest                   |  2 ++
 ...{votca-ctp-9999.ebuild => votca-ctp-1.5.ebuild} | 33 ++++++++++++++++++++--
 sci-chemistry/votca-ctp/votca-ctp-9999.ebuild      | 33 ++++++++++++++++++++--
 3 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/sci-chemistry/votca-ctp/Manifest b/sci-chemistry/votca-ctp/Manifest
new file mode 100644
index 00000000000..f527423449b
--- /dev/null
+++ b/sci-chemistry/votca-ctp/Manifest
@@ -0,0 +1,2 @@
+DIST votca-ctp-1.5.tar.gz 1345419 BLAKE2B 148846b9118cabfa541eb4fe0129e366d0c447e2daf969833beb5df91ca7b43f0262c5845303ccf05ed8d3f9e2c2a5e0f876ec97c2601419ed04a28d56640494 SHA512 bc4dbddcefb473015a6513f44f4fddd5995a8598f82505e81b3c50ae771e64e8c979f39a347ab2deb55054e7efffad28b5ff3f73d2c1b8905bcaf6f007ff2959
+DIST votca-ctp-manual-1.5.pdf 970539 BLAKE2B 8646215a4c2cd7be6d4c03820f00b8067e15c27f51fb6678540026cff1af0e28dffa528423ad47a4047a8f84fc1078d503a56a4a235e004735f0276ec1a6a33e SHA512 a315c1b4b37461f4f0d30ead1fec2ca33ff23d81c9d5e4d888ef7d7dd722f68f9596826f828f8a76841d6dde6889f623b73d9fe0f8a6c5a7cec1c16a83cf9030

diff --git a/sci-chemistry/votca-ctp/votca-ctp-9999.ebuild b/sci-chemistry/votca-ctp/votca-ctp-1.5.ebuild
similarity index 56%
copy from sci-chemistry/votca-ctp/votca-ctp-9999.ebuild
copy to sci-chemistry/votca-ctp/votca-ctp-1.5.ebuild
index 4e400a2318b..892997f7af3 100644
--- a/sci-chemistry/votca-ctp/votca-ctp-9999.ebuild
+++ b/sci-chemistry/votca-ctp/votca-ctp-1.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -7,9 +7,10 @@ CMAKE_MAKEFILE_GENERATOR="ninja"
 
 inherit cmake-utils multilib
 
-IUSE=""
+IUSE="doc"
 if [ "${PV}" != "9999" ]; then
-	SRC_URI="https://github.com/${PN/-//}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	SRC_URI="https://github.com/${PN/-//}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+		doc? ( https://github.com/${PN/-//}/releases/download/v${PV}/${PN}-manual-${PV}.pdf )"
 	KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
 	S="${WORKDIR}/${P#votca-}"
 else
@@ -33,8 +34,34 @@ RDEPEND="
 DEPEND="${RDEPEND}
 	virtual/pkgconfig"
 
+if [ "${PV}" != "9999" ]; then
+	DEPEND="${DEPEND}
+	doc? (
+		app-doc/doxygen[dot]
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/pgf
+	)"
+fi
+
 DOCS=( README.md NOTICE CHANGELOG.md )
 
+src_configure() {
+	[[ ${PV} = *9999* ]] && mycmakeargs=(
+		-DBUILD_XTP_MANUAL=$(usex doc)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	if use doc; then
+		[[ ${PV} != *9999* ]] && dodoc "${DISTDIR}/${PN}-manual-${PV}.pdf"
+		cmake-utils_src_make -C "${CMAKE_BUILD_DIR}" html
+		dodoc -r "${CMAKE_BUILD_DIR}"/share/doc/html
+	fi
+}
+
 pkg_postinst() {
 	einfo
 	einfo "Please read and cite:"

diff --git a/sci-chemistry/votca-ctp/votca-ctp-9999.ebuild b/sci-chemistry/votca-ctp/votca-ctp-9999.ebuild
index 4e400a2318b..892997f7af3 100644
--- a/sci-chemistry/votca-ctp/votca-ctp-9999.ebuild
+++ b/sci-chemistry/votca-ctp/votca-ctp-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -7,9 +7,10 @@ CMAKE_MAKEFILE_GENERATOR="ninja"
 
 inherit cmake-utils multilib
 
-IUSE=""
+IUSE="doc"
 if [ "${PV}" != "9999" ]; then
-	SRC_URI="https://github.com/${PN/-//}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	SRC_URI="https://github.com/${PN/-//}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+		doc? ( https://github.com/${PN/-//}/releases/download/v${PV}/${PN}-manual-${PV}.pdf )"
 	KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
 	S="${WORKDIR}/${P#votca-}"
 else
@@ -33,8 +34,34 @@ RDEPEND="
 DEPEND="${RDEPEND}
 	virtual/pkgconfig"
 
+if [ "${PV}" != "9999" ]; then
+	DEPEND="${DEPEND}
+	doc? (
+		app-doc/doxygen[dot]
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/pgf
+	)"
+fi
+
 DOCS=( README.md NOTICE CHANGELOG.md )
 
+src_configure() {
+	[[ ${PV} = *9999* ]] && mycmakeargs=(
+		-DBUILD_XTP_MANUAL=$(usex doc)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	if use doc; then
+		[[ ${PV} != *9999* ]] && dodoc "${DISTDIR}/${PN}-manual-${PV}.pdf"
+		cmake-utils_src_make -C "${CMAKE_BUILD_DIR}" html
+		dodoc -r "${CMAKE_BUILD_DIR}"/share/doc/html
+	fi
+}
+
 pkg_postinst() {
 	einfo
 	einfo "Please read and cite:"