| 1 |
|
| 2 |
|
| 3 |
# -*-shell-script-*-s |
| 4 |
# Prerequisites: sed, GNU make, libtool, wget |
| 5 |
# |
| 6 |
# (and for autogening: GNU m4, GNU autoconf, GNU automake) |
| 7 |
# |
| 8 |
# libz is optional for the moment |
| 9 |
|
| 10 |
# 1.3 Put RELEASE-NOTES on web site too |
| 11 |
# 1.4 Apply both of Ezra's patches of today Wed Mar 2 22:51:36 GMT 2005 |
| 12 |
# Update clipper version (the one with shelx .fcf ability) |
| 13 |
# 1.5 Apply Ezra's gtkglarea patch and GSL patch. |
| 14 |
# Update version of FFTW and other updates from MATSUURA Takanori. |
| 15 |
# 1.6 Update to mmdb-1.0.8 [# for molrep output] |
| 16 |
# 1.7 Fix logic of fftw test |
| 17 |
# 1.8 Add the clipper edcalc patch (suggested by Ezra ages ago) |
| 18 |
# 1.9 Add Fedora Core 4 support and testing for the need to build mccp4, |
| 19 |
# mmdb and clipper. |
| 20 |
# 1.10 Tidy up nightly code. |
| 21 |
# 1.11 Add code testing the need for guile_gui and goosh. |
| 22 |
# 1.12 Tidy nightly code again. |
| 23 |
# 1.13 Don't escape the "."s in gsub for new gawk (Ward Smith). |
| 24 |
# 1.14 20050628 Test for imlib on the installation, not the system (ignore |
| 25 |
# the system). |
| 26 |
# 1.15 20050709 Add glib gstrfuncs patch |
| 27 |
# 1.16 20050709 Update to guile 1.6.7 and add lt_preloaded_symbols patch |
| 28 |
# 1.17 20050721 Added clipper status code to compiling clipper part. |
| 29 |
# Redirect stderr output? |
| 30 |
# fix build_mccp4 problem. |
| 31 |
# 1.18 20050722 Fix guile build (wrong http tar file). |
| 32 |
# Added freeglut |
| 33 |
# 1.19 20050803 Update version of guile-gtk to 0.41 |
| 34 |
# 1.20 20050815 Several updates and clean up from MATSUURA Takanori. |
| 35 |
# 1.21 20050815 Stop if wget test fails. |
| 36 |
# 1.22 20050916 Update build for freeglut to use --disable-warnings and |
| 37 |
# CFLAGS |
| 38 |
# 1.23 20050916 Move "set" so we don't see confusing default coot_version |
| 39 |
# 1.24 20051012 Do pre-release tars for a few days. |
| 40 |
# 1.25 20051017 Don't make install if Coot's makes fails. Don't make -k |
| 41 |
# 1.26 20051018 Handle clipper nxmap patch. |
| 42 |
# 1.27 20051027 [Gif, Paris] Fix tarred directory for nightly pre-release |
| 43 |
# tars. |
| 44 |
# 1.28 20051101 Fix the md5sum for nxmap.h |
| 45 |
# 1.29 20051104 Apply most of MATSUURA Takanori's fixes. |
| 46 |
# Use CCP4 libs (mtz, clipper, mmdb). |
| 47 |
# 1.30 20051109 Darwin setting of FC for CCP4 libs configure. |
| 48 |
# 1.31 20051114 Fix coot tar file problem on building pre-release (or not). |
| 49 |
# 1.32 20060205 Add scripting variable debugging (its currently not making |
| 50 |
# python tar files) |
| 51 |
# 1.33 20060214 Get wget testing tar file from YSBL, not chem.gla |
| 52 |
# 1.34 20060219 Correct the install position of libccp4c.la |
| 53 |
# 1.35 20060219 create time stamp with current time, not the time of |
| 54 |
# the previous ccp4 libs file, now the find ctime test works |
| 55 |
# as I wanted. |
| 56 |
# 1.36 20060220 Add a libmmdb.la too. |
| 57 |
# 1.37 20060222 Add Bob Nolte's proxy settings |
| 58 |
# 1.38 20060224 dylib variable for libmmdb.la and libccp4c.la |
| 59 |
# 1.39 20060225 Fix sedding of libmmdb.la and libccp4c.la |
| 60 |
# 1.40 20060323 copy over coot.py to share/coot/python (if we built with |
| 61 |
# python) |
| 62 |
# 1.41 20060401 Big changes for ccp4 5.0.2 ccp4c libs. |
| 63 |
# 1.42 20060404 Various small build debuggings. |
| 64 |
# 1.43 20060405 Fix do_nightlies syntax error and fix up glut_prefix build |
| 65 |
# problem. |
| 66 |
# 1.44 20060405 Fix the tarred directory name when this is not a pre-release |
| 67 |
# 1.45 20060406 Check for missing reference structures and monomer lib and |
| 68 |
# install them if needed. |
| 69 |
# 1.46 20060418 use install_top_dir variable to copy over coot.py (not |
| 70 |
# $coot_prefix!) |
| 71 |
# 1.47 20060419 Remove the mmdb binaries |
| 72 |
# 1.48 20060420 J. Maclean says no guile. He is right. So check install for |
| 73 |
# guile, not system. |
| 74 |
# 1.49 20060420 Replace many $AUTOBUILD_INSTALLED with $install_top_dir. |
| 75 |
# 1.50 20060421 Replace other $AUTOBUILD_INSTALLED with $install_top_dir for |
| 76 |
# tar file creation. |
| 77 |
# 1.51 20060425 net-http was installing into the wrong place because it had |
| 78 |
# been set to install_top_dir, but this was not set as a shell |
| 79 |
# (or configured) variable so it was just blank [James Murray]. |
| 80 |
# Now we export install_top_dir. |
| 81 |
# 1.52 20060427 Don't add unecessary tagging of -pre-release to tar_dir at |
| 82 |
# the end. |
| 83 |
# 1.53 20060503 Force GSL to be in $install_top_dir rather than anywhere. |
| 84 |
# 1.54 20060519 Update to extract the right coot version from the release and |
| 85 |
# pre-release directories. |
| 86 |
# 1.55 20060621 Shuffle around the test for using pre-release |
| 87 |
# 1.56 20060626 Fixes from MATSUURA Takanori. Shuffle around the usage of |
| 88 |
# install_top_dir. |
| 89 |
# 1.57 20060704 run imlib-config from the installation, not anywhere. |
| 90 |
# 1.58 20060705 Fix wrong directory to build libtiff. |
| 91 |
# 1.59 20060706 guile-config should run with an argument, otherise it |
| 92 |
# returns with exit status 1 (and we test for non-zero). |
| 93 |
# 1.60 20060706 Fix (directory for) mmdb include file test. |
| 94 |
# 1.61 20060707 Add to coot configure line the option for guile_gtk |
| 95 |
# 1.62 20060708 Fix coot_prerelease_exists typo in setting install_top_dir |
| 96 |
# (oops). |
| 97 |
# 1.63 20060708 Add jpeg dependency for imlib |
| 98 |
# 1.64 20060708 Add libungif test to installation, not system (imlib |
| 99 |
# dependency). |
| 100 |
# 1.65 20060710 Add removal of coot_wrap_guile.cc compilation when python |
| 101 |
# scripting. |
| 102 |
# 1.66 20060710 Python on a Sunday. |
| 103 |
# 1.67 20060711 Try to fix up the Makefile for PNG. |
| 104 |
# 1.68 20060723 Add in the updates to ltmain.sh, ltconfig and config.guess/sub |
| 105 |
# for Mactel build. Add build for readline. |
| 106 |
# Readline version typo fixed. |
| 107 |
# 1.69 20060724 ENABLE_PYTHON_COOT variable is tested. Don't display |
| 108 |
# a variables if we are using a proxy. |
| 109 |
# 1.70 20060728 pass CFLAGS and LDFLAGS to guile's configure |
| 110 |
# 1.71 20060730 Add test for 64-bit Linux to update config.xxxs and libtool. |
| 111 |
# Installation readline built now, not system. |
| 112 |
# 1.72 20060801 Use mmdb-1.0.8-ysbl-2, which installs includes in the include |
| 113 |
# dir. This matches clipper cif_data_io.cpp which presumes that |
| 114 |
# it is there. (And is a clean thing to do anyway). |
| 115 |
# 1.73 20060801 Use the new version of libccp4c, with some of Ralf's patches |
| 116 |
# and includes that go into include/ccp4 dir. |
| 117 |
# 1.74 20060801 Use CCP4_CXXFLAGS argument to clipper (it does the wrong thing |
| 118 |
# with --with-ccp4) |
| 119 |
# 1.75 20060801 Use -pre-2 version of SSMlib, that has -Ixxx/include/mmdb to |
| 120 |
# find mmdb include files. |
| 121 |
# 1.76 20060808 test for libjpeg.$shared_lib_ext not libjpeg.so. LTE bug. |
| 122 |
# 1.77 20060818 Force update of libtool and config files for libjpeg. Extend |
| 123 |
# the make install proceedure. Lynn Ten Eyck reported problems |
| 124 |
# here. |
| 125 |
# 1.78 20060823 Add poll fix and getpwuid fix to glib build on Intel Mac. |
| 126 |
# 1.79 20060827 Add fix for gtk-canvas from fink for Intel Mac. |
| 127 |
# 1.80 20061002 Change freeglut test to test instaltion, not system. |
| 128 |
# 1.81 20061012 The path used to find *-config files should be the same one |
| 129 |
# that new executables are added (it was $AUTOBUILD_INSTALLED) |
| 130 |
# and it should be $AUTOBUILD_INSTALLED-pre-release/bin) when |
| 131 |
# we are building a pre-release. |
| 132 |
# 1.82 20061012 Change the destination tar file so that there are nightly |
| 133 |
# and stable directories for the binary tar files on the web |
| 134 |
# server. |
| 135 |
# 1.83 20061107 cd to the clipper dir when building clipper. Pirate and |
| 136 |
# bucca are not (attempted to be) built then. |
| 137 |
# 1.84 20061107 Capture and report error status from make in GSL (intel mac |
| 138 |
# build fails). |
| 139 |
# 1.85 20061107 Use GSL version 1.8, which includes Charles Ballard's fix for |
| 140 |
# fp_regs.h |
| 141 |
# 1.86 20061108 Add fink-based args for configure of gtk for Darwin |
| 142 |
# 1.87 20061108 Fix ltmain.sh updating for Gtk (oops!). |
| 143 |
# 1.88 20061122 Fix coot tar directory now that we have revision numbers in |
| 144 |
# tar file name. |
| 145 |
# 1.89 20061123 Fix/add test for ssmlib build (now depends on mmdb build) and |
| 146 |
# libccp4c build (now depends on xxx/include/ccp4/cmtzlib.h). |
| 147 |
# 1.90 20061128 Allow the user to specify if the dependencies should be checked |
| 148 |
# on the system or only in the autobuild installed directory. |
| 149 |
# Needs more checks to use this. Currently only glib and gtk |
| 150 |
# tests. |
| 151 |
# 1.91 20061211 Don't make install for guile-gtk if the make fails - or the |
| 152 |
# dependency check for guile-gtk in coot's configure passes |
| 153 |
# when it should fail (maybe). |
| 154 |
# 1.92 20061212 Apply Charles Ballards libtool patch for Macs for imlib and |
| 155 |
# guile-gtk. |
| 156 |
# 1.93 20061212 Fiddle the env vars to compile gtk+ on Mac. |
| 157 |
# 1.94 20070104 Non-pre-release build problems, BINARY_DEST_DIR |
| 158 |
# 2.01 20070109 imlib tar gz should be downloaded from the correct directory |
| 159 |
# (sigh). |
| 160 |
# 2.02 20070117 Try to compile clipper with -fno-strict-aliasing |
| 161 |
# 2.03 20070123 Tell us where the gtkglarea include file was found. |
| 162 |
# 2.04 20070124 GCC 3.2 on RH8 machine cannot compile new clipper, so add a |
| 163 |
# patch if needed. |
| 164 |
# 2.05 20070216 Put libtiff after libjpeg and give tiff's configure command |
| 165 |
# line args to find jpeg. |
| 166 |
# 2.06 20070306 Put in the clipper<->ccp4 new dist patch. |
| 167 |
# 2.07 20070319 Remove == comparisons - Lothar Esser. |
| 168 |
# 2.08 20070424 --with-jpeg-lib-dir should be a lib dir! |
| 169 |
# 2.09 20070501 Fix the setting of coot_version when no pre-release set. |
| 170 |
# 2.10 20071002 Post install slim the binaries. Add helper functions. |
| 171 |
# 2.11 20071005 Add some debugging to make_tar. It doesn't seem to work |
| 172 |
# currently. |
| 173 |
# 2.12 20071005 Fix post_install_slim call. |
| 174 |
# 2.13 20071005 Fix slim_dir |
| 175 |
# 2.14 20071006 Adjust python scripting settings, so that it should try |
| 176 |
# to compile with python most of the time now. |
| 177 |
# 2.15 20071008 Fix extra fi, uncommented typo. |
| 178 |
# 2.16 20071010 ENABLE_PYTHON_COOT=no for now. |
| 179 |
# 2.17 20071105 Swap out DL Clipper for York clipper [whoosh, bang, kerpow!] |
| 180 |
# enable-cns |
| 181 |
# 2.18 20071105 Backpeddle to mmdb 1.08. Baah. |
| 182 |
# 2.19 20071108 Version 1.08-ysbl-3 of mmdb. |
| 183 |
# 2.20 20071118 No longer make the full fat tar file. |
| 184 |
# 2.21 20071120 Sourcefource no longer distributes libungif, now in |
| 185 |
# ysbl software/extras |
| 186 |
# 2.22 20071121 set the architecture for ubuntu systems. |
| 187 |
# 2.23 20071125 Fix typo in recent fixes. |
| 188 |
# 2.24 20071126 Fix setting of systype for MacOSX, hopefully. |
| 189 |
# 2.25 20071126 Another try to fix setting of systype for MacOSX. |
| 190 |
# 2.26 20071130 Try to enable python |
| 191 |
# 2.27 20071207 More python tinkering. Upgrade to 2.5.1 |
| 192 |
# 2.28 20071207 Add greg. If in York, use it to test before installing. |
| 193 |
# 2.29 20071208 Setup CCP4 and use it to test coot before making binaries. |
| 194 |
# 2.30 20071209 Add dewinter's ccp4 setup in setup_ccp4. |
| 195 |
# 2.31 20071212 Redirect testing output to $LOGS/$HOST-testing.log |
| 196 |
# 2.32 20071213 Copy over the ChangeLog, README and RELEASE-NOTES on good test |
| 197 |
# 2.33 20071215 Pythonize only sometimes, default off. |
| 198 |
# 2.34 20071215 Tell us some Python info |
| 199 |
# 2.35 20071215 Python settings outside the subshell. |
| 200 |
# 2.36 20071219 Set up for testing and tars on biop too. |
| 201 |
# 3.00 20080108 Gtk+-2 version |
| 202 |
# 3.01 20080118 Add GtkGlExt |
| 203 |
# 3.02 20080121 Tinker with guile build settings. |
| 204 |
# 3.03 20080124 Build GTK2 from scratch: librsvg, cairo, pango, glitz. glib, gtk+-2 |
| 205 |
# 3.04 20080128 Add a test for the existance of pygtk |
| 206 |
# 3.05 20080129 Add pkg-config and pygobject |
| 207 |
# 3.06 20080130 Add test for pycairo |
| 208 |
# 3.07 20080130 pycairo needs 1.4.12 - so test for cairo, setting build_gtk=1 on |
| 209 |
# failure |
| 210 |
# 3.08 20080130 Remove static patch (for sgi). Add test/build for freetype2 |
| 211 |
# 3.09 20080130 fontconfig added too. |
| 212 |
# 3.10 20080131 Change HOSTLOGDIR to include gtk2 to separate it from gtk1 build logs. |
| 213 |
# 3.11 20080201 Fix problem in scripting args to coot's configure. |
| 214 |
# 3.12 20080207 Add test and build of ATK, needed for gtk+2.10.x |
| 215 |
# 3.13 20080208 lib cleaning problems, add debugging. |
| 216 |
# 3.14 20080208 Try requiring gtk 2.10 |
| 217 |
# |
| 218 |
# BL says:: I should do build versioning tooo! |
| 219 |
# let's start with 1.1 |
| 220 |
# |
| 221 |
# 1.1 08/05/11 switch to new style Refmac library |
| 222 |
# 1.2 25/06/11 apply clipper thread patch |
| 223 |
# 1.3 31/07/11 add proper goocanvas. |
| 224 |
# 1.4 25/02/12 Use libccp4c-5.0.2-ysbl-3.tar.gz, that has libccp4c_la_LIBADD. |
| 225 |
# 1.5 26/08/12 Update curl to libcurl_version=7.27.0 |
| 226 |
# 1.6 27/08/12 Remove old stable installed files before making new stable. |
| 227 |
# 1.7 22/09/12 update to mmdb 1.24.2 |
| 228 |
# 1.8 01/10/12 use mkdir_maybe, make sure glut things are copied in dirs, |
| 229 |
# use make -r flag for coot (speed up) |
| 230 |
# 1.9 24/01/13 Move pre-release and release server-dir to Cambridge. |
| 231 |
# 1.10 04/02/13 Refmac dictionary 5.39 |
| 232 |
# href to get pre release version |
| 233 |
# 1.11 28/02/13 New mmdb version - 1.25.0 |
| 234 |
# 1.12 28/04/13 mmdb version bump 1.25.2 |
| 235 |
# update to LMB-MRC download locations |
| 236 |
# 1.13 14/05/13 Add COOT_BUILD_INFO_STRING |
| 237 |
# 1.14 14/05/13 remove install_top_dir before stable install |
| 238 |
# 1.15 06/06/13 For Release 0.7.1, change release vs pre-release logic |
| 239 |
# (MRC server) |
| 240 |
# 1.16 18/06/13 More tinkering to get correct version for release from server. |
| 241 |
# 1.17 08/07/13 Adjust to build stable logic. |
| 242 |
# 1.18 18/08/13 Use ssm-1.3 and update mmdb tar server spec. |
| 243 |
# 1.19 04/09/13 Enable veryclean build, i.e. remove build dir, by flag |
| 244 |
# 1.20 xxxxx/14 merged with pre 0.8 script |
| 245 |
# 1.21 xxxxx/14 various updated binary downloads (NAME?FIXME) |
| 246 |
# 1.22 11/07/14 use msys guile binaries |
| 247 |
# 1.23 19/10/14 update to mmdb 2, ssm 1.4, bring in line with build-it |
| 248 |
# new place for python install (prefix/pythonxy) |
| 249 |
# 1.24 06/01/15 Add WGETO |
| 250 |
script_version=1.24 |
| 251 |
|
| 252 |
# :: NOTE:: |
| 253 |
# this "strange" construction of variable names: x=${x:=thing} sets the |
| 254 |
# variable x only if it has not previously been defined. |
| 255 |
# |
| 256 |
# So, the idea is that you write a wrapper for this script (defining typically |
| 257 |
# AUTOBUILD_INSTALLED, AUTOBUILD_BUILD, LOGS and build_coot_prerelease) then |
| 258 |
# source this file. That means that you (probably) don't have to edit your |
| 259 |
# version of build-it every time it changes. |
| 260 |
|
| 261 |
|
| 262 |
# ENABLE_PYTHON_COOT: if ENABLE_PYTHON_COOT is set to 0 or "no" then |
| 263 |
# python coot is not enable (guile coot is enabled). if |
| 264 |
# ENABLE_PYTHON_COOT is set, but not set to 0 or no then python coot |
| 265 |
# is enabled. If ENABLE_PYTHON_COOT is not set, the guile-coot is |
| 266 |
# enabled (python coot is not enabled). |
| 267 |
|
| 268 |
# Pythonizing coot makes non-transferable binararies (why?). Let |
| 269 |
# the pythonness be controlled on the command line: |
| 270 |
# |
| 271 |
ENABLE_PYTHON_COOT=yes |
| 272 |
|
| 273 |
# for Windows we shall have an option to enable Guile and python is default |
| 274 |
if [ "$1" = "guile" ] ; then |
| 275 |
ENABLE_GUILE_COOT=yes |
| 276 |
build_type=-guile |
| 277 |
else |
| 278 |
ENABLE_GUILE_COOT=no |
| 279 |
build_type= |
| 280 |
fi |
| 281 |
|
| 282 |
# better do with argv/case or similar |
| 283 |
make_clean_coot= |
| 284 |
if [ "$1" = "clean" ] ; then |
| 285 |
make_clean_coot=yes |
| 286 |
fi |
| 287 |
if [ "$2" = "clean" ] ; then |
| 288 |
make_clean_coot=yes |
| 289 |
fi |
| 290 |
|
| 291 |
# better do with argv/case or similar |
| 292 |
make_from_scratch= |
| 293 |
if [ "$1" = "veryclean" ] ; then |
| 294 |
make_from_scratch=yes |
| 295 |
fi |
| 296 |
if [ "$2" = "veryclean" ] ; then |
| 297 |
make_from_scratch=yes |
| 298 |
fi |
| 299 |
|
| 300 |
|
| 301 |
# Set the host and the OS. |
| 302 |
# Fairly fundamental. |
| 303 |
# |
| 304 |
OS=`uname` |
| 305 |
HOST=`hostname` |
| 306 |
HOST=`echo $HOSTNAME | tr '[A-Z]' '[a-z]'` |
| 307 |
|
| 308 |
# Do we need to use a proxy server to get documents from the web? (set |
| 309 |
# to 1 if we do) |
| 310 |
use_proxy=${use_proxy:=} |
| 311 |
# if we do need a proxy then we should give the proxy host and port too: |
| 312 |
proxy_host=${proxy_host:=myproxy.com} |
| 313 |
proxy_port=${proxy_port:=800} |
| 314 |
no_proxy=${no_proxy:=".corp.net.com"} |
| 315 |
|
| 316 |
# This is where the compiled binaries/libraries/data get installed: |
| 317 |
# Note that the directory name must NOT end in a / |
| 318 |
# |
| 319 |
AUTOBUILD_INSTALLED=${AUTOBUILD_INSTALLED:=${HOME}/autobuild/${OS}-${HOST}} |
| 320 |
# or perhaps, for the adventurous: |
| 321 |
#AUTOBUILD_INSTALLED=$CCP4_MASTER |
| 322 |
|
| 323 |
# This is where the actual build (compilation) master directory is: |
| 324 |
# a temporary or scratch directory would be sensible. |
| 325 |
# |
| 326 |
# AUTOBUILD_BUILD=${HOME}/autobuild |
| 327 |
# I'm putting my build on "scratch space" |
| 328 |
AUTOBUILD_BUILD=${AUTOBUILD_BUILD:=$HOME/autobuild} |
| 329 |
|
| 330 |
# This is where the build logs go: |
| 331 |
# suggested value: |
| 332 |
# LOGS=$AUTOBUILD_BUILD/logs |
| 333 |
# but I want to put my log file on the web, so I put them here: |
| 334 |
LOGS=${LOGS:=$HOME/public_html/build-logs/${OS}-${HOST}} |
| 335 |
PUBLIC_HTML_LOGS=/z/build-logs |
| 336 |
|
| 337 |
# set this to "no" if you don't want to compile the pre-release code. |
| 338 |
# build_coot_prerelease= |
| 339 |
build_coot_prerelease=${build_coot_prerelease:=1} |
| 340 |
|
| 341 |
# We shall we check dependencies? |
| 342 |
# |
| 343 |
# Should we look for gtk etc on the system or only in the installed |
| 344 |
# build directory? We want to do the first if we are a person using |
| 345 |
# this build script to build coot themselves and we want to do the |
| 346 |
# second to build a external-dependency-free coot build (like making |
| 347 |
# the binary tars distributed from York). |
| 348 |
|
| 349 |
# check_dependencies_in_install_only= |
| 350 |
check_dependencies_in_install_only=1 |
| 351 |
|
| 352 |
# get build specials, e.g. change the compiler or the compiler options |
| 353 |
# (e.g build for debugging), extra libraries etc setup LD_LIBRARY_DIR |
| 354 |
# (or whatever) to include the autobuild library dir so that |
| 355 |
# intermediate (configure compile) programs run and the addition to |
| 356 |
# the path of GNU make and wget. |
| 357 |
# |
| 358 |
# use this to specify config_extras |
| 359 |
# |
| 360 |
# options are: GL_prefix, e.g. SunOS has Mesa Graphics - this is |
| 361 |
# where to find them: |
| 362 |
# glut_prefix, optionally can use freeglut |
| 363 |
# |
| 364 |
# Suggested value: comment out this line |
| 365 |
specs=${specs:=$HOME/autobuild/build-scripts/${HOST}-specials} |
| 366 |
|
| 367 |
# Make nightly binary tarballs? |
| 368 |
# You probably don't want to do this, so recommended is do_nightlies=0 |
| 369 |
do_nightlies=${do_nightlies:=1} |
| 370 |
# if you do want to build them where should they go? |
| 371 |
# NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD |
| 372 |
NIGHTLY_DEST_DIR=${NIGHTLY_DEST_DIR:=${HOME}/public_html/software/binaries/pre-release} |
| 373 |
# if we are not building a nightly/pre-release, i.e. this is a binary |
| 374 |
# for a stable release, they go somewhere else: |
| 375 |
# |
| 376 |
STABLE_DEST_DIR=${STABLE_DEST_DIR:=${HOME}/public_html/software/binaries/stable} |
| 377 |
|
| 378 |
|
| 379 |
# When we fail to extract the correct tar file from the web site, what |
| 380 |
# shall we build instead? |
| 381 |
# |
| 382 |
fallback_coot_version=coot-0.8 |
| 383 |
|
| 384 |
# For windows shared and enhanced Ligand compilation |
| 385 |
# |
| 386 |
# set this to "yes", i.e. 1 if you want to compile wth enhanced ligand |
| 387 |
# |
| 388 |
build_enhanced_ligand=${build_enhanced_ligand:=0} |
| 389 |
build_shared=${build_shared:=0} |
| 390 |
|
| 391 |
# LE needs shared, so set this too then |
| 392 |
if [ $build_enhanced_ligand = 1 ] ; then |
| 393 |
build_shared=1 |
| 394 |
build_boost=1 |
| 395 |
build_rdkit=1 |
| 396 |
else |
| 397 |
build_boost=0 |
| 398 |
build_rdkit=0 |
| 399 |
fi |
| 400 |
|
| 401 |
if [ $build_shared = 1 ] ; then |
| 402 |
shared_static_flag="--enable-shared --disable-static" |
| 403 |
else |
| 404 |
shared_static_flag="--disable-shared" |
| 405 |
fi |
| 406 |
|
| 407 |
# not shared yet |
| 408 |
shared_lib_ext=dll |
| 409 |
|
| 410 |
# ---------------------------------------------------------------- |
| 411 |
# End of tinkering with parameters. |
| 412 |
# ---------------------------------------------------------------- |
| 413 |
|
| 414 |
# First, check that this is bash. |
| 415 |
# |
| 416 |
if [ "$BASH" = "" ] ; then |
| 417 |
echo this shell is not bash\! |
| 418 |
echo this script must be run with bash\! |
| 419 |
exit |
| 420 |
fi |
| 421 |
|
| 422 |
|
| 423 |
# now the functions: |
| 424 |
|
| 425 |
function mkdir_maybe { |
| 426 |
|
| 427 |
dir=$1 |
| 428 |
if [ ! -e "$dir" ] ; then |
| 429 |
mkdir $dir |
| 430 |
fi |
| 431 |
|
| 432 |
} |
| 433 |
|
| 434 |
# Give args: prefix-dir and (based on is-static-flag) either |
| 435 |
# "clear-static" or "clear-dynamic" |
| 436 |
# |
| 437 |
function post_install_slim { |
| 438 |
|
| 439 |
echo we are slimming directory $1 |
| 440 |
fat_dir="$1" |
| 441 |
cleaned_dir="$2" |
| 442 |
clear_type="$3" |
| 443 |
echo fat_dir is $fat_dir |
| 444 |
echo clear_type is $clear_type |
| 445 |
echo cleaned_dir is $cleaned_dir |
| 446 |
|
| 447 |
mkdir_maybe $cleaned_dir |
| 448 |
mkdir_maybe $cleaned_dir/bin |
| 449 |
mkdir_maybe $cleaned_dir/lib |
| 450 |
|
| 451 |
lib_sos=`cd $fat_dir && ls -1 lib/lib*.so*` |
| 452 |
lib_as=`cd $fat_dir && ls -1 lib/lib*.a` |
| 453 |
|
| 454 |
if [ "$clear_type" = "clear-dynamic" ] ; then |
| 455 |
keep_lib_archs="$lib_as" |
| 456 |
fi |
| 457 |
|
| 458 |
if [ "$clear_type" = "clear-static" ] ; then |
| 459 |
keep_lib_archs="$lib_sos" |
| 460 |
fi |
| 461 |
|
| 462 |
for file in etc html info man share bin/coot bin/coot-real \ |
| 463 |
bin/findwaters bin/findwaters-real bin/findligand bin/findligand-real \ |
| 464 |
bin/guile lib/$python_version $keep_lib_archs ; |
| 465 |
do |
| 466 |
dn=`dirname $file` |
| 467 |
if [ -e $fat_dir/$file ] ; then |
| 468 |
echo rsync -axr $fat_dir/$file $cleaned_dir/$dn |
| 469 |
rsync -axr $fat_dir/$file $cleaned_dir/$dn |
| 470 |
else |
| 471 |
echo $fat_dir/$file does not exist |
| 472 |
fi |
| 473 |
done |
| 474 |
echo done rsyncing. |
| 475 |
} |
| 476 |
|
| 477 |
|
| 478 |
function make_tar { |
| 479 |
|
| 480 |
echo in make_tar args: $1 $2 |
| 481 |
echo in make_tar: in dir: $PWD |
| 482 |
|
| 483 |
tar_dir=$1 |
| 484 |
tar_file_name=$2 |
| 485 |
|
| 486 |
cd $install_top_dir/.. |
| 487 |
if [ -e $tar_dir ] ; then |
| 488 |
echo taring nightly... from $tar_dir to $tar_file_name |
| 489 |
tar czf $tar_file_name $tar_dir |
| 490 |
status=$? |
| 491 |
if [ "$status" != 0 ] ; then |
| 492 |
echo ERROR:: tar czf $tar_file_name $tar_dir failed. |
| 493 |
echo ERROR:: while in directory $(pwd) |
| 494 |
echo ERROR:: tar failed > $tar_file_name.md5sum |
| 495 |
rm $tar_file_name |
| 496 |
else |
| 497 |
md5sum $tar_file_name > $tar_file_name.md5sum |
| 498 |
/bin/ls -l $tar_file_name >> $tar_file_name.md5sum |
| 499 |
echo done tar successfully. |
| 500 |
fi |
| 501 |
else |
| 502 |
echo ERROR:: tar target directory $tar_dir does not exist. |
| 503 |
fi |
| 504 |
} |
| 505 |
|
| 506 |
function setup_ccp4 { |
| 507 |
|
| 508 |
# we have access to $OS and $arch. |
| 509 |
|
| 510 |
if test "$OS" = Linux ; then |
| 511 |
setup_file=/y/programs/xtal/ccp4-6.0/ccp4-6.0/include/ccp4.setup-sh |
| 512 |
if test -e $setup_file ; then |
| 513 |
. $setup_file |
| 514 |
fi |
| 515 |
setup_file=/lmb/dorset/linux_software/ccp4-6.0/include/ccp4.setup-bash |
| 516 |
if test -e $setup_file ; then |
| 517 |
. $setup_file |
| 518 |
fi |
| 519 |
fi |
| 520 |
if test "$OS" = Darwin ; then |
| 521 |
. /usr/local/ccp4-6.0.2/bin/ccp4.setup-sh |
| 522 |
fi |
| 523 |
} |
| 524 |
|
| 525 |
|
| 526 |
# exit |
| 527 |
function my_exit { |
| 528 |
|
| 529 |
exit_arg=$1 |
| 530 |
shift |
| 531 |
extra_args=$* |
| 532 |
|
| 533 |
# remove evtl. existing coot-version files |
| 534 |
# and installer variable file |
| 535 |
rm -f $install_top_dir/coot-version |
| 536 |
# even if failed |
| 537 |
# we write a number of variables to a file which we import in the |
| 538 |
# masta script so that we preserve these |
| 539 |
# first remove an the old file |
| 540 |
var_file=${HOME}/wincoot-installer-variables |
| 541 |
echo deleting $var_file |
| 542 |
rm -f $var_file |
| 543 |
echo LOGS=${LOGS} > $var_file |
| 544 |
echo NIGHTLY_DEST_DIR=${NIGHTLY_DEST_DIR} >> $var_file |
| 545 |
echo wincoot_version=$wincoot_version >> $var_file |
| 546 |
echo build_coot_prerelease=$build_coot_prerelease >> $var_file |
| 547 |
echo coot_build_status=$coot_build_status >> $var_file |
| 548 |
echo coot_test_status=$coot_test_status >> $var_file |
| 549 |
echo binary_type_latest=$binary_type_latest >> $var_file |
| 550 |
echo HOSTLOG_STUB=$compilers_dir${build_type} >> $var_file |
| 551 |
|
| 552 |
echo fail-build $extra_args > $LOGS/gtk2${build_type}-test-status |
| 553 |
if [ -e $LOGS/gtk2${build_type}-build-status ] ; then |
| 554 |
rm $LOGS/gtk2${build_type}-build-status |
| 555 |
fi |
| 556 |
exit $exit_arg |
| 557 |
} |
| 558 |
|
| 559 |
|
| 560 |
# Return 0 on success, 1 on failure (or not tested) |
| 561 |
# |
| 562 |
# |
| 563 |
# This can only be run when the coot tar file and greg tests have been |
| 564 |
# untared (in this particular build) |
| 565 |
# |
| 566 |
# we should be in the directory where coot was untarred for building |
| 567 |
# when this function was called. |
| 568 |
# |
| 569 |
function test_coot_guile { |
| 570 |
|
| 571 |
echo testing with greg |
| 572 |
echo testing with greg >&2 |
| 573 |
echo currently we are here: |
| 574 |
pwd |
| 575 |
date |
| 576 |
if [ "$1" != "" ] ; then |
| 577 |
coot_binary=$1 |
| 578 |
else |
| 579 |
coot_binary=$install_top_dir/libexec/coot-bin |
| 580 |
fi |
| 581 |
|
| 582 |
if test "$run_tests" = true ; then |
| 583 |
# let's test our new coot |
| 584 |
|
| 585 |
# the greg tests are where the coot source code was untarred. |
| 586 |
# |
| 587 |
if [ ! -d greg-tests ] ; then |
| 588 |
echo greg-tests dir missing in this directory: |
| 589 |
pwd |
| 590 |
return 1 |
| 591 |
fi |
| 592 |
|
| 593 |
setup_ccp4 |
| 594 |
|
| 595 |
cat <<EOF > command-line-greg.scm |
| 596 |
(use-modules (ice-9 greg)) |
| 597 |
(set! greg-tools (list "greg-tests")) |
| 598 |
(set! greg-debug #t) |
| 599 |
(set! greg-verbose 5) |
| 600 |
(let ((r (greg-test-run))) |
| 601 |
(if r |
| 602 |
(coot-real-exit 0) |
| 603 |
(coot-real-exit 1))) |
| 604 |
EOF |
| 605 |
|
| 606 |
echo $install_top_dir/bin/coot --no-graphics --script command-line-greg.scm |
| 607 |
$install_top_dir/bin/coot --no-graphics --script command-line-greg.scm |
| 608 |
|
| 609 |
status=$? |
| 610 |
if [ $status = 0 ] ; then |
| 611 |
echo test_coot: coot test passed |
| 612 |
return 0 |
| 613 |
else |
| 614 |
echo test_coot: coot test failed |
| 615 |
return 1 |
| 616 |
fi |
| 617 |
else |
| 618 |
echo run_tests is not true, not testing. |
| 619 |
return 1 |
| 620 |
fi |
| 621 |
|
| 622 |
} |
| 623 |
|
| 624 |
# Return 0 on success, 1 on failure (or not tested) |
| 625 |
# |
| 626 |
# we should be in the directory where coot was untarred for building |
| 627 |
# when this function was called. |
| 628 |
# |
| 629 |
function test_coot_python { |
| 630 |
|
| 631 |
echo testing with python unittest |
| 632 |
echo currently we are here: |
| 633 |
pwd |
| 634 |
date |
| 635 |
if [ "$1" != "" ] ; then |
| 636 |
coot_binary=$1 |
| 637 |
else |
| 638 |
coot_binary=$install_top_dir/libexec/coot-bin |
| 639 |
fi |
| 640 |
|
| 641 |
if test "$run_tests" = true ; then |
| 642 |
# let's test our new coot |
| 643 |
# first clean up coot-backup otherwise we'll fill up the disk |
| 644 |
echo removing old backup-files in coot-backup |
| 645 |
rm coot-backup/* |
| 646 |
# for python build we need to set COOT_PYTHON_DIR and COOT_HOME |
| 647 |
COOT_PYTHON_DIR=$install_top_dir/python27/lib/site-packages/coot |
| 648 |
COOT_HOME=$HOME |
| 649 |
# add lib to path for rdkit and boost |
| 650 |
PATH=$install_top_dir/lib:$PATH |
| 651 |
PYTHONPATH=$COOT_PYTHON_DIR |
| 652 |
PYTHONHOME=$install_top_dir/python27 |
| 653 |
export PYTHONPATH |
| 654 |
export PYTHONHOME |
| 655 |
export COOT_PYTHON_DIR |
| 656 |
export COOT_HOME |
| 657 |
|
| 658 |
echo $install_top_dir/bin/coot --no-graphics --script python-tests/coot_unittest.py |
| 659 |
$install_top_dir/bin/coot --no-graphics --script python-tests/coot_unittest.py |
| 660 |
|
| 661 |
status=$? |
| 662 |
if [ $status = 0 ] ; then |
| 663 |
echo test_coot_python: coot test passed |
| 664 |
return 0 |
| 665 |
else |
| 666 |
echo test_coot_python: coot test failed |
| 667 |
return 1 |
| 668 |
fi |
| 669 |
else |
| 670 |
echo run_tests is not true, not testing in python |
| 671 |
return 1 |
| 672 |
fi |
| 673 |
|
| 674 |
} |
| 675 |
|
| 676 |
|
| 677 |
function fixup_libcurl { |
| 678 |
|
| 679 |
sed s,-L/usr/lib,, curl-config > curl-config.tmp |
| 680 |
mv curl-config.tmp curl-config |
| 681 |
sed s,-L/usr/lib,, lib/libcurl.la > lib/libcurl.la.tmp |
| 682 |
mv lib/libcurl.la.tmp lib/libcurl.la |
| 683 |
} |
| 684 |
|
| 685 |
|
| 686 |
|
| 687 |
# now on to some code! |
| 688 |
|
| 689 |
|
| 690 |
|
| 691 |
if [ "$use_proxy" = 1 ] ; then |
| 692 |
# establish proxy settings |
| 693 |
printf "Proxy user: " |
| 694 |
read proxy_user |
| 695 |
printf "Proxy password: " |
| 696 |
read -s proxy_pass |
| 697 |
printf "\n" |
| 698 |
http_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" |
| 699 |
https_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" |
| 700 |
ftp_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" |
| 701 |
ssl_proxy="http://${proxy_user}:${proxy_pass}@${proxy_host}:${proxy_port}/" |
| 702 |
export http_proxy https_proxy ftp_proxy ssl_proxy no_proxy |
| 703 |
fi |
| 704 |
|
| 705 |
|
| 706 |
# use the right (GNU) tar and provide the path to wget (needed |
| 707 |
# for downloads) and to GNU make - (which is necesary for python |
| 708 |
# at least). |
| 709 |
# |
| 710 |
# So that python and the *-configs are found when it is installed: |
| 711 |
# A bit of a kludge because we do testing for pre-release later. |
| 712 |
# It's a logical mess. |
| 713 |
# |
| 714 |
#we shall add the PATH for python here too: |
| 715 |
# BL says: not sure if we really want the pre install PATH to be set here too |
| 716 |
#if test "$build_coot_prerelease" = 1 ; then |
| 717 |
# PATH=${AUTOBUILD_INSTALLED}-pre-release-gtk2${build_type}/bin:${AUTOBUILD_INSTALLED}-pre-release-gtk2${build_type}/python2.5:$PATH |
| 718 |
#else |
| 719 |
# PATH=$AUTOBUILD_INSTALLED-gtk2$build_type/bin:$AUTOBUILD_INSTALLED-gtk2$build_type/python2.5:$PATH |
| 720 |
#fi |
| 721 |
#PATH=$PATH:/usr/local/bin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/bin: |
| 722 |
#PATH=$PATH:/etc:/usr/etc |
| 723 |
# |
| 724 |
#export PATH |
| 725 |
#echo PATH is now: $PATH |
| 726 |
echo AUTOBUILD_BUILD is $AUTOBUILD_BUILD |
| 727 |
|
| 728 |
# This is where the sources downloaded from network go: |
| 729 |
AUTOBUILD_SOURCES=${AUTOBUILD_BUILD}/sources |
| 730 |
echo AUTOBUILD_SOURCES is $AUTOBUILD_SOURCES |
| 731 |
if (! test -d ${AUTOBUILD_SOURCES}) ; then |
| 732 |
mkdir -p ${AUTOBUILD_SOURCES} |
| 733 |
fi |
| 734 |
|
| 735 |
|
| 736 |
# now make the build logs directory |
| 737 |
mkdir -p $LOGS |
| 738 |
|
| 739 |
systype=unknown |
| 740 |
update_libtool=0 |
| 741 |
|
| 742 |
# malloc.h business, Darwin does not have malloc.h |
| 743 |
# used in the gtk_canvas build |
| 744 |
have_malloc=1 |
| 745 |
if test "$OS" = "Darwin" ; then |
| 746 |
have_malloc=0 |
| 747 |
fix_ulong=1 |
| 748 |
update_libtool=1 |
| 749 |
update_config_guess_sub=1 |
| 750 |
shared_static_flag="--disable-static" |
| 751 |
shared_lib_ext=dylib |
| 752 |
need_readline_patch=1 |
| 753 |
# uname -a gives processor type in last field on Darwin |
| 754 |
processor=$(uname -a | awk '{print $(NF)}') |
| 755 |
need_gtk_imlib_libtool_fix=1 |
| 756 |
if test "$processor" = "i386" ; then |
| 757 |
need_glib_getpwuid_fix=1 |
| 758 |
need_glib_poll_fix=1 |
| 759 |
need_gtk_canvas_patch=1 |
| 760 |
fi |
| 761 |
osversion=$(sw_vers -productVersion) |
| 762 |
systype=MacOSX-${osversion}-${processor} |
| 763 |
fi |
| 764 |
|
| 765 |
# redirect the output. |
| 766 |
# |
| 767 |
# exec 2>&1 > $LOGS/$HOST.log |
| 768 |
# Try not to redirect standard out so that it goes to |
| 769 |
# the sub-shell log? (testing) |
| 770 |
echo INFO:: redirecting std output to $LOGS/gtk2${build_type}-build.log |
| 771 |
exec > $LOGS/gtk2${build_type}-build.log |
| 772 |
echo This is script version $script_version for Gtk2 |
| 773 |
|
| 774 |
# local tinkering because our sgi runs out of room on /tmp on compiling |
| 775 |
if [ $HOST = batman ] ; then |
| 776 |
TMPDIR=$HOME/tmp |
| 777 |
export TMPDIR |
| 778 |
fi |
| 779 |
|
| 780 |
date |
| 781 |
# |
| 782 |
if [ -n "$specs" ] ; then |
| 783 |
if [ -e "$specs" ] ; then |
| 784 |
echo running these extras: |
| 785 |
echo . -------------------------------- |
| 786 |
cat "$specs" |
| 787 |
. "$specs" |
| 788 |
echo . -------------------------------- |
| 789 |
fi |
| 790 |
fi |
| 791 |
|
| 792 |
#initially unset: |
| 793 |
architecture= |
| 794 |
if test $OS = Linux ; then |
| 795 |
architecture=$(uname -i) |
| 796 |
# uname -i and uname -p (strangely) return unknown on my ubuntu |
| 797 |
if test $architecture = unknown ; then |
| 798 |
architecture=$(uname -m) |
| 799 |
fi |
| 800 |
fi |
| 801 |
# now architecture is something like i386 or x86_64 |
| 802 |
|
| 803 |
# now test for 64 bit Linux: |
| 804 |
if test "$OS" = "Linux" ; then |
| 805 |
processor=$(uname -a | awk '{print $NF}') |
| 806 |
# on my Redhat i386, uname returns: |
| 807 |
# Linux kalypso 2.6.12-1.1398_FC4 #1 Fri Jul 15 00:52:32 EDT 2005 i686 athlon i386 GNU/Linux |
| 808 |
# 64 bit Ubuntu: |
| 809 |
# Linux kalypso 2.6.22-14-generic #1 SMP Sun Oct 14 21:45:15 GMT 2007 x86_64 GNU/Linux |
| 810 |
# from that I presume we need $(NF-2) to get the arch (not NF-1). Eh? |
| 811 |
# arch=`uname -a | awk '{print $(NF-1)}'` |
| 812 |
arch=$(uname -a | awk '{print $(NF-1)}') |
| 813 |
echo currently architecture is $architecture |
| 814 |
if test "$architecture" = x86_64 -o "$architecture" = ia64 ; then |
| 815 |
update_libtool=1 |
| 816 |
update_config_guess_sub=1 |
| 817 |
else |
| 818 |
echo this is not a 64 bit machine |
| 819 |
fi |
| 820 |
fi |
| 821 |
|
| 822 |
if test $OS = Linux ; then |
| 823 |
|
| 824 |
if [ -e /bin/rpm ] ; then |
| 825 |
if rpm -a ; then |
| 826 |
for i in fedora-release redhat-release redhat-release-workstation centos-release sl-release openSUSE-release ; do |
| 827 |
dist=`rpm -q --qf '%{name}' ${i}` |
| 828 |
echo dist is $dist |
| 829 |
dist=`rpm -q --qf '%{name}' ${i}` |
| 830 |
if test $? = 0 ; then |
| 831 |
dist_name=$(echo ${dist} | sed -e 's/\-release//g' -e 's/\-workstation//g') |
| 832 |
dist_ver=$(rpm -q --qf '%{version}' ${i}) |
| 833 |
break |
| 834 |
else |
| 835 |
dist_name='unknown' |
| 836 |
fi |
| 837 |
done |
| 838 |
else |
| 839 |
dist_name='unknown' |
| 840 |
fi |
| 841 |
fi |
| 842 |
|
| 843 |
case ${dist_name} in |
| 844 |
|
| 845 |
redhat* ) |
| 846 |
case ${dist_ver} in |
| 847 |
[0-9] | [0-9].[0-9]* ) |
| 848 |
systype=${architecture}-redhat-${dist_ver} |
| 849 |
;; |
| 850 |
* ) |
| 851 |
systype=${architecture}-rhel-$(echo ${dist_ver} | sed s/[A-Za-z]//g) |
| 852 |
if [ $arch = x86_64 ] ; then |
| 853 |
if [ $dist_ver = 4WS ] ; then |
| 854 |
echo RedHat 4 Linux x86_64 detected. need to update libtool |
| 855 |
update_libtool=1 |
| 856 |
# stupid la file of libcur puts /usr/lib in the link path (early). This causes link |
| 857 |
# problems on 64 bit RHEL4. So lets fix curl-config and libcurl.la |
| 858 |
post_process_libcurl=1 |
| 859 |
fi |
| 860 |
fi |
| 861 |
;; |
| 862 |
esac |
| 863 |
;; |
| 864 |
|
| 865 |
fedora | centos | openSUSE ) |
| 866 |
systype=${architecture}-${dist_name}-${dist_ver} |
| 867 |
;; |
| 868 |
|
| 869 |
|
| 870 |
sl ) |
| 871 |
systype=${architecture}-scientific-linux-${dist_ver} |
| 872 |
;; |
| 873 |
|
| 874 |
|
| 875 |
* ) |
| 876 |
if test -r /etc/issue; then |
| 877 |
dist_name=$(awk 'NR==1{print tolower($1)}' /etc/issue) |
| 878 |
if [ "$dist_name" = "debian" ] ; then |
| 879 |
dist_ver=$(awk 'NR==1{x=tolower($2); y=tolower($3); gsub("/","-",x); gsub("/","-",y); print x "-" y}' /etc/issue) |
| 880 |
else |
| 881 |
dist_ver=$(awk 'NR==1{x=tolower($2); gsub("/","-",x); print x}' /etc/issue) |
| 882 |
fi |
| 883 |
systype=${architecture}-${dist_name}-${dist_ver} |
| 884 |
else |
| 885 |
systype=${architecture}-unknown-Linux |
| 886 |
fi |
| 887 |
;; |
| 888 |
esac |
| 889 |
fi |
| 890 |
|
| 891 |
|
| 892 |
if test $OS = IRIX64 ; then |
| 893 |
osversion=`uname -r` |
| 894 |
systype=${osversion}-sgi |
| 895 |
fi |
| 896 |
|
| 897 |
if test $OS = IRIX ; then |
| 898 |
osversion=`uname -r` |
| 899 |
systype=${osversion}-sgi |
| 900 |
fi |
| 901 |
|
| 902 |
if test $OS = OSF1 ; then |
| 903 |
osversion=`uname -r | sed s/V//g` |
| 904 |
systype=${osversion}-OSF1 |
| 905 |
fi |
| 906 |
|
| 907 |
# maybe all can be case |
| 908 |
case "$OS" in |
| 909 |
MINGW*) |
| 910 |
systype=`uname -m` |
| 911 |
architecture=`uname -m` |
| 912 |
;; |
| 913 |
esac |
| 914 |
|
| 915 |
echo systype: $systype |
| 916 |
|
| 917 |
echo update_libtool: $update_libtool |
| 918 |
echo update_config_guess_sub: $update_config_guess_sub |
| 919 |
|
| 920 |
|
| 921 |
# give us some diagnostic shell information: |
| 922 |
# (what extra things did $specs give us?) |
| 923 |
# |
| 924 |
if [ "$use_proxy" = 1 ] ; then |
| 925 |
echo no diagnostic variables, we are using a proxy. |
| 926 |
else |
| 927 |
set |
| 928 |
fi |
| 929 |
|
| 930 |
# Do we link with sqlite (for the ligands database)? |
| 931 |
# We allow the calling script to set use_sqlite=yes |
| 932 |
use_sqlite=${use_sqlite:=no} |
| 933 |
|
| 934 |
if [ "$use_sqlite" = "yes" ] ; then |
| 935 |
sqlite_config_args=--with-sqlite3 |
| 936 |
else |
| 937 |
sqlite_config_args= |
| 938 |
fi |
| 939 |
|
| 940 |
# We want to add some compiler info in the directory name. |
| 941 |
# If CC is set, use that, |
| 942 |
# If not, try gcc, |
| 943 |
# if not, try cc |
| 944 |
# |
| 945 |
# Similarly for the c++ compiler info |
| 946 |
# If CXX is set, use that |
| 947 |
# if not, try g++ |
| 948 |
# if not, try c++ |
| 949 |
|
| 950 |
if [ -n "$CC" ] ; then |
| 951 |
|
| 952 |
# CC was set |
| 953 |
gcctest=`$CC --version | awk 'NR==1 {print $2}'` |
| 954 |
if [ "$gcctest" != "(GCC)" ] ; then |
| 955 |
# but not gcc |
| 956 |
v=$CC-`$CC -v` |
| 957 |
if [ $? -ne 0 ] ; then |
| 958 |
v="missing_version" |
| 959 |
fi |
| 960 |
else |
| 961 |
# gcc |
| 962 |
v=$CC-`$CC --version | awk 'NR==1 {print $3}'` |
| 963 |
fi |
| 964 |
|
| 965 |
else |
| 966 |
# CC not set |
| 967 |
v=gcc-`gcc -dumpversion | head -1` |
| 968 |
if [ $? -ne 0 ] ; then |
| 969 |
# not gcc |
| 970 |
# try cc |
| 971 |
v=cc-`cc -v` |
| 972 |
if [ $? -ne 0 ] ; then |
| 973 |
v="missing_version" |
| 974 |
fi |
| 975 |
fi |
| 976 |
fi |
| 977 |
|
| 978 |
|
| 979 |
if [ -n "$CXX" ] ; then |
| 980 |
|
| 981 |
# CXX was set |
| 982 |
gxxtest=$($CXX --version | awk 'NR==1 {print $2}') |
| 983 |
# typically gxxtest is set to "(GCC)", but not on Ubuntu, where the line is: |
| 984 |
# g++ (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3 |
| 985 |
# Scientific Linux: |
| 986 |
# g++ (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4) |
| 987 |
# RHEL 6: |
| 988 |
# g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) |
| 989 |
echo gxxtest: $gxxtest |
| 990 |
if [ "$gxxtest" != "(GCC)" ] ; then |
| 991 |
|
| 992 |
# but not g++ (?). Maybe it was Ubuntu... |
| 993 |
|
| 994 |
case "$gxxtest" in |
| 995 |
*[Uu]buntu*) |
| 996 |
w=$($CXX --version | head -1 | awk '{print $3}' | tr -d ')') |
| 997 |
;; |
| 998 |
|
| 999 |
*) |
| 1000 |
w=$CXX-$($CXX -v | head -1 | sed 's/ / /g') |
| 1001 |
if [ $? -ne 0 ] ; then |
| 1002 |
w="missing_cxx_version" |
| 1003 |
fi |
| 1004 |
;; |
| 1005 |
esac |
| 1006 |
else |
| 1007 |
# g++ |
| 1008 |
w=$CXX-$($CXX --version | awk 'NR==1 {print $3}') |
| 1009 |
fi |
| 1010 |
else |
| 1011 |
# CXX not set |
| 1012 |
w=g++-`g++ -dumpversion | head -1` |
| 1013 |
if [ $? -ne 0 ] ; then |
| 1014 |
# not g++ |
| 1015 |
# try c++ |
| 1016 |
w=c++-`c++ -v` |
| 1017 |
if [ $? -ne 0 ] ; then |
| 1018 |
# try CC |
| 1019 |
w=CC-`CC -v` |
| 1020 |
if [ $? -ne 0 ] ; then |
| 1021 |
w="missing_c++_version" |
| 1022 |
fi |
| 1023 |
fi |
| 1024 |
fi |
| 1025 |
# note that g++ 3.2 cannot compile clipper's test_contrib.cpp. |
| 1026 |
# So, if we have g++ 3.2 or less, then we need to get and apply |
| 1027 |
# test_contrib.cpp.patch |
| 1028 |
# add a space before argument setting |
| 1029 |
awk -v version=$w 'BEGIN{ exit (version+0 >= 3.3)}' |
| 1030 |
wvers=$? |
| 1031 |
if [ $wvers = 0 ] ; then |
| 1032 |
need_clipper_contrib_patch=true |
| 1033 |
fi |
| 1034 |
fi |
| 1035 |
|
| 1036 |
# do we actually have g++ (or c++?) |
| 1037 |
if ! g++ --version ; then |
| 1038 |
if ! c++ --version ; then |
| 1039 |
echo no c++/g++ compiler. Exit now |
| 1040 |
my_exit 2 |
| 1041 |
fi |
| 1042 |
fi |
| 1043 |
|
| 1044 |
|
| 1045 |
|
| 1046 |
|
| 1047 |
# so now we have v and w set to something. We |
| 1048 |
# need to sanitize that something. |
| 1049 |
v_fid=`echo $v | sed 's/ /_/g'` |
| 1050 |
w_fid=`echo $w | sed 's/ /_/g'` |
| 1051 |
|
| 1052 |
compilers_dir=gtk2-${v_fid}_and_${w_fid} |
| 1053 |
HOSTLOGDIR=$LOGS/$compilers_dir${build_type} |
| 1054 |
if [ ! -e $HOSTLOGDIR ] ; then |
| 1055 |
mkdir -p $HOSTLOGDIR |
| 1056 |
if [ $? -ne 0 ] ; then |
| 1057 |
# |
| 1058 |
echo DISASTER: could not make directory $HOSTLOGDIR |
| 1059 |
echo exiting. |
| 1060 |
my_exit 2 |
| 1061 |
fi |
| 1062 |
fi |
| 1063 |
|
| 1064 |
|
| 1065 |
echo need_guile_unused_values_patch is $need_guile_unused_values_patch |
| 1066 |
|
| 1067 |
|
| 1068 |
|
| 1069 |
# need to add test that make is GNU make, and set number of processor if we have |
| 1070 |
# enough memory and cpus... |
| 1071 |
# |
| 1072 |
echo "Testing version of make" |
| 1073 |
MAKE=make |
| 1074 |
if make --version ; then |
| 1075 |
# let's try to set some args |
| 1076 |
if [ -e /proc/meminfo ] ; then |
| 1077 |
memory_kb=$(awk '/MemTotal:/ {print $2} ' /proc/meminfo) |
| 1078 |
if [ "$memory_kb" -gt 2000512 ] ; then |
| 1079 |
if [ -e /proc/cpuinfo ] ; then |
| 1080 |
if np=$(grep processor /proc/cpuinfo | wc -l) ; then |
| 1081 |
# limit to 8 processors |
| 1082 |
if [ "$np" -gt 8 ] ; then |
| 1083 |
np=8 |
| 1084 |
fi |
| 1085 |
echo using $np processors in compilation |
| 1086 |
MAKE="make -j$np" |
| 1087 |
echo MAKE set to $MAKE |
| 1088 |
fi |
| 1089 |
fi |
| 1090 |
fi |
| 1091 |
fi |
| 1092 |
if [ $OS = Darwin ] ; then |
| 1093 |
np=$(system_profiler SPHardwareDataType | awk '/Total Number/ { print $NF }') |
| 1094 |
MAKE="make -j$np" |
| 1095 |
fi |
| 1096 |
else |
| 1097 |
# definately not GNU make |
| 1098 |
# Try gmake then.... |
| 1099 |
gmake --version |
| 1100 |
if [ $? -ne 0 ] ; then |
| 1101 |
nomake=1 |
| 1102 |
else |
| 1103 |
MAKE=gmake |
| 1104 |
nomake=0 |
| 1105 |
fi |
| 1106 |
if [ $nomake -eq 1 ] ; then |
| 1107 |
echo Ooops. Your make '(' `which make` ')' is not GNU make and gmake not found. |
| 1108 |
echo Exiting now. |
| 1109 |
my_exit 2 |
| 1110 |
fi |
| 1111 |
fi |
| 1112 |
|
| 1113 |
echo testing for patch |
| 1114 |
patch --version > /dev/null |
| 1115 |
if [ $? -ne 0 ] ; then |
| 1116 |
echo no patch - exit now |
| 1117 |
my_exit 2 |
| 1118 |
fi |
| 1119 |
|
| 1120 |
echo testing awk type \(prefer GNU awk\) |
| 1121 |
if awk --version ; then |
| 1122 |
echo good, you have an awk from GNU. |
| 1123 |
else |
| 1124 |
echo WARNING:: awk is not a GNU awk, trouble ahead possibly. |
| 1125 |
fi |
| 1126 |
|
| 1127 |
|
| 1128 |
# create $AUTOBUILD_BUILD directory |
| 1129 |
|
| 1130 |
if [ ! -d "$AUTOBUILD_BUILD" ] ; then |
| 1131 |
mkdir "$AUTOBUILD_BUILD" |
| 1132 |
if [ $? -ne 0 ] ; then |
| 1133 |
|
| 1134 |
prev_dir=$(dirname $AUTOBUILD_BUILD) |
| 1135 |
echo $prev_dir |
| 1136 |
if [ ! -d "$prev_dir" ] ; then |
| 1137 |
mkdir $prev_dir |
| 1138 |
mkdir "$AUTOBUILD_BUILD" |
| 1139 |
fi |
| 1140 |
fi |
| 1141 |
|
| 1142 |
if [ ! -d "$AUTOBUILD_BUILD" ] ; then |
| 1143 |
# echo mkdir of the AUTOBUILD_BUILD \(i.e. "$AUTOBUILD_BUILD"\) failed. |
| 1144 |
my_exit 2 |
| 1145 |
fi |
| 1146 |
|
| 1147 |
fi |
| 1148 |
|
| 1149 |
|
| 1150 |
cd $AUTOBUILD_BUILD |
| 1151 |
if [ $? -ne 0 ] ; then |
| 1152 |
echo $AUTOBUILD_BUILD failed for some reason. Now in `pwd` |
| 1153 |
fi |
| 1154 |
# for ccp4 (20051104) compatibility, we can't use colons in the date string |
| 1155 |
date=$(date -u +'%Y-%m-%d__T%H_%M_%S') |
| 1156 |
echo Date: $date |
| 1157 |
|
| 1158 |
# now in $AUTOBUILD_BUILD |
| 1159 |
# we dont want to have the 'stupid' date and time in there... |
| 1160 |
# I dont like it |
| 1161 |
mkdir_maybe ${HOST}${build_type} |
| 1162 |
if [ $? -ne 0 ] ; then |
| 1163 |
echo mkdir ${HOST}${build_type} failed for some reason. Now in `pwd` |
| 1164 |
fi |
| 1165 |
cd ${HOST}${build_type} |
| 1166 |
if [ $? -ne 0 ] ; then |
| 1167 |
echo cd ${HOST}${build_type} failed for some reason. Now in `pwd` |
| 1168 |
fi |
| 1169 |
build_dir=`pwd` |
| 1170 |
|
| 1171 |
echo checking wget |
| 1172 |
echo which wget |
| 1173 |
which wget |
| 1174 |
# use -P for timestamping |
| 1175 |
# Note that now wget depends on libhogweed and that depends on libgmp |
| 1176 |
# but we are compiling an old version of gmp (not sure that we need |
| 1177 |
# an old version) and libhogweed refers to a (now) non-existant |
| 1178 |
# functions and the dynamic loading fails. |
| 1179 |
# This setting of the alias fails. It works on the command line. |
| 1180 |
# WGET="LD_LIBRARY_PATH=/usr/lib wget -N -P ${AUTOBUILD_SOURCES}" |
| 1181 |
# WGETO="LD_LIBRARY_PATH=/usr/lib wget -P ${AUTOBUILD_SOURCES}" |
| 1182 |
WGET="C:\msys64\usr/\bin\wget.exe -nv -N -P ${AUTOBUILD_SOURCES}" |
| 1183 |
WGETO="C:\msys64\usr/\bin\wget.exe -nv -P ${AUTOBUILD_SOURCES}" |
| 1184 |
WGETS="C:\msys64\usr/\bin\wget.exe --no-check-certificate -N -P ${AUTOBUILD_SOURCES}" |
| 1185 |
|
| 1186 |
# latest version (without .tar.gz extension) |
| 1187 |
coot_version=$fallback_coot_version |
| 1188 |
|
| 1189 |
pre_release_server_dir=http://www.ysbl.york.ac.uk/~emsley/software/pre-release/ |
| 1190 |
pre_release_server_dir=http://lmb.bioch.ox.ac.uk/coot/software/source/pre-releases/ |
| 1191 |
pre_release_server_dir=http://www2.mrc-lmb.cam.ac.uk/groups/murshudov/coot/source/pre-releases/ |
| 1192 |
pre_release_server_dir=http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/source/pre-releases |
| 1193 |
pre_release_server_dir=https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/source/pre-releases/0.9-pre |
| 1194 |
pre_release_server_dir=https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/source/pre-releases |
| 1195 |
# |
| 1196 |
release_server_dir=http://www.ysbl.york.ac.uk/~emsley/software |
| 1197 |
release_server_dir=http://lmb.bioch.ox.ac.uk/coot/software/source/releases |
| 1198 |
release_server_dir=http://www2.mrc-lmb.cam.ac.uk/groups/murshudov/coot/source/releases/ |
| 1199 |
release_server_dir=http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/source/releases |
| 1200 |
# |
| 1201 |
extras_place=http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/dependencies |
| 1202 |
win_extras_place=http://bernhardcl.github.io/coot/software/extras |
| 1203 |
|
| 1204 |
|
| 1205 |
${WGETO} -O ${AUTOBUILD_SOURCES}/index.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log $release_server_dir/ |
| 1206 |
${WGETO} -O ${AUTOBUILD_SOURCES}/index-pre-release.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log $pre_release_server_dir/ |
| 1207 |
pre_release_files_html="none" |
| 1208 |
if [ $build_coot_prerelease = 1 ] ; then |
| 1209 |
pre_release_files_html=${AUTOBUILD_SOURCES}/index-pre-release.html |
| 1210 |
fi |
| 1211 |
if [ $build_coot_prerelease = yes ] ; then |
| 1212 |
pre_release_files_html=${AUTOBUILD_SOURCES}/index-pre-release.html |
| 1213 |
fi |
| 1214 |
|
| 1215 |
echo doing the awk on the html $pre_release_files_html |
| 1216 |
awk ' /a href=.*.tar.gz/ {split($2, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); print file}' $pre_release_files_html |
| 1217 |
|
| 1218 |
coot_version_tmp=$(awk ' /a href=.*.tar.gz/ {split($2, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); print file}' \ |
| 1219 |
$pre_release_files_html | tail -1) |
| 1220 |
|
| 1221 |
echo pre_release_files_html $pre_release_files_html |
| 1222 |
echo coot_version_tmp : $coot_version_tmp : |
| 1223 |
|
| 1224 |
if [ -z "$coot_version_tmp" ] ; then |
| 1225 |
echo clever coot_version extraction failed, using default. |
| 1226 |
else |
| 1227 |
coot_version=$coot_version_tmp |
| 1228 |
echo clever coot_version succeeded, setting coot_version to $coot_version from extraction |
| 1229 |
fi |
| 1230 |
|
| 1231 |
|
| 1232 |
# override the switch which turns off the building of the pre-release here: |
| 1233 |
# build_coot_prerelease=1 |
| 1234 |
|
| 1235 |
# Let's initially set coot_prerelease_exists to not-exist, then we |
| 1236 |
# try to download it from the Coot web site, and if it exists we set |
| 1237 |
# coot_prerelease_exists to 1. If it doesn't exist, we don't do that |
| 1238 |
# of course and we also don't make the install_top_dir to be the pre-release |
| 1239 |
# directory later on. |
| 1240 |
coot_prerelease_exists= |
| 1241 |
|
| 1242 |
# coot_version_pre no longer has .tar.gz extension |
| 1243 |
|
| 1244 |
echo =========================== build_coot_prerelease currently is $build_coot_prerelease ======================== |
| 1245 |
|
| 1246 |
if test "$build_coot_prerelease" = 1 ; then |
| 1247 |
|
| 1248 |
echo debug:: ${WGETO} -O ${AUTOBUILD_SOURCES}/index.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log $pre_release_server_dir/ |
| 1249 |
${WGETO} -O ${AUTOBUILD_SOURCES}/index.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log $pre_release_server_dir/ |
| 1250 |
coot_version_pre=$(awk ' /a href=.*.tar.gz/ {f=$2; split(f, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); print file}' \ |
| 1251 |
${AUTOBUILD_SOURCES}/index.html | tail -1) |
| 1252 |
|
| 1253 |
echo INFO:: building pre-release and coot_version_pre is $coot_version_pre |
| 1254 |
if [ -z "$coot_version_pre" ] ; then |
| 1255 |
# this path when there are no pre-releases to be built, i.e. build the latest release. |
| 1256 |
echo trying to build pre-release coot, but failed to find pre-release version |
| 1257 |
echo make a stable release then |
| 1258 |
build_coot_prerelease= |
| 1259 |
BINARY_TAR_DEST_DIR=$STABLE_DEST_DIR |
| 1260 |
mkdir -p ${BINARY_TAR_DEST_DIR} |
| 1261 |
mkdir -p ${BINARY_TAR_DEST_DIR}/holding # not needed?! |
| 1262 |
|
| 1263 |
${WGETO} -O ${AUTOBUILD_SOURCES}/index.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log $release_server_dir |
| 1264 |
echo examining release server files ${AUTOBUILD_SOURCES}/index.html |
| 1265 |
coot_version=$(awk ' /compressed.*a href=/ {f=$6; split($6, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); files[file]=1; } END { for (file in files) { if (file>final) { final=file } } ; print final } ' \ |
| 1266 |
${AUTOBUILD_SOURCES}/index.html | tail -1) |
| 1267 |
echo coot_version $coot_version |
| 1268 |
|
| 1269 |
|
| 1270 |
else |
| 1271 |
build_coot_prerelease=1 # belt and braces |
| 1272 |
coot_prerelease_exists=1 |
| 1273 |
# tinker with coot_prefix, it is generic_prefix with pre-release added to prefix dir |
| 1274 |
coot_prefix="--prefix=${AUTOBUILD_INSTALLED}-pre-release-gtk2${build_type} ${config_extras:-}" |
| 1275 |
coot_source_tar_file=${pre_release_server_dir}$coot_version_pre.tar.gz |
| 1276 |
echo DEBUG:: set coot_source_tar_file to $coot_source_tar_file |
| 1277 |
coot_version=`echo $coot_version_pre | sed s/\.tar.gz//` |
| 1278 |
BINARY_TAR_DEST_DIR=$NIGHTLY_DEST_DIR |
| 1279 |
mkdir -p ${NIGHTLY_DEST_DIR} |
| 1280 |
echo INFO:: set the target destination for binary tar file \(BINARY_TAR_DEST_DIR\) to $NIGHTLY_DEST_DIR |
| 1281 |
fi |
| 1282 |
else |
| 1283 |
# this is a stable release |
| 1284 |
|
| 1285 |
echo ============= This is a stable build ============== |
| 1286 |
|
| 1287 |
${WGETO} -O ${AUTOBUILD_SOURCES}/index.html -o ${AUTOBUILD_SOURCES}/wget-e.s.p.log $release_server_dir/ |
| 1288 |
echo examining release server files ${AUTOBUILD_SOURCES}/index.html |
| 1289 |
echo ========== awk results: |
| 1290 |
awk ' /a href=.*.tar.gz/ {f=$2; split(f, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); print file}' \ |
| 1291 |
${AUTOBUILD_SOURCES}/index.html |
| 1292 |
echo ==== with tail ========== |
| 1293 |
awk ' /a href=.*.tar.gz/ {f=$2; split(f, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); print file}' \ |
| 1294 |
${AUTOBUILD_SOURCES}/index.html | tail -1 |
| 1295 |
echo =========== from ${AUTOBUILD_SOURCES}/index.html |
| 1296 |
cat ${AUTOBUILD_SOURCES}/index.html |
| 1297 |
echo ============== |
| 1298 |
coot_version=$(awk ' /a href=.*.tar.gz/ {f=$2; split(f, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); print file}' \ |
| 1299 |
${AUTOBUILD_SOURCES}/index.html | tail -1) |
| 1300 |
if test -z "$coot_version" ; then |
| 1301 |
# maybe it wasn't GNU awk (we can't sort the associative array), this will pick a "random" arry key -> coot_version |
| 1302 |
coot_version=$(awk ' /.*a href=/ {f=$2; split(f, arr, "\""); file=arr[2]; gsub(".tar.gz", "", file); files[file]=1; } END { for (file in files) { final=file } ; print final } ' \ |
| 1303 |
${AUTOBUILD_SOURCES}/index.html | tail -1) |
| 1304 |
fi |
| 1305 |
echo coot_version $coot_version |
| 1306 |
|
| 1307 |
BINARY_TAR_DEST_DIR=$STABLE_DEST_DIR |
| 1308 |
mkdir -p ${BINARY_TAR_DEST_DIR} |
| 1309 |
fi |
| 1310 |
|
| 1311 |
echo INFO:: binary tar destination dir: BINARY_TAR_DEST_DIR is $BINARY_TAR_DEST_DIR |
| 1312 |
|
| 1313 |
#################################################### |
| 1314 |
# exit |
| 1315 |
#################################################### |
| 1316 |
|
| 1317 |
|
| 1318 |
|
| 1319 |
echo coot_version_pre is $coot_version_pre |
| 1320 |
echo build_coot_prerelease: $build_coot_prerelease |
| 1321 |
echo release_server_dir $release_server_dir |
| 1322 |
echo coot_version $coot_version |
| 1323 |
|
| 1324 |
|
| 1325 |
# set the build prefix for installed stuff. Put everything in the |
| 1326 |
# pre-release directory if we are building a pre-release. |
| 1327 |
# (Perhaps this bit of code should go down lower, where we test |
| 1328 |
# build_coot_prerelease again |
| 1329 |
# |
| 1330 |
# we need install_top_dir because we use it to copy over coot.py |
| 1331 |
# to the install python directory. |
| 1332 |
# |
| 1333 |
if [ "$build_coot_prerelease" = 1 ] ; then |
| 1334 |
if [ "$coot_prerelease_exists" = 1 ] ; then |
| 1335 |
generic_prefix="--prefix=${AUTOBUILD_INSTALLED}-pre-release-gtk2${build_type} ${config_extras:-}" |
| 1336 |
install_top_dir=${AUTOBUILD_INSTALLED}-pre-release-gtk2${build_type} |
| 1337 |
else |
| 1338 |
# don't use pre-release |
| 1339 |
generic_prefix="--prefix=${AUTOBUILD_INSTALLED}-gtk2${build_type} ${config_extras:-}" |
| 1340 |
coot_prefix="$generic_prefix" |
| 1341 |
install_top_dir=${AUTOBUILD_INSTALLED}-gtk2${build_type} |
| 1342 |
fi |
| 1343 |
else |
| 1344 |
# not pre-release |
| 1345 |
generic_prefix="--prefix=${AUTOBUILD_INSTALLED}-gtk2${build_type} ${config_extras:-}" |
| 1346 |
install_top_dir=${AUTOBUILD_INSTALLED}-gtk2${build_type} |
| 1347 |
coot_prefix="$generic_prefix" |
| 1348 |
fi |
| 1349 |
# we shall include python here too |
| 1350 |
# but first define the versions |
| 1351 |
#python_version=python2.5 |
| 1352 |
#pver=2.5.2 |
| 1353 |
# no 2.6.7 for windows yet, need 2.6 because of gtk 2.16, cos of gtkglext |
| 1354 |
#pver=2.6.7 |
| 1355 |
pver=2.7.15 |
| 1356 |
pver_short=${pver%.*} |
| 1357 |
# remove the "." to make more Windows compliant |
| 1358 |
python_version=python${pver_short//./} |
| 1359 |
|
| 1360 |
PATH=$install_top_dir/bin:$install_top_dir/${python_version}:$PATH |
| 1361 |
echo the path before testing for installed modules is $PATH |
| 1362 |
|
| 1363 |
installed_check_maybe_prefix= |
| 1364 |
if [ "$check_dependencies_in_install_only" = 1 ] ; then |
| 1365 |
installed_check_maybe_prefix=$install_top_dir/bin/ |
| 1366 |
fi |
| 1367 |
|
| 1368 |
# Remove install_top_dir if exists and flag set to do so |
| 1369 |
# start from scratch |
| 1370 |
wincoot_exe=WinCoot-${wincoot_version}.exe |
| 1371 |
if [ "$make_from_scratch" = "yes" ] ; then |
| 1372 |
if [ -e "$install_top_dir" ] ; then |
| 1373 |
echo clean out everything from $install_top_dir |
| 1374 |
rm -fr $install_top_dir |
| 1375 |
fi |
| 1376 |
fi |
| 1377 |
|
| 1378 |
# we need to export this for net-http, because it doesn't set |
| 1379 |
# variables from configure, we rely on a shell (environment) variable. |
| 1380 |
export install_top_dir |
| 1381 |
|
| 1382 |
echo testing for install_top_dir: "$install_top_dir" |
| 1383 |
if [ ! -e "$install_top_dir" ] ; then |
| 1384 |
echo $install_top_dir does not exist |
| 1385 |
echo making directory $install_top_dir |
| 1386 |
mkdir -p $install_top_dir |
| 1387 |
if [ $? -ne 0 ] ; then |
| 1388 |
echo DISASTER: $install_top_dir does not exist and no way |
| 1389 |
echo to make it. |
| 1390 |
my_exit 2 |
| 1391 |
fi |
| 1392 |
else |
| 1393 |
echo INFO:: $install_top_dir exists already. |
| 1394 |
fi |
| 1395 |
echo done testing for $install_top_dir |
| 1396 |
|
| 1397 |
if [ ! -e "$install_top_dir/lib" ] ; then |
| 1398 |
echo making "$install_top_dir/lib" |
| 1399 |
mkdir -p "$install_top_dir/lib" |
| 1400 |
if [ $? -ne 0 ] ; then |
| 1401 |
echo DISASTER: $install_top_dir/lib cannot be created |
| 1402 |
echo to make it. |
| 1403 |
my_exit 2 |
| 1404 |
fi |
| 1405 |
fi |
| 1406 |
# |
| 1407 |
# append or set LD_LIBRARY_PATH. |
| 1408 |
# |
| 1409 |
# this can be problematic for a distributable tar build because this can cause linkage |
| 1410 |
# against ccp4's libxml2! Hmm! |
| 1411 |
# |
| 1412 |
# |
| 1413 |
if [ -z "$LD_LIBRARY_PATH" ] ; then |
| 1414 |
LD_LIBRARY_PATH=$install_top_dir/lib |
| 1415 |
export LD_LIBRARY_PATH |
| 1416 |
else |
| 1417 |
LD_LIBRARY_PATH=$install_top_dir/lib:$LD_LIBRARY_PATH |
| 1418 |
export LD_LIBRARY_PATH |
| 1419 |
fi |
| 1420 |
|
| 1421 |
|
| 1422 |
|
| 1423 |
#for Macs: |
| 1424 |
if test "$OS" = "Darwin" ; then |
| 1425 |
if [ -z "$DYLD_LIBRARY_PATH" ] ; then |
| 1426 |
# DYLD_LIBRARY_PATH=$install_top_dir/lib |
| 1427 |
# export DYLD_LIBRARY_PATH |
| 1428 |
: |
| 1429 |
else |
| 1430 |
#DYLD_LIBRARY_PATH=$install_top_dir/lib:$DYLD_LIBRARY_PATH |
| 1431 |
#export DYLD_LIBRARY_PATH |
| 1432 |
: |
| 1433 |
fi |
| 1434 |
fi |
| 1435 |
|
| 1436 |
# |
| 1437 |
# IRIX64 (on batman at least) does not seem to use LD_LIBRARY_PATH, |
| 1438 |
# it uses, instead, LD_LIBRARYN32_PATH. So we set that for all |
| 1439 |
# systems, hoping that it won't do any harm on other systems. |
| 1440 |
# |
| 1441 |
# This surely is no longer used - PE 20130909 |
| 1442 |
# LD_LIBRARYN32_PATH=$LD_LIBRARY_PATH |
| 1443 |
# export LD_LIBRARYN32_PATH |
| 1444 |
|
| 1445 |
|
| 1446 |
|
| 1447 |
# ccp4_system_type can be one of the following |
| 1448 |
# irix irix64 sunos sunos64 aix hpux osf1 linux freebsd |
| 1449 |
# linux_compaq_compilers linux_intel_compilers generic Darwin |
| 1450 |
# ia64_linux_intel Darwin_ibm_compilers linux_ibm_compilers |
| 1451 |
|
| 1452 |
ccp4_system_type="$OS" |
| 1453 |
if test "$OS" = Linux ; then |
| 1454 |
ccp4_system_type=linux |
| 1455 |
else |
| 1456 |
if test "$OS" = IRIX64 ; then |
| 1457 |
ccp4_system_type=irix64 |
| 1458 |
else |
| 1459 |
if test "$OS" = IRIX ; then |
| 1460 |
ccp4_system_type=irix |
| 1461 |
else |
| 1462 |
if test "$OS" = Darwin ; then |
| 1463 |
ccp4_system_type=Darwin |
| 1464 |
else |
| 1465 |
case "$OS" in |
| 1466 |
MINGW*) |
| 1467 |
# not sure if really needed later?! |
| 1468 |
ccp4_system_type=MinGW |
| 1469 |
esac |
| 1470 |
fi |
| 1471 |
fi |
| 1472 |
fi |
| 1473 |
fi |
| 1474 |
echo ccp4_system_type $ccp4_system_type |
| 1475 |
|
| 1476 |
|
| 1477 |
# check for swig |
| 1478 |
# |
| 1479 |
echo this swig: |
| 1480 |
which swig > /dev/null |
| 1481 |
have_swig=$? |
| 1482 |
if [ $have_swig = 0 ] ; then |
| 1483 |
swig -version |
| 1484 |
if [ "$architecture" = x86_64 ] ; then |
| 1485 |
swig_version=`swig -version | awk 'NF { print $NF; exit }'` |
| 1486 |
if [ "$swig_version" = 1.3.34 ] ; then |
| 1487 |
echo oops this swig is broken. Need to upgrade to 1.3.36 |
| 1488 |
my_exit 2 |
| 1489 |
else |
| 1490 |
echo system has swig. Good. |
| 1491 |
fi |
| 1492 |
else |
| 1493 |
echo system is not 64 bit, no problems swig 1.3.34 |
| 1494 |
fi |
| 1495 |
else |
| 1496 |
echo swig required - not found. |
| 1497 |
my_exit 2 |
| 1498 |
fi |
| 1499 |
|
| 1500 |
# Hope this doesnt mess things on windows?! |
| 1501 |
# clean up old test status |
| 1502 |
date_str=`date +"%a_%d_%b_%H:%M"` |
| 1503 |
echo build-in-progress @$date_str > $LOGS/gtk2$build_type-build-status |
| 1504 |
echo waiting for build... > $LOGS/gtk2$build_type-test-status |
| 1505 |
|
| 1506 |
# ---------------------------------------------------------------------------- |
| 1507 |
# ---------------------------------------------------------------------------- |
| 1508 |
# which components? |
| 1509 |
# ---------------------------------------------------------------------------- |
| 1510 |
# ---------------------------------------------------------------------------- |
| 1511 |
# |
| 1512 |
# Often there are components provided by the operating system or optional |
| 1513 |
# installs thereof. |
| 1514 |
# |
| 1515 |
build_mmdb=0 |
| 1516 |
build_ssmlib=0 |
| 1517 |
build_fftw=0 |
| 1518 |
build_clipper=0 |
| 1519 |
build_guile=0 |
| 1520 |
build_guile_www=0 |
| 1521 |
build_guile_gui=0 |
| 1522 |
build_libtool=0 |
| 1523 |
build_net_http=0 |
| 1524 |
build_gsl=0 |
| 1525 |
# build_libungif=0 |
| 1526 |
# build_libtiff=0 |
| 1527 |
# build_libjpeg=0 |
| 1528 |
# build_libpng=0 |
| 1529 |
# build_imlib=0 |
| 1530 |
# build_gtk_canvas=0 |
| 1531 |
build_goocanvas= |
| 1532 |
build_python= |
| 1533 |
build_pygobject= |
| 1534 |
build_guile_gtk= |
| 1535 |
build_gtkglext= |
| 1536 |
#build_freeglut=0 |
| 1537 |
build_glib= |
| 1538 |
#build_readline= |
| 1539 |
build_curl= |
| 1540 |
#build_libidn= |
| 1541 |
build_guile_lib=0 |
| 1542 |
build_gettext=0 |
| 1543 |
build_gtk=0 |
| 1544 |
#gnome_canvas???? |
| 1545 |
# for windows |
| 1546 |
build_glob= |
| 1547 |
|
| 1548 |
|
| 1549 |
# In Gtk2, we presume that glib, gtk2 and gnomecanvas are available. |
| 1550 |
# We shall test for these, but not build them. |
| 1551 |
|
| 1552 |
# Where might the "system" components be? |
| 1553 |
# |
| 1554 |
non_standard_dir_list="/usr/freeware /sw /opt/gnome $install_top_dir" |
| 1555 |
dir_list="/usr /usr/X11R6 /usr/local $non_standard_dir_list" |
| 1556 |
|
| 1557 |
# fftw |
| 1558 |
# We can eventually get fancy on this... but then clipper configure |
| 1559 |
# needs changing. |
| 1560 |
# The test is -n, i.e. a non-zero string length to build things. |
| 1561 |
# |
| 1562 |
# We need to test the $AUTOBUILD_INSTALLED directory for fftw because any |
| 1563 |
# other place could quite well have the fftw that is compiled with doubles. |
| 1564 |
# |
| 1565 |
if test -e $install_top_dir/include/fftw.h ; then |
| 1566 |
echo installation has fftw |
| 1567 |
build_fftw= |
| 1568 |
fi |
| 1569 |
|
| 1570 |
if test -n "$build_fftw" ; then |
| 1571 |
echo fftw should be built |
| 1572 |
build_fftw=1 |
| 1573 |
fi |
| 1574 |
|
| 1575 |
|
| 1576 |
if [ -e $install_top_dir/include/curl/curl.h ] ; then |
| 1577 |
echo installation has curl/libcurl |
| 1578 |
else |
| 1579 |
echo curl should be built |
| 1580 |
build_curl=1 |
| 1581 |
fi |
| 1582 |
|
| 1583 |
|
| 1584 |
|
| 1585 |
# test for pkg-config |
| 1586 |
if type pkg-config ; then |
| 1587 |
if pkg-config --atleast-pkgconfig-version 0.16 ; then |
| 1588 |
build_pkg_config= |
| 1589 |
echo pkg-config is new enough `pkg-config --version` |
| 1590 |
else |
| 1591 |
build_pkg_config=1 |
| 1592 |
echo pkg-config should be built \(but won\'t be\). |
| 1593 |
fi |
| 1594 |
else |
| 1595 |
echo pkg-config doesn\'t exist. |
| 1596 |
echo so should be build |
| 1597 |
build_pkg_config=1 |
| 1598 |
fi |
| 1599 |
|
| 1600 |
# This allows standard pkg-config to find gtkglext and several other things. |
| 1601 |
# PKG_CONFIG_PATH=$install_top_dir/lib/pkgconfig:/usr/lib/pkgconfig |
| 1602 |
# but we dont want to do this and only get the newly installed components |
| 1603 |
PKG_CONFIG_PATH=$install_top_dir/lib/pkgconfig |
| 1604 |
export PKG_CONFIG_PATH |
| 1605 |
echo PKG_CONFIG_PATH is $PKG_CONFIG_PATH |
| 1606 |
|
| 1607 |
# Do we have freetype2? cairo depends on it. |
| 1608 |
if pkg-config freetype2 ; then |
| 1609 |
build_freetype2= |
| 1610 |
echo system/installation has freetype2 |
| 1611 |
else |
| 1612 |
echo freetype2 should be built |
| 1613 |
build_gtk=2 |
| 1614 |
build_freetype2=1 |
| 1615 |
build_cairo=1 |
| 1616 |
build_pycairo=1 |
| 1617 |
fi |
| 1618 |
|
| 1619 |
# Do we have fontconfig? cairo depends on it. |
| 1620 |
if test -z "$build_freetype2" ; then |
| 1621 |
if pkg-config fontconfig ; then |
| 1622 |
build_fontconfig= |
| 1623 |
echo system/installation has fontconfig |
| 1624 |
else |
| 1625 |
echo fontconfig should be built |
| 1626 |
build_gtk=2 |
| 1627 |
build_fontconfig=1 |
| 1628 |
build_cairo=1 |
| 1629 |
build_pycairo=1 |
| 1630 |
fi |
| 1631 |
else |
| 1632 |
echo no freetype, fontconfig should be built too. |
| 1633 |
build_gtk=2 |
| 1634 |
build_fontconfig=1 |
| 1635 |
build_cairo=1 |
| 1636 |
build_pycairo=1 |
| 1637 |
fi |
| 1638 |
|
| 1639 |
# gtk 2.10.x says that it needs atk >= 1.9.0 |
| 1640 |
if pkg-config --atleast-version=1.22 atk ; then |
| 1641 |
echo atk is up to date |
| 1642 |
build_atk= |
| 1643 |
else |
| 1644 |
echo atk should be built |
| 1645 |
build_gtk=2 |
| 1646 |
build_atk=1 |
| 1647 |
fi |
| 1648 |
|
| 1649 |
if pkg-config --atleast-version=2.18.0 glib-2.0 ; then |
| 1650 |
# have glib |
| 1651 |
echo glib is up to date |
| 1652 |
build_glib= |
| 1653 |
else |
| 1654 |
echo glib is not up to date, rebuild glib - maybe. |
| 1655 |
build_gtk=2 |
| 1656 |
build_glib=1 |
| 1657 |
fi |
| 1658 |
|
| 1659 |
# Pango depends on cairo. |
| 1660 |
# |
| 1661 |
if pkg-config --atleast-version=1.8.1 cairo ; then |
| 1662 |
# have cairo |
| 1663 |
echo cairo is up to date |
| 1664 |
build_cairo= |
| 1665 |
else |
| 1666 |
echo cairo is not not up to date, rebuild gtk and friends |
| 1667 |
build_pango=1 |
| 1668 |
build_cairo=1 |
| 1669 |
build_gtk=1 |
| 1670 |
fi |
| 1671 |
|
| 1672 |
# pango version 1.12 is what gtk2+ 2.10.14 needs |
| 1673 |
if [ "$build_pango" != 1 ] ; then |
| 1674 |
if pkg-config --atleast-version=1.12 pango ; then |
| 1675 |
echo pango is up to date |
| 1676 |
build_pango= |
| 1677 |
else |
| 1678 |
echo build pango and friends |
| 1679 |
build_pango=1 |
| 1680 |
build_gtk=2 |
| 1681 |
fi |
| 1682 |
fi |
| 1683 |
|
| 1684 |
# Test the output of pkg-config gtk+-2.0 for recent enough gtk. |
| 1685 |
# If not, then build it yourself. |
| 1686 |
# |
| 1687 |
# Experiment, to force bragg3 to compile gtk+2 |
| 1688 |
# |
| 1689 |
# was 2.8 |
| 1690 |
needed_gtk_version=2.14 |
| 1691 |
# |
| 1692 |
pkg-config --atleast-version=$needed_gtk_version gtk+-2.0 |
| 1693 |
gtk_pkg_config_status=$? |
| 1694 |
if [ "$gtk_pkg_config_status" = 0 ] ; then |
| 1695 |
build_cairo= |
| 1696 |
if [ "$build_gtk" != 2 ] ; then |
| 1697 |
build_gtk= |
| 1698 |
fi |
| 1699 |
echo :::::::: gtk version is at least $needed_gkt_version |
| 1700 |
echo :::::::: gtk version is `pkg-config --modversion gtk+-2.0` |
| 1701 |
else |
| 1702 |
# no recent/good gtk |
| 1703 |
echo :::::::: gtk and dependencies need to be built |
| 1704 |
build_gtk=1 |
| 1705 |
build_gettext=1 |
| 1706 |
fi |
| 1707 |
|
| 1708 |
|
| 1709 |
|
| 1710 |
|
| 1711 |
# freeglut |
| 1712 |
# for dir in ${dir_list} ; do |
| 1713 |
if test -e ${install_top_dir}/include/GL/freeglut_std.h ; then |
| 1714 |
echo installation has Freeglut |
| 1715 |
build_freeglut= |
| 1716 |
glut_prefix="--with-glut-prefix=${install_top_dir}" |
| 1717 |
else |
| 1718 |
#test for normal glut |
| 1719 |
if test -e ${install_top_dir}/include/GL/glut.h ; then |
| 1720 |
echo installation has glut |
| 1721 |
glut_prefix="--with-glut-prefix=${install_top_dir}" |
| 1722 |
build_freeglut= |
| 1723 |
else |
| 1724 |
build_freeglut=1 |
| 1725 |
fi |
| 1726 |
fi |
| 1727 |
# done |
| 1728 |
if test -n "$build_freeglut" ; then |
| 1729 |
echo freeglut should be built |
| 1730 |
build_freeglut=1 |
| 1731 |
glut_prefix="--with-glut-prefix=$install_top_dir" |
| 1732 |
fi |
| 1733 |
|
| 1734 |
build_libtool=1 |
| 1735 |
if test -e ${install_top_dir}/lib/libltdl.dll.a ; then |
| 1736 |
build_libtool= |
| 1737 |
fi |
| 1738 |
if test -z "$build_libtool" ; then |
| 1739 |
echo installation has libtool |
| 1740 |
else |
| 1741 |
echo libtool should be built |
| 1742 |
fi |
| 1743 |
|
| 1744 |
build_gmp=1 |
| 1745 |
if test -e ${install_top_dir}/lib/libgmp.dll.a ; then |
| 1746 |
echo installation has gmp |
| 1747 |
build_gmp= |
| 1748 |
else |
| 1749 |
echo gmp should be built |
| 1750 |
fi |
| 1751 |
|
| 1752 |
|
| 1753 |
build_readline=1 |
| 1754 |
# |
| 1755 |
# guile dependency readline. chihiro has bad build in |
| 1756 |
# guile-1.6.7/guile-readline/readline.c:107 'rl_pending_input' undeclared |
| 1757 |
# So installation needs to build readline (sigh). |
| 1758 |
# |
| 1759 |
if test -e ${install_top_dir}/include/readline/chardefs.h ; then |
| 1760 |
build_readline= |
| 1761 |
fi |
| 1762 |
|
| 1763 |
if test -z "$build_readline" ; then |
| 1764 |
echo installation has readline |
| 1765 |
else |
| 1766 |
echo readline needs to be built |
| 1767 |
fi |
| 1768 |
|
| 1769 |
|
| 1770 |
# Darwin currently has guile-1.6 and guile (which is an older version) |
| 1771 |
# we want to use guile-1.6 if it exists. |
| 1772 |
|
| 1773 |
# This need to be fixed for Macs I guess. We need 1.8.3 not 1.6 |
| 1774 |
# |
| 1775 |
# echo guile-1.6-config will fail on non-fink non-mac systems |
| 1776 |
# guile-1.6-config --version |
| 1777 |
# if test $? = 0 ; then |
| 1778 |
# echo linking in fink 1.6 guile... |
| 1779 |
# rm -f $install_top_dir/bin/guile |
| 1780 |
# rm -f $install_top_dir/bin/guile-config |
| 1781 |
# rm -f $install_top_dir/bin/guile-snarf |
| 1782 |
# ln -s /sw/bin/guile-1.6 $install_top_dir/bin/guile |
| 1783 |
# ln -s /sw/bin/guile-1.6-config $install_top_dir/bin/guile-config |
| 1784 |
# ln -s /sw/bin/guile-1.6-snarf $install_top_dir/bin/guile-snarf |
| 1785 |
# fi |
| 1786 |
|
| 1787 |
echo atempting to run installed guile-config \(this may fail, that\'s OK\). |
| 1788 |
$install_top_dir/bin/guile-config --version |
| 1789 |
if test $? != 0 ; then |
| 1790 |
echo guile should be built |
| 1791 |
build_guile=1 |
| 1792 |
else |
| 1793 |
# We have a seen a situation somehow where bin/guile-config is installed |
| 1794 |
# but include/libguile.h is not. Strange. Let's test for libguile.h too. |
| 1795 |
if test -e $install_top_dir/include/libguile.h ; then |
| 1796 |
echo installation has guile |
| 1797 |
build_guile= |
| 1798 |
else |
| 1799 |
echo no include/libguile.h. guile should be built |
| 1800 |
echo no include/libguile.h. guile-gtk should be built |
| 1801 |
build_guile_gtk=1 |
| 1802 |
build_guile=1 |
| 1803 |
fi |
| 1804 |
fi |
| 1805 |
|
| 1806 |
# guile-gui |
| 1807 |
if test -f $install_top_dir/share/guile/gui/paren-match.scm ; then |
| 1808 |
echo installation has guile-gui |
| 1809 |
build_guile_gui= |
| 1810 |
else |
| 1811 |
echo guile-gui needs to be installed |
| 1812 |
build_guile_gui=1 |
| 1813 |
fi |
| 1814 |
|
| 1815 |
|
| 1816 |
# guile-lib |
| 1817 |
if test -f $install_top_dir/share/guile/site/sxml/simple.scm ; then |
| 1818 |
echo installation has guile-lib |
| 1819 |
build_guile_lib= |
| 1820 |
else |
| 1821 |
build_guile_lib=1 |
| 1822 |
echo guile-lib needs to be installed |
| 1823 |
fi |
| 1824 |
|
| 1825 |
|
| 1826 |
|
| 1827 |
# do we have greg? |
| 1828 |
|
| 1829 |
# LD_LIBRARY_PATH has been set by now |
| 1830 |
echo testing for greg using `which guile` |
| 1831 |
# may fail on windows, but ok |
| 1832 |
guile -c '(use-modules (ice-9 greg))' |
| 1833 |
status=$? |
| 1834 |
echo guile greg status $status |
| 1835 |
if test $status = 0 ; then |
| 1836 |
echo installation has greg |
| 1837 |
build_greg= |
| 1838 |
else |
| 1839 |
echo greg should be built |
| 1840 |
build_greg=1 |
| 1841 |
fi |
| 1842 |
|
| 1843 |
# ============= python ================ |
| 1844 |
# |
| 1845 |
# python_version is the filename of the python executable. For python |
| 1846 |
# 2.5.1 it is python2.5, not python2.5.1 |
| 1847 |
# |
| 1848 |
|
| 1849 |
python -V |
| 1850 |
if test $? != 0 ; then |
| 1851 |
echo python should be built |
| 1852 |
build_python=1 |
| 1853 |
build_pygtk=1 |
| 1854 |
build_pycairo=1 |
| 1855 |
build_pygobject=1 |
| 1856 |
if [ $build_enhanced_ligand = 1 ] ; then |
| 1857 |
build_numpy=1 |
| 1858 |
build_six=1 |
| 1859 |
build_qed=1 |
| 1860 |
fi |
| 1861 |
else |
| 1862 |
python_version_installed=`python -V 2>&1` |
| 1863 |
python_target_version="Python $pver" |
| 1864 |
|
| 1865 |
case "$python_version_installed" in |
| 1866 |
"$python_target_version") |
| 1867 |
echo installation has python, $python_version_installed |
| 1868 |
which python |
| 1869 |
# maybe have to copy it!!! |
| 1870 |
if test -e $install_top_dir/$python_version/include/Python.h ; then |
| 1871 |
# python seems to be in the correct place |
| 1872 |
build_python= |
| 1873 |
copy_python= |
| 1874 |
else |
| 1875 |
# copy it |
| 1876 |
build_python=1 |
| 1877 |
copy_python=1 |
| 1878 |
fi |
| 1879 |
;; |
| 1880 |
*) |
| 1881 |
echo python $python_version_installed installed but not up to date... |
| 1882 |
echo python should be built |
| 1883 |
build_python=1 |
| 1884 |
build_pygobject=1 |
| 1885 |
build_pycairo=1 |
| 1886 |
build_pygtk=1 |
| 1887 |
if [ $build_enhanced_ligand = 1 ] ; then |
| 1888 |
build_numpy=1 |
| 1889 |
build_six=1 |
| 1890 |
build_qed=1 |
| 1891 |
fi |
| 1892 |
;; |
| 1893 |
esac |
| 1894 |
fi |
| 1895 |
|
| 1896 |
|
| 1897 |
# test for pygobject |
| 1898 |
if test -z "$build_pygobject" ; then |
| 1899 |
if test -e $install_top_dir/$python_version/include/pygtk-2.0/pygobject.h ; then |
| 1900 |
echo installation has pygobject |
| 1901 |
build_pygobject= |
| 1902 |
else |
| 1903 |
echo pygobject NOT exists, pygobject should be built |
| 1904 |
build_pygobject=1 |
| 1905 |
build_pycairo=1 |
| 1906 |
build_pygtk=1 |
| 1907 |
fi |
| 1908 |
fi |
| 1909 |
|
| 1910 |
# test for pycairo |
| 1911 |
if test -z "$build_pycairo" ; then |
| 1912 |
if test -e $install_top_dir/$python_version/include/pycairo/pycairo.h ; then |
| 1913 |
echo installation has pycairo |
| 1914 |
build_pycairo= |
| 1915 |
else |
| 1916 |
echo pycairo NOT exists, pycairo should be built |
| 1917 |
build_pycairo=1 |
| 1918 |
build_pygtk=1 |
| 1919 |
fi |
| 1920 |
fi |
| 1921 |
|
| 1922 |
# test for pygtk |
| 1923 |
if test -z "$build_pygtk" ; then |
| 1924 |
if test -e $install_top_dir/$python_version/Lib/site-packages/gtk-2.0/gtk/keysyms.py ; then |
| 1925 |
echo pygtk keysyms exists, no build pygtk |
| 1926 |
else |
| 1927 |
echo pygtk keysyms NOT exists, pygtk should be built |
| 1928 |
build_pygtk=1 |
| 1929 |
fi |
| 1930 |
fi |
| 1931 |
|
| 1932 |
# test for numpy |
| 1933 |
if test -z "$build_numpy" ; then |
| 1934 |
if test -e $install_top_dir/$python_version/Lib/site-packages/numpy/version.py ; then |
| 1935 |
echo numpy version exists, not build numpy |
| 1936 |
build_numpy= |
| 1937 |
else |
| 1938 |
echo numpy version NOT exists, numpy should be built |
| 1939 |
build_numpy=1 |
| 1940 |
fi |
| 1941 |
fi |
| 1942 |
|
| 1943 |
# test for six |
| 1944 |
if test -z "$build_six" ; then |
| 1945 |
if test -e $install_top_dir/$python_version/Lib/site-packages/six.py ; then |
| 1946 |
echo six version exists, not build six |
| 1947 |
build_six= |
| 1948 |
else |
| 1949 |
echo six version NOT exists, six should be built |
| 1950 |
build_six=1 |
| 1951 |
fi |
| 1952 |
fi |
| 1953 |
|
| 1954 |
# test for qed |
| 1955 |
# test for qed |
| 1956 |
if test -z "$build_qed" ; then |
| 1957 |
if test -e $install_top_dir/$python_version/Lib/site-packages/silicos_it/qed.py ; then |
| 1958 |
echo qed version exists, not build qed |
| 1959 |
build_qed= |
| 1960 |
else |
| 1961 |
echo qed version NOT exists, qed should be built |
| 1962 |
build_qed=1 |
| 1963 |
fi |
| 1964 |
fi |
| 1965 |
|
| 1966 |
# force the GSL config to be in $install_top_dir, rather than |
| 1967 |
# potenially getting it from the system |
| 1968 |
# but does this compile cleanly on Mac OS X? I've forgotten. |
| 1969 |
# Perhaps we will need to be more clever and potentially use |
| 1970 |
# the fink GSL if it is available. |
| 1971 |
$install_top_dir/bin/gsl-config --prefix |
| 1972 |
if test $? != 0 ; then |
| 1973 |
echo gsl should be built |
| 1974 |
build_gsl=1 |
| 1975 |
else |
| 1976 |
gsl_version=`gsl-config --version` |
| 1977 |
|
| 1978 |
needed_gsl_version=1.3 |
| 1979 |
|
| 1980 |
# tmp value |
| 1981 |
build_gsl=`awk -v A=$gsl_version -v N=$needed_gsl_version 'BEGIN{x = (A+0)>(N+0) ? 0 : 1; print x}'` |
| 1982 |
echo system/installation has the GSL version $gsl_version |
| 1983 |
echo build_gsl is $build_gsl |
| 1984 |
|
| 1985 |
if [ $build_gsl = 1 ] ; then |
| 1986 |
echo need to build GSL |
| 1987 |
build_gsl=1 |
| 1988 |
else |
| 1989 |
echo GSL is up to date |
| 1990 |
# set build_gsl to blank: |
| 1991 |
build_gsl= |
| 1992 |
fi |
| 1993 |
fi |
| 1994 |
|
| 1995 |
|
| 1996 |
|
| 1997 |
# ############################################################## |
| 1998 |
# test for GtkGLExt |
| 1999 |
# ############################################################## |
| 2000 |
|
| 2001 |
build_gtkglext=1 |
| 2002 |
if [ "$build_gtk" = "" ] ; then |
| 2003 |
if test -e ${install_top_dir}/lib/libgtkglext-win32-1.0.dll.a ; then |
| 2004 |
build_gtkglext= |
| 2005 |
fi |
| 2006 |
if test -z "$build_gtkglext" ; then |
| 2007 |
echo installation has gtkglext |
| 2008 |
else |
| 2009 |
echo gtkglext should be built |
| 2010 |
fi |
| 2011 |
fi |
| 2012 |
|
| 2013 |
|
| 2014 |
|
| 2015 |
# ############################################################## |
| 2016 |
# test for guile-gtk |
| 2017 |
# ############################################################## |
| 2018 |
|
| 2019 |
# guile-gtk, only look in installation, not system. |
| 2020 |
|
| 2021 |
# if we are not building gtk, perhaps we should not build |
| 2022 |
# guile-gtk also? |
| 2023 |
if test -e "${install_top_dir}/include/guile-gtk.h" ; then |
| 2024 |
echo installation has guile-gtk |
| 2025 |
if [ "$build_guile" != 1 ] ; then |
| 2026 |
build_guile_gtk= |
| 2027 |
else |
| 2028 |
echo guile needs building, so guile-gtk needs building. |
| 2029 |
build_guile_gtk=1 |
| 2030 |
fi |
| 2031 |
else |
| 2032 |
echo installation does not have guile-gtk |
| 2033 |
build_guile_gtk=1 |
| 2034 |
fi |
| 2035 |
|
| 2036 |
if test -n "${build_guile_gtk}" ; then |
| 2037 |
echo guile-gtk.h not found, guile-gtk should be built |
| 2038 |
build_guile_gtk=1 |
| 2039 |
else |
| 2040 |
echo guile-gtk should not be built |
| 2041 |
fi |
| 2042 |
|
| 2043 |
# ############################################################## |
| 2044 |
# test for gnomecanvas |
| 2045 |
# ############################################################## |
| 2046 |
|
| 2047 |
# test for gnomecanvas here |
| 2048 |
if [ "$build_gtk" = "" ] ; then |
| 2049 |
pkg-config --modversion libgnomecanvas-2.0 |
| 2050 |
if [ $? = 0 ] ; then |
| 2051 |
gnome_canvas_result=`pkg-config --modversion libgnomecanvas-2.0` |
| 2052 |
case ${gnome_canvas_result} in |
| 2053 |
2.*) |
| 2054 |
echo system has libgnomecanvas-2.0 |
| 2055 |
;; |
| 2056 |
*) |
| 2057 |
echo system does not have libgnomecanvas-2.0 |
| 2058 |
my_exit 2 |
| 2059 |
;; |
| 2060 |
esac |
| 2061 |
else |
| 2062 |
echo pkg-config does not find libgnomecanvas-2.0. Try to build. |
| 2063 |
build_libgnomecanvas=1 |
| 2064 |
fi |
| 2065 |
else |
| 2066 |
echo gnomecanvas need to be built |
| 2067 |
build_libgnomecanvas=1 |
| 2068 |
fi |
| 2069 |
|
| 2070 |
# ############################################################## |
| 2071 |
# test for goocanvas |
| 2072 |
# ############################################################## |
| 2073 |
|
| 2074 |
if [ "$build_goocanvas" = "" ] ; then |
| 2075 |
|
| 2076 |
# has it been installed? |
| 2077 |
# |
| 2078 |
if [ -e "${install_top_dir}/include/goocanvas-1.0.0/goocanvas/goocanvaswidget.h" ] ; then |
| 2079 |
build_goocanvas=no |
| 2080 |
goocanvas_args="--with-goocanvas-prefix=$install_top_dir" |
| 2081 |
else |
| 2082 |
build_goocanvas=yes |
| 2083 |
goocanvas_args="--with-goocanvas-prefix=$install_top_dir" |
| 2084 |
fi |
| 2085 |
|
| 2086 |
# is it compilable? (do we have the right gtk (etc) version?) |
| 2087 |
# this is nonsense to test before we have installed the other things. Since |
| 2088 |
# we are using binaries on windows, who cares. We hope that the |
| 2089 |
# dependencies will be there, so comment out this nonsense |
| 2090 |
# |
| 2091 |
#if [ "$build_goocanvas" = "yes" ] ; then |
| 2092 |
# if pkg-config gtk+-2.0 --atleast-version 2.12 ; then |
| 2093 |
# echo goocanvas: recent enough gtk+ version |
| 2094 |
# if pkg-config cairo --atleast-version 1.4 ; then |
| 2095 |
# echo goocanvas: recent enough cairo version |
| 2096 |
# yes, compilable |
| 2097 |
# goocanvas_args="--with-goocanvas-prefix=$install_top_dir" |
| 2098 |
# else |
| 2099 |
# echo goocanvas: Cairo is too old. Goocanvas needs cairo 1.4 or later. You have: |
| 2100 |
# pkg-config cairo --modversion |
| 2101 |
# build_goocanvas=no |
| 2102 |
# fi |
| 2103 |
# else |
| 2104 |
# echo goocanvas: gtk+-2.0 too old. Goocanvas needs 2.12 or later. You have: |
| 2105 |
# pkg-config gtk+-2.0 --modversion |
| 2106 |
# build_goocanvas=no |
| 2107 |
# fi |
| 2108 |
#fi |
| 2109 |
fi |
| 2110 |
echo goocanvas: goocanvas_args set to $goocanvas_args |
| 2111 |
|
| 2112 |
|
| 2113 |
# test for mmdb: Does mmdb_model.h exist, and if it does, does it |
| 2114 |
# contain MMDBF_IgnoreHash. If not, then build mmdb. |
| 2115 |
# |
| 2116 |
# CCP4 mmdb installs in the include/mmdb2 directory, |
| 2117 |
# |
| 2118 |
if test -e "${install_top_dir}/include/mmdb2/mmdb_model.h" ; then |
| 2119 |
build_mmdb= |
| 2120 |
else |
| 2121 |
echo installation has no mmdb, build mmdb. |
| 2122 |
build_mmdb=1 |
| 2123 |
fi |
| 2124 |
|
| 2125 |
|
| 2126 |
|
| 2127 |
ssm_include_dir=ssm |
| 2128 |
if [ -e $install_top_dir/include/$ssm_include_dir/ssm_align.h ] ; then |
| 2129 |
if [ "$build_mmdb" = 1 ] ; then |
| 2130 |
build_ssmlib=1 |
| 2131 |
else |
| 2132 |
|
| 2133 |
# do we have SSM version 1.4 or later? |
| 2134 |
if grep --silent "MINOR_VERSION = [4-9]" $install_top_dir/include/$ssm_include_dir/ssm_defs.h ; then |
| 2135 |
echo SSM is found. |
| 2136 |
build_ssmlib= |
| 2137 |
else |
| 2138 |
echo we need a newer SSM. |
| 2139 |
build_ssmlib=1 |
| 2140 |
fi |
| 2141 |
fi |
| 2142 |
else |
| 2143 |
echo SSM not found - needs to be built |
| 2144 |
build_ssmlib=1 |
| 2145 |
fi |
| 2146 |
|
| 2147 |
|
| 2148 |
# clipper depends on mmdb, so if mmdb was built, then so must clipper be. |
| 2149 |
# likewise for fftw. |
| 2150 |
# |
| 2151 |
build_clipper=1 |
| 2152 |
if [ -z "$build_mmdb" ] ; then |
| 2153 |
# we potentially can pass the building of clipper: |
| 2154 |
echo INFO:: shall we build clipper: mmdb not to be built |
| 2155 |
if [ -z "$build_fftw" ] ; then |
| 2156 |
echo INFO:: shall we build clipper: fftw not to be built |
| 2157 |
# test for new ccp4-based clipper (for mtz and maps) |
| 2158 |
if [ -e $install_top_dir/include/clipper/ccp4/ccp4_mtz_io.h ] ; then |
| 2159 |
echo $install_top_dir/include/clipper/ccp4/ccp4_mtz_io.h exist |
| 2160 |
if [ -e $install_top_dir/include/clipper/contrib/sfscale.h ] ; then |
| 2161 |
echo $install_top_dir/include/clipper/contrib/sfscale.h exist |
| 2162 |
build_clipper= |
| 2163 |
else |
| 2164 |
echo $install_top_dir/include/clipper/contrib/sfscale.h not exist, building clipper |
| 2165 |
build_clipper=1 |
| 2166 |
fi |
| 2167 |
else |
| 2168 |
echo $install_top_dir/include/clipper/ccp4/ccp4_mtz_io.h not exist, building clipper |
| 2169 |
fi |
| 2170 |
fi |
| 2171 |
else |
| 2172 |
echo mmdb needs to be built, so clipper needs building. |
| 2173 |
fi |
| 2174 |
|
| 2175 |
# shall we build libccp4c? |
| 2176 |
if [ -e $install_top_dir/lib/libccp4c.la ] ; then |
| 2177 |
# 20170925 test for the pkg-config file |
| 2178 |
if [ -e $install_top_dir/lib/pkgconfig/libccp4c.pc ] ; then |
| 2179 |
# no need to rebuild |
| 2180 |
build_ccp4c= |
| 2181 |
else |
| 2182 |
build_ccp4c=1 |
| 2183 |
fi |
| 2184 |
else |
| 2185 |
build_ccp4c=1 |
| 2186 |
fi |
| 2187 |
|
| 2188 |
# test for glob |
| 2189 |
if [ -e $install_top_dir/include/glob.h ] ; then |
| 2190 |
# have glob, but do we need shared installation? |
| 2191 |
build_glob= |
| 2192 |
if [ $build_shared = 1 ] ; then |
| 2193 |
if [ -e $install_top_dir/bin/libglob.dll ] ; then |
| 2194 |
build_glob= |
| 2195 |
else |
| 2196 |
build_glob=1 |
| 2197 |
fi |
| 2198 |
fi |
| 2199 |
else |
| 2200 |
build_glob=1 |
| 2201 |
fi |
| 2202 |
|
| 2203 |
|
| 2204 |
# test for boost and rdkit |
| 2205 |
if [ $build_enhanced_ligand = 1 ] ; then |
| 2206 |
if [ -n "$build_boost" ] ; then |
| 2207 |
if [ -e $install_top_dir/include/boost/version.hpp ] ; then |
| 2208 |
echo $install_top_dir/include/boost/version.hpp exists not building boost |
| 2209 |
build_boost= |
| 2210 |
else |
| 2211 |
echo $install_top_dir/include/boost/version.hpp not exist, building boost |
| 2212 |
build_boost=1 |
| 2213 |
fi |
| 2214 |
fi |
| 2215 |
if [ -n "$build_rdkit" ] ; then |
| 2216 |
if [ -e $install_top_dir/include/rdkit/RDGeneral/versions.h ] ; then |
| 2217 |
echo $install_top_dir/include/rdkit/RDGeneral/versions.h exists not building rdkit |
| 2218 |
build_rdkit= |
| 2219 |
else |
| 2220 |
echo $install_top_dir/include/rdkit/RDGeneral/versions.h not exist, building rdkit |
| 2221 |
build_rdkit=1 |
| 2222 |
fi |
| 2223 |
fi |
| 2224 |
else |
| 2225 |
echo No LE version, so no boost and rdkit |
| 2226 |
fi |
| 2227 |
|
| 2228 |
|
| 2229 |
# Here we can force the building of clipper because we don't |
| 2230 |
# know if the dependency libccp4c.la was from 6.0 or 5.0.2 |
| 2231 |
# But, let's not do that any more. |
| 2232 |
# build_clipper= |
| 2233 |
# build_ccp4c= |
| 2234 |
|
| 2235 |
# ----------------------------------------------------------------------------- |
| 2236 |
# ----------------------------------------------------------------------------- |
| 2237 |
# build components |
| 2238 |
# ----------------------------------------------------------------------------- |
| 2239 |
# ----------------------------------------------------------------------------- |
| 2240 |
# |
| 2241 |
|
| 2242 |
# |
| 2243 |
# libccp4: (not fortran) |
| 2244 |
if test -n "$build_ccp4c" ; then |
| 2245 |
echo BUILDING: libccp4 |
| 2246 |
libccp4_version=6.5.1 |
| 2247 |
# ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/libccp4c-5.0.2-ysbl-2.tar.gz |
| 2248 |
# ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/libccp4c-5.0.2-ysbl-3.tar.gz |
| 2249 |
#${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/martyn-extras.tar.gz |
| 2250 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/software/extras/libccp4c-5.0.2-ysbl-3.tar.gz |
| 2251 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/software/extras/martyn-extras.tar.gz |
| 2252 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/software/extras/ccp4-libs-underlay-2.tar.gz |
| 2253 |
# ${WGET} $extras_place/libccp4c-5.0.2-ysbl-3.tar.gz |
| 2254 |
# ${WGET} $extras_place/martyn-extras.tar.gz |
| 2255 |
# ${WGET} $extras_place/ccp4-libs-underlay-2.tar.gz |
| 2256 |
# Dont need patch any more. Great! |
| 2257 |
# ${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/ccp4_library_utils.c.patch |
| 2258 |
# ${WGET} ftp://ftp.ccp4.ac.uk/opensource/libccp4-$libccp4_version.tar.gz |
| 2259 |
${WGET} $extras_place/libccp4-$libccp4_version.tar.gz |
| 2260 |
( |
| 2261 |
date |
| 2262 |
gzip -dc ${AUTOBUILD_SOURCES}/libccp4-$libccp4_version.tar.gz | tar xf - |
| 2263 |
cd libccp4-$libccp4_version |
| 2264 |
./configure $generic_prefix $shared_static_flag --disable-fortran |
| 2265 |
$MAKE |
| 2266 |
$MAKE install |
| 2267 |
) 2>&1 > $HOSTLOGDIR/01-libccp4.txt |
| 2268 |
else |
| 2269 |
echo not building libccp4: |
| 2270 |
fi |
| 2271 |
# |
| 2272 |
# mmdb |
| 2273 |
# |
| 2274 |
# |
| 2275 |
# mmdb |
| 2276 |
# |
| 2277 |
if test -n "$build_mmdb" ; then |
| 2278 |
echo BUILDING mmdb: |
| 2279 |
# |
| 2280 |
# mmdb_version=1.0.10. Not yet. |
| 2281 |
# mmdb_version=1.0.8-ysbl-3 |
| 2282 |
mmdb_version=1.11 |
| 2283 |
mmdb_version=1.12 |
| 2284 |
mmdb_version=1.19 |
| 2285 |
mmdb_version=1.21 |
| 2286 |
mmdb_version=1.22 |
| 2287 |
mmdb_version=1.23 |
| 2288 |
mmdb_version=1.23.2 |
| 2289 |
mmdb_version=1.24 |
| 2290 |
mmdb_version=1.24.2 |
| 2291 |
mmdb_version=1.25.0 |
| 2292 |
mmdb_version=1.25.2 |
| 2293 |
mmdb_version=1.25.3 |
| 2294 |
mmdb_version=2.0.1 |
| 2295 |
mmdb_version=2.0.2 |
| 2296 |
mmdb_version=2.0.5 |
| 2297 |
mmdb_version=2.0.11 |
| 2298 |
mmdb_version=2.0.16 |
| 2299 |
mmdb_version=2.0.19 |
| 2300 |
mmdb_version=2.0.20 |
| 2301 |
mmdb_version=2.0.22 |
| 2302 |
#mmdb_server_dir=ftp://ftp.ccp4.ac.uk/opensource |
| 2303 |
mmdb_server_dir=$win_extras_place |
| 2304 |
mmdb_server_dir=$extras_place |
| 2305 |
echo ${WGET} $mmdb_server_dir/mmdb2-$mmdb_version.tar.gz |
| 2306 |
${WGET} $mmdb_server_dir/mmdb2-$mmdb_version.tar.gz |
| 2307 |
${WGET} $win_extras_place/mmdb_io_file.cpp.patch |
| 2308 |
|
| 2309 |
( |
| 2310 |
date |
| 2311 |
gzip -dc ${AUTOBUILD_SOURCES}/mmdb2-$mmdb_version.tar.gz | tar xf - |
| 2312 |
echo gzip -dc ${AUTOBUILD_SOURCES}/mmdb2-$mmdb_version.tar.gz |
| 2313 |
cd mmdb2-$mmdb_version |
| 2314 |
pwd |
| 2315 |
patch -p0 <${AUTOBUIILD_SOURCES}/mmdb_io_file.cpp.patch |
| 2316 |
./configure $generic_prefix $shared_static_flag |
| 2317 |
$MAKE |
| 2318 |
$MAKE install |
| 2319 |
) > $HOSTLOGDIR/02-mmdb.txt 2>&1 |
| 2320 |
else |
| 2321 |
echo not building mmdb: |
| 2322 |
fi |
| 2323 |
|
| 2324 |
|
| 2325 |
if test -n "$build_ssmlib" ; then |
| 2326 |
|
| 2327 |
echo BUILDING SSM: |
| 2328 |
# |
| 2329 |
# ssm_version=0.0-pre-2-ysbl |
| 2330 |
ssm_version=1.4 |
| 2331 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/software/extras/SSMlib-$ssmlib_version.tar.gz |
| 2332 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/software/extras/SSMlib-$ssmlib_version.tar.gz |
| 2333 |
# ${WGET} $extras_place/SSMlib-$ssmlib_version.tar.gz |
| 2334 |
# ${WGET} ftp://ftp.ccp4.ac.uk/opensource/ssm-1.3.tar.bz2 |
| 2335 |
# ${WGET} ftp://ftp.ccp4.ac.uk/opensource/ssm-1.3.tar.bz2 |
| 2336 |
${WGET} $extras_place/ssm-$ssm_version.tar.gz |
| 2337 |
( |
| 2338 |
date |
| 2339 |
# gzip -dc ${AUTOBUILD_SOURCES}/SSMlib-$ssmlib_version.tar.gz | tar xf - |
| 2340 |
gzip -cd ${AUTOBUILD_SOURCES}/ssm-$ssm_version.tar.gz | tar xf - |
| 2341 |
cd ssm-$ssm_version |
| 2342 |
# ./configure $generic_prefix --with-mmdb-prefix=$install_top_dir |
| 2343 |
# grrr PE I agree |
| 2344 |
./configure $generic_prefix $shared_static_flag CPPFLAGS=-I$install_top_dir/include LDFLAGS=-L$install_top_dir/lib |
| 2345 |
$MAKE |
| 2346 |
$MAKE install |
| 2347 |
) > $HOSTLOGDIR/02-ssm.txt 2>&1 |
| 2348 |
else |
| 2349 |
echo not building ssm: |
| 2350 |
fi |
| 2351 |
|
| 2352 |
|
| 2353 |
# fftw FIXME - use binaries |
| 2354 |
if test -n "$build_fftw" ; then |
| 2355 |
echo BUILDING fftw: |
| 2356 |
# |
| 2357 |
#${WGET} http://www.ysbl.york.ac.uk/~emsley/software/fftw-2.1.5.tar.gz |
| 2358 |
#${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/fftw-configure-stuff.tar.gz |
| 2359 |
${WGET} $extras_place/fftw-2.1.5.tar.gz |
| 2360 |
${WGET} $win_extras_place/fftw-2.1.5_shared.patch |
| 2361 |
${WGET} $win_extras_place/fix_shared_makefiles.sh |
| 2362 |
${WGET} $win_extras_place/fix_libfftw.la.sh |
| 2363 |
#${WGET} $extras_place/fftw-configure-stuff.tar.gz |
| 2364 |
( |
| 2365 |
date |
| 2366 |
pwd |
| 2367 |
gzip -dc ${AUTOBUILD_SOURCES}/fftw-2.1.5.tar.gz | tar xf - |
| 2368 |
#gzip -dc ${AUTOBUILD_SOURCES}/fftw-configure-stuff.tar.gz | tar xf - |
| 2369 |
# FIXME:: needs some post-processing for dlls |
| 2370 |
cd fftw-2.1.5 |
| 2371 |
if [ $build_shared = 1 ] ; then |
| 2372 |
./bootstrap.sh |
| 2373 |
libtoolize -c -f |
| 2374 |
fi |
| 2375 |
./configure $generic_prefix $shared_static_flag --enable-float |
| 2376 |
if [ $build_shared = 1 ] ; then |
| 2377 |
${AUTOBUILD_SOURCES}/fix_shared_makefiles.sh |
| 2378 |
patch -p0 <${AUTOBUILD_SOURCES}/fftw-2.1.5_shared.patch |
| 2379 |
fi |
| 2380 |
$MAKE |
| 2381 |
$MAKE install |
| 2382 |
) > $HOSTLOGDIR/03-fftw.txt 2>&1 |
| 2383 |
else |
| 2384 |
echo not building fftw: |
| 2385 |
fi |
| 2386 |
|
| 2387 |
# # clipper |
| 2388 |
# # |
| 2389 |
# # |
| 2390 |
if test -n "$build_clipper" ; then |
| 2391 |
|
| 2392 |
# clipper: we use the ccp4 version of clipper now. |
| 2393 |
# (it uses configure, not scons) |
| 2394 |
# |
| 2395 |
echo BUILDING clipper: |
| 2396 |
# clipper_version is for the file name on the server, clipper_dir_version is the directory |
| 2397 |
# that files untars into. |
| 2398 |
#clipper_version=20ac |
| 2399 |
#clipper_version=2.1-081201-ac |
| 2400 |
#clipper_version=2.1-090210-ac |
| 2401 |
#clipper_version=2.1-090522-ac |
| 2402 |
#clipper_version=2.1-091215-ac |
| 2403 |
clipper_version=2.1-100511-ac |
| 2404 |
clipper_version=2.1 |
| 2405 |
clipper_version=2.1.20160708 |
| 2406 |
clipper_version=2.1.20180802 |
| 2407 |
clipper_dir_version=2.1 |
| 2408 |
#${WGET} http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper-$clipper_version.tar.gz |
| 2409 |
|
| 2410 |
# 20110921 hack in a temporary solution, while Kevin's new clipper |
| 2411 |
# is not available yet from his site. |
| 2412 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/software/extras/clipper-2.1-110915-fixup.tar.gz |
| 2413 |
# fix threading on windows, i.e. disable |
| 2414 |
#${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/clipper-2.1.thread.patch |
| 2415 |
# PE 20110921 hack in a temporary solution, while Kevin's new clipper |
| 2416 |
# is not available yet from his site. |
| 2417 |
clipper_hack_version=2.1-110915-fixup-2 |
| 2418 |
clipper_hack_version=2.1-140110-fixup |
| 2419 |
#${WGET} $extras_place/clipper-$clipper_hack_version.tar.gz |
| 2420 |
|
| 2421 |
# fix mean and lean on windows, i.e. disable |
| 2422 |
# ${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/clipper_win32.patch |
| 2423 |
#${WGET} $win_extras_place/clipper_win32.patch |
| 2424 |
|
| 2425 |
# now clipper has all the bits. |
| 2426 |
# ${WGET} $extras_place/clipper-$clipper_version.tar.gz |
| 2427 |
#${WGET} ftp://ftp.ccp4.ac.uk/opensource/clipper-$clipper_version.tar.gz |
| 2428 |
${WGET} $win_extras_place/clipper-$clipper_version.tar.gz |
| 2429 |
|
| 2430 |
( |
| 2431 |
gzip -dc ${AUTOBUILD_SOURCES}/clipper-$clipper_version.tar.gz | tar xf - |
| 2432 |
#mv clipper-$clipper_version clipper-$clipper_dir_version |
| 2433 |
cd clipper-$clipper_dir_version |
| 2434 |
pwd |
| 2435 |
date |
| 2436 |
|
| 2437 |
# this seems to have already been applied in 2.1.20180802 |
| 2438 |
# patch the hkl_data.h header |
| 2439 |
# needs testing |
| 2440 |
# sed -ibackup -e 's/int i = 0; i < list.size(); i++/unsigned int i = 0; i < list.size(); i++/' clipper/core/hkl_data.h |
| 2441 |
|
| 2442 |
# make clipper |
| 2443 |
echo . ------------------------------------------------------------------------------ |
| 2444 |
echo . " clipper " |
| 2445 |
echo . ------------------------------------------------------------------------------ |
| 2446 |
# BL says:: FIXME |
| 2447 |
# do we still need the patch? |
| 2448 |
export CPPFLAGS=-I$install_top_dir/include |
| 2449 |
export LDFLAGS="-Wl,--large-address-aware -L$install_top_dir/lib" |
| 2450 |
echo CPPFLAGS $CPPFLAGS |
| 2451 |
echo LDFLAGS $LDFLAGS |
| 2452 |
|
| 2453 |
#patch -p0 < ${AUTOBUILD_SOURCES}/clipper_win32.patch |
| 2454 |
#patch -p0 < ${AUTOBUILD_SOURCES}/clipper-2.1.thread.patch |
| 2455 |
# patch the hkl_data.h header |
| 2456 |
# sed -ibackup -e 's/int i = 0; i < list.size(); i++/unsigned int i = 0; i < list.size(); i++/' clipper/core/hkl_data.h |
| 2457 |
|
| 2458 |
./configure --prefix=$install_top_dir \ |
| 2459 |
--enable-mmdb=$install_top_dir \ |
| 2460 |
--enable-ccp4=$install_top_dir \ |
| 2461 |
$shared_static_flag \ |
| 2462 |
--enable-mmdb \ |
| 2463 |
--enable-cif \ |
| 2464 |
--enable-ccp4 \ |
| 2465 |
--enable-minimol \ |
| 2466 |
--enable-cns \ |
| 2467 |
CXXFLAGS="-g -O2 -fno-strict-aliasing" |
| 2468 |
# CXXFLAGS="-g -O2 -fno-strict-aliasing -DCLIPPER_DISABLE_THREADS" |
| 2469 |
# We have to disable the threading for now, no clean exit from (Win)Coot |
| 2470 |
# CXXFLAGS="-g -O2 -fno-strict-aliasing" |
| 2471 |
# not need any more ?! |
| 2472 |
# CCP4_CXXFLAGS=-I$install_top_dir/include CCP4_LIBS=$install_top_dir/lib/libccp4c.la \ |
| 2473 |
# we don't want to make the clipper executables, so let's cd in to the clipper libs and |
| 2474 |
# make (just) those. |
| 2475 |
# not any more!!! make all!!! |
| 2476 |
if [ $build_shared = 1 ] ; then |
| 2477 |
${AUTOBUILD_SOURCES}/fix_shared_makefiles.sh |
| 2478 |
fi |
| 2479 |
$MAKE |
| 2480 |
status=$? |
| 2481 |
clipper_status=$status |
| 2482 |
if [ "$clipper_status" != 0 ] ; then |
| 2483 |
echo make of clipper failed - exit 2 from internal shell. |
| 2484 |
exit 2 |
| 2485 |
else |
| 2486 |
$MAKE install |
| 2487 |
fi |
| 2488 |
|
| 2489 |
) > $HOSTLOGDIR/04-clipper.txt 2>&1 |
| 2490 |
|
| 2491 |
clipper_build_status=$? |
| 2492 |
if [ $clipper_build_status != 0 ] ; then |
| 2493 |
echo clipper build failed, exiting |
| 2494 |
my_exit 2 |
| 2495 |
fi |
| 2496 |
|
| 2497 |
else |
| 2498 |
echo not building clipper: |
| 2499 |
fi |
| 2500 |
|
| 2501 |
|
| 2502 |
|
| 2503 |
# freeglut |
| 2504 |
# we use 'normal' glut |
| 2505 |
if test -n "$build_freeglut" ; then |
| 2506 |
echo BUILDING freeglut: |
| 2507 |
#nate's version is not good as it requires 'manual' adjustments to compilation |
| 2508 |
#${WGET} http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip |
| 2509 |
# we get another version instead |
| 2510 |
#${WGET} http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MinGW-2.8.1-1.mp.zip |
| 2511 |
# seems dead, use own |
| 2512 |
${WGET} $win_extras_place/freeglut-MinGW-2.8.1-1.mp.zip |
| 2513 |
|
| 2514 |
( |
| 2515 |
date |
| 2516 |
pwd |
| 2517 |
cd $build_dir |
| 2518 |
7z x -y ${AUTOBUILD_SOURCES}/freeglut-MinGW-2.8.1-1.mp.zip |
| 2519 |
glut_prefix="--with-glut-prefix=$install_top_dir" |
| 2520 |
echo INFO:: setting glut_prefix to $glut_prefix |
| 2521 |
# now move the files to the right place |
| 2522 |
# maybe can unpack in install_top_dir directly now. Check/FIXME |
| 2523 |
cd freeglut |
| 2524 |
mkdir_maybe $install_top_dir/include/GL |
| 2525 |
cp include/GL/*.h $install_top_dir/include/GL/ |
| 2526 |
mkdir_maybe $install_top_dir/bin |
| 2527 |
cp bin/freeglut.dll $install_top_dir/bin/ |
| 2528 |
mkdir_maybe $install_top_dir/lib |
| 2529 |
cp lib/libfreeglut.a $install_top_dir/lib/ |
| 2530 |
# and whilst we are here let's get the openGL extensions as well |
| 2531 |
${WGET} --no-check-certificate https://khronos.org/registry/OpenGL/api/GL/glext.h |
| 2532 |
${WGET} --no-check-certificate https://khronos.org/registry/OpenGL/api/GL/glxext.h |
| 2533 |
${WGET} --no-check-certificate https://khronos.org/registry/OpenGL/api/GL/wglext.h |
| 2534 |
cp ${AUTOBUILD_SOURCES}/glext.h $install_top_dir/include/GL/ |
| 2535 |
cp ${AUTOBUILD_SOURCES}/glxext.h $install_top_dir/include/GL/ |
| 2536 |
cp ${AUTOBUILD_SOURCES}/wglext.h $install_top_dir/include/GL/ |
| 2537 |
cd ${AUTOBUILD_SOURCES} |
| 2538 |
) > $HOSTLOGDIR/05-freeglut.txt 2>&1 |
| 2539 |
else |
| 2540 |
echo not building freeglut: |
| 2541 |
fi |
| 2542 |
|
| 2543 |
|
| 2544 |
############################################################################### |
| 2545 |
########## pkg-config (blimey) ############# |
| 2546 |
############################################################################### |
| 2547 |
|
| 2548 |
if test -n "$build_pkg_config" ; then |
| 2549 |
echo BUILDING pkg-config: |
| 2550 |
# |
| 2551 |
pkg_config_version=0.26-1 |
| 2552 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_${pkg_config_version}_win32.zip |
| 2553 |
( |
| 2554 |
date |
| 2555 |
cd $install_top_dir |
| 2556 |
7z x -y ${AUTOBUILD_SOURCES}/pkg-config_${pkg_config_version}_win32.zip |
| 2557 |
cd - |
| 2558 |
) > $HOSTLOGDIR/05-pkg-config.txt 2>&1 |
| 2559 |
else |
| 2560 |
echo not building pkg-conifg: |
| 2561 |
fi |
| 2562 |
|
| 2563 |
|
| 2564 |
|
| 2565 |
############################################################################### |
| 2566 |
########## build gtk and friends ############# |
| 2567 |
############################################################################### |
| 2568 |
|
| 2569 |
# well I guess on windows it's easier to just download the binaries and dev |
| 2570 |
# packages (in case we need them for later) |
| 2571 |
|
| 2572 |
|
| 2573 |
# Building of the gtk2 dependencies depend on pkg-config. |
| 2574 |
# configure: error: *** pkg-config too old; version 0.16 or better required. |
| 2575 |
# Get a recent pkg-config here: |
| 2576 |
# http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz |
| 2577 |
|
| 2578 |
|
| 2579 |
# gtk2 build says that pango depends on cairo: |
| 2580 |
# checking Pango flags... configure: error: |
| 2581 |
# *** Pango not found. Pango built with Cairo support is required |
| 2582 |
# *** to build GTK+. See http://www.pango.org for Pango information. |
| 2583 |
# |
| 2584 |
# so, if we build cairo, we must build pango too |
| 2585 |
|
| 2586 |
|
| 2587 |
# just to make sure we download in sources |
| 2588 |
cd ${AUTOBUILD_SOURCES} |
| 2589 |
|
| 2590 |
if test -n "$build_gtk" ; then |
| 2591 |
echo BUILDING Gtk+-2 and/or dependencies... |
| 2592 |
( |
| 2593 |
if [ "$build_atk" = 1 ] ; then |
| 2594 |
echo ====================================================== |
| 2595 |
echo BUILDING atk binaries |
| 2596 |
echo ====================================================== |
| 2597 |
atk_major_version=1.32 |
| 2598 |
atk_version=1.32.0-2 |
| 2599 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/atk/${atk_major_version}/atk_${atk_version}_win32.zip |
| 2600 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/atk/${atk_major_version}/atk-dev_${atk_version}_win32.zip |
| 2601 |
date |
| 2602 |
cd $install_top_dir |
| 2603 |
7z x -y ${AUTOBUILD_SOURCES}/atk_${atk_version}_win32.zip |
| 2604 |
7z x -y ${AUTOBUILD_SOURCES}/atk-dev_${atk_version}_win32.zip |
| 2605 |
cd - |
| 2606 |
else |
| 2607 |
echo not BUILDING atk |
| 2608 |
fi |
| 2609 |
|
| 2610 |
|
| 2611 |
# dont think we really need glitz!? |
| 2612 |
|
| 2613 |
if [ "$build_glib" = 1 ] ; then |
| 2614 |
echo ====================================================== |
| 2615 |
echo BUILDING glib binaries and dev |
| 2616 |
echo ====================================================== |
| 2617 |
glib_major_version=2.28 |
| 2618 |
glib_version=2.28.8-1 |
| 2619 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/glib/${glib_major_version}/glib_${glib_version}_win32.zip |
| 2620 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/glib/${glib_major_version}/glib-dev_${glib_version}_win32.zip |
| 2621 |
cd $install_top_dir |
| 2622 |
7z x -y ${AUTOBUILD_SOURCES}/glib_${glib_version}_win32.zip |
| 2623 |
7z x -y ${AUTOBUILD_SOURCES}/glib-dev_${glib_version}_win32.zip |
| 2624 |
cd - |
| 2625 |
glib_status=0 |
| 2626 |
else |
| 2627 |
echo not BUILDING glib |
| 2628 |
fi |
| 2629 |
|
| 2630 |
# cairo(?) dependends on freetype2 (RedHat 8 doesn't have it) |
| 2631 |
if [ "$build_freetype2" = 1 ] ; then |
| 2632 |
echo ====================================================== |
| 2633 |
echo BUILDING freetype2 |
| 2634 |
echo ====================================================== |
| 2635 |
freetype2_version=2.4.10-1 |
| 2636 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_${freetype2_version}_win32.zip |
| 2637 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype-dev_${freetype2_version}_win32.zip |
| 2638 |
cd $install_top_dir |
| 2639 |
7z x -y ${AUTOBUILD_SOURCES}/freetype_${freetype2_version}_win32.zip |
| 2640 |
7z x -y ${AUTOBUILD_SOURCES}/freetype-dev_${freetype2_version}_win32.zip |
| 2641 |
cd - |
| 2642 |
else |
| 2643 |
echo NOT BUILDING freetype2 |
| 2644 |
fi |
| 2645 |
|
| 2646 |
# cairo(?) dependends on fontconfig (include file?) to define `FC_RGBA_UNKNOWN' |
| 2647 |
# fontconfig depends on Freetype2 (what fun). |
| 2648 |
if [ "$build_fontconfig" = 1 ] ; then |
| 2649 |
echo ====================================================== |
| 2650 |
echo BUILDING fontconfig and expat |
| 2651 |
echo ====================================================== |
| 2652 |
fontconfig_version=2.8.0-2 |
| 2653 |
# we need libexpat for fontconfig |
| 2654 |
expat_version=2.1.0-1 |
| 2655 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_${fontconfig_version}_win32.zip |
| 2656 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig-dev_${fontconfig_version}_win32.zip |
| 2657 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_${expat_version}_win32.zip |
| 2658 |
cd $install_top_dir |
| 2659 |
7z x -y ${AUTOBUILD_SOURCES}/fontconfig_${fontconfig_version}_win32.zip |
| 2660 |
7z x -y ${AUTOBUILD_SOURCES}/fontconfig-dev_${fontconfig_version}_win32.zip |
| 2661 |
7z x -y ${AUTOBUILD_SOURCES}/expat_${expat_version}_win32.zip |
| 2662 |
cd - |
| 2663 |
else |
| 2664 |
echo NOT BUILDING fontconfig |
| 2665 |
fi |
| 2666 |
|
| 2667 |
if [ "$build_cairo" = 1 ] ; then |
| 2668 |
echo ====================================================== |
| 2669 |
echo BUILDING cairo |
| 2670 |
echo ====================================================== |
| 2671 |
cairo_version=1.10.2-2 |
| 2672 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_${cairo_version}_win32.zip |
| 2673 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_${cairo_version}_win32.zip |
| 2674 |
cd $install_top_dir |
| 2675 |
7z x -y ${AUTOBUILD_SOURCES}/cairo_${cairo_version}_win32.zip |
| 2676 |
7z x -y ${AUTOBUILD_SOURCES}/cairo-dev_${cairo_version}_win32.zip |
| 2677 |
cd - |
| 2678 |
else |
| 2679 |
echo NOT BUILDING cairo |
| 2680 |
fi |
| 2681 |
|
| 2682 |
if [ "$build_pango" = 1 ] ; then |
| 2683 |
echo ====================================================== |
| 2684 |
echo BUILDING pango |
| 2685 |
echo ====================================================== |
| 2686 |
pango_major_version=1.29 |
| 2687 |
pango_version=1.29.4-1 |
| 2688 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/pango/${pango_major_version}/pango_${pango_version}_win32.zip |
| 2689 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/pango/${pango_major_version}/pango-dev_${pango_version}_win32.zip |
| 2690 |
cd $install_top_dir |
| 2691 |
7z x -y ${AUTOBUILD_SOURCES}/pango_${pango_version}_win32.zip |
| 2692 |
7z x -y ${AUTOBUILD_SOURCES}/pango-dev_${pango_version}_win32.zip |
| 2693 |
cd - |
| 2694 |
pango_status=0 |
| 2695 |
else |
| 2696 |
echo NOT BUILDING pango |
| 2697 |
fi |
| 2698 |
|
| 2699 |
# librsvg depends on libpng and lib-xml-2, so we shall get these |
| 2700 |
if [ "$pango_status" = 0 ] ; then |
| 2701 |
echo ====================================================== |
| 2702 |
echo BUILDING libpng, libtiff, and libjpeg |
| 2703 |
echo ====================================================== |
| 2704 |
libpng_version=1.4.12-1 |
| 2705 |
libjpeg_version=8-1 |
| 2706 |
libtiff_version=3.9.2-1 |
| 2707 |
zlib_version=1.2.5-2 |
| 2708 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_${libpng_version}_win32.zip |
| 2709 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng-dev_${libpng_version}_win32.zip |
| 2710 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/jpeg_${libjpeg_version}_win32.zip |
| 2711 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libtiff_${libtiff_version}_win32.zip |
| 2712 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib_${zlib_version}_win32.zip |
| 2713 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev_${zlib_version}_win32.zip |
| 2714 |
cd $install_top_dir |
| 2715 |
7z x -y ${AUTOBUILD_SOURCES}/libpng_${libpng_version}_win32.zip |
| 2716 |
7z x -y ${AUTOBUILD_SOURCES}/libpng-dev_${libpng_version}_win32.zip |
| 2717 |
7z x -y ${AUTOBUILD_SOURCES}/jpeg_${libjpeg_version}_win32.zip |
| 2718 |
7z x -y ${AUTOBUILD_SOURCES}/libtiff_${libtiff_version}_win32.zip |
| 2719 |
7z x -y ${AUTOBUILD_SOURCES}/zlib_${zlib_version}_win32.zip |
| 2720 |
7z x -y ${AUTOBUILD_SOURCES}/zlib-dev_${zlib_version}_win32.zip |
| 2721 |
cd - |
| 2722 |
else |
| 2723 |
echo NOT BUILDING libpng |
| 2724 |
fi |
| 2725 |
|
| 2726 |
if [ "$pango_status" = 0 ] ; then |
| 2727 |
echo ====================================================== |
| 2728 |
echo BUILDING libxml2 |
| 2729 |
echo ====================================================== |
| 2730 |
libxml2_version=2.9.0-1 |
| 2731 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2_${libxml2_version}_win32.zip |
| 2732 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-dev_${libxml2_version}_win32.zip |
| 2733 |
cd $install_top_dir |
| 2734 |
7z x -y ${AUTOBUILD_SOURCES}/libxml2_${libxml2_version}_win32.zip |
| 2735 |
7z x -y ${AUTOBUILD_SOURCES}/libxml2-dev_${libxml2_version}_win32.zip |
| 2736 |
cp bin/libxml2-2.dll bin/libxml2.dll |
| 2737 |
cd - |
| 2738 |
else |
| 2739 |
echo NOT BUILDING libxml2 |
| 2740 |
fi |
| 2741 |
|
| 2742 |
|
| 2743 |
# and we need libiconv |
| 2744 |
if [ "$glib_status" = 0 ] ; then |
| 2745 |
echo ====================================================== |
| 2746 |
echo BUILDING libiconv |
| 2747 |
echo ====================================================== |
| 2748 |
libiconv_version=1.9.1 |
| 2749 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libiconv-${libiconv_version}.bin.woe32.zip |
| 2750 |
cd $install_top_dir |
| 2751 |
7z x -y ${AUTOBUILD_SOURCES}/libiconv-${libiconv_version}.bin.woe32.zip |
| 2752 |
cd - |
| 2753 |
else |
| 2754 |
echo NOT BUILDING libiconv |
| 2755 |
fi |
| 2756 |
|
| 2757 |
|
| 2758 |
|
| 2759 |
# cairo depends dependends on librsvg (for testing) otherwise warning. |
| 2760 |
# But. librsvg depends on pango (the pangoft2 part). This is crazy. |
| 2761 |
# But. cairo depend on librsvg (doesn't it?) |
| 2762 |
# Does cairo depend on pango? Yes. |
| 2763 |
if [ "$pango_status" = 0 ] ; then |
| 2764 |
echo ====================================================== |
| 2765 |
echo BUILDING librsvg and its extras, croco, gsf, bzip2 |
| 2766 |
echo ====================================================== |
| 2767 |
librsvg_major_version=2.32 |
| 2768 |
librsvg_version=2.32.1-1 |
| 2769 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/librsvg/${librsvg_major_version}/librsvg_${librsvg_version}_win32.zip |
| 2770 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/librsvg/${librsvg_major_version}/svg-gdk-pixbuf-loader_${librsvg_version}_win32.zip |
| 2771 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/librsvg/${librsvg_major_version}/svg-gtk-engine_${librsvg_version}_win32.zip |
| 2772 |
|
| 2773 |
# and we need croco, gsf and bzip for librsvg to run properly |
| 2774 |
# Not sure if needed any more. OBS |
| 2775 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/libcroco/0.6/libcroco_0.6.2-1_win32.zip |
| 2776 |
#${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/libgsf/1.14/libgsf-1.14.4.zip |
| 2777 |
#${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libbzip2-1.0.2.zip |
| 2778 |
|
| 2779 |
# now need gdk-pixbuf too (not included anywhere else any more) |
| 2780 |
# not yet only when using gtk above 2.20/22 or so |
| 2781 |
gdk_pixbuf_major_version=2.24 |
| 2782 |
gdk_pixbuf_version=${gdk_pixbuf_major_version}.0-1 |
| 2783 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/gdk-pixbuf/${gdk_pixbuf_major_version}/gdk-pixbuf_${gdk_pixbuf_version}_win32.zip |
| 2784 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/gdk-pixbuf/${gdk_pixbuf_major_version}/gdk-pixbuf-dev_${gdk_pixbuf_version}_win32.zip |
| 2785 |
cd $install_top_dir |
| 2786 |
7z x -y ${AUTOBUILD_SOURCES}/librsvg_${librsvg_version}_win32.zip |
| 2787 |
7z x -y ${AUTOBUILD_SOURCES}/svg-gdk-pixbuf-loader_${librsvg_version}_win32.zip |
| 2788 |
7z x -y ${AUTOBUILD_SOURCES}/svg-gtk-engine_${librsvg_version}_win32.zip |
| 2789 |
|
| 2790 |
7z x -y ${AUTOBUILD_SOURCES}/libcroco_0.6.2-1_win32.zip |
| 2791 |
#7z x -y ${AUTOBUILD_SOURCES}/libgsf-1.14.4.zip |
| 2792 |
#7z x -y ${AUTOBUILD_SOURCES}/libbzip2-1.0.2.zip |
| 2793 |
|
| 2794 |
7z x -y ${AUTOBUILD_SOURCES}/gdk-pixbuf_${gdk_pixbuf_version}_win32.zip |
| 2795 |
7z x -y ${AUTOBUILD_SOURCES}/gdk-pixbuf-dev_${gdk_pixbuf_version}_win32.zip |
| 2796 |
cd - |
| 2797 |
# we shall run gdk-pixbuf-query loader |
| 2798 |
# but after we have gtk+!!! |
| 2799 |
else |
| 2800 |
echo NOT BUILDING librsvg |
| 2801 |
fi |
| 2802 |
|
| 2803 |
if [ "$build_gtk" = 1 ] ; then |
| 2804 |
echo ====================================================== |
| 2805 |
echo BUILDING gtk+2 |
| 2806 |
echo ====================================================== |
| 2807 |
# versions later up to 2.24 may not working with gtkglext on win32!! |
| 2808 |
# FIXME check |
| 2809 |
# maybe consider bindle download |
| 2810 |
# http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip |
| 2811 |
gtk2_major_version=2.24 |
| 2812 |
gtk2_version=2.24.10-1 |
| 2813 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/${gtk2_major_version}/gtk+_${gtk2_version}_win32.zip |
| 2814 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/${gtk2_major_version}/gtk+-dev_${gtk2_version}_win32.zip |
| 2815 |
cd $install_top_dir |
| 2816 |
7z x -y ${AUTOBUILD_SOURCES}/gtk+_${gtk2_version}_win32.zip |
| 2817 |
7z x -y ${AUTOBUILD_SOURCES}/gtk+-dev_${gtk2_version}_win32.zip |
| 2818 |
cd - |
| 2819 |
# install hicolor theme |
| 2820 |
# FIXME - update to 0.15 but uses xz then (check install for it) |
| 2821 |
hicolor_version=0.13 |
| 2822 |
${WGET} --no-check-certificate http://icon-theme.freedesktop.org/releases/hicolor-icon-theme-${hicolor_version}.tar.gz |
| 2823 |
gzip -cd ${AUTOBUILD_SOURCES}/hicolor-icon-theme-${hicolor_version}.tar.gz | tar xf - |
| 2824 |
cd hicolor-icon-theme-${hicolor_version} |
| 2825 |
./configure --prefix=$install_top_dir |
| 2826 |
$MAKE |
| 2827 |
hicolor_status=$? |
| 2828 |
if [ "$hicolor_status" != 0 ] ; then |
| 2829 |
echo make of hicolor theme failed |
| 2830 |
exit 2 |
| 2831 |
else |
| 2832 |
$MAKE install |
| 2833 |
fi |
| 2834 |
cd - |
| 2835 |
else |
| 2836 |
echo NOT BUILDING gtk2 |
| 2837 |
fi |
| 2838 |
if test -n "$gtk_set_failure" ; then |
| 2839 |
exit 1 |
| 2840 |
fi |
| 2841 |
|
| 2842 |
if [ "$build_gettext" = 1 ] ; then |
| 2843 |
echo ====================================================== |
| 2844 |
echo BUILDING gettext |
| 2845 |
echo ====================================================== |
| 2846 |
gettext_version=0.18.1.1-2 |
| 2847 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_${gettext_version}_win32.zip |
| 2848 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev_${gettext_version}_win32.zip |
| 2849 |
cd $install_top_dir |
| 2850 |
7z x -y ${AUTOBUILD_SOURCES}/gettext-runtime_${gettext_version}_win32.zip |
| 2851 |
7z x -y ${AUTOBUILD_SOURCES}/gettext-runtime-dev_${gettext_version}_win32.zip |
| 2852 |
cd - |
| 2853 |
else |
| 2854 |
echo NOT BUILDING gettext |
| 2855 |
fi |
| 2856 |
# run query loader to be able to load svg icons properly |
| 2857 |
# FIXME this needs update with new gdk-pixbuf stuff! |
| 2858 |
# NEW(?!): gdk-pixbuf.loaders doesnt exist any more use |
| 2859 |
# gdk-pixbuf-query-loaders --update-cache |
| 2860 |
# instead. But how to distribute?! There must be some cache somewhere... |
| 2861 |
# it is. Here: |
| 2862 |
# ./lib/gdk-pixbuf-2.0/2.10.0/loaders.cache |
| 2863 |
# so now the new fix: |
| 2864 |
$install_top_dir/bin/gdk-pixbuf-query-loaders.exe --update-cache |
| 2865 |
# now we have absolute paths in the file, let's make them relative |
| 2866 |
# to avoid running the gdk-pixbuf.loaders during install |
| 2867 |
sed -e "s|[^\"]*$install_top_dir|..|" \ |
| 2868 |
$install_top_dir/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache > tmp.loaders |
| 2869 |
mv $install_top_dir/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $install_top_dir/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache.bak |
| 2870 |
mv tmp.loaders $install_top_dir/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache |
| 2871 |
|
| 2872 |
) > $HOSTLOGDIR/06-gtk-prerequisites.txt 2>&1 |
| 2873 |
if test "$?" != 0 ; then |
| 2874 |
echo gtk set failed somewhere |
| 2875 |
fi |
| 2876 |
|
| 2877 |
fi |
| 2878 |
|
| 2879 |
|
| 2880 |
cd $build_dir |
| 2881 |
if test -n "$build_gtkglext" ; then |
| 2882 |
echo BUILDING gtkglext: |
| 2883 |
gtkglext_version=1.2.0 |
| 2884 |
#${WGET} http://surfnet.dl.sourceforge.net/sourceforge/gtkglext/gtkglext-$gtkglext_version.tar.gz |
| 2885 |
${WGET} http://downloads.sourceforge.net/gtkglext/gtkglext-1.2.0.tar.gz |
| 2886 |
# ${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/gtkglext_configure.patch |
| 2887 |
${WGET} $win_extras_place/gtkglext_configure.patch |
| 2888 |
(date |
| 2889 |
pwd |
| 2890 |
gzip -dc ${AUTOBUILD_SOURCES}/gtkglext-$gtkglext_version.tar.gz | tar xf - |
| 2891 |
cd gtkglext-$gtkglext_version |
| 2892 |
echo gtk+-2.0 version: |
| 2893 |
pkg-config gtk+-2.0 --modversion |
| 2894 |
# gtk+ 2.20 needs converting GTK_WIDGET_REALIZED to gtk_widget_get_realised, but |
| 2895 |
# gtk+ 2.18 does not (it fails if we add that patch), so use a simpler one. |
| 2896 |
# BL says: for 1.16 we dont need to patch |
| 2897 |
if pkg-config gtk+-2.0 --atleast-version 2.18 ; then |
| 2898 |
patch_file=gtk-gtkglwidget.c-for-modern-gtk-for-2.18.patch |
| 2899 |
echo we have sufficiently new version of gtk+, we need to patch gtkglext with $patch_file |
| 2900 |
if pkg-config gtk+-2.0 --atleast-version 2.20 ; then |
| 2901 |
patch_file=gtk-gtkglwidget.c-for-modern-gtk.patch |
| 2902 |
fi |
| 2903 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/software/extras/$patch_file |
| 2904 |
${WGET} $extras_place/$patch_file |
| 2905 |
|
| 2906 |
if patch -p0 < ${AUTOBUILD_SOURCES}/$patch_file ; then |
| 2907 |
echo gtkglext patched good. |
| 2908 |
else |
| 2909 |
echo gtkglext patch fail. |
| 2910 |
my_exit 2 |
| 2911 |
fi |
| 2912 |
|
| 2913 |
|
| 2914 |
else |
| 2915 |
echo version of gtk is old, no need to patch gtkglext. |
| 2916 |
fi |
| 2917 |
|
| 2918 |
patch -p0 < ${AUTOBUILD_SOURCES}/gtkglext_configure.patch |
| 2919 |
echo BL DEBUG PATH before config gtkglext is $PATH |
| 2920 |
./configure --build=i386-pc-mingw32 $generic_prefix |
| 2921 |
$MAKE |
| 2922 |
status=$? |
| 2923 |
if [ "$status" != 0 ] ; then |
| 2924 |
echo make of gtkglext failed |
| 2925 |
else |
| 2926 |
$MAKE install |
| 2927 |
fi |
| 2928 |
cd - |
| 2929 |
) > $HOSTLOGDIR/06-pre-gtkglext.txt 2>&1 |
| 2930 |
else |
| 2931 |
echo not building gtkglext: |
| 2932 |
fi |
| 2933 |
|
| 2934 |
##################### gnomecanvas ##################################### |
| 2935 |
|
| 2936 |
cd ${AUTOBUILD_SOURCES} |
| 2937 |
## libgnomecanvas |
| 2938 |
# |
| 2939 |
if test -n "$build_libgnomecanvas" ; then |
| 2940 |
echo BUILDING libgnomecanvas: |
| 2941 |
# we need gail and libartlgpl for gnomecanvas |
| 2942 |
libgnomecanvas_major_version=2.30 |
| 2943 |
libgnomecanvas_version=2.30.1-1 |
| 2944 |
libart_version=2.3.21-1 |
| 2945 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomecanvas/$libgnomecanvas_major_version/libgnomecanvas_${libgnomecanvas_version}_win32.zip |
| 2946 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomecanvas/$libgnomecanvas_major_version/libgnomecanvas-dev_${libgnomecanvas_version}_win32.zip |
| 2947 |
# not needed any more as included in gtk+ now |
| 2948 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart-lgpl_${libart_version}_win32.zip |
| 2949 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart-lgpl-dev_${libart_version}_win32.zip |
| 2950 |
cd $install_top_dir |
| 2951 |
( |
| 2952 |
7z x -y ${AUTOBUILD_SOURCES}/libgnomecanvas_${libgnomecanvas_version}_win32.zip |
| 2953 |
7z x -y ${AUTOBUILD_SOURCES}/libgnomecanvas-dev_${libgnomecanvas_version}_win32.zip |
| 2954 |
7z x -y ${AUTOBUILD_SOURCES}/libart-lgpl_${libart_version}_win32.zip |
| 2955 |
7z x -y ${AUTOBUILD_SOURCES}/libart-lgpl-dev_${libart_version}_win32.zip |
| 2956 |
cd - |
| 2957 |
) > $HOSTLOGDIR/09-gnomecanvas.txt 2>&1 |
| 2958 |
else |
| 2959 |
echo NOT BUILDING libgnomecanvas |
| 2960 |
fi |
| 2961 |
|
| 2962 |
|
| 2963 |
echo done with Gtk+-2 and dependencies... |
| 2964 |
|
| 2965 |
##################### goocanvas ##################################### |
| 2966 |
|
| 2967 |
if [ "$build_goocanvas" != "no" ] ; then |
| 2968 |
echo BUILDING goocanvas |
| 2969 |
goocanvas_major_version=1.0 |
| 2970 |
goocanvas_version=${goocanvas_major_version}.0 |
| 2971 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/goocanvas/${goocanvas_major_version}/goocanvas-${goocanvas_version}-win32.zip |
| 2972 |
${WGET} http://ftp.gnome.org/pub/gnome/binaries/win32/goocanvas/${goocanvas_major_version}/goocanvas-dev-${goocanvas_version}-win32.zip |
| 2973 |
(date |
| 2974 |
cd $install_top_dir |
| 2975 |
pwd |
| 2976 |
7z x -y ${AUTOBUILD_SOURCES}/goocanvas-${goocanvas_version}-win32.zip |
| 2977 |
7z x -y ${AUTOBUILD_SOURCES}/goocanvas-dev-${goocanvas_version}-win32.zip |
| 2978 |
cd - |
| 2979 |
) > $HOSTLOGDIR/06-pre-goocanvas.txt |
| 2980 |
else |
| 2981 |
echo NOT BUILDING goocanvas |
| 2982 |
fi |
| 2983 |
|
| 2984 |
############################################################################### |
| 2985 |
########## build python and friends ############# |
| 2986 |
############################################################################### |
| 2987 |
|
| 2988 |
# So that python is found when it is installed: |
| 2989 |
# |
| 2990 |
PATH=$install_top_dir/bin:$install_top_dir/$python_version:$install_top_dir/$python_version/Scripts:$PATH |
| 2991 |
export PATH |
| 2992 |
|
| 2993 |
# python_version is the filename of the python executable. For python |
| 2994 |
# 2.5.1 it is python2.5, not python2.5.1 |
| 2995 |
# |
| 2996 |
|
| 2997 |
# python |
| 2998 |
# |
| 2999 |
|
| 3000 |
cd $install_top_dir |
| 3001 |
mkdir $python_version |
| 3002 |
cd $python_version |
| 3003 |
# get the full directory |
| 3004 |
py_inst_dir=`pwd -W` |
| 3005 |
# convert / to \ for windows file names |
| 3006 |
py_inst_dir=${py_inst_dir//\//\\} |
| 3007 |
cd $install_top_dir/bin |
| 3008 |
py_dll_dir=`pwd -W` |
| 3009 |
py_dll_dir=${py_dll_dir//\//\\} |
| 3010 |
|
| 3011 |
global_py_inst_dir=${AUTOBUILD_BUILD}/${HOST}/${python_version} |
| 3012 |
saved_global_py_inst_dir=$global_py_inst_dir |
| 3013 |
mkdir $global_py_inst_dir |
| 3014 |
cd $global_py_inst_dir |
| 3015 |
global_py_inst_dir=`pwd -W` |
| 3016 |
# convert / to \ for windows file names |
| 3017 |
# maybe even two |
| 3018 |
global_py_inst_dir=${global_py_inst_dir//\//\\} |
| 3019 |
cd - |
| 3020 |
|
| 3021 |
echo py_inst_dir is: $py_inst_dir |
| 3022 |
echo py_dll_dir is: $py_dll_dir |
| 3023 |
echo global_py_inst_dir is :$global_py_inst_dir |
| 3024 |
|
| 3025 |
if test -n "$build_python" ; then |
| 3026 |
echo BUILDING Python ${pver}: |
| 3027 |
# |
| 3028 |
cd ${AUTOBUILD_SOURCES} |
| 3029 |
echo downloading python from http://www.python.org/ftp/python/$pver/python-$pver.msi |
| 3030 |
${WGET} --no-check-certificate http://www.python.org/ftp/python/$pver/python-$pver.msi |
| 3031 |
status=$? |
| 3032 |
if [ "$status" != 0 ] ; then |
| 3033 |
echo problem downloading python |
| 3034 |
fi |
| 3035 |
#${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/unittest_skip_win.patch |
| 3036 |
( |
| 3037 |
date |
| 3038 |
pwd |
| 3039 |
|
| 3040 |
# New method: |
| 3041 |
# install python in ${AUTOBUILD_BUILD}/${HOST} |
| 3042 |
# copy from there, whenever needed. |
| 3043 |
# Needs occasional uninstall of old pythons.... |
| 3044 |
# |
| 3045 |
echo checking for python now |
| 3046 |
|
| 3047 |
# check if python is installed (correct version) |
| 3048 |
python_version_installed=`${saved_global_py_inst_dir}/python -V 2>&1` |
| 3049 |
python_target_version="Python $pver" |
| 3050 |
echo now compare $python_version_installed with $python_target_version |
| 3051 |
if [ "$python_version_installed" == "$python_target_version" ] ; then |
| 3052 |
echo $python_target_version already installed just copy files |
| 3053 |
copy_python=1 |
| 3054 |
else |
| 3055 |
# new python needs to be installed, please go ahead!!! put ddl in same dir |
| 3056 |
echo msiexec /a python-$pver.msi TARGETDIR=$global_py_inst_dir DLLDIR=$global_py_inst_dir ALLUSERS=1 /qn |
| 3057 |
# msiexec //i python-$pver.msi TARGETDIR=$global_py_inst_dir DLLDIR=$global_py_inst_dir ALLUSERS=1 //qn |
| 3058 |
msiexec //a python-$pver.msi TARGETDIR=$global_py_inst_dir DLLDIR=$global_py_inst_dir ALLUSERS=1 //qn |
| 3059 |
status=$? |
| 3060 |
if [ "$status" != 0 ] ; then |
| 3061 |
echo problem installing python |
| 3062 |
echo ' may be already installed elsewhere?! But we dont know!?' |
| 3063 |
copy_python=1 |
| 3064 |
my_exit 2 |
| 3065 |
else |
| 3066 |
echo python installation seems successfull, continue |
| 3067 |
fi |
| 3068 |
fi |
| 3069 |
|
| 3070 |
if test -n "$copy_python" ; then |
| 3071 |
# have an installed dll in non-guile dir, so just copy everything over |
| 3072 |
echo copy everything over from ${AUTOBUILD_BUILD}/${HOST} |
| 3073 |
# what do we need |
| 3074 |
# 1. python.xx |
| 3075 |
# 2. pythonXX.dll |
| 3076 |
# 3. includes (pyg*) |
| 3077 |
# 4. pkg-config (pyg*) |
| 3078 |
echo copy dir: cp -r ${saved_global_py_inst_dir} ${install_top_dir} |
| 3079 |
cp -r ${saved_global_py_inst_dir} ${install_top_dir} |
| 3080 |
dll_name=${global_py_inst_dir}/python${pver_short/./}.dll |
| 3081 |
echo copy dll: cp $dll_name ${install_top_dir}/bin |
| 3082 |
cp $dll_name ${install_top_dir}/bin |
| 3083 |
# pygobject |
| 3084 |
echo copy pygobject things |
| 3085 |
cp -r ${global_py_inst_dir}/include/pygtk-2.0/ $install_top_dir/include/ |
| 3086 |
cp ${global_py_inst_dir}/Lib/pkgconfig/pygobject-2.0.pc $install_top_dir/lib/pkgconfig/ |
| 3087 |
# pycairo |
| 3088 |
echo copy pycairo things |
| 3089 |
cp -r ${global_py_inst_dir}/include/pycairo/ $install_top_dir/include/ |
| 3090 |
cp ${global_py_inst_dir}/Lib/pkgconfig/pycairo.pc $install_top_dir/lib/pkgconfig/ |
| 3091 |
# pygtk |
| 3092 |
echo copy pygtk things |
| 3093 |
cp ${global_py_inst_dir}/Lib/pkgconfig/pygtk-2.0.pc $install_top_dir/lib/pkgconfig/ |
| 3094 |
copy_python=2 |
| 3095 |
fi |
| 3096 |
echo $copy_python > $HOME/python_copied.tmp |
| 3097 |
) > $HOSTLOGDIR/07-python.txt 2>&1 |
| 3098 |
|
| 3099 |
if [ -e $HOME/python_copied.tmp ] ; then |
| 3100 |
if [ $(cat $HOME/python_copied.tmp) == 2 ] ; then |
| 3101 |
echo copied python, so dont install pygobject etc. |
| 3102 |
build_pygobject=0 |
| 3103 |
build_pycairo=0 |
| 3104 |
build_pygtk=0 |
| 3105 |
fi |
| 3106 |
rm $HOME/python_copied.tmp |
| 3107 |
fi |
| 3108 |
|
| 3109 |
# to uninstall use: |
| 3110 |
# msiexec //uninstall python-$pver.msi //qb |
| 3111 |
|
| 3112 |
# now lets check for pip, if not there install |
| 3113 |
which pip > /dev/null |
| 3114 |
have_pip=$? |
| 3115 |
if [ $have_pip = 0 ] ; then |
| 3116 |
echo have pip, we are happy and continue |
| 3117 |
else |
| 3118 |
echo no pip found, so lets see that we can get it |
| 3119 |
${WGET} https://bootstrap.pypa.io/get-pip.py |
| 3120 |
python ${AUTOBUILD_SOURCES}/get-pip.py |
| 3121 |
# now we shoudl have pip |
| 3122 |
fi |
| 3123 |
|
| 3124 |
# We need these otherwise python moans about not finding the libraries. |
| 3125 |
# |
| 3126 |
echo setting PYTHONHOME |
| 3127 |
# first worked somehow with pre-release but should be 2nd |
| 3128 |
#PYTHONHOME=$install_top_dir/$py_inst_dir |
| 3129 |
PYTHONHOME=$py_inst_dir |
| 3130 |
export PYTHONHOME |
| 3131 |
echo PYTHONHOME is now $PYTHONHOME |
| 3132 |
|
| 3133 |
# patch the unittest module to allow skipping tests |
| 3134 |
# not any more (is included) |
| 3135 |
#echo patching unittest for skipping |
| 3136 |
#cd ${PYTHONHOME}/Lib |
| 3137 |
#patch -p0<${AUTOBUILD_SOURCES}/unittest_skip_win.patch |
| 3138 |
#cd - |
| 3139 |
|
| 3140 |
echo done python linking. |
| 3141 |
# now we have "python" in our path - no need to rehash - |
| 3142 |
# clever old Bourne shell (or do I mean bash?). |
| 3143 |
else |
| 3144 |
echo not building python: |
| 3145 |
fi |
| 3146 |
|
| 3147 |
|
| 3148 |
# building og pygobject, pycairo, and pygtk currently cannot be automated, so we have to press |
| 3149 |
# a few buttons |
| 3150 |
if test -n "$build_pygobject" ; then |
| 3151 |
echo BUILDING pygobject: |
| 3152 |
# |
| 3153 |
pygobject_version=2.28.3 |
| 3154 |
#${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.14/pygobject-$pygobject_version.win32-py2.5.exe |
| 3155 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.28/pygobject-${pygobject_version}.win32-py$pver_short.exe |
| 3156 |
( |
| 3157 |
date |
| 3158 |
#msiexec //i pygobject-$pygobject_version.win32-py$pver_short.msi TARGETDIR=$py_inst_dir ALLUSERS=1 //qn |
| 3159 |
mkdir ${AUTOBUILD_SOURCES}/pygobject-${pygobject_version}.win32-py$pver_short |
| 3160 |
echo do: 7z x -aoa -o${AUTOBUILD_SOURCES}/pygobject-${pygobject_version}.win32-py$pver_short |
| 3161 |
7z x -aoa -o${AUTOBUILD_SOURCES}/pygobject-${pygobject_version}.win32-py$pver_short \ |
| 3162 |
${AUTOBUILD_SOURCES}/pygobject-${pygobject_version}.win32-py$pver_short.exe |
| 3163 |
# now copy files |
| 3164 |
cp -r ${AUTOBUILD_SOURCES}/pygobject-${pygobject_version}.win32-py$pver_short/DATA/* \ |
| 3165 |
$install_top_dir/$python_version/ |
| 3166 |
cp -r ${AUTOBUILD_SOURCES}/pygobject-${pygobject_version}.win32-py$pver_short/PLATLIB/* \ |
| 3167 |
$install_top_dir/$python_version/Lib/site-packages/ |
| 3168 |
$install_top_dir/$python_version/python ${AUTOBUILD_SOURCES}/pygobject-${pygobject_version}.win32-py$pver_short/SCRIPTS/pygobject_postinstall.py -install |
| 3169 |
# copy pkgconfig and include files |
| 3170 |
mkdir_maybe $install_top_dir/include |
| 3171 |
cp -r $install_top_dir/$python_version/include/pygtk-2.0 $install_top_dir/include/ |
| 3172 |
mkdir_maybe $install_tpo_dir/lib |
| 3173 |
cp -r $install_top_dir/$python_version/Lib/pkgconfig $install_top_dir/lib/ |
| 3174 |
) > $HOSTLOGDIR/07-pygobject.txt 2>&1 |
| 3175 |
else |
| 3176 |
echo not building pygobject: |
| 3177 |
fi |
| 3178 |
|
| 3179 |
|
| 3180 |
if test -n "$build_pycairo" ; then |
| 3181 |
echo BUILDING pycairo: |
| 3182 |
# |
| 3183 |
#pycairo_version=1.4.12-1 |
| 3184 |
pycairo_version=1.8.10 |
| 3185 |
#${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.4/pycairo-$pycairo_version.win32-py2.5.exe |
| 3186 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.8/pycairo-$pycairo_version.win32-py$pver_short.exe |
| 3187 |
( |
| 3188 |
date |
| 3189 |
#${AUTOBUILD_SOURCES}/pycairo-$pycairo_version.win32-py2.5.exe |
| 3190 |
#msiexec //i pycairo-$pycairo_version.win32-py$pver_short.msi TARGETDIR=$py_inst_dir ALLUSERS=1 //qn |
| 3191 |
7z x -aoa -o${AUTOBUILD_SOURCES}/pycairo-$pycairo_version.win32-py$pver_short \ |
| 3192 |
${AUTOBUILD_SOURCES}/pycairo-$pycairo_version.win32-py$pver_short.exe |
| 3193 |
cp -r ${AUTOBUILD_SOURCES}/pycairo-${pycairo_version}.win32-py$pver_short/DATA/* \ |
| 3194 |
$install_top_dir/$python_version/ |
| 3195 |
cp -r ${AUTOBUILD_SOURCES}/pycairo-${pycairo_version}.win32-py$pver_short/PLATLIB/* \ |
| 3196 |
$install_top_dir/$python_version/Lib/site-packages/ |
| 3197 |
# copy pkgconfig and include files |
| 3198 |
cp -r $install_top_dir/$python_version/include/pycairo $install_top_dir/include/ |
| 3199 |
cp $install_top_dir/$python_version/Lib/pkgconfig/pycairo.pc $install_top_dir/lib/pkgconfig/ |
| 3200 |
) > $HOSTLOGDIR/07-pycairo.txt 2>&1 |
| 3201 |
else |
| 3202 |
echo not building pycairo: |
| 3203 |
fi |
| 3204 |
|
| 3205 |
|
| 3206 |
|
| 3207 |
|
| 3208 |
if test -n "$build_pygtk" ; then |
| 3209 |
echo BUILDING pygtk: |
| 3210 |
# |
| 3211 |
py_gtk_version=2.24.0 |
| 3212 |
#${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.12/pygtk-$py_gtk_version.win32-py2.5.exe |
| 3213 |
#${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.16/pygtk-$py_gtk_version.win32-py$pver_short.exe |
| 3214 |
${WGET} http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-$py_gtk_version.win32-py$pver_short.exe |
| 3215 |
( |
| 3216 |
date |
| 3217 |
#${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py2.5.exe |
| 3218 |
#msiexec //i ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short.msi TARGETDIR=$py_inst_dir ALLUSERS=1 //qn |
| 3219 |
# |
| 3220 |
# no msi installer for this version, so we use 7z to unpack and install |
| 3221 |
mkdir ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short |
| 3222 |
echo do: 7z x -aoa${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short.exe |
| 3223 |
7z x -aoa -o${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short \ |
| 3224 |
${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short.exe |
| 3225 |
echo do: cp -r ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short/DATA/* $install_top_dir/$python_version/ |
| 3226 |
cp -r ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short/DATA/* \ |
| 3227 |
$install_top_dir/$python_version/ |
| 3228 |
echo do: cp -r ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short/PLATLIB/* $install_top_dir/$python_version/Lib/site-packages/ |
| 3229 |
cp -r ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short/PLATLIB/* \ |
| 3230 |
$install_top_dir/$python_version/Lib/site-packages/ |
| 3231 |
echo do: $install_top_dir/$python_version/python ${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short/SCRIPTS/pygtk_postinstall.py -install |
| 3232 |
$install_top_dir/$python_version/python \ |
| 3233 |
${AUTOBUILD_SOURCES}/pygtk-$py_gtk_version.win32-py$pver_short/SCRIPTS/pygtk_postinstall.py -install |
| 3234 |
# the latter may give error since it cannot make shortcuts |
| 3235 |
|
| 3236 |
# copy pkgconfig and include files |
| 3237 |
cp -r $install_top_dir/$python_version/include/pygtk-2.0/pygtk \ |
| 3238 |
$install_top_dir/include/pygtk-2.0/ |
| 3239 |
cp $install_top_dir/$python_version/Lib/pkgconfig/pygtk-2.0.pc $install_top_dir/lib/pkgconfig/ |
| 3240 |
) > $HOSTLOGDIR/07-pygtk.txt 2>&1 |
| 3241 |
else |
| 3242 |
echo not building pytgtk |
| 3243 |
fi |
| 3244 |
|
| 3245 |
if test -n "$build_numpy" ; then |
| 3246 |
echo BUILDING numpy: |
| 3247 |
( |
| 3248 |
date |
| 3249 |
# before using pip we should see that it is installed, otherwise |
| 3250 |
# do so. Maybe not the right place here and rather during pythons |
| 3251 |
pip install numpy |
| 3252 |
# maybe other python things can be installed using pip too? |
| 3253 |
status=$? |
| 3254 |
if [ $status = 0 ] ; then |
| 3255 |
echo numpy seems to have installed ok |
| 3256 |
else |
| 3257 |
echo issues installing numpy!? |
| 3258 |
fi |
| 3259 |
) > $HOSTLOGDIR/07-numpy.txt 2>&1 |
| 3260 |
else |
| 3261 |
echo not building numpy |
| 3262 |
fi |
| 3263 |
|
| 3264 |
if test -n "$build_six" ; then |
| 3265 |
echo BUILDING six: |
| 3266 |
( |
| 3267 |
date |
| 3268 |
pip install six |
| 3269 |
status=$? |
| 3270 |
if [ $status = 0 ] ; then |
| 3271 |
echo six seems to have installed ok |
| 3272 |
else |
| 3273 |
echo issues installing six!? |
| 3274 |
fi |
| 3275 |
) > $HOSTLOGDIR/07-six.txt 2>&1 |
| 3276 |
else |
| 3277 |
echo not building six |
| 3278 |
fi |
| 3279 |
|
| 3280 |
# Pillow is not available for python2 and msys2 (any more) lets work withou for now |
| 3281 |
# need to install Pillow (for depictions to work): |
| 3282 |
# https://files.pythonhosted.org/packages/b3/d0/a20d8440b71adfbf133452d4f6e0fe80de2df7c2578c9b498fb812083383/Pillow-6.2.2.tar.gz |
| 3283 |
|
| 3284 |
#if [ -e $install_top_dir/lib/python2.7/site-packages/Pillow-6.2.2.dist-info ] ; then |
| 3285 |
if true ; then |
| 3286 |
echo not building Pillow: |
| 3287 |
else |
| 3288 |
pillow_url=https://files.pythonhosted.org/packages/b3/d0/a20d8440b71adfbf133452d4f6e0fe80de2df7c2578c9b498fb812083383/Pillow-6.2.2.tar.gz |
| 3289 |
$(WGET) $pillow_url |
| 3290 |
if [ -e ${AUTOBUILD_SOURCES}/Pillow-6.2.2.tar.gz ] ; then |
| 3291 |
tar xf ${AUTOBUILD_SOURCES}/Pillow-6.2.2.tar.gz |
| 3292 |
cd Pillow-6.2.2 |
| 3293 |
python setup.py build |
| 3294 |
python setup.py install |
| 3295 |
cd - |
| 3296 |
fi |
| 3297 |
fi |
| 3298 |
|
| 3299 |
|
| 3300 |
# finally we shall cp (or move?) Lib and DLL directories to bin |
| 3301 |
# as well as the pkgconfig and include files (..since...) |
| 3302 |
# N.B. pkgconfig on windows doesnt pick up prefix in *.pc file |
| 3303 |
# well, actually overwrites it if 'usual' parent path (i.e. lib) |
| 3304 |
if test -n "$build_python" ; then |
| 3305 |
# echo now copy over DLLs, Lib and $python_version |
| 3306 |
# Not any more!? |
| 3307 |
#cp -r $global_py_inst_dir/DLLs $install_top_dir/bin |
| 3308 |
#cp -r $global_py_inst_dir/Lib $install_top_dir/bin |
| 3309 |
echo cp -r $saved_global_py_inst_dir $install_top_dir/ |
| 3310 |
cp -r $saved_global_py_inst_dir $install_top_dir/ |
| 3311 |
dll_name=${global_py_inst_dir}/python${pver_short/./}.dll |
| 3312 |
echo copy dll: cp $dll_name ${install_top_dir}/bin |
| 3313 |
cp $dll_name ${install_top_dir}/bin |
| 3314 |
fi |
| 3315 |
|
| 3316 |
# be save and go back to build_dir |
| 3317 |
cd ${build_dir} |
| 3318 |
|
| 3319 |
######### |
| 3320 |
## build BOOST and rdkit |
| 3321 |
######### |
| 3322 |
if [ $build_enhanced_ligand = 1 ] ; then |
| 3323 |
if test -n "$build_boost" ; then |
| 3324 |
echo BUILDING Boost: |
| 3325 |
boost_version=1.60.0 |
| 3326 |
# old wget cant get from sourceforge but new one can. Make sure there |
| 3327 |
# is a new one! e.g. https://eternallybored.org/misc/wget/ |
| 3328 |
${WGET} --no-check-certificate http://sourceforge.net/projects/boost/files/boost/${boost_version}/boost_${boost_version//./_}.7z |
| 3329 |
${WGET} $win_extras_place/boost_1_60_0.patch |
| 3330 |
${WGET} $win_extras_place/make_boost64.bat |
| 3331 |
( |
| 3332 |
date |
| 3333 |
pwd |
| 3334 |
7z x -y ${AUTOBUILD_SOURCES}/boost_${boost_version//./_}.7z |
| 3335 |
cd boost_${boost_version//./_} |
| 3336 |
patch -p0 < ${AUTOBUILD_SOURCES}/boost_1_60_0.patch |
| 3337 |
cmd /c < ${AUTOBUILD_SOURCES}/make_boost64.bat |
| 3338 |
cd - |
| 3339 |
) > $HOSTLOGDIR/21-boost.txt 2>&1 |
| 3340 |
else |
| 3341 |
echo not building Boost |
| 3342 |
fi |
| 3343 |
|
| 3344 |
if test -n "$build_rdkit" ; then |
| 3345 |
echo BUILDING rdkit: |
| 3346 |
rdkit_version=2018_03_2 |
| 3347 |
${WGET} https://github.com/rdkit/rdkit/archive/Release_${rdkit_version}.tar.gz |
| 3348 |
# ${WGET} ${win_extras_place}/rdkit_strtok.patch |
| 3349 |
( |
| 3350 |
date |
| 3351 |
pwd |
| 3352 |
tmpdir=`pwd` |
| 3353 |
gzip -cd ${AUTOBUILD_SOURCES}/Release_${rdkit_version}.tar.gz | tar xf - |
| 3354 |
cd rdkit-Release_${rdkit_version} |
| 3355 |
# patch -p0 < ${AUTOBUILD_SOURCES}/rdkit_strtok.patch |
| 3356 |
export RDBASE=`pwd` |
| 3357 |
export PYTHONPATH=$RDBASE |
| 3358 |
export PATH=$PATH:$RDBASE/lib |
| 3359 |
export PATH=$PATH:$install_top_dir/lib |
| 3360 |
mkdir build |
| 3361 |
cd build |
| 3362 |
cmake -G "MSYS Makefiles" \ |
| 3363 |
-DRDK_BUILD_PYTHON_WRAPPERS=ON \ |
| 3364 |
-DRDK_BUILD_SLN_SUPPORT=OFF \ |
| 3365 |
-DRDK_TEST_MMFF_COMPLIANCE=OFF \ |
| 3366 |
-DRDK_BUILD_CPP_TESTS=OFF \ |
| 3367 |
-DRDK_BUILD_THREADSAFE_SSS=ON \ |
| 3368 |
-DMSVC_RUNTIME_DLL=C:/WINDOWS/System32 \ |
| 3369 |
-DRDK_USE_BOOST_SERIALIZATION=OFF \ |
| 3370 |
-DBoost_USE_DEBUG_LIBS=OFF \ |
| 3371 |
-DBoost_USE_RELEASE_LIBS=ON \ |
| 3372 |
-DRDK_INSTALL_INTREE=OFF \ |
| 3373 |
-DBUILD_SHARED_LIBS=ON \ |
| 3374 |
-DRDK_INSTALL_STATIC_LIBS=OFF \ |
| 3375 |
-DRDK_BUILD_CAIRO_SUPPORT=ON \ |
| 3376 |
-DCMAKE_INSTALL_PREFIX=$install_top_dir .. |
| 3377 |
$MAKE |
| 3378 |
$MAKE install |
| 3379 |
cd $tmpdir |
| 3380 |
) > $HOSTLOGDIR/22-rdkit.txt 2>&1 |
| 3381 |
else |
| 3382 |
echo not building rdkit |
| 3383 |
fi |
| 3384 |
# check build necessary!! |
| 3385 |
fi # ligand enhanced |
| 3386 |
|
| 3387 |
# silicos-it's biscu-it |
| 3388 |
if [ -e $install_top_dir/lib/python2.7/site-packages/silicos_it/descriptors/qed.py ] ; then |
| 3389 |
echo not building biscu-it: |
| 3390 |
else |
| 3391 |
echo building QED |
| 3392 |
(date |
| 3393 |
${WGET} http://silicos-it.be.s3-website-eu-west-1.amazonaws.com/_downloads/qed-1.0.1.tar.gz |
| 3394 |
pwd |
| 3395 |
tar xf ${AUTOBUILD_SOURCES}/qed-1.0.1.tar.gz |
| 3396 |
cd qed-1.0.1 |
| 3397 |
python setup.py install |
| 3398 |
cd - |
| 3399 |
) > $HOSTLOGDIR/19-biscu-it.txt 2>&1 |
| 3400 |
fi |
| 3401 |
|
| 3402 |
# Now we need: |
| 3403 |
# * guile |
| 3404 |
# * guile-www |
| 3405 |
# * guile-gtk |
| 3406 |
# * guile-gui |
| 3407 |
# * gsl |
| 3408 |
|
| 3409 |
|
| 3410 |
|
| 3411 |
############################################################################### |
| 3412 |
########## build guile and friends ############# |
| 3413 |
############################################################################### |
| 3414 |
|
| 3415 |
# only if we really want to |
| 3416 |
if [ "$ENABLE_GUILE_COOT" = "yes" ] ; then |
| 3417 |
|
| 3418 |
cd $build_dir |
| 3419 |
if test -n "$build_gmp" ; then |
| 3420 |
echo BUILDING gmp: |
| 3421 |
gmp_version=4.2.4 |
| 3422 |
# FIMXE, maybe update to 5.1.2 |
| 3423 |
${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-$gmp_version.tar.gz |
| 3424 |
(date |
| 3425 |
pwd |
| 3426 |
gzip -dc ${AUTOBUILD_SOURCES}/gmp-$gmp_version.tar.gz | tar xf - |
| 3427 |
cd gmp-$gmp_version |
| 3428 |
./configure $generic_prefix --disable-static --enable-shared |
| 3429 |
$MAKE |
| 3430 |
status=$? |
| 3431 |
if [ "$status" != 0 ] ; then |
| 3432 |
echo make of gmp failed |
| 3433 |
else |
| 3434 |
$MAKE install |
| 3435 |
fi |
| 3436 |
) > $HOSTLOGDIR/08-pre-gmp.txt 2>&1 |
| 3437 |
else |
| 3438 |
echo not building gmp: |
| 3439 |
fi |
| 3440 |
|
| 3441 |
|
| 3442 |
|
| 3443 |
if test -n "$build_libtool" ; then |
| 3444 |
echo BUILDING libtool: |
| 3445 |
libtool_version=1.5.26 |
| 3446 |
${WGET} http://downloads.sourceforge.net/gnuwin32/libtool-$libtool_version-bin.zip |
| 3447 |
${WGET} http://downloads.sourceforge.net/gnuwin32/libtool-$libtool_version-lib.zip |
| 3448 |
(date |
| 3449 |
cd $install_top_dir |
| 3450 |
pwd |
| 3451 |
7z x -y ${AUTOBUILD_SOURCES}/libtool-$libtool_version-bin.zip |
| 3452 |
7z x -y ${AUTOBUILD_SOURCES}/libtool-$libtool_version-lib.zip |
| 3453 |
# fix some wrong paths |
| 3454 |
sed "s?^prefix=.*?prefix=$install_top_dir?" bin/libtoolize >libtoolize.tmp |
| 3455 |
mv libtoolize.tmp bin/libtoolize |
| 3456 |
sed "s?^libdir=.*?libdir=$install_top_dir/lib?" lib/libltdl.la >libltdl.tmp |
| 3457 |
mv libltdl.tmp lib/libltdl.la |
| 3458 |
cd - |
| 3459 |
) > $HOSTLOGDIR/09-pre-libtool.txt 2>&1 |
| 3460 |
else |
| 3461 |
echo not building libtool: |
| 3462 |
fi |
| 3463 |
|
| 3464 |
|
| 3465 |
if test -n "$build_readline" ; then |
| 3466 |
echo BUILDING readline: |
| 3467 |
readline_version=5.0-1 |
| 3468 |
${WGET} http://downloads.sourceforge.net/gnuwin32/readline-$readline_version-bin.zip |
| 3469 |
${WGET} http://downloads.sourceforge.net/gnuwin32/readline-$readline_version-lib.zip |
| 3470 |
( |
| 3471 |
cd $install_top_dir |
| 3472 |
date |
| 3473 |
pwd |
| 3474 |
7z x -y ${AUTOBUILD_SOURCES}/readline-$readline_version-bin.zip |
| 3475 |
7z x -y ${AUTOBUILD_SOURCES}/readline-$readline_version-lib.zip |
| 3476 |
cd - |
| 3477 |
) > $HOSTLOGDIR/10-pre-readline.txt 2>&1 |
| 3478 |
else |
| 3479 |
echo not building readline: |
| 3480 |
fi |
| 3481 |
|
| 3482 |
if test -n "$build_guile" ; then |
| 3483 |
echo BUILDING guile: |
| 3484 |
# |
| 3485 |
guile_version=1.8.3 |
| 3486 |
#guile_version=1.8.8 |
| 3487 |
# not yet... |
| 3488 |
# lets try... |
| 3489 |
${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/guile/guile-${guile_version}.tar.gz |
| 3490 |
# ${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/guile-${guile_version}.patch |
| 3491 |
${WGET} $win_extras_place/guile-${guile_version}.patch |
| 3492 |
|
| 3493 |
cd $build_dir |
| 3494 |
( |
| 3495 |
date |
| 3496 |
pwd |
| 3497 |
gzip -dc ${AUTOBUILD_SOURCES}/guile-${guile_version}.tar.gz | tar xf - |
| 3498 |
cd guile-${guile_version} |
| 3499 |
# we need to pass CFLAGS and LDFLAGS because there is no --with-readline-prefix# arg to guile's configure |
| 3500 |
# Werror flags is needed for gcc compiler >= 4.6 |
| 3501 |
# Need a patch? |
| 3502 |
patch -p0 < ${AUTOBUILD_SOURCES}/guile-${guile_version}.patch |
| 3503 |
# make sure no pthread around?! FIXME |
| 3504 |
# dont use these flags as old compiler doesnt like it |
| 3505 |
# CFLAGS="-I$install_top_dir/include -O -Wno-error=unused-but-set-variable -Wno-error=unused-function" \ |
| 3506 |
./configure $generic_prefix \ |
| 3507 |
CFLAGS="-I$install_top_dir/include -O" \ |
| 3508 |
LDFLAGS=-L$install_top_dir/lib --with-libintl-prefix=$install_top_dir |
| 3509 |
# --without-threads --host=i686-pc-mingw32 --disable-shared |
| 3510 |
# Multilib fix for procedures.txt |
| 3511 |
# dont think we need this |
| 3512 |
# perl -pi -e 's|threads.doc||' `find . -name Makefile` |
| 3513 |
$MAKE |
| 3514 |
status=$? |
| 3515 |
if [ "$status" != 0 ] ; then |
| 3516 |
echo guile make failed. |
| 3517 |
guile_build_status=$status |
| 3518 |
else |
| 3519 |
echo 1 --------------------------------------------------------------------- echo ' ' make install |
| 3520 |
echo 1 --------------------------------------------------------------------- |
| 3521 |
$MAKE install |
| 3522 |
|
| 3523 |
# post install windows fixes/moving of ddls (probably should make it more flexible |
| 3524 |
# with respect to file name ending...) |
| 3525 |
cp $install_top_dir/bin/libguile-srfi-srfi-1-v-3-3.dll $install_top_dir/bin/libguile-srfi-srfi-1-v-3.dll |
| 3526 |
cp $install_top_dir/bin/libguile-srfi-srfi-13-14-v-3-3.dll $install_top_dir/bin/libguile-srfi-srfi-13-14-v-3.dll |
| 3527 |
cp $install_top_dir/bin/libguile-srfi-srfi-4-v-3-3.dll $install_top_dir/bin/libguile-srfi-srfi-4-v-3.dll |
| 3528 |
cp $install_top_dir/bin/libguile-srfi-srfi-60-v-2-2.dll $install_top_dir/bin/libguile-srfi-srfi-60-v-2.dll |
| 3529 |
cp $install_top_dir/bin/libguilereadline-v-17-17.dll $install_top_dir/bin/libguilereadline-v-17.dll |
| 3530 |
fi |
| 3531 |
|
| 3532 |
exit $status |
| 3533 |
) > $HOSTLOGDIR/11-guile.txt 2>&1 |
| 3534 |
if $status ; then |
| 3535 |
echo guile build failed |
| 3536 |
fi |
| 3537 |
else |
| 3538 |
echo not building guile: |
| 3539 |
fi |
| 3540 |
|
| 3541 |
# Do we need to have to set GUILE_LOAD_PATH? Maybe!!! |
| 3542 |
GUILE_LOAD_PATH=$install_top_dir/share/guile/1.8:$install_top_dir/share/guile:$install_top_dir/share/guile/site |
| 3543 |
export GUILE_LOAD_PATH |
| 3544 |
echo GUILE_LOAD_PATH is now: $GUILE_LOAD_PATH |
| 3545 |
|
| 3546 |
|
| 3547 |
# we wont build greg as it wont work properly anyway!! |
| 3548 |
build_greg= |
| 3549 |
if test -n "$build_greg" ; then |
| 3550 |
echo building greg: |
| 3551 |
${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/greg-2.0.0-pe.tar.gz |
| 3552 |
( |
| 3553 |
date |
| 3554 |
gzip -dc ${AUTOBUILD_SOURCES}/greg-2.0.0-pe.tar.gz | tar xf - |
| 3555 |
cd greg-2.0.0-pe |
| 3556 |
./configure $generic_prefix |
| 3557 |
$MAKE |
| 3558 |
$MAKE install |
| 3559 |
) > $HOSTLOGDIR/11c-greg.txt 2>&1 |
| 3560 |
else |
| 3561 |
echo not building greg: |
| 3562 |
fi |
| 3563 |
|
| 3564 |
|
| 3565 |
if test -n "$build_guile_gtk" ; then |
| 3566 |
echo BUILDING guile-gtk: |
| 3567 |
# |
| 3568 |
guile_gtk_version=2.1 |
| 3569 |
${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/guile-gtk/guile-gtk-$guile_gtk_version.tar.gz |
| 3570 |
#${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/guile-gtk-win32.patch |
| 3571 |
${WGET} $win_extras_place/guile-gtk-win32.patch |
| 3572 |
( |
| 3573 |
date |
| 3574 |
pwd |
| 3575 |
gzip -dc ${AUTOBUILD_SOURCES}/guile-gtk-$guile_gtk_version.tar.gz | tar xf - |
| 3576 |
cd guile-gtk-$guile_gtk_version |
| 3577 |
./configure $generic_prefix --without-gtkgl --with-glade=no --disable-static --enable-shared |
| 3578 |
# PATCH!!!!!! |
| 3579 |
patch -bp0 < ${AUTOBUILD_SOURCES}/guile-gtk-win32.patch |
| 3580 |
# now patch the libtool if needed: |
| 3581 |
# fix ulong if needed: |
| 3582 |
# sed 's/(ulong)/(unsigned long)/g' guile-gtk.c > tmp.c |
| 3583 |
# mv tmp.c guile-gtk.c |
| 3584 |
$MAKE |
| 3585 |
status=$? |
| 3586 |
guile_gtk_status=$status |
| 3587 |
if [ "$guile_gtk_status" != 0 ] ; then |
| 3588 |
echo Oooops guile-gtk make failed |
| 3589 |
else |
| 3590 |
echo 1 ------------------------------------------------------------------------- |
| 3591 |
echo ' ' make install |
| 3592 |
echo 1 ------------------------------------------------------------------------- |
| 3593 |
$MAKE install |
| 3594 |
fi |
| 3595 |
) > $HOSTLOGDIR/12-guile-gtk.txt 2>&1 |
| 3596 |
else |
| 3597 |
echo not building guile-gtk: |
| 3598 |
fi |
| 3599 |
|
| 3600 |
if test -n "$build_guile_gui" ; then |
| 3601 |
echo BUILDING guile-gui: |
| 3602 |
# |
| 3603 |
guile_gui_version=0.3 |
| 3604 |
#${WGET} http://www.ysbl.york.ac.uk/~emsley/software/extras/guile-gui-0.2.tar.gz |
| 3605 |
#${WGET} http://lmb.bioch.ox.ac.uk/coot/extras/guile-gui-${guile_gui_version}.tar.gz |
| 3606 |
${WGET} $extras_place/guile-gui-0.3.tar.gz |
| 3607 |
#${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/guile-gui-0.2.patch |
| 3608 |
( |
| 3609 |
date |
| 3610 |
pwd |
| 3611 |
gzip -dc ${AUTOBUILD_SOURCES}/guile-gui-${guile_gui_version}.tar.gz | tar xf - |
| 3612 |
#patch -bp0 < ${AUTOBUILD_SOURCES}/guile-gui-0.2.patch |
| 3613 |
cd guile-gui-${guile_gui_version} |
| 3614 |
./configure $generic_prefix |
| 3615 |
$MAKE |
| 3616 |
$MAKE install |
| 3617 |
) > $HOSTLOGDIR/13-guile-gui.txt 2>&1 |
| 3618 |
|
| 3619 |
else |
| 3620 |
echo not building guile-gui: |
| 3621 |
fi |
| 3622 |
|
| 3623 |
echo GUILE_LOAD_PATH is now: $GUILE_LOAD_PATH |
| 3624 |
|
| 3625 |
if test -n "$build_guile_lib" ; then |
| 3626 |
echo BUILDING guile-lib: |
| 3627 |
# |
| 3628 |
guile_lib_version=0.1.6 |
| 3629 |
${WGET} http://download.gna.org/guile-lib/guile-lib-$guile_lib_version.tar.gz |
| 3630 |
( |
| 3631 |
date |
| 3632 |
pwd |
| 3633 |
gzip -dc ${AUTOBUILD_SOURCES}/guile-lib-$guile_lib_version.tar.gz | tar xf - |
| 3634 |
cd guile-lib-$guile_lib_version |
| 3635 |
# the prefix for guile-lib must be the prefix of guile, or else the sxml and |
| 3636 |
# other library files will not be found |
| 3637 |
./configure $generic_prefix |
| 3638 |
$MAKE |
| 3639 |
$MAKE install |
| 3640 |
) > $HOSTLOGDIR/14-guile-lib.txt 2>&1 |
| 3641 |
else |
| 3642 |
echo not building guile-lib |
| 3643 |
fi |
| 3644 |
|
| 3645 |
|
| 3646 |
else |
| 3647 |
echo not building GUILE things |
| 3648 |
fi |
| 3649 |
|
| 3650 |
|
| 3651 |
if test -n "$build_curl" ; then |
| 3652 |
# we build libidn for libcurl (dont bother wiht winidn in case there are conflicts |
| 3653 |
# dont do a separate check, if we want curl, then we get libidn |
| 3654 |
# get libcurl from here: |
| 3655 |
echo BUILDING libidn: |
| 3656 |
( |
| 3657 |
libidn_version=1.15 |
| 3658 |
${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libidn/libidn-$libidn_version.tar.gz |
| 3659 |
|
| 3660 |
gzip -dc ${AUTOBUILD_SOURCES}/libidn-$libidn_version.tar.gz | tar xf - |
| 3661 |
cd libidn-$libidn_version |
| 3662 |
|
| 3663 |
./configure $generic_prefix |
| 3664 |
if $MAKE ; then |
| 3665 |
$MAKE install |
| 3666 |
fi |
| 3667 |
) > $HOSTLOGDIR/15-a-libidn.txt |
| 3668 |
|
| 3669 |
echo BUILDING curl: |
| 3670 |
( |
| 3671 |
# get libcurl from here: |
| 3672 |
#libcurl_version=7.19.7 |
| 3673 |
# libcurl_version=7.27.0 |
| 3674 |
libcurl_version=7.37.0 |
| 3675 |
${WGET} --no-check-certificate http://curl.haxx.se/download/curl-$libcurl_version.tar.gz |
| 3676 |
|
| 3677 |
gzip -dc ${AUTOBUILD_SOURCES}/curl-$libcurl_version.tar.gz | tar xf - |
| 3678 |
cd curl-$libcurl_version |
| 3679 |
|
| 3680 |
# libcurl has problems with putting the libraries ine right order when we specify |
| 3681 |
# --with-libidn (it puts the libidn prefix libs at the end of its LDFLAGS and that |
| 3682 |
# is bad because /usr/lib gets in front, and /usr/lib/libidn.so is missing). So here |
| 3683 |
# we force the libidn libs at the front of LDFLAGS. Problem found on RHEL4-64bit |
| 3684 |
# (lemur). |
| 3685 |
# |
| 3686 |
./configure $generic_prefix --with-libidn=$install_top_dir LDFLAGS=-L$install_top_dir/lib |
| 3687 |
if $MAKE ; then |
| 3688 |
$MAKE install |
| 3689 |
fi |
| 3690 |
) > $HOSTLOGDIR/15-b-curl.txt |
| 3691 |
else |
| 3692 |
echo not building curl: |
| 3693 |
fi |
| 3694 |
|
| 3695 |
|
| 3696 |
if test -n "$build_gsl" ; then |
| 3697 |
echo BUILDING gsl: |
| 3698 |
# |
| 3699 |
gsl_version=1.8 |
| 3700 |
# not yet |
| 3701 |
# gsl_version=1.12 |
| 3702 |
# lets try 2.2.1 binaries shared for both! |
| 3703 |
gsl_version=2.2.1 |
| 3704 |
#if [ -n "$shared_flag" ] ; then |
| 3705 |
# gsl_version=1.16 |
| 3706 |
# ${WGET} http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsl/gsl-$gsl_version.tar.gz |
| 3707 |
#else |
| 3708 |
# ${WGET} http://downloads.sourceforge.net/gnuwin32/gsl-$gsl_version-bin.zip |
| 3709 |
# ${WGET} http://downloads.sourceforge.net/gnuwin32/gsl-$gsl_version-lib.zip |
| 3710 |
# ${WGET} $win_extras_place/gsl-config |
| 3711 |
# ${WGET} $win_extras_place/gsl.m4 |
| 3712 |
${WGETS} http://sourceforge.net/projects/gnu-scientific-library-windows/files/gsl-2.2.1_mingw-6.2.0.zip |
| 3713 |
#fi |
| 3714 |
|
| 3715 |
( |
| 3716 |
date |
| 3717 |
pwd |
| 3718 |
if [ 0 == 1 ] ; then |
| 3719 |
gzip -dc ${AUTOBUILD_SOURCES}/gsl-$gsl_version.tar.gz | tar xf - |
| 3720 |
cd gsl-$gsl_version |
| 3721 |
./configure $generic_prefix $shared_static_flag |
| 3722 |
$MAKE |
| 3723 |
status=$? |
| 3724 |
if [ "$status" != 0 ] ; then |
| 3725 |
echo ERROR:: GSL make failed. |
| 3726 |
exit 2 |
| 3727 |
else |
| 3728 |
echo 1 --------------------------------------------------------------- |
| 3729 |
echo ' ' make install |
| 3730 |
echo 1 ---------------------------------------------------------------- |
| 3731 |
$MAKE install |
| 3732 |
fi |
| 3733 |
else |
| 3734 |
cd $install_top_dir |
| 3735 |
#7z x -y ${AUTOBUILD_SOURCES}/gsl-$gsl_version-bin.zip |
| 3736 |
#7z x -y ${AUTOBUILD_SOURCES}/gsl-$gsl_version-lib.zip |
| 3737 |
# gsl binaries dont have gsl-config, so we have to make our own |
| 3738 |
#cp ${AUTOBUILD_SOURCES}/gsl-config bin/ |
| 3739 |
#sed "s?^prefix=.*?prefix=$install_top_dir?" bin/gsl-config >gsl-config.tmp |
| 3740 |
#mv gsl-config.tmp bin/gsl-config |
| 3741 |
# somehow need to 'remove' the dll libs as these cause access violations |
| 3742 |
# i.e. use static linking |
| 3743 |
#mv lib/libgsl.dll.a lib/libgsl.dll.a.orig |
| 3744 |
#mv lib/libgslcblas.dll.a lib/libgslcblas.dll.a.orig |
| 3745 |
#status=$? |
| 3746 |
# and there is no gsl.m4, so copy that |
| 3747 |
#cp ${AUTOBUILD_SOURCES}/gsl.m4 $install_top_dir/share/aclocal/ |
| 3748 |
# END OLD |
| 3749 |
7z x -y ${AUTOBUILD_SOURCES}/gsl-2.2.1_mingw-6.2.0.zip -o${AUTOBUILD_SOURCES} gsl-2.2.1_mingw-6.2.0\\gsl-2.2.1-shared\\* |
| 3750 |
# now copy to install_top_dir |
| 3751 |
cp -r ${AUTOBUILD_SOURCES}/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-shared/* $install_top_dir/ |
| 3752 |
# now adjust the path for gsl-config and *la files |
| 3753 |
sed "s?/home/Mesh/gsl_mingw/package/gsl-2.2.1-shared?$install_top_dir?" bin/gsl-config >gsl-config.tmp |
| 3754 |
mv gsl-config.tmp bin/gsl-config |
| 3755 |
|
| 3756 |
sed "s?/home/Mesh/gsl_mingw/package/gsl-2.2.1-shared?$install_top_dir?" lib/libgsl.la >libgsl.la.tmp |
| 3757 |
mv libgsl.la.tmp lib/libgsl.la |
| 3758 |
|
| 3759 |
sed "s?/home/Mesh/gsl_mingw/package/gsl-2.2.1-shared?$install_top_dir?" lib/libgslcblas.la >libgslcblas.la.tmp |
| 3760 |
mv libgslcblas.la.tmp lib/libgslcblas.la |
| 3761 |
if [ "$status" != 0 ] ; then |
| 3762 |
echo ERROR:: GSL make failed. |
| 3763 |
exit 2 |
| 3764 |
else |
| 3765 |
echo 1 --------------------------------------------------------------- |
| 3766 |
echo ' ' make install |
| 3767 |
echo 1 ---------------------------------------------------------------- |
| 3768 |
fi |
| 3769 |
fi |
| 3770 |
) > $HOSTLOGDIR/15-gsl.txt |
| 3771 |
else |
| 3772 |
echo not building gsl: |
| 3773 |
fi |
| 3774 |
|
| 3775 |
################################################################# |
| 3776 |
# Clustalw2 |
| 3777 |
################################################################# |
| 3778 |
# |
| 3779 |
if test -e $install_top_dir/bin/clustalw2.exe ; then |
| 3780 |
echo not building clustalw2 |
| 3781 |
else |
| 3782 |
${WGET} http://www.clustal.org/download/current/clustalw-2.1-win.msi |
| 3783 |
if [ ! -e ${AUTOBUILD_SOURCES}/clustalw-2.1.msi ] ; then |
| 3784 |
echo failed to download clustalw2 |
| 3785 |
else |
| 3786 |
# happy path |
| 3787 |
( |
| 3788 |
mkdir clustalw-2.1 |
| 3789 |
cd clustalw-2.1/ |
| 3790 |
7z x ${AUTOBUILD_SOURCES}/clustalw-2.1.msi |
| 3791 |
cp clustalw2.exe $install_top_dir/bin |
| 3792 |
status=$? |
| 3793 |
if [ $status = 0 ] ; then |
| 3794 |
echo successfully unpacked and copied clustalw2.exe |
| 3795 |
else |
| 3796 |
echo install for clustalw-2.1 failed. Boo. |
| 3797 |
fi |
| 3798 |
) > $HOSTLOGDIR/18-clustalw.txt 2>&1 |
| 3799 |
fi |
| 3800 |
fi |
| 3801 |
|
| 3802 |
################################################################# |
| 3803 |
# Raster3D |
| 3804 |
################################################################# |
| 3805 |
# |
| 3806 |
|
| 3807 |
if [ -e $install_top_dir/bin/render ] ; then |
| 3808 |
echo not building Raster3D render |
| 3809 |
else |
| 3810 |
|
| 3811 |
raster3d_version=3.0-3 |
| 3812 |
# raster3d depends on libgd to make png images |
| 3813 |
${WGET} http://skuld.bmsc.washington.edu/raster3d/Raster3D_$raster3d_version.tar.gz |
| 3814 |
# not needed for render itself but lets build all |
| 3815 |
${WGET} $win_extras_place/raster3d_win64.patch |
| 3816 |
|
| 3817 |
if [ ! -e ${AUTOBUILD_SOURCES}/Raster3D_$raster3d_version.tar.gz ] ; then |
| 3818 |
|
| 3819 |
echo missing Raster3D tar file |
| 3820 |
|
| 3821 |
else |
| 3822 |
# need and get libgd from system |
| 3823 |
echo build render............... |
| 3824 |
( |
| 3825 |
date |
| 3826 |
pwd |
| 3827 |
# build render |
| 3828 |
# |
| 3829 |
if [ ! -e $install_top_dir/bin/render ] ; then |
| 3830 |
# now build it. |
| 3831 |
gzip -dc ${AUTOBUILD_SOURCES}/Raster3D_$raster3d_version.tar.gz | tar xf - |
| 3832 |
cd Raster3D_$raster3d_version |
| 3833 |
patch -p0 < ${AUTOBUILD_SOURCES}/raster3d_win64.patch |
| 3834 |
|
| 3835 |
make win64 # FIXME for Darwin |
| 3836 |
|
| 3837 |
echo about to do this: $MAKE |
| 3838 |
$MAKE |
| 3839 |
ls -l render |
| 3840 |
|
| 3841 |
status = $? |
| 3842 |
|
| 3843 |
if $status ; then |
| 3844 |
make prefix=$install_top_dir install |
| 3845 |
# did that work? I doubt it. Let's do it by hand |
| 3846 |
if [ ! -e $install_top_dir/bin/render ] ; then |
| 3847 |
echo Hand copy: cp render $install_top_dir/bin/ |
| 3848 |
cp render $install_top_dir/bin/ |
| 3849 |
fi |
| 3850 |
else |
| 3851 |
echo no render built in `pwd` |
| 3852 |
fi |
| 3853 |
cd - |
| 3854 |
else |
| 3855 |
echo $install_top_dir/bin/render already exists, no build |
| 3856 |
fi |
| 3857 |
) > $HOSTLOGDIR/15-raster3d.txt 2>&1 |
| 3858 |
fi |
| 3859 |
fi |
| 3860 |
|
| 3861 |
|
| 3862 |
####################### |
| 3863 |
#### build glob |
| 3864 |
###################### |
| 3865 |
if test -n "$build_glob" ; then |
| 3866 |
echo BUILDING glob: |
| 3867 |
${WGET} $win_extras_place/glob-1.0.tar.bz2 |
| 3868 |
( |
| 3869 |
date |
| 3870 |
pwd |
| 3871 |
bzip2 -cd ${AUTOBULD_SOURCES}/glob-1.0.tar.bz2 | tar xf - |
| 3872 |
cd glob-1.0 |
| 3873 |
./configure $generic_prefix |
| 3874 |
make |
| 3875 |
cp glob.h $install_top_dir/include |
| 3876 |
cp libglob.a $install_top_dir/lib |
| 3877 |
if [ $build_shared = 1 ] ; then |
| 3878 |
g++ -shared -o libglob.dll glob.o fnmatch.o -Wl,--out-implib,libglob.dll.a |
| 3879 |
cp libglob.dll $install_top_dir/bin |
| 3880 |
cp libglob.dll.a $install_top_dir/lib |
| 3881 |
fi |
| 3882 |
cd - |
| 3883 |
) > $HOSTLOGDIR/23-glob.log |
| 3884 |
else |
| 3885 |
echo not building glob |
| 3886 |
fi |
| 3887 |
|
| 3888 |
############################################################################### |
| 3889 |
########## get Coot ############# |
| 3890 |
############################################################################### |
| 3891 |
# |
| 3892 |
echo BUILDING coot: version $coot_version, python=$ENABLE_PYTHON_COOT guile=$ENABLE_GUILE_COOT |
| 3893 |
wincoot_version=${coot_version/coot-} |
| 3894 |
if [ "$build_coot_prerelease" != 1 ] ; then |
| 3895 |
# normal release coot |
| 3896 |
${WGET} $release_server_dir/$coot_version.tar.gz |
| 3897 |
if [ ! $? = 0 ] ; then |
| 3898 |
echo failed to wget $release_server_dir/$coot_version.tar.gz |
| 3899 |
my_exit 2 wget-fail-coot-source |
| 3900 |
fi |
| 3901 |
# ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/coot-static.patch |
| 3902 |
else |
| 3903 |
# If we are building pre-release coot_source_tar_file is set only if we can find |
| 3904 |
# a pre-release source tar in the pre-release directory, otherwise it is not set |
| 3905 |
if [ -n "$coot_source_tar_file" ] ; then |
| 3906 |
${WGET} $coot_source_tar_file |
| 3907 |
if [ ! $? = 0 ] ; then |
| 3908 |
echo failed to wget $coot_source_tar_file |
| 3909 |
my_exit 2 wget-fail-coot-source |
| 3910 |
fi |
| 3911 |
else |
| 3912 |
# compile release code then: |
| 3913 |
${WGET} $release_server_dir/$coot_version.tar.gz |
| 3914 |
if [ ! $? = 0 ] ; then |
| 3915 |
echo failed to wget $release_server_dir/$coot_version.tar.gz |
| 3916 |
my_exit 2 wget-fail-coot-source |
| 3917 |
fi |
| 3918 |
fi |
| 3919 |
coot_revision=`echo $coot_version | awk '{a=$1; i=index(a,"revision"); print substr(a,i)}'` |
| 3920 |
echo coot_version set to $coot_version |
| 3921 |
echo coot_revision set to $coot_revision |
| 3922 |
# ${WGET} http://www.ysbl.york.ac.uk/~emsley/software/coot-static.patch |
| 3923 |
fi |
| 3924 |
|
| 3925 |
# we shall get the syminfo.lib for windows too |
| 3926 |
# not needed any more |
| 3927 |
#${WGET} http://www.ysbl.york.ac.uk/~lohkamp/software/extras/syminfo_win.lib |
| 3928 |
|
| 3929 |
echo using coot version $coot_version |
| 3930 |
ls -ls ${AUTOBUILD_SOURCES}/$coot_version.tar.gz |
| 3931 |
if [ -e ${AUTOBUILD_SOURCES}/$coot_version.tar.gz ] ; then |
| 3932 |
echo good ${AUTOBUILD_SOURCES}/$coot_version.tar.gz exists |
| 3933 |
else |
| 3934 |
echo badness ${AUTOBUILD_SOURCES}/$coot_version.tar.gz does not exist. |
| 3935 |
echo nothing left to do then. Goodbye. |
| 3936 |
my_exit 2 $coot_version.tar.gz not found |
| 3937 |
fi |
| 3938 |
# we have to go to build dir |
| 3939 |
cd $build_dir |
| 3940 |
date |
| 3941 |
pwd |
| 3942 |
gzip -dc ${AUTOBUILD_SOURCES}/$coot_version.tar.gz | tar xf - |
| 3943 |
coot_dir_name=`echo $coot_version | sed 's/-revision.*//'` |
| 3944 |
cd $coot_dir_name |
| 3945 |
|
| 3946 |
# now that we are in coot build dir we overwrite syminfo.lib with the windows |
| 3947 |
# one |
| 3948 |
# Change: replace it with internal one. Cant have 'wrong' one in root dir |
| 3949 |
echo replacing syminfo.lib with windows version |
| 3950 |
mv syminfo.lib syminfo.lib.orig |
| 3951 |
cp windows/syminfo.lib syminfo.lib |
| 3952 |
# get windows cootrc |
| 3953 |
#wget -N -P ${HOME}/autobuild/extras http://www.ysbl.york.ac.uk/~lohkamp/software/extras/cootrc |
| 3954 |
wget -N -P ${HOME}/autobuild/extras $win_extras_place/cootrc |
| 3955 |
|
| 3956 |
if test -n "$glib_installed" ; then |
| 3957 |
coot_extra_args="$coot_extra_args --with-glib-prefix=$install_top_dir" |
| 3958 |
fi |
| 3959 |
if test -n "$gtk_installed" ; then |
| 3960 |
coot_extra_args="$coot_extra_args --with-gtk-prefix=$install_top_dir" |
| 3961 |
fi |
| 3962 |
|
| 3963 |
if [ "$ENABLE_GUILE_COOT" = "yes" ] ; then |
| 3964 |
guile_scripting="--with-guile --with-guile-gtk --with-guile-gtk-prefix=$install_top_dir" |
| 3965 |
fi |
| 3966 |
|
| 3967 |
# if ENABLE_PYTHON_COOT is not set, then we choose a day of the week |
| 3968 |
# to build a python version. |
| 3969 |
|
| 3970 |
# if ENABLE_PYTHON_COOT is set, then if it is set to 0 or no then we |
| 3971 |
# do not build a python version, otherwise we do build a python |
| 3972 |
# version |
| 3973 |
|
| 3974 |
if [ -n "$ENABLE_PYTHON_COOT" ] ; then |
| 3975 |
# it was set to something |
| 3976 |
if [ "$ENABLE_PYTHON_COOT" != "0" ] ; then |
| 3977 |
if [ "$ENABLE_PYTHON_COOT" != "no" ] ; then |
| 3978 |
python_scripting='--with-python --with-pygtk' |
| 3979 |
fi |
| 3980 |
fi |
| 3981 |
else |
| 3982 |
# if ENABLE_PYTHON_COOT was not set, then turn on python scripting |
| 3983 |
python_scripting='--with-python --with-pygtk' |
| 3984 |
fi |
| 3985 |
|
| 3986 |
# no longer makes sense now that python is in by default |
| 3987 |
# else |
| 3988 |
# time_date=`date` |
| 3989 |
# if [ ${time_date:0:3} = "Sun" ] ; then |
| 3990 |
# scripting='--with-python' |
| 3991 |
# fi |
| 3992 |
# if [ ${time_date:0:3} = "Sun" ] ; then |
| 3993 |
# scripting='--with-python' |
| 3994 |
# fi |
| 3995 |
# fi |
| 3996 |
|
| 3997 |
|
| 3998 |
|
| 3999 |
|
| 4000 |
############################################################################### |
| 4001 |
########## build Coot ############# |
| 4002 |
############################################################################### |
| 4003 |
# |
| 4004 |
echo BUILDING coot: version $coot_version, python=$ENABLE_PYTHON_COOT guile=$ENABLE_GUILE_COOT |
| 4005 |
|
| 4006 |
# set the python tag outside the compile/install sub-shell. |
| 4007 |
if [ "$ENABLE_PYTHON_COOT" = "no" ] ; then |
| 4008 |
python_tag= |
| 4009 |
else |
| 4010 |
python_tag=-python |
| 4011 |
fi |
| 4012 |
( |
| 4013 |
date |
| 4014 |
|
| 4015 |
#if [ "$ENABLE_PYTHON_COOT" = "no" ] ; then |
| 4016 |
# echo INFO:: not a pythonized build |
| 4017 |
# cp src/blank.cc src/coot_wrap_python_gkt1.cc |
| 4018 |
# cp src/blank.cc src/coot_wrap_python_gkt2.cc |
| 4019 |
# # only gtk2 on windows |
| 4020 |
# cp src/blank.cc src/coot_wrap_guile_gtk1.cc |
| 4021 |
#else |
| 4022 |
# echo INFO:: A pythonized build |
| 4023 |
#fi |
| 4024 |
|
| 4025 |
#if [ "$ENABLE_GUILE_COOT" = "no" ] ; then |
| 4026 |
# echo INFO:: not a guilized build |
| 4027 |
# cp src/blank.cc src/coot_wrap_guile_gtk1.cc |
| 4028 |
# cp src/blank.cc src/coot_wrap_guile_gtk2.cc |
| 4029 |
# # only gtk2 on windows |
| 4030 |
# cp src/blank.cc src/coot_wrap_python_gkt1.cc |
| 4031 |
#else |
| 4032 |
# echo INFO:: A guilized build |
| 4033 |
#fi |
| 4034 |
# |
| 4035 |
# CXXFLAGS="-g -O" |
| 4036 |
# consider getting rid of $shared_static_flag, which does a --disable-shared. |
| 4037 |
# i.e. we should keep and use shared libs |
| 4038 |
# |
| 4039 |
# dont use -static-libgcc on windows otherwise we cannot throw exceptions. |
| 4040 |
# means we need to supply libgcc_s_dw2-1.dll |
| 4041 |
if [ $build_shared = 1 ] ; then |
| 4042 |
export CXXFLAGS="-g -O" |
| 4043 |
else |
| 4044 |
export CXXFLAGS="-g -O -static-libstdc++" |
| 4045 |
fi |
| 4046 |
|
| 4047 |
# for boost and rdkit: |
| 4048 |
if [ $build_enhanced_ligand = 1 ] ; then |
| 4049 |
coot_extra_args+=" --with-enhanced-ligand-tools --with-boost=${install_top_dir} --with-boost-python=yes" |
| 4050 |
# I think we have to export this otherwise there is some configure issue |
| 4051 |
export RDKIT_CXXFLAGS="-I${install_top_dir}/include/rdkit" |
| 4052 |
export RDKIT_LIBS="-L${install_top_dir}/lib -lRDKitDescriptors -lRDKitSubgraphs -lRDKitPartialCharges -lRDKitForceFieldHelpers -lRDKitForceField -lRDKitMolChemicalFeatures -lRDKitSubstructMatch -lRDKitOptimizer -lRDKitDepictor -lRDKitFileParsers -lRDKitRDGeometryLib -lRDKitGraphMol -lRDKitSmilesParse -lRDKitDistGeomHelpers -lRDKitDataStructs -lRDKitRDGeneral" |
| 4053 |
fi |
| 4054 |
|
| 4055 |
if [ $architecture = x86_64 ] ; then |
| 4056 |
# This could well be too general a test, certainly on 64 bit CentOS 5 we need this, |
| 4057 |
# and possibly on 64 bit Gutsy. |
| 4058 |
|
| 4059 |
# There is a problem quoting this, e.g. |
| 4060 |
# coot_optim_args="CXXFLAGS='\"-g -O\"'" fails in configure |
| 4061 |
#coot_optim_args="CXXFLAGS=-gO" |
| 4062 |
#coot_optim_args="CXXFLAGS=\"-g -O\"" |
| 4063 |
export CXXFLAGS="-g -O" |
| 4064 |
fi |
| 4065 |
|
| 4066 |
# This is not working, need a better way (if any) |
| 4067 |
# cbis_n=$(cmd /c "net user $USERNAME | FIND 'Full Name'") |
| 4068 |
cbis_n= |
| 4069 |
if [ -z $cbis_n ] ; then |
| 4070 |
cbis_n=$USERNAME |
| 4071 |
fi |
| 4072 |
cbis_d=$(date +'%a %d %b %H%M.%S %Z %Y') |
| 4073 |
coot_build_info_string="built by: $cbis_n build-host: $HOST on: $cbis_d" |
| 4074 |
|
| 4075 |
# this is a quick fix, and should be done properly at some point |
| 4076 |
coot_optim_args="-build=i686-pc-mingw32 --with-glob-prefix=${install_top_dir}" |
| 4077 |
|
| 4078 |
# should rm libtool to make sure we use OS one |
| 4079 |
if [ -e libtool ] ; then |
| 4080 |
echo rm libtool for clean build |
| 4081 |
rm libtool |
| 4082 |
fi |
| 4083 |
|
| 4084 |
# quick hack for large maps |
| 4085 |
export LDFLAGS="-Wl,--large-address-aware" |
| 4086 |
|
| 4087 |
echo From tar file: ${AUTOBUILD_SOURCES}/$coot_version.tar.gz |
| 4088 |
echo building in: $PWD |
| 4089 |
echo ./configure $coot_prefix \ |
| 4090 |
--with-fftw-prefix=$install_top_dir \ |
| 4091 |
$goocanvas_args \ |
| 4092 |
$glut_prefix \ |
| 4093 |
COOT_BUILD_INFO_STRING="$coot_build_info_string" \ |
| 4094 |
$guile_scripting \ |
| 4095 |
$python_scripting \ |
| 4096 |
$shared_static_flag \ |
| 4097 |
$coot_optim_args \ |
| 4098 |
$coot_extra_args |
| 4099 |
|
| 4100 |
./configure $coot_prefix \ |
| 4101 |
--with-fftw-prefix=$install_top_dir \ |
| 4102 |
$goocanvas_args \ |
| 4103 |
$glut_prefix \ |
| 4104 |
COOT_BUILD_INFO_STRING="$coot_build_info_string" \ |
| 4105 |
$guile_scripting \ |
| 4106 |
$python_scripting \ |
| 4107 |
$shared_static_flag \ |
| 4108 |
$coot_optim_args \ |
| 4109 |
$coot_extra_args |
| 4110 |
|
| 4111 |
# consider adding -DCOOT_SYS_TYPE=systype (or something like that) |
| 4112 |
# here, so that coot --version-info/full returns it. |
| 4113 |
|
| 4114 |
if [ $update_libtool = 1 ] ; then |
| 4115 |
echo need to update libtool here $PWD |
| 4116 |
cp $install_top_dir/bin/libtool . |
| 4117 |
else |
| 4118 |
echo NO need to update libtool $PWD |
| 4119 |
fi |
| 4120 |
|
| 4121 |
#rm src/coot_wrap_guile_pre_gtk2.cc |
| 4122 |
#rm src/coot_wrap_python_pre_gtk2.cc |
| 4123 |
|
| 4124 |
# make a clean version?! |
| 4125 |
if [ "$make_clean_coot" = "yes" ] ; then |
| 4126 |
$MAKE clean |
| 4127 |
echo make clean |
| 4128 |
fi |
| 4129 |
|
| 4130 |
#$MAKE |
| 4131 |
MAKE=$MAKE" -r" |
| 4132 |
$MAKE |
| 4133 |
|
| 4134 |
status=$? |
| 4135 |
if [ "$status" != 0 ] ; then |
| 4136 |
echo make failed. |
| 4137 |
bad_coot_make=1 |
| 4138 |
exit 2 |
| 4139 |
else |
| 4140 |
echo 1 --------------------------------------------------------------- |
| 4141 |
echo ' ' make install |
| 4142 |
echo 1 ---------------------------------------------------------------- |
| 4143 |
$MAKE install-strip |
| 4144 |
# BL says/asks:: is this necessary? Shouldnt coot.py be copied in install |
| 4145 |
# anyway? And its the wrong place now!? remove! |
| 4146 |
#if [ "$python_scripting" = '--with-python' ] ; then |
| 4147 |
# echo copying src/coot.py $install_top_dir/share/coot/python |
| 4148 |
# cp src/coot.py $install_top_dir/share/coot/python |
| 4149 |
#fi |
| 4150 |
fi |
| 4151 |
) > $HOSTLOGDIR/16-coot.txt 2>&1 |
| 4152 |
|
| 4153 |
# --with-gsl-prefix=$install_top_dir \ |
| 4154 |
# --with-glib-prefix=$install_top_dir \ |
| 4155 |
# --with-gtk-prefix=$install_top_dir \ |
| 4156 |
# --with-gtkgl-prefix=$install_top_dir \ |
| 4157 |
|
| 4158 |
coot_build_status=$? |
| 4159 |
if [ $coot_build_status != 0 ] ; then |
| 4160 |
echo coot build failed, exiting. |
| 4161 |
echo fail-build $coot_revision > $LOGS/gtk2${build_type}-build-status |
| 4162 |
my_exit 2 $coot_revision |
| 4163 |
else |
| 4164 |
# and finally write a coot-version file for the installer |
| 4165 |
echo '!define WinCootVersion "'${wincoot_version}'"' >$install_top_dir/coot-version |
| 4166 |
|
| 4167 |
echo coot build was good. |
| 4168 |
echo pass-build $coot_revision > $LOGS/gtk2${build_type}-build-status |
| 4169 |
fi |
| 4170 |
echo done coot build. |
| 4171 |
|
| 4172 |
|
| 4173 |
# now, do we need to add the extra data files, the refmac monomer |
| 4174 |
# library and the reference structures? |
| 4175 |
|
| 4176 |
# 8/5/11 change to Garib's new dicionary. |
| 4177 |
#refmac_mon_lib=refmac-monomer-library-20090929.tar.gz |
| 4178 |
# mon_lib_dir=http://www.ysbl.york.ac.uk/~garib/refmac/data/refmac_experimental |
| 4179 |
# mon_lib_dir=http://www2.mrc-lmb.cam.ac.uk/groups/murshudov/content/refmac/Dictionary |
| 4180 |
#refmac_mon_lib=refmac_dictionary_v5.41.tar.gz |
| 4181 |
|
| 4182 |
# new style |
| 4183 |
mon_lib_dir=http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/dependencies |
| 4184 |
refmac_mon_lib=refmac-monomer-library.tar.gz |
| 4185 |
|
| 4186 |
if [ -e $install_top_dir/share/coot/lib/data/monomers ] ; then |
| 4187 |
echo INFO:: installation has refmac monomer library |
| 4188 |
else |
| 4189 |
echo INSTALLING refmac monomer library... |
| 4190 |
$WGET $mon_lib_dir/$refmac_mon_lib |
| 4191 |
mkdir -p $install_top_dir/share/coot/lib/data |
| 4192 |
tar xzCf $install_top_dir/share/coot/lib/data $AUTOBUILD_SOURCES/$refmac_mon_lib |
| 4193 |
fi |
| 4194 |
if [ -e $install_top_dir/share/coot/reference-structures ] ; then |
| 4195 |
echo INFO:: installation has reference structures |
| 4196 |
else |
| 4197 |
echo GETTING reference structures tar... |
| 4198 |
echo GETTING reference structures tar... &>2 |
| 4199 |
${WGET} $extras_place/reference-structures.tar.gz |
| 4200 |
if [ -e $AUTOBUILD_SOURCES/reference-structures.tar.gz ] ; then |
| 4201 |
echo INSTALLING reference structures... |
| 4202 |
tar xzCf $install_top_dir/share/coot $AUTOBUILD_SOURCES/reference-structures.tar.gz |
| 4203 |
else |
| 4204 |
echo FAIL wget for reference-structures.tar.gz failed. |
| 4205 |
fi |
| 4206 |
fi |
| 4207 |
|
| 4208 |
# clear up the library dependencies |
| 4209 |
# not needed on windows as I fix this with the installer... |
| 4210 |
|
| 4211 |
#clear_up_type= |
| 4212 |
#if [ $shared_static_flag != "--disable-static" ] ; then |
| 4213 |
# clear_up_type=clear-static |
| 4214 |
#fi |
| 4215 |
#if [ $shared_static_flag != "--disable-shared" ] ; then |
| 4216 |
# clear_up_type=clear-dynamic |
| 4217 |
#fi |
| 4218 |
# |
| 4219 |
#if [ $clear_up_type != "" ] ; then |
| 4220 |
# slim_dir=`dirname $install_top_dir`/coot-${OS}-${systype}-gtk2 |
| 4221 |
# post_install_slim $install_top_dir $slim_dir $clear_up_type |
| 4222 |
#fi |
| 4223 |
|
| 4224 |
# clean up old test status: |
| 4225 |
if [ -e $LOGS/gtk2${build_type}-test-status ] ; then |
| 4226 |
rm $LOGS/gtk2${build_type}-test-status |
| 4227 |
fi |
| 4228 |
# clean up old test logs (needed?!): |
| 4229 |
if [ -e $LOGS/gtk2${build_type}-test-status.log ] ; then |
| 4230 |
rm $LOGS/gtk2${build_type}-test-status.log |
| 4231 |
fi |
| 4232 |
# run tests |
| 4233 |
echo running tests... |
| 4234 |
|
| 4235 |
if test "$run_tests" = true ; then |
| 4236 |
# download the test data to make sure we have the latest version. |
| 4237 |
echo downloading test data... |
| 4238 |
${WGET} http://www2.mrc-lmb.cam.ac.uk/Personal/pemsley/coot/data/greg-data.tar.gz |
| 4239 |
echo " done." |
| 4240 |
cd ~/data |
| 4241 |
gzip -cd ${AUTOBUILD_SOURCES}/greg-data.tar.gz | tar xf - |
| 4242 |
cd - |
| 4243 |
fi |
| 4244 |
|
| 4245 |
test_coot_python > $LOGS/gtk2${build_type}-test.log 2>&1 |
| 4246 |
coot_test_status=$? |
| 4247 |
gtk2=-gtk2 |
| 4248 |
if [ $coot_test_status = 0 ] ; then |
| 4249 |
echo ======================== |
| 4250 |
echo ' ' coot test passed |
| 4251 |
echo ========----============ |
| 4252 |
echo pass-test > $LOGS/gtk2${build_type}-test-status |
| 4253 |
# no need for this! The installer and script around will take care of this |
| 4254 |
#if test "$do_nightlies" = "1" ; then |
| 4255 |
# if [ -d $BINARY_TAR_DEST_DIR ] ; then |
| 4256 |
|
| 4257 |
# original full fat: |
| 4258 |
# make_tar `basename $install_top_dir` $BINARY_TAR_DEST_DIR/${coot_version}-binary-full-${OS}-${systype}${python_tag}.tar.gz |
| 4259 |
# slimmed: |
| 4260 |
# make_tar `basename $slim_dir` $BINARY_TAR_DEST_DIR/${coot_version}-binary-${OS}-${systype}${python_tag}${gtk2}.tar.gz |
| 4261 |
|
| 4262 |
# update the ChangeLog, README and RELEASE-NOTES |
| 4263 |
# cd "$build_dir" |
| 4264 |
# cd $coot_dir_name |
| 4265 |
# cp ChangeLog $BINARY_TAR_DEST_DIR |
| 4266 |
# cp README $BINARY_TAR_DEST_DIR/coot-README |
| 4267 |
# cp RELEASE-NOTES $BINARY_TAR_DEST_DIR/${coot_version}-RELEASE-NOTES |
| 4268 |
# else |
| 4269 |
# echo directory for binaries does not exist. Skipping tar. |
| 4270 |
# fi |
| 4271 |
# else |
| 4272 |
# echo not doing tar files for nightlies: $do_nightlies |
| 4273 |
# fi |
| 4274 |
else |
| 4275 |
echo ======================== |
| 4276 |
echo ' ' coot test failed |
| 4277 |
echo ======================== |
| 4278 |
echo fail-test $coot_revision > $LOGS/gtk2${build_type}-test-status |
| 4279 |
fi |
| 4280 |
|
| 4281 |
# now copy the log files |
| 4282 |
cp -r ${LOGS} ${PUBLIC_HTML_LOGS} |
| 4283 |
echo copy the log files from ${LOGS} to ${PUBLIC_HTML_LOGS} |
| 4284 |
# we have to make sure they are readable! |
| 4285 |
# either change once manually or |
| 4286 |
# run in masta unix script |
| 4287 |
|
| 4288 |
# we set the binary type here and pass it to the installer script |
| 4289 |
# only if that works it shoudl be copied and updated on the website. |
| 4290 |
binary_type_latest=type-binary-${OS}-${systype}${python_tag}${gtk2}-latest.txt |
| 4291 |
|
| 4292 |
|
| 4293 |
# we write a number of variables to a file which we import in the |
| 4294 |
# masta script so that we preserve these |
| 4295 |
# first remove an the old file |
| 4296 |
var_file=${HOME}/wincoot-installer-variables |
| 4297 |
echo deleting $var_file |
| 4298 |
rm -f $var_file |
| 4299 |
echo LOGS=${LOGS} > $var_file |
| 4300 |
echo NIGHTLY_DEST_DIR=${NIGHTLY_DEST_DIR} >> $var_file |
| 4301 |
echo wincoot_version=$wincoot_version >> $var_file |
| 4302 |
echo build_coot_prerelease=$build_coot_prerelease >> $var_file |
| 4303 |
echo coot_build_status=$coot_build_status >> $var_file |
| 4304 |
echo coot_test_status=$coot_test_status >> $var_file |
| 4305 |
echo binary_type_latest=$binary_type_latest >> $var_file |
| 4306 |
echo HOSTLOG_STUB=$compilers_dir${build_type} >> $var_file |
| 4307 |
|
| 4308 |
echo finished. |