diff --git a/Makefile b/Makefile index 902693a..3f6e8ee 100644 --- a/Makefile +++ b/Makefile @@ -122,11 +122,10 @@ install: @echo "sorry, there is no 'make install' right now - you should run pcc from the source directory" @echo "the binary is located at compiler/pcc - you should put the compiler/ directory into your PATH" @echo "you also need bigloo and other items in your path: see the wiki online at http://code.roadsend.com/" - @echo ".. a real 'make install' is under development" -#install: unsafe -# ./install.sh $(INSTALL_ROOT) $(INSTALL_PREFIX) +package-install: unsafe + ./install.sh $(INSTALL_ROOT) $(INSTALL_PREFIX) -#install-runtime: unsafe -# ./install-runtime.sh $(INSTALL_ROOT) $(INSTALL_PREFIX) +package-install-runtime: unsafe + ./install-runtime.sh $(INSTALL_ROOT) $(INSTALL_PREFIX) diff --git a/install-runtime.sh b/install-runtime.sh index 626c3c0..39a6e1a 100644 --- a/install-runtime.sh +++ b/install-runtime.sh @@ -16,21 +16,21 @@ install_prefix=$2 pcc_home=$PCC_HOME lib_dir=$install_root/$install_prefix/libs module_root=$install_root/$install_prefix/modules -apache1_dir=$module_root/apache1.3.x -apache2_dir=$module_root/apache2.x +#apache1_dir=$module_root/apache1.3.x +#apache2_dir=$module_root/apache2.x fcgi_dir=$module_root/fastcgi echo "Installing runtime into $install_root with prefix $install_prefix." echo "lib_dir : $lib_dir" -echo "apache1_dir: $apache1_dir" -echo "apache2_dir: $apache2_dir" +#echo "apache1_dir: $apache1_dir" +#echo "apache2_dir: $apache2_dir" echo "fcgi_dir : $fcgi_dir" ## the libraries, headers, heaps, and init files echo "installing libraries" $debug install -m 755 -d $lib_dir -$debug install -m 644 -s $pcc_home/libs/*_u.so $lib_dir -$debug install -m 644 $pcc_home/libs/*_u.a $lib_dir +$debug install -m 644 -s $pcc_home/libs/*_u*.so $lib_dir +$debug install -m 644 $pcc_home/libs/*_u*.a $lib_dir $debug install -m 644 $pcc_home/libs/*.sch $lib_dir $debug install -m 644 $pcc_home/libs/*.heap $lib_dir $debug install -m 644 $pcc_home/libs/*.init $lib_dir @@ -45,10 +45,10 @@ $debug install -m 644 $pcc_home/support-libs/*.h $lib_dir echo "installing web modules" $debug install -m 755 -d $module_root $debug install -m 755 -d $fcgi_dir -$debug install -m 755 -d $apache1_dir -$debug install -m 755 -d $apache2_dir +#$debug install -m 755 -d $apache1_dir +#$debug install -m 755 -d $apache2_dir $debug install -m 755 -s $pcc_home/webconnect/fastcgi/pcc.fcgi $fcgi_dir/pcc.fcgi -[ -e $pcc_home/webconnect/apache1/mod_pcc.so ] && $debug install -m 644 $pcc_home/webconnect/apache1/mod_pcc.so $apache1_dir/mod_pcc.so -[ -e $pcc_home/webconnect/apache2/mod_pcc2.so ] && $debug install -m 644 $pcc_home/webconnect/apache2/mod_pcc2.so $apache2_dir/mod_pcc2.so +#[ -e $pcc_home/webconnect/apache1/mod_pcc.so ] && $debug install -m 644 $pcc_home/webconnect/apache1/mod_pcc.so $apache1_dir/mod_pcc.so +#[ -e $pcc_home/webconnect/apache2/mod_pcc2.so ] && $debug install -m 644 $pcc_home/webconnect/apache2/mod_pcc2.so $apache2_dir/mod_pcc2.so echo "done" diff --git a/packages/packages.mk b/packages/packages.mk index e896b00..c0bcbca 100644 --- a/packages/packages.mk +++ b/packages/packages.mk @@ -1,24 +1,29 @@ -## directory where rpm keeps its package "database" -RPM_DB_DIR = /usr/src/rpm ## current version of bigloo -BIGLOO_VERSION = 2.6f +BIGLOO_VERSION = 2.9a ## current version of pcc PCC_VERSION = $(shell $(PCC_HOME)/compiler/pcc --version) ## path to the bigloo source directory -BIGLOO_SOURCE = $(HOME)/bigloo/bigloo$(BIGLOO_VERSION) - -######################################################################## +BIGLOO_SOURCE = $(HOME)/src/bigloo$(BIGLOO_VERSION) -## the top level of the packages subtree -PACKAGES_ROOT = $(PCC_HOME)/packages +## temporary directory where packages get built (note that this directory +## will be removed! don't set it to your homedir or anything) +BUILD_ROOT = /tmp/roadsend-pcc-build-root ## the prefix directory we want everything installed into (e.g. /usr) ## -- currently this is also hardcoded in the output in the *.template files in selfs/ INSTALL_PREFIX = /opt/roadsend/pcc +######################################################################## + +## directory where rpm keeps its package "database" +RPM_DB_DIR = /usr/src/rpm + +## the top level of the packages subtree +PACKAGES_ROOT = $(PCC_HOME)/packages + ## directory to place the rpm files in RPM_OUT_DIR = $(PACKAGES_ROOT) @@ -31,16 +36,6 @@ SELF_OUT_DIR = $(PACKAGES_ROOT) ## text string to be replaced by the pcc version in various files PCC_VERSION_TAG = PCC_VERSION_HERE -## path of the license file -LICENSE_FILE = $(PACKAGES_ROOT)/LICENSE - -## text string to be replaced by the license in various install scripts -LICENSE_TAG = LICENSE_HERE - -## temporary directory where packages get built (note that this directory -## will be removed! don't set it to your homedir or anything) -BUILD_ROOT = /tmp/roadsend-pcc-build-root - ## text string to be replaced by the build-root directory in various files BUILD_ROOT_TAG = BUILD_ROOT_HERE @@ -52,4 +47,3 @@ BIGLOO_INSTALLER = $(SCRIPT_DIR)/install-bigloo-$(BIGLOO_VERSION).sh ## path to the makeself script MAKESELF = $(SCRIPT_DIR)/makeself/makeself.sh - diff --git a/packages/scripts/install-bigloo-2.9a.sh b/packages/scripts/install-bigloo-2.9a.sh new file mode 100644 index 0000000..598a8cc --- /dev/null +++ b/packages/scripts/install-bigloo-2.9a.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# note this relies on *bash* not just sh (for example on freebsd) +# therefor /bin/bash has to exist + +if [ $# -ne 3 ] +then + echo "Usage: $0 " + exit 1 +fi + +source_root=$1 +install_root=$2 +install_prefix=$3 + +pushd $source_root > /dev/null + +if [ `which gmake` ]; then MAKE=gmake; else MAKE=make; fi + +## note!! we specify --libdir because we use libs and bigloo uses lib by default +./configure --prefix=$install_prefix --libdir=$install_prefix/libs --jvm=no && $MAKE + +popd > /dev/null + +install -m 755 -d $install_root +install -m 755 -d $install_root/$install_prefix/bin +install -m 755 -d $install_root/$install_prefix/libs/bigloo/2.9a + +install -m 755 -s $source_root/bin/bigloo $install_root/$install_prefix/bin/bigloo +install -m 755 $source_root/runtime/Include/bigloo.h $install_root/$install_prefix/libs/bigloo/2.9a/bigloo.h +install -m 755 $source_root/lib/2.9a/bigloo.h $install_root/$install_prefix/libs/bigloo/2.9a/bigloo.h +install -m 755 $source_root/lib/2.9a/bigloo_config.h $install_root/$install_prefix/libs/bigloo/2.9a/bigloo_config.h +install -m 755 $source_root/lib/2.9a/bigloo.heap $install_root/$install_prefix/libs/bigloo/2.9a/bigloo.heap +install -m 755 -s $source_root/lib/2.9a/libbigloo_u-2.9a.so $install_root/$install_prefix/libs/bigloo/2.9a/libbigloo_u-2.9a.so +install -m 755 -s $source_root/gc-boehm/libgc.so $install_root/$install_prefix/libs/bigloo/2.9a/libbigloogc-2.9a.so +install -m 755 -s $source_root/lib/2.9a/libbigloogc-2.9a.so $install_root/$install_prefix/libs/bigloo/2.9a/libbigloogc-2.9a.so + +install -m 755 $source_root/lib/2.9a/libbigloo_u-2.9a.a $install_root/$install_prefix/libs/bigloo/2.9a/libbigloo_u-2.9a.a +ranlib $install_root/$install_prefix/libs/bigloo/2.9a/libbigloo_u-2.9a.a + +install -m 755 $source_root/lib/2.9a/libbigloogc-2.9a.a $install_root/$install_prefix/libs/bigloo/2.9a/libbigloogc-2.9a.a +ranlib $install_root/$install_prefix/libs/bigloo/2.9a/libbigloogc-2.9a.a + +pushd $install_root/$install_prefix > /dev/null + +ln -s bigloo/2.9a/libbigloo_u-2.9a.so $install_root/$install_prefix/libs/libbigloo_u-2.9a.so +ln -s bigloo/2.9a/libbigloogc-2.9a.so $install_root/$install_prefix/libs/libbigloogc-2.9a.so + +popd > /dev/null + diff --git a/packages/self/Makefile b/packages/self/Makefile index 46f8444..b9c54e5 100644 --- a/packages/self/Makefile +++ b/packages/self/Makefile @@ -1,14 +1,13 @@ ## common makefile variables for the packages subtree include ../packages.mk -all: compiler runtime #prereqs +all: compiler runtime clean: -rm -rf $(BUILD_ROOT) -rm -f $(SELF_OUT_DIR)/roadsend-pcc*.bin -rm -f install-compiler.sh -rm -f install-runtime.sh -# -rm -f install-prereqs.sh ### ### the compiler package @@ -18,15 +17,14 @@ compiler: install-compiler.sh @echo "Building compiler self-installer package." -rm -rf $(BUILD_ROOT) (cd $(PCC_HOME) && $(MAKE) docs) - (cd $(PCC_HOME) && $(MAKE) INSTALL_ROOT=$(BUILD_ROOT)/install-root INSTALL_PREFIX=$(INSTALL_PREFIX) install) + (cd $(PCC_HOME) && $(MAKE) INSTALL_ROOT=$(BUILD_ROOT)/install-root INSTALL_PREFIX=$(INSTALL_PREFIX) package-install) install -m 0755 -d $(BUILD_ROOT) install -m 0755 install-compiler.sh $(BUILD_ROOT)/install-compiler.sh $(MAKESELF) $(BUILD_ROOT) $(SELF_OUT_DIR)/roadsend-pcc-$(PCC_VERSION).bin \ - "The Roadsend PCC Compiler for PHP" ./install-compiler.sh + "Roadsend PHP" ./install-compiler.sh install-compiler.sh: install-compiler.sh.template @echo "Creating installer script for compiler self-installer package." -# $(SCRIPT_DIR)/replace-tag-with-file.sh $(LICENSE_TAG) $(LICENSE_FILE) install-compiler.sh.template > install-compiler.sh cp install-compiler.sh.template install-compiler.sh ### @@ -36,32 +34,14 @@ install-compiler.sh: install-compiler.sh.template runtime: install-runtime.sh @echo "Building runtime self-installer package." -rm -rf $(BUILD_ROOT) - (cd $(PCC_HOME) && $(MAKE) INSTALL_ROOT=$(BUILD_ROOT)/install-root INSTALL_PREFIX=$(INSTALL_PREFIX) install-runtime) + (cd $(PCC_HOME) && $(MAKE) INSTALL_ROOT=$(BUILD_ROOT)/install-root INSTALL_PREFIX=$(INSTALL_PREFIX) package-install-runtime) $(BIGLOO_INSTALLER) $(BIGLOO_SOURCE) $(BUILD_ROOT)/install-root $(INSTALL_PREFIX) install -m 0755 -d $(BUILD_ROOT) install -m 0755 install-runtime.sh $(BUILD_ROOT)/install-runtime.sh $(MAKESELF) $(BUILD_ROOT) $(SELF_OUT_DIR)/roadsend-pcc-runtime-$(PCC_VERSION).bin \ - "The Roadsend PCC Compiler for PHP - Runtime Environment" ./install-runtime.sh + "Roadsend PHP - Runtime Environment" ./install-runtime.sh install-runtime.sh: install-runtime.sh.template @echo "Creating installer script for runtime self-installer package." -# $(SCRIPT_DIR)/replace-tag-with-file.sh $(LICENSE_TAG) $(LICENSE_FILE) install-runtime.sh.template > install-runtime.sh cp install-runtime.sh.template install-runtime.sh -### -### the prerequisites package -### ========================= - -# prereqs: install-prereqs.sh -# @echo "Building prereqs self-installer package." -# -rm -rf $(BUILD_ROOT) -# $(BIGLOO_INSTALLER) $(BIGLOO_SOURCE) $(BUILD_ROOT)/install-root $(INSTALL_PREFIX) -# $(BIGLIB_INSTALLER) $(BIGLIB_SOURCE) $(BUILD_ROOT)/install-root $(INSTALL_PREFIX) $(BIGLOO_VERSION) -# install -m 0755 -d $(BUILD_ROOT) -# install -m 0755 install-prereqs.sh $(BUILD_ROOT)/install-prereqs.sh -# $(MAKESELF) $(BUILD_ROOT) $(SELF_OUT_DIR)/roadsend-pcc-prereqs-$(PCC_VERSION).bin \ -# "The Roadsend PCC Compiler for PHP - Prerequisites" ./install-prereqs.sh - -# install-prereqs.sh: install-prereqs.sh.template -# @echo "Creating installer script for prereqs self-installer package." -# cp install-prereqs.sh.template install-prereqs.sh diff --git a/packages/self/install-compiler.sh.template b/packages/self/install-compiler.sh.template index 69d5446..394e6da 100644 --- a/packages/self/install-compiler.sh.template +++ b/packages/self/install-compiler.sh.template @@ -21,28 +21,6 @@ then exit 1 fi -### -### make sure user agrees to license -### ================================ - -# cat < $UNINSTALLER #!/bin/sh # # This is an automatically generated uninstaller script for the -# Roadsend PHP Compiler package +# Roadsend PHP package ## require root me=\`id -u\` @@ -62,7 +40,7 @@ then exit 1 fi -echo "Uninstalling Roadsend Compiler Binaries..." +echo "Uninstalling Roadsend PHP Binaries..." EOF @@ -70,8 +48,8 @@ EOF ### install files ### ============= -echo "Roadsend Compiler for PHP" -echo "http://www.roadsend.com/" +echo "Roadsend PHP" +echo "http://code.roadsend.com/" echo echo "Installing Compiler binaries... " echo "installation root directory is $TARGET_ROOT" @@ -103,7 +81,7 @@ fi agreed= while [ x$agreed = x ]; do echo - echo -n "Do you want to symlink the Roadsend binaries to the system path? [y/n/?]: " + echo -n "Do you want to symlink the Roadsend PHP binaries to the system path? [y/n/?]: " read reply leftover case $reply in y* | Y*) @@ -111,7 +89,7 @@ fi n* | N*) agreed=n;; ?) - echo "Your system will need to know where to find the Roadsend binaries."; + echo "Your system will need to know where to find the Roadsend PHP binaries."; echo "If you plan to manually add $TARGET_ROOT/bin to your system's PATH"; echo "then you should say N here."; echo ""; @@ -149,7 +127,7 @@ if [ -z $? ]; then cat < $UNINSTALLER #/bin/sh # # This is an automatically generated uninstaller script for the -# Roadsend PHP Compiler package +# Roadsend PHP package # ## require root @@ -63,7 +41,7 @@ then exit 1 fi -echo "Uninstalling Roadsend Compiler Runtime..." +echo "Uninstalling Roadsend PHP Runtime..." EOF @@ -71,8 +49,8 @@ EOF ### install files ### ============= -echo "Roadsend Compiler for PHP" -echo "http://www.roadsend.com/" +echo "Roadsend PHP" +echo "http://code.roadsend.com/" echo echo "Installing Runtime Environment... " echo "The installation root directory is $TARGET_ROOT" @@ -91,7 +69,7 @@ done agreed= while [ x$agreed = x ]; do echo - echo -n "Do you want to symlink the Roadsend runtime libraries to the system library path? [y/n/?]: " + echo -n "Do you want to symlink the Roadsend PHP runtime libraries to the system library path? [y/n/?]: " read reply leftover case $reply in y* | Y*) @@ -99,7 +77,7 @@ done n* | N*) agreed=n;; ?) - echo "Your system will need to know where to find the Roadsend runtime libraries."; + echo "Your system will need to know where to find the Roadsend PHP runtime libraries."; echo "If you plan to manually add $TARGET_ROOT/libs to your system's dynamic"; echo "library load path, you should say N here."; echo ""; diff --git a/runtime/opaque-math-binding.scm b/runtime/opaque-math-binding.scm index 0d9d29a..5c51e5d 100644 --- a/runtime/opaque-math-binding.scm +++ b/runtime/opaque-math-binding.scm @@ -111,7 +111,7 @@ (define (phpnum_fail reason::string) (error "" (string-append "Arithmetic Error: " reason) "")) -(define *float-precision* 12) ;should come from an INI entry +(define *float-precision* 12) ; might be updated by an INI entry (define (onum->int::int num::onum) (flonum->fixnum (elong->flonum (onum->elong num)))) diff --git a/runtime/php-runtime.scm b/runtime/php-runtime.scm index 93b4b3f..be890bc 100644 --- a/runtime/php-runtime.scm +++ b/runtime/php-runtime.scm @@ -290,23 +290,20 @@ (define *RAVEN-VERSION-MAJOR* 2) (define *RAVEN-VERSION-MINOR* 9) (define *RAVEN-VERSION-RELEASE* 0) -(define *RAVEN-VERSION-STRING* (format "~a.~a.~a~a~a" +(define *RAVEN-VERSION-STRING* (format "~a.~a.~a~a" *RAVEN-VERSION-MAJOR* *RAVEN-VERSION-MINOR* *RAVEN-VERSION-RELEASE* - (if (odd? *RAVEN-VERSION-MINOR*) - "_beta" - "") (if *RAVEN-DEVEL-BUILD* - "_internal" + "_beta" "") )) -(define *RAVEN-NAME* "Roadsend PHP Compiler") +(define *RAVEN-NAME* "Roadsend PHP") (define *RAVEN-VERSION-TAG* (string-append *RAVEN-NAME* "/" *RAVEN-VERSION-STRING*)) -(define *PHP-VERSION* "4.4.6") +(define *PHP-VERSION* "4.4.7") ;this version number gets put into compiled programs and libraries.