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

Last change on this file since 70948 was 70948, checked in by jmr@…, 10 years ago

gnucash: fix build failure with current version of goffice (#26256)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.4 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 70948 2010-08-27 08:14:54Z jmr@macports.org $
3
4PortSystem        1.0
5
6name              gnucash
7version           2.2.9
8revision          5
9categories        gnome x11
10maintainers       nomaintainer
11platforms         darwin
12
13description       a personal and small-business financial-accounting software
14long_description  GnuCash is a personal and small-business \
15                  financial-accounting software, freely licensed under the \
16                  GNU GPL.  Designed to be easy to use, yet powerful and \
17                  flexible, GnuCash allows you to track bank accounts, \
18                  stocks, income and expenses. As quick and intuitive to \
19                  use as a checkbook register, it is based on professional \
20                  accounting principles to ensure balanced books and \
21                  accurate reports.
22
23homepage          http://www.gnucash.org/
24master_sites      sourceforge \
25                  http://www.gnucash.org/pub/gnucash/sources/stable/
26
27# lzma archive for gnucash is 40% smaller than bzip2
28use_lzma          yes
29checksums         md5     b83c188506f749929a69b48c0632d3b8 \
30                  sha1    b7debe12fcb2770f5ec4524ec56c57adbdad19d2 \
31                  rmd160  2e16625b59762a52cea09cfa8139138ee21c6fb2
32
33depends_lib       port:p5-xml-parser \
34                  path:lib/pkgconfig/glib-2.0.pc:glib2 \
35                  port:gconf \
36                  port:guile16 \
37                  port:slib \
38                  port:slib-guile16 \
39                  port:popt \
40                  port:libgnomeui \
41                  port:libgnomeprintui \
42                  port:libgtkhtml3 \
43                  port:libgsf \
44                  port:goffice \
45                  port:aqbanking \
46                  port:libofx \
47                  port:p5-finance-quote
48
49depends_build     port:libtool
50depends_run       port:evince
51
52# aqbanking and libgtkhtml3 are not universal
53universal_variant no
54
55configure.args    --disable-glibtest \
56                  --disable-dependency-tracking --enable-hbci --enable-ofx
57
58patchfiles        patch-configure.diff patch-lib_libc_libc-missing-noop.c.diff \
59                  patch-src_bin_gnucash.in.diff \
60                  patch-src_quotes_gnc-fq-dump.diff \
61                  patch-configure-darwin10.diff \
62                  goffice08.patch
63
64post-patch {
65    reinplace "s|DYLD_LIBRARY_PATH|DYLD_FALLBACK_LIBRARY_PATH|g" \
66        ${worksrcpath}/configure ${worksrcpath}/src/bin/gnucash.in \
67        ${worksrcpath}/src/bin/overrides/gnucash-env.in \
68        ${worksrcpath}/src/gnc-test-env
69    reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/src/quotes/gnc-fq-dump
70    fs-traverse src_file ${worksrcpath}/src {
71        if { [ file isfile ${src_file} ] } {
72            reinplace "s|\\<guile\\/|\\<guile16\\/|g"   ${src_file}
73            reinplace "s|libguile\\.h|libguile16\\.h|g" ${src_file}
74            reinplace "s|exec\\ guile|exec\\ guile16|g" ${src_file}
75        }
76    }
77}
78
79variant without_quotes description {Does not depend on building p5-finance-quote} {
80    depends_lib-delete  port:p5-finance-quote
81}
82
83variant without_hbci description {Disables HBCI support} {
84    depends_lib-delete  port:aqbanking
85    configure.args-delete   --enable-hbci
86    configure.args-append   --disable-hbci
87}
88
89variant without_ofx description {Disables ofx support} {
90    depends_lib-delete  port:libofx
91    configure.args-delete   --enable-ofx
92    configure.args-append   --disable-ofx
93}
94
95variant no_x11 {
96    depends_run-delete port:evince
97    patchfiles-append patch-configure-nox11.diff
98}
99
100set gnucash_register_schema ${prefix}/libexec/${name}-gconf-schema.sh
101
102post-destroot {
103    # We need to register some stuff to gconf. Just putting the
104    # schema files to the right place is not enough.
105    # Setup ${prefix}/libexec/${name}-gconf-schema.sh to handle this
106
107    set schemafiles ""
108    fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas {
109        if {[file isfile $schema]} {
110            # The 'string range' bit is to remove the initial ${destroot} stuff
111            append schemafiles " [string range $schema [string length ${destroot}] end]"
112        }
113    }
114
115    if {[string length $schemafiles] > 0} {
116        set fh [open ${destroot}${gnucash_register_schema} w]
117        puts $fh "#!/bin/sh"
118        puts $fh "env GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` ${prefix}/bin/gconftool-2 --makefile-install-rule $schemafiles"
119        close $fh
120        file attributes ${destroot}${gnucash_register_schema} -permissions 0755
121    }
122}
123
124post-activate {
125    if {[file exists ${gnucash_register_schema}]} {
126        system "${gnucash_register_schema}"
127    }
128
129    if {[variant_isset no_x11]} {
130        ui_warn "When you run gnucash, if it pops up a window saying:"
131        ui_warn "   An error occurred while loading or saving configuration"
132        ui_warn "   information for gnucash."
133        ui_warn "it is probably because it cannot connect to"
134        ui_warn "the DBus server.  Either place the following in your login"
135        ui_warn "shell profile:"
136        ui_warn "    eval `dbus-launch --auto-syntax`"
137        ui_warn "or invoke gnucash via 'dbus-launch gnucash'. Note that with"
138        ui_warn "the latter alternative you may end up with a stray dbus"
139        ui_warn "process after you quit gnucash."
140    } 
141}
142
143livecheck.regex "<title>gnucash .* (\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+) released.*</title>"
Note: See TracBrowser for help on using the repository browser.