aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2013-07-21 19:11:06 -0500
committerJack Nagel2013-07-22 11:25:12 -0500
commit9b30fc4afaec39d30d8b4c17529d10e8073fa9e3 (patch)
tree35203b90a03e913ace901f7ed21b9321b9f5af38 /Library/Homebrew
parent34623b4ef1ac360855e1e3e2d7217b21820ee63f (diff)
downloadbrew-9b30fc4afaec39d30d8b4c17529d10e8073fa9e3.tar.bz2
Map pkginfo versions to actual XQuartz versions
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/os/mac/xquartz.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/Library/Homebrew/os/mac/xquartz.rb b/Library/Homebrew/os/mac/xquartz.rb
index b1bd45d2c..418550aa8 100644
--- a/Library/Homebrew/os/mac/xquartz.rb
+++ b/Library/Homebrew/os/mac/xquartz.rb
@@ -3,6 +3,17 @@ module MacOS::XQuartz extend self
APPLE_BUNDLE_ID = "org.x.X11"
FORGE_PKG_ID = "org.macosforge.xquartz.pkg"
+ PKGINFO_VERSION_MAP = {
+ "2.6.34" => "2.6.3",
+ "2.7.4" => "2.7.0",
+ "2.7.14" => "2.7.1",
+ "2.7.28" => "2.7.2",
+ "2.7.32" => "2.7.3",
+ "2.7.43" => "2.7.4",
+ "2.7.50" => "2.7.5_rc1",
+ "2.7.51" => "2.7.5_rc2",
+ }.freeze
+
# This returns the version number of XQuartz, not of the upstream X.org.
# The X11.app distributed by Apple is also XQuartz, and therefore covered
# by this method.
@@ -47,10 +58,9 @@ module MacOS::XQuartz extend self
# Upstream XQuartz *does* have a pkg-info entry, so if we can't get it
# from mdls, we can try pkgutil. This is very slow.
- # NOTE: this sacrifices correctness, as it returns an internal version
- # that may not always match the "user-facing" version string.
def version_from_pkgutil
- MacOS.pkgutil_info(FORGE_PKG_ID)[/version: (\d\.\d\.\d).+$/, 1]
+ str = MacOS.pkgutil_info(FORGE_PKG_ID)[/version: (\d\.\d\.\d+)$/, 1]
+ PKGINFO_VERSION_MAP.fetch(str, str)
end
def provided_by_apple?