sci-mathematics/gmp-ecm: fix USE=custom-tune.
authorMichael Orlitzky <mjo@gentoo.org>
Sun, 1 Mar 2020 13:28:15 +0000 (08:28 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Sun, 1 Mar 2020 13:58:34 +0000 (08:58 -0500)
I overzealously removed the series of steps needed to build gmp-ecm
with custom parameters in the -r2. We need to build, find the custom
parameters, and then build again to reap the benefits. I left a
comment in the ebuild to explain that to other, future mes.

Bug: https://bugs.gentoo.org/711078
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r2.ebuild

index 62d2aabe95ee931fa41366e293d5fe6930684f3b..fa9bae778568b8c8c92aec65d226e5ea72a348d3 100644 (file)
@@ -26,6 +26,16 @@ pkg_pretend() {
        use openmp && tc-check-openmp
 }
 
+src_compile() {
+       default
+       if use custom-tune; then
+               # One "emake" was needed to build the library. Now we can find
+               # the best set of parameters, and then run "emake" one more time
+               # to rebuild the library with the custom parameters. See the
+               # project's README or INSTALL-ecm
+               emake ecm-params && emake
+       fi
+}
 src_configure() {
        econf \
                --enable-shared \