source: trunk/dports/kde/kdelibs4/Portfile

Last change on this file was 148894, checked in by mcalhoun@…, 14 months ago

openexr, ilmbase: update version to 2.2.0
revbump dependencies since library name changes
homepage states that new features "should be available to applications without code modifications"
merge openexr and ilmbase into one Portfile since versions now seem linked
fixes #44620, #44619, #49965, and #49966; maintainer timeout

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.9 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 148894 2016-05-22 14:26:15Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           kde4   1.1
6
7name                kdelibs4
8version             4.14.3
9revision            4
10categories          kde kde4
11maintainers         nicos
12license             LGPL-2+ GPL-2+ BSD
13description         KDE4 core libraries
14long_description    Core libraries for KDE4 applications to function
15platforms           darwin
16homepage            http://www.kde.org
17master_sites        kde:stable/${version}/src/
18use_xz              yes
19distname            kdelibs-${version}
20
21checksums           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
27license_noconflict  openssl
28
29depends_build-append port:flex port:gmake port:docbook-xsl-ns
30
31depends_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
51depends_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
62patchfiles           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
72patch.pre_args      -p1
73
74# explicitly define certain headers and libraries, to avoid
75# conflicts with those installed into system paths by the user.
76configure.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
84if { [file exists ${destroot}${prefix}/lib/kde4/kspell_aspell.so] } {
85    notes "
86Only the English dictionary has been installed.
87You will need to install extra dictionaries to
88get support for spell checking other languages.
89The command 'port search aspell-dict' will show
90you the currently available dictionary options.
91"
92}
93
94set startup_root ""
95
96pre-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
101pre-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
108post-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
135post-activate {
136    if { ![variant_isset no_root] } {
137        file attributes ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist -owner root -group wheel
138    }
139}
140
141notes-append "An agent to provide communication between KDE programs must be started.
142To 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)
146variant osxkeychain description {kwallet uses the OSX KeyChain} {
147    configure.args-append   -DMAC_USE_OSXKEYCHAIN:BOOL=ON
148}
149
150variant 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
163livecheck.url       http://kde.mirrors.hoobly.com/stable/
164livecheck.regex     (\\d+(\\.\\d+)+)
Note: See TracBrowser for help on using the repository browser.