/[gentoo-x86]/sci-libs/udunits/udunits-1.12.3.ebuild
Gentoo

Contents of /sci-libs/udunits/udunits-1.12.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Jun 23 08:29:31 2010 UTC (10 years, 5 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Version bump, removed old version
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/udunits/udunits-1.12.3.ebuild,v 1.4 2009/12/07 03:41:00 bicatali Exp $
4
5 inherit eutils flag-o-matic fortran perl-module toolchain-funcs
6
7 IUSE=""
8
9 S=${WORKDIR}/${P}/src
10 SP=${WORKDIR}/${P}/src/perl
11 DESCRIPTION="The UCAR/Unidata Units library"
12 HOMEPAGE="http://www.unidata.ucar.edu/packages/udunits/"
13 SRC_URI="ftp://unidata.ucar.edu/pub/udunits/udunits-${PV}.tar.Z"
14
15 SLOT="0"
16 LICENSE="UCAR-Unidata"
17 KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~alpha ~mips ~hppa"
18
19 DEPEND="dev-lang/perl
20 sys-apps/sed"
21
22 RDEPEND="dev-lang/perl"
23
24 src_unpack() {
25 unpack ${A}
26 cd "${S}"
27 sed -i -e "s:\${prefix}/etc:/etc:g" \
28 -i -e "s:\${prefix}/man:\${prefix}/share/man:g" \
29 -i -e "s:\${exec_prefix}/lib:\${exec_prefix}/$(get_libdir):g" \
30 configure || die "sed 1 failed"
31 epatch "${FILESDIR}/${P}-fixingtests.patch"
32 }
33
34 src_compile() {
35 export CPPFLAGS="-Df2cFortran -D_POSIX_SOURCE"
36 export CFLAGS="${CFLAGS}"
37 export FC="${FORTRANC}"
38 export CC="$(tc-getCC)"
39 export CXX="$(tc-getCXX)"
40 export LD_MATH="-lm"
41 # This is needed for the perl shared object build
42 append-flags -fPIC
43
44 econf || die "econf failed"
45
46 cd "${S}"/lib
47 emake || die "emake lib failed"
48 cd "${S}"
49
50 cd "${S}"/perl
51 perl-module_src_prep
52 perl-module_src_compile
53 cd "${S}"
54
55 # random compile failures with -jN (when N > 1)
56 emake -j1 || die "emake died"
57 }
58
59 src_test() {
60 make check || die "make test failed"
61 }
62
63 src_install() {
64 # The configure sucks, and so do the makefiles; this pretty much
65 # needs to be done manually...
66 dobin udunits/udunits
67 dolib.a lib/libudunits.a port/misc/libudport.a
68 doman udunits/udunits.1 lib/udunits.3 perl/udunitsperl.1
69
70 insinto /etc
71 doins lib/udunits.dat
72 insinto /usr/include
73 doins lib/{udunits.h,udunits.inc}
74 # doman still doesn't put this in the right place
75 insinto /usr/share/man/man3f
76 doins lib/udunits.3f
77 dodoc README RELEASE_NOTES
78
79 fixlocalpod
80 cd "${S}"/perl
81 perl-module_src_install
82 cd "${S}"
83
84 # Clean up left-over cruft... (yes, this is still needed)
85 find "${D}" -type f -a \( -name perllocal.pod -o -name .packlist \
86 -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
87 find "${D}" -type d -depth -exec rmdir {} 2>/dev/null ';'
88 chmod -R u+w "${D}"/*
89 }
90
91 pkg_postinst() {
92 ewarn "This package requires a Fortran compiler for maximum utility."
93 ewarn "For now, make sure you have at least g77 for the f77 interface."
94 ewarn "The internal configure should detect many f77 compilers, however,"
95 ewarn "if you have the PG compiler you will need to change the above"
96 ewarn "preprocessor macro to something like -Dpgifortran."
97 }

  ViewVC Help
Powered by ViewVC 1.1.20