aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/freeglut/Makefile
blob: 6a4cc7190019982ba3c49990051a001cd86a5f72 (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
# New ports collection makefile for:    freeglut
# Date created:     Wed Apr 23 2003
# Whom:         thierry@pompo.net
#
# $FreeBSD$
#

PORTNAME=       freeglut
PORTVERSION=        2.0.1
CATEGORIES=     x11-toolkits
MASTER_SITES=       ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= ports@FreeBSD.org
COMMENT=    An alternative to the OpenGL Utility Toolkit (GLUT) library

USE_AUTOMAKE=   yes
USE_AUTOHEADER= yes
HAS_CONFIGURE=  yes
USE_LIBTOOL=    yes
INSTALLS_SHLIB= yes
USE_XLIB=   yes
CONFIGURE_ARGS= --x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib
CONFIGURE_ENV=  CPPFLAGS="-I${X11BASE}/include"         \
        ACLOCAL="${ACLOCAL}"                \
        AUTOCONF="${AUTOCONF}"              \
        AUTOMAKE="${AUTOMAKE}"              \
        AUTOHEADER="${AUTOHEADER}"

USE_REINPLACE=  yes
REINPLACE_ARGS= -i ""

DOCS=   download.html freeglut.html freeglut_logo.png       \
    freeglut_user_interface.html index.html ogl_sm.png  \
    progress.html structure.html
BINS=   Fractals Fractals_random Lorenz One

post-patch:
    @${REINPLACE_CMD} -e "s|/usr/X11R6|${X11BASE}|g"    \
            -e "s|/usr/local|${LOCALBASE}|g"    \
        ${WRKSRC}/aclocal.m4
.for fract in /fractals.c _random/fractals_random.c
    @${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" \
        ${WRKSRC}/progs/demos/Fractals${fract}
.endfor

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}
    @${INSTALL_DATA} ${WRKSRC}/doc/${FILE} ${DOCSDIR}
.endfor
    @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
    @${MKDIR} ${EXAMPLESDIR}
    @${INSTALL_DATA} ${WRKSRC}/progs/demos/Fractals/fractals.dat    \
        ${EXAMPLESDIR}
.for FILE in ${BINS}
    @${INSTALL_PROGRAM} ${WRKSRC}/progs/demos/${FILE}/.libs/${FILE:L} \
        ${EXAMPLESDIR}
.endfor
    @${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
.endif
    @${ECHO_MSG}
    @${CAT} ${PKGMESSAGE} | \
        ${SED} -e "s|/usr/local|${PREFIX}|"     \
            -e "s|/usr/X11R6|${X11BASE}|"
    @${ECHO_MSG}

.include <bsd.port.mk>