* configure.in: Multiple improvements.

* config.guess, config.sub: newer versions.
	* autogen.sh: Better gnome-common message.
	* src/TipOfDay.py (TipParser): skip messages with xml:lang
	attribute, because these are already supplied in the po file.


svn: r6162
This commit is contained in:
Alex Roitman 2006-03-17 19:15:16 +00:00
parent 626349a7a2
commit 9577aba0bf
6 changed files with 61 additions and 60 deletions

View File

@ -1,3 +1,10 @@
2006-03-17 Alex Roitman <shura@gramps-project.org>
* configure.in: Multiple improvements.
* config.guess, config.sub: newer versions.
* autogen.sh: Better gnome-common message.
* src/TipOfDay.py (TipParser): skip messages with xml:lang
attribute, because these are already supplied in the po file.
2006-03-16 Alex Roitman <shura@gramps-project.org>
* various: Use TransUtils.sgettext instead of gettext.gettext to
work out stripping the context.

View File

@ -15,7 +15,7 @@ PKG_NAME="gramps"
}
which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME CVS"
echo "You need to install gnome-common package."
exit 1
}
REQUIRED_AUTOMAKE_VERSION=1.6 USE_GNOME2_MACROS=1 . gnome-autogen.sh

8
config.guess vendored
View File

@ -1,10 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2006-03-13'
timestamp='2006-02-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -781,6 +780,9 @@ EOF
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS_NT-*:*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32

19
config.sub vendored
View File

@ -1,10 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2006-03-07'
timestamp='2006-02-23'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -275,10 +274,10 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
@ -359,11 +358,11 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@ -1129,7 +1128,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)

View File

@ -34,19 +34,6 @@ AM_PACKAGER
AC_SUBST(RELEASE)
AC_SUBST(VERSIONSTRING)
AC_PATH_PROG(MSGFMT, msgfmt,no)
if test x$MSGFMT = xno; then
AC_MSG_ERROR(Couldn't find msgfmt program. Please install the GNU gettext package.)
fi
AC_PATH_PROG(MSGCONV, msgconv,no)
if test x$MSGCONV = xno; then
AC_MSG_ERROR(Couldn't find msgconv program. Please install the GNU gettext package.)
fi
AC_PATH_PROG(ICONV, iconv,no)
if test x$ICONV = xno; then
AC_MSG_ERROR(Couldn't find iconv program.)
fi
dnl Add the languages which your application supports here.
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl no pl pt_BR ro ru sv eo fi lt sk"
GETTEXT_PACKAGE=gramps
@ -67,9 +54,9 @@ try:
except ImportError:
pass
def out(str):
def out(line):
f = open('conftest.out', 'w')
f.write(str)
f.write(line)
f.close()
"
@ -80,24 +67,25 @@ try:
import gobject
version = gobject.pygtk_version
if version >= (2,3,4):
out("YES")
print_version = '.'.join([[str(i) for i in version]])
out(print_version)
else:
out("No")
out("NO")
except ImportError:
out("No")
out("NO")
except AttributeError:
out("No")
out("NO")
EOF
$PYTHON conftest.py
has_pygtk=`cat conftest.out`
rm -f conftest.out conftest.py
if test YES != "$has_pygtk"
if test NO = "$has_pygtk"
then
AC_MSG_ERROR([
**** The python bindings for gtk 2.4 (pygtk2>=2.3.4) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_RESULT($has_pygtk)
AC_MSG_CHECKING(Python bindings for gnome)
cat > conftest.py <<EOF
@ -108,63 +96,66 @@ try:
# display cannot be opened. Just search it.
import imp
imp.find_module('gnome/ui')
out("YES")
out("gnome.ui")
except ImportError:
out("NO")
EOF
$PYTHON conftest.py
has_pygnome=`cat conftest.out`
rm -f conftest.out conftest.py
if test YES != "$has_pygnome"
if test NO = "$has_pygnome"
then
AC_MSG_ERROR([
**** The python bindings for gnome 2.0 (gnome-python2) could not be found.])
**** The python bindings for gnome 2.0 (gnome2-python) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_RESULT($has_pygnome)
AC_MSG_CHECKING(Python bindings for gconf)
cat > conftest.py <<EOF
$pygtk_require
try:
import gconf
out("YES")
out("gconf")
except ImportError:
import gnome.gconf
out("YES")
out("gnome.gconf")
except ImportError:
out("NO")
EOF
$PYTHON conftest.py
has_gconf=`cat conftest.out`
rm -f conftest.out conftest.py
if test YES != "$has_gconf"
if test NO = "$has_gconf"
then
AC_MSG_ERROR([
**** The python bindings for gconf (gnome-python2-gconf) could not be found.])
**** The python bindings for gconf (gnome2-python-gconf) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_RESULT($has_gconf)
AC_MSG_CHECKING(Python bindings for gnome vfs)
cat > conftest.py <<EOF
$pygtk_require
try:
# Do not import gnome.canvas, this can raise a RuntimeError if the
# Do not import gnome.vfs, this can raise a RuntimeError if the
# display cannot be opened. Just search it.
import imp
imp.find_module('gnome/vfs')
out("YES")
out("gnome.vfs")
except ImportError:
imp.find_module('gnomevfs')
out("gnomevfs")
except:
out("NO")
EOF
$PYTHON conftest.py
has_vfs=`cat conftest.out`
rm -f conftest.out conftest.py
if test YES != "$has_vfs"
if test NO = "$has_vfs"
then
AC_MSG_ERROR([
**** The python bindings for GNOME VFS (gnome-python2-vfs) could not be found.])
**** The python bindings for GNOME VFS (gnome2-python-vfs) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_RESULT($has_vfs)
AC_MSG_CHECKING(Python bindings for glade)
cat > conftest.py <<EOF
@ -174,20 +165,20 @@ try:
# display cannot be opened. Just search it.
import imp
imp.find_module('gtk/glade')
out("YES")
out("gtk.glade")
except ImportError:
out("NO")
EOF
$PYTHON conftest.py
has_pygtk=`cat conftest.out`
has_pyglade=`cat conftest.out`
rm -f conftest.out conftest.py
if test YES != "$has_pygtk"
if test NO = "$has_pyglade"
then
AC_MSG_ERROR([
**** The python bindings for glade (pygtk2-libglade) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_RESULT($has_pyglade)
dnl Checks for libraries.
@ -228,7 +219,10 @@ AC_SUBST(GPREFIX)
AC_CONFIG_FILES([
m4/Makefile
po/Makefile.in
Makefile
Makefile
gramps.spec
gramps.sh
src/const.py
src/Makefile
src/RelLib/Makefile
src/Config/Makefile
@ -258,8 +252,4 @@ example/Makefile
example/gramps/Makefile
])
AC_OUTPUT([
src/const.py
gramps.spec
gramps.sh
])
AC_OUTPUT

View File

@ -130,12 +130,15 @@ class TipParser:
"""
if tag == "tip":
self.tlist = []
# Skip all tips with xml:lang attribute, as they are
# already in the translation catalog
self.skip = attrs.has_key('xml:lang')
elif tag != "tips":
# let all the other tags through, except for the "tips" tag
self.tlist.append("<%s>" % tag)
def endElement(self,tag):
if tag == "tip":
if tag == "tip" and not self.skip:
text = self.escape(''.join(self.tlist))
self.mylist.append(' '.join(text.split()))
elif tag != "tips":