<?xml version="1.0"?>
<!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="cairographics.org"
              href="http://cairographics.org/releases/"/>
  <repository type="tarball" name="python"
              href="https://www.python.org/ftp/python/"/>
  <repository type="tarball" name="oracle"
	      href="http://download.oracle.com/"/>
  <repository type="tarball" name="pymodules"
              href="https://pypi.python.org/packages/"/>
  <repository type="tarball" name="github-tarball"
              href="https://codeload.github.com"/>

  <metamodule id="meta-gtk-osx-python">
    <dependencies>
      <dep package="pycairo"/>
      <dep package="pygobject"/>
      <dep package="pygtk"/>
      <dep package="gtk-mac-integration-python"/>
    </dependencies>
  </metamodule>

  <metamodule id="meta-gtk-osx-python-gtk3">
    <dependencies>
      <dep package="pycairo"/>
      <dep package="pygobject3"/>
      <dep package="gtk-mac-integration-python"/>
    </dependencies>
    <after>
      <dep package="meta-gtk-osx-gtk3"/>
      <dep package="meta-gtk-osx-gtk3.14"/>
    </after>
  </metamodule>

  <metamodule id="meta-gtk-osx-python3-gtk3">
    <dependencies>
      <dep package="pycairo"/>
      <dep package="pygobject3"/>
      <dep package="gtk-mac-integration-python"/>
    </dependencies>
    <after>
      <dep package="meta-gtk-osx-gtk3"/>
      <dep package="meta-gtk-osx-gtk3.14"/>
    </after>
  </metamodule>

