source: trunk/dports/gnome/gnucash-devel/Portfile @ 105813

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

gnucash-devel: update to v2.5.1

File size: 5.6 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 105813 2013-05-06 06:49:48Z dports@macports.org $
3
4PortSystem        1.0
5
6name              gnucash-devel
7set my_name       gnucash
8version           2.5.1
9categories        gnome x11
10license           GPL-2+
11maintainers       dports openmaintainer
12platforms         darwin
13
14set branch        [join [lrange [split ${version} .] 0 1] .]
15
16description       a personal and small-business financial-accounting software
17
18long_description  GnuCash is a personal and small-business \
19                  financial-accounting software. -- gnucash-devel \
20                  installs a version from the development (unstable) \
21                  branch.  It cannot be installed along the regular \
22                  (stable) version.  If you want to try it, it is \
23                  recommended that you `port deactivate gnucash', then \
24                  `port install gnucash-devel', so that you can go \
25                  back to a working copy in case anything goes wrong.
26homepage          http://www.gnucash.org/
27master_sites      sourceforge:${my_name} \
28                  http://www.gnucash.org/pub/gnucash/sources/unstable/${branch}.x/
29
30dist_subdir       ${my_name}
31distname          ${my_name}-${version}
32use_bzip2         yes
33
34checksums         rmd160  bb2dc4eaaa6a1498304c438b307b3e50ec863c2d \
35                  sha256  5e6325f09b45080a964f9b8a871407cde31d8c4fcd724c76f90f4433d4fd6e85
36
37# patch configure to not set PLATFORM_OSX_QUARTZ even if we are
38# running gtk +quartz because we want gnucash to set up its
39# environment the same way it does for regular builds, rather than
40# using the gnucash-setup-environment script for OS X. We don't need
41# to use dbus-launch or muck with DYLD_LIBRARY_PATH.
42patchfiles        patch-configure.diff
43
44post-patch {
45    # gnc-fq-dump needs to be patched to use MacPorts perl.
46    # (autoconf takes care of the other perl scripts.)
47    reinplace "s|^#!/usr/bin/perl|#!${prefix}/bin/perl5.12|" ${worksrcpath}/src/quotes/gnc-fq-dump
48}
49
50depends_build     port:pkgconfig \
51                  port:intltool \
52                  port:libtool
53
54depends_lib       port:gconf \
55                  port:slib-guile \
56                  port:libgnomeui \
57                  port:libgnomeprintui \
58                  port:webkit-gtk \
59                  port:goffice \
60                  port:icu \
61                  port:p5.12-finance-quote   
62
63# aqbanking and libgtkhtml3 are not universal
64universal_variant no
65
66configure.args    --disable-glibtest \
67                  --disable-dependency-tracking \
68                  --disable-aqbanking \
69                  --disable-ofx \
70                  --disable-dbi \
71                  --with-html-engine=webkit
72configure.perl    ${prefix}/bin/perl5.12
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 hbci description {AqBanking/HBCI support} {
81    depends_lib-append  port:aqbanking5-gtk
82    configure.args-delete   --disable-aqbanking
83    configure.args-append   --enable-aqbanking
84}
85
86variant ofx description {OFX support} {
87    depends_lib-append  port:libofx
88    configure.args-delete   --disable-ofx
89    configure.args-append   --enable-ofx
90}
91
92variant without_hbci conflicts hbci description {Legacy compatibility variant} {}
93variant without_ofx conflicts ofx description {Legacy compatibility variant} {}
94if {![variant_isset without_hbci]} {
95    default_variants +hbci
96}
97if {![variant_isset without_ofx]} {
98    default_variants +ofx
99}
100
101variant dbi description {Adds dbi backend support} {
102    depends_lib-append  port:libdbi \
103                        port:libdbi-drivers
104    configure.args-delete --disable-dbi
105    configure.args-append --enable-dbi
106    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."
107}
108
109variant python27 description {Install Python bindings for Python 2.7} {
110    patchfiles-append patch-configure-python.diff
111    depends_lib-append port:python27
112    configure.args-append --enable-python-bindings
113    configure.python ${prefix}/bin/python2.7
114}
115
116set gnucash_register_schema ${prefix}/libexec/${my_name}-gconf-schema.sh
117
118post-destroot {
119    # We need to register some stuff to gconf. Just putting the
120    # schema files to the right place is not enough.
121    # Setup ${prefix}/libexec/${my_name}-gconf-schema.sh to handle this
122
123    set schemafiles ""
124    fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas {
125        if {[file isfile $schema]} {
126            # The 'string range' bit is to remove the initial ${destroot} stuff
127            append schemafiles " [string range $schema [string length ${destroot}] end]"
128        }
129    }
130
131    if {[string length $schemafiles] > 0} {
132        set fh [open ${destroot}${gnucash_register_schema} w]
133        puts $fh "#!/bin/sh"
134        puts $fh "env GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` ${prefix}/bin/gconftool-2 --makefile-install-rule $schemafiles"
135        close $fh
136        file attributes ${destroot}${gnucash_register_schema} -permissions 0755
137    }
138}
139
140post-activate {
141    if {[file exists ${gnucash_register_schema}]} {
142        system "${gnucash_register_schema}"
143    }
144
145    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
146}
147
148livecheck.regex "/${my_name} .*/(\[0-9\]+\\.\[0-9\]*\[0-9\]\\.\[0-9\]+)/"
Note: See TracBrowser for help on using the repository browser.