Update astro/stellarium to version 0.12.4_1
[dports.git] / astro / stellarium / Makefile
1 # Created by: Jean-Yves Lefort <jylefort@brutele.be>
2 # $FreeBSD$
3
4 PORTNAME=       stellarium
5 PORTVERSION=    0.12.4
6 PORTREVISION=   1
7 CATEGORIES=     astro
8 MASTER_SITES=   SF/${PORTNAME}/Stellarium-sources/${PORTVERSION}
9 DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}
10 EXTRACT_ONLY:=  ${DISTFILES}
11
12 MAINTAINER=     danfe@FreeBSD.org
13 COMMENT=        3D photo-realistic sky renderer (planetarium)
14
15 LICENSE=        GPLv2
16
17 USES=           cmake gettext iconv
18 USE_GL=         glu
19 USE_QT4=        moc_build rcc_build uic_build qmake_build \
20                 corelib gui network opengl script
21 INSTALLS_ICONS= yes
22
23 PORTDOCS=       AUTHORS ChangeLog README
24
25 OPTIONS_DEFINE=         MORE_STARS MULTIMEDIA DOCS
26 OPTIONS_DEFAULT=        MULTIMEDIA
27 MORE_STARS_DESC=        Install extra star catalogs (1.2GB)
28 MULTIMEDIA_DESC=        Sound and video support (via Phonon)
29
30 .include <bsd.port.options.mk>
31
32 .if ${PORT_OPTIONS:MMORE_STARS}
33 .  for i in 4 5 6 7 8
34 MASTER_SITES+=  SF/${PORTNAME}/Extra-data-files/stars${i}:stars${i}
35 .  endfor
36 DISTFILES+=     stars_4_1v0_0.cat:stars4 stars_5_2v0_0.cat:stars5 \
37                 stars_6_2v0_0.cat:stars6 stars_7_2v0_0.cat:stars7 \
38                 stars_8_2v0_0.cat:stars8
39 PLIST_SUB+=     MORE_STARS=""
40 .else
41 PLIST_SUB+=     MORE_STARS="@comment "
42 .endif
43
44 .if ${PORT_OPTIONS:MMULTIMEDIA}
45 USE_QT4+=       phonon
46 .else
47 CMAKE_ARGS+=    -DENABLE_SOUND:BOOL=OFF
48 .endif
49
50 post-patch: .SILENT
51         ${REINPLACE_CMD} -e '/QTTEST/d' ${WRKSRC}/CMakeLists.txt
52 # Avoid picking up the wrong `fixx11h.h' (`x11/kdelibs3' port installs one
53 # that does not handle FontChange)
54         ${GREP} -Rl --null fixx11h\\.h ${WRKSRC}/src ${WRKSRC}/plugins | \
55                 ${XARGS} -0 ${REINPLACE_CMD} -e 's/fixx11h\.h/fixx11qt4h.h/'
56         cd ${WRKSRC}/src/core/external && ${MV} fixx11h.h fixx11qt4h.h
57
58 post-install:
59 .if ${PORT_OPTIONS:MMORE_STARS}
60         ${INSTALL_DATA} ${DISTDIR}/stars_[45678]_[12]v0_0.cat \
61                 ${STAGEDIR}${DATADIR}/stars/default
62 .endif
63         @${MKDIR} ${STAGEDIR}${DOCSDIR}
64         ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
65
66 .include <bsd.port.mk>