commit:     5487949bc6e7b36df548068bb8e6de769a09dff7
Author:     Oliver Freyermuth <o.freyermuth <AT> googlemail <DOT> com>
AuthorDate: Sat Jan  2 20:51:43 2021 +0000
Commit:     Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Sun Jan  3 06:16:59 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=5487949b

sci-physics/genfit: Add functional live ebuild.

This also fixes documentation generation
and installation, and adds myself as maintainer.

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Oliver Freyermuth <o.freyermuth <AT> googlemail.com>
Signed-off-by: Horea Christian <chr <AT> chymera.eu>

 sci-physics/genfit/genfit-02.00.00.ebuild          | 34 ++++++++++++---------
 .../{genfit-02.00.00.ebuild => genfit-9999.ebuild} | 35 +++++++++++++---------
 sci-physics/genfit/metadata.xml                    |  6 +++-
 3 files changed, 46 insertions(+), 29 deletions(-)

diff --git a/sci-physics/genfit/genfit-02.00.00.ebuild 
b/sci-physics/genfit/genfit-02.00.00.ebuild
index 9aa92b2ba..c2e29cc03 100644
--- a/sci-physics/genfit/genfit-02.00.00.ebuild
+++ b/sci-physics/genfit/genfit-02.00.00.ebuild
@@ -1,24 +1,28 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-DOCS_BUILDER="doxygen"
-DOCS_DIR="doc"
+inherit cmake
 
-inherit cmake docs
-
-TAG_VER=${PN}-code-1688-tags-v${PV//./-}
+if [[ ${PV} == *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/GenFit/GenFit.git";
+       KEYWORDS=""
+else
+       TAG_VER=${PN}-code-1688-tags-v${PV//./-}
+       SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${TAG_VER}.zip";
+       KEYWORDS="~amd64 ~x86"
+       S=${WORKDIR}/${TAG_VER}
+fi
 
 DESCRIPTION="Generic toolkit for track reconstruction in physics experiments"
-HOMEPAGE="http://genfit.sourceforge.net/Main.html"; # no https
-SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${TAG_VER}.zip";
+HOMEPAGE="https://github.com/GenFit/GenFit";
 
 LICENSE="LGPL-3"
-KEYWORDS="~amd64 ~x86"
 SLOT="0"
 
-IUSE="examples"
+IUSE="doc examples"
 
 RDEPEND="
        sci-physics/root:=
@@ -26,18 +30,20 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
-S=${WORKDIR}/${TAG_VER}
-
 src_compile() {
        cmake_src_compile
-       docs_compile
+       use doc && cmake_src_compile doc
        use examples && cmake_src_compile tests
 }
 
 src_install() {
        cmake_src_install
+       if use doc; then
+               docinto html
+               dodoc -r doc/html/.
+       fi
        if use examples; then
-               insinto /usr/share/doc/${PF}
+               insinto /usr/share/doc/${PF}/examples
                doins -r "${BUILD_DIR}/bin"
                doins test/makeGeom.C
                doins test/README

diff --git a/sci-physics/genfit/genfit-02.00.00.ebuild 
b/sci-physics/genfit/genfit-9999.ebuild
similarity index 59%
copy from sci-physics/genfit/genfit-02.00.00.ebuild
copy to sci-physics/genfit/genfit-9999.ebuild
index 9aa92b2ba..1e4e75ae7 100644
--- a/sci-physics/genfit/genfit-02.00.00.ebuild
+++ b/sci-physics/genfit/genfit-9999.ebuild
@@ -3,22 +3,27 @@
 
 EAPI=7
 
-DOCS_BUILDER="doxygen"
-DOCS_DIR="doc"
-
-inherit cmake docs
-
-TAG_VER=${PN}-code-1688-tags-v${PV//./-}
+inherit cmake
+
+if [[ ${PV} == *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/GenFit/GenFit.git";
+       KEYWORDS=""
+else
+       EGIT_COMMIT=""
+       MY_PN="GenFit"
+       SRC_URI="https://github.com/GenFit/GenFit/archive/${EGIT_COMMIT}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+       S="${WORKDIR}/${MY_PN}-${EGIT_COMMIT}"
+fi
 
 DESCRIPTION="Generic toolkit for track reconstruction in physics experiments"
-HOMEPAGE="http://genfit.sourceforge.net/Main.html"; # no https
-SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${TAG_VER}.zip";
+HOMEPAGE="https://github.com/GenFit/GenFit";
 
 LICENSE="LGPL-3"
-KEYWORDS="~amd64 ~x86"
 SLOT="0"
 
-IUSE="examples"
+IUSE="doc examples"
 
 RDEPEND="
        sci-physics/root:=
@@ -26,18 +31,20 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
-S=${WORKDIR}/${TAG_VER}
-
 src_compile() {
        cmake_src_compile
-       docs_compile
+       use doc && cmake_src_compile doc
        use examples && cmake_src_compile tests
 }
 
 src_install() {
        cmake_src_install
+       if use doc; then
+               docinto html
+               dodoc -r doc/html/.
+       fi
        if use examples; then
-               insinto /usr/share/doc/${PF}
+               insinto /usr/share/doc/${PF}/examples
                doins -r "${BUILD_DIR}/bin"
                doins test/makeGeom.C
                doins test/README

diff --git a/sci-physics/genfit/metadata.xml b/sci-physics/genfit/metadata.xml
index 90b22390e..2796af0dc 100644
--- a/sci-physics/genfit/metadata.xml
+++ b/sci-physics/genfit/metadata.xml
@@ -1,6 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
+       <maintainer type="person">
+               <email>o.freyerm...@googlemail.com</email>
+               <name>Oliver Freyermuth</name>
+       </maintainer>
        <maintainer type="project">
                <email>sci-phys...@gentoo.org</email>
                <name>Gentoo Physics Project</name>
@@ -32,6 +36,6 @@ FAIR, Darmstadt, Germany.
 It is also used in the Belle-2, Fopi, and GEM-TPC experiments.
 </longdescription>
        <upstream>
-               <remote-id type="sourceforge">genfit</remote-id>
+               <remote-id type="github">GenFit/GenFit</remote-id>
        </upstream>
 </pkgmetadata>

Reply via email to