Add cfitsio package.
This commit is contained in:
52
mingw-w64-cfitsio/PKGBUILD
Normal file
52
mingw-w64-cfitsio/PKGBUILD
Normal file
@@ -0,0 +1,52 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=cfitsio
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
pkgname="${_mingw_suff}-${_realname}"
|
||||
pkgver=3.360
|
||||
pkgrel=1
|
||||
pkgdesc="A library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://heasarc.gsfc.nasa.gov/fitsio/"
|
||||
license=("custom")
|
||||
makedepends=("${_mingw_suff}-gcc" "${_mingw_suff}-pkg-config")
|
||||
depends=("${_mingw_suff}-gcc-libs")
|
||||
options=('strip' 'staticlibs')
|
||||
source=("ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/${_realname}${pkgver/./}.tar.gz"
|
||||
mingw-shared.patch)
|
||||
md5sums=('833032c9ecbf1d460aca0360a26958db'
|
||||
'3f1e57458f0a0894fe66da3444bd35f1')
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}
|
||||
patch -p1 -i ${srcdir}/mingw-shared.patch
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
build() {
|
||||
#export lt_cv_deplibs_check_method='pass_all'
|
||||
|
||||
cd "${srcdir}/${_realname}"
|
||||
./configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST}
|
||||
make shared
|
||||
}
|
||||
|
||||
check() {
|
||||
cd ${_realname}
|
||||
make testprog
|
||||
LD_LIBRARY_PATH=. ./testprog > testprog.lis
|
||||
[[ -z $(diff testprog.lis testprog.out) ]] || return 1
|
||||
[[ -z $(cmp testprog.fit testprog.std) ]] || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
mkdir -p "${pkgdir}${MINGW_PREFIX}"/bin
|
||||
mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/
|
||||
install -D -m644 License.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE
|
||||
}
|
||||
13
mingw-w64-cfitsio/mingw-shared.patch
Normal file
13
mingw-w64-cfitsio/mingw-shared.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- cfitsio/configure.in.orig 2014-02-27 09:14:41.153000000 +0400
|
||||
+++ cfitsio/configure.in 2014-02-27 09:21:56.221400000 +0400
|
||||
@@ -365,6 +365,10 @@
|
||||
SHLIB_LD="$CC -shared"
|
||||
SHLIB_SUFFIX=".dll"
|
||||
;;
|
||||
+ mingw32)
|
||||
+ SHLIB_SUFFIX=".dll"
|
||||
+ SHLIB_LD="$CC -shared -Wl,--out-implib,libcfitsio\${SHLIB_SUFFIX}.a"
|
||||
+ ;;
|
||||
darwin)
|
||||
changequote(,)
|
||||
SHLIB_SUFFIX=".dylib"
|
||||
Reference in New Issue
Block a user