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 146517 2016-03-10 17:49:28Z raimue@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup cmake 1.0 |
---|
6 | PortGroup qt4 1.0 |
---|
7 | |
---|
8 | name stellarium |
---|
9 | version 0.12.5 |
---|
10 | revision 2 |
---|
11 | categories science |
---|
12 | platforms darwin |
---|
13 | license GPL-2+ |
---|
14 | maintainers raimue \ |
---|
15 | michaelld |
---|
16 | |
---|
17 | description Stellarium is a free open source planetarium for your computer. |
---|
18 | long_description \ |
---|
19 | Stellarium is a free open source planetarium for your computer. \ |
---|
20 | It shows a realistic sky in 3D, just like what you see with the naked eye, \ |
---|
21 | binoculars or a telescope. It is being used in planetarium projectors. Just \ |
---|
22 | set your coordinates and go. |
---|
23 | homepage http://stellarium.org/ |
---|
24 | |
---|
25 | master_sites sourceforge |
---|
26 | checksums rmd160 e925e75f0fbaa65f9f2ce04d200b50f73c01c5a5 \ |
---|
27 | sha256 15fbc0f12f25e4dbf7eb360c422987ca312201e3b41e6eadba028f1af9174559 |
---|
28 | |
---|
29 | depends_lib-append \ |
---|
30 | port:freetype \ |
---|
31 | port:libiconv \ |
---|
32 | path:lib/libssl.dylib:openssl \ |
---|
33 | port:phonon |
---|
34 | |
---|
35 | patchfiles patch-libc++.diff |
---|
36 | |
---|
37 | post-patch { |
---|
38 | reinplace "s:SET(CMAKE_INSTALL_PREFIX \"\$\{PROJECT_BINARY_DIR\}/:SET(CMAKE_INSTALL_PREFIX \"${applications_dir}/:" ${worksrcpath}/CMakeLists.txt |
---|
39 | |
---|
40 | # Determine which archs to build |
---|
41 | if {[variant_isset universal]} { |
---|
42 | set archs ${configure.universal_archs} |
---|
43 | } else { |
---|
44 | set archs ${configure.build_arch} |
---|
45 | } |
---|
46 | reinplace "s:SET(CMAKE_OSX_ARCHITECTURES \".*\"):SET(CMAKE_OSX_ARCHITECTURES \"${archs}\"):" ${worksrcpath}/CMakeLists.txt |
---|
47 | } |
---|
48 | |
---|
49 | configure.cmd cmake |
---|
50 | # specify MacPorts' dependencies to cmake |
---|
51 | configure.pre_args -DFreeType2_INCLUDE_DIR:PATH=${prefix}/include/freetype2 \ |
---|
52 | -DFreeType2_LIBRARIES:FILEPATH=${prefix}/lib/libfreetype.dylib \ |
---|
53 | -DZLIB_INCLUDE_DIR:PATH=${prefix}/include \ |
---|
54 | -DZLIB_LIBRARY:FILEPATH=${prefix}/lib/libz.dylib \ |
---|
55 | -DICONV_INCLUDE_DIR:PATH=${prefix}/include \ |
---|
56 | -DICONV_LIBRARIES:FILEPATH=${prefix}/lib/libiconv.dylib \ |
---|
57 | -DOPENSSL_CRYPTO_LIBRARIES:FILEPATH=${prefix}/lib/libcrypto.dylib \ |
---|
58 | -DOPENSSL_INCLUDE_DIR:PATH=${prefix}/include/openssl \ |
---|
59 | -DOPENSSL_SSL_LIBRARIES:FILEPATH=${prefix}/lib/libssl.dylib \ |
---|
60 | ${qt_cmake_defines} |
---|
61 | |
---|
62 | configure.args . |
---|
63 | |
---|
64 | # This post-destroot phase is similar to the 'make macosx_bundle' target, |
---|
65 | # but it does not copy libraries into the bundle and does not require perl as |
---|
66 | # another dependency |
---|
67 | post-destroot { |
---|
68 | set appdir ${destroot}${applications_dir}/Stellarium.app/Contents |
---|
69 | |
---|
70 | move ${appdir}/bin ${appdir}/MacOS |
---|
71 | move ${appdir}/share ${appdir}/Resources |
---|
72 | eval move [glob ${appdir}/Resources/stellarium/*] ${appdir}/Resources/ |
---|
73 | delete ${appdir}/Resources/stellarium |
---|
74 | |
---|
75 | # copy .app-specific files |
---|
76 | copy ${worksrcpath}/data/Info.plist ${appdir} |
---|
77 | copy ${worksrcpath}/data/PkgInfo ${appdir} |
---|
78 | copy ${worksrcpath}/data/Icon.icns ${appdir}/Resources/ |
---|
79 | |
---|
80 | # copy other useful file(s) |
---|
81 | copy ${worksrcpath}/util/qt.conf ${appdir}/Resources/ |
---|
82 | } |
---|
83 | |
---|
84 | # Supports universal builds through cmake, archs are set in post-patch |
---|
85 | variant universal {} |
---|
86 | |
---|
87 | livecheck.url http://sourceforge.net/projects/stellarium/files/ |
---|
88 | livecheck.regex "Stellarium-sources/.*/stellarium-(.*)[quotemeta ${extract.suffix}]" |
---|