commit:     60b3ee89cdb77a16333e04f024306c07478f4237
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 17 13:19:07 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Apr 17 13:21:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60b3ee89

app-arch/zstd: Simplified multilib ebuilds

Package-Manager: Portage-2.3.63, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-arch/zstd/zstd-1.3.7-r1.ebuild | 40 +++++++++++++-------------------------
 app-arch/zstd/zstd-1.3.8.ebuild    | 40 +++++++++++++-------------------------
 app-arch/zstd/zstd-1.4.0.ebuild    | 40 +++++++++++++-------------------------
 3 files changed, 39 insertions(+), 81 deletions(-)

diff --git a/app-arch/zstd/zstd-1.3.7-r1.ebuild 
b/app-arch/zstd/zstd-1.3.7-r1.ebuild
index 86934ff67a4..1561c0dd4a5 100644
--- a/app-arch/zstd/zstd-1.3.7-r1.ebuild
+++ b/app-arch/zstd/zstd-1.3.7-r1.ebuild
@@ -23,47 +23,33 @@ src_prepare() {
        multilib_copy_sources
 }
 
-multilib_src_compile() {
-       emake -C lib \
+mymake() {
+       emake \
                CC="$(tc-getCC)" \
+               CXX="$(tc-getCXX)" \
                AR="$(tc-getAR)" \
                PREFIX="${EPREFIX}/usr" \
                LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-               libzstd libzstd.a libzstd.pc
+               "${@}"
+}
+
+multilib_src_compile() {
+       mymake -C lib libzstd libzstd.a libzstd.pc
 
        if multilib_is_native_abi ; then
-               emake \
-                       CC="$(tc-getCC)" \
-                       AR="$(tc-getAR)" \
-                       HAVE_LZ4=$(usex lz4 1 0) \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
+               mymake zstd
 
-               emake -C contrib/pzstd \
-                       CC="$(tc-getCC)" \
-                       CXX="$(tc-getCXX)" \
-                       AR="$(tc-getAR)" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+               mymake -C contrib/pzstd
        fi
 }
 
 multilib_src_install() {
-       emake -C lib \
-               DESTDIR="${D}" \
-               PREFIX="${EPREFIX}/usr" \
-               LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+       mymake -C lib DESTDIR="${D}" install
 
        if multilib_is_native_abi ; then
-               emake -C programs \
-                       DESTDIR="${D}" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+               mymake -C programs DESTDIR="${D}" install
 
-               emake -C contrib/pzstd \
-                       DESTDIR="${D}" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+               mymake -C contrib/pzstd DESTDIR="${D}" install
        fi
 }
 

diff --git a/app-arch/zstd/zstd-1.3.8.ebuild b/app-arch/zstd/zstd-1.3.8.ebuild
index 51e41cc42c0..2704ae6a18f 100644
--- a/app-arch/zstd/zstd-1.3.8.ebuild
+++ b/app-arch/zstd/zstd-1.3.8.ebuild
@@ -23,47 +23,33 @@ src_prepare() {
        multilib_copy_sources
 }
 
-multilib_src_compile() {
-       emake -C lib \
+mymake() {
+       emake \
                CC="$(tc-getCC)" \
+               CXX="$(tc-getCXX)" \
                AR="$(tc-getAR)" \
                PREFIX="${EPREFIX}/usr" \
                LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-               libzstd libzstd.a libzstd.pc
+               "${@}"
+}
+
+multilib_src_compile() {
+       mymake -C lib libzstd libzstd.a libzstd.pc
 
        if multilib_is_native_abi ; then
-               emake \
-                       CC="$(tc-getCC)" \
-                       AR="$(tc-getAR)" \
-                       HAVE_LZ4=$(usex lz4 1 0) \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
+               mymake zstd
 
-               emake -C contrib/pzstd \
-                       CC="$(tc-getCC)" \
-                       CXX="$(tc-getCXX)" \
-                       AR="$(tc-getAR)" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+               mymake -C contrib/pzstd
        fi
 }
 
 multilib_src_install() {
-       emake -C lib \
-               DESTDIR="${D}" \
-               PREFIX="${EPREFIX}/usr" \
-               LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+       mymake -C lib DESTDIR="${D}" install
 
        if multilib_is_native_abi ; then
-               emake -C programs \
-                       DESTDIR="${D}" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+               mymake -C programs DESTDIR="${D}" install
 
-               emake -C contrib/pzstd \
-                       DESTDIR="${D}" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+               mymake -C contrib/pzstd DESTDIR="${D}" install
        fi
 }
 

diff --git a/app-arch/zstd/zstd-1.4.0.ebuild b/app-arch/zstd/zstd-1.4.0.ebuild
index 51e41cc42c0..2704ae6a18f 100644
--- a/app-arch/zstd/zstd-1.4.0.ebuild
+++ b/app-arch/zstd/zstd-1.4.0.ebuild
@@ -23,47 +23,33 @@ src_prepare() {
        multilib_copy_sources
 }
 
-multilib_src_compile() {
-       emake -C lib \
+mymake() {
+       emake \
                CC="$(tc-getCC)" \
+               CXX="$(tc-getCXX)" \
                AR="$(tc-getAR)" \
                PREFIX="${EPREFIX}/usr" \
                LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-               libzstd libzstd.a libzstd.pc
+               "${@}"
+}
+
+multilib_src_compile() {
+       mymake -C lib libzstd libzstd.a libzstd.pc
 
        if multilib_is_native_abi ; then
-               emake \
-                       CC="$(tc-getCC)" \
-                       AR="$(tc-getAR)" \
-                       HAVE_LZ4=$(usex lz4 1 0) \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
+               mymake zstd
 
-               emake -C contrib/pzstd \
-                       CC="$(tc-getCC)" \
-                       CXX="$(tc-getCXX)" \
-                       AR="$(tc-getAR)" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+               mymake -C contrib/pzstd
        fi
 }
 
 multilib_src_install() {
-       emake -C lib \
-               DESTDIR="${D}" \
-               PREFIX="${EPREFIX}/usr" \
-               LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+       mymake -C lib DESTDIR="${D}" install
 
        if multilib_is_native_abi ; then
-               emake -C programs \
-                       DESTDIR="${D}" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+               mymake -C programs DESTDIR="${D}" install
 
-               emake -C contrib/pzstd \
-                       DESTDIR="${D}" \
-                       PREFIX="${EPREFIX}/usr" \
-                       LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+               mymake -C contrib/pzstd DESTDIR="${D}" install
        fi
 }
 

Reply via email to