Commit 89818b9a authored by Romain Bouvier's avatar Romain Bouvier
Browse files

Get rid of glib-gettextize usage and XGETTEXT_ARGS custom args

- intltoolize already do all the job that glib-gettextize do (maybe
  since 10 years)
- Remove the XGETTEXT_ARGS custom feature, I can't find any projec using
  this in xfce


(cherry picked from commit 6f651e4a)
parent 47cba7c5
......@@ -66,15 +66,5 @@ AC_DEFUN([XDT_I18N],
])
AC_MSG_RESULT([$localedir])
AC_SUBST([localedir])
dnl Determine additional xgettext flags
AC_MSG_CHECKING([for additional xgettext flags])
if test x"$XGETTEXT_ARGS" = x""; then
XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8";
else
XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8";
fi
AC_SUBST([XGETTEXT_ARGS])
AC_MSG_RESULT([$XGETTEXT_ARGS])
])
......@@ -399,27 +399,6 @@ EOF
done
##
## Check for glib-gettextize
##
test -z "${XDT_PROG_GLIB_GETTEXTIZE}" && XDT_PROG_GLIB_GETTEXTIZE="glib-gettextize"
IFS=$special_IFS
for configure_ac_file in $CONFIGURE_AC_FILES; do
IFS=$default_IFS
directory=$(dirname "${configure_ac_file}")
if test -d "${directory}/po"; then
${XDT_PROG_GLIB_GETTEXTIZE} --version </dev/null >/dev/null 2>&1 || {
cat >&2 <<EOF
xdt-autogen: You must have "glib2" installed. You can get if from
ftp://ftp.gtk.org/pub/gtk/.
EOF
exit 1
}
break
fi
done
##
## Check for gtkdocize
##
......@@ -527,50 +506,12 @@ for configure_ac_file in ${CONFIGURE_AC_FILES}; do
ACLOCAL_DIR_2="${source_dir}/m4";
fi
if test -d "${source_dir}/po"; then
if test ! -f "${source_dir}/aclocal.m4"; then
echo "Creating ${source_dir}/aclocal.m4..." \
&& echo "dnl Auto-generated by xdt-autogen" > "${source_dir}/aclocal.m4" \
|| exit 1
fi
echo "Running ${XDT_PROG_GLIB_GETTEXTIZE} --force --copy..." \
&& ${XDT_PROG_GLIB_GETTEXTIZE} --force --copy \
|| exit 1
if test -f "${source_dir}/aclocal.m4" -a ! -w "${source_dir}/aclocal.m4"; then
echo "Making ${source_dir}/aclocal.m4 writable..." \
&& chmod u+w "${source_dir}/aclocal.m4" \
|| exit 1
fi
fi
if $EGREP -q "^(AC|IT)_PROG_INTLTOOL" "${configure_ac_file}"; then
( echo "Running ${XDT_PROG_INTLTOOLIZE} --automake --copy --force" \
&& cd "${source_dir}" \
&& ${XDT_PROG_INTLTOOLIZE} --automake --copy --force ) || exit 1
fi
# patch the po/Makefile.in.in to take into account the setting of
# XGETTEXT_ARGS properly
if test -f "${source_dir}/po/Makefile.in.in"; then
if ! grep -q '^XGETTEXT_ARGS[ ]*=[ ]*@XGETTEXT_ARGS@$' \
"${source_dir}/po/Makefile.in.in"
then
echo "Patching file 'po/Makefile.in.in'"
if sed \
-e 's/^\(XGETTEXT[ ]*=[ ]*@XGETTEXT@\)[ ]*$/\1 $(XGETTEXT_ARGS)/' \
-e 's/^\(MSGMERGE[ ]*=\)[ ]*\(INTLTOOL_EXTRACT=\)/\1 XGETTEXT_ARGS="$(XGETTEXT_ARGS)" \2/' \
-e 's/^\(GENPOT[ ]*=\)[ ]*\(INTLTOOL_EXTRACT=\)/\1 XGETTEXT_ARGS="$(XGETTEXT_ARGS)" \2/' \
-e "/^XGETTEXT = @XGETTEXT@/{
i\\
XGETTEXT_ARGS = @XGETTEXT_ARGS@
}" "${source_dir}/po/Makefile.in.in" > "${source_dir}/po/Makefile.in.in.tmp"
then
mv -f "${source_dir}/po/Makefile.in.in.tmp" \
"${source_dir}/po/Makefile.in.in" || exit 1
fi
fi
fi
if grep -q -e "^AC_PROG_LIBTOOL" -e "^LT_PREREQ" "${configure_ac_file}"; then
( echo "Running ${XDT_PROG_LIBTOOLIZE} --force --copy..." \
&& cd "${source_dir}" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment