aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gsculpt/Makefile
blob: b07f28026c725b559d35850c1ea153f0a637f617 (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
# New ports collection makefile for:    gSculpt
# Date created:         Oct 10, 2001
# Whom:             ijliao
#
# $Carpetsmoker: ports/graphics/gsculpt/Makefile,v 1.4 2007/08/02 13:13:45 carpetsmoker Exp $
# $FreeBSD$
#

PORTNAME=   gsculpt
PORTVERSION=    0.99.47
PORTREVISION=   1
CATEGORIES= graphics
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${DISTNAME:S,-src,,}
DISTNAME=   gSculpt-${PORTVERSION}-alpha-src

MAINTAINER= ports@FreeBSD.org
COMMENT=    An Opensource 3D modelling application

LICENSE=    GPLv2

LIB_DEPENDS=    boost_python.4:${PORTSDIR}/devel/boost-python-libs
RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}opengl>0:${PORTSDIR}/graphics/py-opengl \
        ${PYTHON_PKGNAMEPREFIX}gtkglext>0:${PORTSDIR}/x11-toolkits/py-gtkglext

WRKSRC=     ${WRKDIR}/${DISTNAME:S,-src,,}

USE_GNOME=  pygtk2
USE_GL=     glu
USE_XORG=   x11
USE_PYTHON= 2.4+
USE_SCONS=  yes
SCONS_BUILDENV= ${SCONS_ENV}
USE_LDCONFIG=   ${PREFIX}/lib/gSculpt
MAKE_JOBS_SAFE= yes

DATADIR=    ${PREFIX}/share/gSculpt

.include <bsd.port.pre.mk>

.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BROKEN=     Does not compile on ia64, powerpc, or sparc64
.endif

.if ${ARCH} == "i386"
CFLAGS+=    -DGSCULPT_FPU_X86
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        "s| gsculpt.py| ${PYTHONPREFIX_SITELIBDIR}/gSculpt/gsculpt.py|" \
        ${WRKSRC}/gsculpt
    @${REINPLACE_CMD} -e \
        "s|'-Werror'|''| ; \
         s|'-g'|''| ; \
         s|'-DGSCULPT_FPU_X86'|''| ; \
         s|'[(]-O2.*-O[)]'|''| ; \
         /^cppLibs/s|BackgroundModel|BackgroundMesh|" \
        ${WRKSRC}/SConstruct
    @${REINPLACE_CMD} -e \
        "/^prefix/s|=.*|= '${PREFIX}'| ; \
         /^gSculptStartDir/s|=.*|= os.path.join( pysitelibdir )|" \
        ${WRKSRC}/SConstruct-install

do-install:
    @cd ${WRKSRC} && ${SCONS_BIN} -f SConstruct-install ${PREFIX}

.include <bsd.port.post.mk>