[gtksourceview/wip/exterminate-intltool] build: get rid of intltool



commit b951a020453290aa5de32a5739706d3f85b63dbb
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Aug 12 10:17:45 2015 +0200

    build: get rid of intltool
    
    intltool is unmaintained, hacks are needed to run make distcheck with
    the latest Automake version, gettext has all the features that we need.

 Makefile.am            |   25 ++++++++++-----
 autogen.sh             |    1 -
 configure.ac           |    7 ++--
 data/glade/Makefile.am |    2 -
 po/Makevars            |   78 ++++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in         |    2 +-
 6 files changed, 99 insertions(+), 16 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e97c569..5ab1af0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,20 +6,12 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = gtksourceview-3.0.pc
 
 EXTRA_DIST = \
-       intltool-extract.in \
-       intltool-merge.in \
-       intltool-update.in \
        gtksourceview.doap \
        gtksourceview-3.0.pc.in \
        gtksourceview-zip.in \
        HACKING \
        MAINTAINERS
 
-DISTCLEANFILES = \
-       intltool-extract \
-       intltool-merge \
-       intltool-update
-
 MAINTAINERCLEANFILES =                 \
        ABOUT-NLS               \
        aclocal.m4              \
@@ -33,18 +25,31 @@ MAINTAINERCLEANFILES =              \
        INSTALL                 \
        install-sh              \
        ltmain.sh               \
+       m4/ax_append_compile_flags.m4 \
+       m4/ax_append_flag.m4    \
+       m4/ax_check_compile_flag.m4 \
+       m4/ax_code_coverage.m4  \
+       m4/ax_compiler_flags_cflags.m4 \
+       m4/ax_compiler_flags_gir.m4 \
+       m4/ax_compiler_flags_ldflags.m4 \
+       m4/ax_compiler_flags.m4 \
+       m4/ax_is_release.m4     \
+       m4/ax_require_defined.m4 \
        m4/codeset.m4           \
+       m4/extern-inline.m4     \
+       m4/fcntl-o.m4           \
        m4/gettext.m4           \
        m4/glibc21.m4           \
        m4/glibc2.m4            \
+       m4/gtk-3.0.m4           \
        m4/gtk-doc.m4           \
        m4/iconv.m4             \
        m4/intdiv0.m4           \
        m4/intldir.m4           \
        m4/intl.m4              \
        m4/intlmacosx.m4        \
-       m4/intltool.m4          \
        m4/intmax.m4            \
+       m4/introspection.m4     \
        m4/inttypes_h.m4        \
        m4/inttypes-pri.m4      \
        m4/lcmessage.m4         \
@@ -59,11 +64,13 @@ MAINTAINERCLEANFILES =              \
        m4/ltsugar.m4           \
        m4/ltversion.m4         \
        m4/nls.m4               \
+       m4/pkg.m4               \
        m4/po.m4                \
        m4/printf-posix.m4      \
        m4/progtest.m4          \
        m4/size_max.m4          \
        m4/stdint_h.m4          \
+       m4/threadlib.m4         \
        m4/uintmax_t.m4         \
        m4/visibility.m4        \
        m4/wchar_t.m4           \
diff --git a/autogen.sh b/autogen.sh
index b277d73..8e0c5e8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -25,7 +25,6 @@ set -x
 aclocal --install || exit 1
 glib-gettextize --force --copy || exit 1
 gtkdocize --copy || exit 1
-intltoolize --force --copy --automake || exit 1
 autoreconf --verbose --force --install -Wno-portability || exit 1
 
 cd $olddir
diff --git a/configure.ac b/configure.ac
index f51e405..b8639ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,9 +130,10 @@ AS_IF([ test "$glade_catalog" = "yes" ],
         AC_MSG_RESULT([$GLADE_CATALOG_DIR])
         AC_SUBST(GLADE_CATALOG_DIR)])
 
-# i18N stuff
-AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
-IT_PROG_INTLTOOL([0.40])
+# i18n
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.4])
+
 AS_IF([test "$USE_NLS" = "yes"],
       [AC_DEFINE([ENABLE_NLS], [1], [Defined if native language support should be enabled.])])
 
diff --git a/data/glade/Makefile.am b/data/glade/Makefile.am
index 989da7a..81106f0 100644
--- a/data/glade/Makefile.am
+++ b/data/glade/Makefile.am
@@ -10,6 +10,4 @@ validate: $(catalog_DATA)
 
 CLEANFILES = $(catalog_DATA)
 
- INTLTOOL_XML_NOMERGE_RULE@
-
 -include $(top_srcdir)/git.mk
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..1278954
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,78 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(GETTEXT_PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = The GtkSourceView team
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty.  If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU = no
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT)
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context.  Possible values are "yes" and "no".  Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+#   --previous            to keep previous msgids of translated messages,
+#   --quiet               to reduce the verbosity.
+MSGMERGE_OPTIONS = --quiet
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed.  Possible values are "yes" and "no".  Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = no
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist".  Possible values are "yes" and
+# "no".  Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = yes
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 66eed22..22cbf50 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -135,7 +135,7 @@ gtksourceview/gtksourcecompletioncontext.c
 gtksourceview/gtksourcecompletioninfo.c
 gtksourceview/gtksourcecompletionitem.c
 gtksourceview/gtksourcecompletionmodel.c
-[type: gettext/glade]gtksourceview/gtksourcecompletion.ui
+gtksourceview/gtksourcecompletion.ui
 gtksourceview/gtksourcecontextengine.c
 gtksourceview/gtksourceencoding.c
 gtksourceview/gtksourcefile.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]