summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen L Arnold <nerdboy@gentoo.org>2016-01-05 11:36:58 -0800
committerStephen L Arnold <nerdboy@gentoo.org>2016-01-05 11:38:18 -0800
commit86378c48a9e7862972b1ff0c4323f5766b2b7b78 (patch)
tree478c3efcd0f3dae307ed200ec46c8eabcb903b1b /sci-libs/libbufr
parentdev-libs/libintl: add Prefix keywords (diff)
downloadgentoo-86378c48a9e7862972b1ff0c4323f5766b2b7b78.tar.gz
gentoo-86378c48a9e7862972b1ff0c4323f5766b2b7b78.tar.bz2
gentoo-86378c48a9e7862972b1ff0c4323f5766b2b7b78.zip
sci-libs/libbufr: Updated to latest release and removed old version
This fixes and/or obsoletes three open bugs on the old version (bugs 370021, 478614, 513964) and adds lto USE flag to support gold linker and -flto. Also need to update package.mask. Package-Manager: portage-2.2.26
Diffstat (limited to 'sci-libs/libbufr')
-rw-r--r--sci-libs/libbufr/Manifest2
-rw-r--r--sci-libs/libbufr/files/libbufr-000405-makefile.patch80
-rw-r--r--sci-libs/libbufr/libbufr-000405.ebuild (renamed from sci-libs/libbufr/libbufr-000387.ebuild)105
-rw-r--r--sci-libs/libbufr/metadata.xml15
4 files changed, 150 insertions, 52 deletions
diff --git a/sci-libs/libbufr/Manifest b/sci-libs/libbufr/Manifest
index da7f5f559411..e0171be94843 100644
--- a/sci-libs/libbufr/Manifest
+++ b/sci-libs/libbufr/Manifest
@@ -1 +1 @@
-DIST bufr_000387.tar.gz 3673816 SHA256 bb8c39f15b2d1661ef2d66de8ee1fcaaa195e8cb80023fc3112d3dd816c97745 SHA512 906129809c92b22bd0a73524048128e4a44335eaf8c978bb4d0c3c5f5be7d01ce530e3248eec681b4662840e4ed0270089ddc801dca8f022e7d6cfbc5e4c2967 WHIRLPOOL 43af1997618c1f73fbd8ee6120c4ad8329f648d1bbb09165b5f750e30cd5d49e246cabb4a6b82341e8408ffb042cbd58cb82ed29e0c234a27fa44a684b89c169
+DIST bufrdc_000405.tar.gz 11873311 SHA256 0c3ab33bdb3eea600c5af6f1e4064a000ec143f4c96a14b72ca09666ca3c3775 SHA512 3355d6bac54ef152f9feb13ae13f3c94f4e01a665a4b9bc7f85f0c98f9aa37411170668ba9adfb6b62c2fe906d0dff67b03a708cdf1acd21a0037e327c7c6169 WHIRLPOOL f97662c240e40086be2e2f7d33d446280576dd79ff119374d54d02af05bd51c9176a6592d965765baf549043ee80e8bb9e824e3149d4ce85599db1f5e3f42e10
diff --git a/sci-libs/libbufr/files/libbufr-000405-makefile.patch b/sci-libs/libbufr/files/libbufr-000405-makefile.patch
new file mode 100644
index 000000000000..08b30ded8d72
--- /dev/null
+++ b/sci-libs/libbufr/files/libbufr-000405-makefile.patch
@@ -0,0 +1,80 @@
+--- Makefile.orig 2016-01-04 13:09:58.661150785 -0800
++++ Makefile 2016-01-04 13:17:12.707621825 -0800
+@@ -1,7 +1,7 @@
+ # Makefile for libbufrex
+ #
+ R64 = R64
+-TARGETS = all clean
++TARGETS = all clean test
+ LIBRARY = libbufr$(R64).a
+ SHELL=/bin/sh
+ SUBDIRS = fortranC bufrdc pbio bufrtables examples
+@@ -11,12 +11,14 @@
+ ( echo "*************************"; \
+ echo "*** Make in $$name "; \
+ echo "*************************"; \
+- cd $$name ; make ; ) done
++ $(MAKE) -C $$name LIB=bufr ; ) done
++
++test :
+ ./test.sh
+ tables_tools/check_tables.sh bufrtables
+
+ clean :
+ @for name in $(SUBDIRS); do\
+- ( echo "*** Clean in $$name ***" ;cd $$name ; make clean ); \
++ ( echo "*** Clean in $$name ***" ;$(MAKE) -C $$name clean ); \
+ done
+ rm -f $(LIBRARY)
+--- examples/Makefile.in.orig 2016-01-04 13:42:39.790648703 -0800
++++ examples/Makefile.in 2016-01-04 13:45:02.384967830 -0800
+@@ -16,19 +16,19 @@
+ #
+ #
+ TARGETS = all clean
+-EXECS = decode_bufr decode_bufr_image bufr_decode_all tdexp tdexp create_bufr
++EXECS = decode_bufr decode_bufr_image bufr_decode_all bufr_compress tdexp create_bufr
+ #
+ #
+ all :$(EXECS)
+
+-decode_bufr: decode_bufr.o
++decode_bufr: decode_bufr.o
+ $(FC) $(FFLAGS) -o $@ decode_bufr.o -L$(PLACE) -l$(LIB)$(R64)
+
+-bufr_decode_all: bufr_decode_all.o
+- $(FC) $(FFLAGS) -o $@ bufr_decode_all.o -L$(PLACE) -l$(LIB)$(R64)
++bufr_decode_all: bufr_decode_all.o
++ $(FC) $(FFLAGS) -o $@ bufr_decode_all.o -L$(PLACE) -l$(LIB)$(R64)
+
+-bufr_compress: bufr_compress.o
+- $(FC) $(FFLAGS) -o $@ bufr_compress.o -L$(PLACE) -l$(LIB)$(R64)
++bufr_compress: bufr_compress.o
++ $(FC) $(FFLAGS) -o $@ bufr_compress.o -L$(PLACE) -l$(LIB)$(R64)
+
+ bufr2crex : bufr2crex.o
+ $(FC) $(FFLAGS) -o $@ bufr2crex.o -L$(PLACE) -l$(LIB)$(R64) -lcrex$(R64)
+@@ -48,4 +48,4 @@
+ clean :
+ @for name in $(EXECS); do\
+ (rm -f $$name *.o ); \
+- done
++ done
+--- bufrtables/Makefile.orig 2016-01-04 14:03:47.292850644 -0800
++++ bufrtables/Makefile 2016-01-04 14:05:22.242500485 -0800
+@@ -25,11 +25,14 @@
+ OBJECTS = $(OBJECTS.F) $(OBJECTS.c)
+ #
+ #
+-all: links
++all: pgms links
+
+ links:
+ ./clean.sh
+ ./links.sh
++
++pgms: bufr2txt_tables bufr_split_tables txt2bufr_tables
++
+ bufr2txt_tables: bufr2txt_tables.f
+ $(FC) $(FFLAGS) -o bufr2txt_tables bufr2txt_tables.f $(LIBRARY)
+ bufr_split_tables: bufr_split_tables.f
diff --git a/sci-libs/libbufr/libbufr-000387.ebuild b/sci-libs/libbufr/libbufr-000405.ebuild
index 8d949a0f09e9..96df106f0f03 100644
--- a/sci-libs/libbufr/libbufr-000387.ebuild
+++ b/sci-libs/libbufr/libbufr-000405.ebuild
@@ -1,27 +1,36 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
-inherit eutils fortran-2 flag-o-matic toolchain-funcs
+inherit eutils fortran-2 toolchain-funcs
-MY_P="${PN/lib/}_${PV}"
+MY_P="${PN/lib/}dc_${PV}"
DESCRIPTION="ECMWF BUFR library - includes both C and Fortran example utilities"
-HOMEPAGE="http://www.ecmwf.int/products/data/software/bufr.html"
-SRC_URI="http://www.ecmwf.int/products/data/software/download/software_files/${MY_P}.tar.gz"
+HOMEPAGE="https://software.ecmwf.int/wiki/display/BUFR/BUFRDC+Home"
+SRC_URI="https://software.ecmwf.int/wiki/download/attachments/35752466/${MY_P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-IUSE="debug doc examples"
+# needs someone to test on these: ~alpha ~hppa ~ia64 ~sparc etc ...
+
+IUSE="debug doc examples lto"
+
+RDEPEND="
+ virtual/fortran
+ "
-RDEPEND=""
DEPEND="sys-apps/findutils"
S=${WORKDIR}/${MY_P}
+if use lto; then
+ RESTRICT="strip"
+fi
+
pkg_setup() {
fortran-2_pkg_setup
case "$(tc-getFC)" in
@@ -40,7 +49,7 @@ pkg_setup() {
esac
elog "Note non-GNU compilers are not currently supported on non-x86"
- elog "architectures. If you need it, please subit a patch..."
+ elog "architectures. If you need it, please submit a patch..."
export target="linux"
export A64=""
@@ -63,43 +72,50 @@ pkg_setup() {
src_prepare() {
update_configs
- epatch "${FILESDIR}"/${PN}-makefile.patch
+ epatch "${FILESDIR}"/${P}-makefile.patch
local config="config/config.$target$CNAME$R64$A64"
if [[ "${ARCH}" == "ppc" ]] ; then
- sed -i -e "s|= -mcpu=G4 -mtune=G4|= |" $config
+ sed -i -e "s|= -mcpu=G4 -mtune=G4|= |" ${config}
elif [[ "${ARCH}" == "ppc64" ]] ; then
- sed -i -e "s|= -mcpu=G5 -mtune=G5|= |" $config
+ sed -i -e "s|= -mcpu=G5 -mtune=G5|= |" ${config}
+ else
+ cp ${config}.in ${config} || die "Error updating config!"
fi
- sed -i -e "s:DEBUG = -O2:DEBUG = -g:g" $config
+ sed -i -e "s:DEBUG = -O2:DEBUG = -g:g" ${config}
+ use debug || sed -i -e "s:DEBUG = -g:DEBUG =:g" ${config}
- # add local CFLAGS to and build flags
- use debug || sed -i -e "s|\$(DEBUG)|${CFLAGS}|" $config
+ # add local CFLAGS to build flags
+ sed -i -e "s|\$(DEBUG)|${CFLAGS} \$(DEBUG) -fPIC|" \
+ -e 's|emos|/usr/share/bufrtables|g' ${config}
- # add local LDFLAGS to link commands
+ # add local LDFLAGS to bins
sed -i \
- -e "s|-o|${LDFLAGS} -o|" \
+ -e "s|-o|${LDFLAGS} -fPIC -o|" \
examples/Makefile \
bufrtables/Makefile
}
src_compile() {
+ export BUFR_TABLES="${S}"/bufrtables
EBUILD_ARCH="${ARCH}"
EBUILD_CFLAGS="${CFLAGS}"
unset ARCH CFLAGS
- tc-export CC
- append-flags -DTABLE_PATH="/usr/share/bufrtables"
- # emake won't work with this fossil...
- make ARCH=$target || die "make failed"
+ tc-export CC FC AR NM STRIP RANLIB
+ TC_FLAGS="CC=$CC FC=$FC AR=$AR RANLIB=$RANLIB"
+ ARFLAGS="rv"
- pushd examples > /dev/null
- make ARCH=$target decode_bufr bufr_decode \
- create_bufr decode_bufr_image tdexp \
- || die "make examples failed"
- popd > /dev/null
+ if use lto; then
+ PLUGIN_PATH="--plugin=$(gcc -print-prog-name=liblto_plugin.so)"
+ tc-ld-is-gold && ARFLAGS="rv ${PLUGIN_PATH}"
+ fi
+
+ # emake won't work with this fossil...
+ BUFRFLAGS="ARCH=$target R64=$R64 CNAME=$CNAME"
+ make $TC_FLAGS ARFLAGS="${ARFLAGS}" $BUFRFLAGS || die "make failed"
generate_files
@@ -108,9 +124,12 @@ src_compile() {
}
src_test() {
- cd "${S}"/examples
- BUFR_TABLES="${S}/bufrtables/" ./decode_bufr -i \
- ../data/ISMD01_OKPR.bufr < ../response_file
+ unset ARCH CFLAGS
+ BUFRFLAGS="ARCH=$target R64=$R64 CNAME=$CNAME"
+ make $BUFRFLAGS test || die "make test failed"
+
+ ARCH="${EBUILD_ARCH}"
+ CFLAGS="${EBUILD_CFLAGS}"
}
src_install() {
@@ -118,24 +137,24 @@ src_install() {
dolib.a libbufr$R64.a
dosbin bufrtables/{bufr2txt_tables,bufr_split_tables,txt2bufr_tables}
- dobin examples/{create_bufr,decode_bufr,decode_bufr_image,tdexp}
+ dobin examples/{bufr_decode_all,create_bufr,decode_bufr,decode_bufr_image,tdexp}
keepdir /usr/share/bufrtables
insinto /usr/share/bufrtables
- doins bufrtables/*000*
+ doins -r bufrtables/{B,C,D}*.*
# files generated above
doenvd 20${PN}
dodoc README
if use doc ; then
- insinto /usr/share/doc/${P}
+ insinto /usr/share/doc/${PF}
doins doc/*.pdf
fi
if use examples ; then
newdoc examples/README README.examples
- insinto /usr/share/doc/${P}/examples
+ insinto /usr/share/doc/${PF}/examples
doins examples/{*.F,*.c,Makefile}
fi
}
@@ -161,30 +180,20 @@ generate_files() {
## Do not remove blank lines from the response file
cat <<-EOF > 20${PN}
BUFR_TABLES="/usr/share/bufrtables"
- CONFIG_PROTECT="/usr/share/bufrtables"
- EOF
-
- cat <<-EOF > response_file
- N
- N
- N
- 1
-
- N
EOF
}
update_configs() {
- find . -type f | xargs chmod -x
- chmod +x bufrtables/links.sh
+ find . -type f -name \*.distinct -o -name \*.f -o -name \*.in \
+ | xargs chmod -x
cp options/options_linux options/options_ppc
cp options/options_linux options/options_ppc_G5
cp pbio/sources.linux pbio/sources.ppc
cp pbio/sources.linux pbio/sources.ppc_G5
pushd config > /dev/null
- cp config.ppc config.ppc_gfortran
- cp config.ppcR64 config.ppc_gfortranR64
- cp config.ppc_G5 config.ppc_G5_gfortran
- cp config.ppcR64_G5 config.ppc_G5_gfortranR64
+ cp config.ppc_gfortran.in config.ppc_gfortran
+ cp config.ppc_gfortranR64.in config.ppc_gfortranR64
+ cp config.ppc_gfortran_G5.in config.ppc_gfortran_G5
+ cp config.ppc_gfortranR64_G5.in config.ppc_gfortranR64_G5
popd > /dev/null
}
diff --git a/sci-libs/libbufr/metadata.xml b/sci-libs/libbufr/metadata.xml
index 69b4f2ff1403..aae3622eeab6 100644
--- a/sci-libs/libbufr/metadata.xml
+++ b/sci-libs/libbufr/metadata.xml
@@ -2,7 +2,16 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>sci-geosciences</herd>
- <longdescription>This is mainly just an open source BUFR library from ECMWF
- that comes with a few example toolss (some of which are built and installed).
-</longdescription>
+ <maintainer>
+ <email>nerdboy@gentoo.org</email>
+ <name>Steve Arnold</name>
+ </maintainer>
+ <longdescription lang="en">
+ This is mainly just an open source BUFR library from ECMWF that comes with a few example tools (some of which are built and installed).
+ </longdescription>
+ <use>
+ <flag name="lto">
+ Use gold linker and -flto (requires existing env setup)
+ </flag>
+ </use>
</pkgmetadata>