# -*-shell-script-*-s # Prerequisites: sed, GNU make, libtool, wget # # (and for autogening: GNU m4, GNU autoconf, GNU automake) # # libz is optional for the moment # 1.3 Put RELEASE-NOTES on web site too # 1.4 Apply both of Ezra's patches of today Wed Mar 2 22:51:36 GMT 2005 # Update clipper version (the one with shelx .fcf ability) # 1.5 Apply Ezra's gtkglarea patch and GSL patch. # Update version of FFTW and other updates from MATSUURA Takanori. # 1.6 Update to mmdb-1.0.8 [# for molrep output] # 1.7 Fix logic of fftw test # 1.8 Add the clipper edcalc patch (suggested by Ezra ages ago) # 1.9 Add Fedora Core 4 support and testing for the need to build mccp4, # mmdb and clipper. # 1.10 Tidy up nightly code. # 1.11 Add code testing the need for guile_gui and goosh. # 1.12 Tidy nightly code again. # 1.13 Don't escape the "."s in gsub for new gawk (Ward Smith). # 1.14 20050628 Test for imlib on the installation, not the system (ignore # the system). # 1.15 20050709 Add glib gstrfuncs patch # 1.16 20050709 Update to guile 1.6.7 and add lt_preloaded_symbols patch # 1.17 20050721 Added clipper status code to compiling clipper part. # Redirect stderr output? # fix build_mccp4 problem. # 1.18 20050722 Fix guile build (wrong http tar file). # Added freeglut # 1.19 20050803 Update version of guile-gtk to 0.41 # 1.20 20050815 Several updates and clean up from MATSUURA Takanori. # 1.21 20050815 Stop if wget test fails. # 1.22 20050916 Update build for freeglut to use --disable-warnings and # CFLAGS # 1.23 20050916 Move "set" so we don't see confusing default coot_version # 1.24 20051012 Do pre-release tars for a few days. # 1.25 20051017 Don't make install if Coot's makes fails. Don't make -k # 1.26 20051018 Handle clipper nxmap patch. # 1.27 20051027 [Gif, Paris] Fix tarred directory for nightly pre-release # tars. # 1.28 20051101 Fix the md5sum for nxmap.h # 1.29 20051104 Apply most of MATSUURA Takanori's fixes. # Use CCP4 libs (mtz, clipper, mmdb). # 1.30 20051109 Darwin setting of FC for CCP4 libs configure. # 1.31 20051114 Fix coot tar file problem on building pre-release (or not). # 1.32 20060205 Add scripting variable debugging (its currently not making # python tar files) # 1.33 20060214 Get wget testing tar file from YSBL, not chem.gla # 1.34 20060219 Correct the install position of libccp4c.la # 1.35 20060219 create time stamp with current time, not the time of # the previous ccp4 libs file, now the find ctime test works # as I wanted. # 1.36 20060220 Add a libmmdb.la too. # 1.37 20060222 Add Bob Nolte's proxy settings # 1.38 20060224 dylib variable for libmmdb.la and libccp4c.la # 1.39 20060225 Fix sedding of libmmdb.la and libccp4c.la # 1.40 20060323 copy over coot.py to share/coot/python (if we built with # python) # 1.41 20060401 Big changes for ccp4 5.0.2 ccp4c libs. # 1.42 20060404 Various small build debuggings. # 1.43 20060405 Fix do_nightlies syntax error and fix up glut_prefix build # problem. # 1.44 20060405 Fix the tarred directory name when this is not a pre-release # 1.45 20060406 Check for missing reference structures and monomer lib and # install them if needed. # 1.46 20060418 use install_top_dir variable to copy over coot.py (not # $coot_prefix!) # 1.47 20060419 Remove the mmdb binaries # 1.48 20060420 J. Maclean says no guile. He is right. So check install for # guile, not system. # 1.49 20060420 Replace many $AUTOBUILD_INSTALLED with $install_top_dir. # 1.50 20060421 Replace other $AUTOBUILD_INSTALLED with $install_top_dir for # tar file creation. # 1.51 20060425 net-http was installing into the wrong place because it had # been set to install_top_dir, but this was not set as a shell # (or configured) variable so it was just blank [James Murray]. # Now we export install_top_dir. # 1.52 20060427 Don't add unecessary tagging of -pre-release to tar_dir at # the end. # 1.53 20060503 Force GSL to be in $install_top_dir rather than anywhere. # 1.54 20060519 Update to extract the right coot version from the release and # pre-release directories. # 1.55 20060621 Shuffle around the test for using pre-release # 1.56 20060626 Fixes from MATSUURA Takanori. Shuffle around the usage of # install_top_dir. # 1.57 20060704 run imlib-config from the installation, not anywhere. # 1.58 20060705 Fix wrong directory to build libtiff. # 1.59 20060706 guile-config should run with an argument, otherise it # returns with exit status 1 (and we test for non-zero). # 1.60 20060706 Fix (directory for) mmdb include file test. # 1.61 20060707 Add to coot configure line the option for guile_gtk # 1.62 20060708 Fix coot_prerelease_exists typo in setting install_top_dir # (oops). # 1.63 20060708 Add jpeg dependency for imlib # 1.64 20060708 Add libungif test to installation, not system (imlib # dependency). # 1.65 20060710 Add removal of coot_wrap_guile.cc compilation when python # scripting. # 1.66 20060710 Python on a Sunday. # 1.67 20060711 Try to fix up the Makefile for PNG. # 1.68 20060723 Add in the updates to ltmain.sh, ltconfig and config.guess/sub # for Mactel build. Add build for readline. # Readline version typo fixed. # 1.69 20060724 ENABLE_PYTHON_COOT variable is tested. Don't display # a variables if we are using a proxy. # 1.70 20060728 pass CFLAGS and LDFLAGS to guile's configure # 1.71 20060730 Add test for 64-bit Linux to update config.xxxs and libtool. # Installation readline built now, not system. # 1.72 20060801 Use mmdb-1.0.8-ysbl-2, which installs includes in the include # dir. This matches clipper cif_data_io.cpp which presumes that # it is there. (And is a clean thing to do anyway). # 1.73 20060801 Use the new version of libccp4c, with some of Ralf's patches # and includes that go into include/ccp4 dir. # 1.74 20060801 Use CCP4_CXXFLAGS argument to clipper (it does the wrong thing # with --with-ccp4) # 1.75 20060801 Use -pre-2 version of SSMlib, that has -Ixxx/include/mmdb to # find mmdb include files. # 1.76 20060808 test for libjpeg.$shared_lib_ext not libjpeg.so. LTE bug. # 1.77 20060818 Force update of libtool and config files for libjpeg. Extend # the make install proceedure. Lynn Ten Eyck reported problems # here. # 1.78 20060823 Add poll fix and getpwuid fix to glib build on Intel Mac. # 1.79 20060827 Add fix for gtk-canvas from fink for Intel Mac. # 1.80 20061002 Change freeglut test to test instaltion, not system. # 1.81 20061012 The path used to find *-config files should be the same one # that new executables are added (it was $AUTOBUILD_INSTALLED) # and it should be $AUTOBUILD_INSTALLED-pre-release/bin) when # we are building a pre-release. # 1.82 20061012 Change the destination tar file so that there are nightly # and stable directories for the binary tar files on the web # server. # 1.83 20061107 cd to the clipper dir when building clipper. Pirate and # bucca are not (attempted to be) built then. # 1.84 20061107 Capture and report error status from make in GSL (intel mac # build fails). # 1.85 20061107 Use GSL version 1.8, which includes Charles Ballard's fix for # fp_regs.h # 1.86 20061108 Add fink-based args for configure of gtk for Darwin # 1.87 20061108 Fix ltmain.sh updating for Gtk (oops!). # 1.88 20061122 Fix coot tar directory now that we have revision numbers in # tar file name. # 1.89 20061123 Fix/add test for ssmlib build (now depends on mmdb build) and # libccp4c build (now depends on xxx/include/ccp4/cmtzlib.h). # 1.90 20061128 Allow the user to specify if the dependencies should be checked # on the system or only in the autobuild installed directory. # Needs more checks to use this. Currently only glib and gtk # tests. # 1.91 20061211 Don't make install for guile-gtk if the make fails - or the # dependency check for guile-gtk in coot's configure passes # when it should fail (maybe). # 1.92 20061212 Apply Charles Ballards libtool patch for Macs for imlib and # guile-gtk. # 1.93 20061212 Fiddle the env vars to compile gtk+ on Mac. # 1.94 20070104 Non-pre-release build problems, BINARY_DEST_DIR # 2.01 20070109 imlib tar gz should be downloaded from the correct directory # (sigh). # 2.02 20070117 Try to compile clipper with -fno-strict-aliasing # 2.03 20070123 Tell us where the gtkglarea include file was found. # 2.04 20070124 GCC 3.2 on RH8 machine cannot compile new clipper, so add a # patch if needed. # 2.05 20070216 Put libtiff after libjpeg and give tiff's configure command # line args to find jpeg. # 2.06 20070306 Put in the clipper<->ccp4 new dist patch. # 2.07 20070319 Remove == comparisons - Lothar Esser. # 2.08 20070424 --with-jpeg-lib-dir should be a lib dir! # 2.09 20070501 Fix the setting of coot_version when no pre-release set. # 2.10 20071002 Post install slim the binaries. Add helper functions. # 2.11 20071005 Add some debugging to make_tar. It doesn't seem to work # currently. # 2.12 20071005 Fix post_install_slim call. # 2.13 20071005 Fix slim_dir # 2.14 20071006 Adjust python scripting settings, so that it should try # to compile with python most of the time now. # 2.15 20071008 Fix extra fi, uncommented typo. # 2.16 20071010 ENABLE_PYTHON_COOT=no for now. # 2.17 20071105 Swap out DL Clipper for York clipper [whoosh, bang, kerpow!] # enable-cns # 2.18 20071105 Backpeddle to mmdb 1.08. Baah. # 2.19 20071108 Version 1.08-ysbl-3 of mmdb. # 2.20 20071118 No longer make the full fat tar file. # 2.21 20071120 Sourcefource no longer distributes libungif, now in # ysbl software/extras # 2.22 20071121 set the architecture for ubuntu systems. # 2.23 20071125 Fix typo in recent fixes. # 2.24 20071126 Fix setting of systype for MacOSX, hopefully. # 2.25 20071126 Another try to fix setting of systype for MacOSX. # 2.26 20071130 Try to enable python # 2.27 20071207 More python tinkering. Upgrade to 2.5.1 # 2.28 20071207 Add greg. If in York, use it to test before installing. # 2.29 20071208 Setup CCP4 and use it to test coot before making binaries. # 2.30 20071209 Add dewinter's ccp4 setup in setup_ccp4. # 2.31 20071212 Redirect testing output to $LOGS/$HOST-testing.log # 2.32 20071213 Copy over the ChangeLog, README and RELEASE-NOTES on good test # 2.33 20071215 Pythonize only sometimes, default off. # 2.34 20071215 Tell us some Python info # 2.35 20071215 Python settings outside the subshell. # 2.36 20071219 Set up for testing and tars on biop too. # 3.00 20080108 Gtk+-2 version # 3.01 20080118 Add GtkGlExt # 3.02 20080121 Tinker with guile build settings. # 3.03 20080124 Build GTK2 from scratch: librsvg, cairo, pango, glitz. glib, gtk+-2 # 3.04 20080128 Add a test for the existance of pygtk # 3.05 20080129 Add pkg-config and pygobject # 3.06 20080130 Add test for pycairo # 3.07 20080130 pycairo needs 1.4.12 - so test for cairo, setting build_gtk=1 on # failure # 3.08 20080130 Remove static patch (for sgi). Add test/build for freetype2 # 3.09 20080130 fontconfig added too. # 3.10 20080131 Change HOSTLOGDIR to include gtk2 to separate it from gtk1 build logs. # 3.11 20080201 Fix problem in scripting args to coot's configure. # 3.12 20080207 Add test and build of ATK, needed for gtk+2.10.x # 3.13 20080208 lib cleaning problems, add debugging. # 3.14 20080208 Try requiring gtk 2.10 # 3.15 20080225 Adjust guile-gtk build variables. script_version=3.15 # :: NOTE:: # this "strange" construction of variable names: x=${x:=thing} sets the # variable x only if it has not previously been defined. # # So, the idea is that you write a wrapper for this script (defining typically # AUTOBUILD_INSTALLED, AUTOBUILD_BUILD, LOGS and build_coot_prerelease) then # source this file. That means that you (probably) don't have to edit your # version of build-it every time it changes. # ENABLE_PYTHON_COOT: if ENABLE_PYTHON_COOT is set to 0 or "no" then # python coot is not enable (guile coot is enabled). if # ENABLE_PYTHON_COOT is set, but not set to 0 or no then python coot # is enabled. If ENABLE_PYTHON_COOT is not set, the guile-coot is # enabled (python coot is not enabled). # Pythonizing coot makes non-transferable binararies (why?). Let # the pythonness be controlled on the command line: # if [ "$1" = "python" ] ; then ENABLE_PYTHON_COOT=yes else ENABLE_PYTHON_COOT=no fi # Set the host and the OS. # Fairly fundamental. # OS=`uname` HOST=`hostname` # Do we need to use a proxy server to get documents from the web? (set # to 1 if we do) use_proxy=${use_proxy:=} # if we do need a proxy then we should give the proxy host and port too: proxy_host=${proxy_host:=myproxy.com} proxy_port=${proxy_port:=800} no_proxy=${no_proxy:=".corp.net.com"} # This is where the compiled binaries/libraries/data get installed: # Note that the directory name must NOT end in a / # AUTOBUILD_INSTALLED=${AUTOBUILD_INSTALLED:=${HOME}/autobuild/${OS}-${HOST}} # or perhaps, for the adventurous: #AUTOBUILD_INSTALLED=$CCP4_MASTER # This is where the actual build (compilation) master directory is: # a temporary or scratch directory would be sensible. # # AUTOBUILD_BUILD=${HOME}/autobuild # I'm putting my build on "scratch space" AUTOBUILD_BUILD=${AUTOBUILD_BUILD:=/y/work/emsley/autobuild} # This is where the build logs go: # suggested value: # LOGS=$AUTOBUILD_BUILD/logs # but I want to put my log file on the web, so I put them here: LOGS=${LOGS:=$HOME/public_html/build-logs/${OS}-${HOST}} # set this to "no" if you don't want to compile the pre-release code. # build_coot_prerelease= build_coot_prerelease=${build_coot_prerelease:=1} # We shall we check dependencies? # # Should we look for gtk etc on the system or only in the installed # build directory? We want to do the first if we are a person using # this build script to build coot themselves and we want to do the # second to build a external-dependency-free coot build (like making # the binary tars distributed from York). # check_dependencies_in_install_only= check_dependencies_in_install_only=1 # get build specials, e.g. change the compiler or the compiler options # (e.g build for debugging), extra libraries etc setup LD_LIBRARY_DIR # (or whatever) to include the autobuild library dir so that # intermediate (configure compile) programs run and the addition to # the path of GNU make and wget. # # use this to specify config_extras # # options are: GL_prefix, e.g. SunOS has Mesa Graphics - this is # where to find them: # glut_prefix, optionally can use freeglut # # Suggested value: comment out this line specs=${specs:=$HOME/autobuild/build-scripts/${HOST}-specials} # Make nightly binary tarballs? # You probably don't want to do this, so recommended is do_nightlies=0 do_nightlies=${do_nightlies:=1} # if you do want to build them where should they go? # NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD NIGHTLY_DEST_DIR=${NIGHTLY_DEST_DIR:=${HOME}/public_html/software/binaries/nightlies/pre-release} # if we are not building a nightly/pre-release, i.e. this is a binary # for a stable release, they go somewhere else: # STABLE_DEST_DIR=${STABLE_DEST_DIR:=${HOME}/public_html/software/binaries/stable} # When we fail to extract the correct tar file from the web site, what # shall we build instead? # fallback_coot_version=coot-0.4 # ---------------------------------------------------------------- # End of tinkering with parameters. # ---------------------------------------------------------------- # First, check that this is bash! # if [ "$BASH" = "" ] ; then echo this is not bash\! echo this must be run with bash\! exit fi # now the functions: function mkdir_maybe { dir=$1 if [ ! -e "$dir" ] ; then mkdir $dir fi } # Give args: prefix-dir and (based on is-static-flag) either # "clear-static" or "clear-dynamic" # # function post_install_slim { echo we are slimming directory $1 fat_dir="$1" cleaned_dir="$2" clear_type="$3" echo fat_dir is $fat_dir echo clear_type is $clear_type echo cleaned_dir is $cleaned_dir mkdir_maybe $cleaned_dir mkdir_maybe $cleaned_dir/bin mkdir_maybe $cleaned_dir/lib lib_sos=`cd $fat_dir && ls -1 lib/lib*.so*` lib_as=`cd $fat_dir && ls -1 lib/lib*.a` if [ "$clear_type" = "clear-dynamic" ] ; then keep_lib_archs="$lib_as" fi if [ "$clear_type" = "clear-static" ] ; then keep_lib_archs="$lib_sos" fi for file in etc html info man share bin/coot bin/coot-real \ bin/findwaters bin/findwaters-real bin/findligand bin/findligand-real \ bin/guile lib/$python_version $keep_lib_archs ; do dn=`dirname $file` if [ -e $fat_dir/$file ] ; then echo rsync -axr $fat_dir/$file $cleaned_dir/$dn rsync -axr $fat_dir/$file $cleaned_dir/$dn else echo $fat_dir/$file does not exist fi done } function make_tar { echo in make_tar args: $1 $2 echo in make_tar: in dir: $PWD tar_dir=$1 tar_file_name=$2 cd $install_top_dir/.. if [ -e $tar_dir ] ; then echo taring nightly... from $tar_dir to $tar_file_name echo taring nightly... from $tar_dir to $tar_file_name >&2 tar czf $tar_file_name $tar_dir status=$? if [ "$status" != 0 ] ; then echo ERROR:: tar czf $tar_file_name $tar_dir failed! echo ERROR:: tar failed > $tar_file_name.md5sum rm $tar_file_name else md5sum $tar_file_name > $tar_file_name.md5sum /bin/ls -l $tar_file_name >> $tar_file_name.md5sum echo done tar successfully. fi else echo ERROR:: tar target directory $tar_dir does not exist. echo ERROR:: tar target directory $tar_dir does not exist. >&2 fi } function setup_ccp4 { # we have access to $OS and $arch. if test "$OS" = Linux ; then setup_file=/y/programs/xtal/ccp4-6.0/ccp4-6.0/include/ccp4.setup-sh if test -e $setup_file ; then . $setup_file fi setup_file=/lmb/dorset/linux_software/ccp4-6.0/include/ccp4.setup-bash if test -e $setup_file ; then . $setup_file fi fi if test "$OS" = Darwin ; then . /usr/local/ccp4-6.0.2/bin/ccp4.setup-sh fi } # Return 0 on success, 1 on failure (or not tested) # # # This can only be run when the coot tar file and greg tests have been # untared (in this particular build) # # we should be in the directory where coot was untarred for building # when this function was called. # function test_coot { echo testing with greg echo currently we are here: pwd if test "$run_tests" = true ; then # let's test our new coot # the greg tests are where the coot source code was untarred. # if [ ! -d greg-tests ] ; then return 1 fi setup_ccp4 cat < command-line-greg.scm (use-modules (ice-9 greg)) (set! greg-tools (list "greg-tests")) (set! greg-debug #t) (set! greg-verbose 5) (let ((r (greg-test-run))) (if r (coot-real-exit 0) (coot-real-exit 1))) EOF echo $install_top_dir/bin/coot-real --no-graphics --script command-line-greg.scm $install_top_dir/bin/coot-real --no-graphics --script command-line-greg.scm status=$? if [ $status = 0 ] ; then echo test_coot: coot test passed return 0 else echo test_coot: coot test failed return 1 fi else return 1 fi } # now on to some code! if [ "$use_proxy" = 1 ] ; then # establish proxy settings printf "Proxy user: " read proxy_user printf "Proxy password: " read -s proxy_pass printf "\n" http_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" https_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" ftp_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" ssl_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" export http_proxy https_proxy ftp_proxy ssl_proxy no_proxy fi # use the right (GNU) tar and provide the path to wget (needed # for downloads) and to GNU make - (which is necesary for python # at least). # # So that python and the *-configs are found when it is installed: # A bit of a kludge because we do testing for pre-release later. # It's a logical mess. # if test "$build_coot_prerelease" = 1 ; then PATH=${AUTOBUILD_INSTALLED}-pre-release-gtk2/bin:$PATH else PATH=$AUTOBUILD_INSTALLED-gtk2/bin:$PATH fi PATH=$PATH:/usr/local/bin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/bin: PATH=$PATH:/etc:/usr/etc # export PATH echo PATH is now: $PATH echo AUTOBUILD_BUILD is $AUTOBUILD_BUILD # This is where the sources downloaded from network go: AUTOBUILD_SOURCES=${AUTOBUILD_BUILD}/sources echo AUTOBUILD_SOURCES is $AUTOBUILD_SOURCES if (! test -d ${AUTOBUILD_SOURCES}) ; then mkdir -p ${AUTOBUILD_SOURCES} fi # now make the build logs directory mkdir -p $LOGS shared_static_flag="--disable-shared" shared_lib_ext=so systype=unknown # malloc.h business, Darwin does not have malloc.h # used in the gtk_canvas build have_malloc=1 if test "$OS" = "Darwin" ; then have_malloc=0 fix_ulong=1 update_libtool=1 update_config_guess_sub=1 shared_static_flag="--disable-static" shared_lib_ext=dylib need_readline_patch=1 # uname -a gives processor type in last field on Darwin processor=`uname -a | awk '{print $(NF)}'` need_gtk_imlib_libtool_fix=1 if test "$processor" = "i386" ; then need_glib_getpwuid_fix=1 need_glib_poll_fix=1 need_gtk_canvas_patch=1 fi osversion=`sw_vers -productVersion` systype=MacOSX-${osversion}-${processor} fi # redirect the output. # # exec 2>&1 > $LOGS/$HOST.log # Try not to redirect standard out so that it goes to # the sub-shell log? (testing) exec > $LOGS/gtk2-build.log echo This is script version $script_version for Gtk2 # local tinkering because our sgi runs out of room on /tmp on compiling if [ $HOST = batman ] ; then TMPDIR=$HOME/tmp export TMPDIR fi date # if [ -n "$specs" ] ; then if [ -e "$specs" ] ; then echo running these extras: echo . -------------------------------- cat "$specs" . "$specs" echo . -------------------------------- fi fi #initially unset: if test $OS = Linux ; then architecture=`uname -i` # uname -i and uname -p (strangely) return unknown on my ubuntu if test $architecture = unknown ; then architecture=`uname -m` fi fi # now architecture is something like i386 or x86_64 # now test for 64 bit Linux: if test "$OS" = "Linux" ; then processor=`uname -a | awk '{print $NF}'` # on my Redhat i386, uname returns: # Linux kalypso 2.6.12-1.1398_FC4 #1 Fri Jul 15 00:52:32 EDT 2005 i686 athlon i386 GNU/Linux # 64 bit Ubuntu: # Linux kalypso 2.6.22-14-generic #1 SMP Sun Oct 14 21:45:15 GMT 2007 x86_64 GNU/Linux # from that I presume we need $(NF-2) to get the arch (not NF-1). Eh? # arch=`uname -a | awk '{print $(NF-1)}'` arch=`uname -a | awk '{print $(NF-1)}'` echo currently architecture is $architecture if test "$architecture" = x86_64 -o "$architecture" = ia64 ; then update_libtool=1 update_config_guess_sub=1 else echo this is not a 64 bit machine fi fi if test $OS = Linux ; then which rpm > /dev/null have_rpm=$? if [ $have_rpm = 0 ] ; then for i in fedora redhat centos ; do dist=`rpm -q --qf '%{name}' ${i}-release` if test $? = 0 ; then dist_name=`echo ${dist} | sed s/\-release//g` dist_ver=`rpm -q --qf '%{version}' ${i}-release` break else dist_name='unknown' fi done else dist_name='unknown' fi case ${dist_name} in redhat ) case ${dist_ver} in [0-9] | [0-9].[0-9]* ) systype=${architecture}-redhat-${dist_ver} ;; * ) systype=rhel-`echo ${dist_ver} | sed s/[A-Za-z]//g` ;; esac ;; fedora | centos ) systype=${architecture}-${dist_name}-${dist_ver} ;; * ) if test -r /etc/issue; then dist_name=`awk 'NR==1{print tolower($1)}' /etc/issue` dist_ver=`awk 'NR==1{print tolower($2)}' /etc/issue` systype=${architecture}-${dist_name}-${dist_ver} else systype=${architecture}-unknown-Linux fi ;; esac fi if test $OS = IRIX64 ; then osversion=`uname -r` systype=${osversion}-sgi fi if test $OS = IRIX ; then osversion=`uname -r` systype=${osversion}-sgi fi if test $OS = OSF1 ; then osversion=`uname -r | sed s/V//g` systype=${osversion}-OSF1 fi echo systype: $systype echo update_libtool: $update_libtool echo update_config_guess_sub: $update_config_guess_sub # give us some diagnostic shell information: # (what extra things did $specs give us?) # if [ "$use_proxy" = 1 ] ; then echo no diagnostic variables, we are using a proxy. else set fi # We want to add some compiler info in the directory name. # If CC is set, use that, # If not, try gcc, # if not, try cc # # Similarly for the c++ compiler info # If CXX is set, use that # if not, try g++ # if not, try c++ if [ -n "$CC" ] ; then # CC was set v=$CC-`$CC --version` if [ $? -ne 0 ] ; then # but not gcc v=$CC-`$CC -v` if [ $? -ne 0 ] ; then v="missing_version" fi fi else # CC not set v=gcc-`gcc -dumpversion | head -1` if [ $? -ne 0 ] ; then # not gcc # try cc v=cc-`cc -v` if [ $? -ne 0 ] ; then v="missing_version" fi fi fi if [ -n "$CXX" ] ; then # CXX was set w=$CXX-`$CXX --version` if [ $? -ne 0 ] ; then # but not g++ w=$CXX-`$CXX -v` if [ $? -ne 0 ] ; then w="missing_cxx_version" fi fi else # CXX not set w=g++-`g++ -dumpversion | head -1` if [ $? -ne 0 ] ; then # not g++ # try c++ w=c++-`c++ -v` if [ $? -ne 0 ] ; then # try CC w=CC-`CC -v` if [ $? -ne 0 ] ; then w="missing_c++_version" fi fi fi # note that g++ 3.2 cannot compile clipper's test_contrib.cpp. # So, if we have g++ 3.2 or less, then we need to get and apply # test_contrib.cpp.patch awk -vversion=$w 'BEGIN{ exit (version+0 >= 3.3)}' wvers=$? if [ $wvers = 0 ] ; then need_clipper_contrib_patch=true fi fi # so now we have v and w set to something. We # need to sanitize that something. v_fid=`echo $v | sed 's/ /_/g'` w_fid=`echo $w | sed 's/ /_/g'` compilers_dir=gtk2-${v_fid}_and_${w_fid} HOSTLOGDIR=$LOGS/$compilers_dir if [ ! -e $HOSTLOGDIR ] ; then mkdir -p $HOSTLOGDIR if [ $? -ne 0 ] ; then # echo DISASTER: could not make directory $HOSTLOGDIR echo exiting. exit 2 fi fi # need to add test that make is GNU make echo "Testing version of make" MAKE=make make --version if [ $? -ne 0 ] ; then # definately not GNU make # Try gmake then.... gmake --version if [ $? -ne 0 ] ; then nomake=1 else MAKE=gmake nomake=0 fi if [ $nomake -eq 1 ] ; then echo Ooops. Your make '(' `which make` ')' is not GNU make and gmake not found. echo Exiting now. exit 2 fi fi if [ ! -e "$AUTOBUILD_BUILD" ] ; then mkdir "$AUTOBUILD_BUILD" if [ $? -ne 0 ] ; then echo mkdir "$AUTOBUILD_BUILD" failed. exit 2 fi fi cd $AUTOBUILD_BUILD if [ $? -ne 0 ] ; then echo $AUTOBUILD_BUILD failed for some reason. Now in `pwd` fi # for ccp4 (20051104) compatibility, we can't use colons in the date string date=`date -u +'%Y-%m-%d__T%H_%M_%S'` echo Date: $date # now in $AUTOBUILD_BUILD mkdir ${HOST}_$date if [ $? -ne 0 ] ; then echo mkdir ${HOST}_$date failed for some reason. Now in `pwd` fi cd ${HOST}_$date if [ $? -ne 0 ] ; then echo cd ${HOST}_$date failed for some reason. Now in `pwd` fi build_dir=`pwd` echo checking wget echo which wget which wget wget "http://www.ysbl.york.ac.uk/~emsley/build-logs/build-notes" if [ $? -ne 0 ] ; then echo wget failed for some reason echo exiting now. exit 1 else echo Done wget check. WGET="wget -N -P ${AUTOBUILD_SOURCES}" fi # latest version (without .tar.gz extension) coot_version=$fallback_coot_version ${WGET} -O ${AUTOBUILD_SOURCES}/index.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log http://www.ysbl.york.ac.uk/~emsley/software/ ${WGET} -O ${AUTOBUILD_SOURCES}/index-pre-release.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log http://www.ysbl.york.ac.uk/~emsley/software/pre-release/ pre_release_files_html="" if [ $build_coot_prerelease = 1 ] ; then pre_release_files_html=${AUTOBUILD_SOURCES}/index-pre-release.html fi if [ $build_coot_prerelease = yes ] ; then pre_release_files_html=${AUTOBUILD_SOURCES}/index-pre-release.html fi coot_version_tmp=`egrep href ${AUTOBUILD_SOURCES}/index.html $pre_release_files_html | sed -e 's/.*">//' -e 's/<.*//' | awk ' BEGIN {bmajor = -1; bminor = -1; bmicro = -1; } # /^coot-[0-9]\.[0-9]+\.[0-9]+.*\.tar\.gz/ { /^coot-[0-9]\.[0-9]+.*\.tar\.gz$/ { n = split($1,arr,"[-.]"); # print n,"parts"; # print arr[1], arr[2], arr[3], arr[4]; # print arr[5], arr[6], arr[7], arr[8]; major = arr[2] + 0; minor = arr[3] + 0; micro = arr[4] + 0; # print "testing best:",file, bmajor, bminor, bmicro,"vs. this:", major, minor, micro if (major > bmajor) { file = $1; bmajor = major; bminor = minor; bmicro = micro; } else { if (major == bmajor) { if (minor > bminor) { file = $1; bmajor = major; bminor = minor; bmicro = micro; } else { if (minor == bminor) { if (micro >= bmicro) { file = $1; bmajor = major; bminor = minor; bmicro = micro; } } } } } } END { gsub(".tar.gz.*", "", file); print file; # which is a version now. } '` if [ -z "$coot_version_tmp" ] ; then echo clever coot_version extraction failed, using default. else coot_version=$coot_version_tmp echo setting coot_version to $coot_version from extraction fi # are we doing a pre-release in York? # # problem here? generic_prefix is not yet set. What happens to coot_prefix? # domainname=`domainname` coot_prefix= if [ "$domainname" = "yorksbl" ] ; then # we are in York, let's try the pre-release coot... echo we are in York run_tests=true build_coot_prerelease=1 fi if [ "$domainname" = "biop" ] ; then run_tests=true build_coot_prerelease=1 fi # override the switch which turns off the building of the pre-release here: # build_coot_prerelease=1 # Let's initially set coot_prerelease_exists to not-exist, then we # try to download it from the Coot web site, and if it exists we set # coot_prerelease_exists to 1. If it doesn't exist, we don't do that # of course and we also don't make the install_top_dir to be the pre-release # directory later on. coot_prerelease_exists= if test "$build_coot_prerelease" = 1 ; then ${WGET} -O ${AUTOBUILD_SOURCES}/index.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log http://www.ysbl.york.ac.uk/~emsley/software/pre-release coot_version_pre=`egrep href ${AUTOBUILD_SOURCES}/index.html | sed -e 's/.*">//' -e 's/<.*//' | awk ' /^coot-[0-9]\.[0-9]+.*-pre.*\.tar\.gz$/ { last=$0 } END { print last } '` echo INFO:: building pre-release and coot_version_pre is $coot_version_pre if [ -z "$coot_version_pre" ] ; then echo trying to build pre-release coot, but failed to find pre-release version BINARY_TAR_DEST_DIR=$STABLE_DEST_DIR else build_coot_prerelease=1 # belt and braces coot_prerelease_exists=1 # tinker with coot_prefix, it is generic_prefix with pre-release added to prefix dir coot_prefix="--prefix=${AUTOBUILD_INSTALLED}-pre-release-gtk2 ${config_extras:-}" coot_source_tar_file=http://www.ysbl.york.ac.uk/~emsley/software/pre-release/$coot_version_pre coot_version=`echo $coot_version_pre | sed s/\.tar.gz//` BINARY_TAR_DEST_DIR=$NIGHTLY_DEST_DIR mkdir -p ${NIGHTLY_DEST_DIR} echo INFO:: set the target destination for binary tar file \(BINARY_TAR_DEST_DIR\) to $NIGHTLY_DEST_DIR fi else # this is a stable release BINARY_TAR_DEST_DIR=$STABLE_DEST_DIR mkdir -p ${BINARY_TAR_DEST_DIR} fi echo INFO:: binary tar destination dir: BINARY_TAR_DEST_DIR is $BINARY_TAR_DEST_DIR # set the build prefix for installed stuff. Put everything in the # pre-release directory if we are building a pre-release. # (Perhaps this bit of code should go down lower, where we test # build_coot_prerelease again # # we need install_top_dir because we use it to copy over coot.py # to the install python directory. # if [ "$build_coot_prerelease" = 1 ] ; then if [ "$coot_prerelease_exists" = 1 ] ; then generic_prefix="--prefix=${AUTOBUILD_INSTALLED}-pre-release-gtk2 ${config_extras:-}" install_top_dir=${AUTOBUILD_INSTALLED}-pre-release-gtk2 else # don't use pre-release generic_prefix="--prefix=$AUTOBUILD_INSTALLED-gtk2 ${config_extras:-}" coot_prefix="$generic_prefix" install_top_dir=${AUTOBUILD_INSTALLED}-gtk2 fi else # not pre-release generic_prefix="--prefix=$AUTOBUILD_INSTALLED-gtk2 ${config_extras:-}" install_top_dir=${AUTOBUILD_INSTALLED}-gtk2 coot_prefix="$generic_prefix" fi PATH=$install_top_dir/bin:$PATH installed_check_maybe_prefix= if [ "$check_dependencies_in_install_only" = 1 ] ; then installed_check_maybe_prefix=$install_top_dir/bin/ fi # we need to export this for net-http, because it doesn't set # variables from configure, we rely on a shell (environment) variable. export install_top_dir echo testing for install_top_dir: "$install_top_dir" if [ ! -e "$install_top_dir" ] ; then echo $install_top_dir does not exist echo making directory $install_top_dir mkdir -p $install_top_dir if [ $? -ne 0 ] ; then echo DISASTER: $install_top_dir does not exist and no way echo to make it. exit 2 fi else echo INFO:: $install_top_dir exists already. fi echo done testing for $install_top_dir if [ ! -e "$install_top_dir/lib" ] ; then echo making "$install_top_dir/lib" mkdir -p "$install_top_dir/lib" if [ $? -ne 0 ] ; then echo DISASTER: $install_top_dir/lib cannot be created echo to make it. exit 2 fi fi # # append or set LD_LIBRARY_PATH # if [ -z "$LD_LIBRARY_PATH" ] ; then LD_LIBRARY_PATH=$install_top_dir/lib else LD_LIBRARY_PATH=$install_top_dir/lib:$LD_LIBRARY_PATH fi export LD_LIBRARY_PATH #for Macs: if [ -z "$LD_LIBRARY_PATH" ] ; then DYLD_LIBRARY_PATH=$install_top_dir/lib else DYLD_LIBRARY_PATH=$install_top_dir/lib:$LD_LIBRARY_PATH fi export DYLD_LIBRARY_PATH # # IRIX64 (on batman at least) does not seem to use LD_LIBRARY_PATH, # it uses, instead, LD_LIBRARYN32_PATH. So we set that for all # systems, hoping that it won't do any harm on other systems. # # LD_LIBRARYN32_PATH=$LD_LIBRARY_PATH export LD_LIBRARYN32_PATH # ccp4_system_type can be one of the following # irix irix64 sunos sunos64 aix hpux osf1 linux freebsd # linux_compaq_compilers linux_intel_compilers generic Darwin # ia64_linux_intel Darwin_ibm_compilers linux_ibm_compilers ccp4_system_type="$OS" if test "$OS" = Linux ; then ccp4_system_type=linux else if test "$OS" = IRIX64 ; then ccp4_system_type=irix64 else if test "$OS" = IRIX ; then ccp4_system_type=irix else if test "$OS" = Darwin ; then ccp4_system_type=Darwin fi fi fi fi echo ccp4_system_type $ccp4_system_type # check for swig # which swig > /dev/null have_swig=$? if [ $have_swig = 0 ] ; then echo system has swig. Good. else echo swig required - not found. exit 2 fi # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- # which components? # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- # # Often there are components provided by the operating system or optional # installs thereof. # build_mmdb=0 build_ssmlib=0 build_fftw=0 build_python=0 build_clipper=0 # build_gtk=0 build_guile=0 build_guile_www=0 build_guile_gui=0 build_guile_goosh=0 build_libtool=0 build_net_http=0 build_gsl=0 # build_libungif=0 # build_libtiff=0 # build_libjpeg=0 # build_libpng=0 # build_imlib=0 # build_gtk_canvas=0 build_guile_gtk= build_gtkglext=0 build_freeglut=0 build_glib= build_readline= # In Gtk2, we presume that glib, gtk2 and gnomecanvas are available. # We shall test for these, but not build them. # Where might the "system" components be? # non_standard_dir_list="/usr/freeware /sw /opt/gnome $install_top_dir" dir_list="/usr /usr/X11R6 /usr/local $non_standard_dir_list" # fftw # We can eventually get fancy on this... but then clipper configure # needs changing. # The test is -n, i.e. a non-zero string length to build things. # # We need to test the $AUTOBUILD_INSTALLED directory for fftw because any # other place could quite well have the fftw that is compiled with doubles. # if test -e $install_top_dir/include/fftw.h ; then echo installation has fftw build_fftw= fi if test -n "$build_fftw" ; then echo fftw should be built build_fftw=1 fi # test for pkg-config if pkg-config --atleast-pkgconfig-version 0.16 ; then build_pkg_config= echo pkg-config is new enough `pkg-config --version` else build_pkg_config=1 echo pkg-config should be built fi # This allows standard pkg-config to find gtkglext and several other things. PKG_CONFIG_PATH=$install_top_dir/lib/pkgconfig:/usr/lib/pkgconfig export PKG_CONFIG_PATH echo PKG_CONFIG_PATH is $PKG_CONFIG_PATH # is the system gtk+2 new enough? Needs to be 2.8 or better build_gtk= # Do we have freetype2? cairo depends on it. if pkg-config freetype2 ; then build_freetype2= echo system/installation has freetype2 else echo freetype2 should be built build_freetype2=1 build_cairo=1 build_pycairo=1 fi # Do we have fontconfig? cairo depends on it. if test -z "$build_freetype2" ; then if pkg-config fontconfig ; then build_fontconfig= echo system/installation has fontconfig else echo fontconfig should be built build_fontconfig=1 build_cairo=1 build_pycairo=1 fi else echo no freetype, fontconfig should be built too. build_fontconfig=1 build_cairo=1 build_pycairo=1 fi # gtk 2.10.x says that it needs atk >= 1.9.0 if pkg-config --atleast-version=1.9 atk ; then echo atk is up to date build_atk= else echo atk should be built build_atk=1 fi if pkg-config --atleast-version=2.14.5 glib ; then # have glib echo glib is up to date build_glib= else echo glib is not up to date, rebuild glib - maybe. build_glib=1 fi if pkg-config --atleast-version=0.5.6 glitz ; then # have glitz echo glitz is up to date build_glitz= else echo glitz is not up to date, rebuild glitz, maybe build_glitz=1 fi # Pango depends on cairo. # if pkg-config --atleast-version=1.4.12 cairo ; then # have cairo echo cairo is up to date build_cairo= else echo cairo is not not up to date, rebuild gtk and friends build_pango=1 build_cairo=1 build_gtk=1 fi # pango version 1.12 is what gtk2+ 2.10.14 needs if [ "$build_pango" != 1 ] ; then if pkg-config --atleast-version=1.12 pango ; then build_pango= else build_pango=1 fi fi # Test the output of pkg-config gtk+-2.0 for recent enough gtk. # If not, then build it yourself. # # Experiment, to force bragg3 to compile gtk+2 # # was 2.8 needed_gtk_version=2.10 # pkg-config --atleast-version=$needed_gtk_version gtk+-2.0 gtk_pkg_config_status=$? if [ "$gtk_pkg_config_status" = 0 ] ; then build_cairo= build_gtk= echo :::::::: gtk version is at least $needed_gkt_version echo :::::::: gtk version is `pkg-config --modversion gtk+-2.0` else # no recent/good gtk echo :::::::: gtk and dependencies need to be built build_gtk=1 fi # freeglut # for dir in ${dir_list} ; do if test -e ${install_top_dir}/include/GL/freeglut_std.h ; then echo installation has Freeglut build_freeglut= glut_prefix="--with-glut-prefix=${install_top_dir}" fi # done if test -n "$build_freeglut" ; then echo freeglut should be built build_freeglut=1 glut_prefix="--with-glut-prefix=$install_top_dir" fi build_libtool=1 if test -e ${install_top_dir}/lib/libltdl.so.3 ; then build_libtool= fi if test -z "$build_libtool" ; then echo installation has libtool else echo libtool should be built fi build_gmp=1 if test -e ${install_top_dir}/lib/libgmp.so.3 ; then echo installation has gmp build_gmp= else echo gmp should be built fi build_readline=1 # # guile dependency readline. chihiro has bad build in # guile-1.6.7/guile-readline/readline.c:107 'rl_pending_input' undeclared # So installation needs to build readline (sigh). # if test -e ${install_top_dir}/include/readline/chardefs.h ; then build_readline= fi if test -z "$build_readline" ; then echo installation has readline else echo readline needs to be built fi # Darwin currently has guile-1.6 and guile (which is an older version) # we want to use guile-1.6 if it exists. # This need to be fixed for Macs I guess. We need 1.8.3 not 1.6 # # echo guile-1.6-config will fail on non-fink non-mac systems # guile-1.6-config --version # if test $? = 0 ; then # echo linking in fink 1.6 guile... # rm -f $install_top_dir/bin/guile # rm -f $install_top_dir/bin/guile-config # rm -f $install_top_dir/bin/guile-snarf # ln -s /sw/bin/guile-1.6 $install_top_dir/bin/guile # ln -s /sw/bin/guile-1.6-config $install_top_dir/bin/guile-config # ln -s /sw/bin/guile-1.6-snarf $install_top_dir/bin/guile-snarf # fi echo atempting to run installed guile-config \(this may fail, that\'s OK\). $install_top_dir/bin/guile-config --version if test $? != 0 ; then echo guile should be built build_guile=1 else # We have a seen a situation somehow where bin/guile-config is installed # but include/libguile.h is not. Strange. Let's test for libguile.h too. if test -e $install_top_dir/include/libguile.h ; then echo installation has guile build_guile= else echo no include/libguile.h. guile should be built build_guile_gtk=1 build_guile=1 fi fi # guile-gui if test -f $install_top_dir/share/guile/gui/paren-match.scm ; then echo installation has guile-gui build_guile_gui= else echo guile-gui needs to be installed build_guile_gui=1 fi # goosh if test -f $install_top_dir/share/guile/site/goosh.scm ; then echo installation has goosh build_guile_goosh= else build_guile_goosh=1 echo guile goosh needs to be installed fi # net http: if test -f $install_top_dir/share/guile/site/net/http/server.scm ; then echo installation has net-http: build_net_http= else echo net-http needs to be installed build_net_http=1 fi # do we have greg? # LD_LIBRARY_PATH has been set by now guile -c '(use-modules (ice-9 greg))' status=$? if test $status = 0 ; then echo installation has greg build_greg= else echo greg should be built build_greg=1 fi python -V if test $? != 0 ; then echo python should be built build_python=1 build_pygtk=1 build_pycairo=1 build_pygobject=1 else python_version_installed=`python -V 2>&1` case "$python_version_installed" in "Python 2.5.1") echo system has python, $python_version_installed which python build_python= ;; *) echo python $python_version_installed installed but not up to date... echo python should be built build_python=1 build_pygobject=1 build_pycairo=1 build_pygtk=1 ;; esac fi # test for pygobject if test -z "$build_pygobject" ; then if test -e $install_top_dir/include/pygtk-2.0/pygobject.h ; then echo installation has pygobject build_pygobject= else echo pygobject NOT exists, pygobject should be built build_pygobject=1 build_pycairo=1 build_pygtk=1 fi fi # test for pycairo if test -z "$build_pycairo" ; then if test -e $install_top_dir/include/pycairo/pycairo.h ; then echo installation has pycairo build_pycairo= else echo pycairo NOT exists, pycairo should be built build_pycairo=1 build_pygtk=1 fi fi # test for pygtk if test -z "$build_pygtk" ; then if test -e $install_top_dir/lib/python2.5/site-packages/gtk-2.0/gtk/keysyms.py ; then echo pygtk keysyms exists, no build pygtk else echo pygtk keysyms NOT exists, pygtk should be built build_pygtk=1 fi fi # force the GSL config to be in $install_top_dir, rather than # potenially getting it from the system # but does this compile cleanly on Mac OS X? I've forgotten. # Perhaps we will need to be more clever and potentially use # the fink GSL if it is available. $install_top_dir/bin/gsl-config --prefix if test $? != 0 ; then echo gsl should be built build_gsl=1 else gsl_version=`gsl-config --version` needed_gsl_version=1.3 build_gsl=`awk -v A=$gsl_version -v N=$needed_gsl_version 'BEGIN{x = (A+0)>(N+0) ? 0 : 1; print x}'` echo system/installation has the GSL version $gsl_version echo build_gsl is $build_gsl if [ $build_gsl = 1 ] ; then echo need to build GSL build_gsl=1 else echo GSL is up to date # set build_gsl to blank: build_gsl= fi fi # ############################################################## # test for GtkGLExt # ############################################################## build_gtkglext=1 if [ "$build_gtk" = "" ] ; then if test -e ${install_top_dir}/lib/libgtkglext-x11-1.0.so ; then build_gtkglext= fi if test -z "$build_gtkglext" ; then echo installation has gtkglext else echo gtkglext should be built fi fi # ############################################################## # test for guile-gtk # ############################################################## # guile-gtk, only look in installation, not system. if [ "$build_gtk" = "" ] ; then for dir in ${install_top_dir} ; do if test -e "${dir}/include/guile-gtk.h" ; then echo installation has guile-gtk build_guile_gtk= fi done else build_guile_gtk=1 fi if test -n "${build_guile_gtk}" ; then echo guile-gtk should be built build_guile_gtk=1 else echo guile-gtk should not be built fi # ############################################################## # test for gnomecanvas # ############################################################## # test for gnomecanvas here if [ "$build_gtk" = "" ] ; then pkg-config --modversion libgnomecanvas-2.0 if [ $? = 0 ] ; then gnome_canvas_result=`pkg-config --modversion libgnomecanvas-2.0` case ${gnome_canvas_result} in 2.*) echo system has libgnomecanvas-2.0 ;; *) echo system does not have libgnomecanvas-2.0 exit 2 ;; esac else echo pkg-config does not find libgnomecanvas-2.0. Exiting. fi else echo gnomecanvas need to be built fi # test for mmdb: Does mmdb_file.h exist, and if it does, does it # contain MMDBF_IgnoreHash. If not, then build mmdb. # # CCP4 mmdb installs in the include/mmdb directory, but mmdb-1.0.8 # installs just in include (I prefer the CCP4 way and the mmdb-1.0.8 # should be fixed at some stage). # # 20060801 mmdb has indeed been updated at the prompting of Lynn Ten Eyck. # so now we assign mmdb_inc_sub_dir to be mmdb not blank. # mmdb_inc_sub_dir="mmdb" # if test -e "${install_top_dir}/include/$mmdb_inc_sub_dir/mmdb_file.h" ; then grep MMDBF_IgnoreHash ${install_top_dir}/include/$mmdb_inc_sub_dir/mmdb_file.h if [ "$?" = "0" ] ; then echo mmdb should not be built build_mmdb= else echo INFO:: mmdb installed, but MMDBF_IgnoreHash test fails, rebuilding mmdb. build_mmdb=1 fi else echo installation has no mmdb, build mmdb. build_mmdb=1 fi if [ -e $install_top_dir/include/ssm_align.h ] ; then if [ "$build_mmdb" = 1 ] ; then build_ssmlib=1 else echo SSMlib should not be built build_ssmlib= fi else build_ssmlib=1 fi # clipper depends on mmdb, so if mmdb was built, the so must clipper. # likewise for fftw. # build_clipper=1 if [ -z "$build_mmdb" ] ; then # we potentially can pass the building of clipper: echo INFO:: shall we build clipper: mmdb not to be built if [ -z "$build_fftw" ] ; then echo INFO:: shall we build clipper: fftw not to be built # test for new ccp4-based clipper (for mtz and maps) if [ -e $install_top_dir/include/clipper/ccp4/ccp4_mtz_io.h ] ; then echo $install_top_dir/include/clipper/ccp4/ccp4_mtz_io.h exist if [ -e $install_top_dir/include/clipper/contrib/sfscale.h ] ; then echo $install_top_dir/include/clipper/contrib/sfscale.h exist build_clipper= else echo $install_top_dir/include/clipper/contrib/sfscale.h not exist, building clipper build_clipper=1 fi else echo $install_top_dir/include/clipper/ccp4/ccp4_mtz_io.h not exist, building clipper fi fi else echo mmdb needs to be built, so clipper needs building. fi # shall we build libccp4c? if [ -e $install_top_dir/lib/libccp4c.la ] ; then if [ -e $install_top_dir/include/ccp4/cmtzlib.h ] ; then # no need to rebuild build_ccp4c= else build_ccp4c=1 fi else build_ccp4c=1 fi # Here we can force the building of clipper because we don't # know if the dependency libccp4c.la was from 6.0 or 5.0.2 # But, let's not do that any more. # build_clipper= # build_ccp4c= # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # build components # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # # libccp4c: if test -n "$build_ccp4c" ; then echo BUILDING: libccp4c echo BUILDING: libccp4c >&2 ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/libccp4c-5.0.2-ysbl-2.tar.gz ( date gzip -dc ${AUTOBUILD_SOURCES}/libccp4c-5.0.2-ysbl-2.tar.gz | tar xf - cd libccp4c-5.0.2-ysbl-2 ./configure $generic_prefix $MAKE $MAKE install ) 2>&1 > $HOSTLOGDIR/01-libccp4c.txt else echo not building libccp4c: fi # # mmdb # # # mmdb # if test -n "$build_mmdb" ; then echo BUILDING mmdb: echo BUILDING: mmdb >&2 # # mmdb_version=1.0.10. Not yet. mmdb_version=1.0.8-ysbl-3 ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/mmdb-$mmdb_version.tar.gz ( date gzip -dc ${AUTOBUILD_SOURCES}/mmdb-$mmdb_version.tar.gz | tar xf - cd mmdb-$mmdb_version ./configure $generic_prefix $MAKE $MAKE install # now remove the mmdb binaries! rm $install_top_dir/bin/mwater rm $install_top_dir/bin/ncont rm $install_top_dir/bin/pdbcur ) 2>&1 > $HOSTLOGDIR/02-mmdb.txt else echo not building mmdb: fi if test -n "$build_ssmlib" ; then echo BUILDING SSMlib: # # wget http://www.ysbl.york.ac.uk/~emsley/software/extras/SSMlib-0.0-pre-1-ysbl.tar.gz ssmlib_version=0.0-pre-2-ysbl ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/SSMlib-$ssmlib_version.tar.gz ( date gzip -dc ${AUTOBUILD_SOURCES}/SSMlib-$ssmlib_version.tar.gz | tar xf - cd SSMlib-$ssmlib_version ./configure $generic_prefix --with-mmdb-prefix=$install_top_dir $MAKE $MAKE install ) > $HOSTLOGDIR/02-ssmlib.txt 2>&1 else echo not building ssmlib: fi # fftw if test -n "$build_fftw" ; then echo BUILDING fftw: # ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/fftw-2.1.5.tar.gz ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/fftw-configure-stuff.tar.gz ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/fftw-2.1.5.tar.gz | tar xf - gzip -dc ${AUTOBUILD_SOURCES}/fftw-configure-stuff.tar.gz | tar xf - cd fftw-2.1.5 ./configure $generic_prefix --enable-shared --enable-float $MAKE $MAKE install ) > $HOSTLOGDIR/03-fftw.txt 2>&1 else echo not building fftw: fi # # clipper # # # # # # Note clipper (currently installs in current directory) # # if test -n "$build_clipper" ; then # clipper: we use the ccp4 version of clipper now. # (it uses configure, not scons) # echo BUILDING clipper: clipper_version=20ac ${WGET} http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper$clipper_version.latest.tar.gz if [ "$need_clipper_contrib_patch" = true ] ; then ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/clipper_test_contrib.cpp.patch fi ( mkdir clipper cd clipper gzip -dc ${AUTOBUILD_SOURCES}/clipper$clipper_version.latest.tar.gz | tar xf - ccp4_libs_dir="`pwd`" # make clipper echo . ------------------------------------------------------------------------------ echo . " clipper " echo . ------------------------------------------------------------------------------ cd $ccp4_libs_dir/lib/clipper patch -p0 < ${AUTOBUILD_SOURCES}/clipper-new-ccp4-install.patch if [ "$need_clipper_contrib_patch" = true ] ; then patch -p0 < ${AUTOBUILD_SOURCES}/clipper_test_contrib.cpp.patch fi ./configure --prefix=$install_top_dir \ --with-fftw=$install_top_dir \ --with-mmdb=$install_top_dir \ --with-ccp4=$install_top_dir \ --enable-shared \ --enable-mmdb \ --enable-mmdbold \ --enable-cif \ --enable-ccp4 \ --enable-minimol \ --enable-cns \ CCP4_CXXFLAGS=-I$install_top_dir/include CCP4_LIBS=$install_top_dir/lib/libccp4c.la \ CXXFLAGS="-g -O2 -fno-strict-aliasing" # we don't want to make the clipper executables, so let's cd in to the clipper libs and # make (just) those. cd clipper $MAKE status=$? clipper_status=$status if [ "$clipper_status" != 0 ] ; then echo make of clipper failed - exit 2 from internal shell. exit 2 else $MAKE install fi ) > $HOSTLOGDIR/04-clipper.txt 2>&1 clipper_build_status=$? if [ $clipper_build_status != 0 ] ; then echo clipper build failed, exiting exit 2 fi else echo not building clipper: fi # freeglut if test -n "$build_freeglut" ; then echo BUILDING freeglut: ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/freeglut-2.4.0.tar.gz ( date pwd save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I/usr/X11R6/include" export CFLAGS gzip -dc ${AUTOBUILD_SOURCES}/freeglut-2.4.0.tar.gz | tar xf - cd freeglut-2.4.0 ./configure $generic_prefix --disable-warnings build_status=$? echo INFO:: freeglut configure status $build_status if [ $build_status -eq 0 ] ; then $MAKE build_status=$? echo INFO:: freeglut make status $build_status if [ $build_status -eq 0 ] ; then echo INFO:: freeglut make installing... $MAKE install glut_prefix="--with-glut-prefix=$install_top_dir" echo INFO:: setting glut_prefix to $glut_prefix fi fi CFLAGS="$save_CFLAGS" export CFLAGS ) > $HOSTLOGDIR/05-freeglut.txt 2>&1 else echo not building freeglut: fi ############################################################################### ########## pkg-config (blimey) ############# ############################################################################### if test -n "$build_pkg_config" ; then echo BUILDING pkg-config: # pkg_config_version=0.19 ${WGET} http://ftp.gnome.org/pub/GNOME/sources/pkg-config/0.19/pkg-config-$pkg_config_version.tar.gz ( date gzip -dc ${AUTOBUILD_SOURCES}/pkg-config-$pkg_config_version.tar.gz | tar xf - cd pkg-config-$pkg_config_version ./configure $generic_prefix $MAKE pkg_config_status=$? if [ "$pkg_config_status" != 0 ] ; then echo make of pkg-config failed else $MAKE install fi ) > $HOSTLOGDIR/05-pkg-config.txt 2>&1 else echo not building pkg-conifg: fi ############################################################################### ########## build gtk and friends ############# ############################################################################### # Building of the gtk2 dependencies depend on pkg-config. # configure: error: *** pkg-config too old; version 0.16 or better required. # Get a recent pkg-config here: # http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz # gtk2 build says that pango depends on cairo: # checking Pango flags... configure: error: # *** Pango not found. Pango built with Cairo support is required # *** to build GTK+. See http://www.pango.org for Pango information. # # so, if we build cairo, we must build pango too if test -n "$build_gtk" ; then echo BUILDING Gtk+-2 and dependencies... ( if [ "$build_atk" = 1 ] ; then echo ====================================================== echo BUILDING atk echo ====================================================== atk_version=1.20.0 ${WGET} http://ftp.gnome.org/pub/gnome/sources/atk/1.20/atk-$atk_version.tar.gz date gzip -dc ${AUTOBUILD_SOURCES}/atk-$atk_version.tar.gz | tar xf - cd atk-$atk_version ./configure $generic_prefix $MAKE atk_status=$? if [ "$atk_status" = 0 ] ; then $MAKE install else echo make of ATK failed. fi cd - else echo not BUILDING atk fi if [ "$build_glitz" = 1 ] ; then echo ====================================================== echo BUILDING GLitz! echo ====================================================== glitz_version=0.5.6 ${WGET} http://cairographics.org/snapshots/glitz-$glitz_version.tar.gz date gzip -dc ${AUTOBUILD_SOURCES}/glitz-$glitz_version.tar.gz | tar xf - cd glitz-$glitz_version ./configure $generic_prefix $MAKE glitz_status=$? if [ "$glitz_status" != 0 ] ; then echo make of glitz failed gtk_set_failure="make of glitz failed" else $MAKE install fi cd - else echo not BUILDING glitz fi if [ "$build_glib" = 1 ] ; then echo ====================================================== echo BUILDING glib echo ====================================================== glib_version=2.14.5 ${WGET} ftp://ftp.gtk.org/pub/glib/2.14/glib-$glib_version.tar.gz gzip -dc ${AUTOBUILD_SOURCES}/glib-$glib_version.tar.gz | tar xf - cd glib-$glib_version ./configure $generic_prefix $MAKE glib_status=$? if [ "$glib_status" != 0 ] ; then echo make of glib failed gtk_set_failure="make of glib failed" else $MAKE install fi cd - else echo not BUILDING glib fi # cairo(?) dependends on freetype2 (RedHat 8 doesn't have it) if [ "$build_freetype2" = 1 ] ; then echo ====================================================== echo BUILDING freetype2 echo ====================================================== freetype2_version=2.3.5 ${WGET} http://download.savannah.gnu.org/releases/freetype/freetype-$freetype2_version.tar.gz gzip -dc ${AUTOBUILD_SOURCES}/freetype-$freetype2_version.tar.gz | tar xf - cd freetype-$freetype2_version ./configure $generic_prefix $MAKE freetype2_status=$? if [ "$freetype2_status" != 0 ] ; then gtk_set_failure="make of freetype2 failed" echo make of freetype2 failed else $MAKE install fi cd - else echo NOT BUILDING freetype2 fi # cairo(?) dependends on fontconfig (include file?) to define `FC_RGBA_UNKNOWN' # fontconfig depends on Freetype2 (what fun). if [ "$build_fontconfig" = 1 ] ; then echo ====================================================== echo BUILDING fontconfig echo ====================================================== fontconfig_version=2.5.91 ${WGET} http://fontconfig.org/release/fontconfig-$fontconfig_version.tar.gz gzip -dc ${AUTOBUILD_SOURCES}/fontconfig-$fontconfig_version.tar.gz | tar xf - cd fontconfig-$fontconfig_version ./configure $generic_prefix $MAKE fontconfig_status=$? if [ "$fontconfig_status" != 0 ] ; then gtk_set_failure="make of fontconfig failed" echo make of fontconfig failed else $MAKE install fi cd - else echo NOT BUILDING fontconfig fi if [ "$build_cairo" = 1 ] ; then echo ====================================================== echo BUILDING cairo echo ====================================================== cairo_version=1.4.14 ${WGET} http://cairographics.org/releases/cairo-$cairo_version.tar.gz gzip -dc ${AUTOBUILD_SOURCES}/cairo-$cairo_version.tar.gz | tar xf - cd cairo-$cairo_version ./configure $generic_prefix --enable-glitz $MAKE cairo_status=$? if [ "$cairo_status" != 0 ] ; then gtk_set_failure="make of cairo failed" echo make of cairo failed else $MAKE install fi cd - else echo NOT BUILDING cairo fi if [ "$build_pango" = 1 ] ; then echo ====================================================== echo BUILDING pango echo ====================================================== pango_version=1.16.4 ${WGET} ftp://ftp.gtk.org/pub/pango/1.16/pango-$pango_version.tar.gz gzip -dc ${AUTOBUILD_SOURCES}/pango-$pango_version.tar.gz | tar xf - cd pango-$pango_version ./configure $generic_prefix $MAKE pango_status=$? if [ "$pango_status" != 0 ] ; then echo make of pango failed gtk_set_failure="make of pango failed" else $MAKE install fi cd - else echo NOT BUILDING pango fi # cairo depends dependends on librsvg (for testing) otherwise warning. # But. librsvg depends on pango (the pangoft2 part). This is crazy. # But. cairo depend on librsvg (doesn't it?) # Does cairo depend on pango? Yes. if [ "$pango_status" = 0 ] ; then echo ====================================================== echo BUILDING librsvg echo ====================================================== librsvg_version=2.20.0 ${WGET} http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.20/librsvg-$librsvg_version.tar.gz gzip -dc ${AUTOBUILD_SOURCES}/librsvg-$librsvg_version.tar.gz | tar xf - cd librsvg-$librsvg_version ./configure $generic_prefix $MAKE librsvg_status=$? if [ "$librsvg_status" != 0 ] ; then echo make of librsvg failed gtk_set_failure="make of librsvg failed" else $MAKE install fi cd - else echo NOT BUILDING librsvg fi if [ "$build_gtk" = 1 ] ; then echo ====================================================== echo BUILDING gtk+2 echo ====================================================== gtk2_version=2.10.14 # ${WGET} ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-$gtk2_version.tar.gz ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/gtk+-$gtk2_version.tar.gz gzip -dc ${AUTOBUILD_SOURCES}/gtk+-$gtk2_version.tar.gz | tar xf - cd gtk+-$gtk2_version ./configure $generic_prefix $MAKE gtk2_status=$? if [ "$gtk2_status" != 0 ] ; then echo make of gtk+2 failed gtk_set_failure="make of gtk+2 failed" else $MAKE install fi cd - else echo NOT BUILDING gtk2 fi if test -n "$gtk_set_failure" ; then exit 1 fi ) > $HOSTLOGDIR/06-gtk-prerequisites.txt 2>&1 if test "$?" != 0 ; then echo gtk set failed somewhere fi fi if test -n "$build_gtkglext" ; then echo BUILDING gtkglext: gtkglext_version=1.2.0 ${WGET} http://surfnet.dl.sourceforge.net/sourceforge/gtkglext/gtkglext-$gtkglext_version.tar.gz (date pwd gzip -dc ${AUTOBUILD_SOURCES}/gtkglext-$gtkglext_version.tar.gz | tar xf - cd gtkglext-$gtkglext_version ./configure $generic_prefix $MAKE status=$? if [ "$status" != 0 ] ; then echo make of gtkglext failed else $MAKE install fi ) > $HOSTLOGDIR/08-pre-gtkglext.txt 2>&1 else echo not building gtkglext: fi echo done with Gtk+-2 and dependencies... ############################################################################### ########## build python and friends ############# ############################################################################### # So that python is found when it is installed: # PATH=$install_top_dir/bin:$PATH export PATH # python_version is the filename of the python executable. For python # 2.5.1 it is python2.5, not python2.5.1 # python_version=python2.5 pver=2.5.1 # python # if test -n "$build_python" ; then echo BUILDING Python ${pver}: # ${WGET} http://www.python.org/ftp/python/$pver/Python-$pver.tgz ( date gzip -dc ${AUTOBUILD_SOURCES}/Python-$pver.tgz | tar xf - cd Python-$pver echo INFO:: ./configure $generic_prefix $python_spec_flags for python ./configure $generic_prefix $python_spec_flags echo INFO:: make for python $MAKE echo INFO:: make test for python $MAKE test echo INFO:: make install for python $MAKE install ) > $HOSTLOGDIR/05-python.txt 2>&1 # We need these otherwise python moans about not finding the libraries. # echo setting PYTHONHOME PYTHONHOME=$install_top_dir export PYTHONHOME echo PYTHONHOME is now $PYTHONHOME echo post linking python to $python_version # if [ ! -e $install_top_dir/bin/$python_version ] ; then echo Opps\! $python_version does not exist. # only python dependencies from now on echo exiting... exit fi if [ -e $install_top_dir/bin/python ] ; then echo removing old python rm $install_top_dir/bin/python fi current_dir=`pwd` cd $install_top_dir/bin echo linking new... ln -s $python_version python if [ $? -ne 0 ] ; then echo Opps: failed: ln -s $install_top_dir/bin/$python_version \ $install_top_dir/bin/python fi cd $current_dir echo done python linking. # now we have "python" in our path - no need to rehash - # clever old Bourne shell (or do I mean bash?). else echo not building python: fi if test -n "$build_pygobject" ; then echo BUILDING pygobject: # pygobject_version=2.14.1 ${WGET} http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.14/pygobject-$pygobject_version.tar.gz if test $? != 0 ; then echo PROBLEM:: getting pygobject source code fi ( date gzip -dc ${AUTOBUILD_SOURCES}/pygobject-$pygobject_version.tar.gz | tar xf - cd pygobject-$pygobject_version ./configure $generic_prefix $MAKE pygobject_status=$? if [ "$pygobject_status" != 0 ] ; then echo make of pygobject failed else $MAKE install fi ) > $HOSTLOGDIR/05-pygobject.txt 2>&1 else echo not building pygobject: fi if test -n "$build_pycairo" ; then echo BUILDING pycairo: # pycairo_version=1.2.6 ${WGET} http://cairographics.org/releases/pycairo-$pycairo_version.tar.gz if test $? != 0 ; then echo PROBLEM:: getting pycairo source code fi ( date gzip -dc ${AUTOBUILD_SOURCES}/pycairo-$pycairo_version.tar.gz | tar xf - cd pycairo-$pycairo_version ./configure $generic_prefix $MAKE pycairo_status=$? if [ "$pycairo_status" != 0 ] ; then echo make of pycairo failed else $MAKE install fi ) > $HOSTLOGDIR/05-pycairo.txt 2>&1 else echo not building pycairo: fi # http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.12/pygtk-2.12.1.tar.gz if test -n "$build_pygtk" ; then echo BUILDING pygtk: # # py_gtk_version=2.12.1 py_gtk_version=2.8.6 ${WGET} http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.8/pygtk-$py_gtk_version.tar.gz ( date gzip -dc ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.tar.gz | tar xf - cd pygtk-$py_gtk_version ./configure $generic_prefix --with-pango --with-pangocairo PYGOBJECT_CFLAGS=-I$install_top_dir/include/pygtk-2.0 PYGOBJECT_LIBS=-L$install_top_dir/lib $MAKE pygtk_status=$? if [ "$pygtk_status" != 0 ] ; then echo make of pygtk failed else $MAKE install fi ) > $HOSTLOGDIR/05-pygtk.txt 2>&1 else echo not building pytgtk fi # Now we need: # * guile # * guile-www # * guile-gtk # * guile-gui # * goosh # * gsl ############################################################################### ########## build guile and friends ############# ############################################################################### if test -n "$build_gmp" ; then echo BUILDING gmp: gmp_version=4.2 ${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-$gmp_version.tar.gz (date pwd gzip -dc ${AUTOBUILD_SOURCES}/gmp-$gmp_version.tar.gz | tar xf - cd gmp-$gmp_version ./configure $generic_prefix $MAKE status=$? if [ "$status" != 0 ] ; then echo make of gmp failed else $MAKE install fi ) > $HOSTLOGDIR/10-pre-gmp.txt 2>&1 else echo not building gmp: fi if test -n "$build_libtool" ; then echo BUILDING libtool: libtool_version=1.5.24 ${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libtool/libtool-$libtool_version.tar.gz (date pwd gzip -dc ${AUTOBUILD_SOURCES}/libtool-$libtool_version.tar.gz | tar xf - cd libtool-$libtool_version ./configure $generic_prefix $MAKE status=$? if [ "$status" != 0 ] ; then echo make of libtool failed else $MAKE install fi ) > $HOSTLOGDIR/10-pre-libtool.txt 2>&1 else echo not building libtool: fi if test -n "$build_readline" ; then echo BUILDING readline: readline_version=5.1 ${WGET} ftp://ftp.cwru.edu/pub/bash/readline-$readline_version.tar.gz ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/readline-5.1.patch ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/readline-$readline_version.tar.gz | tar xf - if test -n "$need_readline_patch" ; then echo patching readline... patch -p0 < ${AUTOBUILD_SOURCES}/readline-5.1.patch fi cd readline-$readline_version ./configure $generic_prefix $MAKE status=$? if [ "$status" != 0 ] ; then echo make of readline failed else $MAKE install fi ) > $HOSTLOGDIR/10-pre-readline.txt 2>&1 else echo not building readline: fi if test -n "$build_guile" ; then echo BUILDING guile: # guile_version=1.8.5 # mirror has gone/moved. # ${WGET} http://mirror.ac.uk/mirror/ftp.gnu.org/gnu/guile/guile-${guile_version}.tar.gz # ${WGET} http://ftp.gnu.org/gnu/guile/guile-${guile_version}.tar.gz ${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/guile/guile-${guile_version}.tar.gz ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/guile-${guile_version}.tar.gz | tar xf - cd guile-${guile_version} # we need to pass CFLAGS and LDFLAGS because there is no --with-readline-prefix # arg to guile's configure ./configure $generic_prefix CFLAGS="-I$install_top_dir/include -O" LDFLAGS=-L$install_top_dir/lib # Multilib fix for procedures.txt perl -pi -e 's|threads.doc||' `find . -name Makefile` $MAKE status=$? if [ "$status" != 0 ] ; then echo guile make failed. guile_build_status=$status else echo 1 --------------------------------------------------------------------- echo ' ' make install echo 1 --------------------------------------------------------------------- $MAKE install fi exit $status ) > $HOSTLOGDIR/10-guile.txt 2>&1 if $status ; then echo guile build failed fi else echo not building guile: fi if test -n "$build_net_http" ; then echo BUILDING net http for guile # ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/net-http-0.3.1.tar.gz | tar xf - cd net-http pwd echo ./configure $generic_prefix ./configure $generic_prefix # fiddle with the Makefile - to install it in the right (coot) place sed 's?^GUILE_SITEDIR.*?GUILE_SITEDIR=$(install_top_dir)/share/guile/site?' Makefile > Makefile.tmp mv Makefile.tmp Makefile # note, no make (author "humour") $MAKE install ) > $HOSTLOGDIR/11b-guile-net-http.txt else echo not building net-http: fi if test -n "$build_guile_gtk" ; then echo BUILDING guile-gtk: # guile_gtk_version=2.1 ${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/guile-gtk/guile-gtk-$guile_gtk_version.tar.gz ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/guile-gtk-$guile_gtk_version.tar.gz | tar xf - cd guile-gtk-$guile_gtk_version ./configure $generic_prefix --without-gtkgl --with-glade=no # now patch the libtool if needed: # fix ulong if needed: # sed 's/(ulong)/(unsigned long)/g' guile-gtk.c > tmp.c # mv tmp.c guile-gtk.c $MAKE status=$? guile_gtk_status=$status if [ "$guile_gtk_status" != 0 ] ; then echo Oooops guile-gtk make failed else echo 1 ------------------------------------------------------------------------- echo ' ' make install echo 1 ------------------------------------------------------------------------- $MAKE install fi ) > $HOSTLOGDIR/12-guile-gtk.txt else echo not building guile-gtk: fi if test -n "$build_guile_gui" ; then echo BUILDING guile-gui: # ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/guile-gui-0.2.tar.gz ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/guile-gui-0.2.tar.gz | tar xf - cd guile-gui-0.2 ./configure $generic_prefix $MAKE $MAKE install ) > $HOSTLOGDIR/13-guile-gui.txt else echo not building guile-gui: fi if test -n "$build_guile_goosh" ; then echo BUILDING goosh: # ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/goosh-1.3.tar.gz ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/goosh-1.3.tar.gz | tar xf - cd goosh-1.3 ./configure $generic_prefix $MAKE $MAKE install ) > $HOSTLOGDIR/14-goosh.txt else echo not building guile_goosh: fi if test -n "$build_greg" ; then echo building greg: ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/greg-2.0.0-pe.tar.gz ( date gzip -dc ${AUTOBUILD_SOURCES}/greg-2.0.0-pe.tar.gz | tar xf - cd greg-2.0.0-pe ./configure $generic_prefix $MAKE $MAKE install ) > $HOSTLOGDIR/10-greg.txt 2>&1 else echo not building greg: fi if test -n "$build_gsl" ; then echo BUILDING gsl: # # wget http://www.mirror.ac.uk/sites/ftp.gnu.org/gnu/gsl/gsl-1.5.tar.gz # wget http://ftp.gnu.org/gnu/gsl/gsl-1.6.tar.gz gsl_version=1.8 # ${WGET} http://ftp.gnu.org/gnu/gsl/gsl-$gsl_version.tar.gz # ${WGET} http://ftp.gnu.org/gnu/gsl/gsl-$gsl_version.tar.gz ${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsl/gsl-$gsl_version.tar.gz ( date pwd gzip -dc ${AUTOBUILD_SOURCES}/gsl-$gsl_version.tar.gz | tar xf - cd gsl-$gsl_version ./configure $generic_prefix $MAKE status=$? if [ "$status" != 0 ] ; then echo ERROR:: GSL make failed. exit 2 else echo 1 --------------------------------------------------------------- echo ' ' make install echo 1 ---------------------------------------------------------------- $MAKE install fi ) > $HOSTLOGDIR/15-gsl.txt else echo not building gsl: fi echo BUILDING coot: version $coot_version, python=$ENABLE_PYTHON_COOT echo BUILDING coot: version $coot_version, python=$ENABLE_PYTHON_COOT >&2 if [ "$build_coot_prerelease" != 1 ] ; then # normal release coot ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/$coot_version.tar.gz # ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/coot-static.patch else # If we are building pre-release coot_source_tar_file is set only if we can find # a pre-release source tar in the pre-release directory, otherwise it is not set if [ -n "$coot_source_tar_file" ] ; then ${WGET} $coot_source_tar_file else # compile release code then: ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/$coot_version.tar.gz fi # ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/coot-static.patch fi echo using coot version $coot_version ls -ls ${AUTOBUILD_SOURCES}/$coot_version.tar.gz if [ -e ${AUTOBUILD_SOURCES}/$coot_version.tar.gz ] ; then echo good ${AUTOBUILD_SOURCES}/$coot_version.tar.gz exists else echo badness ${AUTOBUILD_SOURCES}/$coot_version.tar.gz does not exist. echo nothing left to do then. Goodbye. exit 2 fi date pwd gzip -dc ${AUTOBUILD_SOURCES}/$coot_version.tar.gz | tar xf - coot_dir_name=`echo $coot_version | sed 's/-revision.*//'` cd $coot_dir_name if test -n "$glib_installed" ; then coot_extra_args="$coot_extra_args --with-glib-prefix=$install_top_dir" fi if test -n "$gtk_installed" ; then coot_extra_args="$coot_extra_args --with-gtk-prefix=$install_top_dir" fi scripting="--with-guile --with-guile-gtk --with-guile-gtk-prefix=$install_top_dir" # if ENABLE_PYTHON_COOT is not set, then we choose a day of the week # to build a python version. # if ENABLE_PYTHON_COOT is set, then if it is set to 0 or no then we # do not build a python version, otherwise we do build a python # version if [ -n "$ENABLE_PYTHON_COOT" ] ; then # it was set to something if [ "$ENABLE_PYTHON_COOT" != "0" ] ; then if [ "$ENABLE_PYTHON_COOT" != "no" ] ; then python_scripting='--with-python --with-pygtk' fi fi else # if ENABLE_PYTHON_COOT was not set, then turn on python scripting python_scripting='--with-python --with-pygtk' fi # no longer makes sense now that python is in by default # else # time_date=`date` # if [ ${time_date:0:3} = "Sun" ] ; then # scripting='--with-python' # fi # if [ ${time_date:0:3} = "Sun" ] ; then # scripting='--with-python' # fi # fi ############################################################################### ########## build Coot ############# ############################################################################### # echo BUILDING coot: version $coot_version, python=$ENABLE_PYTHON_COOT echo BUILDING coot: version $coot_version, python=$ENABLE_PYTHON_COOT >&2 # set the python tag outside the compile/install sub-shell. if [ "$ENABLE_PYTHON_COOT" = "no" ] ; then python_tag= else python_tag=-python fi ( if [ "$ENABLE_PYTHON_COOT" = "no" ] ; then echo INFO:: not a pythonized build cp src/blank.cc src/coot_wrap_python.cc else echo INFO:: A pythonized build fi # CXXFLAGS="-g -O" # consider getting rid of $shared_static_flag, which does a --disable-shared. # i.e. we should keep and use shared libs echo building in: $PWD echo ./configure $coot_prefix \ --with-gtkcanvas-prefix=$install_top_dir \ --with-mmdb-prefix=$install_top_dir \ --with-clipper-prefix=$install_top_dir \ --with-ssmlib-prefix=$install_top_dir \ --with-gtkgl-prefix=$install_top_dir \ --with-gtk2 \ $glut_prefix \ $scripting \ $python_scripting \ $shared_static_flag \ $coot_extra_args ./configure $coot_prefix \ --with-gtkcanvas-prefix=$install_top_dir \ --with-mmdb-prefix=$install_top_dir \ --with-clipper-prefix=$install_top_dir \ --with-ssmlib-prefix=$install_top_dir \ --with-gtkgl-prefix=$install_top_dir \ --with-gtk2 \ $glut_prefix \ $scripting \ $python_scripting \ $shared_static_flag \ $coot_extra_args rm src/coot_wrap_guile_pre.cc rm src/coot_wrap_python_pre.cc $MAKE status=$? if [ "$status" != 0 ] ; then echo make failed. bad_coot_make=1 exit 2 else echo 1 --------------------------------------------------------------- echo ' ' make install echo 1 ---------------------------------------------------------------- $MAKE install if [ "$python_scripting" = '--with-python' ] ; then echo copying src/coot.py $install_top_dir/share/coot/python cp src/coot.py $install_top_dir/share/coot/python fi fi ) > $HOSTLOGDIR/16-coot.txt 2>&1 # --with-gsl-prefix=$install_top_dir \ # --with-glib-prefix=$install_top_dir \ # --with-gtk-prefix=$install_top_dir \ # --with-gtkgl-prefix=$install_top_dir \ coot_build_status=$? if [ $coot_build_status != 0 ] ; then echo coot build failed, exiting. echo coot build failed, exiting. >&2 exit 2 else echo coot build was good. echo coot build was good. >&2 fi echo done coot build. echo done coot build. >&2 # now, do we need to add the extra data files, the refmac monomer # library and the reference structures? extra_dir=http://www.ysbl.york.ac.uk/~emsley/software/extras if [ -e $install_top_dir/share/coot/lib/data ] ; then echo INFO:: installation has refmac monomer library else echo INSTALLING refmac monomer library... $WGET $extra_dir/refmac-lib-data-monomers.tar.gz tar xzCf $install_top_dir/share/coot $AUTOBUILD_SOURCES/refmac-lib-data-monomers.tar.gz fi if [ -e $install_top_dir/share/coot/reference-structures ] ; then echo INFO:: installation has reference structures else echo INSTALLING reference structures... $WGET $extra_dir/reference-structures.tar.gz tar xzCf $install_top_dir/share/coot $AUTOBUILD_SOURCES/reference-structures.tar.gz fi # clear up the library dependencies clear_up_type= if [ $shared_static_flag != "--disable-static" ] ; then clear_up_type=clear-static fi if [ $shared_static_flag != "--disable-shared" ] ; then clear_up_type=clear-dynamic fi if [ $clear_up_type != "" ] ; then slim_dir=`dirname $install_top_dir`/coot-${OS}-${systype}-gtk2 post_install_slim $install_top_dir $slim_dir $clear_up_type fi test_coot > $LOGS/gtk2-build-testing.log r=$? gtk2=-gtk2 if [ $r = 0 ] ; then echo coot test passed if test "$do_nightlies" = "1" ; then if [ -d $BINARY_TAR_DEST_DIR ] ; then # original full fat: # make_tar `basename $install_top_dir` $BINARY_TAR_DEST_DIR/${coot_version}-binary-full-${OS}-${systype}${python_tag}.tar.gz # slimmed: make_tar `basename $slim_dir` $BINARY_TAR_DEST_DIR/${coot_version}-binary-${OS}-${systype}${python_tag}${gtk2}.tar.gz # update the ChangeLog, README and RELEASE-NOTES cd "$build_dir" cd $coot_dir_name cp ChangeLog $BINARY_TAR_DEST_DIR cp README $BINARY_TAR_DEST_DIR/coot-README cp RELEASE-NOTES $BINARY_TAR_DEST_DIR/${coot_version}-RELEASE-NOTES else echo directory for binaries does not exist. Skipping tar. fi else echo not doing tar files for nightlies: $do_nightlies fi else echo coot test failed fi echo finished.