| 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 122038 2014-07-13 11:29:03Z nicos@macports.org $ |
|---|
| 3 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | PortGroup kde4 1.1 |
|---|
| 6 | |
|---|
| 7 | fetch.type git |
|---|
| 8 | #git.url git://anongit.kde.org/kdelibs |
|---|
| 9 | git.url /Users/bertin/cworks/new/KDE/kdelibs/kdelibs-git |
|---|
| 10 | #git.branch f040d08 |
|---|
| 11 | git.branch 9ed4f721 |
|---|
| 12 | |
|---|
| 13 | name kdelibs4 |
|---|
| 14 | version 4.14.1 |
|---|
| 15 | revision 20141008 |
|---|
| 16 | categories kde kde4 |
|---|
| 17 | maintainers nicos |
|---|
| 18 | license LGPL-2+ GPL-2+ BSD |
|---|
| 19 | description KDE4 core libraries, git/master |
|---|
| 20 | long_description Core libraries for KDE4 applications to function. \ |
|---|
| 21 | This port follows git/master |
|---|
| 22 | platforms darwin |
|---|
| 23 | homepage http://www.kde.org |
|---|
| 24 | master_sites kde:stable/${version}/src/ |
|---|
| 25 | use_xz yes |
|---|
| 26 | #distname kdelibs-${version} |
|---|
| 27 | |
|---|
| 28 | #checksums rmd160 8db76ec77ed09d180223fb3a37b38e8ca8798d75 \ |
|---|
| 29 | # sha256 d291b4bc159a3f686ad93ff3dfbe90a0a7e33600357e8390c84154ec050efc82 |
|---|
| 30 | |
|---|
| 31 | #No binary links to openssl libraries, apart from libkio.dylib at |
|---|
| 32 | #runtime if required. As libkio.dylib code is purely LGPL, there is no |
|---|
| 33 | #conflict with openssl license |
|---|
| 34 | license_noconflict openssl |
|---|
| 35 | |
|---|
| 36 | depends_build-append port:flex port:gmake port:docbook-xsl-ns |
|---|
| 37 | |
|---|
| 38 | depends_lib-append port:bzip2 port:zlib \ |
|---|
| 39 | port:soprano port:cyrus-sasl2 \ |
|---|
| 40 | port:strigi port:gettext \ |
|---|
| 41 | port:pcre port:shared-mime-info \ |
|---|
| 42 | lib:libgif:giflib port:tiff \ |
|---|
| 43 | port:jpeg port:libpng \ |
|---|
| 44 | port:jasper port:openexr \ |
|---|
| 45 | port:expat port:libart_lgpl \ |
|---|
| 46 | port:libidn port:libiconv \ |
|---|
| 47 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
|---|
| 48 | port:openssl port:enchant \ |
|---|
| 49 | port:aspell port:aspell-dict-en \ |
|---|
| 50 | port:attica port:xz \ |
|---|
| 51 | port:avahi port:qca \ |
|---|
| 52 | port:libxml2 port:libxslt \ |
|---|
| 53 | port:dbusmenu-qt port:docbook-xml \ |
|---|
| 54 | port:docbook-xsl port:grantlee \ |
|---|
| 55 | port:kerberos5 \ |
|---|
| 56 | port:shared-desktop-ontologies |
|---|
| 57 | |
|---|
| 58 | # the aspell dictionaries are just files |
|---|
| 59 | depends_skip_archcheck aspell-dict-en |
|---|
| 60 | |
|---|
| 61 | conflicts kdelibs3 |
|---|
| 62 | |
|---|
| 63 | #workaround-kdeinit4-crash: Mac-specific patch developed by Macports to circumvent some crashes. |
|---|
| 64 | #avoid-kwindowinfo-destructor: Prevent sending null pointer to CFRelease (see ticket #44258) |
|---|
| 65 | #default-kde4-xdg-menu-prefix: solves a conflict with a file from gnome-menus (see ticket #18914) |
|---|
| 66 | #add-bundles-to-path: improve support for KIO slaves by adding a search path |
|---|
| 67 | #kapplications-raster: ensures that kde applications start in raster (faster) mode, but also provides a switch for non-working applications |
|---|
| 68 | #removeFindFlex: remove FindFlex.cmake which may hide the working one of cmake (ticket #44119) |
|---|
| 69 | #patch-cmake-modules-FindKDE4-Internal.cmake: Fixes zlib detection (see ticket #24128) |
|---|
| 70 | #patch-cmake-modules-KDE4Macros.cmake: Ensures that compiled objects are properly detected during build (see ticket #43720) |
|---|
| 71 | |
|---|
| 72 | patchfiles workaround-kdeinit4-crash.patch \ |
|---|
| 73 | default-kde4-xdg-menu-prefix.patch \ |
|---|
| 74 | add-bundles-to-path.patch \ |
|---|
| 75 | patch-kapplications-raster.diff \ |
|---|
| 76 | patch-removeFindFlex.diff \ |
|---|
| 77 | patch-cmake-modules-FindKDE4-Internal.cmake.diff |
|---|
| 78 | |
|---|
| 79 | # RJVB |
|---|
| 80 | # fixCrashInKCrash.patch |
|---|
| 81 | patchfiles-append fixInvokeBrowser.patch \ |
|---|
| 82 | fixReportBug.patch \ |
|---|
| 83 | streamline-systray-menu.patch \ |
|---|
| 84 | correct-PreferencesAndSysTray-Menu.patch \ |
|---|
| 85 | nogui-patches.patch |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | variant nativefiledialogs description {File dialogs are native by default.\ |
|---|
| 89 | Set Native=false under [KFileDialog Settings] in kdeglobalrc to use KDE dialogs} {} |
|---|
| 90 | |
|---|
| 91 | if { [variant_isset nativefiledialogs] } { |
|---|
| 92 | patchfiles-append native-filedialogs.patch |
|---|
| 93 | } |
|---|
| 94 | |
|---|
| 95 | |
|---|
| 96 | variant unifiedtoolbar description {Add a unified title and tool bar} {} |
|---|
| 97 | |
|---|
| 98 | if { [variant_isset unifiedtoolbar] } { |
|---|
| 99 | patchfiles-append unified-toolbar.patch |
|---|
| 100 | } |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | patch.pre_args -p1 |
|---|
| 104 | |
|---|
| 105 | # explicitly define certain headers and libraries, to avoid |
|---|
| 106 | # conflicts with those installed into system paths by the user. |
|---|
| 107 | configure.args-append -DWITH_ENCHANT=ON \ |
|---|
| 108 | -DWITH_Soprano=ON \ |
|---|
| 109 | -DWITH_Avahi=ON \ |
|---|
| 110 | -DKDE_DEFAULT_HOME=Library/Preferences/KDE \ |
|---|
| 111 | -DWITH_HSPELL=OFF \ |
|---|
| 112 | -DWITH_FAM=OFF \ |
|---|
| 113 | -DKDE4_AUTH_BACKEND_NAME="OSX" |
|---|
| 114 | |
|---|
| 115 | variant osxkeychain description {kwallet uses the OSX KeyChain} {} |
|---|
| 116 | |
|---|
| 117 | if { [variant_isset osxkeychain] } { |
|---|
| 118 | configure.args-append -DMAC_USE_OSXKEYCHAIN:BOOL=ON |
|---|
| 119 | # mods committed on 20140902 |
|---|
| 120 | # patchfiles-append AuthServicesBackend.patch \ |
|---|
| 121 | # use-osx-keychain.patch \ |
|---|
| 122 | # kwallettest.patch |
|---|
| 123 | } |
|---|
| 124 | |
|---|
| 125 | variant nostrip description {Prevent stripping of binaries} {} |
|---|
| 126 | |
|---|
| 127 | if { [variant_isset nostrip] } { |
|---|
| 128 | configure.args-delete -DCMAKE_BUILD_TYPE=Release |
|---|
| 129 | configure.args-append -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_STRIP:FILEPATH=/bin/echo |
|---|
| 130 | } |
|---|
| 131 | |
|---|
| 132 | if { [file exists ${destroot}${prefix}/lib/kde4/kspell_aspell.so] } { |
|---|
| 133 | notes " |
|---|
| 134 | Only the English dictionary has been installed. |
|---|
| 135 | You will need to install extra dictionaries to |
|---|
| 136 | get support for spell checking other languages. |
|---|
| 137 | The command 'port search aspell-dict' will show |
|---|
| 138 | you the currently available dictionary options. |
|---|
| 139 | " |
|---|
| 140 | } |
|---|
| 141 | |
|---|
| 142 | set startup_root "" |
|---|
| 143 | |
|---|
| 144 | pre-configure { |
|---|
| 145 | #The FindFlex.cmake file is not working and may conflict with the one provided by cmake (ticket #44119) |
|---|
| 146 | delete file ${worksrcpath}/cmake/modules/FindFlex.cmake |
|---|
| 147 | } |
|---|
| 148 | |
|---|
| 149 | pre-activate { |
|---|
| 150 | if {![catch {set vers [lindex [registry_active kde4-runtime] 0]}] |
|---|
| 151 | && [vercmp [lindex $vers 1] 4.8.1] < 0} { |
|---|
| 152 | registry_deactivate_composite kde4-runtime "" [list ports_nodepcheck 1] |
|---|
| 153 | } |
|---|
| 154 | } |
|---|
| 155 | |
|---|
| 156 | post-destroot { |
|---|
| 157 | xinstall -d ${destroot}${prefix}/include/nepomuk |
|---|
| 158 | eval xinstall -m 644 [glob ${worksrcpath}/nepomuk/core/*.h] \ |
|---|
| 159 | ${destroot}${prefix}/include/nepomuk |
|---|
| 160 | eval xinstall -m 644 [glob ${worksrcpath}/nepomuk/types/*.h] \ |
|---|
| 161 | ${destroot}${prefix}/include/nepomuk |
|---|
| 162 | eval xinstall -m 644 [glob ${worksrcpath}/nepomuk/nepomuk_export.h] \ |
|---|
| 163 | ${destroot}${prefix}/include/nepomuk |
|---|
| 164 | |
|---|
| 165 | xinstall -d -m 755 ${destroot}${prefix}/Library/LaunchAgents |
|---|
| 166 | xinstall -m 644 ${filespath}/org.macports.kdecache.plist \ |
|---|
| 167 | ${destroot}${prefix}/Library/LaunchAgents |
|---|
| 168 | reinplace "s|%PREFIX%|${prefix}|g" \ |
|---|
| 169 | ${destroot}${prefix}/Library/LaunchAgents/org.macports.kdecache.plist |
|---|
| 170 | reinplace "s|%APPLICATIONS_DIR%|${applications_dir}|g" \ |
|---|
| 171 | ${destroot}${prefix}/Library/LaunchAgents/org.macports.kdecache.plist |
|---|
| 172 | |
|---|
| 173 | # The startupitem.install keyword does not exist in MacPorts < 2.1. |
|---|
| 174 | if {![info exists startupitem.install]} { |
|---|
| 175 | set startupitem.install yes |
|---|
| 176 | } |
|---|
| 177 | if { ${startupitem.install} != "no" } { |
|---|
| 178 | xinstall -d -m 755 ${destroot}${startup_root}/Library/LaunchAgents |
|---|
| 179 | ln -s ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist ${destroot}${startup_root}/Library/LaunchAgents |
|---|
| 180 | } |
|---|
| 181 | } |
|---|
| 182 | |
|---|
| 183 | post-activate { |
|---|
| 184 | if { ![variant_isset no_root] } { |
|---|
| 185 | file attributes ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist -owner root -group wheel |
|---|
| 186 | } |
|---|
| 187 | } |
|---|
| 188 | |
|---|
| 189 | notes-append "An agent to provide communication between KDE programs must be started. |
|---|
| 190 | To start it run the following command: |
|---|
| 191 | launchctl load -w ${startup_root}/Library/LaunchAgents/org.macports.kdecache.plist" |
|---|
| 192 | |
|---|
| 193 | variant no_root description {Run the kde cache agent as MacPorts install user.} { |
|---|
| 194 | pre-fetch { |
|---|
| 195 | if { ${install.user}=="root" || ${install.group}=="wheel" } { |
|---|
| 196 | ui_error "The kde cache agent should not be run as root with no_root variant." |
|---|
| 197 | error "Please do not use this variant with your MacPorts configuration." |
|---|
| 198 | } |
|---|
| 199 | } |
|---|
| 200 | |
|---|
| 201 | set startup_root [join [lrange [exec /usr/bin/dscl . -read Users/${install.user} NFSHomeDirectory] 1 end]] |
|---|
| 202 | # Files are installed into user's startup directory. |
|---|
| 203 | destroot.violate_mtree yes |
|---|
| 204 | } |
|---|
| 205 | |
|---|
| 206 | #livecheck.url http://kde.mirrors.hoobly.com/stable/ |
|---|
| 207 | #livecheck.regex (\\d+(\\.\\d+)+) |
|---|