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

Last change on this file since 123211 was 121269, checked in by jeremyhu@…, 6 years ago

misc: Cleanup configure.cxx_stdlib related logic now that we can assume base 2.3 or newer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.5 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 121269 2014-06-21 20:18:42Z jeremyhu@macports.org $
3
4PortSystem        1.0
5
6name              gnucash
7version           2.6.3
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  f9426aa5b31e731bc4d7a0837387b3a8d364c0a6 \
30                  sha256  02104c1d6a563d1209e2116dcca7fa9e28445b0e3335bedbcae85c834b17d93f
31
32post-patch {
33    # gnc-fq-dump needs to be patched to use MacPorts perl.
34    # (autoconf takes care of the other perl scripts.)
35    reinplace "s|^#!/usr/bin/perl|#!${prefix}/bin/perl5.16|" ${worksrcpath}/src/quotes/gnc-fq-dump
36}
37
38depends_build     port:pkgconfig \
39                  port:intltool \
40                  port:libtool
41
42depends_lib       port:guile \
43                  port:libgnomeui \
44                  path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk \
45                  port:goffice08 \
46                  port:p5.16-finance-quote
47
48# yelp currently requires X11 to build so disable dependency if building
49# with +quartz
50#
51# TODO: add +x11 +quartz variants to distinguish one build from the other
52# since they have different binary dependencies.  Otherwise, rev-upgrade
53# errors may occur
54
55if {![variant_isset quartz]} {
56    depends_run port:yelp
57}
58
59platform darwin {
60    if {${configure.cxx_stdlib} eq "libstdc++"} {
61       depends_lib-delete path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk
62       depends_lib-append path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk-2.0
63    }
64}
65
66# aqbanking is not universal
67universal_variant no
68
69configure.args    --disable-glibtest \
70                  --disable-dependency-tracking \
71                  --disable-aqbanking \
72                  --disable-ofx \
73                  --disable-dbi \
74                  --with-html-engine=webkit
75configure.perl    ${prefix}/bin/perl5.16
76
77# this variant is obsolete as the current version of gnucash no longer
78# supports libgtkhtml3, only webkit-gtk. It didn't work anyway due to the
79# webkit-gtk dependency manipulations above.
80
81# variant gtkhtml description {Use gtkhtml instead of webkit-gtk for html rendering} {
82#    configure.args-delete --with-html-engine=webkit
83#    depends_lib-delete    path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk
84#    depends_lib-append    port:libgtkhtml3
85# }
86
87variant hbci description {AqBanking/HBCI support} {
88    depends_lib-append  path:lib/libaqbanking.dylib:aqbanking5-gtk
89    configure.args-delete   --disable-aqbanking
90    configure.args-append   --enable-aqbanking
91}
92
93variant ofx description {OFX support} {
94    depends_lib-append  port:libofx
95    configure.args-delete   --disable-ofx
96    configure.args-append   --enable-ofx
97}
98
99variant dbi description {Adds dbi backend support} {
100    depends_lib-append  port:libdbi \
101                        port:libdbi-drivers
102    configure.args-delete --disable-dbi
103    configure.args-append --enable-dbi
104    configure.args-append --with-dbi-dbd-dir=${prefix}/lib/dbd
105    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."
106}
107
108default_variants +ofx +hbci
109
110# variant python27 description {Install Python bindings for Python 2.7} {
111#     #patchfiles-append patch-configure-python.diff
112#     depends_lib-append port:python27
113#     configure.args-append --enable-python
114#     configure.python ${prefix}/bin/python2.7
115# }
116
117post-activate {
118    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
119    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
120}
121
122livecheck.regex "/${name} .*/(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)/"
Note: See TracBrowser for help on using the repository browser.