aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Jaekel <holger.jaekel@gmx.de>2021-03-10 20:36:09 +0100
committerLeo <thinkabit.ukim@gmail.com>2021-03-14 17:48:36 +0000
commit3a03b323a7376f7558676b38ad923805fef9fbe9 (patch)
tree64d501f6557c0a9f9f9e097a8bb6c56a4f03cb24
parent5c551ac816854d7005ab9469de29a894a5455d07 (diff)
community/cfitsio: fix definition of OFF_T
-rw-r--r--community/cfitsio/10-OFF_T.patch24
-rw-r--r--community/cfitsio/APKBUILD10
2 files changed, 31 insertions, 3 deletions
diff --git a/community/cfitsio/10-OFF_T.patch b/community/cfitsio/10-OFF_T.patch
new file mode 100644
index 00000000000..6a60fb5f69d
--- /dev/null
+++ b/community/cfitsio/10-OFF_T.patch
@@ -0,0 +1,24 @@
+Author: Holger Jaekel <holger.jaekel@gmx.de>
+Summary: under musl, off_t is always 64-bit
+----
+
+--- a/fitsio.h
++++ b/fitsio.h
+@@ -85,16 +85,7 @@
+
+ /* Debian systems require: "(defined(linux) && defined(__off_t_defined))" */
+ /* the mingw-w64 compiler requires: "(defined(__MINGW32__) && defined(_OFF_T_DEFINED))" */
+-#if defined(_OFF_T) \
+- || (defined(linux) && defined(__off_t_defined)) \
+- || (defined(__MINGW32__) && defined(_OFF_T_DEFINED)) \
+- || defined(_MIPS_SZLONG) || defined(__APPLE__) || defined(_AIX)
+-# define OFF_T off_t
+-#elif defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER>= 1400))
+-# define OFF_T long long
+-#else
+-# define OFF_T long
+-#endif
++#define OFF_T off_t
+
+ /* this block determines if the the string function name is
+ strtol or strtoll, and whether to use %ld or %lld in printf statements */
diff --git a/community/cfitsio/APKBUILD b/community/cfitsio/APKBUILD
index bfe15562225..3ab76bc66fd 100644
--- a/community/cfitsio/APKBUILD
+++ b/community/cfitsio/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=cfitsio
pkgver=3.49
-pkgrel=0
+pkgrel=1
pkgdesc="A library reading and writing data files in Flexible Image Transport System data format"
url="https://heasarc.gsfc.nasa.gov/fitsio/"
arch="all"
@@ -16,7 +16,10 @@ subpackages="
$pkgname-static
$pkgname-dev
"
-source="https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-$pkgver.tar.gz"
+source="
+ https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-$pkgver.tar.gz
+ 10-OFF_T.patch
+ "
build() {
./configure \
@@ -48,4 +51,5 @@ check() {
[[ -z $(diff testprog.lis testprog.out) ]]
[[ -z $(cmp testprog.fit testprog.std) ]]
}
-sha512sums="9836a4af3bbbfed1ea1b4c70b9d500ac485d7c3d8131eb8a25ee6ef6662f46ba52b5161c45c709ed9a601ff0e9ec36daa5650eaaf4f2cc7d6f4bb5640f10da15 cfitsio-3.49.tar.gz"
+sha512sums="9836a4af3bbbfed1ea1b4c70b9d500ac485d7c3d8131eb8a25ee6ef6662f46ba52b5161c45c709ed9a601ff0e9ec36daa5650eaaf4f2cc7d6f4bb5640f10da15 cfitsio-3.49.tar.gz
+f64d38a18d1bf4f414ab19fdb811978b940284f443287cfe21d471d14a272b424d887ba59edffc99f9165353a2e5ab4210efc82d5623cbb7d2e3db12966b93fd 10-OFF_T.patch"