comparison src/cfitsio.mk @ 3163:18c5fa5ce861

Add CFITSIO module (currently only compiles with MSVC)
author Michael Goffioul <michael.goffioul@gmail.com>
date Sun, 21 Jul 2013 22:22:29 -0400
parents
children 23a5b6df3061
comparison
equal deleted inserted replaced
3162:a2e79ce60e44 3163:18c5fa5ce861
1 # This file is part of MXE.
2 # See index.html for further information.
3
4 PKG := cfitsio
5 $(PKG)_IGNORE :=
6 $(PKG)_CHECKSUM := 4870380013d089e1e9b8994d74f15482decffc1c
7 $(PKG)_SUBDIR := $(PKG)
8 $(PKG)_FILE := $(PKG)$(subst .,,$($(PKG)_VERSION)).tar.gz
9 $(PKG)_URL := ftp://heasarc.gsfc.nasa.gov/software/$(PKG)/c/$($(PKG)_FILE)
10 $(PKG)_DEPS :=
11
12 define $(PKG)_UPDATE
13 echo 'Warning: Updates are temporarily disabled for package cfitsio.' >&2;
14 echo $(cfitsio_VERSION)
15 endef
16
17 ifeq ($(MXE_SYSTEM),msvc)
18 define $(PKG)_BUILD
19 $(SED) -i 's/cfitsio\.dll/$(LIBRARY_PREFIX)cfitsio$(LIBRARY_SUFFIX).dll/g' '$(1)/makefile.vcc'
20 cd '$(1)' && env -u MAKE -u MAKEFLAGS nmake -f makefile.vcc
21 $(SED) -e 's#@prefix@#$(HOST_PREFIX)#' \
22 -e 's#@exec_prefix@#$${prefix}#' \
23 -e 's#@libdir@#$${exec_prefix}/lib#' \
24 -e 's#@includedir@#$${prefix}/include#' \
25 -e 's#@LIBS@##' \
26 -e '/^Libs\.private:/ { s#-lm\>##; }' \
27 -e 's#@CFITSIO_MAJOR@#$(word 1,$(subst ., ,$($(PKG)_VERSION)))#' \
28 -e 's#@CFITSIO_MINOR@#$(word 2,$(subst ., ,$($(PKG)_VERSION)))#' \
29 '$(1)/cfitsio.pc.in' > '$(1)/cfitsio.pc'
30 $(INSTALL) -d '$(HOST_BINDIR)'
31 $(INSTALL) '$(1)/$(LIBRARY_PREFIX)cfitsio$(LIBRARY_SUFFIX).dll' '$(HOST_BINDIR)'
32 $(INSTALL) -d '$(HOST_LIBDIR)'
33 $(INSTALL) '$(1)/cfitsio.lib' '$(HOST_LIBDIR)'
34 $(INSTALL) -d '$(HOST_LIBDIR)/pkgconfig'
35 $(INSTALL) '$(1)/cfitsio.pc' '$(HOST_LIBDIR)/pkgconfig'
36 $(INSTALL) -d '$(HOST_INCDIR)'
37 for f in fitsio.h fitsio2.h longnam.h drvrsmem.h; do \
38 $(INSTALL) "$(1)/$$f" '$(HOST_INCDIR)'; \
39 done
40 endef
41 else
42 define $(PKG)_BUILD
43 echo "Building of package cfitsio not implemented yet."
44 false
45 endef
46 endif