dev-ada/libadalang: can build static or shared
authorTupone Alfredo <tupone@gentoo.org>
Wed, 19 Jun 2019 20:55:56 +0000 (22:55 +0200)
committerTupone Alfredo <tupone@gentoo.org>
Thu, 20 Jun 2019 07:16:43 +0000 (09:16 +0200)
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11

dev-ada/libadalang/libadalang-2019.ebuild

index 456a0f54f86f816d59f82b807b31a16e74d569ab..823b7b6d2d1caa47a641622eabc154b96cc4ad73 100644 (file)
@@ -37,7 +37,19 @@ src_configure() {
 }
 
 src_compile() {
-       ada/manage.py -v debug build --build-mode='prod' || die
+       libtype=relocatable
+       if use shared; then
+               if use static-libs; then
+                       libtype=static,relocatable
+               fi
+       elif use static-libs; then
+               libtype=static
+       fi
+       ada/manage.py \
+               -v \
+               --library-types $libtype \
+               build \
+               --build-mode='prod' || die
 }
 
 src_test () {
@@ -46,7 +58,10 @@ src_test () {
 }
 
 src_install () {
-       ada/manage.py install "${D}"/usr || die
+       ada/manage.py \
+               -v \
+               --library-types $libtype \
+               install "${D}"/usr || die
        python_domodule build/python/libadalang
        rm -r "${D}"/usr/python || die
 }