<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
<moduleset>

  <repository type="tarball" name="ftp.gnome.org" default="yes"
              href="http://ftp.gnome.org/pub/GNOME/sources/"/>
   <repository type="tarball" name="kernel.org"
	      href="http://www.kernel.org/pub/linux/"/>
  <repository type='tarball' name='ftp.gnu.org'
	      href="ftp://ftp.gnu.org/gnu/"/>
  <!--repository type='tarball' name='www.freedesktop.org'
	      href="http://www.freedesktop.org/software/" /-->
  <repository type='tarball' name='sourceforge'
	      href="http://downloads.sourceforge.net/"/>
  <repository type='git' name='sourceforge-git'
	      href="https://git.code.sf.net/p/"/>
  <repository type="tarball" name="csail"
	      href="http://groups.csail.mit.edu/mac/ftpdir/"/>
  <repository type="tarball" name="xmlsec"
	      href="http://www.aleksey.com/xmlsec/download/"/>
  <repository type="git" name="aquamaniac"
              href="https://git.aquamaniac.de/git/"/>
  <repository type="tarball" name="aqbanking"
              href="https://www.aquamaniac.de/rdm/attachments/download/"/>
  <repository type="tarball" name="github-tarball"
	      href="https://github.com/"/>
  <repository type="git" name="github"
	      href="https://github.com/"/>
  <repository type="tarball" name="postgres"
              href="https://ftp.postgresql.org/pub/source/"/>
  <repository name="shared-mime-info"
              href="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/"
              type="tarball" />

  <include href="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/modulesets-stable/gtk-osx.modules"/>
 <!--include href="/Users/john/Development/GTK-OSX/gtk-osx-build/modulesets-stable/gtk-osx.modules"/-->

  <meson id="shared-mime-info-2.2">
    <branch module="2.2/shared-mime-info-2.2.tar.bz2"
            version="2.2"
            hash="sha256:418c480019d9865f67f922dfb88de00e9f38bf971205d55cdffab50432919e61"
            repo="shared-mime-info" />
    <dependencies>
      <dep package="glib" />
    </dependencies>
  </meson>
  <autotools id="libchipcard" autogen-sh="autoreconf" autogenargs="--enable-local-install">
    <branch module="382/libchipcard-5.1.6.tar.gz" version="5.1.6"
            repo="aqbanking">
      <patch file="libchipcard-sdk.patch" strip="1"/>
      <patch file="libchipcard-include.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="libgcrypt"/>
      <dep package="gnutls"/>
    </dependencies>
  </autotools>

  <autotools id="gwenhywfar" autogen-sh="configure"
	     autogenargs="--with-guis='gtk3' --enable-local-install">
    <branch module="529/gwenhywfar-5.12.0.tar.gz" version="5.12.0"
            repo="aqbanking" >
      <patch file="gwen-include-file.patch" strip="1"/>
      <patch file="gwen-macos-bundle-path.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="libgcrypt"/>
      <dep package="gnutls"/>
      <dep package="meta-gtk-osx-gtk3"/>
    </dependencies>
  </autotools>

  <autotools id="gwenhywfar-git" autogen-template="make -fMakefile.cvs &amp;&amp; %(srcdir)s/configure --prefix %(prefix)s %(autogenargs)s"
             autogenargs="--with-guis='gtk3' --enable-local-install"
             supports-non-srcdir-builds="no">
    <branch module="gwenhywfar" repo="aquamaniac"/>
    <dependencies>
      <dep package="libgcrypt"/>
      <dep package="gnutls"/>
    </dependencies>
    <after>
      <dep package="meta-gtk-osx-core"/>
      <dep package="meta-gtk-osx-gtk3"/>
    </after>
  </autotools>

  <autotools id="xmlsec" autogenargs="--enable-docs=no --with-gcrypt --with-gnutls">
    <branch module="xmlsec1-1.3.4.tar.gz"
            repo="xmlsec" version="1.3.4" >
    </branch>
    <dependencies>
      <dep package="openssl"/>
      <dep package="gnutls"/>
    </dependencies>
  </autotools>

  <autotools id="aqbanking" autogen-sh="autoreconf" makeargs="-j1"
	     autogenargs="--enable-local-install">
    <branch module="531/aqbanking-6.6.0.tar.gz" version="6.6.0"
            repo="aqbanking">
      <!--patch file="aqbanking-6.5.4-libintl.patch" strip="1"/ -->
    </branch>
    <dependencies>
      <dep package="gwenhywfar"/>
      <dep package="gmp"/>
      <dep package="xmlsec"/>
      <dep package="libxslt"/>
      <dep package="libchipcard"/>
    </dependencies>
  </autotools>

  <autotools id="aqbanking-git"
	     autogenargs="--enable-local-install"
	     autogen-template="ACLOCAL_FLAGS=-I$PREFIX/share/aclocal make -fMakefile.cvs &amp;&amp; %(srcdir)s/configure --prefix %(prefix)s %(autogenargs)s" 
             supports-non-srcdir-builds="no">
     <branch module="aqbanking" repo="aquamaniac" >
    </branch>
    <dependencies>
      <dep package="libofx"/>
      <dep package="gwenhywfar-git"/>
      <dep package="gmp"/>
      <dep package="xmlsec"/>
      <dep package="libchipcard"/>
    </dependencies>
  </autotools>

