commit:     485e8323767b896b94205807f0d09fc096fc4091
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Mon Jan 11 16:23:06 2021 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Jan 13 03:06:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=485e8323

sci-electronics/systemc: fix 2.3.1 examples

Add examples and doc use, use docompress -x with examples.
Revbump to 2.3.1-r1, removed DOC var because it installed
by Makefile. Drop pkg_postinst() because the example already
extracted by docompress -x.

Closes: https://github.com/gentoo/gentoo/pull/19033

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 ...ystemc-2.3.4.ebuild => systemc-2.3.4-r1.ebuild} | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/sci-electronics/systemc/systemc-2.3.4.ebuild 
b/sci-electronics/systemc/systemc-2.3.4-r1.ebuild
similarity index 69%
rename from sci-electronics/systemc/systemc-2.3.4.ebuild
rename to sci-electronics/systemc/systemc-2.3.4-r1.ebuild
index b9efef41568..4669cd8f6d9 100644
--- a/sci-electronics/systemc/systemc-2.3.4.ebuild
+++ b/sci-electronics/systemc/systemc-2.3.4-r1.ebuild
@@ -24,11 +24,10 @@ fi
 
 LICENSE="Apache-2.0"
 SLOT="0"
-IUSE="debug static-libs test"
+IUSE="debug doc examples static-libs test"
+REQUIRED_USE="examples? ( doc )"
 RESTRICT="!test? ( test )"
 
-DOCS=(AUTHORS.md CONTRIBUTING.md INSTALL.md LICENSE NOTICE README.md 
RELEASENOTES)
-
 src_prepare() {
        default
        eautoconf --force
@@ -41,12 +40,15 @@ src_configure() {
                --with-unix-layout
 }
 
-pkg_postinst() {
-       elog "If you want to run the examples, you need to :"
-       elog "    tar xvfz ${PORTAGE_ACTUAL_DISTDIR}/${A}"
-       elog "    cd ${PN}-${MY_PV}"
-       elog "    mkdir build && cd build"
-       elog "    cmake .."
-       elog "    cd examples"
-       elog "    make check"
+src_install() {
+       default
+       if use doc; then
+               if use examples; then
+                       docompress -x /usr/share/doc/"${PF}"/examples
+               else
+                       rm -r "${ED}"/usr/share/doc/"${PF}"/examples || die
+               fi
+       else
+               rm -r "${ED}"/usr/share/doc/"${PF}" || die
+       fi
 }

Reply via email to