summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/poppler/poppler/0001-Don-t-update-pdfsig.pot-when-POT-Creation-date-is-th.patch127
-rw-r--r--meta-oe/recipes-support/poppler/poppler_25.01.0.bb (renamed from meta-oe/recipes-support/poppler/poppler_24.12.0.bb)3
2 files changed, 1 insertions, 129 deletions
diff --git a/meta-oe/recipes-support/poppler/poppler/0001-Don-t-update-pdfsig.pot-when-POT-Creation-date-is-th.patch b/meta-oe/recipes-support/poppler/poppler/0001-Don-t-update-pdfsig.pot-when-POT-Creation-date-is-th.patch
deleted file mode 100644
index 4d929beb31..0000000000
--- a/meta-oe/recipes-support/poppler/poppler/0001-Don-t-update-pdfsig.pot-when-POT-Creation-date-is-th.patch
+++ /dev/null
@@ -1,127 +0,0 @@
1From 053acd5d2b310c696993dc97072d1f2b3b1dd7ac Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= <nbenitezl@gmail.com>
3Date: Fri, 5 Apr 2024 15:08:09 +0100
4Subject: [PATCH] Don't update pdfsig.pot when POT-Creation-date is the only
5 change
6
7Everytime we perform a Poppler build the pdfsig.pot file is
8updated with just a new timestamp in POT-Creation-date field.
9
10That is a nuance as we have to always discard that change in Git
11prior to submitting a MR or just switching branches locally.
12
13 - Fix it by only updating pdfsig.pot when there are changes
14 other than the POT-Creation-date. Currently only done for
15 platforms other than Windows as it requires 'diff' command.
16
17 - Change the OUTPUT/DEPENDS to be pdfsig.pot.new instead of
18 pdfsig.pot, which is more correct as the former is auto
19 generated while the later is a repo checked-in file, this
20 way we avoid pdfsig.pot from being marked as deleted by
21 git when doing a 'make clean'.
22
23Other changes:
24 - Drop flag '-s' from msgmerge as it's deprecated, use
25 instead sort flag '-F' for both msgmerge and xgettext
26 so their output is more synced and so prevent useless
27 diffs that only carry reordering changes.
28
29 - Drop redundant flag '--language=C++' as xgettext will
30 use that anyway by recognizing source extension '.cc'
31
32 - Update 'pdfsig.pot' and 'ca/pdfsig.po' with the outputs
33 generated with the new flags.
34
35Some related info:
36https://savannah.gnu.org/bugs/?49654#comment1
37
38Fixes #1479
39
40Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/053acd5d2b310c696993dc97072d1f2b3b1dd7ac]
41
42Signed-off-by: Changqing Li <changqing.li@windriver.com>
43---
44 utils/po/CMakeLists.txt | 24 +++++++++++++++++-------
45 utils/po/ca/pdfsig.po | 10 ++++++----
46 utils/po/pdfsig.pot | 6 ++++--
47 3 files changed, 27 insertions(+), 13 deletions(-)
48
49diff --git a/utils/po/CMakeLists.txt b/utils/po/CMakeLists.txt
50index 2eb7f0f0..38e1fd44 100644
51--- a/utils/po/CMakeLists.txt
52+++ b/utils/po/CMakeLists.txt
53@@ -13,16 +13,26 @@ macro(UPDATE_POT_FILE input)
54 foreach(_lang ${_langs})
55 set(_poFile "${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${input}.po")
56 list(APPEND _commands
57- COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} "${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}")
58+ COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -F ${_poFile} "${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}")
59 endforeach()
60- add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}
61- COMMAND xgettext --keyword=_ --language=c++ --package-name=pdfsig --output-dir=po --output=${_potFile} ${input}.cc
62- ${_commands}
63- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../${input}.cc
64- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
65+
66+ set(COPY_NEW_POTFILE ${CMAKE_COMMAND} -E copy po/${_potFile}.new po/${_potFile})
67+ if (NOT (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows"))
68+ # IF the new potfile carries changes other than an updated POT-creation-date (autogenerated) THEN proceed to use that new potfile
69+ set(CM diff --brief --ignore-matching-lines="POT-Creation-Date.*" po/${_potFile} po/${_potFile}.new || ${COPY_NEW_POTFILE})
70+ else ()
71+ set(CM ${COPY_NEW_POTFILE})
72+ endif ()
73+
74+ add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}.new
75+ COMMAND xgettext ${input}.cc --package-name=${input} --keyword=_ -F --output=po/${_potFile}.new
76+ COMMAND ${CM}
77+ ${_commands}
78+ DEPENDS ../${input}.cc
79+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
80 add_custom_target(update_pot_${input}
81 ALL
82- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile})
83+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}.new)
84 endmacro()
85
86 UPDATE_POT_FILE(pdfsig)
87diff --git a/utils/po/ca/pdfsig.po b/utils/po/ca/pdfsig.po
88index fe6a14e7..0d83e42c 100644
89--- a/utils/po/ca/pdfsig.po
90+++ b/utils/po/ca/pdfsig.po
91@@ -18,9 +18,11 @@ msgstr ""
92 "X-Generator: Lokalize 22.12.3\n"
93
94 #: pdfsig.cc:544
95-msgid "Digitally signed by {0:s}"
96-msgstr "Signat digitalment per {0:s}"
97-
98-#: pdfsig.cc:544
99+#, c++-format
100 msgid "Date: {0:s}"
101 msgstr "Data: {0:s}"
102+
103+#: pdfsig.cc:544
104+#, c++-format
105+msgid "Digitally signed by {0:s}"
106+msgstr "Signat digitalment per {0:s}"
107diff --git a/utils/po/pdfsig.pot b/utils/po/pdfsig.pot
108index 83095113..ffe3bc2f 100644
109--- a/utils/po/pdfsig.pot
110+++ b/utils/po/pdfsig.pot
111@@ -18,9 +18,11 @@ msgstr ""
112 "Content-Transfer-Encoding: 8bit\n"
113
114 #: pdfsig.cc:544
115-msgid "Digitally signed by {0:s}"
116+#, c++-format
117+msgid "Date: {0:s}"
118 msgstr ""
119
120 #: pdfsig.cc:544
121-msgid "Date: {0:s}"
122+#, c++-format
123+msgid "Digitally signed by {0:s}"
124 msgstr ""
125--
1262.34.1
127
diff --git a/meta-oe/recipes-support/poppler/poppler_24.12.0.bb b/meta-oe/recipes-support/poppler/poppler_25.01.0.bb
index 152b0a0571..f7f2ea6cc6 100644
--- a/meta-oe/recipes-support/poppler/poppler_24.12.0.bb
+++ b/meta-oe/recipes-support/poppler/poppler_25.01.0.bb
@@ -7,9 +7,8 @@ SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \
7 file://0001-Do-not-overwrite-all-our-build-flags.patch \ 7 file://0001-Do-not-overwrite-all-our-build-flags.patch \
8 file://basename-include.patch \ 8 file://basename-include.patch \
9 file://0001-cmake-Do-not-use-isystem.patch \ 9 file://0001-cmake-Do-not-use-isystem.patch \
10 file://0001-Don-t-update-pdfsig.pot-when-POT-Creation-date-is-th.patch \
11 " 10 "
12SRC_URI[sha256sum] = "1cf374c3146f3f685d9257701bf0c2866c61d6c202c14d1f5c01a1f3a089028a" 11SRC_URI[sha256sum] = "7eefc122207bbbd72a303c5e0743f4941e8ae861e24dcf0501e18ce1d1414112"
13 12
14DEPENDS = "fontconfig zlib cairo lcms glib-2.0 glib-2.0-native" 13DEPENDS = "fontconfig zlib cairo lcms glib-2.0 glib-2.0-native"
15 14