summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraziano.giuliani2015-07-19 12:14:31 +0200
committergraziano.giuliani2015-07-19 12:14:31 +0200
commit92d751aba6a757f418ebbb9a8dc7b7c165e9e523 (patch)
tree393f5fb29dcd33752a16b88bac86bece2f0ce769
parentd1173f0e7fb5a9f6edd1f6a61a972569c0c73774 (diff)
downloadaur-92d751aba6a757f418ebbb9a8dc7b7c165e9e523.tar.gz
switch to cmake, bump version
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD48
-rw-r--r--configure.patch66
3 files changed, 19 insertions, 105 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 35f040e0dd9..50755342ab2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = grib_api
pkgdesc = A program interface for encoding and decoding GRIB messages
- pkgver = 1.13.1
+ pkgver = 1.14.0
pkgrel = 1
url = https://software.ecmwf.int/wiki/display/GRIB/Home
arch = i686
@@ -14,14 +14,14 @@ pkgbase = grib_api
depends = libpng
depends = python2
depends = netcdf
+ optdepends = libaec
+ optdepends = jasper
provides = grib_api
conflicts = grib_def
replaces = grib_api
replaces = grib_def
- source = http://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.13.1.tar.gz
- source = configure.patch
- md5sums = 2d76933cd11ed33ff4141717a8761070
- md5sums = bd0e0fe50e6ae8ffee0bdfeeecd300f4
+ source = http://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.14.0-Source.tar.gz
+ md5sums = afcfc0a465ce93d9418aea4e99523eb5
pkgname = grib_api
diff --git a/PKGBUILD b/PKGBUILD
index 943535eb773..7fc03154d2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,56 +2,36 @@
# Contributor: Graziano Giuliani <graziano.giuliani@poste.it>
pkgname=grib_api
-pkgver=1.13.1
+pkgver=1.14.0
_attnum=3473437
pkgrel=1
pkgdesc="A program interface for encoding and decoding GRIB messages"
arch=('i686' 'x86_64')
url="https://software.ecmwf.int/wiki/display/GRIB/Home"
license=('LGPL3' 'GPL3')
-#
-# Note: the default is to compile against openjpeg, and this library is
-# preferred upstream on jasper library. To compile with jasper,
-# comment the following line and uncomment the below one to drop
-# openjpeg dependency. IF both openjpeg and jasper are installed
-# and you want to compile against jasper, uncomment the line
-# below to patch configure to prefer jasper over openjpeg
-#
depends=('openjpeg' 'libpng' 'python2' 'netcdf')
-# depends=('jasper' 'libpng' 'python2')
+optdepends=('libaec' 'jasper')
makedepends=('gcc-fortran' 'python2' 'python2-numpy')
provides=('grib_api')
replaces=('grib_api' 'grib_def')
conflicts=('grib_def')
-source=(http://software.ecmwf.int/wiki/download/attachments/${_attnum}/${pkgname}-${pkgver}.tar.gz configure.patch)
-md5sums=('2d76933cd11ed33ff4141717a8761070'
- 'bd0e0fe50e6ae8ffee0bdfeeecd300f4')
+source=(http://software.ecmwf.int/wiki/download/attachments/${_attnum}/${pkgname}-${pkgver}-Source.tar.gz)
+md5sums=('afcfc0a465ce93d9418aea4e99523eb5')
build() {
- cd "$srcdir"/$pkgname-$pkgver
- sed -i configure -e 's|share/samples|share/grib_api/samples|'
- # Uncomment to build with jasper if BOTH jasper and openjpeg are installed
- # patch -p0 -i $srcdir/configure.patch
- sed -i configure -e 's|python python2|python2 python|'
- sed -i src/grib_openjpeg_encoding.c \
- -e 's!"openjpeg\.h"!<openjpeg-1.5/openjpeg\.h>!'
- ./configure F77="gfortran" FC="gfortran" CPPFLAGS="$CPPFLAGS -fPIC" \
- --prefix=/usr --enable-python --with-png-support \
- --with-netcdf=/usr --with-jasper=/usr \
- --datadir=/usr/share/ \
- --datarootdir=/usr/share/$pkgname/definitions || return 1
- sed -i ifs_samples/grib1/Makefile \
- -e 's|/usr/ifs_samples/grib1|/usr/share/grib_api/ifs_samples/grib1|'
- sed -i ifs_samples/grib1_mlgrib2/Makefile \
- -e 's|/usr/ifs_samples/grib1_mlgrib2|/usr/share/grib_api/ifs_samples/grib1_mlgrib2|'
- sed -i ifs_samples/grib1_mlgrib2_ieee64/Makefile \
- -e 's|/usr/ifs_samples/grib1_mlgrib2_ieee64|/usr/share/grib_api/ifs_samples/grib1_mlgrib2_ieee64|'
- sed -i tools/grib1to2.txt -e 's|/bin/ksh|/bin/bash|'
+ cd "$srcdir"/${pkgname}-${pkgver}-Source
+ mkdir -p build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=production \
+ -DCMAKE_INSTALL_DATAROOTDIR=/usr/share/$pkgname/definitions \
+ -DCMAKE_INSTALL_DATADIR=/usr/share -DENABLE_AEC=1 -DENABLE_PNG=1 \
+ -DENABLE_GRIB_THREADS=1 \
+ -DOPENJPEG_INCLUDE_DIR=`pkg-config --variable=includedir libopenjpeg` \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 ..
make || return 1
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$srcdir"/${pkgname}-${pkgver}-Source/build
make DESTDIR="$pkgdir" install || return 1
- mv $pkgdir/usr/bin/points $pkgdir/usr/bin/grib_points
}
diff --git a/configure.patch b/configure.patch
deleted file mode 100644
index 5e6f3be3519..00000000000
--- a/configure.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- configure.orig 2013-05-31 10:03:41.211303192 +0200
-+++ configure 2013-05-31 10:04:37.696190014 +0200
-@@ -18940,62 +18940,9 @@
- jasper_ok=0
- fi
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_image_create in -lopenjpeg" >&5
--$as_echo_n "checking for opj_image_create in -lopenjpeg... " >&6; }
--if test "${ac_cv_lib_openjpeg_opj_image_create+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lopenjpeg $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--
--/* Override any GCC internal prototype to avoid an error.
-- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
--#ifdef __cplusplus
--extern "C"
--#endif
--char opj_image_create ();
--int
--main ()
--{
--return opj_image_create ();
-- ;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_openjpeg_opj_image_create=yes
--else
-- ac_cv_lib_openjpeg_opj_image_create=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_image_create" >&5
--$as_echo "$ac_cv_lib_openjpeg_opj_image_create" >&6; }
--if test "x$ac_cv_lib_openjpeg_opj_image_create" = x""yes; then :
-- openjpeg_ok=1
--else
-- openjpeg_ok=0
--fi
--
--
- jpeg_ok=0
-
-- # prefer openjpeg over jasper
-- if test $openjpeg_ok -eq 1
-- then
-- jpeg_ok=1
-- LIB_OPENJPEG='-lopenjpeg -lm'
-- LIBS="$LIB_OPENJPEG $LIBS"
--
--$as_echo "#define HAVE_LIBOPENJPEG 1" >>confdefs.h
--
--
-- elif test $jasper_ok -eq 1
-+ if test $jasper_ok -eq 1
- then
- jpeg_ok=1
- LIB_JASPER='-ljasper'