source: trunk/dports/gnome/gnucash/Portfile @ 87598

Last change on this file since 87598 was 87597, checked in by dports@…, 8 years ago

gnucash: add patch to fix libgcrypt multiple initialization error that
causes bus error when loading aqbanking module (#31595)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 87597 2011-11-28 05:40:02Z dports@macports.org $
3
4PortSystem        1.0
5
6name              gnucash
7version           2.4.8
8revision          1
9categories        gnome x11
10license           GPL-2+
11maintainers       dports openmaintainer
12platforms         darwin
13
14description       a personal and small-business financial-accounting software
15long_description  GnuCash is a personal and small-business \
16                  financial-accounting software, freely licensed under the \
17                  GNU GPL.  Designed to be easy to use, yet powerful and \
18                  flexible, GnuCash allows you to track bank accounts, \
19                  stocks, income and expenses. As quick and intuitive to \
20                  use as a checkbook register, it is based on professional \
21                  accounting principles to ensure balanced books and \
22                  accurate reports.
23
24homepage          http://www.gnucash.org/
25master_sites      sourceforge \
26                  http://www.gnucash.org/pub/gnucash/sources/stable/
27
28use_bzip2         yes
29
30# patch configure to not set PLATFORM_OSX_QUARTZ even if we are
31# running gtk +quartz because we want gnucash to set up its
32# environment the same way it does for regular builds, rather than
33# using the gnucash-setup-environment script for OS X. We don't need
34# to use dbus-launch or muck with DYLD_LIBRARY_PATH.
35patchfiles        patch-configure.diff
36
37# fix libgcrypt multiple initialization error; see #31595
38patchfiles-append patch-src_gnc-module_gnc-module.c.diff
39
40post-patch {
41    # gnc-fq-dump needs to be patched to use MacPorts perl.
42    # (autoconf takes care of the other perl scripts.)
43    reinplace "s|^#!/usr/bin/perl|#!${prefix}/bin/perl5.12|" ${worksrcpath}/src/quotes/gnc-fq-dump
44}
45
46checksums         rmd160  030c5948e188765900bb5736c398f8d5ee6641d4 \
47                  sha256  4aa11e7746bb5105682a223f9baf97200ecf2a1fcddbf871626805ac097fee19
48
49depends_build     port:pkgconfig \
50                  port:intltool \
51                  port:libtool
52
53depends_lib       port:gconf \
54                  port:slib-guile \
55                  port:libgnomeui \
56                  port:libgnomeprintui \
57                  port:webkit-gtk \
58                  port:goffice \
59                  port:aqbanking5-gtk \
60                  port:p5.12-finance-quote
61
62depends_run       port:evince
63
64# aqbanking and libgtkhtml3 are not universal
65universal_variant no
66
67configure.args    --disable-glibtest \
68                  --disable-dependency-tracking \
69                  --enable-aqbanking \
70                  --enable-ofx \
71                  --disable-dbi \
72                  --with-html-engine=webkit
73
74variant gtkhtml description {Use gtkhtml instead of webkit-gtk for html rendering} {
75    configure.args-delete --with-html-engine=webkit
76    depends_lib-delete    port:webkit-gtk
77    depends_lib-append    port:libgtkhtml3
78}
79
80variant without_hbci description {Disables AqBanking/HBCI support} {
81    depends_lib-delete  port:aqbanking
82    configure.args-delete   --enable-aqbanking
83    configure.args-append   --disable-aqbanking
84}
85
86variant without_ofx description {Disables ofx support} {
87    depends_lib-delete  port:libofx
88    configure.args-delete   --enable-ofx
89    configure.args-append   --disable-ofx
90}
91
92variant dbi description {Adds dbi backend support} {
93    depends_lib-append  port:libdbi \
94                        port:libdbi-drivers
95    configure.args-delete --disable-dbi
96    configure.args-append --enable-dbi
97    notes-append "gnucash DBI backend support requires the libdbi-drivers port to be built with support for the desired databases. sqlite3 is available by default; for MySQL or PostgreSQL support, ensure that the corresponding variant is selected for libdbi-drivers."
98} 
99
100variant no_x11 {
101    depends_run-delete port:evince
102}
103
104set gnucash_register_schema ${prefix}/libexec/${name}-gconf-schema.sh
105
106post-destroot {
107    # We need to register some stuff to gconf. Just putting the
108    # schema files to the right place is not enough.
109    # Setup ${prefix}/libexec/${name}-gconf-schema.sh to handle this
110
111    set schemafiles ""
112    fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas {
113        if {[file isfile $schema]} {
114            # The 'string range' bit is to remove the initial ${destroot} stuff
115            append schemafiles " [string range $schema [string length ${destroot}] end]"
116        }
117    }
118
119    if {[string length $schemafiles] > 0} {
120        set fh [open ${destroot}${gnucash_register_schema} w]
121        puts $fh "#!/bin/sh"
122        puts $fh "env GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` ${prefix}/bin/gconftool-2 --makefile-install-rule $schemafiles"
123        close $fh
124        file attributes ${destroot}${gnucash_register_schema} -permissions 0755
125    }
126}
127
128post-activate {
129    if {[file exists ${gnucash_register_schema}]} {
130        system "${gnucash_register_schema}"
131    }
132
133    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
134}
135
136livecheck.regex "/${name} .*/(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)/"
Note: See TracBrowser for help on using the repository browser.