mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-10-26 08:00:05 -05:00
Drop support for gettext older than 0.19.6
This commit is contained in:
1 parent
797654133b
commit
594388b765
3 files changed
+23
-64
No files matched your search
+1
-19
@@ -62,7 +62,6 @@ option (DISABLE_NLS "do not use Native Language Support" OFF)
|
||||
option (DISABLE_DEPRECATED_GLIB "don't use deprecated glib functions" OFF)
|
||||
option (DISABLE_DEPRECATED_GTK "don't use deprecated gtk, gdk or gdk-pixbuf functions" OFF)
|
||||
option (DISABLE_DEPRECATED_GNOME "don't use deprecated gnome functions" OFF)
|
||||
option (ALLOW_OLD_GETTEXT "allow to configure build with a gettext version older than 0.19.6. Some files will not be translated!" OFF)
|
||||
# ############################################################
|
||||
|
||||
# These are also settable from the command line in a similar way.
|
||||
@@ -252,24 +251,7 @@ find_path (REGEX_INCLUDE_PATH NAMES regex.h
|
||||
find_library (REGEX_LIBRARY NAMES regex)
|
||||
|
||||
# I18N
|
||||
if (ALLOW_OLD_GETTEXT)
|
||||
find_package (Gettext REQUIRED)
|
||||
else (ALLOW_OLD_GETTEXT)
|
||||
find_package (Gettext 0.19.6)
|
||||
if (NOT GETTEXT_FOUND)
|
||||
message (FATAL_ERROR "Note the build can be configured with an older version of gettext by setting ALLOW_OLD_GETTEXT=ON but then some files will not be translated:
|
||||
- gnucash.desktop (requires at least gettext 0.19)
|
||||
- gnucash.appdata.xml (requires at least gettext 0.19.6)")
|
||||
endif (NOT GETTEXT_FOUND)
|
||||
endif (ALLOW_OLD_GETTEXT)
|
||||
|
||||
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19)
|
||||
message (WARNING "Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.19 in order to handle translation of the gnucash.desktop file. The build will be configured with an untranslated gnucash.desktop file.")
|
||||
endif ()
|
||||
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19.6)
|
||||
message (WARNING "Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.19.6 in order to handle translation of the gnucash.appdata file. The build will be configured with an untranslated gnucash.appdata file.")
|
||||
endif ()
|
||||
|
||||
find_package (Gettext 0.19.6 REQUIRED)
|
||||
find_path (LIBINTL_INCLUDE_PATH NAMES libintl.h
|
||||
PATHS /usr/include /opt/gnome/include)
|
||||
find_library (LIBINTL_LIBRARY NAMES intl)
|
||||
|
||||
+1
-4
@@ -66,10 +66,7 @@ Libraries/Deps
|
||||
gtk+3 3.14.0
|
||||
guile 2.2.0 or 2.0.0
|
||||
libxml2 2.5.10
|
||||
gettext 0.19.6 Can use older if you pass
|
||||
-DALLOW_OLD_GETTEXT to cmake;
|
||||
doesn't include all file types
|
||||
when building gnucash.pot.
|
||||
gettext 0.19.6
|
||||
libxslt, including xsltproc
|
||||
ICU International Compnents for
|
||||
Unicode
|
||||
|
||||
@@ -175,30 +175,17 @@ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.appdata.xml.in.in ${VCS_INFO_FILE}
|
||||
-D SRC_DIR=${CMAKE_SOURCE_DIR}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/configure-appdata.cmake)
|
||||
|
||||
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19.6)
|
||||
# Gettext is too old to be able to merge an appdata file.
|
||||
# Fall back to providing an unmerged (and hence untranslated) appdata file.
|
||||
add_custom_command (
|
||||
OUTPUT gnucash.appdata.xml
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml
|
||||
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in ${VCS_INFO_FILE}
|
||||
)
|
||||
else()
|
||||
# FIXME: where does LC_ALL=C come from?
|
||||
add_custom_command (
|
||||
OUTPUT gnucash.appdata.xml
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
LC_ALL=C
|
||||
${GETTEXT_MSGFMT_EXECUTABLE}
|
||||
--xml --template ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
|
||||
-d ${CMAKE_SOURCE_DIR}/po
|
||||
-o gnucash.appdata.xml
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in ${VCS_INFO_FILE}
|
||||
)
|
||||
endif()
|
||||
# FIXME: where does LC_ALL=C come from?
|
||||
add_custom_command (
|
||||
OUTPUT gnucash.appdata.xml
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
LC_ALL=C
|
||||
${GETTEXT_MSGFMT_EXECUTABLE}
|
||||
--xml --template ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
|
||||
-d ${CMAKE_SOURCE_DIR}/po
|
||||
-o gnucash.appdata.xml
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in ${VCS_INFO_FILE}
|
||||
)
|
||||
|
||||
add_custom_target(gnucash-appdata ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml)
|
||||
|
||||
@@ -208,23 +195,16 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml DESTINATION ${CMA
|
||||
|
||||
configure_file(gnucash.desktop.in.in gnucash.desktop.in)
|
||||
|
||||
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19)
|
||||
# Gettext is too old to be able to merge a desktop file.
|
||||
# Fall back to providing an unmerged (and hence untranslated) desktop file.
|
||||
configure_file (${CMAKE_CURRENT_BINARY_DIR}/gnucash.desktop.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gnucash.desktop COPYONLY)
|
||||
else()
|
||||
add_custom_command (
|
||||
OUTPUT gnucash.desktop
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
LC_ALL=C
|
||||
${GETTEXT_MSGFMT_EXECUTABLE}
|
||||
--desktop --template gnucash.desktop.in
|
||||
-d ${CMAKE_SOURCE_DIR}/po
|
||||
-o gnucash.desktop
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.desktop.in
|
||||
)
|
||||
endif()
|
||||
add_custom_command (
|
||||
OUTPUT gnucash.desktop
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
LC_ALL=C
|
||||
${GETTEXT_MSGFMT_EXECUTABLE}
|
||||
--desktop --template gnucash.desktop.in
|
||||
-d ${CMAKE_SOURCE_DIR}/po
|
||||
-o gnucash.desktop
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.desktop.in
|
||||
)
|
||||
|
||||
add_custom_target(gnucash-desktop ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.desktop)
|
||||
|
||||
|
||||
Reference in new issue
Block a user