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

Bug#283858: admin/cvs.sh/extract_messages: location of kde.pot



Hello,

  kde-config supports '--install include' for a while now, so I wonder
  if it wouldn't make sense to use that to determine the location of the
  kde.pot file in admin/cvs.sh. As in:

--- admin/cvs.sh~       2005-02-23 12:56:27.000000000 +0100
+++ admin/cvs.sh        2005-03-12 05:30:10.769470902 +0100
@@ -561,7 +561,7 @@
    fi
    perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile

-   kdepotpath=${includedir:-${KDEDIR:-`kde-config --prefix`}/include}/kde.pot
+   kdepotpath=${includedir:-`kde-config --expandvars --install include`}/kde.pot

    $MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" srcdir=. \
        XGETTEXT="${XGETTEXT:-xgettext} --foreign-user -C -ci18n -ki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 -kaliasLocale -x $kdepotpath" messages

  Otherwise, the location is bogus for systems with $includedir !=
  $prefix/include, such as Debian (we use /usr/include/kde). See e.g.
  http://bugs.debian.org/283858.

  If support for KDEDIR is important, one could use:

    prefix=${KDEDIR:-`kde-config --prefix`}
    kdepotpath=${includedir:-$(eval echo `kde-config --install include`)}/kde.pot

  If any of the above has flaws, I'll be glad to get noticed.

  Thanks,

-- 
Adeodato Simó
    EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621
 
You cannot achieve the impossible without attempting the absurd.




Reply to: