From f0ae234b31db58a4c2cf052269fe74daf80914ae Mon Sep 17 00:00:00 2001 From: jnemeth Date: Tue, 30 Aug 2016 04:13:13 +0000 Subject: Add libdbi option and enable it by default. libdbi is similar to p5-DBI in that it provides a database independent interface that can be use to access a variety of different types of database servers. Approved By: wiz --- finance/gnucash/Makefile | 4 +- finance/gnucash/PLIST | 3 +- finance/gnucash/distinfo | 3 +- finance/gnucash/options.mk | 16 +++- finance/gnucash/patches/patch-configure | 127 ++++++++++++++++++++++++++++++++ 5 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 finance/gnucash/patches/patch-configure (limited to 'finance/gnucash') diff --git a/finance/gnucash/Makefile b/finance/gnucash/Makefile index 79737bbcba7..f043a4b5364 100644 --- a/finance/gnucash/Makefile +++ b/finance/gnucash/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.234 2016/08/03 10:22:44 adam Exp $ +# $NetBSD: Makefile,v 1.235 2016/08/30 04:13:13 jnemeth Exp $ DISTNAME= gnucash-2.6.13 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= finance MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gnucash/} EXTRACT_SUFX= .tar.bz2 diff --git a/finance/gnucash/PLIST b/finance/gnucash/PLIST index 3110d9559a2..b9b4e7780d4 100644 --- a/finance/gnucash/PLIST +++ b/finance/gnucash/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.60 2016/06/30 17:43:22 wiz Exp $ +@comment $NetBSD: PLIST,v 1.61 2016/08/30 04:13:13 jnemeth Exp $ bin/gnc-fq-check bin/gnc-fq-dump bin/gnc-fq-helper @@ -223,6 +223,7 @@ include/gnucash/window-main-summarybar.h include/gnucash/window-report.h lib/gnucash/libgncmod-app-utils-python.la lib/gnucash/libgncmod-app-utils.la +${PLIST.dbi}lib/gnucash/libgncmod-backend-dbi.la lib/gnucash/libgncmod-backend-xml.la lib/gnucash/libgncmod-bi_import.la lib/gnucash/libgncmod-business-gnome.la diff --git a/finance/gnucash/distinfo b/finance/gnucash/distinfo index 7c26e17b629..b4928ca8c71 100644 --- a/finance/gnucash/distinfo +++ b/finance/gnucash/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.77 2016/06/30 17:43:22 wiz Exp $ +$NetBSD: distinfo,v 1.78 2016/08/30 04:13:13 jnemeth Exp $ SHA1 (gnucash-2.6.13.tar.bz2) = 6ae9476141d98d9c986018d5ee593bbb80c0942d RMD160 (gnucash-2.6.13.tar.bz2) = f78d9aa0fda7b59a1e0ec6cd83ba0f8bbb00eaf9 SHA512 (gnucash-2.6.13.tar.bz2) = daad6d55485de6ce3ca6affe232c51252d853c803734f4737ab2477e7724c42fa2ea764f5fdeea00d956bcbaad338a30fe21c62a578a818d5e8b4f5878f060b5 Size (gnucash-2.6.13.tar.bz2) = 13564015 bytes +SHA1 (patch-configure) = 9f11ae7a9d07f7fef3e05557a396ea8904be4854 SHA1 (patch-src_bin_gnucash-bin.c) = 68edf468f278faf324bbf5c5725b4954d23d8c19 diff --git a/finance/gnucash/options.mk b/finance/gnucash/options.mk index ee8e2b5ebb5..bef7b64d39e 100644 --- a/finance/gnucash/options.mk +++ b/finance/gnucash/options.mk @@ -1,12 +1,12 @@ -# $NetBSD: options.mk,v 1.2 2016/02/01 13:51:47 wiz Exp $ +# $NetBSD: options.mk,v 1.3 2016/08/30 04:13:13 jnemeth Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.gnucash -PKG_SUPPORTED_OPTIONS= libofx -PKG_SUGGESTED_OPTIONS= libofx +PKG_SUPPORTED_OPTIONS= libdbi libofx +PKG_SUGGESTED_OPTIONS= libdbi libofx .include "../../mk/bsd.options.mk" -PLIST_VARS+= ofx +PLIST_VARS+= dbi ofx .if !empty(PKG_OPTIONS:Mlibofx) PLIST.ofx= yes @@ -14,3 +14,11 @@ PLIST.ofx= yes .else CONFIGURE_ARGS+= --disable-ofx .endif + +.if !empty(PKG_OPTIONS:Mlibdbi) +CONFIGURE_ARGS+= --enable-dbi +PLIST.dbi= yes +.include "../../databases/libdbi/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-dbi +.endif diff --git a/finance/gnucash/patches/patch-configure b/finance/gnucash/patches/patch-configure new file mode 100644 index 00000000000..88431ec604c --- /dev/null +++ b/finance/gnucash/patches/patch-configure @@ -0,0 +1,127 @@ +$NetBSD: patch-configure,v 1.7 2016/08/30 04:13:14 jnemeth Exp $ + +Don't bother testing for libdbd-*. Leave the choice of which to +install and when up to the package user. + +--- configure.orig 2016-06-28 04:44:47.000000000 +0000 ++++ configure +@@ -21697,119 +21697,6 @@ else + + fi + +- case $host_os in +- win32*|mingw*) +- LDINC="#include " +- LDFUNCARGS="" +- LDEXT=dll +- ;; +- *) +- LDINC="#include " +- LDFUNCARGS=", RTLD_NOW" +- LDEXT=so +- export LIBS="$lt_cv_dlopen_libs $LIBS" +- ;; +- esac +- old_ld_library_path="$LD_LIBRARY_PATH" +- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SEARCH_LIBS" +- { $as_echo "$as_me:${as_lineno-$LINENO}: Search Path $LD_LIBRARY_PATH" >&5 +-$as_echo "$as_me: Search Path $LD_LIBRARY_PATH" >&6;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Looking for at least one supported DBD module" >&5 +-$as_echo_n "checking Looking for at least one supported DBD module... " >&6; } +- if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$LDINC +-int +-main () +-{ +-if (!$lt_cv_dlopen("libdbdsqlite3.$LDEXT"$LDFUNCARGS)) return -1; +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: SQLite3" >&5 +-$as_echo "SQLite3" >&6; } +-else +- if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$LDINC +-int +-main () +-{ +-if (!$lt_cv_dlopen("libdbdmysql.$LDEXT"$LDFUNCARGS)) return -1; +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: MySql" >&5 +-$as_echo "MySql" >&6; } +-else +- if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$LDINC +-int +-main () +-{ +-if (!$lt_cv_dlopen("libdbdpgsql.$LDEXT"$LDFUNCARGS)) return -1; +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Postgresql" >&5 +-$as_echo "Postgresql" >&6; } +-else +- as_fn_error $? " +-Unable to find any of the supported dbd modules +-(libdbdsqlite3, libdbdmysql, or libdbdpgsql) needed to actually use the SQL +-backend. +- +-If you do have them installed the problem is either that dlopen cannot +-find them or that dlopen itself is not getting linked. Check config.log +-to find out which. You can add the option --with-dbi-dbd-dir pointing to +-the directory in which they are located. +- +-If you do not actually want to build with libdi add --disable-dbi +-to the configure argument list and run it again. +- " "$LINENO" 5 +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- + + LIBDBI_LIBS=-ldbi + _COMPONENTS="$_COMPONENTS dbi" -- cgit v1.2.3