<!--Note the leading ; in autogen-template. It's there on purpose in case the user has set nice_build so that the nice prepended to the command doesn't eat the cd. -->
  <autotools id="berkeleydb" autogen-sh="configure"
	     supports-non-srcdir-builds="no"  makeargs="-C build_unix"
	     autogen-template="cd .;cd build_unix; ../dist/%(autogen-sh)s --prefix %(prefix)s  %(autogenargs)s"
	     makeinstallargs="-C build_unix install">

    <branch module="berkeley-db/db-4.8.30.NC.tar.gz" version="4.8.30"
        repo="oracle" >
      <patch file="https://raw.githubusercontent.com/narkoleptik/os-x-berkeleydb-patch/master/atomic.patch" strip='1'/>
    </branch>
  </autotools>

  <!-- For out-of-source-tree builds (i.e., builddir is defined either
       in .jhbuildrc-custom or passed as an option on the
       command-line, the normal berkeleydb module will build in its
       srcdir/build_unix directory. If you want to build it in the
       build directory with most of the other modules, use this module
       instead. -->
  <autotools id="berkeleydb-nonsrctree" autogen-sh="configure"
         autogen-template="%(srcdir)s/dist/%(autogen-sh)s --prefix %(prefix)s  %(autogenargs)s" >

    <branch module="berkeley-db/db-4.8.30.NC.tar.gz" version="4.8.30"
        repo="oracle" >
      <patch file="https://github.com/narkoleptik/os-x-berkeleydb-patch/raw/master/atomic.patch" strip='1'/>
    </branch>
  </autotools>

  <autotools id="python" autogenargs="--enable-shared"
	     supports-non-srcdir-builds="no" autogen-sh="autoreconf">
       <branch repo="python"
               module="2.7.18/Python-2.7.18.tgz" version="2.7.18"
               hash="sha256:da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814">
  <!-- related to https://bugs.python.org/issue11445 -->
  <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/python-ldflags.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="gettext-runtime"/>
      <dep package='readline'/>
      <dep package="openssl"/> <!-- For hashlib -->
    </dependencies>
    <after>
      <dep package="berkeleydb"/>
      <dep package="berkeleydb-nonsrctree"/>
    </after>
  </autotools>

  <autotools id="python3" autogenargs="--enable-shared" autogen-sh="configure">
    <branch repo="python" module="3.9.1/Python-3.9.1.tar.xz" version="3.9.1"
            hash="sha256:991c3f8ac97992f3d308fefeb03a64db462574eadbff34ce8bc5bb583d9903ff"
            />
    <dependencies>
      <dep package="gettext-runtime"/>
      <dep package='readline'/>
      <dep package="openssl"/> <!-- For hashlib -->
    </dependencies>
  </autotools>

  <distutils id="pybsddb">
    <branch module="8d/9b/c3b01ff14e19254b2e031d8ae5ebe472e5523a47acc6f7d49300960d406d/bsddb3-6.2.4.tar.gz"
	    hash="md5:eec77d104c5981366701c6b0de585504" repo="pymodules"
	    version="6.2.4"/>
    <dependencies>
      <dep package="python3"/>
    </dependencies>
    <after>
      <dep package="berkeleydb"/>
      <dep package="berkeleydb-nonsrctree"/>
    </after>
  </distutils>

  <meson id="pycairo">
    <branch module="/pygobject/pycairo/releases/download/v1.18.1/pycairo-1.18.1.tar.gz" repo="github-tarball"
            version="1.18.1"
	    hash="sha256:70172e58b6bad7572a3518c26729b074acdde15e6fee6cbab6d3528ad552b786"/>
    <dependencies>
      <dep package="cairo"/>
    </dependencies>
    <after>
      <dep package="python3"/>
      <dep package="python"/>
      <dep package="meta-gtk-osx-gtk3"/>
      <dep package="meta-gtk-osx-gtk3.14"/>
      <dep package="meta-gtk-osx-core"/>
    </after>
  </meson>

<!-- PyGObject 2.28 is the last series for Gtk+-2; for co-installation
     with later versions it installs as pygobject2 and PyGObject 3
     installs as pygobject3. Introspection is disabled here, because
     gir-scanner isn't smart enough to co-install them. -->
  <autotools id="pygobject" autogen-sh="configure"
	     autogenargs="--disable-introspection"
	     supports-non-srcdir-builds="no">
    <branch version="2.28.7" module="pygobject/2.28/pygobject-2.28.7.tar.xz"
            hash="sha256:bb9d25a3442ca7511385a7c01b057492095c263784ef31231ffe589d83a96a5a">
      <!-- remove all references to the missing gdestktopappinfo -->
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/pygobject-gdesktopappinfo-missing.patch"
                     strip="1"/>
    </branch>
    <dependencies>
      <dep package="meta-gtk-osx-core"/>
    </dependencies>
    <after>
      <dep package="python"/>
    </after>
  </autotools>

   <meson id="pygobject3" >
    <branch version="3.32.2" module="pygobject/3.32/pygobject-3.32.2.tar.xz"
	    hash="sha256:c39ca2a28364b57fa00549c6e836346031e6b886c3ceabfd8ab4b4fed0a83611"/>
    <dependencies>
      <dep package="pycairo"/>
    </dependencies>
    <after>
      <dep package="python"/>
      <dep package="python3"/>
    </after>
   </meson>

<!-- Pygtk is discontinued, this is the last release -->
 <autotools id="pygtk" autogen-sh="configure"
	     autogenargs="CFLAGS=&quot;$CFLAGS -xobjective-c&quot; lt_cv_sys_global_symbol_pipe=&quot;'sed -n -e '\''s/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''&quot;">
    <branch version="2.24.0" module="pygtk/2.24/pygtk-2.24.0.tar.bz2"
            hash="sha256:cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912">
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/pygtk-libtool.patch" strip="1"/>
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/pygtk-pango1.4x.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="pygobject"/>
      <dep package="meta-gtk-osx-core"/>
      <dep package="pycairo"/>
    </dependencies>
  </autotools>

  <autotools id="gtk-mac-integration-python" autogen-sh="configure"
             autogenargs="--enable-python">
    <branch module="gtk-mac-integration/2.1/gtk-mac-integration-2.1.3.tar.xz"
            version="2.1.3"
            hash="sha256:d5f72302daad1f517932194d72967a32e72ed8177cfa38aaf64f0a80564ce454">
    </branch>
    <dependencies>
    </dependencies>
    <after>
      <dep package="pygtk"/>
      <dep package="pygobject3"/>
    </after>
  </autotools>

  <autotools id="pygtk-extras" autogen-sh="configure">
    <branch module="gnome-python-extras/2.25/gnome-python-extras-2.25.3.tar.bz2"
	    version="2.25.3"/>
    <dependencies>
      <dep package="pygtk"/>
      <dep package="gtkspell"/>
    </dependencies>
  </autotools>

</moduleset>
