1 |
nerdboy 11/05/03 05:23:55 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: libbufr-000387.ebuild |
5 |
Log: |
6 |
Updated to newer upstream version, including tests. |
7 |
|
8 |
(Portage version: 2.1.9.46/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.5 sci-libs/libbufr/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libbufr/ChangeLog?rev=1.5&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libbufr/ChangeLog?rev=1.5&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libbufr/ChangeLog?r1=1.4&r2=1.5 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-libs/libbufr/ChangeLog,v |
20 |
retrieving revision 1.4 |
21 |
retrieving revision 1.5 |
22 |
diff -u -r1.4 -r1.5 |
23 |
--- ChangeLog 17 Mar 2011 06:20:45 -0000 1.4 |
24 |
+++ ChangeLog 3 May 2011 05:23:55 -0000 1.5 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for sci-libs/libbufr |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/libbufr/ChangeLog,v 1.4 2011/03/17 06:20:45 nerdboy Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libbufr/ChangeLog,v 1.5 2011/05/03 05:23:55 nerdboy Exp $ |
30 |
+ |
31 |
+*libbufr-000387 (03 May 2011) |
32 |
+ |
33 |
+ 03 May 2011; Steve Arnold <nerdboy@g.o> +libbufr-000387.ebuild, |
34 |
+ +files/libbufr-makefile.patch: |
35 |
+ Updated to newer upstream version, including tests. |
36 |
|
37 |
17 Mar 2011; Steve Arnold <nerdboy@g.o> libbufr-000360.ebuild: |
38 |
Updated to address static makefiles ignoring flags; see bug 334901. |
39 |
|
40 |
|
41 |
|
42 |
1.1 sci-libs/libbufr/libbufr-000387.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libbufr/libbufr-000387.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libbufr/libbufr-000387.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: libbufr-000387.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2011 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/sci-libs/libbufr/libbufr-000387.ebuild,v 1.1 2011/05/03 05:23:55 nerdboy Exp $ |
52 |
|
53 |
EAPI="3" |
54 |
|
55 |
inherit eutils flag-o-matic toolchain-funcs |
56 |
|
57 |
MY_P="${PN/lib/}_${PV}" |
58 |
|
59 |
DESCRIPTION="ECMWF BUFR library - includes both C and Fortran example utilities." |
60 |
HOMEPAGE="http://www.ecmwf.int/products/data/software/bufr.html" |
61 |
SRC_URI="http://www.ecmwf.int/products/data/software/download/software_files/${MY_P}.tar.gz" |
62 |
|
63 |
LICENSE="LGPL-3" |
64 |
SLOT="0" |
65 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
66 |
# needs someone to test on these: ~alpha ~hppa ~ia64 ~sparc etc ... |
67 |
|
68 |
IUSE="debug doc examples" |
69 |
|
70 |
RDEPEND="" |
71 |
|
72 |
DEPEND="sys-apps/findutils" |
73 |
|
74 |
S=${WORKDIR}/${MY_P} |
75 |
|
76 |
pkg_setup() { |
77 |
case "$(tc-getFC)" in |
78 |
*gfortran) |
79 |
export CNAME="_gfortran" |
80 |
;; |
81 |
*g77) |
82 |
export CNAME="_gnu" |
83 |
;; |
84 |
*pgf90|*pgf77) |
85 |
export CNAME="" |
86 |
;; |
87 |
ifc|ifort) |
88 |
export CNAME="_intel" |
89 |
;; |
90 |
esac |
91 |
|
92 |
elog "Note non-GNU compilers are not currently supported on non-x86" |
93 |
elog "architectures. If you need it, please subit a patch..." |
94 |
|
95 |
export target="linux" |
96 |
export A64="" |
97 |
export R64="" |
98 |
case "${ARCH}" in |
99 |
amd64) |
100 |
export R64="R64" |
101 |
export A64="A64" |
102 |
;; |
103 |
ppc64) |
104 |
export target="ppc_G5" |
105 |
;; |
106 |
ppc) |
107 |
export target="ppc" |
108 |
;; |
109 |
*) |
110 |
;; |
111 |
esac |
112 |
} |
113 |
|
114 |
src_prepare() { |
115 |
update_configs |
116 |
epatch "${FILESDIR}"/${PN}-makefile.patch |
117 |
|
118 |
local config="config/config.$target$CNAME$R64$A64" |
119 |
|
120 |
if [[ "${ARCH}" == "ppc" ]] ; then |
121 |
sed -i -e "s|= -mcpu=G4 -mtune=G4|= |" $config |
122 |
elif [[ "${ARCH}" == "ppc64" ]] ; then |
123 |
sed -i -e "s|= -mcpu=G5 -mtune=G5|= |" $config |
124 |
fi |
125 |
|
126 |
sed -i -e "s:DEBUG = -O2:DEBUG = -g:g" $config |
127 |
|
128 |
# add local CFLAGS to and build flags |
129 |
use debug || sed -i -e "s|\$(DEBUG)|${CFLAGS}|" $config |
130 |
|
131 |
# add local LDFLAGS to link commands |
132 |
sed -i \ |
133 |
-e "s|-o|${LDFLAGS} -o|" \ |
134 |
examples/Makefile \ |
135 |
bufrtables/Makefile |
136 |
} |
137 |
|
138 |
src_compile() { |
139 |
EBUILD_ARCH="${ARCH}" |
140 |
EBUILD_CFLAGS="${CFLAGS}" |
141 |
unset ARCH CFLAGS |
142 |
tc-export CC |
143 |
append-flags -DTABLE_PATH="/usr/share/bufrtables" |
144 |
|
145 |
# emake won't work with this fossil... |
146 |
make ARCH=$target || die "make failed" |
147 |
|
148 |
pushd examples > /dev/null |
149 |
make ARCH=$target decode_bufr bufr_decode \ |
150 |
create_bufr decode_bufr_image tdexp \ |
151 |
|| die "make examples failed" |
152 |
popd > /dev/null |
153 |
|
154 |
generate_files |
155 |
|
156 |
ARCH="${EBUILD_ARCH}" |
157 |
CFLAGS="${EBUILD_CFLAGS}" |
158 |
} |
159 |
|
160 |
src_test() { |
161 |
cd "${S}"/examples |
162 |
BUFR_TABLES="${S}/bufrtables/" ./decode_bufr -i \ |
163 |
../data/ISMD01_OKPR.bufr < ../response_file |
164 |
} |
165 |
|
166 |
src_install() { |
167 |
# install library |
168 |
dolib.a libbufr$R64.a |
169 |
|
170 |
dosbin bufrtables/{bufr2txt_tables,bufr_split_tables,txt2bufr_tables} |
171 |
dobin examples/{create_bufr,decode_bufr,decode_bufr_image,tdexp} |
172 |
|
173 |
keepdir /usr/share/bufrtables |
174 |
insinto /usr/share/bufrtables |
175 |
doins bufrtables/*000* |
176 |
|
177 |
# files generated above |
178 |
doenvd 20${PN} |
179 |
|
180 |
dodoc README |
181 |
if use doc ; then |
182 |
insinto /usr/share/doc/${P} |
183 |
doins doc/*.pdf |
184 |
fi |
185 |
|
186 |
if use examples ; then |
187 |
newdoc examples/README README.examples |
188 |
insinto /usr/share/doc/${P}/examples |
189 |
doins examples/{*.F,*.c,Makefile} |
190 |
fi |
191 |
} |
192 |
|
193 |
pkg_postinst() { |
194 |
elog |
195 |
elog "This is the only GPL'd BUFR decoder library written in C/Fortran" |
196 |
elog "but the build system is an old kluge that pre-dates the discovery" |
197 |
elog "of fire. File bugs as usual if you have build/runtime problems." |
198 |
elog "" |
199 |
elog "The default BUFR tables are stored in /usr/share/bufrtables, so" |
200 |
elog "add your local tables there if needed. Only a static lib is" |
201 |
elog "installed currently, as shared lib support is incomplete (feel" |
202 |
elog "free to submit a patch :)" |
203 |
elog "" |
204 |
elog "The installed user-land bufr utilities are just the examples;" |
205 |
elog "the main library is really all there is (and there are no man" |
206 |
elog "pages either). Install the examples and use the source, Luke..." |
207 |
elog |
208 |
} |
209 |
|
210 |
generate_files() { |
211 |
cat <<-EOF > 20${PN} |
212 |
BUFR_TABLES="/usr/share/bufrtables" |
213 |
CONFIG_PROTECT="/usr/share/bufrtables" |
214 |
EOF |
215 |
|
216 |
cat <<-EOF > response_file |
217 |
N |
218 |
N |
219 |
N |
220 |
1 |
221 |
|
222 |
|
223 |
|
224 |
|
225 |
N |
226 |
EOF |
227 |
} |
228 |
|
229 |
update_configs() { |
230 |
find . -type f | xargs chmod -x |
231 |
chmod +x bufrtables/links.sh |
232 |
cp options/options_linux options/options_ppc |
233 |
cp options/options_linux options/options_ppc_G5 |
234 |
cp pbio/sources.linux pbio/sources.ppc |
235 |
cp pbio/sources.linux pbio/sources.ppc_G5 |
236 |
pushd config > /dev/null |
237 |
cp config.ppc config.ppc_gfortran |
238 |
cp config.ppcR64 config.ppc_gfortranR64 |
239 |
cp config.ppc_G5 config.ppc_G5_gfortran |
240 |
cp config.ppcR64_G5 config.ppc_G5_gfortranR64 |
241 |
popd > /dev/null |
242 |
} |