aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/maverik/Makefile
blob: 34e01c0e4d46f635294783804f014fbb1f0e16c2 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# ex:ts=8
# New ports collection makefile for:    maverik
# Date created:         Nov 12, 2001
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   maverik
PORTVERSION=    6.2
CATEGORIES= graphics
MASTER_SITES=   http://aig.cs.man.ac.uk/maverik/

MAINTAINER= ports@FreeBSD.org

LIB_DEPENDS=    gtkgl.5:${PORTSDIR}/x11-toolkits/gtkglarea

USE_REINPLACE=  yes
USE_SUBMAKE=    yes
USE_MESA=   yes
WANT_GTK=   yes
SCRIPTS_ENV=    WRKDIRPREFIX="${WRKDIRPREFIX}" \
        REALCURDIR="${.CURDIR}" \
        DISTNAME="${DISTNAME}"
HAS_CONFIGURE=  yes
CONFIGURE_SCRIPT=   setup
CONFIGURE_ARGS= --MESAPATH=${X11BASE}
INSTALLS_SHLIB= yes
MANCOMPRESSED=  no

.include <bsd.port.pre.mk>

.if defined(WITH_PNG)
LIB_DEPENDS+=   png:${PORTSDIR}/graphics/png

CONFIGURE_ARGS+=    --PNGLIBS="-L${LOCALBASE}/lib -lpng" \
            --PNGINCL="-I${LOCALBASE}/include"
.endif

.if defined(HAVE_GTK)
USE_GTK=    yes
CONFIGURE_ARGS+=    --GTK
PLIST_SUB+= GTK=""
.else
PLIST_SUB+= GTK="@comment "
.endif

post-extract:
    @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/genman3list.sh

post-patch:
    @${REINPLACE_CMD} -e "s,%%X11BASE%%,${X11BASE},g ; \
        s,%%CC%%,${CC},g ; \
        s,%%CXX%%,${CXX},g ; \
        s,%%CFLAGS%%,${CFLAGS},g ; \
        s,%%CXXFLAGS%%,${CXXFLAGS},g ; \
        s,%%PTHREAD_CFLAGS%%,${PTHREAD_CFLAGS},g ; \
        s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g ; \
        s,gtk-config,${GTK_CONFIG},g" ${WRKSRC}/setup
    @${REINPLACE_CMD} -e "s,gtk-config,${GTK_CONFIG},g" ${WRKSRC}/examples/misc/GTK/Makefile

do-install:
    ${INSTALL_DATA} ${WRKSRC}/lib/*.* ${PREFIX}/lib
    @${MKDIR} ${PREFIX}/include/maverik
    ${INSTALL_DATA} ${WRKSRC}/incl/*.* ${PREFIX}/include/maverik
    ${FIND} ${WRKSRC}/doc/MFS/man3 -name '*.3' -exec \
        ${INSTALL_MAN} \{} ${MAN3PREFIX}/man/man3 \;
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}/MFS/html
    ${FIND} ${WRKSRC}/doc/MFS/html -name '*.html' -exec \
        ${INSTALL_DATA} \{} ${DOCSDIR}/MFS/html \;
    @${MKDIR} ${DOCSDIR}/MFS/pdf
    ${INSTALL_DATA} ${WRKSRC}/doc/MFS/pdf/*.* ${DOCSDIR}/MFS/pdf
    @${MKDIR} ${DOCSDIR}/MFS/ps
    ${INSTALL_DATA} ${WRKSRC}/doc/MFS/ps/*.* ${DOCSDIR}/MFS/ps
    @${MKDIR} ${DOCSDIR}/MPG/pdf
    ${INSTALL_DATA} ${WRKSRC}/doc/MPG/pdf/*.* ${DOCSDIR}/MPG/pdf
    @${MKDIR} ${DOCSDIR}/MPG/ps
    ${INSTALL_DATA} ${WRKSRC}/doc/MPG/ps/*.* ${DOCSDIR}/MPG/ps
.endif

post-clean:
    @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc

.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif

.include <bsd.port.post.mk>