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

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

gnucash-devel: add patch to fix libgcrypt multiple initialization
error that causes bus error when loading aqbanking module (#31595;
merge of r87597 from gnucash port)

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