Tweak graphics/structuresynth version 1.5.0_2
[dports.git] / graphics / structuresynth / Makefile
1 # Created by: Dmitry Marakasov <amdmi3@amdmi3.ru>
2 # $FreeBSD: graphics/structuresynth/Makefile 324744 2013-08-14 22:35:50Z ak $
3
4 PORTNAME=       structuresynth
5 PORTVERSION=    1.5.0
6 PORTREVISION=   2
7 CATEGORIES=     graphics
8 MASTER_SITES=   SF/${PORTNAME}/Structure%20Synth/Version%201.5%20%28Hinxton%29
9 DISTNAME=       StructureSynth-Source-v${PORTVERSION}
10
11 MAINTAINER=     amdmi3@FreeBSD.org
12 COMMENT=        Rule-based 3D structure generator
13
14 USE_GL=         glu
15 USE_ZIP=        yes
16 USE_QT4=        qmake_build corelib gui opengl moc_build rcc_build xml script
17 WRKSRC=         ${WRKDIR}/structure-synth
18 USE_DOS2UNIX=   *.cpp *.h
19
20 post-extract:
21         @${MV} "${WRKDIR}/Structure Synth Source Code" ${WRKSRC}
22         @${RM} -rf ${WRKSRC}/Examples/DontDeploy
23
24 post-patch:
25         @${REINPLACE_CMD} -e '/examplesDir/ s|"Examples"|"${DATADIR}/Examples"|; \
26                 /miscDir/ s|"Misc"|"${DATADIR}/Misc"|' \
27                 ${WRKSRC}/StructureSynth/GUI/MainWindow.cpp
28
29 do-configure:
30         @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${QMAKE} -project \
31                 -after "CONFIG+=opengl" -after "QT+=xml opengl script" \
32                 -after "LIBS+=-lGLU"
33         @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${QMAKE} ${QMAKEFLAGS}
34
35 do-install:
36         ${INSTALL_PROGRAM} ${WRKSRC}/structure-synth ${PREFIX}/bin/
37         ${MKDIR} ${DATADIR}
38         cd ${WRKSRC} && ${COPYTREE_SHARE} "Examples Misc" ${DATADIR}/
39         ${MKDIR} ${PREFIX}/share/applications
40         ${INSTALL_DATA} ${WRKSRC}/structure-synth.desktop \
41                 ${PREFIX}/share/applications/
42         ${INSTALL_DATA} ${WRKSRC}/images/fileicons/StructureSynth-256.png \
43                 ${PREFIX}/share/pixmaps/structure-synth.png
44
45 .include <bsd.port.mk>