summaryrefslogtreecommitdiffstats
path: root/graphics/fracplanet/Makefile
blob: 72ed716107060dca2f095bcd79a38a4e565f66cf (plain)
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
# Created by: Igor Pokrovsky <ip@doom.homeunix.org>
# $FreeBSD$

PORTNAME=	fracplanet
PORTVERSION=	0.4.0
PORTREVISION=	11
CATEGORIES=	graphics
MASTER_SITES=	SF \
		SF/nemysisfreebsdp/:icons
DISTFILES=	${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} \
		${PORTNAME}_icons.tar.gz:icons

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Interactive tool for creating random fractal planets and terrain

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	xsltproc:textproc/libxslt
LIB_DEPENDS=	libboost_program_options.so:devel/boost-libs

WRKSRC=		${WRKDIR}/${PORTNAME}

USES=		gmake
USE_GL=		glu
USE_QT4=	corelib moc_build qmake_build gui opengl
QT_NONSTANDARD=	yes
HAS_CONFIGURE=	yes
CONFIGURE_ENV=	QTDIR="${PREFIX}"
CONFIGURE_ARGS=	-spec ${QMAKESPEC}

CXXFLAGS+=	-include ${WRKSRC}/precompiled.h

PORTDOCS=	*

INSTALLS_ICONS=	yes
ICON_SIZES=	32x32 48x48 64x64 72x72 96x96

DESKTOP_ENTRIES="Fracplanet" "" "${PORTNAME}" \
		"${PORTNAME}" "Graphics;" ""

OPTIONS_DEFINE=	DOXYGEN DOCS

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MDOCS} && ${PORT_OPTIONS:MDOXYGEN}
BUILD_DEPENDS+=	doxygen:devel/doxygen
.endif

post-patch:
.for f in BUILD VERSION configure
	@${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' \
		${WRKSRC}/${f}
.endfor
	@${REINPLACE_CMD} -e 's|qmake-qt4|${QMAKE} ${QMAKE_ARGS}|' \
		${WRKSRC}/configure
	@${REINPLACE_CMD} -e \
		's|-lboost_program_options|-lboost_program_options -lGLU|' \
		${WRKSRC}/fracplanet.pro

.if ${PORT_OPTIONS:MDOCS} && ${PORT_OPTIONS:MDOXYGEN}
post-build:
	cd ${WRKSRC} && doxygen .
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
	${INSTALL_MAN} ${WRKSRC}/man/man1/${PORTNAME}.1 \
		${STAGEDIR}${MAN1PREFIX}/man/man1/

.for s in ${ICON_SIZES}
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/
	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_${s}.png \
		${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
.endfor
	${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
		${STAGEDIR}${PREFIX}/share/pixmaps

.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	cd ${WRKSRC} && ${INSTALL_DATA} BUGS NEWS README THANKS \
		fracplanet.css fracplanet.htm ${STAGEDIR}${DOCSDIR}
. if ${PORT_OPTIONS:MDOXYGEN}
	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "html latex" ${STAGEDIR}${DOCSDIR})
. endif
.endif

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud