1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00
freebsd-ports/astro/stellarium/Makefile
Alexey Dokuchaev 397846002d - Make NLS support optional: currently, Qt's lconvert executable allocates
ridiculous amount of memory which 32-bit address space cannot hold; see
  https://bugreports.qt.io/browse/QTBUG-87010
- Drop dependency on `devel/gettext': it is only used to generate (update)
  .pot and .po files which does not happen when building release versions
- Use option helpers to handle scripting support, rename SCRIPTING option
  to SCRIPTS to simplify adding OPTIONS_SUB (to reduce the churn on the
  pkg-plist), and amend its description while I'm here
2020-10-07 18:20:22 +00:00

98 lines
2.8 KiB
Makefile

# Created by: Jean-Yves Lefort <jylefort@brutele.be>
# $FreeBSD$
PORTNAME= stellarium
PORTVERSION= 0.20.3
DISTVERSIONPREFIX= v
CATEGORIES= astro
EXTRACT_ONLY= ${_DISTFILES:Nstars_*.cat:N*.pdf}
MAINTAINER= danfe@FreeBSD.org
COMMENT= 3D photo-realistic sky renderer (planetarium)
LICENSE= GPLv2+
USE_GITHUB= yes
GH_ACCOUNT= Stellarium
USES= cmake compiler:c++11-lang desktop-file-utils \
qt:5 shared-mime-info
USE_QT= qmake_build buildtools_build \
concurrent core gui network opengl printsupport widgets
CMAKE_ARGS= -DENABLE_GPS:BOOL=OFF # XXX: requires Qt5Positioning
GUIDE_VERSION= ${PORTVERSION}
PORTDOCS= CREDITS.md ChangeLog README.md \
stellarium_user_guide-${GUIDE_VERSION}-1.pdf
OPTIONS_DEFINE= DOCS MORE_STARS MULTIMEDIA NLS SCRIPTS TEXTURES \
TELESCOPE
OPTIONS_DEFAULT= MULTIMEDIA SCRIPTS TELESCOPE
OPTIONS_SUB= yes
MORE_STARS_DESC= Install extra star catalogs (1.0GB)
TEXTURES_DESC= Install better quality textures
MULTIMEDIA_DESC= Sound and video support
SCRIPTS_DESC= Remote control and scripting support
TELESCOPE_DESC= Telescope control plugin
DOCS_MASTER_SITES= https://github.com/Stellarium/stellarium/releases/download/v${GUIDE_VERSION}/:ug
DOCS_DISTFILES= stellarium_user_guide-${GUIDE_VERSION}-1.pdf:ug
TEXTURES_MASTER_SITES= SF/${PORTNAME}/Extra-data-files/textures:gfx
TEXTURES_DISTFILES= textures-1K.zip:gfx
MULTIMEDIA_USE= QT=multimedia
MULTIMEDIA_CMAKE_OFF= -DENABLE_MEDIA:BOOL=OFF
NLS_USE= QT=linguisttools_build
NLS_CMAKE_OFF= -DENABLE_NLS:BOOL=OFF
SCRIPTS_USE= QT=script
SCRIPTS_CMAKE_OFF= -DENABLE_SCRIPTING:BOOL=OFF
TELESCOPE_USE= QT=serialport
TELESCOPE_CMAKE_OFF= -DUSE_PLUGIN_TELESCOPECONTROL:BOOL=OFF
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMORE_STARS}
. for i in 4 5 6 7 8
MASTER_SITES+= SF/${PORTNAME}/Extra-data-files/stars${i}:stars${i}
. endfor
DISTFILES+= stars_4_1v0_2.cat:stars4 stars_5_2v0_1.cat:stars5 \
stars_6_2v0_1.cat:stars6 stars_7_2v0_1.cat:stars7 \
stars_8_2v0_1.cat:stars8
PLIST_SUB+= MORE_STARS=""
.else
PLIST_SUB+= MORE_STARS="@comment "
.endif
post-extract-DOCS-on:
@${LN} -sf ${_DISTDIR}/stellarium_user_guide-${GUIDE_VERSION}-1.pdf \
${WRKSRC}
post-install-MORE_STARS-on:
${INSTALL_DATA} ${DISTDIR}/stars_4_1v0_2.cat \
${DISTDIR}/stars_[5678]_2v0_1.cat \
${STAGEDIR}${DATADIR}/stars/default
post-install-TEXTURES-on:
(cd ${WRKDIR} && for f in *.png; do \
new=`${STAT} -f '%z' $$f` ; \
existing=`${STAT} -f '%z' \
${STAGEDIR}${DATADIR}/textures/$$f` ; \
${TEST} $$new -gt $$existing || continue ; \
${ECHO_CMD} "-- Replacing texture: $$f\
(has larger file size: $$new > $$existing)" ; \
${INSTALL_DATA} $$f ${STAGEDIR}${DATADIR}/textures ; \
done)
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>