/[gentoo-x86]/sci-libs/djbfft/djbfft-0.76-r2.ebuild
Gentoo

Contents of /sci-libs/djbfft/djbfft-0.76-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri Jan 2 12:19:29 2015 UTC (5 years ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +2 -2 lines
Stable for sparc, wrt bug #526034

(Portage version: 2.2.14/cvs/Linux x86_64, RepoMan options: --include-arches="sparc", signed Manifest commit with key 7194459F)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/djbfft/djbfft-0.76-r2.ebuild,v 1.7 2015/01/01 11:12:59 ago Exp $
4
5 EAPI=5
6 inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
7
8 DESCRIPTION="Extremely fast library for floating-point convolution"
9 HOMEPAGE="http://cr.yp.to/djbfft.html"
10 SRC_URI="http://cr.yp.to/djbfft/${P}.tar.gz"
11
12 LICENSE="public-domain"
13 SLOT="0"
14 KEYWORDS="alpha amd64 arm ~hppa ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
15 IUSE=""
16 DOCS=( CHANGES README TODO VERSION )
17
18 src_prepare() {
19 SOVER="${PV:0:1}.${PV:2:1}.${PV:3:1}" # a.bc -> a.b.c
20 # mask out everything, which is not suggested by the author (RTFM)!
21 ALLOWED_FLAGS="-fstack-protector -march -mcpu -pipe -mpreferred-stack-boundary -ffast-math"
22 strip-flags
23
24 SONAME="libdjbfft.so.${SOVER}"
25
26 epatch \
27 "${FILESDIR}"/${P}-gcc3.patch \
28 "${FILESDIR}"/${P}-shared.patch \
29 "${FILESDIR}"/${P}-headers.patch
30 multilib_copy_sources
31 }
32
33 multilib_src_configure() {
34 [[ ${ABI} == x86* ]] && append-cflags -malign-double
35
36 sed -i -e "s:\"lib\":\"$(get_libdir)\":" hier.c || die
37 echo "$(tc-getCC) ${CFLAGS} -fPIC" > "conf-cc"
38 echo "$(tc-getCC) ${LDFLAGS}" > "conf-ld"
39 echo "${ED}usr" > "conf-home"
40 einfo "conf-cc: $(<conf-cc)"
41 }
42
43 multilib_src_compile() {
44 emake \
45 LIBDJBFFT=${SONAME} \
46 LIBPERMS=0755 \
47 ${SONAME}
48 echo "the compile function was:"
49 cat ./compile
50 echo "the conf-ld function was:"
51 cat ./conf-ld
52 }
53
54 multilib_src_test() {
55 local t
56 for t in accuracy accuracy2 speed; do
57 emake ${t}
58 einfo "Testing ${t}"
59 LD_LIBRARY_PATH=. ./${t} > ${t}.out || die "test ${t} failed"
60 done
61 }
62
63 multilib_src_install() {
64 emake LIBDJBFFT=${SONAME} install
65 ./install || die "install failed"
66 dosym ${SONAME} /usr/$(get_libdir)/libdjbfft.so
67 dosym ${SONAME} /usr/$(get_libdir)/libdjbfft.so.${SOVER%%.*}
68 }

  ViewVC Help
Powered by ViewVC 1.1.20