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 148894 2016-05-22 14:26:15Z mcalhoun@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup kde4 1.1 |
---|
6 | |
---|
7 | name kdelibs4 |
---|
8 | version 4.14.3 |
---|
9 | revision 4 |
---|
10 | categories kde kde4 |
---|
11 | maintainers nicos |
---|
12 | license LGPL-2+ GPL-2+ BSD |
---|
13 | description KDE4 core libraries |
---|
14 | long_description Core libraries for KDE4 applications to function |
---|
15 | platforms darwin |
---|
16 | homepage http://www.kde.org |
---|
17 | master_sites kde:stable/${version}/src/ |
---|
18 | use_xz yes |
---|
19 | distname kdelibs-${version} |
---|
20 | |
---|
21 | checksums rmd160 f0dd628eec72c52f4dd8426a2de47d75e629ff31 \ |
---|
22 | sha256 f8206da1106184ef0bd031b82701c4910b8dade331c4cdaf1cd9c6c5208cfd9e |
---|
23 | |
---|
24 | #No binary links to openssl libraries, apart from libkio.dylib at |
---|
25 | #runtime if required. As libkio.dylib code is purely LGPL, there is no |
---|
26 | #conflict with openssl license |
---|
27 | license_noconflict openssl |
---|
28 | |
---|
29 | depends_build-append port:flex port:gmake port:docbook-xsl-ns |
---|
30 | |
---|
31 | depends_lib-append port:bzip2 port:zlib \ |
---|
32 | port:soprano \ |
---|
33 | port:strigi port:gettext \ |
---|
34 | port:pcre port:shared-mime-info \ |
---|
35 | port:giflib \ |
---|
36 | port:jpeg port:libpng \ |
---|
37 | port:jasper port:openexr \ |
---|
38 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
39 | path:lib/libssl.dylib:openssl port:enchant \ |
---|
40 | port:aspell port:aspell-dict-en \ |
---|
41 | port:attica port:xz \ |
---|
42 | port:avahi port:qca \ |
---|
43 | port:libxml2 port:libxslt \ |
---|
44 | port:dbusmenu-qt port:docbook-xml \ |
---|
45 | port:docbook-xsl port:grantlee \ |
---|
46 | port:kerberos5 port:bison \ |
---|
47 | port:shared-desktop-ontologies \ |
---|
48 | port:perl5 |
---|
49 | |
---|
50 | # the aspell dictionaries are just files |
---|
51 | depends_skip_archcheck aspell-dict-en |
---|
52 | |
---|
53 | #workaround-kdeinit4-crash: Mac-specific patch developed by Macports to circumvent some crashes. |
---|
54 | #default-kde4-xdg-menu-prefix: solves a conflict with a file from gnome-menus (see ticket #18914) |
---|
55 | #add-bundles-to-path: improve support for KIO slaves by adding a search path |
---|
56 | #kapplications-raster: ensures that kde applications start in raster (faster) mode, but also provides a switch for non-working applications |
---|
57 | #removeFindFlex: remove FindFlex.cmake which may hide the working one of cmake (ticket #44119) |
---|
58 | #cmake-modules-FindKDE4-Internal.cmake: Fixes zlib detection (see ticket #24128) |
---|
59 | #nativeDialogs: Use native mac dialogs (see https://reviewboard.kde.org/r/119243/) |
---|
60 | #KdePreferences: Handles menus to be closer to standard Mac layout (see https://reviewboard.kde.org/r/120149/) |
---|
61 | |
---|
62 | patchfiles workaround-kdeinit4-crash.patch \ |
---|
63 | default-kde4-xdg-menu-prefix.patch \ |
---|
64 | add-bundles-to-path.patch \ |
---|
65 | patch-kapplications-raster.diff \ |
---|
66 | patch-removeFindFlex.diff \ |
---|
67 | patch-cmake-modules-FindKDE4-Internal.cmake.diff \ |
---|
68 | patch-KdePreferences.diff |
---|
69 | #Deactivated as of ticket #45373 |
---|
70 | # patch-nativeDialogs.diff |
---|
71 | |
---|
72 | patch.pre_args -p1 |
---|
73 | |
---|
74 | # explicitly define certain headers and libraries, to avoid |
---|
75 | # conflicts with those installed into system paths by the user. |
---|
76 | configure.args-append -DWITH_ENCHANT=ON \ |
---|
77 | -DWITH_Soprano=ON \ |
---|
78 | -DWITH_Avahi=ON \ |
---|
79 | -DKDE_DEFAULT_HOME=Library/Preferences/KDE \ |
---|
80 | -DWITH_HSPELL=OFF \ |
---|
81 | -DWITH_FAM=OFF \ |
---|
82 | -DKDE4_AUTH_BACKEND_NAME="OSX" |
---|
83 | |
---|
84 | if { [file exists ${destroot}${prefix}/lib/kde4/kspell_aspell.so] } { |
---|
85 | notes " |
---|
86 | Only the English dictionary has been installed. |
---|
87 | You will need to install extra dictionaries to |
---|
88 | get support for spell checking other languages. |
---|
89 | The command 'port search aspell-dict' will show |
---|
90 | you the currently available dictionary options. |
---|
91 | " |
---|
92 | } |
---|
93 | |
---|
94 | set startup_root "" |
---|
95 | |
---|
96 | pre-configure { |
---|
97 | #The FindFlex.cmake file is not working and may conflict with the one provided by cmake (ticket #44119) |
---|
98 | delete file ${worksrcpath}/cmake/modules/FindFlex.cmake |
---|
99 | } |
---|
100 | |
---|
101 | pre-activate { |
---|
102 | if {![catch {set vers [lindex [registry_active kde4-runtime] 0]}] |
---|
103 | && [vercmp [lindex $vers 1] 4.8.1] < 0} { |
---|
104 | registry_deactivate_composite kde4-runtime "" [list ports_nodepcheck 1] |
---|
105 | } |
---|
106 | } |
---|
107 | |
---|
108 | post-destroot { |
---|
109 | xinstall -d ${destroot}${prefix}/include/nepomuk |
---|
110 | eval xinstall -m 644 [glob ${worksrcpath}/nepomuk/core/*.h] \ |
---|
111 | ${destroot}${prefix}/include/nepomuk |
---|
112 | eval xinstall -m 644 [glob ${worksrcpath}/nepomuk/types/*.h] \ |
---|
113 | ${destroot}${prefix}/include/nepomuk |
---|
114 | eval xinstall -m 644 [glob ${worksrcpath}/nepomuk/nepomuk_export.h] \ |
---|
115 | ${destroot}${prefix}/include/nepomuk |
---|
116 | |
---|
117 | xinstall -d -m 755 ${destroot}${prefix}/Library/LaunchAgents |
---|
118 | xinstall -m 644 ${filespath}/org.macports.kdecache.plist \ |
---|
119 | ${destroot}${prefix}/Library/LaunchAgents |
---|
120 | reinplace "s|%PREFIX%|${prefix}|g" \ |
---|
121 | ${destroot}${prefix}/Library/LaunchAgents/org.macports.kdecache.plist |
---|
122 | reinplace "s|%APPLICATIONS_DIR%|${applications_dir}|g" \ |
---|
123 | ${destroot}${prefix}/Library/LaunchAgents/org.macports.kdecache.plist |
---|
124 | |
---|
125 | # The startupitem.install keyword does not exist in MacPorts < 2.1. |
---|
126 | if {![info exists startupitem.install]} { |
---|
127 | set startupitem.install yes |
---|
128 | } |
---|
129 | if { ${startupitem.install} != "no" } { |
---|
130 | xinstall -d -m 755 ${destroot}${startup_root}/Library/LaunchAgents |
---|
131 | ln -s ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist ${destroot}${startup_root}/Library/LaunchAgents |
---|
132 | } |
---|
133 | } |
---|
134 | |
---|
135 | post-activate { |
---|
136 | if { ![variant_isset no_root] } { |
---|
137 | file attributes ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist -owner root -group wheel |
---|
138 | } |
---|
139 | } |
---|
140 | |
---|
141 | notes-append "An agent to provide communication between KDE programs must be started. |
---|
142 | To start it run the following command: |
---|
143 | launchctl load -w ${startup_root}/Library/LaunchAgents/org.macports.kdecache.plist" |
---|
144 | |
---|
145 | #patch-authBackends: make possible to use OS X keychain through kwallet (see https://git.reviewboard.kde.org/r/119838/, shipped) |
---|
146 | variant osxkeychain description {kwallet uses the OSX KeyChain} { |
---|
147 | configure.args-append -DMAC_USE_OSXKEYCHAIN:BOOL=ON |
---|
148 | } |
---|
149 | |
---|
150 | variant no_root description {Run the kde cache agent as MacPorts install user.} { |
---|
151 | pre-fetch { |
---|
152 | if { ${install.user}=="root" || ${install.group}=="wheel" } { |
---|
153 | ui_error "The kde cache agent should not be run as root with no_root variant." |
---|
154 | error "Please do not use this variant with your MacPorts configuration." |
---|
155 | } |
---|
156 | } |
---|
157 | |
---|
158 | set startup_root [join [lrange [exec /usr/bin/dscl . -read Users/${install.user} NFSHomeDirectory] 1 end]] |
---|
159 | # Files are installed into user's startup directory. |
---|
160 | destroot.violate_mtree yes |
---|
161 | } |
---|
162 | |
---|
163 | livecheck.url http://kde.mirrors.hoobly.com/stable/ |
---|
164 | livecheck.regex (\\d+(\\.\\d+)+) |
---|