diff options
author | David Seifert <soap@gentoo.org> | 2021-05-09 21:18:14 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-05-09 21:18:14 +0200 |
commit | aa727d510a92bf1af563a364d31fbc624e697841 (patch) | |
tree | 4010420851adc6872ec7c64b567a1dc34640bfb8 /sci-libs | |
parent | app-admin/socklog: Respect AR/RANLIB (diff) | |
download | gentoo-aa727d510a92bf1af563a364d31fbc624e697841.tar.gz gentoo-aa727d510a92bf1af563a364d31fbc624e697841.tar.bz2 gentoo-aa727d510a92bf1af563a364d31fbc624e697841.zip |
sci-libs/primegen: Respect AR/RANLIB
Closes: https://bugs.gentoo.org/725616
Closes: https://bugs.gentoo.org/731938
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-libs')
4 files changed, 43 insertions, 22 deletions
diff --git a/sci-libs/primegen/files/primegen-0.97-man.patch b/sci-libs/primegen/files/primegen-0.97-man.patch index 069409f1df76..f57c4dfce42b 100644 --- a/sci-libs/primegen/files/primegen-0.97-man.patch +++ b/sci-libs/primegen/files/primegen-0.97-man.patch @@ -2,8 +2,8 @@ Fix incorrect man page and include mention of the possibility of linking to a static libary only. https://bugs.gentoo.org/show_bug.cgi?id=562570 ---- primegen-0.97/primegen.3 -+++ primegen-0.97/primegen.3 +--- a/primegen.3 ++++ b/primegen.3 @@ -14,13 +14,16 @@ .br void \fBprimegen_skipto\fP(&\fIpg\fR,\fIbound\fR); diff --git a/sci-libs/primegen/files/primegen-0.97-missing-headers.patch b/sci-libs/primegen/files/primegen-0.97-missing-headers.patch index 51f1aaac3823..2b15756c8d1b 100644 --- a/sci-libs/primegen/files/primegen-0.97-missing-headers.patch +++ b/sci-libs/primegen/files/primegen-0.97-missing-headers.patch @@ -1,5 +1,5 @@ ---- primegen-0.97/eratspeed.c.orig 2009-03-27 09:16:52.000000000 -0300 -+++ primegen-0.97/eratspeed.c 2009-03-27 09:18:29.000000000 -0300 +--- a/eratspeed.c ++++ b/eratspeed.c @@ -1,6 +1,8 @@ #define B32 1001 #define B (B32 * 32) @@ -9,32 +9,32 @@ #include "timing.h" #include "uint32.h" ---- primegen-0.97/primegaps.c.orig 2009-03-27 09:17:07.000000000 -0300 -+++ primegen-0.97/primegaps.c 2009-03-27 09:17:19.000000000 -0300 +--- a/primegaps.c ++++ b/primegaps.c @@ -1,4 +1,5 @@ #include <math.h> +#include <stdio.h> #include "primegen.h" primegen pg; ---- primegen-0.97/primes.c.orig 2009-03-27 09:19:08.000000000 -0300 -+++ primegen-0.97/primes.c 2009-03-27 09:19:14.000000000 -0300 +--- a/primes.c ++++ b/primes.c @@ -1,4 +1,5 @@ #include <stdio.h> +#include <stdlib.h> #include "primegen.h" #include "fs64.h" ---- primegen-0.97/primespeed.c.orig 2009-03-27 09:17:41.000000000 -0300 -+++ primegen-0.97/primespeed.c 2009-03-27 09:18:54.000000000 -0300 +--- a/primespeed.c ++++ b/primespeed.c @@ -1,3 +1,5 @@ +#include <stdio.h> +#include <stdlib.h> #include "timing.h" #include "primegen.h" #include "primegen_impl.h" ---- primegen-0.97/error.h.orig 2009-09-11 19:40:53.000000000 +0100 -+++ primegen-0.97/error.h 2009-09-11 19:41:02.000000000 +0100 +--- a/error.h ++++ b/error.h @@ -1,7 +1,7 @@ #ifndef ERROR_H #define ERROR_H diff --git a/sci-libs/primegen/files/primegen-0.97-respect-ar-ranlib.patch b/sci-libs/primegen/files/primegen-0.97-respect-ar-ranlib.patch new file mode 100644 index 000000000000..967c005b08be --- /dev/null +++ b/sci-libs/primegen/files/primegen-0.97-respect-ar-ranlib.patch @@ -0,0 +1,18 @@ +--- a/make-makelib.sh ++++ b/make-makelib.sh +@@ -1,6 +1,6 @@ + echo 'main="$1"; shift' + echo 'rm -f "$main"' +-echo 'ar cr "$main" ${1+"$@"}' ++echo '${AR} cr "$main" ${1+"$@"}' + + case "$1" in + sunos-5.*) ;; +@@ -11,6 +11,6 @@ + hp-ux-*) ;; + sco*) ;; + *) +- echo 'ranlib "$main"' ++ echo '${RANLIB} "$main"' + ;; + esac diff --git a/sci-libs/primegen/primegen-0.97-r2.ebuild b/sci-libs/primegen/primegen-0.97-r2.ebuild index 72285f5925f0..0f2528bcf5d3 100644 --- a/sci-libs/primegen/primegen-0.97-r2.ebuild +++ b/sci-libs/primegen/primegen-0.97-r2.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 + inherit flag-o-matic toolchain-funcs DESCRIPTION="Small, fast library to generate primes in order" @@ -11,17 +12,18 @@ SRC_URI="http://cr.yp.to/primegen/${P}.tar.gz" LICENSE="public-domain" SLOT="0" KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux" -IUSE="" PATCHES=( - "${FILESDIR}/${P}-man.patch" - "${FILESDIR}/${P}-missing-headers.patch" + "${FILESDIR}"/${P}-man.patch + "${FILESDIR}"/${P}-missing-headers.patch + "${FILESDIR}"/${P}-respect-ar-ranlib.patch ) src_prepare() { default - while IFS="" read -d $'\0' -r file - do + + local file + while IFS="" read -d $'\0' -r file; do sed -i -e 's:\(primegen.a\):lib\1:' "${file}" || die done < <(find . -type f -print0) mkdir usr || die @@ -30,9 +32,10 @@ src_prepare() { src_configure() { # Fixes bug #161015 append-flags -fsigned-char - echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die + echo "$(tc-getCC) ${CFLAGS} ${CPPFLAGS}" > conf-cc || die echo "${S}/usr" > conf-home || die echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die + tc-export AR RANLIB } src_test() { @@ -48,7 +51,7 @@ src_install() { -e "s/#include \"uint32.h\"/$(grep typedef uint32.h)/" \ -e "s/#include \"uint64.h\"/$(grep typedef uint64.h)/" \ primegen.h || die - insinto /usr/include - doins primegen.h + + doheader primegen.h dodoc BLURB CHANGES README TODO } |