forked from mxe/mxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfitsio.mk
38 lines (32 loc) · 1.28 KB
/
cfitsio.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := cfitsio
$(PKG)_WEBSITE := https://heasarc.gsfc.nasa.gov/fitsio/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3410
$(PKG)_CHECKSUM := a556ac7ea1965545dcb4d41cfef8e4915eeb8c0faa1b52f7ff70870f8bb5734c
$(PKG)_SUBDIR := cfitsio
$(PKG)_FILE := cfitsio$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/$($(PKG)_FILE)
$(PKG)_DEPS := cc
define $(PKG)_UPDATE
$(WGET) -q -O- "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/?C=M;O=D" | \
grep -i '<a href="cfitsio.*tar' | \
$(SED) -n 's,.*cfitsio\([0-9][^>]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)'
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
# create pkg-config files
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: $(PKG)'; \
echo 'Version: $($(PKG)_VERSION)'; \
echo 'Libs: -l$(PKG)';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc'
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-cfitsio.exe' \
`'$(TARGET)-pkg-config' cfitsio --cflags --libs`
endef
$(PKG)_BUILD_SHARED =