gnucash-on-windows master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Mon Mar 30 16:09:13 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/82da9e34 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/1e6c16d7 (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/97a59642 (commit)



commit 82da9e34a7fcdb26266ceb15bb238c658c60334d
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Mar 30 09:56:04 2015 -0700

    Update mingw-rt-dev to new version 3.21 and fix the problems it introduced.
    
    Necessary because the previous version is disabled in mingw-get.

diff --git a/bootstrap_win_dev.vbs b/bootstrap_win_dev.vbs
index 00feb3f..f169e38 100644
--- a/bootstrap_win_dev.vbs
+++ b/bootstrap_win_dev.vbs
@@ -47,7 +47,7 @@ myRegExp.Pattern = "/"
 If WScript.Arguments.Named.Exists("GLOBAL_DIR") Then
     GLOBAL_DIR = myRegExp.Replace (WScript.Arguments.Named.Item("GLOBAL_DIR"), "\")
 Else
-    GLOBAL_DIR = "c:\gcdev"
+    GLOBAL_DIR = "c:\gcdev-maint"
 End If
 If WScript.Arguments.Named.Exists("MINGW_DIR") Then
     MINGW_DIR = myRegExp.Replace (WScript.Arguments.Named.Item("MINGW_DIR"), "\")
diff --git a/custom.sh.sample b/custom.sh.sample
index d78fc8f..8bf996b 100644
--- a/custom.sh.sample
+++ b/custom.sh.sample
@@ -1,20 +1,19 @@
 #! /bin/bash
-# This is an example custom.sh file. Copy this file to custom.sh and 
-# edit it.
-# 
-# Note: All directories must be without spaces!
-#
-# REPOS_URL="git at github.com:Gnucash/gnucash.git"
-# SF_MIRROR="http://switch.dl.sourceforge.net/sourceforge"
-# DISABLE_OPTIMIZATIONS=yes
-# GLOBAL_DIR=Z:\\mydir  # all directories will use this
-# WGET_RATE=50k         #limit download bandwith to 50KB/s
-# NO_SAVE_PROFILE=yes   # don't save env settings to /etc/profile.d
-# late_eval 'INSTALL_DIR=$GNUCASH_DIR\\myinst'  # no need to define GNUCASH_DIR
-# block_step inst_docs
-# late_eval 'add_step greetings'
-# function greetings() { setup Greetings; }
-# QTDIR=c:\\Qt\\4.2.3
-# CROSS_COMPILE=yes
-#Uncomment this for building on Win7 (and maybe Vista):
-#EXTRA_CFLAGS="-fno-builtin-dgettext -fno-builtin-towupper -fno-builtin-iswlower"
+"
+GLOBAL_DIR=c:\\gcdev-maint
+MINGW_DIR=c:\\gcdev-maint\\mingw
+MSYS_DIR=c:\\gcdev-maint\\mingw\\msys\\1.0
+TMP_DIR=c:\\gcdev-maint\\tmp
+DOWNLOAD_DIR=c:\\gcdev\\downloads
+GIT_DIR=c:\\gcdev\\git-1.9.4
+REPOS_TYPE=git
+GC_WIN_REPOS_URL=git://github.com/Gnucash/gnucash-on-windows.git
+GC_WIN_REPOS_DIR=c:\\gcdev-maint\\gnucash-on-windows.git
+REPOS_URL=git://github.com/Gnucash/gnucash.git
+REPOS_DIR=c:\\gcdev-maint\\gnucash.git
+GNUCASH_SCM_REV=maint
+
+HH_DIR=c:\\soft\\hh
+
+# Don't save the profile settings
+NO_SAVE_PROFILE=yes
\ No newline at end of file
diff --git a/defaults.sh b/defaults.sh
index 8667392..5c927ae 100644
--- a/defaults.sh
+++ b/defaults.sh
@@ -109,7 +109,7 @@ set_default MINGW_MPC_VERSION         "1.0.1-2"
 set_default MINGW_MPFR_VERSION        "3.1.2-2"
 set_default MINGW_PEXPORTS_VERSION    "0.46"
 set_default MINGW_PTHREAD_W32_VERSION "2.9.1-1"
-set_default MINGW_RT_VERSION          "3.20-2"
+set_default MINGW_RT_VERSION          "3.21"
 set_default MINGW_ZLIB_VERSION        "1.2.8-1"
 set_default MINGW_W32API_VERSION      "3.17-2"
 set_default MINGW_MAKE_VERSION        "3.82-5"
@@ -344,6 +344,7 @@ set_default LIBOFX_PATCH `pwd`/libofx-0.9.8.patch
 GWENHYWFAR_VERSION="4.13.1"
 set_default GWENHYWFAR_URL "http://www2.aquamaniac.de/sites/download/download.php?package=01&release=78&file=01&dummy=gwenhywfar-${GWENHYWFAR_VERSION}.tar.gz"
 set_default GWENHYWFAR_DIR $GLOBAL_DIR\\gwenhywfar
+set_default GWEN_PATCH `pwd`/gwen-4.13.1.patch
 
 KTOBLZCHECK_VERSION="1.48"
 set_default KTOBLZCHECK_URL "$SF_MIRROR/ktoblzcheck/ktoblzcheck-${KTOBLZCHECK_VERSION}.tar.gz"
diff --git a/functions.sh b/functions.sh
index a194f03..02c7b77 100644
--- a/functions.sh
+++ b/functions.sh
@@ -235,6 +235,8 @@ function mingw_smart_get () {
     PACKAGE=$1
     VERSION=$2
 
+    echo "Attempting to install $PACKAGE-$VERSION"
+
     # Check if a sensible package name has been given
     [ "$PACKAGE" ] || return
 
@@ -254,6 +256,7 @@ function mingw_smart_get () {
     #       different versions of the tool (or more precisely different
     #       configurations for the tool).
 
+    echo "Checking package status..."
     COMPONENTS="$(mingw-get show "$PACKAGE" | awk '/Components:/')"
     if [ -n "$COMPONENTS" ]
     then
@@ -265,13 +268,15 @@ function mingw_smart_get () {
         # This assumption may lead to a situation where manulal
         # intervention is needed in case of errors during mingw-get calls
         # Let's hope that such errors are the exception
+        echo "Found the package to have components."
         COMPONENT="${COMPONENTS#Components: }"
         COMPONENT="${COMPONENT%%,*}"
         SUBPACKAGE="$PACKAGE-$COMPONENT"
     else
+        echo "No components, proceding to check package status"
         SUBPACKAGE="$PACKAGE"
     fi
-
+    echo "Checking $SUBPACKAGE versions"
     INSTVERSION="$(mingw-get show "$SUBPACKAGE" | awk '/Installed Version:/')"
     INSTVERSION="${INSTVERSION#Installed Version:  }"
     REPOVERSION="$(mingw-get show "$SUBPACKAGE" | awk '/Repository Version:/')"
@@ -283,18 +288,22 @@ function mingw_smart_get () {
     if [ -z "$INSTVERSION" ]
     then
         # Unknown package
+        echo "Package $PACKAGE is unknown by mingw."
         die "Package $PACKAGE is unknown by mingw."
     elif [ "$INSTVERSION" == "none" ]
     then
         # Package not yet installed
+        echo "installing $PACKAGE"
         mingw-get install ${PACKAGE}
     elif [ -n "$VERSION" ] && [ -z "$(echo "$INSTVERSION" | awk "/$VERSION/")" ]
     then
         # Requested version differs from installed version
+        echo "upgrading $PACKAGE from $INSTVERSION to $VERSION"
         mingw-get upgrade ${PACKAGE}
     elif [ -z "$VERSION" ] && [ "$INSTVERSION" != "$REPOVERSION" ]
     then
         # No version requested, but installed version differs from version in repo
+        echo "upgrading because installed doesn't match repo $PACKAGE"
         mingw-get upgrade ${PACKAGE}
     else
         echo "Package $PACKAGE is up to date"
diff --git a/guile-1.8.patch b/guile-1.8.patch
index 3a2d8a6..a8d082d 100644
--- a/guile-1.8.patch
+++ b/guile-1.8.patch
@@ -24,3 +24,23 @@
  
  srfidir = $(datadir)/guile/$(GUILE_EFFECTIVE_VERSION)/srfi
  srfi_DATA = srfi-1.scm \
+--- a/libguile/pthread-threads.h     2010-12-13 09:24:40 -0800
++++ b/libguile/pthread-threads.h      2015-03-30 11:38:56 -0700
+@@ -24,10 +24,16 @@
+ 
+ /* The pthreads-threads implementation.  This is a direct mapping.
+ */
++#if !defined(_TIMESPEC_DEFINED) && defined(__struct_timespec_defined)
++#define _TIMESPEC_DEFINED 1
++#endif
+ 
+ #include <pthread.h>
+ #include <sched.h>
+ 
++#if !defined(__struct_timespec_defined) && defined(_TIMESPEC_DEFINED)
++#define  __struct_timespec_defined 1
++#endif
+ /* Threads 
+ */
+ #define scm_i_pthread_t                     pthread_t
+
diff --git a/gwen-4.13.1.patch b/gwen-4.13.1.patch
new file mode 100644
index 0000000..b31e211
--- /dev/null
+++ b/gwen-4.13.1.patch
@@ -0,0 +1,65 @@
+--- a/src/sar/sar.c	Wed Dec 31 05:29:02 2014
++++ b/src/sar/sar.c	Sun Mar 29 18:40:06 2015
+@@ -614,7 +614,8 @@
+ 
+ 
+ int GWEN_Sar_AddAndDigestFileLink(GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh, GWEN_MDIGEST *md) {
+-#if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) || _POSIX_C_SOURCE >= 200112L || defined(OS_DARWIN)
++#if ((_BSD_SOURCE || _XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) || _POSIX_C_SOURCE >= 200112L) && !defined(__MINGW32__)) || defined(OS_DARWIN)
++
+   int rv;
+   const char *fname;
+   GWEN_BUFFER *hbuf;
+@@ -1352,7 +1353,7 @@
+ 
+ 
+ int GWEN_Sar_ExtractAndDigestFileLink(GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh, int checkOnly) {
+-#if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) || _POSIX_C_SOURCE >= 200112L || defined(OS_DARWIN)
++#if ((_BSD_SOURCE || _XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) || _POSIX_C_SOURCE >= 200112L) && !defined(__MINGW32__)) || defined(OS_DARWIN)
+   int rv;
+   const char *fname;
+   uint32_t perms;
+
+--- a/gui/testdialogs/dlg_test.c	Sun Oct 12 06:12:22 2014
++++ b/gui/testdialogs/dlg_test.c	Sun Mar 29 19:11:48 2015
+@@ -18,11 +18,6 @@
+ #include <gwenhywfar/pathmanager.h>
+ 
+ 
+-#ifdef OS_WIN32
+-# include <windows.h>
+-# define sleep(x) Sleep(x)
+-#endif
+-
+ #include <unistd.h>
+ 
+ 
+--- a/gui/testdialogs/dlg_test2.c	Sun Oct 12 06:12:22 2014
++++ b/gui/testdialogs/dlg_test2.c	Sun Mar 29 19:11:48 2015
+@@ -16,11 +16,6 @@
+ #include <gwenhywfar/pathmanager.h>
+ 
+ 
+-#ifdef OS_WIN32
+-# include <windows.h>
+-# define sleep(x) Sleep(x)
+-#endif
+-
+ #include <unistd.h>
+ 
+ 
+--- a/gui/gtk2/libtest.c	Sun Oct 12 06:12:22 2014
++++ b/gui/gtk2/libtest.c	Mon Mar 30 06:32:34 2015
+@@ -19,12 +19,6 @@
+ #include <gwenhywfar/dialog.h>
+ #include <gwenhywfar/debug.h>
+ 
+-
+-#ifdef OS_WIN32
+-# include <windows.h>
+-# define sleep(x) Sleep(x)
+-#endif
+-
+ #include <unistd.h>
+ 
+ 
diff --git a/install-impl.sh b/install-impl.sh
index 2bf866f..8ae9798 100644
--- a/install-impl.sh
+++ b/install-impl.sh
@@ -633,6 +633,10 @@ function inst_gwenhywfar() {
         wget_unpacked $GWENHYWFAR_URL $DOWNLOAD_DIR $TMP_DIR
         assert_one_dir $TMP_UDIR/gwenhywfar-*
         qpushd $TMP_UDIR/gwenhywfar-*
+
+            if [ -n "$GWEN_PATCH" -a -f "$GWEN_PATCH" ]; then
+                patch -p1 < $GWEN_PATCH
+            fi
             # circumvent binreloc bug, http://trac.autopackage.org/ticket/28
             # Note: gwenhywfar-3.x and higher don't use openssl anymore.
             ./configure ${HOST_XCOMPILE} \
diff --git a/libofx-0.9.8.patch b/libofx-0.9.8.patch
index d7c823e..7942b06 100644
--- a/libofx-0.9.8.patch
+++ b/libofx-0.9.8.patch
@@ -9,3 +9,26 @@
              const char * inchar = (const char *)s_buffer.c_str();
  #else
              char * inchar = (char *)s_buffer.c_str();
+--- a/lib/win32.cpp	Wed Mar 30 15:30:50 2011
++++ b/lib/win32.cpp	Sun Mar 29 15:07:27 2015
+@@ -25,7 +25,7 @@
+ 
+ 
+ 
+-#ifdef OS_WIN32
++#if defined(OS_WIN32) && !defined(__MINGW32__)
+ 
+ int mkstemp(char *tmpl)
+ {
+
+--- a/lib/win32.hh	Wed Mar 30 15:30:50 2011
++++ b/lib/win32.hh	Sun Mar 29 16:26:58 2015
+@@ -21,7 +21,7 @@
+ #endif
+ 
+ 
+-#ifdef OS_WIN32
++#if defined(OS_WIN32) && !defined(__MINGW32__)
+ 
+ int mkstemp(char *tmpl);
+ 

commit 1e6c16d75f5cdd3e45d072985879fe4f0c58d527
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Mar 30 10:08:54 2015 -0700

    Checkout GNUCASH_SCM_REV before building from git.
    
    Otherwise it builds whatever was originally checked out, which may fail.

diff --git a/install-impl.sh b/install-impl.sh
index f211174..2bf866f 100644
--- a/install-impl.sh
+++ b/install-impl.sh
@@ -1313,6 +1313,7 @@ function inst_gnucash() {
 
     if [ "$BUILD_FROM_TARBALL" != "yes" ]; then
         qpushd $REPOS_DIR
+            $GIT_CMD checkout $GNUCASH_SCM_REV
             ./autogen.sh
         qpopd
     fi



Summary of changes:
 bootstrap_win_dev.vbs |  2 +-
 custom.sh.sample      | 37 ++++++++++++++---------------
 defaults.sh           |  3 ++-
 functions.sh          | 11 ++++++++-
 guile-1.8.patch       | 20 ++++++++++++++++
 gwen-4.13.1.patch     | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 install-impl.sh       |  5 ++++
 libofx-0.9.8.patch    | 23 ++++++++++++++++++
 8 files changed, 144 insertions(+), 22 deletions(-)
 create mode 100644 gwen-4.13.1.patch



More information about the gnucash-changes mailing list