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

Last change on this file since 105500 was 105500, checked in by dports@…, 7 years ago

gnucash: update to v2.4.13

  • 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 105500 2013-04-22 23:00:07Z dports@macports.org $
3
4PortSystem        1.0
5
6name              gnucash
7version           2.4.13
8categories        gnome x11
9license           GPL-2+
10maintainers       dports openmaintainer
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
27use_bzip2         yes
28
29checksums         rmd160  5d6c9dc836ccdf7b4613523004bb5a297eb70f97 \
30                  sha256  f6025200eab90c098026310dc332272d922ce2d3a34fe926cc0c863c14009548
31
32# patch configure to not set PLATFORM_OSX_QUARTZ even if we are
33# running gtk +quartz because we want gnucash to set up its
34# environment the same way it does for regular builds, rather than
35# using the gnucash-setup-environment script for OS X. We don't need
36# to use dbus-launch or muck with DYLD_LIBRARY_PATH.
37patchfiles        patch-configure.diff
38
39post-patch {
40    # gnc-fq-dump needs to be patched to use MacPorts perl.
41    # (autoconf takes care of the other perl scripts.)
42    reinplace "s|^#!/usr/bin/perl|#!${prefix}/bin/perl5.12|" ${worksrcpath}/src/quotes/gnc-fq-dump
43}
44
45depends_build     port:pkgconfig \
46                  port:intltool \
47                  port:libtool
48
49depends_lib       port:gconf \
50                  port:slib-guile \
51                  port:libgnomeui \
52                  port:libgnomeprintui \
53                  port:webkit-gtk \
54                  port:goffice \
55                  port:icu \
56                  port:p5.12-finance-quote   
57
58# aqbanking and libgtkhtml3 are not universal
59universal_variant no
60
61configure.args    --disable-glibtest \
62                  --disable-dependency-tracking \
63                  --disable-aqbanking \
64                  --disable-ofx \
65                  --disable-dbi \
66                  --with-html-engine=webkit
67configure.perl    ${prefix}/bin/perl5.12
68
69variant gtkhtml description {Use gtkhtml instead of webkit-gtk for html rendering} {
70    configure.args-delete --with-html-engine=webkit
71    depends_lib-delete    port:webkit-gtk
72    depends_lib-append    port:libgtkhtml3
73}
74
75variant hbci description {AqBanking/HBCI support} {
76    depends_lib-append  port:aqbanking5-gtk
77    configure.args-delete   --disable-aqbanking
78    configure.args-append   --enable-aqbanking
79}
80
81variant ofx description {OFX support} {
82    depends_lib-append  port:libofx
83    configure.args-delete   --disable-ofx
84    configure.args-append   --enable-ofx
85}
86
87variant without_hbci conflicts hbci description {Legacy compatibility variant} {}
88variant without_ofx conflicts ofx description {Legacy compatibility variant} {}
89if {![variant_isset without_hbci]} {
90    default_variants +hbci
91}
92if {![variant_isset without_ofx]} {
93    default_variants +ofx
94}
95
96variant dbi description {Adds dbi backend support} {
97    depends_lib-append  port:libdbi \
98                        port:libdbi-drivers
99    configure.args-delete --disable-dbi
100    configure.args-append --enable-dbi
101    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."
102}
103
104variant python27 description {Install Python bindings for Python 2.7} {
105    patchfiles-append patch-configure-python.diff
106    depends_lib-append port:python27
107    configure.args-append --enable-python-bindings
108    configure.python ${prefix}/bin/python2.7
109}
110
111set gnucash_register_schema ${prefix}/libexec/${name}-gconf-schema.sh
112
113post-destroot {
114    # We need to register some stuff to gconf. Just putting the
115    # schema files to the right place is not enough.
116    # Setup ${prefix}/libexec/${name}-gconf-schema.sh to handle this
117
118    set schemafiles ""
119    fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas {
120        if {[file isfile $schema]} {
121            # The 'string range' bit is to remove the initial ${destroot} stuff
122            append schemafiles " [string range $schema [string length ${destroot}] end]"
123        }
124    }
125
126    if {[string length $schemafiles] > 0} {
127        set fh [open ${destroot}${gnucash_register_schema} w]
128        puts $fh "#!/bin/sh"
129        puts $fh "env GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` ${prefix}/bin/gconftool-2 --makefile-install-rule $schemafiles"
130        close $fh
131        file attributes ${destroot}${gnucash_register_schema} -permissions 0755
132    }
133}
134
135post-activate {
136    if {[file exists ${gnucash_register_schema}]} {
137        system "${gnucash_register_schema}"
138    }
139
140    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
141}
142
143livecheck.regex "/${name} .*/(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)/"
Note: See TracBrowser for help on using the repository browser.