aboutsummaryrefslogtreecommitdiffstats
path: root/astro/tkgeomap/Makefile
blob: 40658948ab1e54b65d660322239d2e6ba73231cf (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
# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
# $FreeBSD$

PORTNAME=   tkgeomap
PORTVERSION=    2.11.6
CATEGORIES= astro tk
MASTER_SITES=   SF

MAINTAINER= tcltk@FreeBSD.org
COMMENT=    Read, manipulate, and display geo data

LICENSE=    GPLv2

LIB_DEPENDS=    libtclgeomap.so:${PORTSDIR}/astro/tclgeomap

USES+=      tk
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-tclgeomap-include=${LOCALBASE}/include/tclgeomap --with-x \
        --with-tcl=${TCL_LIBDIR} --with-tclinclude=${TCL_INCLUDEDIR} \
        --with-tk=${TK_LIBDIR} --with-tkinclude=${TK_INCLUDEDIR} \
        --x-libraries=${LOCALBASE}/lib --x-includes=${LOCALBASE}/include
MAKE_ENV+=  TCLGEOMAP_LIB="-L ${LOCALBASE}/lib -ltclgeomap"
WRKSRC=     ${WRKDIR}/${DISTNAME}/unix
USE_LDCONFIG=   yes

post-patch:
    @${REINPLACE_CMD} -e '/=.*PACKAGE_VERSION/s|$${PACKAGE_VERSION}||g' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|@PACKAGE_VERSION@||g' ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} -e '/^package/!s|@PACKAGE_VERSION@||g' ${WRKSRC}/pkgIndex.tcl.in
    @${REINPLACE_CMD} -e '2s|.*|exit 0|' ${WRKSRC}/mkLinks

do-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/include/tkgeomap
    ${FIND} ${WRKSRC}/.. -name "*.h" -exec ${INSTALL_DATA} {} ${STAGEDIR}${PREFIX}/include/tkgeomap \;
    @${MKDIR} ${STAGEDIR}${PREFIX}/lib/tkgeomap
    ${INSTALL_DATA} ${WRKSRC}/../library/tkgeomap_procs.tcl ${STAGEDIR}${PREFIX}/lib/tkgeomap
    ${INSTALL_DATA} ${WRKSRC}/../library/wdgeomap.tcl ${STAGEDIR}${PREFIX}/lib/tkgeomap
    ${INSTALL_DATA} ${WRKSRC}/pkgIndex.tcl ${STAGEDIR}${PREFIX}/lib/tkgeomap
    ${INSTALL_DATA} ${WRKSRC}/libtkgeomap.so ${STAGEDIR}${PREFIX}/lib/libtkgeomap.so.0
    ${LN} -sf libtkgeomap.so.0 ${STAGEDIR}${PREFIX}/lib/libtkgeomap.so
    ${FIND} ${WRKSRC}/../doc -name "*.n" -exec ${INSTALL_DATA} {} ${STAGEDIR}${PREFIX}/man/mann \;
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtkgeomap.so.0

.include <bsd.port.mk>