diff options
author | Brian Tarricone <brian@tarricone.org> | 2008-10-12 08:40:41 +0000 |
---|---|---|
committer | Brian Tarricone <brian@tarricone.org> | 2008-10-12 08:40:41 +0000 |
commit | c54398798510d8c9c71748f0d781ff617e3bdb88 (patch) | |
tree | 4e676de8654c3416de1f402f212d9ca94c167a4b /scripts | |
parent | e716ab83cf0bc4c6065c0fe17c7ca2589617bb9e (diff) | |
download | xfce4-dev-tools-c54398798510d8c9c71748f0d781ff617e3bdb88.tar.gz |
* scripts/xdt-autogen.in: Only attempt to patch intltool merge for
versions of intltool < 0.40.0. Versions starting from 0.40.4 are
fixed, and earlier 0.40.x versions aren't patchable because they
use a systemwide copy of intltool-merge.
(Old svn revision: 28165)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/xdt-autogen.in | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/scripts/xdt-autogen.in b/scripts/xdt-autogen.in index e52de4a..4626bd2 100644 --- a/scripts/xdt-autogen.in +++ b/scripts/xdt-autogen.in @@ -59,9 +59,28 @@ EOF ## ## This fixes a bug in intltool-merge that fails to merge translations -## for .desktop file keys that have a '-' or '_' char in them. +## for .desktop file keys that have a '-' or '_' char in them. this +## is fixed in intltool 0.40.4. ## patch_intltool_merge() { + verstring=`$XDT_PROG_INTLTOOLIZE --version | cut -d' ' -f4` + ver_major=`echo $verstring | cut -d. -f1` + ver_minor=`echo $verstring | cut -d. -f2` + ver_micro=`echo $verstring | cut -d. -f3` + + if test "$ver_major" -a "$ver_minor" -a "$ver_micro"; then + test $ver_major -gt 0 && return 0 + test $ver_minor -gt 40 && return 0 + test $ver_minor -eq 40 -a $ver_micro -ge 4 && return 0 + if test $ver_minor -eq 40 -a $ver_micro -lt 4; then + echo "WARNING: Unable to patch intltool-merge from versions 0.40.0 through 0.40.3." + echo "WARNING: Generated .desktop files may be invalid." + return 0 # already printed an error; just pretend success + fi + fi + + # attempt to patch, and hope it works... + test -z "$@" && echo 'Patching intltool-merge.in ...' echo '--- intltool-merge.in.orig 2008-08-24 19:02:59.000000000 -0700 +++ intltool-merge.in 2008-08-24 19:03:12.000000000 -0700 @@ -1182,9 +1182,9 @@ @@ -374,7 +393,6 @@ for configure_file in ${CONFIGURE_FILES}; do cd "${source_dir}" && ${XDT_PROG_INTLTOOLIZE} --automake --copy --force) || exit 1 if patch_intltool_merge --dry-run; then - echo 'Patching intltool-merge.in ...' patch_intltool_merge else echo 'WARNING: Failed to patch intltool-merge.in!' |