From 12f895ec8f09190844236df07e58ad894d428217 Mon Sep 17 00:00:00 2001 From: Cecil Date: Tue, 28 May 2019 12:32:06 -0600 Subject: [PATCH] for #443 Allow gem building with OSX xcode in non-standard paths --- CHANGELOG | 20 ++++++++++++++++---- lib/shoes/setup.rb | 2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 433fbb3b..4e5d7c30 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,20 +7,32 @@ We have interesting ideas of we what we do with Shoes that may be difficult to immplememt in Shoes 4. --------------- Shoes 3.3.9 ------------------------------ +-------------- Shoes 3.3.8 ------------------------------ === New with 3.3.8 - * Ruby 2.4.5(6) Gems 3.03 + * Ruby 2.4.5, Gems 3.03 + * Windows 64 bit. * Updated versions of Gems (byebug, nokogiri, etc) + * User written layout class. === Fixed with 3.3.8 * osx: improved building of gems if user has homebrew. + https://github.com/shoes/shoes3/issues/438 + https://github.com/shoes/shoes3/issues/443 + * menu bug affected window resizing. + https://github.com/shoes/shoes3/issues/430 + * some little unseen bugs + * A bad file or a folder name would crash font() call. + https://github.com/shoes/shoes3/issues/441 === Developer Issues with 3.3.8 - * Better cross building of gems (Windows from Linux) + * Better cross building of gems (Windows gems from Linux) * Ruby 2.4+ compatible. Tested with 2.5.5 * Support for 64 bit on Windows 10 - * Can build Shoes for native windows api. Not working. + * Can build Shoes for native windows api. Not working well enough but + it loads fast! + * better integration for gtk3.22 and beyond. + * better building on Windows for Windows. -------------- Shoes 3.3.7 ------------------------------ diff --git a/lib/shoes/setup.rb b/lib/shoes/setup.rb index 41af0acd..888b7ae1 100644 --- a/lib/shoes/setup.rb +++ b/lib/shoes/setup.rb @@ -17,10 +17,12 @@ class << Gem::Ext::ExtConfBuilder alias_method :make__, :make def make(dest_path, results) raise unless File.exist?('Makefile') + xpath = `xcode-select -p`.chomp # xcode doesn't have to be in Applications/Xcode mf = File.read('Makefile') mf = mf.gsub(/^V\ =\ 0/, "V = 1") mf = mf.gsub(/^ARCH_FLAG =/, "ARCH_FLAG = #{RbConfig::CONFIG['ARCH_FLAG']}") mf = mf.gsub(/MacOSX10\.\d+\.sdk/, 'MacOSX.sdk') + mf = mf.gsub("/Applications/Xcode.app/Contents/Developer", xpath) #mf = mf.gsub(/^INSTALL\s*=\s*.*$/, "INSTALL = $(RUBY) -run -e install -- -vp") #mf = mf.gsub(/^INSTALL_PROG\s*=\s*.*$/, "INSTALL_PROG = $(INSTALL) -m 0755") #mf = mf.gsub(/^INSTALL_DATA\s*=\s*.*$/, "INSTALL_DATA = $(INSTALL) -m 0644")