diff --git a/.gitignore b/.gitignore index 6f6aaff..e1c7043 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ tarballs tmp +src polymake.app -*.out \ No newline at end of file +*.out +*.sparsebundle +*.sparseimage \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index f6c6b45..0000000 --- a/Makefile +++ /dev/null @@ -1,431 +0,0 @@ - -# this Makefile is for OS X 10.8 or 10.9 -# includes compilation of a proper gcc - -### change into the base directory -###BASEPATH := $( (cd -P $(dirname $0) && pwd) ) -SED := "/usr/bin/sed" -TMP := $(CURDIR)/tmp -PERL := /usr/bin/perl -DATE := `date +'%Y-%m-%d'` - -MACVERSION := $(shell sw_vers | grep -o "10[.][0-9]") -PERLVERSION := $(shell $(PERL) --version | grep -o "5[.][0-9]*[.][0-9]") - -PREFIX := $(CURDIR)/polymake.app/Contents/Resources - - -### pick the right gcc -CC := $(PREFIX)/bin/gcc -CXX :=$(PREFIX)/bin/g++ - -### only 64bit, first for gcc, second for perl (with gcc) -#CFLAGS="-arch x86_64" -#ARCHFLAGS='-arch x86_64' -CFLAGS=" -m64 -mtune=generic" -CXXFLAGS=" -m64 -mtune=generic" - -.PHONY: all skeleton boost ppl gcc rpath perl gmp readline mpfr ant singular polymake-prepare polymake-compile dmg clean clean-install polymake-install polymake-docs relative-paths doc polymake-executable xsexternal_error flint ftit singularfour singularfournames - -### default target -all : skeleton gmp_build gmp mpfr_build mpfr ppl_build ppl readline_build readline perl boost ant flint ftit singularfour singularfournames polymake-prepare polymake-compile polymake-install polymake_env_var polymake_name polymake_rpath polymake-executable clean-install doc dmg - -allold : skeleton gmp_build gmp mpfr_build mpfr ppl_build ppl readline_build readline perl boost ant singular polymake-prepare polymake-compile polymake-install polymake_env_var polymake_name polymake_rpath polymake-executable clean-install doc dmg - - -xsexternal_error : polymake-compile polymake-install polymake_env_var polymake_name polymake_rpath polymake-executable clean-install doc dmg - -### create the polymake package skeleton -skeleton : - @echo "creating skeleton" - @mkdir -p polymake.app/Contents/Resources - @mkdir -p polymake.app/Contents/MacOS - - - @cd scripts; $(SED) 's/REPLACE_PERLVERSION/${PERLVERSION}/g' polymake.start > polymake.start.tmp; - @cd scripts; $(SED) 's/REPLACE_PERLVERSION/${PERLVERSION}/g' polymake.debug > polymake.debug.tmp; - @install -m 550 scripts/polymake polymake.app/Contents/MacOS/ - @install -m 550 scripts/polymake.start.tmp polymake.app/Contents/MacOS/polymake.start - @install -m 550 scripts/polymake.debug.tmp polymake.app/Contents/MacOS/polymake.debug - @install -m 550 scripts/debug.commands polymake.app/Contents/Resources/ - @cd scripts; rm polymake.start.tmp; - @cd scripts; rm polymake.debug.tmp; - - @install -m 550 scripts/Singular polymake.app/Contents/MacOS/ - - @cp scripts/Info.plist polymake.app/Contents/ - @cp scripts/*.icns polymake.app/Contents/Resources/ - -gmp_build : - @echo "building gmp" - @./build.sh gmp-5.1.3 "$(TMP)" build \ - --prefix=$(PREFIX) --enable-cxx=yes - -gmp_install : - @echo "installing gmp" - @./install.sh gmp-5.1.3 "$(TMP)" build - -gmp_name : - @echo "fixing names in gmp" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libgmpxx.4.dylib" "libgmp.10.dylib" -############## - @./fix_libname.sh "$(PREFIX)/lib" "libgmpxx.4.dylib" - @./fix_libname.sh "$(PREFIX)/lib" "libgmp.10.dylib" - -gmp : gmp_install gmp_name - -mpfr_build : - @echo "building mpfg" - @./build.sh mpfr-3.1.2 "$(TMP)" build \ - --prefix=$(PREFIX) --with-gmp=$(PREFIX) LDFLAGS="-Wl,-rpath,$(PREFIX)/lib" - -mpfr_install : - @echo "installing mpfr" - @./install.sh mpfr-3.1.2 "$(TMP)" build - -mpfr_name : - @echo "fixing names in mpfr" - @./fix_libname.sh "$(PREFIX)/lib" "libmpfr.4.dylib" - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libmpfr.4.dylib - -mpfr : mpfr_install mpfr_name - -ppl_build : - @echo "building ppl" - @./build.sh ppl-1.1 "$(TMP)" build \ - --prefix=$(PREFIX) --with-gmp=$(PREFIX) --with-mpfr=$(PREFIX) LDFLAGS="-Wl,-rpath,$(PREFIX)/lib" - -ppl_install : - @echo "installing ppl" - @./install.sh ppl-1.1 "$(TMP)" build - -ppl_name : - @echo "fixing names in ppl" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libppl.13.dylib" "libppl_c.4.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libppl_c.4.dylib" "libppl.13.dylib" - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libppl_c.4.dylib - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libppl.13.dylib - ############## - @./fix_libname.sh "$(PREFIX)/lib" "libppl_c.4.dylib" - @./fix_libname.sh "$(PREFIX)/lib" "libppl.13.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/bin" "$(PREFIX)/lib" "ppl-config" "libppl.13.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/bin" "$(PREFIX)/lib" "ppl_pips" "libppl.13.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/bin" "$(PREFIX)/lib" "ppl_lcdd" "libppl.13.dylib" - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/bin/ppl-config - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/bin/ppl_pips - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/bin/ppl_lcdd - -ppl : ppl_install ppl_name - -ant : - @echo "extracting ant" - @tar xvfj tarballs/apache-ant-1.9.3-bin.tar.bz2 -C $(PREFIX) - -readline_build : - @echo building readline in $(TMP) - @mkdir -p $(TMP) - @tar xvfz tarballs/readline-6.2.tar.gz -C $(TMP) -### fix the arch flag settings for compilation - @${SED} -i '' -e 's|-arch_only `/usr/bin/arch`|-dynamiclib|g' $(TMP)/readline-6.2/support/shobj-conf - @cd $(TMP)/readline-6.2; ./configure --prefix=$(PREFIX) - @make -C $(TMP)/readline-6.2 - @make -C $(TMP)/readline-6.2 install - -readline : - @echo "fixing names in readline" - @cd $(PREFIX)/lib; chmod u+w libreadline.6.2.dylib; chmod u+w libhistory.6.2.dylib - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libreadline.6.2.dylib" "libgcc_s.1.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libhistory.6.2.dylib" "libgcc_s.1.dylib" -############## - @./fix_libname.sh "$(PREFIX)/lib" "libreadline.6.2.dylib" - @./fix_libname.sh "$(PREFIX)/lib" "libhistory.6.2.dylib" - - -### XML-LibXSLT -### Term-Gnu-Readline -perl : - @echo "building perl modules" - @tar xvfz tarballs/XML-LibXSLT-1.71.tar.gz -C $(TMP) - @cd $(TMP)/XML-LibXSLT-1.71; ARCHFLAGS='-arch x86_64' /usr/bin/perl Makefile.PL PREFIX=$(PREFIX) - @make -C $(TMP)/XML-LibXSLT-1.71 - @make -C $(TMP)/XML-LibXSLT-1.71 install -### term-readline-gnu - @tar xvfz tarballs/Term-ReadLine-Gnu-1.20.tar.gz -C $(TMP) -### have to pass ARCHFLAG again? - @cd $(TMP)/Term-ReadLine-Gnu-1.20; ARCHFLAGS='-arch x86_64' $(PERL) Makefile.PL PREFIX=$(PREFIX) CXXFLAGS="-Wl,-rpath,$(PREFIX)/lib" --includedir=$(PREFIX)/include --libdir=$(PREFIX)/lib - @make -C $(TMP)/Term-ReadLine-Gnu-1.20 - @make -C $(TMP)/Term-ReadLine-Gnu-1.20 install - -boost : - @echo "extracting boost" - @tar xfj tarballs/boost_1_47_0.tar.bz2 -C polymake.app/Contents/Resources/include -### remove junk - @rm -rf polymake.app/Contents/Resources/include/boost_1_47_0/doc - @rm -rf polymake.app/Contents/Resources/include/boost_1_47_0/tools - @rm -rf polymake.app/Contents/Resources/include/boost_1_47_0/status - @rm -rf polymake.app/Contents/Resources/include/boost_1_47_0/more - @rm -rf polymake.app/Contents/Resources/include/boost_1_47_0/libs - -singular : - @echo "building singular" - @cd $(TMP); mkdir -p singular - @cd $(TMP)/singular; if [ ! -d Sources/.git ]; then git clone https://github.com/Singular/Sources; fi - @cd $(TMP)/singular/Sources; git checkout master - # we patch a file, so we should fix the revision we use -### apparently checking out a revision does not work, try by date - @cd $(TMP)/singular/Sources; git checkout `git rev-list -n 1 --before="2014-03-25 00:00" master` - @cd $(TMP)/singular/Sources; git archive master | bzip2 > ../../../tarballs/singular-github-version-branch-spielwiese-20140325.tar.bz2 - @cd $(TMP)/singular/Sources; $(SED) 's|exec_prefix=${prefix}/${ac_cv_singuname}|exec_prefix=${prefix}|g' configure > configure.tmp; mv configure.tmp configure; chmod a+x configure -### we must check whether patch has been applied already - @cd $(TMP)/singular/Sources; patch -p0 -N --dry-run --silent < ../../../scripts/singular-patch 2>/dev/null; if [ $$? -eq 0 ]; then patch -p0 < ../../../scripts/singular-patch; else echo "configure already patched"; fi - @cd $(TMP)/singular/Sources; PERL5LIB=$(PERL5LIB) CPPFLAGS="-fpic -DPIC -DLIBSINGULAR" LDFLAGS="-L$(PREFIX)/lib/ -Wl,-rpath,$(PREFIX)/lib" CFLAGS="-I$(PREFIX)/include/ -fpic -DPIC -DLIBSINGULAR" ./configure --without-dynamic-kernel --without-MP --prefix=$(PREFIX) - @make -C $(TMP)/singular/Sources install-libsingular - @./fix_libname.sh "$(PREFIX)/lib" "libsingular.dylib" - -flint : - @echo "building flint" - @cd $(TMP); mkdir -p flint - @cd $(TMP)/flint; if [ ! -d .git ]; then git clone https://github.com/wbhart/flint2.git .; fi - @cd $(TMP)/flint; git archive trunk | bzip2 > ../../tarballs/flint-github-$(DATE).tar.bz2 - @cd $(TMP)/flint; PERL5LIB=$(PERL5LIB) CPPFLAGS="-fpic -DPIC -DLIBSINGULAR" LDFLAGS="-L$(PREFIX)/lib/ -Wl,-rpath,$(PREFIX)/lib" CFLAGS="-I$(PREFIX)/include/ -fpic -DPIC -DLIBSINGULAR" ./configure --with-gmp=$(PREFIX)/ --with-mpfr=$(PREFIX)/ --disable-shared --prefix=$(PREFIX) - @make -C $(TMP)/flint/ - @make -C $(TMP)/flint/ install - -ftit : - @echo "building 4ti2" - @tar xvfz tarballs/4ti2-1.6.2.tar.gz -C $(TMP) - @cd $(TMP)/4ti2-1.6.2; ./configure --prefix=$(PREFIX) - @cd $(TMP)/4ti2-1.6.2; make - @cd $(TMP)/4ti2-1.6.2; make install - -singularfour : - @echo "building singular 4" - @cd $(TMP); mkdir -p singular - @cd $(TMP)/singular; if [ ! -d Sources/.git ]; then git clone https://github.com/Singular/Sources; fi - @cd $(TMP)/singular/Sources; git archive spielwiese | bzip2 > ../../../tarballs/singular-github-version-branch-spielwiese-$(DATE).tar.bz2 - @cd $(TMP)/singular/Sources; ./autogen.sh - @cd $(TMP)/singular/Sources; PERL5LIB=$(PERL5LIB) CPPFLAGS="-fpic -DPIC -DLIBSINGULAR" LDFLAGS="-L$(PREFIX)/lib/ -Wl,-rpath,$(PREFIX)/lib" CFLAGS="-I$(PREFIX)/include/ -fpic -DPIC -DLIBSINGULAR" ./configure --without-dynamic-kernel --without-MP --prefix=$(PREFIX) --with-flint=$(PREFIX) --enable-gfanlib --with-gmp=$(PREFIX) - @cd $(TMP)/singular/Sources; make - @cd $(TMP)/singular/Sources; make install - -singularfournames : -### binaries - @./fix_lc_load_dylib.sh "$(PREFIX)/bin" "$(PREFIX)/lib" "ESingular" "libomalloc-0.9.6.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/bin" "$(PREFIX)/lib" "ESingular" "libresources-4.0.0.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/bin" "$(PREFIX)/lib" "TSingular" "libomalloc-0.9.6.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/bin" "$(PREFIX)/lib" "TSingular" "libresources-4.0.0.dylib" - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/bin/Singular - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/bin/ESingular - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/bin/TSingular -### libs - @./fix_libname.sh "$(PREFIX)/lib" "libSingular-4.0.0.dylib" - @./fix_libname.sh "$(PREFIX)/lib" "libfactory-4.0.0.dylib" - @./fix_libname.sh "$(PREFIX)/lib" "libomalloc-0.9.6.dylib" - @./fix_libname.sh "$(PREFIX)/lib" "libpolys-4.0.0.dylib" - @./fix_libname.sh "$(PREFIX)/lib" "libresources-4.0.0.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libSingular-4.0.0.dylib" "libresources-4.0.0.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libSingular-4.0.0.dylib" "libomalloc-0.9.6.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libSingular-4.0.0.dylib" "libfactory-4.0.0.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libSingular-4.0.0.dylib" "libpolys-4.0.0.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libfactory-4.0.0.dylib" "libresources-4.0.0.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libfactory-4.0.0.dylib" "libomalloc-0.9.6.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libpolys-4.0.0.dylib" "libresources-4.0.0.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libpolys-4.0.0.dylib" "libomalloc-0.9.6.dylib" - @./fix_lc_load_dylib.sh "$(PREFIX)/lib" "$(PREFIX)/lib" "libpolys-4.0.0.dylib" "libfactory-4.0.0.dylib" - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libSingular-4.0.0.dylib - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libfactory-4.0.0.dylib - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libomalloc-0.9.6.dylib - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libpolys-4.0.0.dylib - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/lib/libresources-4.0.0.dylib - - -polymake-prepare : - @echo "preparing polymake build" - @cd $(TMP); mkdir -p polymake; - @cd $(TMP)/polymake; if [ ! -d .git ]; then git clone https://github.com/polymake/polymake.git .; fi - @cd $(TMP)/polymake; git archive Releases | bzip2 > ../../tarballs/polymake-2.13.tar.bz2 - @cd $(TMP)/polymake; LD_LIBRARY_PATH=$(PREFIX)/lib PERL5LIB=$(PREFIX)/lib/perl5/site_perl/$(PERLVERSION)/darwin-thread-multi-2level/:$(PREFIX)/lib/perl5/ ./configure --without-fink --with-readline=$(PREFIX)/lib --prefix=$(PREFIX)/polymake --with-jni-headers=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(MACVERSION).sdk/System/Library/Frameworks/JavaVM.framework/Headers --with-boost=$(PREFIX)/include/boost_1_47_0/ --with-gmp=$(PREFIX)/ --with-ppl=$(PREFIX)/ --with-mpfr=$(PREFIX)/ --with-ant=$(PREFIX)/apache-ant-1.9.3/bin/ant PERL=$(PERL) --with-singular=$(PREFIX) CXXFLAGS="-I$(PREFIX)/include" LDFLAGS="-L$(PREFIX)/lib/ -stdlib=libstdc++" CXXFLAGS="-Wl,-rpath,$(PREFIX)/lib -m64 -mtune=generic -I/usr/include/c++/4.2.1" CFLAGS=" -m64 -mtune=generic" - -polymake-compile : - @echo "building polymake" - @make -j2 -C $(TMP)/polymake - -polymake-docs : - @echo "creating polymake docs" - @make -j2 -C $(TMP)/polymake docs - -polymake-install : - @echo "installing polymake" - @make -C $(TMP)/polymake install - -polymake_env_var : - @echo "fixing variables in polymake" -### adjust the polymake script to the new paths - @cd $(PREFIX)/polymake/bin; chmod u+w polymake; $(SED) 's/.*InstallTop=.*/ $$InstallTop=\"$$ENV\{POLYMAKE_BASE_PATH\}\/share\/polymake\";/' polymake | $(SED) 's/.*InstallArch=.*/ $$InstallArch=\"$$ENV\{POLYMAKE_BASE_PATH\}\/lib\/polymake\";/' | $(SED) '/.*addlibs=.*/d' > polymake.tmp; mv polymake.tmp polymake - @cd $(PREFIX)/polymake/bin; chmod u+w polymake-config; $(SED) 's/.*InstallArch=.*/ $$InstallArch=\"$$ENV\{POLYMAKE_BASE_PATH\}\/lib\/polymake\";/' polymake-config > polymake-config.tmp; mv polymake-config.tmp polymake-config -### and adjust conf.make for polymake and all bundled extensions -# FIXME using \S etc. in a regexp apparently does not work for Mac's sed, so we assume that the path to the current directory is not too strange - @cd $(PREFIX)/polymake/lib/polymake; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make - @cd $(PREFIX)/polymake/lib/polymake; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make - @cd $(PREFIX)/polymake/lib/polymake/bundled/group; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make - @cd $(PREFIX)/polymake/lib/polymake/bundled/java; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make - @cd $(PREFIX)/polymake/lib/polymake/bundled/jreality; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make - @cd $(PREFIX)/polymake/lib/polymake/bundled/libnormaliz; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make - @cd $(PREFIX)/polymake/lib/polymake/bundled/nauty; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make - @cd $(PREFIX)/polymake/lib/polymake/bundled/ppl; \ - chmod u+w conf.make; \ - $(SED) 's/\# .*//g' conf.make | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources\/polymake/$$\{POLYMAKE_BASE_PATH\}/g' | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/$$\{POLYMAKE_BASE_PATH\}\/..\//g' | \ - $(SED) 's/I.*boost/I$\{POLYMAKE_BASE_PATH\}\/..\/include\/boost/' \ - > conf.make.tmp; mv conf.make.tmp conf.make -# fun thing: ppl puts its path into the header - @cd $(PREFIX)/include; \ - chmod u+w ppl.hh; \ - $(SED) 's/\# .*//g' ppl.hh | \ - $(SED) -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/\./g' > ppl.hh.tmp; mv ppl.hh.tmp ppl.hh - -polymake_name : - @echo "fixing names in polymake" - @chmod u+w $(PREFIX)/polymake/lib/libpolymake.dylib - @chmod u+w $(PREFIX)/polymake/lib/libpolymake-apps.dylib - @chmod u+w $(PREFIX)/polymake/lib/libpolymake-apps.2.13.dylib - @install_name_tool -id "@rpath/../polymake/lib/libpolymake.dylib" $(PREFIX)/polymake/lib/libpolymake.dylib - @install_name_tool -id "@rpath/../polymake/lib/libpolymake-apps.dylib" $(PREFIX)/polymake/lib/libpolymake-apps.dylib - @install_name_tool -id "@rpath/../polymake/lib/libpolymake-apps.2.13.dylib" $(PREFIX)/polymake/lib/libpolymake-apps.2.13.dylib -######### - @chmod u+w $(PREFIX)/lib/perl5/site_perl/$(PERLVERSION)/darwin-thread-multi-2level/auto/Term/ReadLine/Gnu/Gnu.bundle; install_name_tool -change "$(PREFIX)/lib/libreadline.6.2.dylib" "@rpath/libreadline.6.2.dylib" $(PREFIX)/lib/perl5/site_perl/$(PERLVERSION)/darwin-thread-multi-2level/auto/Term/ReadLine/Gnu/Gnu.bundle - @chmod u+w $(PREFIX)/polymake/lib/polymake/lib/*.bundle - @chmod u+w $(PREFIX)/polymake/lib/polymake/perlx/$(PERLVERSION)/darwin-thread-multi-2level/auto/Polymake/Ext/Ext.bundle - @chmod u+w $(PREFIX)/polymake/lib/polymake/lib/jni/libpolymake_java.jnilib - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/libpolymake.dylib - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/libpolymake.dylib - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/common.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/common.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/core.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/core.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/graph.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/graph.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/group.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/group.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/matroid.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/matroid.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/polytope.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/polytope.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/topaz.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/topaz.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/tropical.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/tropical.bundle - @install_name_tool -change "$(PREFIX)/lib/libmpfr.4.dylib" "@rpath/libmpfr.4.dylib" $(PREFIX)/polymake/lib/polymake/lib/fan.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/polymake/lib/polymake/lib/fan.bundle - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/lib/libppl_c.4.dylib - @install_name_tool -change "$(PREFIX)/lib/libppl.13.dylib" "@rpath/libppl.13.dylib" $(PREFIX)/lib/libppl_c.4.dylib - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/lib/libppl.13.dylib - @install_name_tool -change "$(PREFIX)/lib/libgmp.10.dylib" "@rpath/libgmp.10.dylib" $(PREFIX)/lib/libmpfr.4.dylib - -polymake_rpath : - @echo "fixing names in polymake" - @chmod u+w $(PREFIX)/polymake/lib/libpolymake.dylib - @chmod u+w $(PREFIX)/polymake/lib/polymake/lib/*.bundle - @chmod u+w $(PREFIX)/polymake/lib/polymake/perlx/$(PERLVERSION)/darwin-thread-multi-2level/auto/Polymake/Ext/Ext.bundle - @chmod u+w $(PREFIX)/polymake/lib/polymake/bundled/*/lib/*.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/libpolymake.dylib - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/common.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/core.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/fan.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/graph.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/group.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/matroid.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/polytope.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/topaz.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/tropical.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/lib/ideal.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/perlx/$(PERLVERSION)/darwin-thread-multi-2level/auto/Polymake/Ext/Ext.bundle -# bundled extensions - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/group/lib/common.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/group/lib/group.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/group/lib/polytope.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/group/lib/topaz.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/java/lib/common.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/java/lib/graph.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/java/lib/polytope.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/libnormaliz/lib/polytope.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/nauty/lib/graph.bundle - @install_name_tool -rpath "$(PREFIX)/lib" "../Resources/lib" $(PREFIX)/polymake/lib/polymake/bundled/ppl/lib/polytope.bundle - -### make polymake script executable -### shouldn't this already be the case? -polymake-executable : - @echo "making polymake executable" - @chmod u+x $(PREFIX)/polymake/bin/polymake - - -### remove junk -clean-install : - @echo "clean install" - @cd polymake.app; find . -name "*.pod" -exec rm -rf {} \; - @cd polymake.app; find . -name "*.3pm" -exec rm -rf {} \; - @cd polymake.app; find . -name "*.packlist" -exec rm -rf {} \; - @cd polymake.app; find . -name "*.la" -exec rm -rf {} \; - - -dmg : - @echo "creating a disk image needs administrator rights. You will be asked for your password..." - @./scripts/diskimage - - -clean : - @rm -rf polymake.app - @rm -rf tmp - @rm -f polybundle.dmg - @rm -f tmp.dmg - @rm -f README.pdf - -doc : - @echo "create readme" - @cd scripts; pdflatex README - @cd scripts; pdflatex README - @cd scripts; rm -f README.aux README.log README.out - diff --git a/README.md b/README.md index 9197671..968179c 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,19 @@ polybundle ========== polymake bundle for Mac OS + +2021-01-14 fixes for big sur, polymake version 4.3 + +2020-03-03 fixes for catalina, polymake version 4.0, support for polyDB + +2018-03-02 changes for new polymake version 3.2, support for jupyter notebooks + +2017-04-05 changes for new polymake version 3.1 + +2014-05-01: local installations of autoconf, automake and libtool + +2014-05-01: Singular is now cloned from a fork of the Singular repository + +2014-04-28: updated versions of software dependces. Do "make fetch_sources" before "make" + +2014-04-28: rearranged targets: default target now fetches sources and builds bundle, to create a dmg with sources present do "make bundle" (the old default) diff --git a/build.sh b/build.sh deleted file mode 100755 index c3863a1..0000000 --- a/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -ex - -NAME=$1; shift -DIR=$1; shift -DEST=$1; shift - -echo building $NAME in $DIR -mkdir -p $DIR/${NAME}_$DEST -tar xvfj tarballs/$NAME.tar.bz2 -C $DIR -cd $DIR/${NAME}_$DEST -../$NAME/configure $* - -make diff --git a/build_scripts/README.tex b/build_scripts/README.tex new file mode 100644 index 0000000..2cefd8f --- /dev/null +++ b/build_scripts/README.tex @@ -0,0 +1,160 @@ +\documentclass[a4paper]{amsart} +\usepackage{color} + +\definecolor{urlcol}{cmyk}{.1,.7,1,0} +\usepackage[colorlinks,urlcolor=urlcol]{hyperref} +\usepackage{xspace} + +\newcommand{\macversion}{MACVERSION} +\newcommand{\polymakeversion}{POLYMAKELONGVERSION\xspace} + +\title{\texttt{polymake} on the Mac\\\polymakeversion} + +\newcommand{\polymake}{\texttt{polymake}\xspace} + + +\begin{document} + +\maketitle +\parindent0pt + +\section*{Introduction} + +\polymake is a tool to study the combinatorics and the geometry of convex polytopes and polyhedra. It is also capable of dealing with simplicial complexes, matroids, polyhedral fans, graphs, tropical polytopes, and various other mathematical object. + +\section*{System Requirements} + +The \polymake package was built and tested on Intel-based Macs running Mac OS \macversion\ with Apple's command line tools using the \polymakeversion of \polymake. Due to system package dependencies it won't work on Macs with \textbf{any} other Mac OS X version or architecture. + +Note that there are different packages for different perl versions. Make sure you download the version of the \polymake app that was built for the perl version that corresponds to your system perl. You can find the version number by executing \[\texttt{/usr/bin/perl --version}\] in a terminal. + +If there is no version of the \polymake app matching your perl version please contact us at \href{http://forum.polymake.org}{\tt forum.polymake.org}. + +\bigskip +The package requires that Apple's command line tools and java are installed on your Mac. If you don't have them a popup window will appear the first time polymake wants to use them. Please click install (you may need an administrator password to install them). The popoup for the command line tools is slightly confusing. It also offers to install XCode. This is not necessary. Just click \emph{Install}. + +\section*{Installation} + +Double clicking the \texttt{dmg} file mounts the disk image and opens it in the Finder. Drag \polymake to a suitable location on your system. Preferably this should be the standard \texttt{Applications} folder. You might want to save this README file somewhere. Afterwards you can eject the image and delete the \texttt{dmg} file unless you want to rebuild the app. + +To run \polymake double click the \polymake program icon. You can also drag the icon onto your dock for faster access. Note however that the \polymake bundle is not a true Mac application: it basically opens a \texttt{Terminal} and starts \polymake inside this. So it does not behave as most other apps, e.g. Mail: if you have a running \polymake session then clicking again on the Dock icon just opens another instance of \polymake instead of bringing the existing window to the front. Instead, you should navigate to the \texttt{Terminal} app (and then possibly cycle between different \texttt{Terminal} windows with \texttt{Cmd-<}) to reach \polymake). + +\section*{Usage} + +Double click the \polymake program icon to start \polymake. This will open a terminal and launch the interactive shell of \polymake inside the terminal. For an introduction to \polymake and the interactive shell see \href{http://polymake.org}{\tt polymake.org}\;. + +To exit \polymake type \texttt{exit;} at the \polymake prompt (observe the ``;'' that is necessary for each \polymake command). Depending on your \texttt{Terminal} settings the \texttt{Terminal} window might not close but just tell you that the process is completed. In that case close the window manually (but wait until \polymake has finished, which might take a moment). You can change the behavior of \texttt{Terminal} in the \textit{Preferences} menu. You cannot close \polymake by right clicking the Dock icon or via Expos\`e. \polymake saves open files and customization settings when you exit, so you \textbf{should not} terminate \polymake by closing the terminal. + +\section*{Using \polymake with a jupyter notebook} + +You can use polymake in a jupyter notebook. At the first start the bundle creates a configuration file \texttt{\$HOME/.polymake-macbundle/bundle.config} inside the general polymake customization folder (observe the dot!). In this file you can set the variable \texttt{POLYMAKE\_START\_IN\_JUPYTER} to 1. Note that running polymake inside a jupyter notebook requires a working installation of \texttt{\bf python3} and \texttt{\bf jupyter} that can be found via your path variable (or add it the path to \texttt{POLYMAKE\_ADD\_PATH} in the configuration file). These two programs are \textbf{not} part of the polymake bundle, you have to install them yourself, e.g. via \texttt{brew} or \texttt{fink}. + +With the next start of the bundle polymake will start a jupyter notebook server in a terminal and open a notebook in your default web browser. You can now choose polymake in the menu \texttt{new} at the top right corner of the screen. At the first start this will ask your permission to install the polymake jupyter kernel in \texttt{\$HOME/.local} in your home directory and to launch a server. Subsequent calls will directly start the server. + +\textbf{Note}: You have to shut down the jupyter server yourself with \texttt{Ctrl-c} (twice) in the terminal started by polymake after you have exited the polymake notebook. + +There are several more variables set in this file to control how jupyter is started. +\begin{itemize} +\item \texttt{POLYMAKE\_JUPYTER\_NOTEBOOK\_DIR}: This sets the default directory for your jupyter notebook files. By default, this is your home directory. It is highly recommended to set this to some other directory. The given path can either be absolute or relative to your home directory (e.g. \texttt{$\sim$/Documents}). Note that the given directory must already exist, it will not be created for you. +\item \texttt{POLYMAKE\_JUPYTER\_IP}: The ip the jupyter server connects to. Usually this is \texttt{localhost}, but you can set this to something else if you start the server remotely. If you start it in a virtual maschine on your computer and want to connect to it from the host, then \texttt{0.0.0.0} is usually the right choice (note that in this case you must forward the jupyter port from the machine to the host). +\item \texttt{POLYMAKE\_JUPYTER\_PORT}: The port jupyter connects to. Usually \texttt{8888}. +\item \texttt{POLYMAKE\_JUPYTER\_START\_BROWSER}: Set this to 0 if jupyter should not start a session in a browser. You should choose this option if you start the server remotely or in a virtual machine. +\item \texttt{POLYMAKE\_JUPYTER\_BROWSER}: Sets the default browser. You need to provide the full path to the binary, followed by \%s. See the configuration file for an example. +\item \texttt{POLYMAKE\_JUPYTER\_ASK\_IF\_RUNNING\_SERVER}: If set to 1 (the default) polymake checks whether a jupyter server is already running on your machine and lets you choose whether you want to start a new one. +\item \texttt{POLYMAKE\_JUPYTER\_FORCE\_REINSTALL}: Defaults to 1 on the first run, and to 0 otherwise. If set to 1, then \polymake reinstalls the jupyter kernel. This is necessary if the bundle has been moved to a different location. Usually the bundle manages to detect this and sets the variable accordingly, so there is no need to touch this. +\end{itemize} + +\section*{Customization Files} + +\subsection*{\polymake customization files} + +\polymake puts its customization files into the directory + +\[\texttt{.polymake-macbundle/} \] + +in your home directory. The directory is created at the first start of \polymake. If you want to reset \polymake to default values then you can just delete this directory (You cannot do this in the Finder as it is a hidden folder (observe the ``.'' in front). Open a \texttt{Terminal}, \texttt{cd} into your home directory and type \texttt{rm -rf .polymake-macbundle}.). + +These files, as well as the customization files written to your extension directory when you import an extension into polymake contain the absolute path to the directory containing the polymake files. Thus, after you have started \polymake once you cannot move the bundle to a different location on you Mac (e.g.\ from the disk image into your Application folder). You can, however, create links. + +If you have to move the \polymake app bundle, then you have to delete the folder \texttt{.polymake-macbundle} in your home directory (see above for instructions), and do a \texttt{make distclean} in each extension base directory prior to calling \polymake from its new location. If you want to save some values (e.g.\ color settings) in \texttt{customize.pl} or \texttt{prefer.pl} then make a copy of the files and add the values back to the corresponding files in \texttt{.polymake-macbundle} after you have started \polymake from the new location. + +\polymake has a basic check to detect whether you have moved the \polymake app and offers to delete \texttt{.polymake-macbundle}. You can accept this as long as you don't have imported any extensions. If you have, then please choose ``cancel'' here and do \texttt{make clean} in the extension base directories before you start \polymake\ from its new location. + +\subsection*{Bundle specific customization} + +At the first start the bundle adds its own customization file \texttt{bundle.config} to the directory {\$HOME/.polymake-macbundle}. This is mostly used to control the configuration of the jupyter server for using polymake in a jupyter notebook. + +There are two general options +\begin{itemize} +\item \texttt{POLYMAKE\_TERM}: lets you define the terminal app that should be used. By default, \polymake starts inside the default \texttt{Terminal.app} that comes with MacOS. If you prefer to use \texttt{iTerm}, then you can set \texttt{POLYMAKE\_TERM='iTerm'} in that file. +\item \texttt{POLYMAKE\_ADD\_PATH}: adds directories to the path variable used during a \polymake session. Here you can in particular add the path to jupyter, if this is not installed to a default location. +\end{itemize} + +You can use the \polymake app along with a standard installation, but you cannot import extensions from the same directory (but you can install extensions again to a different directory). + +\section*{Uninstalling polymake} + +To uninstall \polymake just drag the \polymake icon to the trash and remove the directory \texttt{\${HOME}/.polymake-macbundle} (This is only created after you have started \polymake at least once). Note that this directory is a hidden directory, so you cannot delete it in the Finder. Instead, open a \texttt{Terminal}, \texttt{cd} into your home directory, and type \texttt{rm -rf .polymake-macbundle} (observe the ``.''). + +If you have installed the jupyter kernel for \polymake and want to remove this as well, then just delete the directory of the kernel. You can find this via +\[\texttt{jupyter kernelspec list}\] +in a terminal. The kernel is installed into a directory \texttt{Jupyter/kernels/polymake} below the jupyter kernel default directory. + +\section*{Trouble-shooting} + +Support queries concerning installation and usage are welcome (please use our forum at \href{http://forum.polymake.org}{\tt forum.polymake.org}), as well as any other feedback, but are served on voluntary base, depending, first of all, on the authors' free time resources. The \polymake package for Mac is still experimental, so it might not work on your computer. Also, we don't have many different Mac OS X installations at hand to test. If it doesn't work we'd value feedback about what went wrong. To obtain relevant information you could try to start the script from a terminal instead of the Applications folder and send us the output. If you have installed \polymake into the standard \texttt{Applications} folder, then the steps are as follows. +\begin{enumerate} +\item open the \texttt{Terminal} application (inside \texttt{Utilities} in your \texttt{Applications} folder). +\item at the prompt type\\ + \texttt{. /Application/polymake.app/Contents/MacOS/polymake.run} +\item alternatively, typing \\ + \texttt{. /Application/polymake.app/Contents/MacOS/polymake.run -d -c}\\ +at the promt generates a file \texttt{poly.log.} in your home directory with some debug output that you could check or send to us. +\end{enumerate} + +\section*{License} + +\polymake is released under the the GPL license. By downloading \polymake in any form (whether source code or compiled) you agree to be bound by this license; further you renounce to claim any kind of warranty or damages related to the use of this software. + +Software libraries bundled directly with \polymake are protected by open source licenses adequate to the GPL or broader. However, the exact wording and restrictions to use may vary. + +Additionally, the \polymake application package comes with compiled versions of several packages necessary for polymake: +\begin{enumerate} +\item \href{GMPHOME}{\texttt{GMP GMPVERSION}} +\item \href{MPFRHOME}{\texttt{MPFR MPFRVERSION}} +\item \href{READLINEHOME}{\texttt{readline READLINEVERSION}} +\item \href{TERMRLGNUHOME}{\texttt{perl::Term-Readline-Gnu TERMRLGNUVERSION}} +\item \href{BOOSTHOME}{\texttt{boost BOOSTVERSION}} +\item \href{ANTHOME}{\texttt{ant ANTVERSION}} +\item \href{PPLHOME}{\texttt{ppl PPLVERSION}} +\item \href{NORMALIZHOME}{\texttt{libnormaliz NORMALIZVERSION}} +\item \href{CDDHOME}{\texttt{cdd CDDVERSION}} +\item \href{LRSHOME}{\texttt{lrs LRSVERSION}} +\item \href{NAUTYHOME}{\texttt{nauty NAUTYVERSION}} +\item \href{JREALITYHOME}{\texttt{jReality JREALITYVERSION}} +\item \href{LIBXSLTHOME}{\texttt{XML-LibXSLT LIBXSLTVERSION}} +\item \href{SVGHOME}{\texttt{SVG SVGVERSION}} +\item \href{MODULERUNTIMEHOME}{\texttt{Module::Runtime MODULERUNTIMEVERSION}} +\item \href{MONGODBHOME}{\texttt{MongoDB MONGODBVERSION}} +\item \href{JSONXSHOME}{\texttt{JSON::XS JSONXSVERSION}} +\item \href{JSONHOME}{\texttt{JSON::XS JSONVERSION}} +\item \href{JSONMAYBEXSHOME}{\texttt{JSON::MaybeXS JSONMAYBEXSVERSION}} +\item \href{NETSSLEAYHOME}{\texttt{Net-SSLeay NETSSLEAYVERSION}} +\item \href{MOZILLACAHOME}{\texttt{Mozilla::CA MOZILLACAVERSION}} +\item \href{COMMONSENSEHOME}{\texttt{common::sense COMMONSENSEVERSION}} +\item \href{PERMLIBHOME}{\texttt{permlib PERMLIBVERSION}} +\item \href{NTLHOME}{\texttt{ntl NTLVERSION}} +\item \href{FTI2HOME}{\texttt{4ti2 FTI2VERSION}} +\item \href{GLPKHOME}{\texttt{glpk GLPKVERSION}} +\item \href{SINGULARHOME}{\texttt{Singular SINGULARVERSION}} +\item \href{NINJAHOME}{\texttt{ninja NINJAVERSION}} +\item \href{OPENSSLHOME}{\texttt{ninja OPENSSLVERSION}} +\item \href{POLYMAKEHOME}{\texttt{polymake POLYMAKEVERSION}} +\end{enumerate} +Also these packages are protected by open source licences compliant to the GPL. The sources for this version of \polymake are also available from our download page at \href{http://polymake.org/doku.php/download/start}{polymake.org/doku.php/download/start}. All sources are either directly contained in the polymake distribution or included as compressed tar archives in the \texttt{tarballs/} directory of the disk image, where you also find the polymake sources. Check the corresponding COPYING or README files included in the packages for the exact license. For the packages bundled directly with \polymake you can find the license statements in the \texttt{bundled} sub-directory of the \polymake archive (currently \texttt{cdd, lrs, nauty, permlib, ppl, libnormaliz, jreality}). + +\section*{Rebuilding the disk-image} + +If you need to rebuild the disk-image just copy the \texttt{src} directory to some location on your Mac. Change to the \texttt{src} directory and type \texttt{./build\_bundle}. + +\end{document} diff --git a/build_scripts/build_bundle b/build_scripts/build_bundle new file mode 100755 index 0000000..c5f6b5d --- /dev/null +++ b/build_scripts/build_bundle @@ -0,0 +1,57 @@ +#!/bin/bash + + + +export SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)" + +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +exec 3>&1 4>&2 + +set_prefix "creating skeleton" +${INSTALLSCRIPTDIR}/110_create_skeleton | tee $OUTFILE +set_prefix "fetch sources" +${INSTALLSCRIPTDIR}/120_fetch_sources | tee -a $OUTFILE +set_prefix "extracting ant" +${INSTALLSCRIPTDIR}/130_install_ant | tee -a $OUTFILE +set_prefix "extracting boost" +${INSTALLSCRIPTDIR}/140_install_boost 2>&1 | tee -a $OUTFILE +set_prefix "building readline" +${INSTALLSCRIPTDIR}/150_install_readline 2>&1 | tee -a $OUTFILE +set_prefix "building openssl" +${INSTALLSCRIPTDIR}/155_install_openssl 2>&1 | tee -a $OUTFILE +set_prefix "building perl modules" +${INSTALLSCRIPTDIR}/160_install_perl_modules 2>&1 | tee -a $OUTFILE +set_prefix "building gmp" +${INSTALLSCRIPTDIR}/170_install_gmp 2>&1 | tee -a $OUTFILE +set_prefix "building mpfr" +${INSTALLSCRIPTDIR}/180_install_mpfr 2>&1 | tee -a $OUTFILE +set_prefix "building glpk" +${INSTALLSCRIPTDIR}/190_install_glpk 2>&1 | tee -a $OUTFILE +set_prefix "building 4ti2" +${INSTALLSCRIPTDIR}/200_install_4ti2 2>&1 | tee -a $OUTFILE +set_prefix "building flint" +${INSTALLSCRIPTDIR}/210_install_flint 2>&1 | tee -a $OUTFILE +set_prefix "building autotools" +${INSTALLSCRIPTDIR}/220_install_autotools 2>&1 | tee -a $OUTFILE +set_prefix "building ppl" +${INSTALLSCRIPTDIR}/230_install_ppl 2>&1 | tee -a $OUTFILE +set_prefix "building ntl" +${INSTALLSCRIPTDIR}/240_install_ntl 2>&1 | tee -a $OUTFILE +set_prefix "installing singular" +${INSTALLSCRIPTDIR}/250_install_singular 2>&1 | tee -a $OUTFILE +set_prefix "installing ninja" +${INSTALLSCRIPTDIR}/260_install_ninja 2>&1 | tee -a $OUTFILE +set_prefix "installing polymake" +${INSTALLSCRIPTDIR}/270_install_polymake 2>&1 | tee -a $OUTFILE +set_prefix "fixing installation" +${INSTALLSCRIPTDIR}/280_fix_installation 2>&1 | tee -a $OUTFILE +set_prefix "creating documentation" +${INSTALLSCRIPTDIR}/290_create_documentation 2>&1 | tee -a $OUTFILE +set_prefix "creating dmg" +${INSTALLSCRIPTDIR}/300_diskimage 2>&1 | tee -a $OUTFILE + diff --git a/scripts/custom_dmg b/build_scripts/custom_dmg similarity index 100% rename from scripts/custom_dmg rename to build_scripts/custom_dmg diff --git a/scripts/dmg-background.png b/build_scripts/dmg-background.png similarity index 100% rename from scripts/dmg-background.png rename to build_scripts/dmg-background.png diff --git a/scripts/edit_template b/build_scripts/edit_template similarity index 100% rename from scripts/edit_template rename to build_scripts/edit_template diff --git a/build_scripts/functions/build.sh b/build_scripts/functions/build.sh new file mode 100755 index 0000000..4268731 --- /dev/null +++ b/build_scripts/functions/build.sh @@ -0,0 +1,27 @@ +#!/bin/sh -ex + + +# TARNAME : name of the tarball (minus the file ending) +# NAME : name of the directory the tarball extracts to +# note that we need both variables as gmp comes as 6.0.0a but extracts to 6.0.0 +# DIR : name of the base dir we are extracting the tarball into +# DEST: suffix for directory we build in +TARNAME=$1; shift +TAR_DIR=$1; shift; +NAME=$1; shift +DIR=$1; shift +DEST=$1; shift + +suffix=`ls $TAR_DIR/$TARNAME.* | egrep -o -e "tar.(bz2|gz)"` + +echo building $NAME in $DIR +mkdir -p $DIR/${NAME}_$DEST +if [[ $suffix =~ .*gz.* ]]; then + tar xfz $TAR_DIR/$TARNAME.$suffix -C $DIR +else + tar xfj $TAR_DIR/$TARNAME.$suffix -C $DIR +fi +cd $DIR/${NAME}_$DEST +../$NAME/configure "$@" + +make diff --git a/fix_lc_load_dylib.sh b/build_scripts/functions/fix_lc_load_dylib.sh similarity index 84% rename from fix_lc_load_dylib.sh rename to build_scripts/functions/fix_lc_load_dylib.sh index 73fe70f..2e67eab 100755 --- a/fix_lc_load_dylib.sh +++ b/build_scripts/functions/fix_lc_load_dylib.sh @@ -1,11 +1,13 @@ + #!/bin/sh -ex DIR=$1; shift LIBDIR=$1; shift FILE=$1; shift LIBNAME=$1; shift +RELPATH=$1; shift; -cd $DIR; +cd $DIR; install_name_tool -change "$LIBDIR/$LIBNAME" "@rpath/$LIBNAME" $FILE; diff --git a/build_scripts/functions/fix_libname.sh b/build_scripts/functions/fix_libname.sh new file mode 100755 index 0000000..99882e6 --- /dev/null +++ b/build_scripts/functions/fix_libname.sh @@ -0,0 +1,22 @@ + +#!/bin/sh -ex + +DIR=$1; shift +SUFFIX=$1; shift +RELPATH=$1; shift + + +cd $DIR; +for f in *$SUFFIX; do + if [ -f $f -a ! -h $f ]; then + if file $f | grep -m1 Mach; then + chmod u+w $f + if [ -n $RELPATH ]; then + install_name_tool -id "@rpath/$RELPATH/$f" $f; + else + install_name_tool -id "@rpath/$f" $f; + fi; + chmod u-w $f + fi; + fi; +done; diff --git a/build_scripts/functions/fix_load_dylib.sh b/build_scripts/functions/fix_load_dylib.sh new file mode 100755 index 0000000..fbaa108 --- /dev/null +++ b/build_scripts/functions/fix_load_dylib.sh @@ -0,0 +1,58 @@ +#!/bin/bash -ex + +get_relpath () { + patha=$1; + pathb=$2; + patha=${patha%/} + pathb=${pathb%/} + initial=$(printf "%s\n%s" "$patha" "$pathb" | sed -e 'N;s/^\(.*\)\/.*\n\1.*$/\1/') + patha=${patha#$initial} + pathb=${pathb#$initial} + ndirs=$(grep -o "/" <<< "$patha" | wc -l) + + for (( i=0; i<$ndirs; ++i )) + do + pathb=$(echo "../"$pathb); + done + relpath="$pathb"; +} + +DIR=$1; shift; +RESDIR=$1; shift; +SUFFIX=$1; shift; + +# possibly remove trailing slash +RESDIR=${RESDIR%/} +echo $RESDIR; + +if [ -d $DIR ]; then + cd $DIR; + + for f in *$SUFFIX; do + if [ -f $f -a ! -h $f ]; then + if file $f | grep -m1 Mach; then + # there is only one bundle where we need to replace an @rpath: Gnu.bundle + # this is because we had to set an rpath during compilation + if otool -L $f | egrep -o -e "(/Users|@rpath).*dylib" ; then + dl=`otool -L $f | egrep -o -e "(/Users|@rpath).*dylib"`; + for d in $dl; do + echo "found lib:" $d; + if [[ "$d" =~ ^$RESDIR ]] || [[ "$d" =~ "@rpath" ]]; then + lib=${d##*/}; # get the libname + echo $lib; + path=${d%/*}; # and the path to it + if [[ $path =~ "@rpath" ]]; then + path="$RESDIR/lib" + fi; + get_relpath $DIR $path + echo $relpath; + chmod u+w $f; + install_name_tool -change "$d" "@loader_path/$relpath/$lib" $f; + chmod u-w $f; + fi; + done; + fi; + fi; + fi; + done; +fi; diff --git a/build_scripts/functions/fix_rpath.sh b/build_scripts/functions/fix_rpath.sh new file mode 100755 index 0000000..fda641a --- /dev/null +++ b/build_scripts/functions/fix_rpath.sh @@ -0,0 +1,32 @@ +#!/bin/bash -x + +DIR=$1; shift +RESDIR=$1; shift +SUFFIX=$1; shift + +# possibly remove trailing slash +RESDIR=${RESDIR%/} +echo $RESDIR; + +if [ -d $DIR ]; then + cd $DIR; + + for f in *${SUFFIX}; do + echo $f; + if [ -f $f -a ! -h $f ]; then + if file $f | grep -m1 Mach; then + chmod u+w $f + if [ -x $f ]; then + g=`otool -l $f | grep -c "path $RESDIR"`; + while [ $g -gt 0 ]; do + install_name_tool -rpath "$RESDIR" ""@loader_path/../lib"" $f || true; + g=`otool -l $f | grep -c "path $RESDIR"`; + done; + else + install_name_tool -rpath "$RESDIR" ""../Resources/lib"" $f || true; + fi; + chmod u-w $f; + fi; + fi; + done; +fi; diff --git a/install.sh b/build_scripts/functions/install.sh similarity index 100% rename from install.sh rename to build_scripts/functions/install.sh diff --git a/build_scripts/installer/110_create_skeleton b/build_scripts/installer/110_create_skeleton new file mode 100755 index 0000000..9db3165 --- /dev/null +++ b/build_scripts/installer/110_create_skeleton @@ -0,0 +1,40 @@ +#!/bin/bash -x + + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +mkdir -p ${TAR_DIR} +mkdir -p ${TMP} + +echo "creating skeleton" +#set_prefix "creating skeleton" +mkdir -p polymake.app/Contents/Resources +mkdir -p polymake.app/Contents/Resources/config +mkdir -p polymake.app/Contents/Resources/include +mkdir -p polymake.app/Contents/MacOS + +${SED} "s/REPLACE_PERLVERSION/${PERLVERSION}/g" ${SCRIPTBASE}/bundle_scripts/polymake.start > ${TMP}/polymake.start.tmp; +${SED} "s/REPLACE_PERLVERSION/${PERLVERSION}/g" ${SCRIPTBASE}/bundle_scripts/polymake.debug > ${TMP}/polymake.debug.tmp; +${SED} "s/REPLACE_PERLVERSION/${PERLVERSION}/g" ${SCRIPTBASE}/bundle_scripts/polymake.run > ${TMP}/polymake.run.tmp; +${SED} "s/REPLACE_POLYMAKE_VERSION/${POLYMAKEVERSION}/g" ${SCRIPTBASE}/bundle_scripts/prefer.pl > ${TMP}/prefer.pl.tmp; +install -m 555 ${SCRIPTBASE}/bundle_scripts/polymake polymake.app/Contents/MacOS/ +install -m 555 ${TMP}/polymake.start.tmp polymake.app/Contents/MacOS/polymake.start +install -m 555 ${TMP}/polymake.run.tmp polymake.app/Contents/MacOS/polymake.run +install -m 555 ${TMP}/polymake.debug.tmp polymake.app/Contents/MacOS/polymake.debug +#install -m 644 ${TMP}/prefer.pl.tmp polymake.app/Contents/Resources/config/prefer.pl +install -m 644 ${SCRIPTBASE}/bundle_scripts/debug.commands polymake.app/Contents/Resources/ +rm ${TMP}/polymake.start.tmp; +rm ${TMP}polymake.debug.tmp; +rm ${TMP}polymake.run.tmp; +install -m 644 ${SCRIPTBASE}/bundle_scripts/Info.plist polymake.app/Contents/ +install -m 644 ${SCRIPTBASE}/bundle_scripts/poly.icns polymake.app/Contents/Resources/ +install -m 644 ${SCRIPTBASE}/bundle_scripts/polymake.icns polymake.app/Contents/Resources/ +install -m 644 ${SCRIPTBASE}/bundle_scripts/trop.icns polymake.app/Contents/Resources/ +install -m 644 ${SCRIPTBASE}/bundle_scripts/graph.icns polymake.app/Contents/Resources/ +install -m 555 ${SCRIPTBASE}/bundle_scripts/Singular polymake.app/Contents/MacOS/ \ No newline at end of file diff --git a/build_scripts/installer/120_fetch_sources b/build_scripts/installer/120_fetch_sources new file mode 100755 index 0000000..18fceb4 --- /dev/null +++ b/build_scripts/installer/120_fetch_sources @@ -0,0 +1,61 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +function fetch_src { + cd $TAR_DIR + if [ ! -f $1 ]; then + echo "fetching $1" + $CURL $2/$1 + fi + cd $CURDIR +} + +function fetch_src_untrusted { + cd $TAR_DIR + if [ ! -f $1 ]; then + echo "fetching $1" + $CURL_UNTRUSTED $2/$1 + fi + cd $CURDIR +} + +mkdir -p ${TAR_DIR} + +#set_prefix "fetch sources" +fetch_src $ANTNAME $ANTBASE +fetch_src $FTI2NAME $FTI2BASE +fetch_src_untrusted $OPENSSLNAME $OPENSSLBASE +fetch_src $TERMRLGNUNAME $TERMRLGNUBASE +fetch_src $LIBXSLTNAME $LIBXSLTBASE +fetch_src $TYPESSERIALISERNAME $TYPESSERIALISERBASE +fetch_src $COMMONSENSENAME $COMMONSENSEBASE +fetch_src $EXTUTILSNAME $EXTUTILSBASE +fetch_src $JSONXSNAME $JSONXSBASE +fetch_src $JSONMAYBEXSNAME $JSONMAYBEXSBASE +fetch_src $CANARYNAME $CANARYBASE +fetch_src $JSONNAME $JSONBASE +fetch_src $JSONPPNAME $JSONPPBASE +fetch_src $XMLSAXNAME $XMLSAXBASE +fetch_src $SVGNAME $SVGBASE +fetch_src $MODULERUNTIMENAME $MODULERUNTIMEBASE +fetch_src $NETSSLEAYNAME $NETSSLEAYBASE +fetch_src $MONGODBNAME $MONGODBBASE +fetch_src $MOZILLACANAME $MOZILLACABASE +fetch_src $BOOSTNAME $BOOSTBASE +fetch_src $GMPNAME $GMPBASE +fetch_src $MPFRNAME $MPFRBASE +fetch_src $READLINENAME $READLINEBASE +fetch_src $AUTOCONFNAME $AUTOCONFBASE +fetch_src $AUTOMAKENAME $AUTOMAKEBASE +fetch_src $LIBTOOLNAME $LIBTOOLBASE +fetch_src $NTLNAME $NTLBASE +fetch_src $CDDLIBNAME $CDDLIBBASE +fetch_src $GLPKNAME $GLPKBASE +fetch_src $NINJANAME $NINJABASE \ No newline at end of file diff --git a/build_scripts/installer/130_install_ant b/build_scripts/installer/130_install_ant new file mode 100755 index 0000000..6edf06e --- /dev/null +++ b/build_scripts/installer/130_install_ant @@ -0,0 +1,13 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "extracting ant" +#set_prefix "extracting ant" +tar xfj ${TAR_DIR}/${ANTNAME} -C ${PREFIX} \ No newline at end of file diff --git a/build_scripts/installer/140_install_boost b/build_scripts/installer/140_install_boost new file mode 100755 index 0000000..e3a5aee --- /dev/null +++ b/build_scripts/installer/140_install_boost @@ -0,0 +1,20 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "extracting boost" +#set_prefix "extracting boost" +tar xfj ${TAR_DIR}/${BOOSTNAME} -C ${PREFIX}/include + +echo "removing unneeded parts of boost" +rm -rf polymake.app/Contents/Resources/include/boost_${BOOSTVERSION}/doc +rm -rf polymake.app/Contents/Resources/include/boost_${BOOSTVERSION}/tools +rm -rf polymake.app/Contents/Resources/include/boost_${BOOSTVERSION}/status +rm -rf polymake.app/Contents/Resources/include/boost_${BOOSTVERSION}/more +rm -rf polymake.app/Contents/Resources/include/boost_${BOOSTVERSION}/libs \ No newline at end of file diff --git a/build_scripts/installer/150_install_readline b/build_scripts/installer/150_install_readline new file mode 100755 index 0000000..f98bb26 --- /dev/null +++ b/build_scripts/installer/150_install_readline @@ -0,0 +1,27 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "building readline" +#set_prefix "building readline" +mkdir -p ${TMP} +tar xfz ${TAR_DIR}/${READLINENAME} -C ${TMP} + +cd ${TMP}/readline-${READLINEVERSION} + +if [ "${MACVERSION}" = "10.8" ]; then + ${SED} -i '' -e 's|-arch_only `/usr/bin/arch`|-dynamiclib|g' support/shobj-conf; +else + ${SED} -i '' -e "s|SHOBJ_ARCHFLAGS=|SHOBJ_ARCHFLAGS=\'-dynamiclib\'|g" support/shobj-conf; +fi + +CFLAGS=${CFLAGS} CPPFLAGS=${CXXFLAGS} ./configure --prefix=${PREFIX} +make +make install +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/155_install_openssl b/build_scripts/installer/155_install_openssl new file mode 100755 index 0000000..f8f16f6 --- /dev/null +++ b/build_scripts/installer/155_install_openssl @@ -0,0 +1,16 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "building openssl" +#set_prefix "building openssl" +${FUNCDIR}/build.sh openssl-${OPENSSLVERSION} ${TAR_DIR} openssl-${OPENSSLVERSION} "${TMP}" build \ + --prefix=${PREFIX} CXXFLAGS="-I${PREFIX}/include" LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib" darwin64-x86_64-cc + +${FUNCDIR}/install.sh openssl-${OPENSSLVERSION} "${TMP}" build \ No newline at end of file diff --git a/build_scripts/installer/160_install_perl_modules b/build_scripts/installer/160_install_perl_modules new file mode 100755 index 0000000..49ce892 --- /dev/null +++ b/build_scripts/installer/160_install_perl_modules @@ -0,0 +1,103 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "building perl modules" + +tar xfz ${TAR_DIR}/${EXTUTILSNAME} -C ${TMP} +cd ${TMP}/ExtUtils-MakeMaker-${EXTUTILSVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +if [[ "$MACVERSION" == "10.14" ]]; then + CPATH_DIR=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/ +fi +if [[ "$MACVERSION" == "10.15" ]]; then + CPATH_DIR=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/ +fi +if [[ "$MACVERSION" == "11.3" ]]; then + CPATH_DIR=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE +fi +export CPATH=$CPATH_DIR +echo "building perl modules" +echo "building Term-Readline-Gnu" +tar xfz ${TAR_DIR}/${TERMRLGNUNAME} -C ${TMP} +cd ${TMP}/Term-ReadLine-Gnu-${TERMRLGNUVERSION} +${SED} -i '' -e "s|Config{cc}|Config{cc} -Wl,-rpath,${PREFIX}/lib|g" Makefile.PL +#curl -OL https://gist.githubusercontent.com/apaffenholz/9db9fd984d2608f235a73b37a3a09301/raw/99fd09a404ca6d7ed9e24b55d495703dcf3356cd/polymake-homebrew-term-readline-gnu.patch +#patch < polymake-homebrew-term-readline-gnu.patch +CPATH=$CPATH_DIR PERL5LIB=$PERL5LIB ARCHFLAGS='-arch x86_64' ${PERL} Makefile.PL --includedir=${PREFIX}/include --libdir=${PREFIX}/lib +make +make install +cd ${CURDIR} + +#tar xfz ${TAR_DIR}/${LIBXSLTNAME} -C ${TMP} +#cd ${TMP}/XML-LibXSLT-${LIBXSLTVERSION} +#ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +#cd ${CURDIR} + +tar xfz ${TAR_DIR}/${SVGNAME} -C ${TMP} +cd ${TMP}/SVG-${SVGVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${CANARYNAME} -C ${TMP} +cd ${TMP}/Canary-Stability-${CANARYVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${COMMONSENSENAME} -C ${TMP} +cd ${TMP}/common-sense-${COMMONSENSEVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${TYPESSERIALISERNAME} -C ${TMP} +cd ${TMP}/Types-Serialiser-${TYPESSERIALISERVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${JSONXSNAME} -C ${TMP} +cd ${TMP}/JSON-XS-${JSONXSVERSION} +yes | CPATH=$CPATH_DIR ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${JSONMAYBEXSNAME} -C ${TMP} +cd ${TMP}/JSON-MaybeXS-${JSONMAYBEXSVERSION} +yes | CPATH=$CPATH_DIR ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${JSONNAME} -C ${TMP} +cd ${TMP}/JSON-${JSONVERSION} +yes | ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${XMLSAXNAME} -C ${TMP} +cd ${TMP}/JSON-${XMLSAXVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${MODULERUNTIMENAME} -C ${TMP} +cd ${TMP}/Module-Runtime-${MODULERUNTIMEVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${NETSSLEAYNAME} -C ${TMP} +cd ${TMP}/Net-SSLeay-${NETSSLEAYVERSION} +yes -N | OPENSSL_PREFIX=/${PREFIX} ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +tar xfz ${TAR_DIR}/${MOZILLACANAME} -C ${TMP} +cd ${TMP}/Mozilla-CA-${MOZILLACAVERSION} +ARCHFLAGS='-arch x86_64' perl Makefile.PL INSTALL_BASE=${CPAN_BASE} && make && make install +cd $CURDIR + +curl -L https://cpanmin.us | perl - App::cpanminus +cpanm Moo +cpanm ZEFRAM/Module-Runtime-0.013.tar.gz +cpanm MongoDB diff --git a/build_scripts/installer/170_install_gmp b/build_scripts/installer/170_install_gmp new file mode 100755 index 0000000..20a0259 --- /dev/null +++ b/build_scripts/installer/170_install_gmp @@ -0,0 +1,18 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "building gmp" +echo "building gmp" +${FUNCDIR}/build.sh gmp-${GMPVERSION} ${TAR_DIR} gmp-${GMPVERSION} "${TMP}" build --prefix=${PREFIX} --enable-cxx=yes CFLAGS="${CFLAGS}" CPPFLAGS="${CXXFLAGS}" +cd ${CURDIR} + +echo "installing gmp" +${FUNCDIR}/install.sh gmp-${GMPVERSION} "${TMP}" build +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/180_install_mpfr b/build_scripts/installer/180_install_mpfr new file mode 100755 index 0000000..d8f7f26 --- /dev/null +++ b/build_scripts/installer/180_install_mpfr @@ -0,0 +1,17 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "building mpfr" +echo "building mpfr" +${FUNCDIR}/build.sh mpfr-${MPFRVERSION} ${TAR_DIR} mpfr-${MPFRVERSION} "${TMP}" build --prefix=${PREFIX} --with-gmp=${PREFIX} LDFLAGS="-Wl,-rpath,${PREFIX}/lib" CFLAGS="${CFLAGS}" CPPFLAGS="${CXXFLAGS}" + +echo "installing mpfr" +${FUNCDIR}/install.sh mpfr-${MPFRVERSION} "${TMP}" build +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/190_install_glpk b/build_scripts/installer/190_install_glpk new file mode 100755 index 0000000..afc8f8e --- /dev/null +++ b/build_scripts/installer/190_install_glpk @@ -0,0 +1,16 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "building glpk" +#set_prefix "building glpk" +${FUNCDIR}/build.sh glpk-${GLPKVERSION} ${TAR_DIR} glpk-${GLPKVERSION} "${TMP}" build \ + --prefix=${PREFIX} --with-gmp CFLAGS="-I${PREFIX}/include" CXXFLAGS="-I${PREFIX}/include" LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib" + +${FUNCDIR}/install.sh glpk-${GLPKVERSION} "${TMP}" build \ No newline at end of file diff --git a/build_scripts/installer/200_install_4ti2 b/build_scripts/installer/200_install_4ti2 new file mode 100755 index 0000000..900110c --- /dev/null +++ b/build_scripts/installer/200_install_4ti2 @@ -0,0 +1,18 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "building 4ti2" +#set_prefix "building 4ti2" +tar xfz ${TAR_DIR}/${FTI2NAME} -C ${TMP} +cd ${TMP}/4ti2-${FTI2VERSION} +./configure --prefix=${PREFIX} --with-glpk=${PREFIX} --with-gmp=${PREFIX} +make +make install +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/210_install_flint b/build_scripts/installer/210_install_flint new file mode 100755 index 0000000..82b84c2 --- /dev/null +++ b/build_scripts/installer/210_install_flint @@ -0,0 +1,36 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "building flint" +#set_prefix "building flint" +mkdir -p ${TMP}/flint +cd ${TMP}/flint +if [ ! -d .git ]; then + git clone https://github.com/wbhart/flint2.git .; +else + git pull; +fi +git checkout 272d8eb +${SED} -i '' -e 's/"$${OS}" = "Darwin"/"$${FLINT_SHARED}" -eq "1" -a "$${OS}" = "Darwin"/' Makefile.in +git archive trunk | bzip2 > ${TAR_DIR}/flint-github-${DATE}.tar.bz2 +# FIXME we do not need the shared library, but +# FIXME building with option --disable-shared fails, +# FIXME make install still tries to copy libflint.dylib +PERL5LIB=${PERL5LIB} \ + CC="${CC}" CXX="${CXX}" CPPFLAGS="-fpic -DPIC -DLIBSINGULAR" \ + LDFLAGS="-L${PREFIX}/lib/ -Wl,-rpath,${PREFIX}/lib" \ + CFLAGS="-I${PREFIX}/include/ -fpic -DPIC -DLIBSINGULAR" \ + ./configure --with-gmp=${PREFIX}/ \ + --with-mpfr=${PREFIX}/ \ + --prefix=${PREFIX} +make +make install + +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/220_install_autotools b/build_scripts/installer/220_install_autotools new file mode 100755 index 0000000..0e8c8e7 --- /dev/null +++ b/build_scripts/installer/220_install_autotools @@ -0,0 +1,33 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "building autotools" +echo "building autoconf" +mkdir -p ${TMP}/local +tar xfz ${TAR_DIR}/autoconf-${AUTOCONFVERSION}.tar.gz -C ${TMP} +cd ${TMP}/autoconf-${AUTOCONFVERSION} +./configure --prefix=${TMP}/local +make && make install +cd ${CURDIR} + +echo "building automake" +tar xfz ${TAR_DIR}/automake-${AUTOMAKEVERSION}.tar.gz -C ${TMP} +cd ${TMP}/automake-${AUTOMAKEVERSION} +PATH=${TMP}/local/bin:${PATH} ./configure --prefix=${TMP}/local +make && make install +cd ${CURDIR} + +echo "building libtool" +tar xfz ${TAR_DIR}/libtool-${LIBTOOLVERSION}.tar.gz -C ${TMP} +cd ${TMP}/libtool-${LIBTOOLVERSION} +PATH=${TMP}/local/bin:${PATH} ./configure --prefix=${TMP}/local +make && make install +cd ${CURDIR} + diff --git a/build_scripts/installer/230_install_ppl b/build_scripts/installer/230_install_ppl new file mode 100755 index 0000000..01c605d --- /dev/null +++ b/build_scripts/installer/230_install_ppl @@ -0,0 +1,35 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "building ppl" +#set_prefix "building ppl" +cd ${TMP}; mkdir -p ppl +cd ${TMP}/ppl +if [ ! -d .git ]; then + git clone git://git.bugseng.com/ppl/ppl.git .; +else + git pull; +fi +git archive master | bzip2 > ${TAR_DIR}/ppl-git-${DATE}.tar.bz2 +PATH=${TMP}/local/bin:${PATH} libtoolize --force +PATH=${TMP}/local/bin:${PATH} autoreconf -fi +export PATH=${TMP}/local/bin:${PATH} +./configure --prefix=${PREFIX} --enable-shared --with-gmp=${PREFIX} LDFLAGS="-Wl,-rpath,${PREFIX}/lib" CXXFLAGS="-m64 -mcpu=generic -march=x86-64 -stdlib=libc++ -std=c++11" CFLAGS="-m64 -mcpu=generic -march=x86-64 -stdlib=libc++" +make +${SED} 's/demos doc m4/demos m4/g' Makefile > Makefile.tmp && mv Makefile.tmp Makefile + +### fun thing: ppl puts its path into the header, so we need to fix this +echo "installing ppl" +make install +cd ${CURDIR} +cd ${PREFIX}/include; +chmod u+w ppl.hh +${SED} -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents\/Resources/\./g' ppl.hh > ppl.hh.tmp; mv ppl.hh.tmp ppl.hh +cd ${CURDIR} diff --git a/build_scripts/installer/240_install_ntl b/build_scripts/installer/240_install_ntl new file mode 100755 index 0000000..479865c --- /dev/null +++ b/build_scripts/installer/240_install_ntl @@ -0,0 +1,23 @@ +#!/bin/bash -x + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +### Caveat: The configure is not a configure but a shell script, we need to source it +### as such it also does not care about extra CXXFLAGS, so we need to modify the makefile +### we remove unwanted static lib in the end +echo "building ntl" +#set_prefix "building ntl" +tar xfz ${TAR_DIR}/ntl-${NTLVERSION}.tar.gz -C ${TMP} +cd ${TMP}/ntl-${NTLVERSION}/src +PATH=${TMP}/local/bin:${PATH} . ./configure PREFIX=${PREFIX} SHARED=on NTL_GMP_LIP=on GMP_PREFIX=${PREFIX} +${SED} -i '' -e "s|CXXFLAGS=-g -O2|CXXFLAGS=-g -O2 -std=c++11 -I${PREFIX}/include -Wl,-rpath,${PREFIX}/lib|g" makefile +make +make install +rm ${PREFIX}/lib/libntl.a +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/250_install_singular b/build_scripts/installer/250_install_singular new file mode 100755 index 0000000..3a4151f --- /dev/null +++ b/build_scripts/installer/250_install_singular @@ -0,0 +1,76 @@ +#!/bin/bash -x + + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "installing singular" + +PYTHON_CPPFLAGS_VAR= +if [ $MACVERSION == "10.15" ]; then + PYTHON_CPPFLAGS_VAR=-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 +fi + +mkdir -p ${TMP}/singular +cd ${TMP}/singular +if [ ! -d .git ]; then + git clone -b spielwiese https://github.com/Singular/Sources .; + git fetch --all --tags + git checkout tags/${SINGULARTAG} +else + git checkout spielwiese + git pull; + git fetch --all --tags + git checkout tags/${SINGULARTAG} +fi + +cd ${TMP}/singular +git archive spielwiese | bzip2 > ${TAR_DIR}/singular-github-version-${DATE}.tar.bz2 +PATH=${TMP}/local/bin:${PREFIX}/bin:${PATH} ./autogen.sh +PATH=${TMP}/local/bin:${PREFIX}/bin:${PATH} \ +./configure --without-dynamic-kernel \ + --without-MP \ + --disable-static \ + --with-ntl=${PREFIX} \ + --prefix=${PREFIX} \ + --disable-gfanlib \ + --disable-polymake \ + --enable-arith-rings \ + --with-flint=${PREFIX} \ + --with-gmp=${PREFIX} \ + --with-mpfr=${PREFIX} \ + PERL5LIB=${PERL5LIB} \ + CXXFLAGS="-fpic -std=c++11 -DPIC -DLIBSINGULAR -m64 -mcpu=generic -march=x86-64" \ + LDFLAGS="-L${PREFIX}/lib/ -Wl,-rpath,${PREFIX}/lib" \ + CPPFLAGS="-I${PREFIX}/include/ ${PYTHON_CPPFLAGS_VAR}" \ + CFLAGS=" -fpic -DPIC -DLIBSINGULAR -m64 -mcpu=generic -march=x86-64" \ + CC="${CC}" CXX="${CXX}" \ + + + +echo "compiling singular" +PATH=${TMP}/local/bin:${PATH} make -j2 + +echo "installing singular" +PATH=${TMP}/local/bin:${PATH} make install + +cd ${PREFIX}/include/resources +chmod u+w singular_resourcesconfig.h +${SED} -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents/\.\./g' singular_resourcesconfig.h > singular_resourcesconfig.h.tmp; mv singular_resourcesconfig.h.tmp singular_resourcesconfig.h +cd ${PREFIX}/share/applications/ +chmod u+w Singular-manual.desktop +${SED} -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents/\.\./g' Singular-manual.desktop > Singular-manual.desktop.tmp; mv Singular-manual.desktop.tmp Singular-manual.desktop +chmod u+w Singular.desktop +${SED} -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents/\.\./g' Singular.desktop > Singular.desktop.tmp; mv Singular.desktop.tmp Singular.desktop +cd ${PREFIX}/include/singular +chmod u+w libpolysconfig.h +chmod u+w singularconfig.h +${SED} -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents/\.\./g' libpolysconfig.h > libpolysconfig.h.tmp; mv libpolysconfig.h.tmp libpolysconfig.h +${SED} -E 's/\/[A-Z,a-z,\/]*\/polymake.app\/Contents/\.\./g' singularconfig.h > singularconfig.h.tmp; mv singularconfig.h.tmp singularconfig.h + +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/260_install_ninja b/build_scripts/installer/260_install_ninja new file mode 100755 index 0000000..f36ab2d --- /dev/null +++ b/build_scripts/installer/260_install_ninja @@ -0,0 +1,18 @@ +#!/bin/bash -x + + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +echo "installing ninja" +#set_prefix "installing ninja" +cd ${PREFIX}/bin +if [[ ! -f ninja ]]; then + unzip ${TAR_DIR}/ninja-mac.zip; +fi +cd ${CURDIR} \ No newline at end of file diff --git a/build_scripts/installer/270_install_polymake b/build_scripts/installer/270_install_polymake new file mode 100755 index 0000000..91e25a0 --- /dev/null +++ b/build_scripts/installer/270_install_polymake @@ -0,0 +1,115 @@ +#!/bin/bash -x + + + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "installing polymake" + +if [ $MACVERSION == "10.14" ] || [ $MACVERSION == "10.15" ] || [ $MACVERSION == "11.1" ] || [ $MACVERSION == "11.3" ]; then + JNIHEADERS=/Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home/include/ +fi + +echo "preparing polymake build" +mkdir -p ${TMP}/polymake; +cd ${TMP}/polymake +if [ ! -d .git ]; then + git clone --branch=${POLYMAKE_GIT_BRANCH} ${POLYMAKE_GIT_SERVER} .; \ +else + git checkout -- . && git pull; +fi +# FIXME Option without-jreality not working? +WITH_JAVA="--with-jni-headers=${JNIHEADERS} --with-java=/usr/bin/java --with-ant=${PREFIX}/apache-ant-${ANTVERSION}/bin/ant" +if [ $MACVERSION == "11.1" ]; then + WITH_JAVA="--without-java" +fi +git archive ${POLYMAKE_GIT_BRANCH} | bzip2 > ${TAR_DIR}/polymake-${POLYMAKE_GIT_BRANCH_NAME}-${DATE}.tar.bz2 +export PERL5LIB=${PREFIX}/perl5:${PREFIX}/perl5/lib/perl5 +LD_LIBRARY_PATH=${PREFIX}/lib \ + PATH=${TMP}/local/bin:${PREFIX}/bin:${PATH} \ + ./configure --prefix=${PREFIX}/polymake \ + --with-boost=${PREFIX}/include/boost_${BOOSTVERSION}/ \ + --with-gmp=${PREFIX}/ \ + --with-ppl=${PREFIX}/ \ + --with-mpfr=${PREFIX}/ \ + --without-bliss \ + --without-soplex \ + --without-java \ + --without-scip \ + LDFLAGS="-L${PREFIX}/lib/ " \ + CXXFLAGS="-fpic -DPIC -DLIBSINGULAR -m64 -march=x86-64 -I${PREFIX}/include" \ + CFLAGS="-m64 -march=x86-64 -fpic -DPIC -DLIBSINGULAR"\ + CC="${CC}" CXX="${CXX}" \ + PERL=${PERL} + +# ${WITH_JAVA} \ +# --with-singular=${PREFIX}/ \ + +echo "building polymake" +PATH=${TMP}/local/bin:${PREFIX}/bin:${PATH} ninja -C build/Opt -j2 + +echo "installing polymake" +PATH=${TMP}/local/bin:${PREFIX}/bin:${PATH} ninja -C build/Opt -j2 install + +### compile documentation +### last line: fix symbolic links, polymake creates absolute links +echo "creating polymake docs" +PATH=${TMP}/local/bin:${PREFIX}/bin:${PREFIX}/polymake/bin:${PATH} polymake --script generate_docs ${PREFIX}/polymake_docs +cd ${PREFIX}/polymake_docs +find * -type l -print | while read l; do n=`readlink $l`; name=${n#${PREFIX}}; ln -sf ../$name $l; done +cd ${CURDIR} + +### adjust the polymake script to the new paths +echo "fixing the polymake executable" +cd ${PREFIX}/polymake/bin +chmod u+w polymake +${SED} 's/.*InstallTop=.*/ $InstallTop=\"$ENV\{POLYMAKE_BASE_PATH\}\/share\/polymake\";/' polymake \ + | ${SED} 's/.*InstallArch=.*/ $InstallArch=\"$ENV\{POLYMAKE_BASE_PATH\}\/lib\/polymake\";/' \ + | ${SED} '/.*addlibs=.*/d' > polymake.tmp +mv polymake.tmp polymake +chmod u+w polymake-config +${SED} -e "s|my \$InstallArch=.*|my \$pconf_path = Cwd::abs_path(\$0) =~ s\|/bin/polymake-config\$\|\|r;xxxmy \$InstallArch=\"\$pconf_path\/lib\/polymake\";|" polymake-config \ + | ${SED} -e "s/use strict;/use strict;xxxuse Cwd;/" \ + | ${AWK} '{gsub("xxx","\n");print $0;}' \ + | ${SED} 's/my $root=.*/my $root="$pconf_path\/share\/polymake";/' > polymake-config.tmp +mv polymake-config.tmp polymake-config + + +### make polymake script executable +### shouldn't this already be the case? +echo "making polymake executable" +chmod a+rx ${PREFIX}/polymake/bin/polymake +chmod a+rx ${PREFIX}/polymake/bin/polymake-config +chmod a+rw ${PREFIX}/polymake/lib/polymake/config.ninja +${SED} "s|${PREFIX}|/Volumes/polybundle/polymake.app/Contents/Resources|g" ${PREFIX}/polymake/lib/polymake/config.ninja | ${SED} "s|ccache ||g" > ${PREFIX}/polymake/lib/polymake/config.ninja.tmp +cp ${PREFIX}/polymake/lib/polymake/config.ninja.tmp ${PREFIX}/polymake/lib/polymake/config.ninja +rm ${PREFIX}/polymake/lib/polymake/config.ninja.tmp +### this file **must** contain the absolute path to the polymake root +### hence, we need to be able to update it any time, so make it world writable +### not nice, but out of our control. It is the only option in the current polymake setup +## update is done at every start in polymake.run +chmod a+rw ${PREFIX}/polymake/lib/polymake/config.ninja + + +echo "changing default viewer to threejs" +cd ${PREFIX}/polymake/share/polymake/apps/common/rules/ +chmod u+w threejs.rules +${SED} -i "" 's/label threejs/label threejs\\\n\\\nprefer threejs\\\n' threejs.rules +chmod u-w threejs.rules +cd ${PREFIX}/polymake/share/polymake/bundled/jreality/apps/common/rules/ +chmod u+w main.rules +${SED} -i "" 's/prefer jreality.geometry//' main.rules +chmod u-w main.rules +cd ${PREFIX}/polymake/share/polymake/bundled/jreality/apps/graph/rules/ +chmod u+w main.rules +${SED} -i "" 's/prefer jreality.graph//' main.rules +chmod u-w main.rules + + +cd ${CURDIR} diff --git a/build_scripts/installer/280_fix_installation b/build_scripts/installer/280_fix_installation new file mode 100755 index 0000000..612c473 --- /dev/null +++ b/build_scripts/installer/280_fix_installation @@ -0,0 +1,53 @@ +#!/bin/bash -x + + + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "fixing installation" + +echo "fixing paths in libraries" +${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/lib ${PREFIX} dylib +${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/bin ${PREFIX} "" +${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/polymake/lib ${PREFIX} dylib +${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/polymake/lib/polymake/lib ${PREFIX} bundle +${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/polymake/lib/polymake/lib ${PREFIX} dylib +${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/perl5/lib/perl5/darwin-thread-multi-2level/auto/Term/ReadLine/Gnu ${PREFIX} bundle +${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/polymake/lib/polymake/perlx/${PERLVERSION}/darwin-thread-multi-2level/auto/Polymake/Ext ${PREFIX} bundle +for ext in ${shell ls polymake.app/Contents/Resources/polymake/lib/polymake/bundled/ | sed 's|/||'}; do \ + ${FUNCDIR}/fix_load_dylib.sh ${PREFIX}/polymake/lib/polymake/bundled/$$ext/lib ${PREFIX} bundle ; \ +done +${FUNCDIR}/fix_rpath.sh ${PREFIX}/lib ${PREFIX}/lib dylib +${FUNCDIR}/fix_rpath.sh ${PREFIX}/bin ${PREFIX}/lib "" +${FUNCDIR}/fix_rpath.sh ${PREFIX}/polymake/lib ${PREFIX}/lib dylib +${FUNCDIR}/fix_rpath.sh ${PREFIX}/polymake/lib/polymake/lib ${PREFIX}/lib bundle +${FUNCDIR}/fix_rpath.sh ${PREFIX}/polymake/lib/polymake/lib ${PREFIX}/lib dylib +${FUNCDIR}/fix_rpath.sh ${PREFIX}/polymake/lib/polymake/perlx/${PERLVERSION}/darwin-thread-multi-2level/auto/Polymake/Ext ${PREFIX}/lib bundle +for ext in ${shell ls polymake.app/Contents/Resources/polymake/lib/polymake/bundled/ | sed 's|/||'}; do \ + ${FUNCDIR}/fix_rpath.sh ${PREFIX}/polymake/lib/polymake/bundled/$$ext/lib ${PREFIX}/lib bundle ; \ +done +${FUNCDIR}/fix_libname.sh "${PREFIX}/lib" dylib "" +${FUNCDIR}/fix_libname.sh "${PREFIX}/polymake/lib" dylib "../polymake/lib" +${FUNCDIR}/fix_libname.sh "${PREFIX}/polymake/lib/polymake/lib" dylib "../polymake/lib/polymake/lib" + +cd ${CURDIR} + +### remove junk +echo "clean install" +cd polymake.app +find . -name "*.pod" -exec rm -rf {} \; +find . -name "*.3pm" -exec rm -rf {} \; +find . -name "*.packlist" -exec rm -rf {} \; +find . -name "*.la" -exec rm -rf {} \; +find . -name "*.pc" -exec rm -rf {} \; +rm -f Contents/Resources/bin/libpolys-config +rm -f Contents/Resources/bin/libsingular-config +rmdir Contents/Resources/lib/pkgconfig/ + +cd ${CURDIR} diff --git a/build_scripts/installer/290_create_documentation b/build_scripts/installer/290_create_documentation new file mode 100755 index 0000000..bc5f402 --- /dev/null +++ b/build_scripts/installer/290_create_documentation @@ -0,0 +1,90 @@ +#!/bin/bash -x + + + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "creating documentation" + + +echo "create readme source" +cd ${SCRIPTDIR} +if [[ README.tex -nt ${PREFIX}/../../../README.pdf ]]; then + cp README.tex README_tmp.tex + ${SED} -i "" -E "s/MACVERSION/${MACVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/POLYMAKELONGVERSION/${POLYMAKELONGVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/POLYMAKEVERSION/${POLYMAKEVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/ANTVERSION/${ANTVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/MPFRVERSION/${MPFRVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/GMPVERSION/${GMPVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/BOOSTVERSION/${BOOSTVERSIONDIR}/g" README_tmp.tex + ${SED} -i "" -E "s/READLINEVERSION/${READLINEVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/CDDVERSION/${CDDVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/GLPKVERSION/${GLPKVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/FTI2VERSION/${FTI2VERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/TERMRLGNUVERSION/${TERMRLGNUVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/LIBXSLTVERSION/${LIBXSLTVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/JSONXSVERSION/${JSONXSVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/JSONVERSION/${JSONVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/CANARYERSION/${CANARYVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/SINGULARVERSION/${SINGULARVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/PPLVERSION/${PPLVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/NORMALIZVERSION/${NORMALIZVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/LRSVERSION/${LRSVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/NAUTYVERSION/${NAUTYVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/JREALITYVERSION/${JREALITYVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/PERMLIBVERSION/${PERMLIBVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/NTLVERSION/${NTLVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/NINJAVERSION/${NINJAVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/JSONMAYBEXSVERSION/${JSONMAYBEXSVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/PERMLIBVERSION/${PERMLIBVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/OPENSSLVERSION/${OPENSSLVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/NTLVERSION/${NTLVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/MODULERUNTIMEVERSION/${MODULERUNTIMEVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/NETSSLEAYVERSION/${NETSSLEAYVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/MOZILLACAVERSION/${MOZILLACAVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s/COMMONSENSEVERSION/${COMMONSENSEVERSION}/g" README_tmp.tex + ${SED} -i "" -E "s|POLYMAKEHOME|${POLYMAKEHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|ANTHOME|${ANTHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|MPFRHOME|${MPFRHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|GMPHOME|${GMPHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|BOOSTHOME|${BOOSTHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|READLINEHOME|${READLINEHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|CDDHOME|${CDDHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|GLPKHOME|${GLPKHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|FTI2HOME|${FTI2HOME}|g" README_tmp.tex + ${SED} -i "" -E "s|TERMRLGNUHOME|${TERMRLGNUHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|LIBXSLTHOME|${LIBXSLTHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|JSONXSHOME|${JSONXSHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|JSONHOME|${JSONHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|OPENSSLHOME|${OPENSSLHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|JSONMAYBEXSHOME|${JSONMAYBEXSHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|NETSSLEAYHOME|${NETSSLEAYHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|MOZILLACAHOME|${MOZILLACAHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|COMMONSENSEHOME|${COMMONSENSEHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|MODULERUNTIMEHOME|${MODULERUNTIMEHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|CANARYHOME|${CANARYHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|SINGULARHOME|${SINGULARHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|PPLHOME|${PPLHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|NORMALIZHOME|${NORMALIZHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|LRSHOME|${LRSHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|NAUTYHOME|${NAUTYHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|JREALITYHOME|${JREALITYHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|PERMLIBHOME|${PERMLIBHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|NTLHOME|${NTLHOME}|g" README_tmp.tex + ${SED} -i "" -E "s|NINJAHOME|${NINJAHOME}|g" README_tmp.tex +fi; + +echo "compile readme" +cd ${SCRIPTDIR} +if [[ README.tex -nt ${PREFIX}/../../../README.pdf ]]; then + PATH="/usr/local/texlive/2017basic/bin/x86_64-darwin/":$PATH pdflatex README_tmp + PATH="/usr/local/texlive/2017basic/bin/x86_64-darwin/":$PATH pdflatex README_tmp + mv README_tmp.pdf ${PREFIX}/../../../README.pdf && rm -f README_tmp.aux README_tmp.log README_tmp.out +fi \ No newline at end of file diff --git a/build_scripts/installer/300_diskimage b/build_scripts/installer/300_diskimage new file mode 100755 index 0000000..7068ea3 --- /dev/null +++ b/build_scripts/installer/300_diskimage @@ -0,0 +1,47 @@ +#!/bin/bash -x + + + +DIR="$(cd "$(dirname "$0")" && pwd)" +export SCRIPTDIR=${DIR}/.. +if [[ -z ${VAR_READ} ]]; then + . ${SCRIPTDIR}/versions + . ${SCRIPTDIR}/variables +fi +. ${SCRIPTDIR}/installer/functions + +#set_prefix "creating dmg" + +if [ -d /Volumes/polybundle ]; then + echo "bundle dmg is already mounted, exiting"; + exit; +fi; + +# change into the base directory +BUNDLEDIR=$1 +SED="/usr/bin/sed" + +mkdir -p ${CURDIR}/dmg + +cd ${CURDIR}/dmg +hdiutil convert ${SCRIPTDIR}/template.dmg -format UDSP -o polybundle + +hdiutil mount polybundle.sparseimage + +sudo cp -a ${CURDIR}/polymake.app /Volumes/polybundle/ +chmod a-w /Volumes/polybundle/polymake.app/Contents/Resources/polymake/lib/polymake/lib/*.bundle +sudo cp -a ${TAR_DIR} /Volumes/polybundle/src +sudo cp -a ${SCRIPTBASE}/bundle_scripts /Volumes/polybundle/src +sudo cp -a ${SCRIPTDIR} /Volumes/polybundle/src +sudo cp -a ${CURDIR}/README.pdf /Volumes/polybundle/ + +hdiutil eject /Volumes/polybundle + +cd ${CURDIR}/dmg +hdiutil convert polybundle.sparseimage -format UDBZ -o ${CURDIR}/dmg/polybundle.dmg + +cd .. +mv ${CURDIR}/dmg/polybundle.dmg ${CURDIR} +rm -rf ${CURDIR}/dmg + +echo "Now you can set the icon of the dmg. (Open the Info window of polybundle.dmg with Cmd-I and then drag the file bundle_scripts/pm-cube.icns onto the icon in the upper left corner of the Info window.)" diff --git a/build_scripts/installer/functions b/build_scripts/installer/functions new file mode 100644 index 0000000..5d02b9a --- /dev/null +++ b/build_scripts/installer/functions @@ -0,0 +1,6 @@ +#!/bin/sh -x + +set_prefix() { + exec 1>&3 2>&4 + exec 3>&1 4>&2 1> >(sed "s/^/$1: /") 2>&1 +} \ No newline at end of file diff --git a/build_scripts/setup.py.diff b/build_scripts/setup.py.diff new file mode 100644 index 0000000..9d0ff11 --- /dev/null +++ b/build_scripts/setup.py.diff @@ -0,0 +1,13 @@ +--- setup.py 2018-02-28 12:14:06.000000000 +0100 ++++ setup.py 2018-02-23 14:14:10.000000000 +0100 +@@ -28,8 +28,8 @@ + os.environ["CC"] = polymake_cc + os.environ["CXX"] = polymake_cc + if platform.system() == "Darwin" : +- version = platform.mac_ver()[0] +- os.environ["MACOSX_DEPLOYMENT_TARGET"] = version.rsplit('.',1)[0] ++ version_arr = platform.mac_ver()[0].split('.') ++ os.environ["MACOSX_DEPLOYMENT_TARGET"] = version_arr[0]+'.'+version_arr[1] + + setup( + name = 'JuPyMake', diff --git a/template.dmg b/build_scripts/template.dmg similarity index 100% rename from template.dmg rename to build_scripts/template.dmg diff --git a/build_scripts/variables b/build_scripts/variables new file mode 100755 index 0000000..31b1800 --- /dev/null +++ b/build_scripts/variables @@ -0,0 +1,38 @@ +#!/bin/sh + +export VAR_READ=1 + +export SCRIPTBASE=${SCRIPTDIR}/.. +export INSTALLSCRIPTDIR=${SCRIPTDIR}/installer +export FUNCDIR=${SCRIPTDIR}/functions + +export CURDIR=$(pwd) +export TAR_DIR=${CURDIR}/src +export TMP=${CURDIR}/tmp/ + +export SED=/usr/bin/sed +export AWK=/usr/bin/awk +export PERL=/usr/bin/perl +export CURL="/usr/bin/curl -O -L" +export CURL_UNTRUSTED="/usr/bin/curl -k -O -L" +export DATE=$(date +'%Y-%m-%d') + +export MACVERSION=$(sw_vers | grep -o "1[0,1][.][0-9]\+") +export PERLVERSION=$(${PERL} --version | grep -o "5[.][0-9]*[.][0-9]") +export PREFIX=${CURDIR}/polymake.app/Contents/Resources + +export CC="clang" +export CXX="clang++" + +export CFLAGS="-m64 -march=x86-64 -fpic -DPIC" +export CXXFLAGS="-m64 -march=x86-64 -fpic -DPIC" + + +export CPAN_BASE=${PREFIX}/perl5 +export PERL_LOCAL_LIB_ROOT="$CPAN_BASE"; +export PERL5LIB="$CPAN_BASE/lib/perl5"; +export PATH="$CPAN_BASE/bin:$PATH"; +export PERL_MB_OPT="--install_base $CPAN_BASE" +export PERL_MM_OPT="INSTALL_BASE=$CPAN_BASE" + +export OUTFILE=${CURDIR}/install.log \ No newline at end of file diff --git a/build_scripts/versions b/build_scripts/versions new file mode 100755 index 0000000..a0ec5c0 --- /dev/null +++ b/build_scripts/versions @@ -0,0 +1,191 @@ +#!/bin/bash + +export POLYMAKEVERSION=4.9 +export POLYMAKELONGVERSION="Release 4.9 of January 2023" +export POLYMAKEHOME=https://github.com/polymake/polymake +export POLYMAKE_GIT_SERVER_RELEASE="https://github.com/polymake/polymake.git" +export POLYMAKE_GIT_BRANCH_RELEASE='Releases' +export POLYMAKE_GIT_SERVER_DEVEL="git@git.polymake.org:polymake" +export POLYMAKE_GIT_BRANCH_DEVEL='master' + +export POLYMAKE_GIT_BRANCH=${POLYMAKE_GIT_BRANCH_RELEASE} +export POLYMAKE_GIT_SERVER=${POLYMAKE_GIT_SERVER_RELEASE} + +export ANTVERSION=1.10.13 +export ANTHOME=http://ant.apache.org/ +export ANTNAME=apache-ant-$ANTVERSION-bin.tar.bz2 +export ANTBASE=http://artfiles.org/apache.org//ant/binaries + +# the newer 2.70 does not work +export AUTOCONFVERSION=2.69 +export AUTOCONFHOME=https://www.gnu.org/software/autoconf/ +export AUTOCONFNAME=autoconf-$AUTOCONFVERSION.tar.gz +export AUTOCONFBASE=http://ftp.gnu.org/gnu/autoconf + +export AUTOMAKEVERSION=1.16 +export AUTOMAKEHOME=https://www.gnu.org/software/automake/ +export AUTOMAKENAME=automake-$AUTOMAKEVERSION.tar.gz +export AUTOMAKEBASE=http://ftp.gnu.org/gnu/automake + +export BOOSTVERSION=1_81_0 +export BOOSTVERSIONDIR=1.81.0 +export BOOSTHOME=http://www.boost.org/ +export BOOSTNAME=boost_$BOOSTVERSION.tar.bz2 +export BOOSTBASE=https://boostorg.jfrog.io/artifactory/main/release/$BOOSTVERSIONDIR/source/ + +export CANARYVERSION=2013 +export CANARYHOME=https://metacpan.org/pod/Canary::Stability +export CANARYNAME=Canary-Stability-$CANARYVERSION.tar.gz +export CANARYBASE=https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN + +export CDDLIBVERSION=0.94m +export CDDHOME=http://www.inf.ethz.ch/personal/fukudak/cdd_home/ +export CDDLIBNAME=cddlib-$CDDLIBVERSION.tar.gz +export CDDLIBBASE=https://github.com/cddlib/cddlib/releases/download/0.94m + +export FTI2VERSION=1.6.9 +export FTI2VERSION_DIR=1_6_9 +export FTI2HOME=http://www.4ti2.de/ +export FTI2NAME=4ti2-$FTI2VERSION.tar.gz +export FTI2BASE=https://github.com/4ti2/4ti2/releases/download/Release_$FTI2VERSION_DIR + +export GLPKVERSION=5.0 +export GLPKHOME=https://www.gnu.org/software/glpk/ +export GLPKNAME=glpk-$GLPKVERSION.tar.gz +export GLPKBASE=http://ftp.gnu.org/gnu/glpk + +export OPENSSLVERSION=1.1.1t +export OPENSSLHOME=https://www.openssl.org +export OPENSSLNAME=openssl-$OPENSSLVERSION.tar.gz +export OPENSSLBASE=https://www.openssl.org/source/ + +export GMPVERSION=6.2.1 +export GMPMINORVERSION= +export GMPHOME=http://gmplib.org/ +export GMPNAME=gmp-$GMPVERSION$GMPMINORVERSION.tar.bz2 +export GMPBASE=https://gmplib.org/download/gmp + +export JREALITYVERSION= +export JREALITYHOME=http://www3.math.tu-berlin.de/jreality + +export JSONVERSION=4.10 +export JSONHOME=https://metacpan.org/pod/JSON +export JSONNAME=JSON-$JSONVERSION.tar.gz +export JSONBASE=https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI + +export EXTUTILSVERSION=7.66 +export EXTUTILSHOME=https://metacpan.org/pod/ExtUtils::MakeMaker +export EXTUTILSNAME=ExtUtils-MakeMaker-$EXTUTILSVERSION.tar.gz +export EXTUTILSBASE=https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ + +export JSONPPVERSION=4.16 +export JSONPPHOME=https://metacpan.org/pod/JSON::PP +export JSONPPNAME=JSON-PP-$JSONPPVERSION.tar.gz +export JSONPPBASE=https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI + +export XMLSAXVERSION=1.02 +export XMLSAXHOME=https://metacpan.org/pod/XML::SAX +export XMLSAXNAME=XML-SAX-$XMLSAXVERSION.tar.gz +export XMLSAXBASE=https://cpan.metacpan.org/authors/id/G/GR/GRANTM/ + +export JSONMAYBEXSVERSION=1.004004 +export JSONMAYBEXSHOME=https://metacpan.org/pod/JSON::MaybeXS +export JSONMAYBEXSNAME=JSON-MaybeXS-$JSONMAYBEXSVERSION.tar.gz +export JSONMAYBEXSBASE=https://cpan.metacpan.org/authors/id/E/ET/ETHER + +export TYPESSERIALISERVERSION=1.01 +export TYPESSERIALISERHOME=https://metacpan.org/pod/Types::Serialiser +export TYPESSERIALISERNAME=Types-Serialiser-$TYPESSERIALISERVERSION.tar.gz +export TYPESSERIALISERBASE=https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/ + +export COMMONSENSEVERSION=3.75 +export COMMONSENSEVHOME=https://metacpan.org/pod/distribution/common-sense/sense.pod +export COMMONSENSENAME=common-sense-$COMMONSENSEVERSION.tar.gz +export COMMONSENSEBASE=https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/ + +export JSONXSVERSION=4.03 +export JSONXSHOME=https://metacpan.org/pod/JSON::XS +export JSONXSNAME=JSON-XS-$JSONXSVERSION.tar.gz +export JSONXSBASE=https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN + +export MODULERUNTIMEVERSION=0.016 +export MODULERUNTIMEHOME=https://metacpan.org/pod/Module::Runtime +export MODULERUNTIMENAME=Module-Runtime-$MODULERUNTIMEVERSION.tar.gz +export MODULERUNTIMEBASE=https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/ + +export NETSSLEAYVERSION=1.92 +export NETSSLEAYHOME=https://metacpan.org/pod/Net::SSLeay +export NETSSLEAYNAME=Net-SSLeay-$NETSSLEAYVERSION.tar.gz +export NETSSLEAYBASE=https://cpan.metacpan.org/authors/id/C/CH/CHRISN/ + +export MONGODBVERSION=v2.2.2 +export MONGODBHOME=https://metacpan.org/pod/MongoDB#VERSION +export MONGODBNAME=MongoDB-$MONGODBVERSION.tar.gz +export MONGODBBASE=https://cpan.metacpan.org/authors/id/M/MO/MONGODB/ + +export MOZILLACAVERSION=20221114 +export MOZILLACAHOME=https://metacpan.org/pod/Mozilla::CA +export MOZILLACANAME=Mozilla-CA-$MOZILLACAVERSION.tar.gz +export MOZILLACABASE=https://cpan.metacpan.org/authors/id/A/AB/ABH/ + +export LIBTOOLVERSION=2.4.6 +export LIBTOOLHOME= +export LIBTOOLNAME=libtool-$LIBTOOLVERSION.tar.gz +export LIBTOOLBASE=http://ftp.gnu.org/gnu/libtool + +export LIBXSLTVERSION=2.002001 +export LIBXSLTHOME=http://search.cpan.org/~shlomif/XML-LibXSLT/ +export LIBXSLTNAME=XML-LibXSLT-$LIBXSLTVERSION.tar.gz +export LIBXSLTBASE=http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF + +export LRSVERSION=7.2 +export LRSHOME=http://cgm.cs.mcgill.ca/~avis/C/lrs.html + +export MPFRVERSION=4.2.0 +export MPFRHOME=http://mpfr.org/ +export MPFRNAME=mpfr-$MPFRVERSION.tar.bz2 +export MPFRBASE=http://www.mpfr.org/mpfr-$MPFRVERSION + +export NAUTYVERSION= +export NAUTYHOME=http://cs.anu.edu.au/~bdm/nauty/ + +export NINJAVERSION="v1.11.1" +export NINJANAME=ninja-mac.zip +export NINJAHOME=https://ninja-build.org/ +export NINJABASE=https://github.com/ninja-build/ninja/releases/download/$NINJAVERSION + +export NORMALIZVERSION=3.8.9 +export NORMALIZHOME=https://www.normaliz.uni-osnabrueck.de + +export NTLVERSION=11.5.1 +export NTLNAME=ntl-$NTLVERSION.tar.gz +export NTLHOME=http://www.shoup.net/ntl/ +export NTLBASE=http://www.shoup.net/ntl + +export PERMLIBVERSION= +export PERMLIBHOME=http://www.math.uni-rostock.de/~rehn/software/permlib.html + +export PPLVERSION=1.2 +export PPLHOME=http://bugseng.com/products/ppl/ + +export READLINEVERSION=8.2 +export READLINEHOME=http://tiswww.case.edu/php/chet/readline/rltop.html +export READLINENAME=readline-$READLINEVERSION.tar.gz +export READLINEBASE=ftp://ftp.cwru.edu/pub/bash/ + +export SINGULARVERSION=4.2.0 +export SINGULARTAG=Release-4-2-0 +export SINGULARHOME=https://github.com/Singular/ + +export SVGVERSION=2.87 +export SVGHOME=http://search.cpan.org/~manwar/SVG/ +export SVGNAME=SVG-$SVGVERSION.tar.gz +export SVGBASE=http://search.cpan.org/CPAN/authors/id/M/MA/MANWAR + +export TERMRLGNUVERSION=1.45 +export TERMRLGNUHOME=http://search.cpan.org/dist/Term-ReadLine-Gnu/ +export TERMRLGNUNAME=Term-ReadLine-Gnu-$TERMRLGNUVERSION.tar.gz +export TERMRLGNUBASE=http://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI + + +export JNIHEADERS=/System/Library/Frameworks/JavaVM.framework/Headers/ diff --git a/scripts/Info.plist b/bundle_scripts/Info.plist similarity index 100% rename from scripts/Info.plist rename to bundle_scripts/Info.plist diff --git a/scripts/Singular b/bundle_scripts/Singular similarity index 100% rename from scripts/Singular rename to bundle_scripts/Singular diff --git a/bundle_scripts/debug.commands b/bundle_scripts/debug.commands new file mode 100644 index 0000000..ffeffe6 --- /dev/null +++ b/bundle_scripts/debug.commands @@ -0,0 +1,33 @@ +use application "polytope"; + +# try some compilations +my $s=new Array>(3); + +my $h=new HashMap,Rational>; + +my $c=cube(3); + +# check libnormaliz and 4ti2 +$c->HILBERT_BASIS; + +$c->EHRHART_POLYNOMIAL; + +# check threejs +$c->VISUAL; + +# check singular +use application "fulton"; + +my $c = new Cone(INPUT_RAYS=>[[-1,1],[0,1],[1,1]]); + +my $tv = new NormalToricVariety($c); + +my $toric = $c->TORIC_IDEAL; + +singular_eval("listvar();"); + +my $radical = $toric->RADICAL; + +print join("\n", @{$radical->GENERATORS}); + +singular_eval("listvar();"); diff --git a/scripts/graph.icns b/bundle_scripts/graph.icns similarity index 100% rename from scripts/graph.icns rename to bundle_scripts/graph.icns diff --git a/scripts/pm-cube.icns b/bundle_scripts/pm-cube.icns similarity index 100% rename from scripts/pm-cube.icns rename to bundle_scripts/pm-cube.icns diff --git a/scripts/poly.icns b/bundle_scripts/poly.icns similarity index 100% rename from scripts/poly.icns rename to bundle_scripts/poly.icns diff --git a/bundle_scripts/polymake b/bundle_scripts/polymake new file mode 100755 index 0000000..53db975 --- /dev/null +++ b/bundle_scripts/polymake @@ -0,0 +1,15 @@ +#!/bin/sh + +if [[ -f $HOME/.polymake-macbundle/bundle.config ]]; then +. $HOME/.polymake-macbundle/bundle.config +fi + +term="Terminal" +if [[ -n "${POLYMAKE_TERM}" ]]; then + term=${POLYMAKE_TERM} +fi + +dirtmp=$(cd "$(dirname "$0")"; pwd) +dir=`echo $dirtmp | awk '{ print $1 }'` +open -a $term $dir/polymake.run +exit 0 diff --git a/scripts/polymake.debug b/bundle_scripts/polymake.debug similarity index 59% rename from scripts/polymake.debug rename to bundle_scripts/polymake.debug index d3be740..274bb96 100755 --- a/scripts/polymake.debug +++ b/bundle_scripts/polymake.debug @@ -1,7 +1,9 @@ #!/bin/bash +echo -ne "\033]0;polymake\007" dir=$(cd "$(dirname "$0")"; pwd) -ResourcesDir="$dir/../Resources/" +ResourcesDir="${dir%MacOS}Resources" +BundleBase=${ResourcesDir%/polymake.app/Contents/Resources} alias perl=/usr/bin/perl @@ -10,52 +12,22 @@ perlversion=`/usr/bin/perl --version | grep -o "5[.][0-9]*[.][0-9]"` COMMAND="" [[ "$1" == "-c" ]] && COMMAND="--script $ResourcesDir/debug.commands" -if [ "$perlversion" != "REPLACE_PERLVERSION" ]; then - echo "==========================================================================" - echo "your perl version does not match the perl version this app was built for"; - echo "please download and install the version of polymake that corresponds" - echo "to the version of your system perl" - echo "You can find the version number by executing" - echo "/usr/bin/perl --version" - echo "in a terminal." - echo "If there is no version of the polymake app matching your perl version" - echo "please contact us at http://forum.polymake.org" - echo "==========================================================================" -fi; - -if [ -f ${HOME}/.polymake-macbundle/customize.pl ]; then - base=`grep -m 1 "polymake.app/Contents/MacOS" ${HOME}/.polymake-macbundle/customize.pl` - if [[ ! -z "$base" ]] && [[ ! $base =~ $ResourcesDir ]]; then - echo "=========================================================================" - echo "Your polymake customization files in" - echo - echo "${HOME}/.polymake-macbundle" - echo - echo "correspond to a different installation of polymake" - echo "(or you have moved your installation to a different location on your Mac)" - echo "if you continue then all files in this directory will be reset to default values". - echo "If you have imported extensions into polymake then you have to reset those" - echo " prior to starting polymake, " - echo "similarly, if you want to save some of your previous settings you should abort now" - echo "(see the README.pdf that came with the bundle if you need help)" - echo "otherwise you can continue now" - read -p "[a]bort or [c]ontinue? " - [ "$REPLY" == "c" ] || exit - rm -rf "${HOME}/.polymake-macbundle" - fi -fi - # the user might have a 32bit version of fink which conflicts with 64bit polymake, so unset VERSIONER_PERL_PREFER_32_BIT -export PATH=$PATH:${ResourcesDir}/bin -export POLYMAKE_USER_DIR="${HOME}/.polymake-macbundle" +export PATH=${ResourcesDir}/polymake/bin:${ResourcesDir}/bin:$PATH +#export POLYMAKE_CONFIG_PATH="$ResourcesDir/config;user" +export POLYMAKE_USER_DIR="${HOME}/.polymake-macbundle-debug" export POLYMAKE_BASE_PATH=$ResourcesDir/polymake -export LD_LIBRARY_PATH=$ResourcesDir/lib:$ResourcesDir/include/boost_1_47_0/:$LD_LIBRARY_PATH +export DYLD_LIBRARY_PATH=$ResourcesDir/lib:$ResourcesDir/include/boost_1_66_0/:$DYLD_LIBRARY_PATH export CPLUS_INCLUDE_PATH=$ResourcesDir/include/ export CFLAGS=-I$ResourcesDir/include/ export CPPFLAGS=-I$ResourcesDir/include/ -export PERL5LIB=$ResourcesDir/lib/perl5/site_perl/REPLACE_PERLVERSION/darwin-thread-multi-2level/:$ResourcesDir/polymake/lib/polymake/lib/:$ResourcesDir/lib/perl5/:$ResourcesDir/polymake/lib/polymake/perlx/:$ResourcesDir/polymake/share/polymake/perllib/:$PERL5LIB +export PERL5LIB="$ResourcesDir/perl5:$ResourcesDir/perl5/lib/perl5:$ResourcesDir/perl5/lib/perl5/darwin-thread-multi-2level/\ +:$ResourcesDir/polymake/lib/polymake/lib/\ +:$ResourcesDir/polymake/lib/polymake/perlx/\ +:$ResourcesDir/polymake/share/polymake/perllib/\ +${PERL5LIB+:$PERL5LIB}" # seems necessary, why? dir=$(cd "$(dirname "$0")"; pwd) @@ -76,6 +48,10 @@ perl --version >>$LOGFILE echo "---------------" >>$LOGFILE echo "perl path: " >>$LOGFILE which perl >> $LOGFILE +echo "perl version test:" >> $LOGFILE +echo "testing for perl version: REPLACE_PERLVERSION" >> $LOGFILE +echo "result is: " >> $LOGFILE +perlversion=`/usr/bin/perl --version | grep -o "5[.][0-9]*[.][0-9]"`; if [ "$perlversion" != "REPLACE_PERLVERSION" ]; then echo "version is not correct"; else echo "version is correct"; fi >> $LOGFILE echo "---------------" >>$LOGFILE echo >>$LOGFILE @@ -94,7 +70,7 @@ echo "---------------" >>$LOGFILE echo >>$LOGFILE echo "clang version" >>$LOGFILE echo "-----------------" >>$LOGFILE -g++ --version >>$LOGFILE +g++ --version >> $LOGFILE 2>&1 echo "---------------" >>$LOGFILE echo >>$LOGFILE @@ -119,7 +95,7 @@ echo "---------------" >>$LOGFILE echo >>$LOGFILE echo "Perl load path of Term::Readline" >>$LOGFILE echo "-----------------" >>$LOGFILE -perl -M'Term::Readline' -e 'print join "\n", %INC' >>$LOGFILE +perl -M'Term::ReadLine' -e 'print join "\n", %INC' >>$LOGFILE echo >>$LOGFILE echo "---------------" >>$LOGFILE @@ -158,11 +134,9 @@ echo "-----------------" >>$LOGFILE echo "\n\n-----------------" >>$LOGFILE echo "contents of conf.make" >>$LOGFILE echo "-----------------" >>$LOGFILE -cat $ResourcesDir/polymake/lib/polymake/conf.make >>$LOGFILE +cat $ResourcesDir/polymake/lib/polymake/config.ninja >>$LOGFILE echo "-----------------" >>$LOGFILE -lib/polymake/conf.make - # start polymake $ResourcesDir/polymake/bin/polymake -ddd $COMMAND 2>> $LOGFILE [[ $COMMAND != "" ]] && $ResourcesDir/polymake/bin/polymake -ddd 'my $x=1' 2>> $LOGFILE \ No newline at end of file diff --git a/scripts/polymake.icns b/bundle_scripts/polymake.icns similarity index 100% rename from scripts/polymake.icns rename to bundle_scripts/polymake.icns diff --git a/bundle_scripts/polymake.run b/bundle_scripts/polymake.run new file mode 100755 index 0000000..52d9288 --- /dev/null +++ b/bundle_scripts/polymake.run @@ -0,0 +1,204 @@ +#!/bin/bash + +dirtmp=$(cd "$(dirname "$0")"; pwd) +dir=`echo $dirtmp | awk '{ print $1 }'` + +ResourcesDir="${dir%MacOS}Resources" +BundleBase=${ResourcesDir%/polymake.app/Contents/Resources} + +write_default_config=0 + +alias perl=/usr/bin/perl +perlversion=`/usr/bin/perl --version | grep -o "5[.][0-9]*[.][0-9]"` + +debug=0 +polymake_user_dir=".polymake-macbundle" +if [[ "$#" -gt "0" ]]; then + if [[ "$1" = "-d" ]]; then + shift; + polymake_user_dir=".polymake-macbundle-debug" + debug=1; + fi; +fi; + +if [ "$perlversion" != "REPLACE_PERLVERSION" ]; then + echo "==========================================================================" + echo "your perl version ($perlversion) does not match the perl version this" + echo "app was built for (REPLACE_PERLVERSION)" + echo "please download and install the version of polymake that corresponds" + echo "to the version of your system perl" + echo "You can find the version number by executing" + echo "/usr/bin/perl --version" + echo "in a terminal." + echo "If there is no version of the polymake app matching your perl version" + echo "please contact us at http://forum.polymake.org" + echo "==========================================================================" + exit +fi; + +if [[ -f $HOME/$polymake_user_dir/bundle.config ]]; then +. $HOME/$polymake_user_dir/bundle.config + if [[ "$POLYMAKE_BASE_DIR" != "$dir" ]]; then + echo "=========================================================================" + echo "Your polymake customization files in" + echo + echo "${HOME}/$polymake_user_dir" + echo + echo "correspond to a different installation of polymake" + echo "(or you have moved your installation to a different location on your Mac)" + echo "if you continue then all files in this directory will be reset " + echo "to default values". + echo + echo "If you have imported extensions into polymake then you should call" + echo "make clean" + echo "in all extension base directories befor you continue " + echo "and reimport them into polymake afterwards." + echo + echo "If you have activated the jupyter version of polymake " + echo "you will have to redo your changes to the file" + echo "bundle.config and at least reactivate the jupyter version." + echo "The file will be rewritten with its default values " + echo "if you continue." + echo + echo "If you have a saved copy of bundle.config and want to put " + echo "this back to ~/$polymake_user_dir, then" + echo "make sure that POLYMAKE_JUPYTER_FORCE_REINSTALL is set to 1." + echo + echo "If you want to save some of your previous settings you should abort now" + echo "(see the README.pdf that came with the bundle if you need help)" + echo "otherwise you can continue" + read -p "[a]bort or [c]ontinue? " + [ "$REPLY" == "c" ] || exit + rm -rf "${HOME}/$polymake_user_dir" + write_default_config=1 + fi +else + write_default_config=1 +fi + +if [[ $write_default_config == 1 ]]; then + mkdir -p $HOME/$polymake_user_dir + cat <> $HOME/$polymake_user_dir/bundle.config + # The terminal app used to start polymake, either Terminal or iTerm + # POLYMAKE_TERM=Terminal + + # This variable determines whether polymake should run in a terminal or start a jupyter notebook + # 0: start in a terminal + # 1: use jupyter + # Note that this still opens a terminal to start the notebook server + # and then switches to your default web browser to open a notebook. + # Choose "polymake" in the menu "new" on the top right corner to start polymake. + # You have to close the notebook server yourself in this terminal + # after you finished the polymake notebook by typing Ctrl^c twice. + POLYMAKE_START_IN_JUPYTER=0 + + # Set the initial directory for your jupyter notebooks + # the default value is your home directory + # it is recommended to change this to something else, otherwise this will clutter your home with + # notebook files for each run of polymake + # the path can either be absolute or relative to your home directory (e.g. "~/Documents") + # the directory must exist, it will not be created + # POLYMAKE_JUPYTER_NOTEBOOK_DIR= + + # The ip the jupyter server connects to + # by default this is localhost + # you have to set this variable if you start polymake remotely and want to connect to it from another machine + # if you start polymake in a virtual machine and want to connect from the host, then 0.0.0.0 is a suitable choice + # POLYMAKE_JUPYTER_IP= + + # Set the port for the jupyter server + # by default, this is 8888 if it is available, or the next available port above 8888 if this is taken + # note that jupyter will choose another port if the port you provide is already taken + # POLYMAKE_JUPYTER_PORT=8888 + + # Set this to 0 if only the server should be started + # but no notebook should be opened in a browser + # e.g. when you start this remotely or in a vm and + # want to access the jupyter server from another machine or the vm host + POLYMAKE_JUPYTER_START_BROWSER=1 + + # Should polymake ask whether you want to start a new jupyter server if it detects an already running one? + POLYMAKE_JUPYTER_ASK_IF_RUNNING_SERVER=1 + + # Set the browser jupyter uses to start the notebook + # To use e.g.Chrome you shoud set this to + # POLYMAKE_JUPYTER_BROWSER='/Applications/Vivaldi.app/Contents/MacOS/Vivaldi %s' + # POLYMAKE_JUPYTER_BROWSER= + + # set this to 1 if you want to force a recompilation of the jupyter kernel + # the variable should be set to 1 if you have not yet started polymake in jupyter + # or have relocated the bundle to a different directory + POLYMAKE_JUPYTER_FORCE_REINSTALL=1 + + # additional path variables + # POLYMAKE_ADD_PATH= + + # Please do not edit the following line +EOT +echo " POLYMAKE_BASE_DIR=$dir" >> $HOME/$polymake_user_dir/bundle.config +. $HOME/$polymake_user_dir/bundle.config +fi + +if [[ -n $POLYMAKE_ADD_PATH ]]; then + export PATH=$PATH:$POLYMAKE_ADD_PATH +fi + +root=`grep -m 1 "root=.*" $ResourcesDir/polymake/lib/polymake/config.ninja | sed -Ee "s|root=(.*)/polymake.app/Contents/Resources/polymake/share/polymake|\1|"` +if [[ -z "$root" ]]; then + echo "polymake build configure file is missing" + echo "This should not happen. Your bundle seems to be corrupt. Please reinstall." + exit +fi + +if [[ ! $root =~ ${BundleBase} ]]; then + echo "=========================================================================" + echo "The bundle is started for the first time or has been relocated. Updating the configuration file..." + tfile=$(mktemp /tmp/polybundle.XXXXXXXXX) + sed "s|$root|$BundleBase|g" $ResourcesDir/polymake/lib/polymake/config.ninja > $tfile && cp $tfile $ResourcesDir/polymake/lib/polymake/config.ninja && rm $tfile + echo "...done" +fi + +if [[ $POLYMAKE_START_IN_JUPYTER == 0 || "$#" -gt "0" || $debug == 1 ]]; then + if [[ $debug == 1 ]]; then + $dir/polymake.debug $@ + else + $dir/polymake.start $@ + fi; +else + options=() + if [[ $POLYMAKE_JUPYTER_ASK_IF_RUNNING_SERVER == 1 && $POLYMAKE_JUPYTER_FORCE_REINSTALL == 0 ]]; then + if [[ `jupyter notebook list | grep http` ]]; then + echo "Running jupyter server on your machine detected." + read -p "Do you want to start a new one (y/n)?" + while [[ "$REPLY" != "y" && "$REPLY" != "n" ]]; do + read -p "Please type y or n" + done + if [[ "$REPLY" == n ]]; then + exit 0 + fi + fi + fi + if [[ $POLYMAKE_JUPYTER_FORCE_REINSTALL == 1 ]]; then + options+=("--force") + tfile=$(mktemp /tmp/polybundle.XXXXXXXXX) + sed "s/POLYMAKE_JUPYTER_FORCE_REINSTALL=1/POLYMAKE_JUPYTER_FORCE_REINSTALL=0/" $HOME/$polymake_user_dir/bundle.config > $tfile && cp $tfile $HOME/$polymake_user_dir/bundle.config && rm $tfile + fi + if [[ -n $POLYMAKE_JUPYTER_NOTEBOOK_DIR ]]; then + options+=("--notebook-dir=$POLYMAKE_JUPYTER_NOTEBOOK_DIR") + fi + if [[ -n $POLYMAKE_JUPYTER_IP ]]; then + options+=("--ip=$POLYMAKE_JUPYTER_IP") + fi + if [[ -n $POLYMAKE_JUPYTER_PORT ]]; then + options+=("--port=$POLYMAKE_JUPYTER_PORT") + fi + if [[ $POLYMAKE_JUPYTER_START_BROWSER == 0 ]]; then + options+=("--no-browser") + fi + if [[ -n $POLYMAKE_JUPYTER_BROWSER ]]; then + options+=("--browser='$POLYMAKE_JUPYTER_BROWSER'") + fi + $dir/polymake.start --script jupyter "${options[@]}" +fi + +exit 0 diff --git a/bundle_scripts/polymake.start b/bundle_scripts/polymake.start new file mode 100755 index 0000000..73d30e1 --- /dev/null +++ b/bundle_scripts/polymake.start @@ -0,0 +1,28 @@ +#!/bin/bash + +echo -ne "\033]0;polymake\007" +dir=$(cd "$(dirname "$0")"; pwd) +ResourcesDir="${dir%MacOS}Resources" + +# the user might have a 32bit version of fink which conflicts with 64bit polymake, so +unset VERSIONER_PERL_PREFER_32_BIT + +export PATH=${ResourcesDir}/polymake/bin:${ResourcesDir}/bin:${ResourcesDir}/perl5/bin${PATH+:$PATH} +#export POLYMAKE_CONFIG_PATH="$ResourcesDir/config;user" +export POLYMAKE_USER_DIR="${HOME}/.polymake-macbundle" +export POLYMAKE_BASE_PATH=$ResourcesDir/polymake +export DYLD_LIBRARY_PATH=$ResourcesDir/lib:$ResourcesDir/include/boost_1_66_0/${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH} +export CPLUS_INCLUDE_PATH=$ResourcesDir/include/ +export CFLAGS=-I$ResourcesDir/include/ +export CPPFLAGS=-I$ResourcesDir/include/ +export PERL5LIB="$ResourcesDir/perl5:$ResourcesDir/perl5/lib/perl5:$ResourcesDir/perl5/lib/perl5/darwin-thread-multi-2level/\ +:$ResourcesDir/polymake/lib/polymake/lib/\ +:$ResourcesDir/polymake/lib/polymake/perlx/\ +:$ResourcesDir/polymake/share/polymake/perllib/\ +${PERL5LIB+:$PERL5LIB}" + +# seems necessary, why? +dir=$(cd "$(dirname "$0")"; pwd) + +# start polymake +$ResourcesDir/polymake/bin/polymake "$@" diff --git a/bundle_scripts/polymake_start_julia.jl b/bundle_scripts/polymake_start_julia.jl new file mode 100644 index 0000000..e4e4045 --- /dev/null +++ b/bundle_scripts/polymake_start_julia.jl @@ -0,0 +1,46 @@ +configfile=homedir()*"/.polymake-macbundle/bundle.config" + +polymake_base = "" +open(configfile) do f + for i in eachline(f) + global polymake_base + if occursin(r"^\s*POLYMAKE_BASE_DIR",i) + polymake_base = match(r"^\s*POLYMAKE_BASE_DIR=(.*)/MacOS",i)[1] + end + end +end +polymake_base + +if ( polymake_base == "" ) + println("polymake bundle not found. You need to start the bundle at least once before using it in Julia!") +else + println("Initializing polymake ...") + polymake_base *= "/Resources" + polymake_bundle_configure_dyld_library_path="" + polymake_bundle_configure_path="" + polymake_bundle_configure_perl5lib="" + if haskey(ENV, "PATH") + polymake_bundle_configure_path=":"*ENV["PATH"] + end + if haskey(ENV, "DYLD_LIBRARY_PATH") + polymake_bundle_configure_dyld_library_path=":"*ENV["DYLD_LIBRARY_PATH"] + end + if haskey(ENV, "PERL5LIB") + polymake_bundle_configure_perl5lib=":"*ENV["PERL5LIB"] + end + ENV["PATH"]=polymake_base*"/polymake/bin:"*polymake_base*"/bin"*polymake_bundle_configure_path + ENV["POLYMAKE_CONFIG_PATH"]=polymake_base*"/config;user" + ENV["POLYMAKE_USER_DIR"]=homedir()*"/.polymake-macbundle" + ENV["POLYMAKE_BASE_PATH"]=polymake_base*"/polymake" + ENV["DYLD_LIBRARY_PATH"]=polymake_base*"/lib:"*polymake_base*"/include/boost_1_66_0/:/Applications/Julia-1.1.app/Contents/Resources/julia/lib/julia"*polymake_bundle_configure_dyld_library_path + ENV["LC_RPATH"]=ENV["DYLD_LIBRARY_PATH"] + ENV["CPLUS_INCLUDE_PATH"]=polymake_base*"/include/" + ENV["CFLAGS"]="-I"*polymake_base*"/include/" + ENV["CPPFLAGS"]="-I"*polymake_base*"/include/" + ENV["PERL5LIB"]=polymake_base*"/perl5/lib/perl5:"*polymake_base*"/perl5/"*polymake_bundle_configure_perl5lib + + using Pkg + if !haskey(Pkg.installed(), "Polymake") + Pkg.add("Polymake") + end +end \ No newline at end of file diff --git a/bundle_scripts/prefer.pl b/bundle_scripts/prefer.pl new file mode 100644 index 0000000..ef7ea80 --- /dev/null +++ b/bundle_scripts/prefer.pl @@ -0,0 +1,7 @@ +$version=vREPLACE_POLYMAKE_VERSION; + +package Polymake::User; + +application common; + +prefer "threejs"; \ No newline at end of file diff --git a/scripts/trop.icns b/bundle_scripts/trop.icns similarity index 100% rename from scripts/trop.icns rename to bundle_scripts/trop.icns diff --git a/fix_libname.sh b/fix_libname.sh deleted file mode 100755 index e38be91..0000000 --- a/fix_libname.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -ex - -DIR=$1; shift -FILE=$1; shift - - - -cd $DIR; -install_name_tool -id "@rpath/$FILE" $FILE; diff --git a/scripts/README.tex b/scripts/README.tex deleted file mode 100644 index e71e829..0000000 --- a/scripts/README.tex +++ /dev/null @@ -1,215 +0,0 @@ -\documentclass[a4paper]{amsart} -\usepackage{color} - -\definecolor{urlcol}{cmyk}{.1,.7,1,0} -\usepackage[colorlinks,urlcolor=urlcol]{hyperref} -\usepackage{xspace} - -\newcommand{\macversion}{10.9} -\newcommand{\polymakeversion}{ Release 2.13 of April 3, 2014\xspace} -\newcommand{\macsix}{10.6} -\newcommand{\macseven}{10.7} - -\title{\texttt{polymake} on the Mac\\\polymakeversion} - -\newcommand{\polymake}{\texttt{polymake}\xspace} - - -\begin{document} - -\maketitle -\parindent0pt - -\section*{Introduction} - -\polymake is a tool to study the combinatorics and the geometry of -convex polytopes and polyhedra. It is also capable of dealing with -simplicial complexes, matroids, polyhedral fans, graphs, tropical polytopes, and various other mathematical object. - -\textbf{Note that this Mac application of \polymake is still - experimental.} If you have problems, or suggestions for improvements -please contact us. - -\section*{System Requirements} - -The \polymake package was built and tested on Intel-based Macs -running Mac OS 10.8 and \macversion with Apple's command line tools of March 10, 2014 using the \polymakeversion of -\polymake. Due to system package dependencies it won't work on Macs -with \textbf{any} other Mac OS X version or architecture. - -Note that there are different packages for different perl versions. Make sure you download the version of the \polymake app that was built for the perl version that corresponds to your system perl. You can find the version number by executing -\[\texttt{/usr/bin/perl --version}\] in a terminal. - -If there is no version of the \polymake app matching your perl version please contact us at \href{http://forum.polymake.org}{\tt forum.polymake.org}. - -\bigskip -The package requires that Apple's command line tools and java are installed on your Mac. If you don't have them a popup window will appear the first time polymake wants to use them. Please click install (you may need an administrator password to install them). The popoup for the ocmmand line tools is slightly confusing. It also offers to install XCode. This is not necessary. Just click \emph{Install}. - - -\section*{Installation} - -Double clicking the \texttt{dmg} file mounts the disk image and opens -it in the Finder. Drag \polymake to a suitable location on your -system. Preferably this should be the standard \texttt{Applications} -folder. You might want to save this README file somewhere. Afterwards -you can eject the image and delete the \texttt{dmg} file unless you -want to rebuild the app. - -To run \polymake double click the \polymake program icon. You can -also drag the icon onto your dock for faster access. Note however that -the \polymake bundle is not a true Mac application: it basically -opens a \texttt{Terminal} and starts \polymake inside this. So it does not -behave as most other apps, e.g. Mail: if you have a running \polymake -session then clicking again on the Dock icon just opens another -instance of \polymake instead of bringing the existing window to the -front. Instead, you should navigate to the \texttt{Terminal} app (and then -possibly cycle between different \texttt{Terminal} windows with \texttt{Cmd-<}) -to reach \polymake). - -\section*{Usage} - -Double click the \polymake program icon to start \polymake. This will -open a terminal and launch the interactive shell of \polymake inside -the terminal. For an introduction to \polymake and the interactive -shell see \href{http://polymake.org}{\tt polymake.org}\;. - -To exit \polymake type \texttt{exit;} at the \polymake prompt -(observe the ``;'' that is necessary for each \polymake -command). Depending on your \texttt{Terminal} settings the -\texttt{Terminal} window might not close but just tell you that the -process is completed. In that case close the window manually (but wait -until \polymake has finished, which might take a moment). You can -change the behavior of \texttt{Terminal} in the \textit{Preferences} -menu. You cannot close \polymake by right clicking the Dock icon or -via Expos\`e. \polymake saves open files and customization settings -when you exit, so you \textbf{should not} terminate \polymake by -closing the terminal. - -\section*{Customization Files} - -\polymake puts its customization files into the directory - -\[\texttt{.polymake-macbundle/} \] - -in your home directory. The directory is created at the first start of -\polymake. If you want to reset \polymake to default values then you -can just delete this directory (You cannot do this in the Finder as it -is a hidden folder (observe the ``.'' in front). Open a \texttt{Terminal}, -\texttt{cd} into your home directory and type \texttt{rm -rf - .polymake-macbundle}.). - -These files, as well as the customization files written to your -extension directory when you import an extension into polymake contain -the absolute path to the directory containing the polymake -files. Thus, after you have started \polymake once you cannot move -the bundle to a different location on you Mac (e.g.\ from the disk -image into your Application folder). You can, however, create links. - -If you have to move the \polymake app bundle, then you have to delete -the folder \texttt{.polymake-macbundle} in your home directory (see -above for instructions), and do a \texttt{make distclean} in each -extension base directory prior to calling \polymake from its new -location. If you want to save some values (e.g.\ color settings) in -\texttt{customize.pl} or \texttt{prefer.pl} then make a copy of the -files and add the values back to the corresponding files in -\texttt{.polymake-macbundle} after you have started \polymake from -the new location. - -\polymake has a basic check to detect whether you have moved the -\polymake app and offers to delete \texttt{.polymake-macbundle}. You -can accept this as long as you don't have imported any extensions. If -you have, then please choose ``cancel'' here and do \texttt{make - clean} in the extension base directories before you start \polymake\ -from its new location. - -\section*{Uninstalling polymake} - -To uninstall \polymake just drag the \polymake icon to the trash and -remove the directory \texttt{\${HOME}/.polymake-macbundle} (This is -only created after you have started \polymake at least once). Note -that this directory is a hidden directory, so you cannot delete it -in the Finder. Instead, open a \texttt{Terminal}, \texttt{cd} into -your home directory, and type \texttt{rm -rf .polymake-macbundle} -(observe the ``.''). - -\section*{Trouble-shooting} - -\textbf{Please note that the \polymake app is not relocatable after - the first start}, so please move it to a location on your hard disk -(e.g.\ the Application folder) before starting it. If you need to move -the app then please follow the instructions given in the section about -customization files. You can use the \polymake app along with a -standard installation, but you cannot import extensions from the same -directory (but you can install extensions again to a different -directory). - -Support queries concerning installation and usage are welcome (please -use our forum at \href{http://forum.polymake.org}{\tt - forum.polymake.org}), as well as any other feedback, but are served -on voluntary base, depending, first of all, on the authors' free time -resources. The \polymake package for Mac is still experimental, so -it might not work on your computer. Also, we don't have many different -Mac OS X installations at hand to test. If it doesn't work we'd value -feedback about what went wrong. To obtain relevant information you -could try to start the script from a terminal instead of the -Applications folder and send us the output. If you have installed -\polymake into the standard \texttt{Applications} folder, then the -steps are as follows. -\begin{enumerate} -\item open the \texttt{Terminal} application (inside \texttt{Utilities} in your - \texttt{Applications} folder). -\item at the prompt type\\ - \texttt{. /Application/polymake.app/Contents/MacOS/polymake.start} -\end{enumerate} - - -\section*{License} - -\polymake is released under the the GPL license. By downloading -\polymake in any form (whether source code or compiled) you agree to -be bound by this license; further you renounce to claim -any kind of warranty or damages related to the use of this software. - -Software libraries bundled directly with \polymake are protected by -open source licenses adequate to the GPL or broader. However, the -exact wording and restrictions to use may vary. - -Additionally, the \polymake application package comes with compiled -versions of several packages necessary for polymake: -\begin{enumerate} -\item \href{http://gmplib.org/}{\texttt{GMP 5.1.3}}. -\item \href{http://mpfr.org/}{\texttt{MPFR 3.1.2}}. -\item \href{http://tiswww.case.edu/php/chet/readline/rltop.html}{\texttt{readline 6.2}} -\item \href{http://search.cpan.org/dist/Term-ReadLine-Gnu/}{\texttt{perl::Term-Readline-Gnu}} -\item \href{http://www.boost.org/}{\texttt{boost 1.47.0}} -\item \href{http://ant.apache.org/}{\texttt{ant 1.93}} -\item \href{http://bugseng.com/products/ppl/}{\texttt{ppl 1.1}} -\item \href{http://www.home.uni-osnabrueck.de/wbruns/normaliz/}{\texttt{libnormaliz 2.12}} -\item \href{http://www.inf.ethz.ch/personal/fukudak/cdd_home/}{\texttt{cdd 0.94g}} -\item \href{http://cgm.cs.mcgill.ca/~avis/C/lrs.html}{\texttt{lrs 4.2}} -\item \href{http://cs.anu.edu.au/~bdm/nauty/}{\texttt{nauty}} -\item \href{http://www3.math.tu-berlin.de/jreality/}{\texttt{jReality}} -\item \href{http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html}{\texttt{readline 6.2}} -\item \href{http://search.cpan.org/~hayashi/Term-ReadLine-Gnu-1.20/Gnu.pm}{\texttt{Term-Readline-Gnu 1.20}} -\item \href{http://search.cpan.org/~shlomif/XML-LibXSLT-1.87/LibXSLT.pm}{\texttt{XML-LibXSLT 1.71}} -\item \href{http://www.math.uni-rostock.de/~rehn/software/permlib.html}{\texttt{permlib}} -\item \href{https://github.com/Singular/Sources}{\texttt{Singular}} -\item \href{https://github.com/polymake/polymake}{\texttt{polymake}} -\end{enumerate} -Also these packages are protected by open source licences compliant to -the GPL. The sources for \polymake are also available on \href{http://polymake.org/doku.php/download/start}. -All sources are either directly contained in the -polymake distribution or included as compressed tar archives in the -\texttt{tarballs/} directory of the disk image, where you also find the polymake sources. Check the -corresponding COPYING or README files included in the packages for the -exact license. For the packages bundled directly with \polymake you -can find the license statements in the \texttt{bundled} sub-directory -of the \polymake archive (currently \texttt{cdd, lrs, nauty, permlib, ppl, libnormaliz, jreality}). - -\section*{Rebuilding the disk-image} - -If you need to rebuild the disk-image just copy the \texttt{src} -directory to some location on your Mac. Change to the \texttt{src} -directory and type \texttt{make}. - -\end{document} diff --git a/scripts/debug.commands b/scripts/debug.commands deleted file mode 100644 index 13f8964..0000000 --- a/scripts/debug.commands +++ /dev/null @@ -1,29 +0,0 @@ -use application "polytope"; - -# try some compilations -my $s=new Array>(3); - -my $h=new HashMap,Rational>; - -my $c=cube(3); - -# check libnormaliz -$c->HILBERT_BASIS; - -# check jreality -$c->VISUAL; - -# check singular -use application "ideal"; - -my $r=new Ring(qw(x y w z)); - -(my $x,my $y, my $w, my $z)=$r->variables; - -my $p= -1* ($x^3) + ($x^2)*$y*$z*$w + $z*$w - $x*$y*$z*$w + ($y^3)*$w; - -my $q= ($x^3) - ($y^4); - -my $j=new Ideal(GENERATORS=>[$p,$q],RING=>$r); - -$j->DIM; \ No newline at end of file diff --git a/scripts/diskimage b/scripts/diskimage deleted file mode 100755 index 391af05..0000000 --- a/scripts/diskimage +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -# change into the base directory -BASEPATH=$( (cd -P $(dirname $0) && pwd) ) -BASEPATH=${BASEPATH%scripts}/dmg -SED="/usr/bin/sed" - -mkdir dmg -cd ${BASEPATH} - -hdiutil convert ../template.dmg -format UDSP -o polybundle - -hdiutil mount polybundle.sparseimage - - -cp -pr ../polymake.app . - -cd $BASEPATH -sudo cp -a polymake.app /Volumes/polybundle/ -chmod u-w /Volumes/polybundle/polymake.app/Contents/Resources/polymake/lib/polymake/lib/*.bundle -#mkdir /Volumes/polybundle/src -sudo cp -a ../tarballs /Volumes/polybundle/src -sudo cp -a ../scripts /Volumes/polybundle/src -cp ../Makefile /Volumes/polybundle/src/ -cp ../install.sh /Volumes/polybundle/src/ -cp ../fix_lc_load_dylib.sh /Volumes/polybundle/src/ -cp ../fix_libname.sh /Volumes/polybundle/src/ -cp ../build.sh /Volumes/polybundle/src/ -cp ../template.dmg /Volumes/polybundle/src/ - -cp ../scripts/README.pdf /Volumes/polybundle/ - -hdiutil eject /Volumes/polybundle - -cd $BASEPATH - -hdiutil convert polybundle.sparseimage -format UDBZ -o polybundle.dmg - -cd .. -mv dmg/polybundle.dmg . -rm -rf dmg - -echo "Now you can set the icon of the dmg. (Open the Info window of polybundle.dmg with Cmd-I and then drag the file scripts/pm-cube.icns onto the icon in the upper left corner of the Info window.)" diff --git a/scripts/polymake b/scripts/polymake deleted file mode 100755 index cd84e43..0000000 --- a/scripts/polymake +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -dirtmp=$(cd "$(dirname "$0")"; pwd) -dir=`echo $dirtmp | awk '{ print $1 }'` -open -a Terminal $dir/polymake.start -exit 0 diff --git a/scripts/polymake.start b/scripts/polymake.start deleted file mode 100755 index c772380..0000000 --- a/scripts/polymake.start +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -echo -ne "\033]0;polymake\007" -dir=$(cd "$(dirname "$0")"; pwd) -ResourcesDir="$dir/../Resources/" - -alias perl=/usr/bin/perl - -perlversion=`/usr/bin/perl --version | grep -o "5[.][0-9]*[.][0-9]"` - -if [ "$perlversion" != "REPLACE_PERLVERSION" ]; then - echo "==========================================================================" - echo "your perl version does not match the perl version this app was built for"; - echo "please download and install the version of polymake that corresponds" - echo "to the version of your system perl" - echo "You can find the version number by executing" - echo "/usr/bin/perl --version" - echo "in a terminal." - echo "If there is no version of the polymake app matching your perl version" - echo "please contact us at http://forum.polymake.org" - echo "==========================================================================" - exit -fi; - -if [ -f ${HOME}/.polymake-macbundle/customize.pl ]; then - base=`grep -m 1 "polymake.app/Contents/MacOS" ${HOME}/.polymake-macbundle/customize.pl` - if [[ ! -z "$base" ]] && [[ ! $base =~ $ResourcesDir ]]; then - echo "=========================================================================" - echo "Your polymake customization files in" - echo - echo "${HOME}/.polymake-macbundle" - echo - echo "correspond to a different installation of polymake" - echo "(or you have moved your installation to a different location on your Mac)" - echo "if you continue then all files in this directory will be reset to default values". - echo "If you have imported extensions into polymake then you have to reset those" - echo " prior to starting polymake, " - echo "similarly, if you want to save some of your previous settings you should abort now" - echo "(see the README.pdf that came with the bundle if you need help)" - echo "otherwise you can continue now" - read -p "[a]bort or [c]ontinue? " - [ "$REPLY" == "c" ] || exit - rm -rf "${HOME}/.polymake-macbundle" - fi -fi - -# the user might have a 32bit version of fink which conflicts with 64bit polymake, so -unset VERSIONER_PERL_PREFER_32_BIT - -export PATH=$PATH:${ResourcesDir}/bin -export POLYMAKE_USER_DIR="${HOME}/.polymake-macbundle" -export POLYMAKE_BASE_PATH=$ResourcesDir/polymake -export LD_LIBRARY_PATH=$ResourcesDir/lib:$ResourcesDir/include/boost_1_47_0/:$LD_LIBRARY_PATH -export CPLUS_INCLUDE_PATH=$ResourcesDir/include/ -export CFLAGS=-I$ResourcesDir/include/ -export CPPFLAGS=-I$ResourcesDir/include/ -export PERL5LIB=$ResourcesDir/lib/perl5/site_perl/REPLACE_PERLVERSION/darwin-thread-multi-2level/:$ResourcesDir/polymake/lib/polymake/lib/:$ResourcesDir/lib/perl5/:$ResourcesDir/polymake/lib/polymake/perlx/:$ResourcesDir/polymake/share/polymake/perllib/:$PERL5LIB - -# seems necessary, why? -dir=$(cd "$(dirname "$0")"; pwd) - -# start polymake -$ResourcesDir/polymake/bin/polymake diff --git a/scripts/singular-patch b/scripts/singular-patch deleted file mode 100644 index b049f34..0000000 --- a/scripts/singular-patch +++ /dev/null @@ -1,10 +0,0 @@ ---- configure -+++ configure -@@ -1478,7 +1478,7 @@ fi - - # expand exec_prefix - if test "x$exec_prefix" = xNONE; then -- exec_prefix=${prefix}/${ac_cv_singuname} -+ exec_prefix=${prefix} - ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}" - fi