# -*- 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 # $Id$ PortSystem 1.0 name gnucash-devel set my_name gnucash version 2.5.5 categories gnome x11 license GPL-2+ maintainers dports openmaintainer platforms darwin set branch [join [lrange [split ${version} .] 0 1] .] description a personal and small-business financial-accounting software long_description GnuCash is a personal and small-business \ financial-accounting software. -- gnucash-devel \ installs a version from the development (unstable) \ branch. It cannot be installed along the regular \ (stable) version. If you want to try it, it is \ recommended that you `port deactivate gnucash', then \ `port install gnucash-devel', so that you can go \ back to a working copy in case anything goes wrong. homepage http://www.gnucash.org/ master_sites sourceforge:${my_name} \ http://www.gnucash.org/pub/gnucash/sources/unstable/${branch}.x/ dist_subdir ${my_name} distname ${my_name}-${version} use_bzip2 yes checksums rmd160 cec3cff09e95c51a8cc6fba0ead091fd447e70fb \ sha256 f877e510ff019c36bbbc3eac17b97178feadf7fd9f564d220de7c2f617c42ab9 # patch configure to not set PLATFORM_OSX_QUARTZ even if we are # running gtk +quartz because we want gnucash to set up its # environment the same way it does for regular builds, rather than # using the gnucash-setup-environment script for OS X. We don't need # to use dbus-launch or muck with DYLD_LIBRARY_PATH. patchfiles patch-configure.diff post-patch { # gnc-fq-dump needs to be patched to use MacPorts perl. # (autoconf takes care of the other perl scripts.) reinplace "s|^#!/usr/bin/perl|#!${prefix}/bin/perl5.12|" ${worksrcpath}/src/quotes/gnc-fq-dump } depends_build port:pkgconfig \ port:intltool \ port:libtool depends_lib port:gconf \ port:slib-guile \ port:libgnomeui \ port:libgnomeprintui \ path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk \ port:goffice08 \ port:icu \ port:p5.12-finance-quote # TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released platform darwin { set cxxstdlib {} if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} { set cxxstdlib ${configure.cxx_stdlib} } elseif {[string match *clang* ${configure.cxx}] && ${os.major} >= 13} { set cxxstdlib libc++ } else { set cxxstdlib libstdc++ } if {${cxxstdlib} eq "libstdc++"} { depends_lib-delete path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk depends_lib-append path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk-2.0 } } # aqbanking and libgtkhtml3 are not universal universal_variant no configure.args --disable-glibtest \ --disable-dependency-tracking \ --disable-aqbanking \ --disable-ofx \ --disable-dbi \ --with-html-engine=webkit configure.perl ${prefix}/bin/perl5.12 variant gtkhtml description {Use gtkhtml instead of webkit-gtk for html rendering} { configure.args-delete --with-html-engine=webkit depends_lib-delete path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk depends_lib-append port:libgtkhtml3 } variant hbci description {AqBanking/HBCI support} { depends_lib-append port:aqbanking5-gtk configure.args-delete --disable-aqbanking configure.args-append --enable-aqbanking } variant ofx description {OFX support} { depends_lib-append port:libofx configure.args-delete --disable-ofx configure.args-append --enable-ofx } variant without_hbci conflicts hbci description {Legacy compatibility variant} {} variant without_ofx conflicts ofx description {Legacy compatibility variant} {} if {![variant_isset without_hbci]} { default_variants +hbci } if {![variant_isset without_ofx]} { default_variants +ofx } variant dbi description {Adds dbi backend support} { depends_lib-append port:libdbi \ port:libdbi-drivers configure.args-delete --disable-dbi configure.args-append --enable-dbi 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." } variant python27 description {Install Python bindings for Python 2.7} { patchfiles-append patch-configure-python.diff depends_lib-append port:python27 configure.args-append --enable-python-bindings configure.python ${prefix}/bin/python2.7 } set gnucash_register_schema ${prefix}/libexec/${my_name}-gconf-schema.sh post-destroot { # We need to register some stuff to gconf. Just putting the # schema files to the right place is not enough. # Setup ${prefix}/libexec/${my_name}-gconf-schema.sh to handle this set schemafiles "" fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas { if {[file isfile $schema]} { # The 'string range' bit is to remove the initial ${destroot} stuff append schemafiles " [string range $schema [string length ${destroot}] end]" } } if {[string length $schemafiles] > 0} { set fh [open ${destroot}${gnucash_register_schema} w] puts $fh "#!/bin/sh" puts $fh "env GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` ${prefix}/bin/gconftool-2 --makefile-install-rule $schemafiles" close $fh file attributes ${destroot}${gnucash_register_schema} -permissions 0755 } } post-activate { if {[file exists ${gnucash_register_schema}]} { system "${gnucash_register_schema}" } system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor" } livecheck.regex "/${my_name} .*/(\[0-9\]+\\.\[0-9\]*\[0-9\]\\.\[0-9\]+)/"