diff options
Diffstat (limited to 'office/gnucash')
-rw-r--r-- | office/gnucash/README | 7 | ||||
-rw-r--r-- | office/gnucash/gnucash-SWIG_AppendOutput.patch | 44 | ||||
-rw-r--r-- | office/gnucash/gnucash.SlackBuild | 43 | ||||
-rw-r--r-- | office/gnucash/gnucash.info | 6 |
4 files changed, 76 insertions, 24 deletions
diff --git a/office/gnucash/README b/office/gnucash/README index 83c7d16152..109abe7741 100644 --- a/office/gnucash/README +++ b/office/gnucash/README @@ -17,4 +17,9 @@ Pass WITHPYTHON="yes" to enable Python bindings for report gereration. If you want the SQL database integration, you must first have libdbi and libdbi-drivers installed and pass DBI="yes" to the build script. -to build with webkit2gtk4.1, yelp needs to be built with webkit2gtk4.1 +Look at the slackbuild script for a little "Easter egg". + +NOTE: You MUST remove any previous installation of gnucash before +running this script, otherwise the build will fail. +It is also STRONGLY recommended to remove the gnucash-docs package +(if installed - after all, you ARE upgrading, right?) diff --git a/office/gnucash/gnucash-SWIG_AppendOutput.patch b/office/gnucash/gnucash-SWIG_AppendOutput.patch new file mode 100644 index 0000000000..14e36d8ffd --- /dev/null +++ b/office/gnucash/gnucash-SWIG_AppendOutput.patch @@ -0,0 +1,44 @@ +diff -Nur gnucash-5.10.orig/bindings/python/time64.i gnucash-5.10/bindings/python/time64.i +--- gnucash-5.10.orig/bindings/python/time64.i 2024-09-20 17:42:41.000000000 -0400 ++++ gnucash-5.10/bindings/python/time64.i 2025-01-07 23:50:07.172692786 -0500 +@@ -132,6 +132,12 @@ + $1 = &secs; + } + ++#ifdef HAVE_SWIG_APPENDOUTPUT ++#define SWIG_APPENDOUTPUT(res, func) SWIG_AppendOutput(res, func) ++#else ++#define SWIG_APPENDOUTPUT(res, func) SWIG_Python_AppendOutput(res, func) ++#endif ++ + %typemap(argout) time64 *date (time64 secs) { + PyDateTime_IMPORT; + PyObject *tp; +@@ -148,9 +154,8 @@ + tp = PyDateTime_FromDateAndTime(t.tm_year + 1900, t.tm_mon + 1, + t.tm_mday, t.tm_hour, t.tm_min, + t.tm_sec, 0); +- +- $result = SWIG_Python_AppendOutput($result, tp); +- } else $result = SWIG_Python_AppendOutput($result, Py_None); ++ $result = SWIG_APPENDOUTPUT($result, tp); ++ } else $result = SWIG_APPENDOUTPUT($result, Py_None); + } + + %apply time64 *date { time64 *last_date }; +diff -Nur gnucash-5.10.orig/common/cmake_modules/GncAddSwigCommand.cmake gnucash-5.10/common/cmake_modules/GncAddSwigCommand.cmake +--- gnucash-5.10.orig/common/cmake_modules/GncAddSwigCommand.cmake 2024-09-24 16:36:01.000000000 -0400 ++++ gnucash-5.10/common/cmake_modules/GncAddSwigCommand.cmake 2025-01-07 23:52:35.257990201 -0500 +@@ -86,6 +86,12 @@ + ) + + set (PYTHON_SWIG_FLAGS ${DEFAULT_SWIG_PYTHON_FLAGS}) ++ ++ if (SWIG_VERSION VERSION_GREATER_EQUAL "4.3.0") ++ list(APPEND PYTHON_SWIG_FLAGS ++ -DHAVE_SWIG_APPENDOUTPUT=1) ++ endif() ++ + foreach (dir ${DEFAULT_SWIG_PYTHON_C_INCLUDES} ${_include_dirs}) + list (APPEND PYTHON_SWIG_FLAGS "-I${dir}") + endforeach (dir) diff --git a/office/gnucash/gnucash.SlackBuild b/office/gnucash/gnucash.SlackBuild index 683da1af55..ced3e5cca4 100644 --- a/office/gnucash/gnucash.SlackBuild +++ b/office/gnucash/gnucash.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for gnucash # Copyright 2015 Trayan Denev, tdenev@gmail.com -# This version Copyright 2018-2022 Lenard Spencer <lenardrspencer@gmail.com> +# This version Copyright 2018-2025 Lenard Spencer <lenardrspencer@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,8 +26,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=gnucash -VERSION=${VERSION:-4.11} -BUILD=${BUILD:-3} +VERSION=${VERSION:-5.10} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -72,6 +72,13 @@ else LIBDIRSUFFIX="" fi +# Check for a previous installation, and abort if found: +if [ -e /usr/bin/gnucash ]; then + echo "Found a previous installation of gnucash!" + echo "Please remove it before running this script again." + exit 1 +fi + if [ "$DBI" = "yes" ]; then DBIARGS="-DWITH_SQL=ON -DGNC_DBD_DIR=/usr/lib${LIBDIRSUFFIX}/dbd/" echo " building with SQL integration enabled" @@ -119,31 +126,28 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -if $(pkg-config --exists webkit2gtk-4.1); then - #use webkit2gtk4.1 instead of webkit2gtk if present. - sed -i 's/webkit2gtk-4.0/webkit2gtk-4.1/g' CMakeLists.txt - sed -i 's/WebKit2Gtk4/WebKit2Gtk4.1/g' CMakeLists.txt -fi +# Patch for new SWIG (cherry-picked from upstream git): +patch -p1 < $CWD/gnucash-SWIG_AppendOutput.patch mkdir -p build cd build cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_C_FLAGS="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIBDIR=/usr/lib${LIBDIRSUFFIX} \ + -DCMAKE_INSTALL_DATADIR=/usr/share \ + -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \ -DSYSCONFDIR=/etc \ -DCOMPILE_GSCHEMAS=OFF \ $DBIARGS \ $W_PYTHON \ $OFXBANKING \ $AQBANKING \ - -GNinja \ - -DGNUCASH_BUILD_ID="$VERSION $( date -I ) by $PACKAGER" \ - -DCMAKE_BUILD_TYPE=release .. + -DGNUCASH_BUILD_ID="$VERSION `date -I` by $PACKAGER" \ + -DCMAKE_BUILD_TYPE=Release .. - "${NINJA:=ninja}" - DESTDIR="$PKG" $NINJA install + make + make install DESTDIR=$PKG cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ @@ -153,15 +157,14 @@ mv $PKG/usr/share/man/ $PKG/usr/ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +# gnucash-valgrind should be executable: +chmod 755 $PKG/usr/bin/gnucash-valgrind + # Don't clobber this mv $PKG/etc/gnucash/environment $PKG/etc/gnucash/environment.new - -mkdir -p $PKG/usr/doc -mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION # Remove all those old ChangeLogs: rm $PKG/usr/doc/$PRGNAM-$VERSION/ChangeLog.{1,2}* cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -rmdir $PKG/usr/share/doc mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/office/gnucash/gnucash.info b/office/gnucash/gnucash.info index 0f8546165a..54fe0aa7ca 100644 --- a/office/gnucash/gnucash.info +++ b/office/gnucash/gnucash.info @@ -1,8 +1,8 @@ PRGNAM="gnucash" -VERSION="4.11" +VERSION="5.10" HOMEPAGE="https://www.gnucash.org/" -DOWNLOAD="https://downloads.sourceforge.net/gnucash/gnucash-4.11.tar.bz2" -MD5SUM="e6ea5e80ea27f09115439fab881a0ad5" +DOWNLOAD="https://downloads.sourceforge.net/gnucash/gnucash-5.10.tar.bz2" +MD5SUM="08f8b4fa34f15f5049804e47f8d40270" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="webkit2gtk gtest" |