summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordeserts2021-12-08 11:55:39 +0800
committerdeserts2021-12-08 11:55:39 +0800
commitb1db3c5062a744f36854a46dd38eff6e916446cf (patch)
tree6fc6b98e0155a2d93aa738993ec832bbcbcf99c0
downloadaur-b1db3c5062a744f36854a46dd38eff6e916446cf.tar.gz
2.0.3 commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD36
-rw-r--r--libRadtran-2.0.3.patch63
3 files changed, 116 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..84a8a3fbba8c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = libradtran
+ pkgdesc = library for radiative transfer
+ pkgver = 2.0.3
+ pkgrel = 1
+ url = http://www.libradtran.org
+ arch = x86_64
+ license = GPL
+ makedepends = python2
+ makedepends = gcc-fortran
+ depends = netcdf
+ optdepends = perl: run the tests and some of the tools
+ source = http://www.libradtran.org/download/history/libRadtran-2.0.3.tar.gz
+ source = libRadtran-2.0.3.patch
+ sha256sums = 4750882030042403b815684370172c33643b05e3db7e84072355b52243b37663
+ sha256sums = 42cbcef0ce41975e31ca767ce6a51ef70587e0d0b7a1de931aac38be4fa83dd8
+
+pkgname = libradtran
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..91174b5142d2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Jay Tsung <int8@foxmail.com>
+pkgname=libradtran
+_pkgname=libRadtran
+pkgver=2.0.3
+pkgrel=1
+pkgdesc="library for radiative transfer"
+arch=('x86_64')
+url="http://www.libradtran.org"
+license=('GPL')
+depends=('netcdf')
+makedepends=('python2'
+ 'gcc-fortran')
+optdepends=('perl: run the tests and some of the tools')
+source=("http://www.libradtran.org/download/history/$_pkgname-$pkgver.tar.gz"
+ "$_pkgname-$pkgver.patch")
+sha256sums=('4750882030042403b815684370172c33643b05e3db7e84072355b52243b37663'
+ '42cbcef0ce41975e31ca767ce6a51ef70587e0d0b7a1de931aac38be4fa83dd8')
+
+prepare() {
+ cd "$_pkgname-$pkgver"
+ patch -p1 -i "$srcdir/../$_pkgname-$pkgver.patch"
+}
+
+build() {
+ cd "$_pkgname-$pkgver"
+ export CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
+ -Wp,-D_FORTIFY_SOURCE=2 \
+ -fstack-clash-protection -fcf-protection"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$_pkgname-$pkgver"
+ make prefix="$pkgdir/usr/" install
+}
diff --git a/libRadtran-2.0.3.patch b/libRadtran-2.0.3.patch
new file mode 100644
index 000000000000..719aa440af86
--- /dev/null
+++ b/libRadtran-2.0.3.patch
@@ -0,0 +1,63 @@
+diff -Nur libRadtran-2.0.3/configure libRadtran-2.0.3-patch/configure
+--- libRadtran-2.0.3/configure 2019-12-23 19:18:03.000000000 +0800
++++ libRadtran-2.0.3-patch/configure 2021-12-07 14:41:35.288255726 +0800
+@@ -4807,7 +4807,7 @@
+
+
+ # Extract the first word of "python", so it can be a program name with args.
+-set dummy python; ac_word=$2
++set dummy python2; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if ${ac_cv_path_PYTHON+:} false; then :
+diff -Nur libRadtran-2.0.3/libsrc_c/uvspecrandom.c libRadtran-2.0.3-patch/libsrc_c/uvspecrandom.c
+--- libRadtran-2.0.3/libsrc_c/uvspecrandom.c 2019-12-16 22:48:53.000000000 +0800
++++ libRadtran-2.0.3-patch/libsrc_c/uvspecrandom.c 2021-12-07 14:41:48.085116786 +0800
+@@ -36,7 +36,7 @@
+
+ /* global variable: random number generator */
+ #if HAVE_LIBGSL
+- gsl_rng *uvspecrng;
++ gsl_rng *__uvspecrng__;
+ #endif
+
+
+@@ -48,7 +48,7 @@
+ double uvspec_random ()
+ {
+ #if HAVE_LIBGSL
+- return gsl_rng_uniform (uvspecrng);
++ return gsl_rng_uniform (__uvspecrng__);
+ #else
+ return (double) random();
+ #endif
+@@ -57,7 +57,7 @@
+ double uvspec_random_gauss (double sigma)
+ {
+ #if HAVE_LIBGSL
+- return gsl_ran_gaussian (uvspecrng, sigma);
++ return gsl_ran_gaussian (__uvspecrng__, sigma);
+ #else
+ return (double) random();
+ #endif
+@@ -69,7 +69,7 @@
+
+ /* global variable, defined in uvspec_lex.l */
+ #if HAVE_LIBGSL
+- /* extern gsl_rng *uvspecrng; */ /* global random number generator */
++ /* extern gsl_rng *__uvspecrng__; */ /* global random number generator */
+ const gsl_rng_type *T;
+ #endif
+
+@@ -85,9 +85,9 @@
+ #if HAVE_LIBGSL
+ T = gsl_rng_mt19937;
+ gsl_rng_default_seed = rseed;
+- uvspecrng = gsl_rng_alloc (T);
++ __uvspecrng__ = gsl_rng_alloc (T);
+ if (!quiet && need_mt19937)
+- fprintf (stderr, " ... using %s random number generator\n", gsl_rng_name (uvspecrng));
++ fprintf (stderr, " ... using %s random number generator\n", gsl_rng_name (__uvspecrng__));
+ #else
+ if (need_mt19937) {
+ fprintf (stderr, "Error, GSL not found. The MT19937 random number generator is\n");