<?xml version="1.0"?>
<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
<moduleset>
  <repository name="ftp.gnome.org" type="tarball" default="yes"
              href="http://ftp.gnome.org/pub/GNOME/sources/"/>
  <repository name="openssl" type="tarball"
              href="https://www.openssl.org/source/"/>
  <repository name="ftp.gnu.org" type="tarball" href="https://ftp.gnu.org/gnu/"/>
  <repository name="sourceforge" type="tarball"
              href="http://downloads.sourceforge.net/sourceforge/"/>
  <repository name="gnutls" type="tarball" href="https://www.gnupg.org/ftp/"/>
  <repository name="webm" type="tarball"
              href="http://downloads.webmproject.org/releases/"/>
  <repository name="webkit.org" type="tarball"
              href="http://www.webkitgtk.org/releases/"/>
  <repository type="tarball" name="icu"
              href="http://download.icu-project.org/files/"/>
  <repository type="tarball" name="github-tarball" href="https://github.com/"/>

  <!-- Builds last version of WebKitGTK that supported GTK 2.x -->
  <metamodule id="meta-gtk-osx-webkit">
    <dependencies>
      <dep package="meta-gtk-osx-core"/>
      <dep package="webkit"/>
    </dependencies>
  </metamodule>

  <!-- Builds latest stable version of WebKitGTK for GTK 3.x -->
  <metamodule id="meta-gtk-osx-webkit-gtk3">
    <dependencies>
      <dep package="meta-gtk-osx-gtk3"/>
      <dep package="webkit2gtk3"/>
    </dependencies>
  </metamodule>

  <!-- of the many arguments such as prefix and libdir that jhbuild might pass
  to configure, openssl only understands prefix, and only with =. -->
  <autotools id="openssl" autogen-sh="Configure" autogenargs="shared "
             autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --openssldir=%(prefix)s/etc/ssl %(autogenargs)s"
             makeinstallargs="install_sw" supports-non-srcdir-builds="no">
    <branch module="openssl-1.1.1h.tar.gz" version="1.1.1h" repo="openssl"
            hash="sha256:5c9ca8774bd7b03e5784f26ae9e9e6d749c9da2438545077e6b3d755a06595d9"/>
  </autotools>

  <!-- Rudely demands TeX to build documentation -->
  <autotools id="libnettle" autogen-sh="configure"
             autogenargs="--disable-documentation">
    <branch repo="ftp.gnu.org" version="3.5.1"
            module="nettle/nettle-3.5.1.tar.gz"
            hash="sha256:75cca1998761b02e16f2db56da52992aef622bf55a3b45ec538bc2eedadc9419">
             autogenargs="--disable-documentation --disable-assembler">
    </branch>
    <dependencies>
      <dep package="gmp"/>
      <dep package="openssl"/>
    </dependencies>
  </autotools>

  <autotools id="libtasn1" supports-non-srcdir-builds="no"
             autogen-sh="configure">
    <branch repo="ftp.gnu.org" version="4.15.0"
            module="libtasn1/libtasn1-4.15.0.tar.gz"
            hash="sha256:dd77509fe8f5304deafbca654dc7f0ea57f5841f41ba530cff9a5bf71382739e" />
  </autotools>

  <autotools id="zlib" autogen-sh="configure" skip-autogen="never"
             supports-non-srcdir-builds="no">
    <branch repo="sourceforge" version="1.2.11"
            module="libpng/zlib-1.2.11.tar.xz"/>
  </autotools>

  <!-- Building with p11-kit support breaks g-ir-scanner, for some weird reason. -->
  <autotools id="gnutls" autogen-sh="autoreconf"
             autogenargs="--disable-gtk-doc-html --without-p11-kit">
    <branch repo="gnutls" version="3.6.12"
            hash="sha256:bfacf16e342949ffd977a9232556092c47164bd26e166736cf3459a870506c4b"
            module="gcrypt/gnutls/v3.6/gnutls-3.6.12.tar.xz">
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/gnutls-yes-weak-imports.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="libunistring"/>
      <dep package="libnettle"/>
      <dep package="libtasn1"/>
      <dep package="zlib"/>
    </dependencies>
  </autotools>

  <autotools id="libgcrypt" autogen-sh="configure">
    <branch repo="gnutls" version="1.8.5"
            hash="sha256:3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3"
            module="gcrypt/libgcrypt/libgcrypt-1.8.5.tar.bz2"/>
  </autotools>

  <autotools id="glib-networking" autogen-sh="configure"
             autogenargs="--without-ca-certificates set_more_warnings=no">
    <branch module="glib-networking/2.50/glib-networking-2.50.0.tar.xz"
            hash="sha256:3f1a442f3c2a734946983532ce59ed49120319fdb10c938447c373d5e5286bee"
            version="2.50.0"/>
    <dependencies>
      <dep package="gnutls"/>
      <dep package="glib"/>
    </dependencies>
  </autotools>

  <autotools id="libpsl" autogen-sh='configure'>
    <branch repo="github-tarball" version="0.21.0"
            hash="sha256:41bd1c75a375b85c337b59783f5deb93dbb443fb0a52d257f403df7bd653ee12"
            module="rockdaboot/libpsl/releases/download/libpsl-0.21.0/libpsl-0.21.0.tar.gz"/>
  </autotools>

  <meson id="libsoup" mesonargs="-Dintrospection=disabled">
    <branch module="libsoup/2.68/libsoup-2.68.4.tar.xz" version="2.68.4"
            hash="sha256:2d50b12922cc516ab6a7c35844d42f9c8a331668bbdf139232743d82582b3294">
    </branch>
    <dependencies>
      <dep package="libpsl"/>
      <dep package="python3"/>
      <dep package="glib"/>
      <dep package="glib-networking"/>
      <dep package="sqlite"/>
      <dep package="vala"/>
    </dependencies>
  </meson>

  <autotools id="libwebp" autogen-sh="configure"  autogenargs="--enable-libwebpmux --enable-libwebpdecoder" supports-non-srcdir-builds="no">
     <branch module="/releases/webp/libwebp-1.1.0.tar.gz"
			 version="1.1.0"
			 hash="sha256:98a052268cc4d5ece27f76572a7f50293f439c17a98e67c4ea0c7ed6f50ef043"
			 repo="webm"/>
	 <dependencies>
		 <dep package="libjpeg"/>
		 <dep package="libpng"/>
		 <dep package="libtiff"/>
	 </dependencies>
  </autotools>

  <autotools id="icu55" autogen-sh="source/configure"
             autogenargs="--enable-rpath"
             makeargs='CFLAGS="$CFLAGS -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0"'>
    <branch repo="github-tarball" version="55.2" checkoutdir="icu"
            module="unicode-org/icu/releases/download/release-55-2/icu4c-55_2-src.tgz"
            hash="sha256:eda2aa9f9c787748a2e2d310590720ca8bcc6252adf6b4cfb03b65bef9d66759"/>
  </autotools>

  <!-- This is WebKitGTK 2.4.x, the last version that had the WebKit1 API.
    disable-webkit2: Requires both GTK2 and 3. Currently not supported.
    disable-credential-storage: Requires libsecret. No module for this yet.
    disable-geolocation: Requires geoclue 1 or 2. No module for this yet.
    disable-video, disable-web-audio: Requires gstreamer. If you want video and
      audio, add this to your .jhbuildrc:
      append_autogenargs('WebKit', '&#45;-enable-video')
      append_autogenargs('WebKit', '&#45;-enable-web-audio')
      -j1: Workaround for https://bugs.webkit.org/show_bug.cgi?id=140171

   It has some issues with ICU 58 so we keep it on ICU55. Note that
   you can't install both, so if you need to build this webkit add icu
   to your skip-list.
  -->
  <autotools id="webkit" autogen-sh="autoreconf"
             autogenargs="--enable-quartz-target --with-gtk=2.0 --disable-webkit2 --disable-credential-storage --disable-geolocation --disable-video --disable-web-audio CXXFLAGS='-stdlib=libc++'">

    <branch repo="webkit.org" module="webkitgtk-2.4.11.tar.xz" version="2.4.11">
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-140167-disable-netscape-api.patch" strip="1"/>
      <!-- This patch can be commented out for XCode >= 6.3, but does no harm if
      it's left in -->
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-133293-cfi-clang-failure.patch" strip="1"/>
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit-2.4.11-fixups.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="libwebp"/>
      <dep package="enchant"/>
      <dep package="icu55"/>
      <dep package="libsoup"/>
      <dep package="meta-gtk-osx-freetype"/>
    </dependencies>
    <after>
      <dep package="meta-gtk-osx-gtk"/>
      <dep package="meta-gstreamer"/>
    </after>
  </autotools>

  <!-- This is WebKitGTK 2.4.x as above, but for gtk3.  -->
  <autotools id="webkit1gtk3" autogen-sh="autoreconf"
             autogenargs="--enable-quartz-target --with-gtk=3.0 --disable-webkit2 --disable-credential-storage --disable-geolocation --disable-video --disable-web-audio CXXFLAGS='-stdlib=libc++'"
             makeargs="-j1" >
    <branch repo="webkit.org" module="webkitgtk-2.4.11.tar.xz" version="2.4.11">
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-140167-disable-netscape-api.patch" strip="1"/>
      <!-- This patch can be commented out for XCode >= 6.3, but does no harm if
      it's left in -->
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-133293-cfi-clang-failure.patch" strip="1"/>
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit-2.4.11-fixups.patch" strip="1"/>
    </branch>
    <dependencies>
      <dep package="libwebp"/>
      <dep package="enchant"/>
      <dep package="icu55"/>
      <dep package="libsoup"/>
      <dep package="meta-gtk-osx-freetype"/>
    </dependencies>
    <after>
      <dep package="meta-gtk-osx-gtk3"/>
      <dep package="meta-gtk-osx-gtk3.14"/>
      <dep package="meta-gstreamer"/>
    </after>
  </autotools>

  <!-- This is the stable release of WebKitGTK, for GTK 3.x. Use it if you need
      the WebKit2 API (most applications do.)
    ENABLE_MINIBROWSER: This is enabled because it's an easy test of whether the
      library is working correctly: run "jhbuild run MiniBrowser".
    ENABLE_PLUGIN_PROCESS_GTK2: Requires both GTK 2.x and 3.x. Currently not
      supported.
    ENABLE_VIDEO, ENABLE_WEB_AUDIO: Requires gstreamer. If you want video and
      audio, fix this in your .jhbuildrc-custom. You may need some extra
      patches, this is untested.
    ENABLE_CREDENTIAL_STORAGE: Requires libsecret. No module for this yet.
    ENABLE_GEOLOCATION: Requires geoclue. No module for this yet.
    ENABLE_OPENGL: Untested.
    USE_LIBNOTIFY: Requires libnotify. No module for this yet.
    USE_LIBHYPHEN: Requires libhyphen. No module for this yet.
  -->
  <cmake id="webkit2gtk3"
         cmakeargs='-DPORT=GTK -DENABLE_X11_TARGET=OFF -DENABLE_QUARTZ_TARGET=ON -DENABLE_INTROSPECTION=OFF  -DENABLE_OPENGL=OFF -DENABLE_PLUGIN_PROCESS_GTK2=OFF -DENABLE_VIDEO=OFF -DENABLE_WEB_AUDIO=OFF -DENABLE_GEOLOCATION=OFF -DUSE_LIBNOTIFY=OFF -DUSE_LIBHYPHEN=OFF -DUSE_LIBSECRET=OFF -DENABLE_TOUCH_EVENTS=OFF -DCMAKE_CXX_FLAGS="-stdlib=libc++"'>
    <branch repo="webkit.org" module="webkitgtk-2.16.6.tar.xz" version="2.16.6">
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/Webkit-2.16-build-without-OpenGL.patch" strip="1"/>
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/Webkit-2.16-Fix-some-includes.patch" strip="1"/>
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-2.16-No-stringview-lifetime.patch" strip="1"/>
      <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-2.16-main-thread.patch" strip="1"/>

    </branch>
    <dependencies>
      <dep package="libwebp"/>
      <dep package="enchant"/>
      <dep package="icu"/>
      <dep package="libsoup"/>
      <dep package="libgcrypt"/>
      <dep package="meta-gtk-osx-freetype"/>
    </dependencies>
    <after>
      <dep package="meta-gtk-osx-gtk3"/>
      <dep package="meta-gtk-osx-gtk3.14"/>
      <dep package="meta-gstreamer"/>
    </after>
  </cmake>
</moduleset>