<!-- Note for cross-compilation: libtool, for reasons known only to
     itself, ignores the CFLAGS and links libosp.5.0.0.la with the
     native architecture. When jhbuild stops, start a shell and go
     back and find the link step, copy and paste it, adding the
     architecture flags, and fire away. Then you can exit the shell
     and rerun build and it will work OK. -->
  <autotools id="OpenSP" autogen-sh='autoreconf'
	     autogenargs="--disable-static --enable-shared --disable-doc-build --disable-nls">
    <branch repo="sourceforge" module="openjade/OpenSP-1.5.2.tar.gz"
	    version='1.5.2'>
      <patch file="OpenSP-AC_CONFIG_HEADERS.patch" strip='0'/>
    </branch>
  </autotools>

  <autotools id="libofx" autogen-sh='configure'>
    <branch repo="github-tarball" module="libofx/libofx/releases/download/0.10.5/libofx-0.10.5.tar.gz"
            version="0.10.5">
    </branch>
    <dependencies>
      <dep package="OpenSP"/>
    </dependencies>
  </autotools>

  <autotools id="swig" autogen-sh="configure">
    <branch repo="sourceforge" module="swig/swig-4.2.1.tar.gz"
	    version="4.2.1"/>
    <dependencies>
      <dep package="pcre"/>
    </dependencies>
  </autotools>

  <autotools id="pgsql">
    <branch repo="postgres" module="v16.3/postgresql-16.3.tar.bz2" 
            version="16.3"
            hash="sha256:331963d5d3dc4caf4216a049fa40b66d6bcb8c730615859411b9518764e60585">
    </branch>
    <dependencies>
      <dep package="openssl"/>
      <dep package="icu"/>
    </dependencies>
  </autotools>

  <cmake id="mariadb-connector"
         cmakeargs="-DWITH_MYSQLCOMPAT=ON -DWITH_ICONV=ON -DWITH_UNIT_TESTS=OFF -DWITH_EXTERNAL_ZLIB=ON -DWITH_SSL=gnutls -DDEFAULT_SSL_VERIFY_SERVER_CERT=OFF -DMACOSX_RPATH=ON">
    <branch repo="github-tarball" module="mariadb-corporation/mariadb-connector-c/archive/refs/tags/v3.4.0.tar.gz" version="3.4.0"
            checkoutdir="mariadb-connector-c-3.4.0">
      <!-- patch file="mariadb-connector-fix-includes.patch" strip="1"/ -->
    </branch>
    <dependencies>
      <dep package="gnutls"/>
    </dependencies>
  </cmake>

  <autotools id="libdbi" autogen-sh="configure" autogenargs="--disable-docs">
    <branch repo="sourceforge" module="gnucash/libdbi-0.9.1.tar.gz" version="0.9.1"
            hash="sha256:870c81447e45ea7f02379dec91ca53f0a28c2438cf88bb3a6491fb4db30db528">
    </branch>
  </autotools>

  <autotools id="libdbi-drivers" autogen-sh="configure"
	     autogenargs='--with-mysql --with-mysql-libdir=$PREFIX/lib/mariadb/  --with-mysql-incdir=$PREFIX/include/mariadb/ --with-pgsql --with-sqlite3 --disable-docs --disable-dependency-tracking'>
    <branch repo="sourceforge"
            module="gnucash/libdbi-drivers-0.9.1.tar.gz" version="0.9.1"
            hash="sha256:3346b3f09edb2c2464422560ff783f7a7fa1fcd287427f0a8f2db8a1d995acb9">
      <patch file="libdbi-drivers-cgreen-include.patch"/>
    </branch>
    <dependencies>
      <dep package="libdbi"/>
      <dep package="mariadb-connector"/>
      <dep package="pgsql"/>
      <dep package="sqlite"/>
    </dependencies>
   </autotools>

  <cmake id="boost" cmakeargs="-DLIBRARIES='date_time;regex;locale;filesystem;program_options;system'">
    <branch module="boost/boost_1_85_0.tar.bz2" version="1.85.0" 

            repo="sourceforge">
      <patch file="boost-cmake.patch" strip="1"/>
    </branch>
    <after>
      <dep package="icu"/>
    </after>
  </cmake>

  <autotools id="bdw-gc" autogen-sh="configure"
             autogenargs="--enable-large-config">
    <branch repo="github-tarball"
            module="ivmai/bdwgc/releases/download/v8.2.6/gc-8.2.6.tar.gz"
            version="82.6"/>
  </autotools>

  <autotools id="libunistring" autogen-sh="configure">
    <branch repo="ftp.gnu.org" module="libunistring/libunistring-1.2.tar.gz"
           version="1.2">
     </branch>
   </autotools>

  <autotools id="guile22" autogen-sh="configure">
    <branch repo="ftp.gnu.org" module="guile/guile-2.2.7.tar.gz"
	    version="2.2.7">
     <patch file="guile-2.2-libguile-Makefile-fixups.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="libunistring"/>
      <dep package="gmp"/>
      <dep package="libffi"/>
      <dep package="bdw-gc"/>
    </dependencies>
  </autotools>

  <autotools id="guile30" autogen-sh="configure">
    <branch repo="ftp.gnu.org" module="guile/guile-3.0.9.tar.gz"
	    version="3.0.9">
     <patch file="guile-2.2-libguile-Makefile-fixups.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="libunistring"/>
      <dep package="gmp"/>
      <dep package="libffi"/>
      <dep package="bdw-gc"/>
    </dependencies>
  </autotools>

  <cmake id="googletest" cmakeargs="-DBUILD_GMOCK=OFF" skip-install="True">
    <branch module="google/googletest" repo="github" tag="release-1.10.0"/>
  </cmake>

