aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/irrlicht/Makefile
blob: d71a68fdeffa90c8cba7ba9792fe1b5a97d98cfe (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
# New ports collection makefile for:    irrlicht
# Date created:             19 September 2004
# Whom:                 Simon Barner <barner@gmx.de>
#
# $FreeBSD$
#

PORTNAME=   irrlicht
PORTVERSION=    1.4
PORTREVISION=   1
CATEGORIES= x11-toolkits graphics
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= acm@FreeBSD.org
COMMENT=    High performance realtime 3D engine

LIB_DEPENDS=    jpeg.9:${PORTSDIR}/graphics/jpeg \
        png.5:${PORTSDIR}/graphics/png

USE_ZIP=    yes
USE_DOS2UNIX=   Makefile *.cpp *.h *.txt
USE_GMAKE=  yes
USE_GL=     yes
USE_LDCONFIG=   yes

PLIST_SUB+= SHARED_LIB_VER=${SHARED_LIB_VER}
SUB_FILES=  pkg-message
BUILD_WRKSRC=   ${WRKSRC}/source/Irrlicht

SHARED_LIB_VER= 1.4
EXAMPLEDIRS=    01.HelloWorld 02.Quake3Map 03.CustomSceneNode 04.Movement 05.UserInterface \
        06.2DGraphics 07.Collision 08.SpecialFX 09.Meshviewer 10.Shaders \
        11.PerPixelLighting 12.TerrainRendering 13.RenderToTexture 15.LoadIrrFile \
        Demo

OPTIONS=    DEBUG   "Compile with debugging simbols" off \
        EXAMPLES    "Install example files" on

.include <bsd.port.pre.mk>

.if (${ARCH} == "amd64") || (${ARCH} == "ia64")
CFLAGS+=    -fPIC
.endif

.if ${ARCH} == "sparc64"
BROKEN=     Does not compile on sparc64
.endif

.if !defined(WITHOUT_EXAMPLES)
PLIST_SUB+= EXAMPLES=""
.else
PLIST_SUB+= EXAMPLES="@comment "
.endif

.if !defined(WITH_DEBUG)
MAKE_ENV+=  NDEBUG=1
.endif

do-install:
    ${MKDIR} ${PREFIX}/include/${PORTNAME}
    cd ${WRKSRC}/include && \
        ${INSTALL_DATA} *.h ${PREFIX}/include/${PORTNAME}
    ${INSTALL_DATA} ${WRKSRC}/lib/FreeBSD/libIrrlicht.a ${PREFIX}/lib
    ${INSTALL_PROGRAM} ${WRKSRC}/lib/FreeBSD/libIrrlicht.so.${SHARED_LIB_VER} \
        ${PREFIX}/lib && ${LN} -s ${PREFIX}/lib/libIrrlicht.so.${SHARED_LIB_VER} \
            ${PREFIX}/lib/libIrrlicht.so

.if !defined(WITHOUT_EXAMPLES)
.for DIRE in ${EXAMPLEDIRS}
    ${MKDIR} ${EXAMPLESDIR}/${DIRE}
    ${INSTALL_DATA} ${WRKSRC}/examples/${DIRE}/Makefile \
        ${EXAMPLESDIR}/${DIRE}
    ${FIND} ${WRKSRC}/examples/${DIRE} \( -name "*.cpp" -or -name "*.h" \) \
        -exec ${INSTALL_DATA} "{}" ${EXAMPLESDIR}/${DIRE} \;
.endfor
    ${MKDIR} ${EXAMPLESDIR}/media
    ${FIND} ${WRKSRC}/media -type f \
        -exec ${INSTALL_DATA} "{}" ${EXAMPLESDIR}/media \;
.endif

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>