aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/openrm/Makefile
blob: feb63921b6cbcb9e316dc85f16ec27be70227c7d (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# New ports collection makefile for:    openrm
# Date created:     8 July 2002
# Whom:         Igor Pokrovsky <tiamat@comset.net>
#
# $FreeBSD$
#

PORTNAME=       openrm
PORTVERSION=        1.6.0
CATEGORIES=     graphics
MASTER_SITES=       ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME=       ${PORTNAME}-devel-${PORTVERSION}-1
.ifdef (WITH_DEMOS)
DISTFILES=      ${DISTNAME}${EXTRACT_SUFX} \
            ${PORTNAME}-demo-${PORTVERSION}-1${EXTRACT_SUFX}
.endif

MAINTAINER= ports@FreeBSD.org
COMMENT=    Development environment used to build 2D/3D/stereo graphics

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

WRKSRC=     ${WRKDIR}/rm${PORTVERSION:S/.//g}
.ifdef (WITH_DEMOS)
WRKSRC2=    ${WRKDIR}/rmdemo
EXTRA_PATCHES=  ${PATCHDIR}/makeinclude.diff
.endif

USE_X_PREFIX=   yes
USE_GL=     yes
USE_PERL5_BUILD=yes
ALL_TARGET= freebsd docs
MAKE_ARGS=  AR=${AR} \
        CC=${CC} \
        CP=${CP} \
        ECHO_CMD=${ECHO_CMD} \
        LN=${LN} \
        RM=${RM} \
        STRIP_CMD=${STRIP_CMD} \
        X11BASE=${X11BASE}
INSTALLS_SHLIB= yes
ONLY_FOR_ARCHS= i386

.if !defined(WITH_DEMOS)
PLIST_SUB=  WITH_DEMOS="@comment "
.else
PLIST_SUB=  WITH_DEMOS=""
.endif

pre-everything::
.ifndef (WITH_DEMOS)
    @${ECHO_MSG} "You can define WITH_DEMOS=yes to fetch and install available demos"
.endif

.ifdef (WITH_DEMOS)
post-patch:
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; \
                  s|%%X11BASE%%|${X11BASE}|g; \
                  s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g; \
                  s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC2}/makeinclude
.endif

do-install:
# install libraries
    ${INSTALL_PROGRAM} ${WRKSRC}/lib/librm.so.1 ${PREFIX}/lib
    ${INSTALL_PROGRAM} ${WRKSRC}/lib/librmaux.so.1 ${PREFIX}/lib
    ${INSTALL_PROGRAM} ${WRKSRC}/lib/librmi.so.1 ${PREFIX}/lib
    ${INSTALL_PROGRAM} ${WRKSRC}/lib/librmv.so.1 ${PREFIX}/lib
    ${LN} -fs ${PREFIX}/lib/librm.so.1 ${PREFIX}/lib/librm.so
    ${LN} -fs ${PREFIX}/lib/librmaux.so.1 ${PREFIX}/lib/librmaux.so
    ${LN} -fs ${PREFIX}/lib/librmi.so.1 ${PREFIX}/lib/librmi.so
    ${LN} -fs ${PREFIX}/lib/librmv.so.1 ${PREFIX}/lib/librmv.so
    ${INSTALL_DATA} ${WRKSRC}/lib/librm.a ${PREFIX}/lib
    ${INSTALL_DATA} ${WRKSRC}/lib/librmaux.a ${PREFIX}/lib
    ${INSTALL_DATA} ${WRKSRC}/lib/librmi.a ${PREFIX}/lib
    ${INSTALL_DATA} ${WRKSRC}/lib/librmv.a ${PREFIX}/lib

# install includes
    @${MKDIR} ${PREFIX}/include/rm
    ${INSTALL_DATA} ${WRKSRC}/include/rm/*.h ${PREFIX}/include/rm

.ifdef (WITH_DEMOS)
    @${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC2}/README ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC2}/configure ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC2}/makeinclude ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC2}/Makefile.x11 ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC2}/*.c ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC2}/*.h ${EXAMPLESDIR}
    @${MKDIR} ${EXAMPLESDIR}/data
    ${INSTALL_DATA} ${WRKSRC2}/data/* ${EXAMPLESDIR}/data
.endif

.ifndef (NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/FUTUREPLANS ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/RELEASENOTES ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/HTML/*.html ${DOCSDIR}
    @${MKDIR} ${DOCSDIR}/images
    ${INSTALL_DATA} ${WRKSRC}/doc/HTML/images/* ${DOCSDIR}/images
.endif

.include <bsd.port.mk>