[91597] trunk/dports/x11/xinit
jeremyhu at macports.org
jeremyhu at macports.org
Fri Apr 6 10:24:08 PDT 2012
Revision: 91597
https://trac.macports.org/changeset/91597
Author: jeremyhu at macports.org
Date: 2012-04-06 10:24:08 -0700 (Fri, 06 Apr 2012)
Log Message:
-----------
xinit: Provide instructions for setting up the LaunchAgent, and make it disabled by default. Also unload the LaunchDaemon on deactivate.
Modified Paths:
--------------
trunk/dports/x11/xinit/Portfile
Added Paths:
-----------
trunk/dports/x11/xinit/files/disable-launchagent.patch
Modified: trunk/dports/x11/xinit/Portfile
===================================================================
--- trunk/dports/x11/xinit/Portfile 2012-04-06 17:24:00 UTC (rev 91596)
+++ trunk/dports/x11/xinit/Portfile 2012-04-06 17:24:08 UTC (rev 91597)
@@ -4,7 +4,7 @@
name xinit
version 1.3.2
-revision 1
+revision 2
categories x11
platforms darwin
maintainers jeremyhu openmaintainer
@@ -34,6 +34,7 @@
depends_lib port:xorg-libX11
patchfiles \
+ disable-launchagent.patch \
0001-launchd-privileged_startx-Improved-error-resolution.patch
patch.pre_args -p1
@@ -42,23 +43,48 @@
configure.args-append RAWCPP=${configure.cpp}
post-destroot {
- # OS X 10.6.3 was the first version whose native X11 allowed the modern socket naming
- # for better X11 server coexistence, so we require it for installing the LaunchAgent
- if {${os.platform} == "darwin" && [vercmp ${os.version} 10.3.0] < 0} {
- file delete -force ${destroot}/Library/LaunchAgents/org.macports.startx.plist
- }
+ xinstall -d ${destroot}${prefix}/lib/X11/xinit/xinitrc.d
+ eval xinstall -m 755 [glob ${filespath}/xinitrc.d/*.sh] ${destroot}${prefix}/lib/X11/xinit/xinitrc.d
+ xinstall -m 755 ${filespath}/font_cache.sh ${destroot}${prefix}/bin/font_cache
- xinstall -d ${destroot}${prefix}/lib/X11/xinit/xinitrc.d
- eval xinstall -m 755 [glob ${filespath}/xinitrc.d/*.sh] ${destroot}${prefix}/lib/X11/xinit/xinitrc.d
- xinstall -m 755 ${filespath}/font_cache.sh ${destroot}${prefix}/bin/font_cache
+ eval reinplace "s|__PREFIX__|${prefix}|g" \
+ [glob ${destroot}${prefix}/lib/X11/xinit/xinitrc.d/*.sh] \
+ ${destroot}${prefix}/bin/font_cache
+}
- eval reinplace "s|__PREFIX__|${prefix}|g" \
- [glob ${destroot}${prefix}/lib/X11/xinit/xinitrc.d/*.sh] \
- ${destroot}${prefix}/bin/font_cache
+platform darwin {
+ post-activate {
+ system "launchctl load /Library/LaunchDaemons/org.macports.privileged_startx.plist"
+
+ ui_msg "###############################################################################"
+ ui_msg "# To choose MacPorts' X11 as the default server, you must install xorg-server,"
+ ui_msg "# load the LaunchAgent, logout, and log back in. To load the LaunchAgent,"
+ ui_msg "# please execute the following:"
+
+ if { ${os.major} < 10 } {
+ ui_msg "# sudo launchctl load -w /Library/LaunchAgents/org.macports.startx.plist"
+ ui_msg "# "
+ ui_msg "# This will be required after every upgrade of the xinit port on Leopard"
+ } else {
+ ui_msg "# launchctl load -w /Library/LaunchAgents/org.macports.startx.plist"
+ ui_msg "# "
+ ui_msg "# This will be remembered across port updates on Snow Leopard and later."
+ }
+
+ # OS X 10.6.3 was the first version whose native X11 allowed the modern socket naming
+ # for better X11 server coexistence, so we require it for installing the LaunchAgent
+ if {[vercmp ${os.version} 10.3.0] < 0} {
+ ui_msg "# "
+ ui_msg "# Note that doing so on your OS version may make the Apple-provided version"
+ ui_msg "# fail to launch."
+ }
+
+ ui_msg "###############################################################################"
+ }
}
-post-activate {
- system "launchctl load -w /Library/LaunchDaemons/org.macports.privileged_startx.plist"
+pre-deactivate {
+ system "launchctl unload /Library/LaunchDaemons/org.macports.privileged_startx.plist"
}
install.asroot yes
Added: trunk/dports/x11/xinit/files/disable-launchagent.patch
===================================================================
--- trunk/dports/x11/xinit/files/disable-launchagent.patch (rev 0)
+++ trunk/dports/x11/xinit/files/disable-launchagent.patch 2012-04-06 17:24:08 UTC (rev 91597)
@@ -0,0 +1,10 @@
+--- xinit-1.3.2/launchd/user_startx/startx.plist.cpp.orig 2012-04-06 09:55:56.000000000 -0700
++++ xinit-1.3.2/launchd/user_startx/startx.plist.cpp 2012-04-06 09:55:31.000000000 -0700
+@@ -25,5 +25,7 @@
+ <true/>
+ <key>EnableTransactions</key>
+ <true/>
++ <key>Disabled</key>
++ <true/>
+ </dict>
+ </plist>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120406/5b826071/attachment-0001.html>
More information about the macports-changes
mailing list