aboutsummaryrefslogtreecommitdiffstats
path: root/astro/cfitsio/Makefile
blob: 9518d66dd77c2feb3ddb6120589e2b6afa8f5e3f (plain) (blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
# Created by: Markus Brueffer <markus@FreeBSD.org>
# $FreeBSD$

PORTNAME=   cfitsio
PORTVERSION=    3.370
PORTREVISION=   1
CATEGORIES= astro
MASTER_SITES=   http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/ \
        http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/oldvers/ \
        ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/ \
        ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/oldvers/ \
        LOCAL/sunpoet
DISTNAME=   ${PORTNAME}${PORTVERSION:R}${PORTVERSION:E}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT=    Library for reading and writing files in FITS data format

LIB_DEPENDS=    libf2c.so:lang/f2c

OPTIONS_DEFINE= DOCS

ALL_TARGET= libcfitsio.a shared
CFLAGS+=    -I${INCLUDEDIR}
CONFIGURE_ARGS= ac_cv_prog_FC=f2c
GNU_CONFIGURE=  yes
LIBS+=      -L${LIBDIR} -lz
MAKE_ARGS=  ZLIB_SOURCES="zlib/zcompress.c zlib/zuncompress.c"
USE_LDCONFIG=   yes
USES=       pkgconfig
WRKSRC=     ${WRKDIR}/${PORTNAME}

PLIST_SUB=  SHLIB_MAJOR_VER=${SHLIB_MAJOR_VER} \
        SHLIB_MINOR_VER=${SHLIB_MINOR_VER}
PORTDOCS=   *

SHLIB_MAJOR_VER=2
SHLIB_MINOR_VER=${PORTVERSION:S|0$||}

do-install:
    cd ${WRKSRC}/ && ${INSTALL_DATA} drvrsmem.h fitsio.h fitsio2.h longnam.h ${STAGEDIR}${PREFIX}/include/
    cd ${WRKSRC}/ && ${INSTALL_DATA} libcfitsio.a ${STAGEDIR}${PREFIX}/lib/
    cd ${WRKSRC}/ && ${INSTALL_LIB} libcfitsio.so.${SHLIB_MAJOR_VER}.${SHLIB_MINOR_VER} ${STAGEDIR}${PREFIX}/lib/
    cd ${WRKSRC}/ && ${INSTALL_DATA} cfitsio.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/
    ${LN} -fs libcfitsio.so.${SHLIB_MAJOR_VER}.${SHLIB_MINOR_VER} ${STAGEDIR}${PREFIX}/lib/libcfitsio.so.${SHLIB_MAJOR_VER}
    ${LN} -fs libcfitsio.so.${SHLIB_MAJOR_VER} ${STAGEDIR}${PREFIX}/lib/libcfitsio.so

do-install-DOCS-on:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}/
    ${INSTALL_DATA} ${WRKSRC}/docs/*.doc ${STAGEDIR}${DOCSDIR}/

.include <bsd.port.mk>