Skip to content

Commit

Permalink
build: Migrate from intltool to gettext
Browse files Browse the repository at this point in the history
Drop the outdated intltool dependency, prefer recent gettext. Also
drop the deprecated gnome-common dependency.

  https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration
  https://wiki.gnome.org/Projects/GnomeCommon/Migration

storaged-project#629
  • Loading branch information
t-chaik committed Feb 28, 2019
1 parent 14973f8 commit bde057a
Show file tree
Hide file tree
Showing 22 changed files with 234 additions and 137 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ doc/udisks2.interfaces
doc/udisks2.prerequisites
doc/*.signals
gtk-doc.make
intltool-*
libtool
m4/
po/POTFILES
Expand Down
33 changes: 24 additions & 9 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=$(dirname "$0")
test -n "$srcdir" || srcdir=.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
olddir=$(pwd)

(test -f $srcdir/src/Makefile.am) || {
cd "$srcdir"

(test -f configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
echo " top-level project directory"
exit 1
}

which gnome-autogen.sh || {
echo "You need to install gnome-common"
exit 1
}
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)

gtkdocize --copy || exit 1
autoreconf --verbose --force --install || exit 1

cd "$olddir"

if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure --enable-gtk-doc "$@" || exit 1

. gnome-autogen.sh --enable-gtk-doc "$@"
if [ "$1" = "--help" ]; then
exit 0
else
echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
fi
7 changes: 3 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ AC_PROG_LIBTOOL
# Compilation
#

GNOME_COMPILE_WARNINGS([maximum])

CC_CHECK_CFLAGS_APPEND([ \
-Wall \
-W \
Expand Down Expand Up @@ -654,10 +652,11 @@ fi
# Internationalization
#

IT_PROG_INTLTOOL([$INTLTOOL_REQUIRED])
AM_GNU_GETTEXT_VERSION([0.19.8])
AM_GNU_GETTEXT([external])

GETTEXT_PACKAGE=udisks2
AC_SUBST([GETTEXT_PACKAGE])
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])

AC_DEFINE([PROJECT_SYSCONF_DIR], ["udisks2"], [Project configuration directory])
Expand Down
5 changes: 3 additions & 2 deletions data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = org.freedesktop.UDisks2.policy.in
polkit_DATA = $(polkit_in_files:.policy.in=.policy)

$(polkit_DATA): $(polkit_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@

completionsdir = $(datadir)/bash-completion/completions
completions_DATA = \
completions/udisksctl \
$(NULL)

@INTLTOOL_POLICY_RULE@

EXTRA_DIST = \
80-udisks2.rules \
org.freedesktop.UDisks2.xml \
Expand Down
Loading

0 comments on commit bde057a

Please sign in to comment.