summaryrefslogtreecommitdiffstats
path: root/build-aux/osx/build/updater
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--build-aux/osx/build/updater/gedit-bootstrap-overrides.modules119
-rw-r--r--build-aux/osx/build/updater/gedit-overrides.modules211
-rw-r--r--build-aux/osx/build/updater/patches/enchant-applespell.patch368
-rw-r--r--build-aux/osx/build/updater/patches/enchant-relocatable.patch40
-rw-r--r--build-aux/osx/build/updater/patches/gedit-plugins-disable-terminal.patch30
-rwxr-xr-xbuild-aux/osx/build/updater/update_modulesets.py320
6 files changed, 1088 insertions, 0 deletions
diff --git a/build-aux/osx/build/updater/gedit-bootstrap-overrides.modules b/build-aux/osx/build/updater/gedit-bootstrap-overrides.modules
new file mode 100644
index 0000000..37c2726
--- /dev/null
+++ b/build-aux/osx/build/updater/gedit-bootstrap-overrides.modules
@@ -0,0 +1,119 @@
+<?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="ftp://ftp.gnome.org/pub/gnome/sources/"/>
+ <repository type="tarball" name="xmlsoft.org" href="ftp://xmlsoft.org/libxml2/"/>
+ <repository type="tarball" name="itstool.org" href="http://files.itstool.org/itstool/"/>
+ <repository type="tarball" name="python" href="https://www.python.org/ftp/python/"/>
+ <repository type="tarball" name="oracle" href="http://download.oracle.com/"/>
+
+ <autotools id="berkeleydb-nonsrctree" autogen-sh="configure" autogen-template="%(srcdir)s/dist/%(autogen-sh)s --prefix %(prefix)s --libdir %(libdir)s %(autogenargs)s">
+
+ <branch module="berkeley-db/db-4.8.30.NC.tar.gz" version="4.8.30" repo="oracle">
+ <patch file="berkeleydb-nonsrctree/atomic.patch" strip="1"/>
+ </branch>
+ </autotools>
+
+ <autotools id="berkeleydb" autogen-sh="configure" supports-non-srcdir-builds="no" makeargs="-C build_unix" autogen-template="cd build_unix; ../dist/%(autogen-sh)s --prefix %(prefix)s --libdir %(libdir)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="berkeleydb/atomic.patch" strip="1"/>
+ </branch>
+ </autotools>
+
+ <autotools id='readline' autogen-sh="configure">
+ <branch repo="ftp.gnu.org" module="readline/readline-6.2.tar.gz"
+ version="6.2">
+ <patch file="http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-001" strip="0"/>
+ <patch file="http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-002" strip="0"/>
+ <patch file="http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-003" strip="0"/>
+ <patch file="http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-004" strip="0"/>
+ </branch>
+ </autotools>
+
+ <autotools id="gettext-runtime" autogen-sh="configure"
+ autogenargs="--without-emacs --disable-java --disable-native-java --disable-libasprintf --disable-csharp">
+ <branch repo="ftp.gnu.org" source-subdir="gettext-runtime"
+ module="gettext/gettext-0.18.1.1.tar.gz" version="0.18.1.1"
+ size="15139737" md5sum="3dd55b952826d2b32f51308f2f91aa89">
+ <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/gettext-bug33999-stpncpy.patch" strip="1"/>
+ </branch>
+ </autotools>
+
+ <autotools id="python" autogenargs="--enable-shared"
+ autogen-sh="configure">
+ <branch repo="python"
+ module="2.7.6/Python-2.7.6.tar.xz" version="2.7.6">
+ </branch>
+ <dependencies>
+ <dep package="gettext-runtime"/>
+ <dep package='readline'/>
+ </dependencies>
+ <after>
+ <dep package="berkeleydb"/>
+ <dep package="berkeleydb-nonsrctree"/>
+ </after>
+ </autotools>
+
+ <!-- Remove annoying autogen-sh="autoreconf" when itstool.use-correct-libxml.patch is removed -->
+ <autotools id="itstool" autogen-sh="autoreconf">
+ <branch repo="itstool.org"
+ module="itstool-2.0.2.tar.bz2"
+ version="2.0.2"
+ hash="sha256:bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a"
+ size="96748">
+ <patch file="https://git.gnome.org/browse/jhbuild/plain/patches/itstool.use-correct-libxml.patch" strip="1"/>
+ </branch>
+ </autotools>
+
+ <autotools id="libxml2" autogen-sh="configure" autogenargs="--with-python">
+ <branch version="2.9.0" module="libxml2-2.9.0.tar.gz"
+ repo="xmlsoft.org">
+ <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/libxml2-Bug-686118-pthreads_once_init.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="python"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="libxslt" autogen-sh="configure">
+ <branch version="1.1.27" module="libxslt-1.1.27.tar.gz" repo="xmlsoft.org"/>
+ <dependencies>
+ <dep package="libxml2"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="yelp-xsl" autogen-sh="configure">
+ <branch module="yelp-xsl/3.10/yelp-xsl-3.10.1.tar.xz"
+ version="3.10.1"
+ hash="sha256:59c6dee3999121f6ffd33a9c5228316b75bc22e3bd68fff310beb4eeff245887" />
+ <dependencies>
+ <dep package="libxslt"/>
+ <dep package="libxml2"/>
+ <dep package="intltool"/>
+ <dep package="itstool"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="yelp-tools" autogen-sh="configure">
+ <branch module="yelp-tools/3.10/yelp-tools-3.10.0.tar.xz"
+ version="3.10.0"
+ hash="sha256:ff5e1102631049b08e3ef0ade2cd10e63a62a812690e3d8558ed1413baef2611" />
+ <dependencies>
+ <dep package="libxslt"/>
+ <dep package="libxml2"/>
+ <dep package="intltool"/>
+ <dep package="yelp-xsl"/>
+ <dep package="itstool"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="gtk-doc" autogenargs="--disable-scrollkeeper --with-xml-catalog=$JHBUILD_PREFIX/etc/xml/catalog" makeargs="-k -i" makeinstallargs="-k -i install" autogen-sh="configure">
+ <branch version="1.21" module="gtk-doc/1.21/gtk-doc-1.21.tar.xz" hash="sha256:5d934d012ee08edd1585544792efa80da271652587ba5b843d2cea8e8b80ee3e"/>
+ <dependencies>
+ <dep package="libxslt"/>
+ <dep package="yelp-tools"/>
+ </dependencies>
+ </autotools>
+</moduleset>
diff --git a/build-aux/osx/build/updater/gedit-overrides.modules b/build-aux/osx/build/updater/gedit-overrides.modules
new file mode 100644
index 0000000..d893392
--- /dev/null
+++ b/build-aux/osx/build/updater/gedit-overrides.modules
@@ -0,0 +1,211 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+ <repository type="git" name="git.gnome.org"
+ href="git://git.gnome.org/"/>
+ <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="iso-codes"
+ href="http://pkg-isocodes.alioth.debian.org/downloads/"/>
+ <repository type="tarball" name="abisource/enchant"
+ href="http://www.abisource.com/downloads/enchant/" />
+ <repository type="tarball" name="tarball.github.com"
+ href="https://github.com/"/>
+ <repository type="git" name="git.github.com"
+ href="https://github.com/"/>
+
+ <autotools id="enchant"
+ autogenargs="--disable-myspell --disable-ispell">
+ <branch module="1.6.0/enchant-1.6.0.tar.gz" version="1.6.0"
+ repo="abisource/enchant">
+ <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/enchant-gsize.patch" strip="1"/>
+ <patch file="patches/enchant-applespell.patch" strip="1"/>
+ <patch file="patches/enchant-relocatable.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="glib"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="gtk+-3.0"
+ autogenargs="--enable-quartz-backend --enable-quartz-relocation --disable-colord --without-atk-bridge">
+ <branch module="jessevdk/gtk" checkoutdir="gtk+-3.0" repo="git.github.com" revision="wip/app-osx-int"/>
+ <dependencies>
+ <dep package="gobject-introspection"/>
+ <dep package="pango"/>
+ <dep package="gdk-pixbuf"/>
+ <dep package="atk"/>
+ </dependencies>
+ <after>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ </after>
+ </autotools>
+
+ <autotools id="pygobject3" autogenargs="--with-python=python3">
+ <branch module="pygobject" repo="git.gnome.org"/>
+ <dependencies>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </dependencies>
+ <after>
+ <dep package="python"/>
+ <dep package="python3"/>
+ </after>
+ </autotools>
+
+ <waf id="pycairo-python3" autogen-sh="configure" python-command="python3">
+ <branch module="pycairo-1.10.0.tar.bz2" repo="cairographics.org" version="1.10.0" hash="sha1:b4283aa1cc9aafd12fd72ad371303a486da1d014"/>
+ <dependencies>
+ <dep package="python3"/>
+ <dep package="cairo"/>
+ </dependencies>
+ <after>
+ <dep package="python3"/>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </after>
+ </waf>
+
+ <autotools id="pango" autogen-sh="autoreconf">
+ <branch version="1.36.6" module="pango/1.36/pango-1.36.6.tar.xz" hash="sha256:4c53c752823723875078b91340f32136aadb99e91c0f6483f024f978a02c8624" repo="ftp.gnome.org">
+ </branch>
+ <dependencies>
+ <dep package="cairo"/>
+ </dependencies>
+ <after>
+ <dep package="gobject-introspection"/>
+ <dep package="meta-gtk-osx-freetype"/>
+ <dep package="glib"/>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ </after>
+ </autotools>
+
+ <autotools id="libpeas" autogenargs="PYTHON=python3 --disable-python2 --enable-python3">
+ <branch module="libpeas" repo="git.gnome.org">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="meta-gtk-osx-gtk3"/>
+ <dep package="pycairo-python3"/>
+ <dep package="pygobject3"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="gsettings-desktop-schemas">
+ <branch module="gsettings-desktop-schemas/3.10/gsettings-desktop-schemas-3.10.1.tar.xz"
+ version="3.10.1"
+ hash="sha256:452378c4960a145747ec69f8c6a874e5b7715454df3e2452d1ff1a0a82e76811">
+ </branch>
+ <dependencies>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="glib"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="gtksourceview3">
+ <branch module="gtksourceview" repo="git.gnome.org"/>
+ <after>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </after>
+ </autotools>
+
+ <autotools id="adwaita-icon-theme" autogen-sh="configure">
+ <branch module="adwaita-icon-theme/3.13/adwaita-icon-theme-3.13.5.tar.xz"
+ version="3.13.5" hash="sha256:e163f5f7e205b5f5345dd7f2c30d4104f19376217ca90def83b61a9459a62dbc"/>
+ <dependencies>
+ <dep package="hicolor-icon-theme"/>
+ <dep package="icon-naming-utils"/>
+ <dep package="librsvg"/>
+ </dependencies>
+ </autotools>
+
+ <metamodule id="meta-gtk-osx-gtk3-core-themes">
+ <dependencies>
+ <dep package="icon-naming-utils"/>
+ <dep package="gnome-themes-standard"/>
+ <dep package="adwaita-icon-theme"/>
+ </dependencies>
+ </metamodule>
+
+ <cmake id="libgit2"
+ cmakeargs="-DTHREADSAFE:BOOL=1">
+ <branch repo="tarball.github.com"
+ module="libgit2/libgit2/archive/v${version}.tar.gz"
+ version="0.21.0"
+ hash="ae2afb5729ab6dcf6f690e5d66cb876372eaaedd37dc4fb072ad8da92338e099"
+ checkoutdir="libgit2-${version}">
+ </branch>
+ </cmake>
+
+ <autotools id="libgit2-glib">
+ <branch module="libgit2-glib/0.0/libgit2-glib-0.0.20.tar.xz"
+ version="0.0.20" hash="sha256:f8a10c8d3fcad14eed080dff6b8db0c72866c11a05b9731af31cb7258bcc8d95"/>
+ <dependencies>
+ <dep package="libgit2"/>
+ <dep package="glib"/>
+ <dep package="gobject-introspection"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="vte" autogenargs="--disable-Bsymbolic --disable-vala --disable-gnome-pty-helper">
+ <branch module="jessevdk/vte" repo="git.github.com"/>
+ <dependencies>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="gedit-plugins">
+ <branch module="gedit-plugins" repo="git.gnome.org"/>
+ <dependencies>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="gedit"/>
+ <dep package="libgit2-glib"/>
+ <dep package="vte"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="libsoup" autogen-sh="configure" autogenargs="set_more_warnings=no">
+ <branch module="libsoup/2.40/libsoup-2.40.1.tar.xz"
+ version="2.40.1" hash="sha256:77a55d57e7e8055acd2f44e0cc889b9ba48052e8b7f07e829157d57417ac650a" />
+ <dependencies>
+ <dep package="glib"/>
+ <dep package="glib-networking"/>
+ <dep package='sqlite'/>
+ </dependencies>
+ </autotools>
+
+ <metamodule id="gedit-deps">
+ <dependencies>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="meta-gtk-osx-freetype"/>
+ <dep package="meta-gtk-osx-gtk3"/>
+ <dep package="libpeas"/>
+ <dep package="gtksourceview3"/>
+ <dep package="enchant"/>
+ <dep package="gsettings-desktop-schemas"/>
+ <dep package="iso-codes"/>
+ <dep package="shared-mime-info"/>
+ <dep package="libsoup"/>
+ </dependencies>
+ </metamodule>
+
+ <autotools id="gedit" autogenargs="PYTHON=python3">
+ <branch repo="git.gnome.org" module="gedit"/>
+ <dependencies>
+ <dep package="gedit-deps"/>
+ </dependencies>
+ </autotools>
+
+ <metamodule id="gedit-meta">
+ <dependencies>
+ <dep package="gedit"/>
+ <dep package="gedit-plugins"/>
+ </dependencies>
+ </metamodule>
+
+</moduleset>
+
+<!-- vi:ex:ts=2:et -->
diff --git a/build-aux/osx/build/updater/patches/enchant-applespell.patch b/build-aux/osx/build/updater/patches/enchant-applespell.patch
new file mode 100644
index 0000000..f6f1f65
--- /dev/null
+++ b/build-aux/osx/build/updater/patches/enchant-applespell.patch
@@ -0,0 +1,368 @@
+--- a/configure.in (revision 30591)
++++ b/configure.in (working copy)
+@@ -33,4 +33,5 @@
+ AC_PROG_CC
+ AC_PROG_CPP
++AC_PROG_OBJC
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+--- a/src/applespell/Makefile.am 2010-04-01 22:53:37.000000000 +0200
++++ b/src/applespell/Makefile.am 2012-01-11 22:42:13.000000000 +0100
+@@ -1,4 +1,13 @@
+-EXTRA_DIST= \
+- applespell_checker.h \
+- applespell_checker.mm \
+- AppleSpell.config
++target_lib = libenchant_applespell.la
++
++INCLUDES=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) $(CC_WARN_CFLAGS) -DXP_TARGET_COCOA -xobjective-c -D_ENCHANT_BUILD=1
++
++applespell_LTLIBRARIES = $(target_lib)
++applespelldir= $(libdir)/enchant
++
++libenchant_applespell_la_LIBADD= $(ENCHANT_LIBS) -lobjc $(top_builddir)/src/libenchant.la
++libenchant_applespell_la_LDFLAGS = -module -avoid-version -no-undefined -framework Cocoa
++libenchant_applespell_la_SOURCES = applespell_provider.m
++libenchant_applespell_la_LIBTOOLFLAGS = --tag=CC
++
++libenchant_applespell_lalibdir=$(libdir)/enchant
+--- a/src/applespell/applespell_provider.m 2012-01-11 22:46:35.000000000 +0100
++++ b/src/applespell/applespell_provider.m 2012-01-11 22:39:17.000000000 +0100
+@@ -0,0 +1,337 @@
++/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
++/* enchant
++ * Copyright (C) 2004 Remi Payette
++ * Copyright (C) 2004 Francis James Franklin
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++ * 02110-1301, USA.
++ */
++
++#include <glib.h>
++#include <gmodule.h>
++#include <Cocoa/Cocoa.h>
++#include <AvailabilityMacros.h>
++
++#include "enchant-provider.h"
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++ENCHANT_MODULE_EXPORT (EnchantProvider *)
++init_enchant_provider (void);
++
++ENCHANT_MODULE_EXPORT (void)
++configure_enchant_provider (EnchantProvider *provider, const gchar *module_dir);
++
++#ifdef __cplusplus
++}
++#endif
++
++ENCHANT_PLUGIN_DECLARE("AppleSpell")
++
++typedef struct
++{
++ NSSpellChecker *checker;
++ NSString *language;
++} Dictionary;
++
++static Dictionary *
++dictionary_new (NSSpellChecker *checker,
++ NSString *language)
++{
++ Dictionary *ret;
++
++ ret = g_slice_new (Dictionary);
++
++ ret->checker = checker;
++ ret->language = language;
++
++ return ret;
++}
++
++static void
++dictionary_free (Dictionary *dictionary)
++{
++ [dictionary->language release];
++ g_slice_free (Dictionary, dictionary);
++}
++
++static gchar **
++applespell_dict_suggest (EnchantDict *dict,
++ const gchar * const word,
++ size_t len,
++ size_t *out_n_suggs)
++{
++ NSAutoreleasePool *pool;
++ gchar **ret = NULL;
++ NSString *str;
++ Dictionary *d;
++ NSArray *words;
++ NSRange range;
++ guint i = 0;
++
++ pool = [[NSAutoreleasePool alloc] init];
++
++ d = dict->user_data;
++
++ str = [[NSString alloc] initWithBytes:word length:len encoding:NSUTF8StringEncoding];
++
++ range.location = 0;
++ range.length = [str length];
++
++#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5
++ words = [d->checker guessesForWordRange:range
++ inString:str
++ language:d->language
++ inSpellDocumentWithTag:0];
++#else
++ [d->checker setLanguage:d->language];
++ words = [d->checker guessesForWord:str];
++#endif
++
++ *out_n_suggs = [words count];
++
++ ret = g_new0 (gchar *, *out_n_suggs + 1);
++
++ for (i = 0; i < [words count]; ++i)
++ {
++ ret[i] = g_strdup ([[words objectAtIndex:i] UTF8String]);
++ }
++
++ [str release];
++ [pool release];
++
++ return ret;
++}
++
++static gint
++applespell_dict_check (EnchantDict *dict,
++ const gchar * const word,
++ size_t len)
++{
++ NSAutoreleasePool *pool;
++ gint result = 0;
++ NSString *str;
++ Dictionary *d;
++ NSRange range;
++
++ pool = [[NSAutoreleasePool alloc] init];
++
++ d = dict->user_data;
++
++ str = [[NSString alloc] initWithBytes:word length:len encoding:NSUTF8StringEncoding];
++
++ range = [d->checker checkSpellingOfString:str
++ startingAt:0
++ language:d->language
++ wrap:true
++ inSpellDocumentWithTag:0
++ wordCount:NULL];
++
++ result = range.length > 0 ? 1 : 0;
++
++ [str release];
++ [pool release];
++
++ return result;
++}
++
++static EnchantDict *
++applespell_provider_request_dict (EnchantProvider *provider,
++ const char * const tag)
++{
++ NSAutoreleasePool *pool;
++ EnchantDict *dict;
++ NSString *str;
++
++ pool = [[NSAutoreleasePool alloc] init];
++ str = [[NSString alloc] initWithUTF8String:tag];
++
++ dict = g_new0 (EnchantDict, 1);
++
++ dict->check = applespell_dict_check;
++ dict->suggest = applespell_dict_suggest;
++
++ dict->user_data = dictionary_new (provider->user_data,
++ str);
++
++ [str retain];
++
++ [pool release];
++ return dict;
++}
++
++static void
++applespell_provider_dispose_dict (EnchantProvider *provider,
++ EnchantDict *dict)
++{
++ NSAutoreleasePool *pool;
++
++ pool = [[NSAutoreleasePool alloc] init];
++
++ dictionary_free (dict->user_data);
++ g_free (dict);
++
++ [pool release];
++}
++
++#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
++static gchar const *available_languages[] = {
++ "en",
++ "en_GB",
++ "en_AU",
++ "de",
++ "fr",
++ "nl",
++ "pl",
++ NULL
++};
++
++#endif
++
++static gint
++applespell_provider_dictionary_exists (EnchantProvider *provider,
++ const gchar * const tag)
++{
++ NSAutoreleasePool *pool;
++ gint result = 0;
++ NSSpellChecker *checker;
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
++ NSArray *languages;
++ guint i;
++#else
++ gchar const **ptr;
++#endif
++
++ pool = [[NSAutoreleasePool alloc] init];
++
++ checker = provider->user_data;
++
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
++ languages = [checker availableLanguages];
++
++ for (i = 0; i < [languages count]; ++i)
++ {
++ if (g_strcmp0 (tag, [[languages objectAtIndex:i] UTF8String]) == 0)
++ {
++ result = 1;
++ break;
++ }
++ }
++#else
++ ptr = available_languages;
++
++ while (ptr && *ptr)
++ {
++ if (g_strcmp0 (tag, *ptr) == 0)
++ {
++ result = 1;
++ break;
++ }
++ ++ptr;
++ }
++#endif
++
++ [pool release];
++
++ return result;
++}
++
++static void
++applespell_provider_dispose (EnchantProvider *provider)
++{
++ g_free (provider);
++}
++
++static const gchar *
++applespell_provider_identify (EnchantProvider *provider)
++{
++ return "AppleSpell";
++}
++
++static const gchar *
++applespell_provider_describe (EnchantProvider *provider)
++{
++ return "AppleSpell Provider";
++}
++
++static gchar **
++applespell_provider_list_dicts (EnchantProvider *provider,
++ size_t *out_n_dicts)
++{
++ NSSpellChecker *checker;
++ NSAutoreleasePool *pool;
++ gchar **ret = NULL;
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
++ NSArray *languages;
++ guint i = 0;
++#endif
++
++ pool = [[NSAutoreleasePool alloc] init];
++
++ checker = provider->user_data;
++
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
++ languages = [checker availableLanguages];
++ *out_n_dicts = [languages count];
++
++ ret = g_new0 (gchar *, *out_n_dicts + 1);
++
++ for (i = 0; i < [languages count]; ++i)
++ {
++ ret[i] = g_strdup ([[languages objectAtIndex:i] UTF8String]);
++ }
++#else
++ ret = g_strdupv ((gchar **)available_languages);
++#endif
++
++ [pool release];
++
++ return ret;
++}
++
++ENCHANT_MODULE_EXPORT (EnchantProvider *)
++init_enchant_provider (void)
++{
++ NSAutoreleasePool *pool;
++ EnchantProvider *provider;
++
++ pool = [[NSAutoreleasePool alloc] init];
++
++ provider = g_new0 (EnchantProvider, 1);
++
++ provider->dispose = applespell_provider_dispose;
++ provider->request_dict = applespell_provider_request_dict;
++ provider->dispose_dict = applespell_provider_dispose_dict;
++ provider->dictionary_exists = applespell_provider_dictionary_exists;
++ provider->identify = applespell_provider_identify;
++ provider->describe = applespell_provider_describe;
++ provider->list_dicts = applespell_provider_list_dicts;
++
++ provider->user_data = [NSSpellChecker sharedSpellChecker];
++
++ [pool release];
++
++ return provider;
++}
++
++ENCHANT_MODULE_EXPORT (void)
++configure_enchant_provider (EnchantProvider *provider,
++ const gchar *module_dir)
++{
++ return;
++}
diff --git a/build-aux/osx/build/updater/patches/enchant-relocatable.patch b/build-aux/osx/build/updater/patches/enchant-relocatable.patch
new file mode 100644
index 0000000..7e56eb7
--- /dev/null
+++ b/build-aux/osx/build/updater/patches/enchant-relocatable.patch
@@ -0,0 +1,40 @@
+--- a/src/enchant.c 2010-04-01 22:53:37.000000000 +0200
++++ b/src/enchant.c 2014-08-26 21:32:21.000000000 +0200
+@@ -210,6 +210,13 @@
+ char * module_dir = NULL;
+ char * prefix = NULL;
+
++ const char *envdir = g_getenv ("ENCHANT_MODULES_DIR");
++
++ if (envdir != NULL && *envdir != '\0')
++ {
++ module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (envdir));
++ }
++
+ {
+ char* user_module_dir;
+
+@@ -239,7 +246,8 @@
+ module_dirs = enchant_slist_append_unique_path (module_dirs, module_dir);
+
+ #if defined(ENCHANT_GLOBAL_MODULE_DIR)
+- module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (ENCHANT_GLOBAL_MODULE_DIR));
++ if (envdir == NULL || *envdir == '\0')
++ module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (ENCHANT_GLOBAL_MODULE_DIR));
+ #else
+ /* Dynamically locate library and search for modules relative to it. */
+ prefix = enchant_get_prefix_dir();
+@@ -278,6 +286,13 @@
+ if (ordering_dir)
+ conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir);
+
++ const char *envdir = g_getenv ("ENCHANT_DATA_DIR");
++
++ if (envdir != NULL && *envdir != '\0')
++ {
++ conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup (envdir));
++ }
++
+ /* Dynamically locate library and search for files relative to it. */
+ prefix = enchant_get_prefix_dir();
+ if(prefix)
diff --git a/build-aux/osx/build/updater/patches/gedit-plugins-disable-terminal.patch b/build-aux/osx/build/updater/patches/gedit-plugins-disable-terminal.patch
new file mode 100644
index 0000000..e1d2928
--- /dev/null
+++ b/build-aux/osx/build/updater/patches/gedit-plugins-disable-terminal.patch
@@ -0,0 +1,30 @@
+--- a/configure.ac 2011-10-16 22:03:19.000000000 +0200
++++ b/configure.ac 2012-01-15 13:57:54.000000000 +0100
+@@ -246,6 +246,27 @@
+ fi
+ fi
+
++# ================================================================
++# Terminal (vte)
++# ================================================================
++plugin_defined terminal
++
++if test "$?" = 1
++then
++ AC_CHECK_LIB([vte], [vte_terminal_new], [have_vte=yes], [have_vte=no])
++
++ if test "x$have_vte" = "xno"; then
++ plugin_defined_explicit terminal
++ if test "$?" = 1
++ then
++ AC_MSG_ERROR([vte could not be found, needed for terminal plugin])
++ else
++ AC_MSG_WARN([vte could not be found, terminal plugin will be disabled])
++ undef_plugin terminal "vte not found"
++ fi
++ fi
++fi
++
+ if test -z "$disabled_plugins"
+ then
+ disabled_plugins="none"
diff --git a/build-aux/osx/build/updater/update_modulesets.py b/build-aux/osx/build/updater/update_modulesets.py
new file mode 100755
index 0000000..1382297
--- /dev/null
+++ b/build-aux/osx/build/updater/update_modulesets.py
@@ -0,0 +1,320 @@
+#!/usr/bin/env python
+
+import lxml.etree as ET
+import lxml.objectify
+
+import subprocess, shutil, os, glob, urllib2, json, sys, difflib
+
+if not os.path.exists('.gtk-osx'):
+ subprocess.call(['git', 'clone', 'git://git.gnome.org/gtk-osx', '.gtk-osx'])
+
+try:
+ os.makedirs('.cache')
+except:
+ pass
+
+class Merger:
+ def __init__(self):
+ self.repos = {}
+ self.modules = {}
+
+ def normalize_xml(self, xml):
+ s = ET.tostring(xml)
+ o = lxml.objectify.fromstring(s)
+
+ return ET.tostring(o, pretty_print=True)
+
+ def extract_repos(self, t):
+ default = None
+
+ for repo in t.findall('./repository'):
+ name = repo.attrib['name']
+
+ if 'default' in repo.attrib:
+ default = repo
+
+ if not name in self.repos:
+ self.repos[name] = repo
+
+ return default
+
+ def parse_module(self, f):
+ t = ET.parse(f)
+ drepo = self.extract_repos(t)
+
+ tags = {}
+
+ for x in t.getroot().findall('./'):
+ if x.tag == 'include' or x.tag == 'repository':
+ continue
+
+ branch = x.find('./branch')
+
+ if not branch is None and not 'repo' in branch.attrib:
+ branch.attrib['repo'] = drepo.attrib['name']
+
+ id = x.attrib['id']
+
+ if id in self.modules:
+ print('Overriding existing module {0}:'.format(id))
+
+ a = self.normalize_xml(self.modules[id]).splitlines(True)
+ b = self.normalize_xml(x).splitlines(True)
+
+ print(''.join(difflib.unified_diff(a, b, fromfile='old', tofile='new')))
+ print('\n')
+
+ sys.stdout.write('Do you want to keep the original, or the new file? [(o)riginal, (n)new] ')
+ sys.stdout.flush()
+ answer = sys.stdin.readline().rstrip()
+
+ if answer == '' or answer == 'n' or answer == 'new':
+ self.modules[id] = x
+ print('Using new version\n')
+ else:
+ print('Used original version\n')
+ else:
+ self.modules[id] = x
+
+ def copy_patches(self, mod):
+ # Copy patches locally
+ patches = mod.findall('./branch/patch')
+
+ if len(patches) == 0:
+ return
+
+ dname = 'modulesets/patches/' + mod.attrib['id']
+
+ try:
+ os.makedirs(dname)
+ except:
+ pass
+
+ locc = 'http://git.gnome.org/browse/gtk-osx/plain/'
+
+ for p in patches:
+ f = p.attrib['file']
+
+ pname = os.path.basename(f)
+
+ if f.startswith(locc):
+ shutil.copyfile('.gtk-osx/' + f[len(locc):], dname + '/' + pname)
+ elif f.startswith('patches/'):
+ shutil.copyfile(f, dname + '/' + pname)
+ else:
+ content = self.from_cache_or_url(os.path.join('patches', mod.attrib['id'], pname), f)
+
+ with open(dname + '/' + pname, 'w') as patch:
+ patch.write(content)
+
+ p.attrib['file'] = mod.attrib['id'] + '/' + pname
+
+ def from_cache_or_url(self, filename, url):
+ cfile = os.path.join('.cache', filename)
+
+ try:
+ with open(cfile) as f:
+ return f.read()
+ except:
+ pass
+
+ resp = urllib2.urlopen(url)
+ ret = resp.read()
+ resp.close()
+
+ dname = os.path.dirname(cfile)
+
+ try:
+ os.makedirs(dname)
+ except:
+ pass
+
+ try:
+ with open(cfile, 'w') as f:
+ f.write(ret)
+ except:
+ pass
+
+ return ret
+
+ def update_module(self, mod):
+ branch = mod.find('./branch')
+
+ if branch is None:
+ return
+
+ if not branch.attrib['repo'].endswith('.gnome.org'):
+ return
+
+ # Check for latest versions
+ repo = self.repos[branch.attrib['repo']]
+
+ if repo.attrib['type'] != 'tarball':
+ return
+
+ module = branch.attrib['module']
+
+ modname = module.split('/', 2)[0]
+ version = [int(x) for x in branch.attrib['version'].split('.')]
+
+ # Skip updating gtk+ 2.x
+ if modname == 'gtk+' and version[0] == 2:
+ return
+
+ href = repo.attrib['href']
+ versions = self.from_cache_or_url(mod.attrib['id'] + '.json', href + modname + '/cache.json')
+ versions = json.loads(versions)
+
+ latest = [version, version]
+
+ for v in versions[1][modname]:
+ vv = [int(x) for x in v.split('.')]
+
+ if vv[1] % 2 == 0:
+ if vv > latest[0] and vv[0] == latest[0][0]:
+ latest[0] = vv
+ else:
+ if vv > latest[1] and vv[0] == latest[1][0]:
+ latest[1] = vv
+
+ if latest[0] > version or latest[1] > version:
+ choices = []
+
+ if latest[0] > version:
+ choices.append('stable = {0}'.format('.'.join([str(x) for x in latest[0]])))
+
+ if latest[1] > version:
+ choices.append('unstable = {0}'.format('.'.join([str(x) for x in latest[1]])))
+
+ sversion = '.'.join([str(x) for x in version])
+ print('Found new versions for {0} = {1}: {2}'.format(modname, sversion, ', '.join(choices)))
+
+ sys.stdout.write('Do you want to update? [(s)table/(u)nstable/(n)o]: ')
+ sys.stdout.flush()
+ answer = sys.stdin.readline().rstrip()
+
+ nv = None
+
+ if answer == '':
+ if latest[0] > latest[1]:
+ answer = 'stable'
+ else:
+ answer = 'unstable'
+
+ if (answer == 'stable' or answer == 's') and latest[0] > version:
+ nv = latest[0]
+ elif (answer =='unstable' or answer == 'u') and latest[1] > version:
+ nv = latest[1]
+
+ if not nv is None:
+ v = '.'.join([str(x) for x in nv])
+ info = versions[1][modname][v]
+ branch.attrib['version'] = v
+ branch.attrib['module'] = '{0}/{1}'.format(modname, info['tar.xz'])
+
+ hfile = href + modname + '/' + info['sha256sum']
+
+ ret = self.from_cache_or_url(os.path.join('hashes', modname, info['sha256sum']), hfile)
+
+ for line in ret.splitlines():
+ hash, fname = line.rstrip().split(None, 2)
+
+ if fname == os.path.basename(info['tar.xz']):
+ branch.attrib['hash'] = 'sha256:{0}'.format(hash)
+
+ print('Updated to version {0}\n'.format(v))
+ else:
+ print('Keep version {0}\n'.format(sversion))
+
+ def merge(self, modules, entry_point, overrides):
+ self.modules = {}
+ self.repos = {}
+
+ for mod in modules:
+ self.parse_module(mod)
+
+ self.required_modules = []
+ processed = set()
+
+ self.parse_module(overrides)
+
+ process = [self.modules[entry_point]]
+ processed.add(entry_point)
+
+ while len(process) != 0:
+ mod = process.pop()
+ id = mod.attrib['id']
+
+ self.required_modules.insert(0, mod)
+
+ deps = mod.findall('./dependencies/dep') + mod.findall('./after/dep') + mod.findall('./suggests/dep')
+
+ for dep in deps:
+ package = dep.attrib['package']
+
+ if package in processed:
+ continue
+
+ if not package in self.modules:
+ sys.stderr.write('Package dependency is not in modules... {0}\n'.format(package))
+ sys.exit(1)
+
+ processed.add(package)
+ process.insert(0, self.modules[package])
+
+ def write(self, f):
+ needed_repos = {}
+
+ for mod in self.required_modules:
+ branch = mod.find('./branch')
+
+ if not branch is None and 'repo' in branch.attrib:
+ needed_repos[branch.attrib['repo']] = self.repos[branch.attrib['repo']]
+
+ try:
+ os.makedirs('.cache')
+ except:
+ pass
+
+ for mod in self.required_modules:
+ self.copy_patches(mod)
+ self.update_module(mod)
+
+ with open(f, 'w') as f:
+ root = ET.Element('moduleset')
+
+ repos = needed_repos.values()
+ repos.sort(lambda a, b: cmp(a.attrib['name'], b.attrib['name']))
+
+ for repo in repos:
+ root.append(repo)
+
+ for mod in self.required_modules:
+ root.append(mod)
+
+ ret = ET.ElementTree(root)
+
+ content = ET.tostring(ret, pretty_print=True, xml_declaration=True, encoding='utf-8', doctype='<!DOCTYPE moduleset SYSTEM "moduleset.dtd">')
+ f.write(content)
+
+shutil.rmtree('modulesets', ignore_errors=True)
+
+os.makedirs('modulesets')
+os.makedirs('modulesets/patches')
+
+allf = glob.glob('.gtk-osx/modulesets-stable/*.modules')
+
+nobs = [x for x in allf if os.path.basename(x) != 'bootstrap.modules']
+bs = [x for x in allf if os.path.basename(x) == 'bootstrap.modules']
+
+m = Merger()
+
+m.merge(nobs, 'gedit-meta', 'gedit-overrides.modules')
+m.write('modulesets/gedit.modules')
+
+m.merge(bs, 'meta-bootstrap', 'gedit-bootstrap-overrides.modules')
+m.write('modulesets/bootstrap.modules')
+
+print('New modules have been written to "modulesets"')
+
+# vi:ts=4:et