# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
maintainers {nicos @NicosPavlov} openmaintainer
description KStars is a Desktop Planetarium for KDE.
long_description ${description} It provides an accurate graphical simulation \
of the night sky, from any location on Earth, at any date and time. The display \
includes up to 100 million stars, 13,000 deep-sky objects ,all 8 planets, the Sun \
and Moon, and thousands of comets and asteroids.
homepage http://edu.kde.org/kstars/
master_sites kde:stable/${version}/src/
distname ${name}-${version}
checksums rmd160 6e0ae12cc2b7c9277294c720ebab6502d3fffd29 \
sha256 771c46e8985724d7f5be74f4813bfba0a62cbb48e1c8d0cd27394a6f0ef15bde
#Binaries do not link to openssl, nor use the ssl backend of kdelibs4
license_noconflict openssl
depends_lib-append port:kdelibs4 \
patchfiles-append patch-CMakeLists.txt.diff
depends_lib-append port:xplanet
variant indi description "Add support for astronomical hardware through indi" {
depends_lib-append port:indi
reinplace "s|<GL/gl.h>|<gl.h>|g" ${worksrcpath}/kstars/skyglpainter.cpp
reinplace "s|/usr|${prefix}|g" ${worksrcpath}/kstars/kstars.kcfg
#Force deactivation of documentation if no indi variant
if {![variant_isset indi]} {
reinplace "s|macro_optional_find_package(INDI)|#macro_optional_find_package(INDI)|g" \
${worksrcpath}/CMakeLists.txt
reinplace "s|macro_bool_to_01(INDI_FOUND HAVE_INDI_H)|#macro_bool_to_01(INDI_FOUND HAVE_INDI_H)|g" \
${worksrcpath}/CMakeLists.txt
#Force deactivation of documentation if no docs variant
if {![variant_isset docs]} {
reinplace "s|add_subdirectory( doc )|#add_subdirectory( doc )|g" ${worksrcpath}/CMakeLists.txt