From 31d82a2be4506259512ee4ed075eadb76750139f Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Sat, 5 Sep 2020 17:24:17 +0200 Subject: [PATCH] added appstream as a build requirement appstream provides the metainfo.its file which is required for xgettext to extract the translation strings of the src/ui/gui/org.fsf.pspp.metainfo.xml.in file The metainfo.its file is located in /usr/share/gettext/its on debian and on opensuse. It is provided by the packages debian: appstream opensuse: AppStream-devel --- INSTALL | 5 +++++ configure.ac | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/INSTALL b/INSTALL index 90be90902c..6f970f4706 100644 --- a/INSTALL +++ b/INSTALL @@ -76,6 +76,11 @@ The following packages are required to install PSPP: * libxml2 (http://xmlsoft.org/). + * metainfo.its, provided by the appstream package. This is required + by xgettext to extract the translation strings from the + org.fsf.pspp.metainfo.xml.in file. This is only required for + building. It is not a runtime requirement. + The following packages are required to enable PSPP's graphing features. If you cannot arrange to install them, you must run `configure' with --without-cairo (in which case you will get no graphing diff --git a/configure.ac b/configure.ac index 61d5ae7857..ab68fe2e13 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,22 @@ if test "x$MSGFMT" = x; then PSPP_REQUIRED_PREREQ([msgfmt (is usually provided with gettext)]) fi +AC_CHECK_PROGS([XGETTEXT], [xgettext]) +if test "x$XGETTEXT" = x; then + PSPP_REQUIRED_PREREQ([xgettext (is usually provided with gettext)]) +fi +dnl appstream required for metainfo.its +dnl if metainfo.its is not there, then the following small +dnl file will not produce an outputfile +$as_echo '' > test.metainfo.xml.in +$as_echo '' >> test.metainfo.xml.in +$as_echo 'Hallo' >> test.metainfo.xml.in +$as_echo '' >> test.metainfo.xml.in +xgettext -o mifc.po test.metainfo.xml.in +if ! test -f ./mifc.po ; then + PSPP_REQUIRED_PREREQ([appstream 0.12 or later for metainfo.its]) +fi +rm -f mifc.po test.metainfo.xml.in dnl Checks for libraries. AC_SYS_LARGEFILE -- 2.30.2