Skip to content

Commit

Permalink
cfitsio: Update to 3.450. Build without curl support
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpux committed May 16, 2018
1 parent d71d73b commit bc52c0d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
12 changes: 8 additions & 4 deletions mingw-w64-cfitsio/PKGBUILD
Expand Up @@ -3,7 +3,7 @@
_realname=cfitsio
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.410
pkgver=3.450
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')
Expand All @@ -13,16 +13,20 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
#"${MINGW_PACKAGE_PREFIX}-curl"
"${MINGW_PACKAGE_PREFIX}-zlib")
options=('strip' 'staticlibs')
source=("https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${_realname}${pkgver/./}.tar.gz"
mingw-cmake.patch)
sha256sums=('a556ac7ea1965545dcb4d41cfef8e4915eeb8c0faa1b52f7ff70870f8bb5734c'
'8062efa5c9dbe7cb20cf9e639db3133a91cf3ea34b252a26d9180b366b9b1e7c')
mingw-cmake.patch
disable-curl-mingw.patch)
sha256sums=('bf6012dbe668ecb22c399c4b7b2814557ee282c74a7d5dc704eb17c30d9fb92e'
'49bf12e37d6b8d559a8f000701c16ffa6fa52fdf4c87d0e8d1d1caa7e4a3b3e2'
'3041bb9948081fca949fa1505107a1806981c5c6f7160fed69b57b7cef86552d')

prepare() {
cd ${_realname}
patch -p1 -i ${srcdir}/mingw-cmake.patch
patch -p1 -i ${srcdir}/disable-curl-mingw.patch
}

build() {
Expand Down
11 changes: 11 additions & 0 deletions mingw-w64-cfitsio/disable-curl-mingw.patch
@@ -0,0 +1,11 @@
--- cfitsio/CMakeLists.txt.orig 2018-05-16 11:30:59.475341100 +0300
+++ cfitsio/CMakeLists.txt 2018-05-16 11:31:06.292553100 +0300
@@ -72,7 +72,7 @@
ENDIF()

# Support for remote file drivers is not implemented for native Windows:
-IF (NOT MSVC)
+IF (NOT WIN32)
# Find library needed for gethostbyname:
CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME)
IF(NOT CMAKE_HAVE_GETHOSTBYNAME)
6 changes: 3 additions & 3 deletions mingw-w64-cfitsio/mingw-cmake.patch
Expand Up @@ -29,7 +29,7 @@ diff -rupN cfitsio/CMakeLists.txt cfitsio-new/CMakeLists.txt

# Define project version
SET(${PROJECT_NAME}_MAJOR_VERSION 3)
SET(${PROJECT_NAME}_MINOR_VERSION 41)
SET(${PROJECT_NAME}_MINOR_VERSION 45)
SET(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION})
+SET(${PROJECT_NAME}_SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION})
SET(LIB_NAME cfitsio)
Expand All @@ -47,8 +47,8 @@ diff -rupN cfitsio/CMakeLists.txt cfitsio-new/CMakeLists.txt
)

ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES})
-TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB})
+TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} z)
-TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ${CURL_LIBRARIES})
+TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ${CURL_LIBRARIES} z)

SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION})
-install(TARGETS ${LIB_NAME} DESTINATION ${LIB_DESTINATION})
Expand Down

0 comments on commit bc52c0d

Please sign in to comment.