From: Charles McGarvey Date: Mon, 2 Sep 2019 23:58:34 +0000 (-0600) Subject: Merge branch 'master' into ext-perl X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Fext-perl;hp=-c;p=chaz%2Fhomebank Merge branch 'master' into ext-perl --- 930f295c8fb33beb573dafde28e38888f26d08d2 diff --combined configure.ac index eece8dc,914f858..c835cd0 --- a/configure.ac +++ b/configure.ac @@@ -2,17 -2,13 +2,17 @@@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) - AC_INIT([homebank], [5.2.6]) + AC_INIT([homebank], [5.2.7]) #AC_INIT([homebank], [x.x-rc]) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE([1.9 foreign]) +LT_PREREQ([2.2]) +LT_INIT([dlopen]) +AC_CONFIG_MACRO_DIR([m4]) + # If the source code has changed at all, increment REVISION # If any interfaces have been added, removed, or changed, increment CURRENT, and set REVISION to 0. # If any interfaces have been added since the last public release, then increment AGE. @@@ -26,7 -22,7 +26,7 @@@ AC_PROG_INSTAL AC_PROG_INTLTOOL # Checks for libraries. -PKG_CHECK_MODULES(DEPS, gtk+-3.0 >= 3.16 glib-2.0 >= 2.39) +PKG_CHECK_MODULES(DEPS, gtk+-3.0 >= 3.16 glib-2.0 >= 2.39 gmodule-2.0 >= 2.39) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) AC_CHECK_LIB(m, pow) @@@ -70,7 -66,7 +70,7 @@@ the then AC_CHECK_LIB(ofx, ofx_set_status_cb, OFX_0_7="-DOFX_ENABLE") DEPS_LIBS="-lofx ${DEPS_LIBS}" - CFLAGS="${CFLAGS} $OFX_0_7" + CPPFLAGS="${CPPFLAGS} $OFX_0_7" else noofx=true AC_MSG_RESULT([Libofx header missing. Check your libofx installation]) @@@ -82,41 -78,6 +82,41 @@@ els fi AM_CONDITIONAL(NOOFX, test x$noofx = xtrue) +AC_ARG_WITH(perl, + [ --with-perl build with perl plug-in support [default=without]], + [build_perl=$withval], + [build_perl=no] +) +if test x$build_perl != xno +then + test x$build_perl != xyes -a -x "$build_perl" && PERL=$build_perl + AC_PATH_PROG(PERL, perl, perl) + AC_MSG_CHECKING(if perl can be embedded) + if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1 + then + AC_MSG_RESULT(yes) + CPPFLAGS="${CPPFLAGS} -DPERL_ENABLE" + PERL_CPPFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" + PERL_OBJS="ext-perl.o perlxsi.o" + PERL_PRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" + PERL_SITELIBEXP="`$PERL -MConfig -e 'print $Config{sitelibexp}'`" + DEPS_LIBS="`$PERL -MExtUtils::Embed -e ldopts` ${DEPS_LIBS}" + if test -e "$PERL_SITELIBEXP/ExtUtils/xsubpp" + then + XSUBPP="$PERL $PERL_SITELIBEXP/ExtUtils/xsubpp" + else + XSUBPP="$PERL $PERL_PRIVLIBEXP/ExtUtils/xsubpp" + fi + else + AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) + fi +fi +AC_SUBST(PERL_CPPFLAGS) +AC_SUBST(PERL_OBJS) +AC_SUBST(PERL_PRIVLIBEXP) +AC_SUBST(PERL_SITELIBEXP) +AC_SUBST(XSUBPP) + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h]) @@@ -153,7 -114,6 +153,7 @@@ themes/hicolor/Makefil po/Makefile.in doc/Makefile doc/images/Makefile +plugins/Makefile ]) AC_OUTPUT @@@ -166,7 -126,6 +166,7 @@@ echo $PACKAGE $VERSIO echo echo Compiler................ : $CC echo Build with OFX support.. : $build_ofx +echo Build with perl support. : $build_perl if test "x$noofx" = "xtrue" ; then echo ........................ : **error** libofx header is missing, ofx feature will be disabled. Check your libofx installation fi diff --combined src/hb-archive.c index 1f65214,cbb7328..7c4264f --- a/src/hb-archive.c +++ b/src/hb-archive.c @@@ -21,9 -21,6 +21,9 @@@ #include "hb-archive.h" #include "hb-split.h" +#include "ext.h" +#include "refcount.h" + /****************************************************************************/ /* Debug macros */ /****************************************************************************/ @@@ -39,11 -36,55 +39,55 @@@ extern struct HomeBank *GLOBALS; + /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ + + + static void + da_archive_clean(Archive *item) + { + if(item != NULL) + { + if(item->memo != NULL) + { + g_free(item->memo); + item->memo = NULL; + } + + + + + + //5.3 added as it was a leak + if(item->tags != NULL) + { + g_free(item->tags); + item->tags = NULL; + } + if(item->splits != NULL) + { + da_split_destroy(item->splits); + item->splits = NULL; + item->flags &= ~(OF_SPLIT); //Flag that Splits are cleared + } + } + } + + + void da_archive_free(Archive *item) + { - if(item != NULL) ++ if(rc_unref(item)) + { + da_archive_clean(item); - g_free(item); ++ rc_free(item); + } + } + + Archive *da_archive_malloc(void) { Archive *item; - item = g_malloc0(sizeof(Archive)); + item = rc_alloc(sizeof(Archive)); item->key = 1; return item; } @@@ -51,7 -92,7 +95,7 @@@ Archive *da_archive_clone(Archive *src_item) { -Archive *new_item = g_memdup(src_item, sizeof(Archive)); +Archive *new_item = rc_dup(src_item, sizeof(Archive)); if(new_item) { @@@ -72,19 -113,6 +116,6 @@@ } - void da_archive_free(Archive *item) - { - if(rc_unref(item)) - { - if(item->memo != NULL) - g_free(item->memo); - if(item->splits != NULL) - da_split_destroy(item->splits); - rc_free(item); - } - } - - void da_archive_destroy(GList *list) { GList *tmplist = g_list_first(list); diff --combined src/homebank.h index b3e1875,b4a683a..1dfe783 --- a/src/homebank.h +++ b/src/homebank.h @@@ -75,13 -75,13 +75,13 @@@ #define HB_VERSION_MAJOR 5 #define HB_VERSION_MINOR 2 - #define HB_VERSION_MICRO 6 + #define HB_VERSION_MICRO 7 - #define HB_VERSION "5.2.6" + #define HB_VERSION "5.2.7" #define HB_VERSION_NUM (HB_VERSION_MAJOR*10000) + (HB_VERSION_MINOR*100) + HB_VERSION_MICRO #define FILE_VERSION 1.3 - #define PREF_VERSION 526 + #define PREF_VERSION 527 #if HB_UNSTABLE == FALSE #define PROGNAME "HomeBank" @@@ -331,7 -331,6 +331,7 @@@ const gchar *homebank_app_get_pixmaps_d const gchar *homebank_app_get_locale_dir (void); const gchar *homebank_app_get_help_dir (void); const gchar *homebank_app_get_datas_dir (void); +const gchar *homebank_app_get_pkglib_dir (void); guint32 homebank_app_date_get_julian(void); /* - - - - obsolete things - - - - */