/[gentoo-x86]/sci-libs/cdf/cdf-3.5.0.2.ebuild
Gentoo

Contents of /sci-libs/cdf/cdf-3.5.0.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Apr 3 14:22:51 2015 UTC (3 years, 5 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Version Bump, drop old

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)

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/cdf/cdf-3.4.1.ebuild,v 1.2 2012/11/12 02:47:14 bicatali Exp $
4
5 EAPI=5
6
7 inherit eutils java-pkg-opt-2 multilib toolchain-funcs versionator
8
9 MY_DP="${PN}$(get_version_component_range 1)$(get_version_component_range 2)"
10 MY_P="${MY_DP}_$(get_version_component_range 3)"
11
12 DESCRIPTION="Common Data Format I/O library for multi-dimensional data sets"
13 HOMEPAGE="http://cdf.gsfc.nasa.gov/"
14 SRC_BASE="http://cdaweb.gsfc.nasa.gov/pub/software/${PN}/dist/${MY_P}/unix/"
15
16 SRC_URI="${SRC_BASE}/${MY_P}-dist-${PN}.tar.gz
17 java? ( ${SRC_BASE}/${MY_P}-dist-java.tar.gz )
18 doc? (
19 ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0crm.pdf
20 ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0frm.pdf
21 ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}ifd.pdf
22 ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0prm.pdf
23 ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0ug.pdf
24 java? ( ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0jrm.pdf )
25 )"
26
27 LICENSE="CDF"
28 SLOT="0"
29 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
30 IUSE="doc examples java ncurses static-libs"
31
32 RDEPEND="
33 java? ( >=virtual/jre-1.5 )
34 ncurses? ( sys-libs/ncurses )
35 "
36 DEPEND="
37 java? ( >=virtual/jdk-1.5 )
38 ncurses? ( sys-libs/ncurses )
39 "
40
41 S="${WORKDIR}/${MY_P}-dist"
42
43 src_prepare() {
44 # respect cflags, remove useless scripts
45 epatch \
46 "${FILESDIR}"/${P}-Makefile.patch \
47 "${FILESDIR}"/${PN}-3.2-soname.patch
48 # use proper lib dir
49 sed -i \
50 -e "s:\$(INSTALLDIR)/lib:\$(INSTALLDIR)/$(get_libdir):g" \
51 Makefile || die "sed failed"
52 }
53
54 src_compile() {
55 PV_SO=${PV:0:1}
56 emake \
57 OS=linux \
58 CC=$(tc-getCC) \
59 ENV=gnu \
60 SHARED=yes \
61 SHAREDEXT_linux=so.${PV_SO} \
62 CURSESLIB_linux_gnu="$(usex ncurses "$($(tc-getPKG_CONFIG) --libs ncurses)" "")" \
63 CURSES=$(usex ncurses) \
64 ${myconf} \
65 all
66
67 if use java; then
68 export CDF_BASE="${S}"
69 export CDF_LIB="${S}/src/lib"
70 cd cdfjava/jni
71 $(tc-getCC) \
72 ${CFLAGS} -fPIC \
73 -I${CDF_BASE}/src/include \
74 -I$(java-config -O)/include \
75 -I$(java-config -O)/include/linux \
76 -c cdfNativeLibrary.c \
77 -o cdfNativeLibrary.o \
78 || die "compiling java lib failed"
79 $(tc-getCC) \
80 ${LDFLAGS} \
81 -shared cdfNativeLibrary.o \
82 -Wl,-soname=libcdfNativeLibrary.so.${PV_SO} \
83 -L${CDF_LIB} -lcdf -lm \
84 -o libcdfNativeLibrary.so.${PV_SO} \
85 || die "linking java lib failed"
86 fi
87 }
88
89 src_test() {
90 emake -j1 test
91 }
92
93 src_install() {
94 dodir /usr/bin /usr/$(get_libdir)
95 # -j1 (fragile non-autotooled make)
96 emake -j1 \
97 INSTALLDIR="${ED}/usr" \
98 SHAREDEXT=so.${PV_SO} \
99 install
100 dosym libcdf.so.${PV_SO} /usr/$(get_libdir)/libcdf.so
101 use static-libs || rm "${ED}"/usr/$(get_libdir)/libcdf.a
102 dodoc Release.notes CHANGES.txt Welcome.txt
103 doenvd "${FILESDIR}"/50cdf
104
105 if use doc; then
106 insinto /usr/share/doc/${PF}
107 doins "${DISTDIR}"/${MY_DP}*.pdf
108 use java || rm "${D}"/usr/share/doc/${PF}/${MY_P}jrm.pdf
109 fi
110
111 if use examples; then
112 insinto /usr/share/doc/${PF}/examples
113 doins samples/*
114 fi
115
116 if use java; then
117 cd cdfjava || die
118 dolib.so jni/libcdfNativeLibrary.so.${PV_SO}
119 dosym libcdfNativeLibrary.so.${PV_SO} \
120 /usr/$(get_libdir)/libcdfNativeLibrary.so
121 java-pkg_dojar */*.jar
122 if use examples; then
123 insinto /usr/share/doc/${PF}/examples/java
124 doins examples/*
125 fi
126 fi
127 }

  ViewVC Help
Powered by ViewVC 1.1.20