gnucash-on-windows master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Tue Oct 7 04:55:49 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/a5f58d1a (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/e4036f4a (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/64b88401 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/1333d13f (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/1b02f6c5 (commit)



commit a5f58d1a57be957ebcfe58c00e487d84eb2cc3da
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue Oct 7 12:20:25 2014 +0200

    Refine check whether to build boost or not

diff --git a/buildserver/build_tags.sh b/buildserver/build_tags.sh
index b86eef9..bb3c8b7 100644
--- a/buildserver/build_tags.sh
+++ b/buildserver/build_tags.sh
@@ -85,10 +85,7 @@ for tag_rev in $tags ; do
   tag=${tag%/*}
 
   # Git builds are only supported from 2.5 up
-  tag_major=${tag%%.*}
-  tag_tmp=${tag#*.}
-  tag_minor=${tag_tmp%%.*}
-  major_minor=$(( $tag_major*100 + $tag_minor ))
+  get_major_minor $tag
   if (( $major_minor < 205 ))
   then
      echo "Skipping build of tag $tag (reason: older than 2.5)"
diff --git a/functions.sh b/functions.sh
index 96c450a..c13ebc9 100644
--- a/functions.sh
+++ b/functions.sh
@@ -297,6 +297,21 @@ function mingw_smart_get () {
     fi
 }
 
+# Take a version number in the form M.m.µ-b
+# and return the major (M) and minor (m) component in numeric form
+# as follows: major*100 + minor
+# for example: 2.4.8-1 would yield 204
+# If the version entered is not a version in the expected format
+# 0 will be returned.
+function get_major_minor () {
+  local version=${1//[!0-9.-]/}
+
+  local -i version_major=${version%%.*}
+  local version_tmp=${version#*.}
+  local -i version_minor=${version_tmp%%.*}
+  major_minor=$(( $version_major*100 + $version_minor ))
+}
+
 ### Local Variables: ***
 ### mode: shell-script ***
 ### sh-basic-offset: 4 ***
diff --git a/install-impl.sh b/install-impl.sh
index 09faff2..942b90d 100644
--- a/install-impl.sh
+++ b/install-impl.sh
@@ -1235,11 +1235,6 @@ function inst_gnucash() {
     _REPOS_UDIR=`unix_path $REPOS_DIR`
     mkdir -p $_BUILD_UDIR
     add_to_env $_INSTALL_UDIR/bin PATH
-    if [ "$GNUCASH_SCM_REV" = "master" ]; then
-        _MASTER_OPTIONS="--with-boost=${BOOST_ROOT}"
-    else
-        _MASTER_OPTIONS=""
-    fi
 
     AQBANKING_OPTIONS="--enable-aqbanking"
     AQBANKING_UPATH="${_OPENSSL_UDIR}/bin:${_GWENHYWFAR_UDIR}/bin:${_AQBANKING_UDIR}/bin"
@@ -1251,6 +1246,14 @@ function inst_gnucash() {
         qpopd
     fi
 
+    # Check for options that may not be available in all versions we can build
+    _CONFIG_HELP=$($_REPOS_UDIR/configure --help)
+    if [ -n "$(grep -- '--with-boost' <<< $_CONFIG_HELP)" ]; then
+        _EXTRA_OPTIONS="--with-boost=${BOOST_ROOT}"
+    else
+        _EXTRA_OPTIONS=""
+    fi
+
     qpushd $_BUILD_UDIR
         $_REPOS_UDIR/configure ${HOST_XCOMPILE} \
             --prefix=$_INSTALL_WFSDIR \
@@ -1261,7 +1264,7 @@ function inst_gnucash() {
             ${AQBANKING_OPTIONS} \
             --enable-binreloc \
             --enable-locale-specific-tax \
-            ${_MASTER_OPTIONS} \
+            ${_EXTRA_OPTIONS} \
             CPPFLAGS="${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} ${LIBDBI_CPPFLAGS} ${KTOBLZCHECK_CPPFLAGS} ${HH_CPPFLAGS} ${LIBSOUP_CPPFLAGS} -D_WIN32 ${EXTRA_CFLAGS}" \
             LDFLAGS="${REGEX_LDFLAGS} ${GNOME_LDFLAGS} ${GUILE_LDFLAGS} ${LIBDBI_LDFLAGS} ${KTOBLZCHECK_LDFLAGS} ${HH_LDFLAGS} -L${_SQLITE3_UDIR}/lib -L${_ENCHANT_UDIR}/lib -L${_LIBXSLT_UDIR}/lib -L${_MINGW_UDIR}/lib" \
             PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
diff --git a/install.sh b/install.sh
index adab052..42e70dd 100644
--- a/install.sh
+++ b/install.sh
@@ -100,7 +100,9 @@ add_step inst_libsoup
 add_step inst_enchant
 add_step inst_webkit
 #boost now needed for C++ on master only
-if [ "$GNUCASH_SCM_REV" = "master" ]; then
+get_major_minor "$GNUCASH_SCM_REV"
+if [ "$GNUCASH_SCM_REV" = "master" ] ||
+   (( $major_minor > 206 )); then
   add_step inst_boost
 fi
 

commit e4036f4adef21f894d287b607dc8079de398bdc7
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue Oct 7 11:01:39 2014 +0200

    Buildserver: set GNUCASH_SCM_REV when building a tag
    
    The buildscripts use this variable to make build decisions.

diff --git a/buildserver/build_tags.sh b/buildserver/build_tags.sh
index a227b06..b86eef9 100644
--- a/buildserver/build_tags.sh
+++ b/buildserver/build_tags.sh
@@ -126,6 +126,9 @@ for tag_rev in $tags ; do
   echo -n "HH_DIR=" >> ${_TAG_WIN_REPOS_UDIR}/custom.sh
   echo "${GLOBAL_DIR}\\hh" | sed -e 's/\\/\\\\/g' >> ${_TAG_WIN_REPOS_UDIR}/custom.sh
 
+  # Inform the build scripts of the tag we're building.
+  echo "GNUCASH_SCM_REV=$tag" >> ${_TAG_WIN_REPOS_UDIR}/custom.sh
+
   # Now build the tag!  (this will upload it too)
   # Use the build_package script from master (cwd), not from the tag
   qpushd ${_TAG_WIN_REPOS_UDIR}

commit 64b884014fcadc02bf8271fd069147d67ef6da0a
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue Oct 7 10:58:57 2014 +0200

    Make the tag build preparation a little more verbose

diff --git a/buildserver/build_tags.sh b/buildserver/build_tags.sh
index 2609ec1..a227b06 100644
--- a/buildserver/build_tags.sh
+++ b/buildserver/build_tags.sh
@@ -33,6 +33,7 @@ set_env "$_GIT_UDIR/bin/git" GIT_CMD
 export GIT_CMD
 
 # Update the gnucash-on-windows build scripts
+echo "Pulling latest changes from gnucash-on-windows..."
 _GC_WIN_REPOS_UDIR=`unix_path $GC_WIN_REPOS_DIR`
 qpushd "$_GC_WIN_REPOS_UDIR"
 $GIT_CMD pull
@@ -48,6 +49,7 @@ _REPOS_UDIR=`unix_path $REPOS_DIR`
 qpushd "$_REPOS_UDIR"
 
 # Update the gnucash repository
+echo "Fetching new tags from upstream repository..."
 $GIT_CMD fetch -t
 
 # If we don't have a tagfile then start from 'now'
@@ -89,6 +91,7 @@ for tag_rev in $tags ; do
   major_minor=$(( $tag_major*100 + $tag_minor ))
   if (( $major_minor < 205 ))
   then
+     echo "Skipping build of tag $tag (reason: older than 2.5)"
      continue
   fi
 
@@ -103,6 +106,7 @@ for tag_rev in $tags ; do
   cscript.exe $_GC_WIN_REPOS_UDIR/bootstrap_win_dev.vbs /silent:yes /GLOBAL_DIR:$TAG_GLOBAL_DIR /DOWNLOAD_DIR:$DOWNLOAD_DIR /GIT_DIR:$GIT_DIR
 
   # Check out the tag and setup custom.sh
+  echo "Checking out tag $tag"
   TAG_REPOS_DIR="${TAG_GLOBAL_DIR}\\gnucash.git"
   _TAG_REPOS_UDIR=$(unix_path "$TAG_REPOS_DIR")
   qpushd $TAG_REPOS_DIR

commit 1333d13f8786cbc8b62a18a93150e62fe05a66ae
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue Oct 7 10:58:15 2014 +0200

    Some whitespace cleanup
    
    Includes removal of commented code

diff --git a/buildserver/build_periodic.sh b/buildserver/build_periodic.sh
index 5f44ac5..f503cc0 100644
--- a/buildserver/build_periodic.sh
+++ b/buildserver/build_periodic.sh
@@ -25,7 +25,7 @@ if [ x$periodicity = xweekly ]
 then
   ## Only run this script on Monday night (first day of the week)
   if [ `date +%u` != 1 ]
-  then 
+  then
     exit
   fi
 fi
diff --git a/buildserver/build_tags.sh b/buildserver/build_tags.sh
index 42464aa..2609ec1 100644
--- a/buildserver/build_tags.sh
+++ b/buildserver/build_tags.sh
@@ -81,7 +81,7 @@ qpopd # return to directory the script was invoked from (not necessarily the dir
 for tag_rev in $tags ; do
   tag=${tag_rev#*/}
   tag=${tag%/*}
-  
+
   # Git builds are only supported from 2.5 up
   tag_major=${tag%%.*}
   tag_tmp=${tag#*.}
@@ -91,11 +91,11 @@ for tag_rev in $tags ; do
   then
      continue
   fi
-  
+
   TAG_GLOBAL_DIR="c:\\gcdev\\gnucash-${tag}"
   _TAG_GLOBAL_UDIR=$(unix_path "$TAG_GLOBAL_DIR")
   rm -fr $_TAG_GLOBAL_UDIR
-  
+
   # Set up a clean build environment for this tag
   # This will automatically create a custom.sh with
   # several parameters correctly pre-set like
@@ -108,10 +108,9 @@ for tag_rev in $tags ; do
   qpushd $TAG_REPOS_DIR
   $GIT_CMD checkout $tag
   qpopd
-  
+
   TAG_WIN_REPOS_DIR="${TAG_GLOBAL_DIR}\\gnucash-on-windows.git"
   _TAG_WIN_REPOS_UDIR=$(unix_path "$TAG_WIN_REPOS_DIR")
-  #cp -p "${pkgdir}/custom.sh" ${_TAG_WIN_REPOS_UDIR}/custom.sh
 
   # BUILD_FROM_TARBALL is special:
   # in install.sh place we check !=yes, in defaults.sh =yes, in dist.sh =no
diff --git a/dist-impl.sh b/dist-impl.sh
index a2ff7fe..7c012ad 100755
--- a/dist-impl.sh
+++ b/dist-impl.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # GnuCash shellscript functions for dist.sh
-# 
+#
 
 function dist_prepare() {
     TMP_UDIR=`unix_path $TMP_DIR`
diff --git a/install-impl.sh b/install-impl.sh
index 29b50e6..09faff2 100644
--- a/install-impl.sh
+++ b/install-impl.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # GnuCash shellscript functions for install.sh
-# 
+#
 
 function inst_prepare() {
     # Necessary so that intltoolize doesn't come up with some
@@ -683,7 +683,7 @@ function inst_libdbi() {
         rm -rf ${TMP_UDIR}/sqlite-*
     fi
     if test -f ${_MYSQL_LIB_UDIR}/lib/libmysql.dll -a \
-	        -f ${_MYSQL_LIB_UDIR}/lib/libmysqlclient.a
+            -f ${_MYSQL_LIB_UDIR}/lib/libmysqlclient.a
     then
         echo "MySQL library already installed in $_MYSQL_LIB_UDIR.  skipping."
     else
@@ -851,11 +851,11 @@ function inst_libsoup() {
         qpushd $TMP_UDIR/libsoup-*
             ./configure ${HOST_XCOMPILE} \
                 --prefix=${_LIBSOUP_UDIR} \
-		--disable-gtk-doc \
-		--without-gnome \
-		--disable-ssl \
-		CPPFLAGS=-I${_GNOME_UDIR}/include \
-		LDFLAGS="-L${_GNOME_UDIR}/lib -Wl,-s -lz"
+                --disable-gtk-doc \
+                --without-gnome \
+                --disable-ssl \
+                CPPFLAGS=-I${_GNOME_UDIR}/include \
+                LDFLAGS="-L${_GNOME_UDIR}/lib -Wl,-s -lz"
             make
             make install
         qpopd
@@ -928,7 +928,7 @@ function inst_opensp() {
             make -i install
         qpopd
         test -f ${_OPENSP_UDIR}/bin/libosp-5.dll || die "OpenSP not installed correctly"
-	rm -rf $TMP_UDIR/OpenSP-*
+        rm -rf $TMP_UDIR/OpenSP-*
     fi
 }
 
@@ -1049,38 +1049,38 @@ function inst_webkit() {
             wget_unpacked $WEBKIT_SRC_URL $DOWNLOAD_DIR $TMP_DIR
             assert_one_dir ${TMP_UDIR}/webkit-*
             qpushd $TMP_UDIR/webkit-*
-	        add_to_env /c/Programs/GnuWin32/bin PATH
-	        SAVED_PATH=$PATH
-	        add_to_env ${_ACTIVE_PERL_BASE_DIR}/bin PATH
-	        export PERL5LIB=${_ACTIVE_PERL_BASE_DIR}/lib
-    
-	        patch -p0 -u < $WEBKIT_CONFIGURE_PATCH
-	        CPPFLAGS="${GNOME_CPPFLAGS} ${SQLITE3_CFLAGS}" \
+                add_to_env /c/Programs/GnuWin32/bin PATH
+                SAVED_PATH=$PATH
+                add_to_env ${_ACTIVE_PERL_BASE_DIR}/bin PATH
+                export PERL5LIB=${_ACTIVE_PERL_BASE_DIR}/lib
+
+                patch -p0 -u < $WEBKIT_CONFIGURE_PATCH
+                CPPFLAGS="${GNOME_CPPFLAGS} ${SQLITE3_CFLAGS}" \
                 LDFLAGS="${GNOME_LDFLAGS} ${SQLITE3_LDFLAGS} -lsqlite3" \
-	        PERL="${_ACTIVE_PERL_BASE_DIR}/bin/perl" \
-	        ./configure \
-	            --prefix=${_WEBKIT_UDIR} \
-		    --with-target=win32 \
-		    --with-unicode-backend=glib \
-		    --enable-web-sockets \
-		    --enable-3D-transforms \
-		    --disable-video
+                PERL="${_ACTIVE_PERL_BASE_DIR}/bin/perl" \
+                ./configure \
+                    --prefix=${_WEBKIT_UDIR} \
+                    --with-target=win32 \
+                    --with-unicode-backend=glib \
+                    --enable-web-sockets \
+                    --enable-3D-transforms \
+                    --disable-video
                 patch -p0 -u < $WEBKIT_DATADIR_PATCH
                 patch -p0 -u < $WEBKIT_GCCPATH_PATCH
                 patch -p0 -u < $WEBKIT_MAKEFILE_PATCH
                 patch -p0 -u < $WEBKIT_MINGW32_PATCH
                 patch -p0 -u < $WEBKIT_NOSVG_PATCH
-	        cp $WEBKIT_WEBKITENUMTYPES_CPP DerivedSources
-	        cp $WEBKIT_WEBKITENUMTYPES_H Webkit/gtk/webkit
-	        make
-	        make install
-	        PATH=$SAVED_PATH
-	    qpopd
-	else
+                cp $WEBKIT_WEBKITENUMTYPES_CPP DerivedSources
+                cp $WEBKIT_WEBKITENUMTYPES_H Webkit/gtk/webkit
+                make
+                make install
+                PATH=$SAVED_PATH
+            qpopd
+        else
             wget_unpacked $WEBKIT_URL $DOWNLOAD_DIR $WEBKIT_DIR
-	fi
+        fi
         quiet ${PKG_CONFIG} --exists webkit-1.0 || die "webkit not installed correctly"
-	rm -rf ${TMP_UDIR}/webkit-*
+        rm -rf ${TMP_UDIR}/webkit-*
 
         qpushd $_WEBKIT_UDIR/lib/pkgconfig
             perl -pi.bak -e"s!^prefix=.*\$!prefix=$_WEBKIT_UDIR!" *.pc
@@ -1193,7 +1193,7 @@ function inst_boost() {
          ${_BOOST_UDIR}/bin/b2 install-proper --prefix=${_BOOST_UDIR} --with-atomic --with-chrono --with-date_time --with-filesystem --with-log --with-program_options --with-regex --with-signals --with-system --with-test link=shared variant=release toolset=gcc --layout=tagged
         qpopd
         test -f ${_BOOST_UDIR}/lib/libboost_date_time.dll || die "Boost not installed correctly"
-	rm -rf $TMP_UDIR/boost_*
+        rm -rf $TMP_UDIR/boost_*
     fi
 }
 
@@ -1331,7 +1331,7 @@ function make_install() {
         # the equivalent sections in inno_setup/gnucash.iss, and
         # (in the gnucash source repository) src/bin/environment*.in
         qpushd $_INSTALL_UDIR/bin
-		cat > gnucash-launcher.cmd <<EOF
+            cat > gnucash-launcher.cmd <<EOF
 @echo off
 setlocal
 set PATH=$INSTALL_DIR\\bin;%PATH%
@@ -1360,7 +1360,7 @@ set PATH=$LIBSOUP_DIR\\bin;%PATH%
 set PATH=$LIBSOUP_DIR\\lib;%PATH%
 set PATH=$LIBXSLT_DIR\\bin;%PATH%
 set PATH=$LIBXSLT_DIR\\lib;%PATH%
-  
+
 set LTDL_LIBRARY_PATH=${INSTALL_DIR}\\lib
 
 start gnucash %*
@@ -1370,7 +1370,7 @@ EOF
 }
 
 function checkupd_docs_git() {
-    
+
     if [ "$UPDATE_DOCS" = "yes" ]; then
         if [ -x .git ]; then
             setup "Docs - Update repository (git)"



Summary of changes:
 buildserver/build_periodic.sh |  2 +-
 buildserver/build_tags.sh     | 21 ++++++-----
 dist-impl.sh                  |  2 +-
 functions.sh                  | 15 ++++++++
 install-impl.sh               | 87 ++++++++++++++++++++++---------------------
 install.sh                    |  4 +-
 6 files changed, 77 insertions(+), 54 deletions(-)



More information about the gnucash-changes mailing list