CMake part of using po4a-updatepo instead of po4a-gettextize

Cherry-picks the important part of 5b53be5d2a from master, making
the script use `PO4A-UPDATEPO_EXECUTABLE` instead of
`PO4A-GETTEXTIZE_EXECUTABLE`. In contrast to the master branch's
commit, this makes no changes to FindTranslationTools.cmake, so
`PO4A-GETTEXTIZE_EXECUTABLE` will still be defined in that script.
It's simply that that script has been extensively rewritten in
master, and I don't see a point in porting that part of the change.

The design of po4a seems to expect it to act as a build system,
running with a config file telling it which files to build. In
version 0.68-1, the po4a-gettextize tool has changed to error out
with a comment that it's not being run the way it expects.

See https://bugs.debian.org/1020821

po4a-updatepo works for now with 0.68-1, although it prints a deprecation
message.
This commit is contained in:
Steve Cotton 2023-05-20 19:23:14 +02:00 committed by Steve Cotton
parent 600a0ec98a
commit 364a5ad390

View file

@ -34,7 +34,9 @@ if(ENABLE_POT_UPDATE_TARGET)
add_custom_command(
OUTPUT ${PROJECT_SOURCE_DIR}/po/wesnoth-manual/wesnoth-manual.pot
COMMAND ${PO4A-GETTEXTIZE_EXECUTABLE} ${PO4A-GETTEXTIZE_OPTIONS}
COMMAND ${PO4A-UPDATEPO_EXECUTABLE} ${PO4A-UPDATEPO_OPTIONS}
--copyright-holder "Wesnoth Development Team"
-f docbook
-m ${CMAKE_CURRENT_SOURCE_DIR}/manual.en.xml
-p wesnoth-manual.pot
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/manual.en.xml