aboutsummaryrefslogtreecommitdiffstats
path: root/math/ploticus/Makefile
blob: fd62ce49f9aeef22962911e3e28828811e6ac245 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# ex:ts=8
# Ports collection makefile for:    ploticus
# Date created:         Jan 23, 2002
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   ploticus
PORTVERSION=    2.40
PORTREVISION=   6
CATEGORIES= math
MASTER_SITES=   SF
DISTNAME=   pl${PORTVERSION:S/.//}src

MAINTAINER?=    linimon@FreeBSD.org
COMMENT?=   Generates plots and graphs from data

LIB_DEPENDS=    gd:${PORTSDIR}/graphics/gd \
        jpeg:${PORTSDIR}/graphics/jpeg \
        ming:${PORTSDIR}/graphics/ming \
        png15:${PORTSDIR}/graphics/png \
        freetype:${PORTSDIR}/print/freetype2

BUILD_WRKSRC=   ${WRKSRC}/src

FREETYPE_CONFIG?=   ${LOCALBASE}/bin/freetype-config

MAKE_ARGS=  CC="${CC}" FLAGS="${CFLAGS}" \
        LOCALEOBJ="localef.o" LOCALE_FLAG="-DLOCALE" \
        MING="-L${LOCALBASE}/lib -lming" \
        MINGH="-I${LOCALBASE}/include/ming" NOSWFFLAG="" \
        GD18LIBS="`${FREETYPE_CONFIG} --libs` \
            -L${LOCALBASE}/lib -lgd -lpng -lz -ljpeg" \
        GD18H="`${FREETYPE_CONFIG} --cflags` \
            -L${LOCALBASE}/include" \
        GDFREETYPE="-DGDFREETYPE" PREFABS_DIR="${DATADIR}"
ALL_TARGET= plgd18

.ifdef (WITHOUT_X11)
MAKE_ARGS+= NOX11=-DNOX11 XLIBS= XOBJ=
PKGNAMESUFFIX=  -nox11
.else
USE_XORG=   xpm
.endif

.if !defined(NO_INSTALL_MANPAGES)
MAN1=       ploticus.1
MAN3=       libploticus.3
MANCOMPRESSED=  no
.endif

post-patch:
    @${REINPLACE_CMD} -e 's,/usr/X11R6,${LOCALBASE},g' \
        ${BUILD_WRKSRC}/Makefile ${BUILD_WRKSRC}/mkapi

do-install:
    ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/pl ${PREFIX}/bin/ploticus
    @${MKDIR} ${DATADIR}
    cd ${WRKSRC}/prefabs && ${FIND} . | \
        ${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}

.if !defined(NO_INSTALL_MANPAGES)
    ${INSTALL_MAN} ${WRKSRC}/man/man1/pl.1 ${MANPREFIX}/man/man1/ploticus.1
    ${INSTALL_MAN} ${WRKSRC}/man/man3/${MAN3} ${MANPREFIX}/man/man3
.endif

.if !defined(NOPORTEXAMPLES)
    @${MKDIR} ${EXAMPLESDIR}
    cd ${WRKSRC}/pltestsuite && ${FIND} . \! -name "*.orig" | \
        ${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>