app-text/libetonyek: Dumb down dev-util/mdds pseudo slot detection
authorAndreas Sturmlechner <asturm@gentoo.org>
Thu, 4 Oct 2018 10:30:41 +0000 (12:30 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Thu, 4 Oct 2018 10:31:11 +0000 (12:31 +0200)
The previous solution was not that smart after all.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11

app-text/libetonyek/libetonyek-0.1.8-r1.ebuild
app-text/libetonyek/libetonyek-9999.ebuild

index 2d13eaf89aa8698d3529332ab5aa4d65a7346ffd..e58d47644acfe1722c43a4f950acd97799cce2c6 100644 (file)
@@ -46,15 +46,19 @@ src_prepare() {
 }
 
 src_configure() {
-       # mdds installs versioned pkgconfig files
-       local p=$(best_version dev-util/mdds)
-       local pv=$(echo ${p/%-r[0-9]*/} | rev | cut -d - -f 1 | rev)
-       econf \
-               --disable-werror \
-               --with-mdds=$(ver_cut 1-2 ${pv}) \
-               $(use_with doc docs) \
-               $(use_enable static-libs static) \
+       local myeconfargs=(
+               --disable-werror
+               $(use_with doc docs)
+               $(use_enable static-libs static)
                $(use_enable test tests)
+       )
+       if has_version ">=dev-util/mdds-1.4"; then
+               myeconfargs+=( --with-mdds=1.4 )
+       else
+               myeconfargs+=( --with-mdds=1.2 )
+       fi
+
+       econf "${myeconfargs[@]}"
 }
 
 src_install() {
index 682cf934b09fb10b98560b1bbc47d50ec24b16bb..434fddd7f1a70ee16171cec71e5472e3085fb39f 100644 (file)
@@ -39,15 +39,19 @@ src_prepare() {
 }
 
 src_configure() {
-       # mdds installs versioned pkgconfig files
-       local p=$(best_version dev-util/mdds)
-       local pv=$(echo ${p/%-r[0-9]*/} | rev | cut -d - -f 1 | rev)
-       econf \
-               --disable-werror \
-               --with-mdds=$(ver_cut 1-2 ${pv}) \
-               $(use_with doc docs) \
-               $(use_enable static-libs static) \
+       local myeconfargs=(
+               --disable-werror
+               $(use_with doc docs)
+               $(use_enable static-libs static)
                $(use_enable test tests)
+       )
+       if has_version ">=dev-util/mdds-1.4"; then
+               myeconfargs+=( --with-mdds=1.4 )
+       else
+               myeconfargs+=( --with-mdds=1.2 )
+       fi
+
+       econf "${myeconfargs[@]}"
 }
 
 src_install() {