summaryrefslogtreecommitdiff
path: root/sci-libs/libbufr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/libbufr
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/libbufr')
-rw-r--r--sci-libs/libbufr/Manifest6
-rw-r--r--sci-libs/libbufr/files/libbufr-000405-makefile.patch80
-rw-r--r--sci-libs/libbufr/libbufr-000405.ebuild196
-rw-r--r--sci-libs/libbufr/metadata.xml12
4 files changed, 294 insertions, 0 deletions
diff --git a/sci-libs/libbufr/Manifest b/sci-libs/libbufr/Manifest
new file mode 100644
index 000000000000..ed09d49f1688
--- /dev/null
+++ b/sci-libs/libbufr/Manifest
@@ -0,0 +1,6 @@
+AUX libbufr-000405-makefile.patch 2365 SHA256 e1e2dd553973f6ef9dc55a6208b48345160079c5c6f499592fb7e38606dbbefb SHA512 1a1fb37c5de730c8158572285f5677c61d4bba28da1b9d0651223d0b37b69034f3f2a003c38dc8a0dc96018b2cc476c612379a1d9b58983c83fe8c3600df6569 WHIRLPOOL e3868df7511aaa933a4c11d5c773217b15d21e391ad7fd908f7c6cf55489a29d21a74f5f335b54c5f37d36688a304b5561d86ee98eea3e1e7d4a7a4c06de0086
+DIST bufrdc_000405.tar.gz 11873311 SHA256 0c3ab33bdb3eea600c5af6f1e4064a000ec143f4c96a14b72ca09666ca3c3775 SHA512 3355d6bac54ef152f9feb13ae13f3c94f4e01a665a4b9bc7f85f0c98f9aa37411170668ba9adfb6b62c2fe906d0dff67b03a708cdf1acd21a0037e327c7c6169 WHIRLPOOL f97662c240e40086be2e2f7d33d446280576dd79ff119374d54d02af05bd51c9176a6592d965765baf549043ee80e8bb9e824e3149d4ce85599db1f5e3f42e10
+EBUILD libbufr-000405.ebuild 4876 SHA256 e7671e55cadf84e9c4390b6e9c8390e111d1c04b1ee83cb701d727571e97853b SHA512 7ccad66aa7f1201c1c3322f87cfd8d229846c7449264095de5342fd1e53e67562800ccfaffa5428d50df73a03a09c304b4ad560192785004d9072bfffd9a6acb WHIRLPOOL cd96676607354a28b01225fed16ada8c90e31dd4e5f096b29593b2dbe37d885d4cc38e48baf9dbfbc68ae5799a110b0ab2ee8167ef78d64202ea2b3f335cd834
+MISC ChangeLog 4133 SHA256 edbe76fceb3eaf33bfa8418cde20811c982afce12571cf8b047d30efe048fbc8 SHA512 c5b0d986905932052dffae1b52e5ace2a7a30257e83f00bbd8763c44cb6178626bb057a2925ca6f6a198074d44b57bd23a46c4034eca6acc4d8250de268c703a WHIRLPOOL 8cd7b45b96f4f52c2d42fa89e7e07e5af6ecdf9985c68867a80a8fe230352836de77df0dc3953c5768e48f7cd479d0037c89c06c96b6e11bb7740380fb8f39a3
+MISC ChangeLog-2015 2092 SHA256 c4500ad3614b517640db23e3374fceabb647b891334502ae78af5293579c94be SHA512 50b64126153d965fa0537d51dd28f6ae30221a0145d03048c8fa8e2b1c5646fc027d9704e735c8e6293be6543808f63e14dd1d5cda7e34070a0cb43cfe185a00 WHIRLPOOL 00020f4416e5b4ae0b99f00518e03438f068cdf9d85f5d1ffd113892901046b0e132810c42265aae8f2d17cd21997073cfeece2ce14eaf9e9feb0a571faa5a73
+MISC metadata.xml 413 SHA256 abc95e4aacec10eab01f033f4aa9f89490181883029a44c83ed1113867be3fcc SHA512 215accb7fe4f8e1ad20104ca2205c8eca34a528af360bc6e2325d4f650851b51e80d910688c2b62d6a1d20d556eed5c72bba7045390e5865f49e137c17f66b97 WHIRLPOOL c2a83aea5eba0ba8d3b43348bf35b7add81998fe5c4a85d58bca877cfa04b5f3e3c1dab338b36fd9962f7d0875677af781657da43fad0ddfb059d1b3220d29b0
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-000405.ebuild b/sci-libs/libbufr/libbufr-000405.ebuild
new file mode 100644
index 000000000000..a97b5cb6af7d
--- /dev/null
+++ b/sci-libs/libbufr/libbufr-000405.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 toolchain-funcs
+
+MY_P="${PN/lib/}dc_${PV}"
+
+DESCRIPTION="ECMWF BUFR library - includes both C and Fortran example utilities"
+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"
+# needs someone to test on these: ~alpha ~hppa ~ia64 ~sparc etc ...
+
+IUSE="debug doc examples"
+
+RDEPEND="
+ virtual/fortran
+ "
+
+DEPEND="sys-apps/findutils"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ case "$(tc-getFC)" in
+ *gfortran)
+ export CNAME="_gfortran"
+ ;;
+ *g77)
+ export CNAME="_gnu"
+ ;;
+ *pgf90|*pgf77)
+ export CNAME=""
+ ;;
+ ifc|ifort)
+ export CNAME="_intel"
+ ;;
+ esac
+
+ elog "Note non-GNU compilers are not currently supported on non-x86"
+ elog "architectures. If you need it, please submit a patch..."
+
+ export target="linux"
+ export A64=""
+ export R64=""
+ case "${ARCH}" in
+ amd64)
+ export R64="R64"
+ export A64="A64"
+ ;;
+ ppc64)
+ export target="ppc_G5"
+ ;;
+ ppc)
+ export target="ppc"
+ ;;
+ *)
+ ;;
+ esac
+}
+
+src_prepare() {
+ update_configs
+ 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}
+ elif [[ "${ARCH}" == "ppc64" ]] ; then
+ sed -i -e "s|= -mcpu=G5 -mtune=G5|= |" \
+ -e "s|-fdefault-real-8|-fdefault-real-8 -fdefault-double-8|" \
+ ${config}
+ elif [[ "${ARCH}" == "amd64" ]] ; then
+ cp ${config}.in ${config}
+ sed -i -e "s|-fdefault-real-8|-fdefault-real-8 -fdefault-double-8|" \
+ ${config}
+ else
+ cp ${config}.in ${config} || die "Error updating config!"
+ fi
+
+ 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 build flags
+ sed -i -e "s|\$(DEBUG)|${CFLAGS} \$(DEBUG) -fPIC|" \
+ -e 's|emos|/usr/share/bufrtables|g' ${config}
+
+ # add local LDFLAGS to bins
+ sed -i \
+ -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 FC AR NM RANLIB
+ export STRIP="/bin/true"
+ TC_FLAGS="CC=$CC FC=$FC AR=$AR RANLIB=$RANLIB"
+ ARFLAGS="rv"
+
+ # 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
+
+ ARCH="${EBUILD_ARCH}"
+ CFLAGS="${EBUILD_CFLAGS}"
+}
+
+src_test() {
+ 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() {
+ # install library
+ dolib.a libbufr$R64.a
+
+ dosbin bufrtables/{bufr2txt_tables,bufr_split_tables,txt2bufr_tables}
+ dobin examples/{bufr_decode_all,create_bufr,decode_bufr,decode_bufr_image,tdexp}
+
+ keepdir /usr/share/bufrtables
+ insinto /usr/share/bufrtables
+ doins -r bufrtables/{B,C,D}*.*
+
+ # files generated above
+ doenvd 20${PN}
+
+ dodoc README
+ if use doc ; then
+ insinto /usr/share/doc/${PF}
+ doins doc/*.pdf
+ fi
+
+ if use examples ; then
+ newdoc examples/README README.examples
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/{*.F,*.c,Makefile}
+ fi
+}
+
+pkg_postinst() {
+ elog
+ elog "This is the only GPL'd BUFR decoder library written in C/Fortran"
+ elog "but the build system is an old kluge that pre-dates the discovery"
+ elog "of fire. File bugs as usual if you have build/runtime problems."
+ elog ""
+ elog "The default BUFR tables are stored in /usr/share/bufrtables, so"
+ elog "add your local tables there if needed. Only a static lib is"
+ elog "installed currently, as shared lib support is incomplete (feel"
+ elog "free to submit a patch :)"
+ elog ""
+ elog "The installed user-land bufr utilities are just the examples;"
+ elog "the main library is really all there is (and there are no man"
+ elog "pages either). Install the examples and use the source, Luke..."
+ elog
+}
+
+generate_files() {
+ ## Do not remove blank lines from the response file
+ cat <<-EOF > 20${PN}
+ BUFR_TABLES="/usr/share/bufrtables"
+ EOF
+}
+
+update_configs() {
+ 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_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
new file mode 100644
index 000000000000..e6507199b201
--- /dev/null
+++ b/sci-libs/libbufr/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>nerdboy@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ This is the only useable open source BUFR library (from ECMWF)
+ and comes with a few example tools (some of which are built
+ and installed).
+ </longdescription>
+</pkgmetadata>