[baobab] Stop using intltool
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] Stop using intltool
- Date: Mon, 8 Aug 2016 13:46:52 +0000 (UTC)
commit ade56d07e0627aebf38dbd1a2efe399025c22aac
Author: Stefano Facchini <stefano facchini gmail com>
Date: Mon Aug 8 11:52:57 2016 +0200
Stop using intltool
autogen.sh | 8 +--
configure.ac | 7 +-
data/Makefile.am | 15 ++--
data/org.gnome.baobab.appdata.xml.in | 4 +-
data/org.gnome.baobab.desktop.in.in | 6 +-
...a.xml.in.in => org.gnome.baobab.gschema.xml.in} | 16 ++--
git.mk | 86 +++++++++++++++----
po/Makevars | 78 ++++++++++++++++++
po/POTFILES.in | 6 +-
po/POTFILES.skip | 4 +-
10 files changed, 174 insertions(+), 56 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index d4a5cf0..edfaf1f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -13,12 +13,6 @@ if test -z $AUTORECONF; then
exit 1
fi
-INTLTOOLIZE=`which intltoolize`
-if test -z $INTLTOOLIZE; then
- echo "*** No intltoolize found, please install the intltool package ***"
- exit 1
-fi
-
GNOMEDOC=`which yelp-build`
if test -z $GNOMEDOC; then
echo "*** The tools to build the documentation are not found,"
@@ -27,7 +21,7 @@ if test -z $GNOMEDOC; then
fi
autopoint --force || exit $?
-AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
+autoreconf --force --install --verbose
cd $OLDDIR
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
index c516a4b..580db40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,11 +14,8 @@ AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability foreign])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
-# i18n stuff
-IT_PROG_INTLTOOL(0.40.0)
-
AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT_VERSION([0.19.8])
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST([GETTEXT_PACKAGE])
@@ -50,7 +47,7 @@ PKG_CHECK_MODULES(BAOBAB, [
AC_CONFIG_FILES([
Makefile
data/Makefile
-data/org.gnome.baobab.gschema.xml.in
+data/org.gnome.baobab.gschema.xml
help/Makefile
pixmaps/Makefile
src/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 3bd760a..8f7ebc0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -7,11 +7,16 @@ baobabapp_DATA = $(baobabapp_in_files:.desktop.in=.desktop)
$(baobabapp_in_files): $(baobabapp_in_files:.desktop.in=.desktop.in.in)
sed -e "s|\@VERSION\@|@VERSION@|" $< > $@
-@INTLTOOL_DESKTOP_RULE@
+$(baobabapp_DATA): $(baobabapp_in_files)
+ $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
appdatadir = $(datadir)/appdata
appdata_in_files = org.gnome.baobab.appdata.xml.in
-appdata_DATA = $(appdata_in_files:.xml.in=.xml)
+appdata_XML = $(appdata_in_files:.appdata.xml.in=.appdata.xml)
+
+$(appdata_XML): $(appdata_in_files)
+ $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
dbusservicedir = $(datadir)/dbus-1/services
dbusservice_DATA = org.gnome.baobab.service
@@ -24,10 +29,6 @@ org.gnome.baobab.service: Makefile
gsettingsschema_in_files = org.gnome.baobab.gschema.xml.in
gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
-.PRECIOUS: $(gsettings_SCHEMAS)
-
-@INTLTOOL_XML_NOMERGE_RULE@
-
@GSETTINGS_RULES@
man_MANS = baobab.1
@@ -44,7 +45,7 @@ CLEANFILES = \
$(baobabapp_in_files) \
$(baobabapp_DATA) \
$(gsettings_SCHEMAS) \
- $(appdata_DATA) \
+ $(appdata_XML) \
org.gnome.baobab.service \
$(NULL)
diff --git a/data/org.gnome.baobab.appdata.xml.in b/data/org.gnome.baobab.appdata.xml.in
index f0866c1..671dac7 100644
--- a/data/org.gnome.baobab.appdata.xml.in
+++ b/data/org.gnome.baobab.appdata.xml.in
@@ -3,11 +3,11 @@
<id type="desktop">org.gnome.baobab.desktop</id>
<licence>CC0</licence>
<description>
- <_p>
+ <p>
A simple application which can scan either specific folders
(local or remote) or volumes and give a graphical representation
including each directory size or percentage.
- </_p>
+ </p>
</description>
<screenshots>
<screenshot type="default" width="932"
height="618">https://git.gnome.org/browse/baobab/plain/data/baobab.png</screenshot>
diff --git a/data/org.gnome.baobab.desktop.in.in b/data/org.gnome.baobab.desktop.in.in
index 03dcbd2..a25f47c 100644
--- a/data/org.gnome.baobab.desktop.in.in
+++ b/data/org.gnome.baobab.desktop.in.in
@@ -1,7 +1,7 @@
[Desktop Entry]
-_Name=Disk Usage Analyzer
-_Comment=Check folder sizes and available disk space
-_Keywords=storage;space;cleanup;
+Name=Disk Usage Analyzer
+Comment=Check folder sizes and available disk space
+Keywords=storage;space;cleanup;
TryExec=baobab
Exec=baobab
Icon=baobab
diff --git a/data/org.gnome.baobab.gschema.xml.in.in b/data/org.gnome.baobab.gschema.xml.in
similarity index 64%
rename from data/org.gnome.baobab.gschema.xml.in.in
rename to data/org.gnome.baobab.gschema.xml.in
index 1a55f7b..b966340 100644
--- a/data/org.gnome.baobab.gschema.xml.in.in
+++ b/data/org.gnome.baobab.gschema.xml.in
@@ -6,8 +6,8 @@
<schema id="org.gnome.baobab.preferences" path="/org/gnome/baobab/preferences/">
<key name="excluded-uris" type="as">
<default>[]</default>
- <_summary>Excluded partitions URIs</_summary>
- <_description>A list of URIs for partitions to be excluded from scanning.</_description>
+ <summary>Excluded partitions URIs</summary>
+ <description>A list of URIs for partitions to be excluded from scanning.</description>
</key>
</schema>
<schema id="org.gnome.baobab.ui" path="/org/gnome/baobab/ui/">
@@ -17,18 +17,18 @@
<choice value='treemap'/>
</choices>
<default>'rings'</default>
- <_summary>Active Chart</_summary>
- <_description>Which type of chart should be displayed.</_description>
+ <summary>Active Chart</summary>
+ <description>Which type of chart should be displayed.</description>
</key>
<key name="window-size" type="(ii)">
<default>(960, 600)</default>
- <_summary>Window size</_summary>
- <_description>The initial size of the window</_description>
+ <summary>Window size</summary>
+ <description>The initial size of the window</description>
</key>
<key name="window-state" type="i">
<default>0</default>
- <_summary>Window state</_summary>
- <_description>The GdkWindowState of the window</_description>
+ <summary>Window state</summary>
+ <description>The GdkWindowState of the window</description>
</key>
</schema>
</schemalist>
diff --git a/git.mk b/git.mk
index 784719f..d3c0e35 100644
--- a/git.mk
+++ b/git.mk
@@ -1,4 +1,5 @@
-# git.mk
+# git.mk, a small Makefile to autogenerate .gitignore files
+# for autotools-based projects.
#
# Copyright 2009, Red Hat, Inc.
# Copyright 2010,2011,2012,2013 Behdad Esfahbod
@@ -9,7 +10,8 @@
# notice and this notice are preserved.
#
# The latest version of this file can be downloaded from:
-# https://raw.github.com/behdad/git.mk/master/git.mk
+GIT_MK_URL = https://raw.githubusercontent.com/behdad/git.mk/master/git.mk
+#
# Bugs, etc, should be reported upstream at:
# https://github.com/behdad/git.mk
#
@@ -45,7 +47,8 @@
# build dir.
#
# This file knows how to handle autoconf, automake, libtool, gtk-doc,
-# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu.
+# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata,
+# appstream.
#
# This makefile provides the following targets:
#
@@ -77,39 +80,47 @@ GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/configure.scan \
- `AUX_DIR=$(srcdir)/$$($(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' $(srcdir)/configure.ac); \
+ `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \
test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \
for x in \
ar-lib \
compile \
config.guess \
+ config.rpath \
config.sub \
depcomp \
install-sh \
ltmain.sh \
missing \
mkinstalldirs \
+ test-driver \
+ ylwrap \
; do echo "$$AUX_DIR/$$x"; done` \
- `$(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' $(srcdir)/configure.ac | \
+ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \
head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done`
#
# All modules should also be fine including the following variable, which
# removes automake-generated Makefile.in files:
GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \
- `$(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' $(srcdir)/configure.ac | \
+ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \
while read f; do \
case $$f in Makefile|*/Makefile) \
test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \
done`
#
-# Modules that use libtool /and/ use AC_CONFIG_MACRO_DIR([m4]) may also
-# include this:
+# Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this,
+# though it's harmless to include regardless.
GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \
- $(srcdir)/m4/libtool.m4 \
- $(srcdir)/m4/ltoptions.m4 \
- $(srcdir)/m4/ltsugar.m4 \
- $(srcdir)/m4/ltversion.m4 \
- $(srcdir)/m4/lt~obsolete.m4
+ `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1'
./configure.ac); \
+ if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \
+ for x in \
+ libtool.m4 \
+ ltoptions.m4 \
+ ltsugar.m4 \
+ ltversion.m4 \
+ lt~obsolete.m4 \
+ ; do echo "$$MACRO_DIR/$$x"; done; \
+ fi`
@@ -141,7 +152,10 @@ git-mk-install:
fi; \
fi; done; test -z "$$any_failed"
-.PHONY: git-all git-mk-install
+git-mk-update:
+ wget $(GIT_MK_URL) -O $(top_srcdir)/git.mk
+
+.PHONY: git-all git-mk-install git-mk-update
@@ -158,8 +172,24 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(DOC_MODULE)-decl.txt \
tmpl/$(DOC_MODULE)-unused.sgml \
"tmpl/*.bak" \
+ $(REPORT_FILES) \
+ $(DOC_MODULE).pdf \
xml html \
; do echo "/$$x"; done; \
+ FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \
+ case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \
+ if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-types"; then \
+ echo "/$(DOC_MODULE).types"; \
+ fi; \
+ if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-sections"; then \
+ echo "/$(DOC_MODULE)-sections.txt"; \
+ fi; \
+ if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+ for x in \
+ $(SETUP_FILES) \
+ $(DOC_MODULE).types \
+ ; do echo "/$$x"; done; \
+ fi; \
fi; \
if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
for lc in $(DOC_LINGUAS); do \
@@ -194,8 +224,19 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(gsettings__enum_file) \
; do echo "/$$x"; done; \
fi; \
+ if test "x$(appdata_XML)" = x; then :; else \
+ for x in \
+ $(appdata_XML:.xml=.valid) \
+ ; do echo "/$$x"; done; \
+ fi; \
+ if test "x$(appstream_XML)" = x; then :; else \
+ for x in \
+ $(appstream_XML:.xml=.valid) \
+ ; do echo "/$$x"; done; \
+ fi; \
if test -f $(srcdir)/po/Makefile.in.in; then \
for x in \
+ ABOUT-NLS \
po/Makefile.in.in \
po/Makefile.in.in~ \
po/Makefile.in \
@@ -204,6 +245,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
po/POTFILES \
po/Rules-quot \
po/stamp-it \
+ po/stamp-po \
po/.intltool-merge-cache \
"po/*.gmo" \
"po/*.header" \
@@ -235,7 +277,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
if test "x$(am__dirstamp)" = x; then :; else \
echo "$(am__dirstamp)"; \
fi; \
- if test "x$(LTCOMPILE)" = x; then :; else \
+ if test "x$(findstring libtool,$(LTCOMPILE))" = x -a "x$(findstring libtool,$(LTCXXCOMPILE))"
= x -a "x$(GTKDOC_RUN)" = x; then :; else \
for x in \
"*.lo" \
".libs" "_libs" \
@@ -250,7 +292,12 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \
so_locations \
$(MOSTLYCLEANFILES) \
- "*.$(OBJEXT)" \
+ $(TEST_LOGS) \
+ $(TEST_LOGS:.log=.trs) \
+ $(TEST_SUITE_LOG) \
+ $(TESTS:=.test) \
+ "*.gcda" \
+ "*.gcno" \
$(DISTCLEANFILES) \
$(am__CONFIG_DISTCLEAN_FILES) \
$(CONFIG_CLEAN_FILES) \
@@ -258,11 +305,10 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
"*.tab.c" \
$(MAINTAINERCLEANFILES) \
$(BUILT_SOURCES) \
- $(DEPDIR) \
$(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \
$(filter %_vala.stamp,$(DIST_COMMON)) \
$(filter %.vapi,$(DIST_COMMON)) \
- $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))) \
+ $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter
%.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \
Makefile \
Makefile.in \
"*.orig" \
@@ -272,6 +318,10 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
".*.sw[nop]" \
".dirstamp" \
; do echo "/$$x"; done; \
+ for x in \
+ "*.$(OBJEXT)" \
+ $(DEPDIR) \
+ ; do echo "$$x"; done; \
} | \
sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
sed 's@/[.]/@/@g' | \
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..0648ec7
--- /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 = $(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 = Free Software Foundation, Inc.
+
+# 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 =
+
+# 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 =
+
+# 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 =
+
+# 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 = yes
+
+# 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 aadc0a3..95dfd46 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,10 +2,10 @@
# Please keep this file sorted alphabetically.
data/org.gnome.baobab.appdata.xml.in
data/org.gnome.baobab.desktop.in.in
-data/org.gnome.baobab.gschema.xml.in.in
+data/org.gnome.baobab.gschema.xml.in
src/baobab-application.vala
src/baobab-cellrenderers.vala
src/baobab-location.vala
-[type: gettext/glade]src/baobab-main-window.ui
+src/baobab-main-window.ui
src/baobab-window.vala
-[type: gettext/glade]src/menus.ui
+src/menus.ui
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 3759dde..0e11c6e 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,10 +1,8 @@
# List of source files that should *not* be translated.
# Please keep this file sorted alphabetically.
data/org.gnome.baobab.desktop.in
-data/org.gnome.baobab.gschema.xml.in
src/baobab-application.c
src/baobab-cellrenderers.c
src/baobab-location.c
src/baobab-window.c
-sub/data/org.gnome.baobab.desktop.in
-sub/data/org.gnome.baobab.gschema.xml.in
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]