diff --git a/build/osx/LWFS/.a/start-remote.sh b/build/osx/LWFS/.a/start-remote.sh index d71c8d5..f79e28b 100755 --- a/build/osx/LWFS/.a/start-remote.sh +++ b/build/osx/LWFS/.a/start-remote.sh @@ -3,7 +3,7 @@ BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # ruby environment -RBH="$BASE/ruby23" +RBH=$(echo "$BASE"/ruby*) export PATH="$RBH/bin:/usr/bin:/bin:/usr/sbin:/sbin" if [ -n "$DYLD_LIBRARY_PATH" ]; then export DYLD_LIBRARY_PATH="$RBH/lib:$DYLD_LIBRARY_PATH" @@ -11,9 +11,9 @@ else export DYLD_LIBRARY_PATH="$RBH/lib" fi export RUBYOPT='-Ku' -export RUBYLIB="$RBH/lib/ruby/2.3.0:$RBH/lib/ruby/2.3.0/i386-darwin10.8.0" -export GEM_HOME="$RBH/lib/ruby/gems/2.3.0" -export GEM_PATH="$RBH/lib/ruby/gems/2.3.0:$RBH/lib/ruby/2.3.0" +export RUBYLIB="$RBH/lib/ruby/2.7.0:$RBH/lib/ruby/2.7.0/x86_64-darwin15" +export GEM_HOME="$RBH/lib/ruby/gems/2.7.0" +export GEM_PATH="$RBH/lib/ruby/gems/2.7.0:$RBH/lib/ruby/2.7.0" unset IRBRC unset MAGLEV_HOME unset RBXOPT diff --git a/build/osx/LWFS/.a/start.sh b/build/osx/LWFS/.a/start.sh index 5dd34be..6a10479 100755 --- a/build/osx/LWFS/.a/start.sh +++ b/build/osx/LWFS/.a/start.sh @@ -3,7 +3,7 @@ BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # ruby environment -RBH="$BASE/ruby23" +RBH=$(echo "$BASE"/ruby*) export PATH="$RBH/bin:/usr/bin:/bin:/usr/sbin:/sbin" if [ -n "$DYLD_LIBRARY_PATH" ]; then export DYLD_LIBRARY_PATH="$RBH/lib:$DYLD_LIBRARY_PATH" @@ -11,9 +11,9 @@ else export DYLD_LIBRARY_PATH="$RBH/lib" fi export RUBYOPT='-Ku' -export RUBYLIB="$RBH/lib/ruby/2.3.0:$RBH/lib/ruby/2.3.0/i386-darwin10.8.0" -export GEM_HOME="$RBH/lib/ruby/gems/2.3.0" -export GEM_PATH="$RBH/lib/ruby/gems/2.3.0:$RBH/lib/ruby/2.3.0" +export RUBYLIB="$RBH/lib/ruby/2.7.0:$RBH/lib/ruby/2.7.0/x86_64-darwin15" +export GEM_HOME="$RBH/lib/ruby/gems/2.7.0" +export GEM_PATH="$RBH/lib/ruby/gems/2.7.0:$RBH/lib/ruby/2.7.0" unset IRBRC unset MAGLEV_HOME unset RBXOPT diff --git a/build/osx/Makefile b/build/osx/Makefile index 7632cf5..22685a6 100644 --- a/build/osx/Makefile +++ b/build/osx/Makefile @@ -2,7 +2,7 @@ build: testtag clean mkdir -p tmp/LWFS cp -a LWFS tmp/LWFS/LWFS cp -a README*.txt *.app fix-file-permissions tmp/LWFS - unzip -q ruby23.zip -d tmp/LWFS/LWFS/.a + unzip -q ruby27.zip -d tmp/LWFS/LWFS/.a mkdir -p tmp/LWFS/LWFS/.a/lwfs cp -a ../../{lib,lwfs.rb,lwfs.ru,lwfs.conf,tmpl} tmp/LWFS/LWFS/.a/lwfs find tmp/LWFS -name '.git*' -print0 | xargs -0 rm -rf diff --git a/build/osx/ruby23.zip b/build/osx/ruby27.zip similarity index 50% rename from build/osx/ruby23.zip rename to build/osx/ruby27.zip index 0cfd3ed..de20b14 100644 Binary files a/build/osx/ruby23.zip and b/build/osx/ruby27.zip differ diff --git a/build/osx/runtime/Makefile b/build/osx/runtime/Makefile index 9b0954f..1adda94 100644 --- a/build/osx/runtime/Makefile +++ b/build/osx/runtime/Makefile @@ -1,57 +1,70 @@ # -*- mode: makefile-gmake; -*- -RUBY=https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.bz2 -LIBJPEG=http://www.ijg.org/files/jpegsrc.v9b.tar.gz -LIBPNG=http://prdownloads.sourceforge.net/libpng/libpng-1.2.57.tar.gz +RUBY=https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.1.tar.bz2 +GETTEXT=https://ftp.gnu.org/pub/gnu/gettext/gettext-0.20.2.tar.gz +LIBJPEG=http://www.ijg.org/files/jpegsrc.v9d.tar.gz +LIBPNG=http://prdownloads.sourceforge.net/libpng/libpng-1.2.59.tar.gz ZLIB=http://zlib.net/zlib-1.2.11.tar.gz -LIBICONV=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz -LIBXML2=http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz -LIBYAML=https://github.com/yaml/libyaml/archive/0.1.7.tar.gz -GDBM=ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.13.tar.gz -GMP=https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2 -#OPENSSL=https://www.openssl.org/source/openssl-1.0.2l.tar.gz -RSYNC=http://rsync.samba.org/ftp/rsync/src/rsync-3.1.2.tar.gz +LIBICONV=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz +LIBLZMA=https://tukaani.org/xz/xz-5.2.5.tar.gz +LIBXML2=http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz +YAML=http://pyyaml.org/download/libyaml/yaml-0.2.4.tar.gz +GDBM=https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz +GMP=https://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.bz2 +OPENSSL=https://www.openssl.org/source/openssl-1.1.1g.tar.gz +RSYNC=http://rsync.samba.org/ftp/rsync/src/rsync-3.1.3.tar.gz WGET=wget --no-check-certificate default: @echo 'make [ all | ruby | gems | cleanall | clean | updateruby | rsync ]' -#all: cleanall download zlib libpng libjpeg libiconv libxml2 libyaml gmp gdbm openssl ruby gems rsync -all: cleanall download zlib libpng libjpeg libiconv libxml2 libyaml gmp gdbm ruby gems rsync +all: checksdk cleanall download gettext zlib libpng libjpeg libiconv liblzma libxml2 yaml gmp gdbm openssl ruby gems rsync checkso + +checksdk: + @source _bashrc; if [ ! -d $$SDKROOT ]; then echo "cannot find $$SDKROOT"; exit 1; fi download: if [ ! -d dl ]; then mkdir dl; fi cd dl; if [ ! -f `basename $(RUBY)` ]; then $(WGET) $(RUBY); fi + cd dl; if [ ! -f `basename $(GETTEXT)` ]; then $(WGET) $(GETTEXT); fi cd dl; if [ ! -f `basename $(LIBJPEG)` ]; then $(WGET) $(LIBJPEG); fi cd dl; if [ ! -f `basename $(LIBPNG)` ]; then $(WGET) $(LIBPNG); fi cd dl; if [ ! -f `basename $(ZLIB)` ]; then $(WGET) $(ZLIB); fi cd dl; if [ ! -f `basename $(LIBICONV)` ]; then $(WGET) $(LIBICONV); fi + cd dl; if [ ! -f `basename $(LIBLZMA)` ]; then $(WGET) $(LIBLZMA); fi cd dl; if [ ! -f `basename $(LIBXML2)` ]; then $(WGET) $(LIBXML2); fi - cd dl; if [ ! -f `basename $(LIBYAML)` ]; then $(WGET) $(LIBYAML); mv `basename $(LIBYAML)` libyaml-`basename $(LIBYAML)`; fi + cd dl; if [ ! -f `basename $(YAML)` ]; then $(WGET) $(YAML); fi cd dl; if [ ! -f `basename $(GMP)` ]; then $(WGET) $(GMP); fi cd dl; if [ ! -f `basename $(GDBM)` ]; then $(WGET) $(GDBM); fi -# cd dl; if [ ! -f `basename $(OPENSSL)` ]; then $(WGET) $(OPENSSL); fi + cd dl; if [ ! -f `basename $(OPENSSL)` ]; then $(WGET) $(OPENSSL); fi cd dl; if [ ! -f `basename $(RSYNC)` ]; then $(WGET) $(RSYNC); fi checkso: - (otool -L `find /usr/local/ruby23/bin -type f -name ruby`; find /usr/local/ruby23 -name '*.bundle' | xargs otool -L) | grep ' ' | sort | uniq + (otool -L `find /usr/local/ruby27/bin -type f -name ruby`; find /usr/local/ruby27 -name '*.bundle' | xargs otool -L) | grep ' ' | sort | uniq ruby: tar xjf dl/ruby-*.tar.bz2 - bash -c 'source _bashrc; cd ruby-*; ./configure --prefix=/usr/local/ruby23 --target=i386-apple-darwin10.8.0 --disable-install-doc; make' + bash -c 'source _bashrc; cd ruby-*; ./configure --prefix=/usr/local/ruby27 --target=x86_64-apple-darwin15 --disable-install-doc --with-openssl-dir=`echo ../openssl-*`; make' sudo bash -c 'source _bashrc; cd ruby-*; make install' gems: - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri httpclient -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri rb-fsevent -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri sinatra -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri thin -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri uuidtools -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri ../../../vendor/cache/ruby-lzma-*[0-9].gem -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri ../../../vendor/cache/libxml-ruby-*[0-9].gem -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri ../../../lib/swf2lwf/gems/rb-img-*[0-9].gem -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' - sudo bash -c 'source _bashrc; gem install --no-rdoc --no-ri ../../../lib/swf2lwf/gems/actioncompiler-*[0-9].gem -- --with-cflags=\"$$CFLAGS\" --with-ldflags=\"$$LDFLAGS\"' + sudo bash -c 'source _bashrc; gem install --no-document httpclient -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document rb-fsevent -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document sinatra -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document thin -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document uuidtools -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document ../../../vendor/cache/ruby-lzma-*[0-9].gem -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document ../../../vendor/cache/libxml-ruby-*[0-9].gem -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document ../../../lib/swf2lwf/gems/rb-img-*[0-9].gem -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + sudo bash -c 'source _bashrc; gem install --no-document ../../../lib/swf2lwf/gems/actioncompiler-*[0-9].gem -- --with-cflags="$$CFLAGS" --with-ldflags="$$LDFLAGS"' + +gettext: + tar xzf dl/gettext-0.20.2.tar.gz + source _bashrc; cd gettext-*; ./configure; make + mkdir -p /tmp/opt/include /tmp/opt/lib + cd gettext-*; cp gettext-runtime/intl/libintl.h /tmp/opt/include + cd gettext-*; cp gettext-runtime/intl/.libs/libintl.a /tmp/opt/lib zlib: tar xzf dl/zlib*.tar.gz @@ -83,6 +96,13 @@ libiconv: cd libiconv-*; cp include/iconv.h /tmp/opt/include cd libiconv-*; cp lib/.libs/libiconv.a /tmp/opt/lib +liblzma: + tar xzf dl/xz-*.tar.gz + source _bashrc; cd xz-*; ./configure --disable-shared; make + mkdir -p /tmp/opt/include /tmp/opt/lib + cd xz-*; cp ./src/liblzma/.libs/liblzma.a /tmp/opt/lib + cd xz-*; cp -r src/liblzma/api/lzma* /tmp/opt/include + libxml2: tar xzf dl/libxml2-*.tar.gz source _bashrc; cd libxml2-*; ./configure --disable-shared; make libxml2.la @@ -90,12 +110,12 @@ libxml2: cd libxml2-*; cp include/libxml/*.h /tmp/opt/include/libxml cd libxml2-*; cp .libs/libxml2.a /tmp/opt/lib -libyaml: - tar xzf dl/libyaml-*.tar.gz - source _bashrc; cd libyaml-*; ./bootstrap; ./configure; make +yaml: + tar xzf dl/yaml-*.tar.gz + source _bashrc; cd yaml-*; ./bootstrap; ./configure; make mkdir -p /tmp/opt/include /tmp/opt/lib - cd libyaml-*; cp include/yaml.h /tmp/opt/include - cd libyaml-*; cp src/.libs/libyaml.a /tmp/opt/lib + cd yaml-*; cp include/yaml.h /tmp/opt/include + cd yaml-*; cp src/.libs/libyaml.a /tmp/opt/lib gdbm: tar xzf dl/gdbm-*.tar.gz @@ -106,17 +126,17 @@ gdbm: gmp: tar xjf dl/gmp-*.tar.bz2 - source _bashrc; cd gmp-*; ./configure ABI=32; make + source _bashrc; cd gmp-*; ./configure; make mkdir -p /tmp/opt/include /tmp/opt/lib cd gmp-*; cp gmp.h gmpxx.h /tmp/opt/include cd gmp-*; cp .libs/libgmp.a /tmp/opt/lib -# openssl: -# tar xzf dl/openssl-*.tar.gz -# source _bashrc; cd openssl-*; ./configure darwin64-i386-cc; make -# mkdir -p /tmp/opt/include /tmp/opt/lib -# cd openssl-*; cp -r include/openssl /tmp/opt/include -# cd openssl-*; cp -r *.a /tmp/opt/lib +openssl: + tar xzf dl/openssl-*.tar.gz + source _bashrc; cd openssl-*; ./configure darwin64-x86_64-cc; make + mkdir -p /tmp/opt/include /tmp/opt/lib + cd openssl-*; cp -r include/openssl /tmp/opt/include + cd openssl-*; cp -r *.a /tmp/opt/lib rsync: tar xzf dl/rsync*.tar.gz @@ -124,31 +144,33 @@ rsync: cleanall: clean rm -rf dl - sudo rm -rf /usr/local/ruby23 + sudo rm -rf /usr/local/ruby27 clean: rm -rf /tmp/opt rm -rf ruby-* + rm -rf gettext-* rm -rf zlib-* rm -rf libpng-* rm -rf jpeg-* rm -rf libiconv-* + rm -rf xz-* rm -rf libxml2-* - rm -rf libyaml-* + rm -rf yaml-* rm -rf gdbm-* rm -rf gmp-* -# rm -rf openssl-* + rm -rf openssl-* rm -rf rsync* updateruby: - rm -f ../ruby23.zip - cp -r /usr/local/ruby23 ruby23 - cp rsync-*/rsync ruby23/bin - chmod -R 755 ruby23 - find ruby23 -name '*.o' | xargs rm -f - rm -rf ruby23/lib/ruby/gems/2.3.*/cache/* - rm -rf ruby23/lib/ruby/gems/2.3.*/doc/* - rm -rf ruby23/gems/cache/* - rm -rf ruby23/gems/doc/* - zip -Xqr9 ../ruby23.zip ruby23 - rm -rf ruby23 + rm -f ../ruby27.zip + cp -r /usr/local/ruby27 ruby27 + cp rsync-*/rsync ruby27/bin + chmod -R 755 ruby27 + find ruby27 -name '*.o' | xargs rm -f + rm -rf ruby27/lib/ruby/gems/2.7.*/cache/* + rm -rf ruby27/lib/ruby/gems/2.7.*/doc/* + rm -rf ruby27/gems/cache/* + rm -rf ruby27/gems/doc/* + zip -Xqr9 ../ruby27.zip ruby27 + rm -rf ruby27 diff --git a/build/osx/runtime/_bashrc b/build/osx/runtime/_bashrc index 11bd206..19fd15c 100644 --- a/build/osx/runtime/_bashrc +++ b/build/osx/runtime/_bashrc @@ -1,14 +1,15 @@ unalias -a -export PATH=/usr/local/ruby23/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin +export PATH=/usr/local/ruby27/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin # NOTE: we need to put MacOSX10.6.sdk as below and also need to modify # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist -# to allow 10.6 (cf. https://forums.developer.apple.com/thread/43381). -export MACOSX_DEPLOYMENT_TARGET=10.6 -export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk +# to allow 10.11 (cf. https://forums.developer.apple.com/thread/43381). +# (Xcode 11.3.1's default setting is 10.11) +export MACOSX_DEPLOYMENT_TARGET=10.11 +export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -export CFLAGS="-m32 -arch i386 -I/tmp/opt/include -I/tmp/opt/include/libxml" -export CXXFLAGS="-m32 -arch i386 -I/tmp/opt/include -I/tmp/opt/include/libxml" +export CFLAGS="-I/tmp/opt/include -I/tmp/opt/include/libxml" +export CXXFLAGS="-I/tmp/opt/include -I/tmp/opt/include/libxml" export CPPFLAGS=" -I/tmp/opt/include -I/tmp/opt/include/libxml" export LDFLAGS="-L/tmp/opt/lib -Wl,-no_pie,-Z,-search_paths_first,-L/tmp/opt/lib,-F/System/Library/Frameworks,-L/usr/lib" export CONFIGURE_ARGS="--with-cflags='$CFLAGS' --with-cxxflags='$CXXFLAGS' --with-ldflags='$LDFLAGS'"