]> Dogcows Code - chaz/homebank/commitdiff
Merge branch 'master' into ext-perl ext-perl
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 2 Sep 2019 23:58:34 +0000 (17:58 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 2 Sep 2019 23:58:34 +0000 (17:58 -0600)
1  2 
configure.ac
src/hb-archive.c
src/homebank.h

diff --combined configure.ac
index eece8dc2ddd9b4af21df61724ce67b5e2165b444,914f858cf1829427eddf73a8aefdb0ecc42cd708..c835cd047c40849df35e61dbfc7a28b772e4c80a
@@@ -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 1f6521411e88407ad3a04c57184caefca8ea31f4,cbb732883fd598b6d53f70e06dd497dc69a80a7a..7c4264fbb4289868badd8a52824187518f59803d
@@@ -21,9 -21,6 +21,9 @@@
  #include "hb-archive.h"
  #include "hb-split.h"
  
 +#include "ext.h"
 +#include "refcount.h"
 +
  /****************************************************************************/
  /* Debug macros                                                             */
  /****************************************************************************/
  extern struct HomeBank *GLOBALS;
  
  
 -      if(item != NULL)
+ /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
+ 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)
+ {
 -              g_free(item);
++      if(rc_unref(item))
+       {
+               da_archive_clean(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)
        {
  }
  
  
- 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 b3e1875012061f64764a347ed12600893fc151c0,b4a683a9c8d646d0cd264e8eb7a5f55e3b853068..1dfe7837b2ce2e5074d5d569fa496bcd64e3a4be
  
  #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 - - - - */
This page took 0.031198 seconds and 4 git commands to generate.