aboutsummaryrefslogtreecommitdiffstats
path: root/astro/wcslib/Makefile
blob: 600691aab38af85a36c2a070071a7356c6171ef2 (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
52
53
54
# Created by: Tony Maher <tonymaher@optusnet.com.au>
# $FreeBSD$

PORTNAME=   wcslib
PORTVERSION=    4.13.4
PORTREVISION=   2
CATEGORIES= astro
MASTER_SITES=   ftp://ftp.atnf.csiro.au/pub/software/wcslib/

MAINTAINER= tonymaher@optusnet.com.au
COMMENT=    Library for parsing/generating FITS headers

USE_BZIP2=  yes
GNU_CONFIGURE=  yes
USES=       gmake
MAKEFILE=   GNUmakefile
USE_LDCONFIG=   yes

PLIST_SUB=  VERSION="${PORTVERSION}"

# See makedefs.in which describes why you want to set the extra support.
# For most users it will not be required.

OPTIONS_DEFINE= CFITSIO PGPLOT
CFITSIO_DESC=   Add cfitsio support (for tests only)
PGPLOT_DESC=    Add pgplot support (for tests only)

.include <bsd.port.options.mk>

# The configure script unconditionally searches for the cftisio library
# and uses it if found.

.if ${PORT_OPTIONS:MCFITSIO} || exists(${LOCALBASE}/lib/libcfitsio.so)
PLIST_SUB+=     HPXCVT=""
LIB_DEPENDS+=   libcfitsio.so:${PORTSDIR}/astro/cfitsio
.else
PLIST_SUB+=     HPXCVT="@comment "
.endif

.if ${PORT_OPTIONS:MPGPLOT}
LIB_DEPENDS+=   libpgplot.so:${PORTSDIR}/graphics/pgplot
.endif

post-patch:
    @${REINPLACE_CMD} -e 's#%%PKGDIR%%#${STAGEDIR}${PREFIX}/libdata#g' \
        ${WRKSRC}/GNUmakefile

post-install:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    (cd ${WRKSRC}/ && ${INSTALL_DATA} CHANGES README COPYING COPYING.LESSER wcslib.pdf ${STAGEDIR}${DOCSDIR})
    ${MKDIR} ${STAGEDIR}${DOCSDIR}/html
    (cd ${WRKSRC}/html && ${INSTALL_DATA} * ${STAGEDIR}${DOCSDIR}/html)

.include <bsd.port.mk>