source: trunk/dports/kde/kstars/Portfile @ 115815

Last change on this file since 115815 was 115815, checked in by nicos@…, 6 years ago

kdeedu4 ports: update to 4.11.5

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# -*- 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
2# $Id: Portfile 115815 2014-01-12 02:39:15Z nicos@macports.org $
3
4PortSystem          1.0
5PortGroup           kde4   1.1
6
7name                kstars
8version             4.11.5
9categories          kde kde4
10platforms           darwin
11license             GPL-2+
12maintainers         nicos openmaintainer
13
14description         KStars is a Desktop Planetarium for KDE.
15long_description    ${description} It provides an accurate graphical simulation \
16                    of the night sky, from any location on Earth, at any date and time. The display \
17                    includes up to 100 million stars, 13,000 deep-sky objects ,all 8 planets, the Sun \
18                    and Moon, and thousands of comets and asteroids.
19
20homepage            http://edu.kde.org/kstars/
21master_sites        kde:stable/${version}/src/
22distname            ${name}-${version}
23use_xz              yes
24
25checksums           rmd160  6333add2b3c8f43cdaf67b2c58827b09993f382f \
26                    sha256  6beb24eb6460f170060e88f3f1dba1050a1f4b906635f253fa64e063b48d7d42
27
28#Binaries do not link to openssl, nor use the ssl backend of kdelibs4
29license_noconflict  openssl
30
31depends_lib-append  port:kdelibs4 \
32                    port:oxygen-icons \
33                    port:eigen \
34                    port:cfitsio
35
36platform darwin { 
37    if {${os.major} >= 13} { 
38        #Use Eigen3 in compatibility mode as Eigen2 does not build on Mavericks
39        depends_lib-delete  port:eigen
40        depends_lib-append  port:eigen3
41        patchfiles          patch-Eigen3.diff
42
43        post-patch {
44            #Correct prefix if changed during patching
45            reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/CMakeLists.txt
46        }
47    }
48}
49
50patchfiles-append   patch-CMakeLists.txt.diff \
51                    patch-starobject.diff
52
53variant x11 {
54    depends_lib-append  port:xplanet
55}
56
57variant indi description "Add support for astronomical hardware through indi" {
58    depends_lib-append  port:indi
59}
60
61pre-configure {
62    #Ensure finding openGL
63    reinplace "s|<GL/gl.h>|<gl.h>|g" ${worksrcpath}/kstars/skyglpainter.cpp
64
65    #Path to indi
66    reinplace "s|/usr|${prefix}|g" ${worksrcpath}/kstars/kstars.kcfg
67    #Force deactivation of documentation if no indi variant
68    if {![variant_isset indi]} {
69        reinplace "s|macro_optional_find_package(INDI)|#macro_optional_find_package(INDI)|g" \
70            ${worksrcpath}/CMakeLists.txt
71        reinplace "s|macro_bool_to_01(INDI_FOUND HAVE_INDI_H)|#macro_bool_to_01(INDI_FOUND HAVE_INDI_H)|g" \
72            ${worksrcpath}/CMakeLists.txt
73    }
74
75    #Force deactivation of documentation if no docs variant
76    if {![variant_isset docs]} {
77        reinplace "s|add_subdirectory( doc )|#add_subdirectory( doc )|g" ${worksrcpath}/CMakeLists.txt
78    }
79
80    #Force deactivation of xplanet if no x11 variant
81    if {![variant_isset x11]} {
82        reinplace "s|macro_optional_find_package(Xplanet)|#macro_optional_find_package(Xplanet)|g" \
83            ${worksrcpath}/CMakeLists.txt
84        reinplace "s|macro_bool_to_01(XPLANET_FOUND HAVE_XPLANET)|#macro_bool_to_01(XPLANET_FOUND HAVE_XPLANET)|g" \
85            ${worksrcpath}/CMakeLists.txt
86    }
87}
88
89livecheck.url       http://kde.mirrors.hoobly.com/stable/
90livecheck.regex     (\\d+(\\.\\d+)+)
Note: See TracBrowser for help on using the repository browser.