<cmake id="gnucash"
        cmakeargs="-DGTEST_ROOT=${JHBUILD_SOURCE}/googletest/">
   <branch module="gnucash/gnucash-5.10.tar.bz2"
           checkoutdir="gnucash-5.10" repo="sourceforge" version="5.10" />
    <dependencies>
      <dep package="meta-gnucash-dependencies"/>
      <dep package="shared-mime-info-2.2"/>
    </dependencies>

 </cmake>

<cmake id="gnucash-unstable"
        cmakeargs="-DGTEST_ROOT=${JHBUILD_SOURCE}/googletest">
   <branch module="gnucash/gnucash-4.904.tar.bz2"
           checkoutdir="gnucash-4.904" repo="sourceforge" version="4.904" />
   
    <dependencies>
      <dep package="meta-gnucash-dependencies"/>
      <dep package="shared-mime-info-2.2"/>
    </dependencies>
 </cmake>

 <cmake id="gnucash-git"
        cmakeargs="-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DGTEST_ROOT=${JHBUILD_SOURCE}/googletest">
   <branch repo="github" module="Gnucash/gnucash.git" revision="stable"
	   checkoutdir="gnucash-git"/>
    <dependencies>
      <dep package="meta-gnucash-dependencies"/>
      <dep package="shared-mime-info-2.2"/>
    </dependencies>
 </cmake>

 <metamodule id="meta-gnucash-dependencies">
   <dependencies>
      <dep package="aqbanking"/>
      <dep package="boost"/>
      <dep package="googletest"/>
      <dep package="guile22"/>
      <dep package="iso-codes"/>
      <dep package="libdbi-drivers"/>
      <dep package="libofx"/>
      <dep package="mariadb-connector"/>
      <dep package="meta-gtk-osx-gtk3"/>
      <dep package="pgsql"/>
      <dep package="shared-mime-info"/>
      <dep package="sqlite"/>
      <dep package="swig"/>
      <dep package="webkit2gtk3"/>
   </dependencies>
 </metamodule>

 <cmake id="gnucash-docs-git"
        ninjaargs="html" >
   <branch  repo="github" module="Gnucash/gnucash-docs.git" revision="stable"
            checkoutdir="gnucash-docs-git"/>
 </cmake>

 <cmake id="gnucash-olddocs" autogenargs="--disable-scrollkeeper"
        autogen-template="%(srcdir)s/%(autogen-sh)s &amp;&amp; %(srcdir)s/configure --prefix %(prefix)s %(autogenargs)s"
        makeargs=" html" makeinstallargs="install-html" >
   <branch  module="gnucash/gnucash-docs-4.14.tar.gz"
            version="4.14" repo="sourceforge"/>
 </cmake>

 <cmake id="gnucash-docs"
        ninjaargs="html">
   <branch  module="gnucash/gnucash-docs-5.10.tar.gz"
            version="5.10" repo="sourceforge"/>
 </cmake>

 <cmake id="gnucash-unstable-docs"
        ninjaargs="html">
   <branch  module="gnucash/gnucash-docs-4.903.tar.gz"
            version="4.903" repo="sourceforge"/>
 </cmake>
</moduleset>