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

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

gnucash: increment revision to force rebuild against latest libgoffice (#26256), simplify dependencies.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.2 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 71807 2010-09-23 20:56:23Z devans@macports.org $
3
4PortSystem        1.0
5
6name              gnucash
7version           2.2.9
8revision          6
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_build     port:pkgconfig \
34                  port:intltool \
35                  port:libtool
36
37depends_lib       port:gconf \
38                  port:slib-guile16 \
39                  port:libgnomeui \
40                  port:libgnomeprintui \
41                  port:libgtkhtml3 \
42                  port:goffice \
43                  port:aqbanking \
44                  port:p5-finance-quote
45
46depends_run       port:evince
47
48# aqbanking and libgtkhtml3 are not universal
49universal_variant no
50
51configure.args    --disable-glibtest \
52                  --disable-dependency-tracking --enable-hbci --enable-ofx
53
54patchfiles        patch-configure.diff patch-lib_libc_libc-missing-noop.c.diff \
55                  patch-src_bin_gnucash.in.diff \
56                  patch-src_quotes_gnc-fq-dump.diff \
57                  patch-configure-darwin10.diff \
58                  goffice08.patch
59
60post-patch {
61    reinplace "s|DYLD_LIBRARY_PATH|DYLD_FALLBACK_LIBRARY_PATH|g" \
62        ${worksrcpath}/configure ${worksrcpath}/src/bin/gnucash.in \
63        ${worksrcpath}/src/bin/overrides/gnucash-env.in \
64        ${worksrcpath}/src/gnc-test-env
65    reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/src/quotes/gnc-fq-dump
66    fs-traverse src_file ${worksrcpath}/src {
67        if { [ file isfile ${src_file} ] } {
68            reinplace "s|\\<guile\\/|\\<guile16\\/|g"   ${src_file}
69            reinplace "s|libguile\\.h|libguile16\\.h|g" ${src_file}
70            reinplace "s|exec\\ guile|exec\\ guile16|g" ${src_file}
71        }
72    }
73}
74
75variant without_quotes description {Does not depend on building p5-finance-quote} {
76    depends_lib-delete  port:p5-finance-quote
77}
78
79variant without_hbci description {Disables HBCI support} {
80    depends_lib-delete  port:aqbanking
81    configure.args-delete   --enable-hbci
82    configure.args-append   --disable-hbci
83}
84
85variant without_ofx description {Disables ofx support} {
86    depends_lib-delete  port:libofx
87    configure.args-delete   --enable-ofx
88    configure.args-append   --disable-ofx
89}
90
91variant no_x11 {
92    depends_run-delete port:evince
93    patchfiles-append patch-configure-nox11.diff
94}
95
96set gnucash_register_schema ${prefix}/libexec/${name}-gconf-schema.sh
97
98post-destroot {
99    # We need to register some stuff to gconf. Just putting the
100    # schema files to the right place is not enough.
101    # Setup ${prefix}/libexec/${name}-gconf-schema.sh to handle this
102
103    set schemafiles ""
104    fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas {
105        if {[file isfile $schema]} {
106            # The 'string range' bit is to remove the initial ${destroot} stuff
107            append schemafiles " [string range $schema [string length ${destroot}] end]"
108        }
109    }
110
111    if {[string length $schemafiles] > 0} {
112        set fh [open ${destroot}${gnucash_register_schema} w]
113        puts $fh "#!/bin/sh"
114        puts $fh "env GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` ${prefix}/bin/gconftool-2 --makefile-install-rule $schemafiles"
115        close $fh
116        file attributes ${destroot}${gnucash_register_schema} -permissions 0755
117    }
118}
119
120post-activate {
121    if {[file exists ${gnucash_register_schema}]} {
122        system "${gnucash_register_schema}"
123    }
124
125    if {[variant_isset no_x11]} {
126        ui_warn "When you run gnucash, if it pops up a window saying:"
127        ui_warn "   An error occurred while loading or saving configuration"
128        ui_warn "   information for gnucash."
129        ui_warn "it is probably because it cannot connect to"
130        ui_warn "the DBus server.  Either place the following in your login"
131        ui_warn "shell profile:"
132        ui_warn "    eval `dbus-launch --auto-syntax`"
133        ui_warn "or invoke gnucash via 'dbus-launch gnucash'. Note that with"
134        ui_warn "the latter alternative you may end up with a stray dbus"
135        ui_warn "process after you quit gnucash."
136    } 
137}
138
139livecheck.regex "<title>gnucash .* (\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+) released.*</title>"
Note: See TracBrowser for help on using the repository browser.