source: trunk/dports/kde/kdelibs4/Portfile @ 139229

Last change on this file since 139229 was 139229, checked in by jeremyhu@…, 4 years ago

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

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