Ticket #52257: dbus.diff
File dbus.diff, 7.6 KB (added by RJVB (René Bertin), 8 years ago) |
---|
-
devel/dbus/Portfile
old new 7 7 name dbus 8 8 conflicts dbus-devel 9 9 version 1.10.8 10 revision 1 10 11 maintainers mcalhoun openmaintainer 11 12 categories devel 12 13 platforms darwin … … 27 28 # poll is always broken 28 29 # see https://trac.macports.org/ticket/47741#comment:12 for EXTERNAL authentication 29 30 patchfiles patch-bus-system.conf.in.diff \ 30 patch-configure.diff 31 32 depends_build \ 33 port:pkgconfig 31 patch-improve-systembus.diff \ 32 patch-autogen.sh \ 33 patch-enable-standard-launch2.diff 34 35 depends_build \ 36 port:pkgconfig \ 37 port:autoconf \ 38 port:automake \ 39 port:libtool 34 40 35 41 unset -nocomplain startup_root 36 42 if { [variant_isset no_root] } { … … 71 77 set startup_root "" 72 78 } 73 79 } 74 add_users 80 add_users ${dbus_user} group=${dbus_group} realname=Message\ Bus 75 81 76 82 depends_lib port:expat 77 83 84 configure.cmd ./autogen.sh 85 78 86 configure.args --disable-doxygen-docs \ 79 87 --disable-xml-docs \ 80 88 --disable-ducktype-docs \ 81 89 --without-x \ 82 90 --enable-launchd \ 83 91 --with-launchd-agent-dir=${prefix}/Library/LaunchAgents \ 92 --with-launchd-daemon-dir=${prefix}/Library/LaunchDaemons \ 93 --with-session-socket-dir=/tmp \ 84 94 --with-dbus-user=${dbus_user} \ 85 --disable-tests 95 --disable-tests \ 96 --disable-maintainer-mode \ 97 --disable-dependency-tracking \ 98 --disable-verbose-mode \ 99 --disable-asserts 86 100 87 101 set sudo "" 88 102 if {![variant_isset no_root]} { 89 103 set sudo "sudo " 90 104 } 91 105 106 variant x11 description {Build with support for X11 (*experimental* on OS X!), \ 107 for running a session dbus when working on a remote X11 display} { 108 # we *can* enable X11 autolaunch, but I have some doubts that's a good idea on OS X 109 configure.args-replace \ 110 --without-x --with-x 111 depends_lib-append \ 112 port:xorg-libsm port:xorg-libX11 113 # patchfiles-append \ 114 # patch-enable-standard-launch.diff 115 } 116 117 # the variant for building the documentation is not called 'docs' to avoid propagating 118 # the docs variant to doxygen, which causes a dependency explosion 119 variant documentation description {Build the (doxygen) documentation} { 120 configure.args-replace \ 121 --disable-doxygen-docs --enable-doxygen-docs 122 # this is a hack to avoid installing port:doxygen+universal 123 if {![file exists ${prefix}/bin/doxygen]} { 124 depends_build-append \ 125 port:doxygen 126 } 127 } 128 92 129 # These variants are obsolete 93 130 # dbus should respect the global variable startupitem.install set in ${prefix}/etc/macports/macports.conf 94 131 # See https://guide.macports.org/#reference.startupitems … … 125 162 } 126 163 127 164 post-patch { 165 # moved from patch-configure.diff: 166 reinplace "s|broken_poll=\"no (cross compiling)\"|broken_poll=yes|g" ${worksrcpath}/configure.ac 167 reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/dbus/dbus-sysdeps-util-unix.c 168 128 169 if { [tbool startupitem.create] } { 129 170 # Disable if installed into startup directory. 130 171 reinplace "s|</array>|</array>\\\n\\\n\\\t<key>Disabled</key>\\\n\\\t<true/>|" \ … … 167 208 } 168 209 169 210 post-destroot { 170 # Simplify startup script over startupitem.install. 171 # See #15081 172 xinstall -d -m 0755 ${destroot}${plistDir} 173 set plist [open "${destroot}${plistFl}" w 0644] 174 175 puts ${plist} "<?xml version='1.0' encoding='UTF-8'?>" 176 puts ${plist} "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"" 177 puts ${plist} "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\" >" 178 puts ${plist} "<plist version='1.0'>" 179 puts ${plist} "<dict>" 180 181 puts ${plist} "<key>Label</key><string>org.freedesktop.dbus-system</string>" 182 183 puts ${plist} "<key>ProgramArguments</key>" 184 puts ${plist} "<array>" 185 puts ${plist} "\t<string>${prefix}/bin/dbus-daemon</string>" 186 puts ${plist} "\t<string>--system</string>" 187 puts ${plist} "\t<string>--nofork</string>" 188 puts ${plist} "</array>" 189 if {$macosx_deployment_target eq "10.4"} { 190 puts ${plist} "<key>OnDemand</key><false/>" 191 } else { 192 puts ${plist} "<key>KeepAlive</key><true/>" 193 } 194 195 if { [tbool startupitem.install] } { 196 puts ${plist} "<key>Disabled</key><true/>" 197 } 198 199 puts ${plist} "</dict>" 200 puts ${plist} "</plist>" 201 202 close ${plist} 211 # # Simplify startup script over startupitem.install. 212 # # See #15081 213 # handled through configure/build/install; see patch-improve-systembus.diff 203 214 204 215 if { [info exists startup_root] } { 205 216 xinstall -d -m 0755 ${destroot}${startup_root}/Library/LaunchDaemons … … 220 231 221 232 post-activate { 222 233 file attributes ${prefix}/var/run/dbus -group ${dbus_group} -owner ${dbus_user} 234 file attributes ${prefix}/libexec/dbus-daemon-launch-helper -owner root 223 235 file attributes ${prefix}/libexec/dbus-daemon-launch-helper -group ${dbus_group} 236 system "chmod u+s ${prefix}/libexec/dbus-daemon-launch-helper" 224 237 225 238 if { [tbool startupitem.install] && ![variant_isset no_root] } { 226 239 file attributes ${prefix}/Library/LaunchAgents/org.freedesktop.dbus-session.plist -owner root -group wheel … … 241 254 ui_warn "This variant requires circular dependencies and only works if ${name} is already installed" 242 255 243 256 configure.args-replace --disable-tests --enable-tests 244 configure.args-append --without-dbus-glib 245 depends_build-append port:glib2 246 depends_build-append port:python27 port:dbus-python27 port:py27-gobject port:dbus-python 257 # configure.args-append --without-dbus-glib 258 configure.args-append --enable-modular-tests \ 259 --with-test-socket-dir=/tmp 260 depends_build-append port:glib2 261 depends_build-append port:python27 port:dbus-python27 port:py27-gobject port:py27-gobject3 port:dbus-python 247 262 configure.python ${prefix}/bin/python2.7 248 263 } 249 264 … … 268 283 ############################################################################" 269 284 } 270 285 286 # obsolete advice, but keep for reference: 287 # - Add a line to /etc/sudoers (using the visudo Terminal command): 288 # Defaults env_keep += \"DBUS_LAUNCHD_SESSION_BUS_SOCKET\" 289 271 290 variant no_root conflicts underscore description {Run the DBUS daemon as MacPorts install user.} { 272 291 pre-fetch { 273 292 ########### … … 277 296 # add_users root trashes the root user in the extract phase. See 278 297 # #45737. 279 298 if {${install.user} eq "root" || ${install.group} eq "wheel"} { 280 ui_error "The DBUS daemon should not be run as root ."299 ui_error "The DBUS daemon should not be run as root (${install.user} ${install.group})." 281 300 error "Please do not use this variant with your MacPorts configuration." 282 301 } 283 302 } … … 293 312 # This variant allows the user to follow that convention. 294 313 } 295 314 315 configure.optflags-append -g 316 configure.ldflags-append -g 317 configure.env-append LDFLAGS=-g STRIP=/bin/echo 318 build.env-append STRIP=/bin/echo 319 296 320 set cross_opts "ac_cv_have_abstract_sockets=no" 297 321 if {${os.arch} eq "i386"} { 298 322 if { ${os.major} >= 10 } {