app-crypt/rhash: Use elibc USE flags instead of CHOST for fixes
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 2 Sep 2017 12:36:39 +0000 (13:36 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sat, 2 Sep 2017 12:38:40 +0000 (13:38 +0100)
This is more accurate.

Package-Manager: Portage-2.3.8, Repoman-2.3.2

app-crypt/rhash/rhash-1.3.5.ebuild

index e1ea23cd4fc4c152410cfa4b8a40fffa151eda2c..77b468a64c52236d8dd49b219514790dc59d3b10 100644 (file)
@@ -27,7 +27,7 @@ src_prepare() {
        # Install /etc stuff inside the Prefix
        sed -i -e 's:\$(DESTDIR)/etc:\$(DESTDIR)/$(SYSCONFDIR):g' Makefile || die
 
-       if [[ ${CHOST} == *-darwin* ]] ; then
+       if use elibc_Darwin ; then
                local ver_script='-Wl,--version-script,exports.sym,-soname,$(SONAME)'
                local install_name='-install_name $(LIBDIR)/$(SONAME)'
                sed -i -e '/^\(SONAME\|SHAREDLIB\)/s/\.so\.\([0-9]\+\)/.\1.dylib/' \
@@ -37,7 +37,7 @@ src_prepare() {
                        Makefile || die
        fi
 
-       if [[ ${CHOST} == *-solaris* ]] ; then
+       if use elibc_SunOS ; then
                # https://sourceware.org/bugzilla/show_bug.cgi?id=12548
                # skip the export.sym for now
                sed -i -e 's/,--version-script,exports.sym//' librhash/Makefile || die
@@ -57,8 +57,8 @@ multilib_src_compile() {
                $(use openssl && echo -ldl)
        )
 
-       [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] \
-               && ADDLDFLAGS+=( $(use nls && echo -lintl) )
+       use elibc_Darwin || use elibc_SunOS &&
+                       ADDLDFLAGS+=( $(use nls && echo -lintl) )
 
        emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \
                  ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \