From a411f51af0f2e0e32cfcd941882f228d20dc9676 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 29 Sep 2024 20:49:51 +0200 Subject: [PATCH] build: Add Windows-format metainfo also to libgettextlib and libgettextsrc. Reported by Michele Locati at . * gettext-tools/gnulib-lib/libgettextlib.rc: New file. * gettext-tools/gnulib-lib/Makefile.am (EXTRA_DIST): Add it. (WOE32_LIBADD): New macro. (libgettextlib.res.lo): New rule. (libgettextlib_la_LIBADD, libgettextlib_la_DEPENDENCIES): Add the .res.lo file. * gettext-tools/src/libgettextsrc.rc: New file. * gettext-tools/src/Makefile.am (EXTRA_DIST): Add it. (WOE32_LIBADD): New macro. (libgettextsrc.res.lo): New rule. (libgettextsrc_la_LIBADD, libgettextsrc_la_DEPENDENCIES): New macros. * gettext-runtime/intl/libintl.rc: Update copyright year. * gettext-runtime/libasprintf/libasprintf.rc: Likewise. * gettext-tools/libgettextpo/libgettextpo.rc: Likewise. * libtextstyle/lib/libtextstyle.rc: Likewise. * windows/gettext.rc: Likewise. --- .gitignore | 1 + gettext-runtime/intl/libintl.rc | 4 +-- gettext-runtime/libasprintf/libasprintf.rc | 4 +-- gettext-tools/gnulib-lib/Makefile.am | 28 ++++++++++++++++ gettext-tools/gnulib-lib/libgettextlib.rc | 38 ++++++++++++++++++++++ gettext-tools/libgettextpo/libgettextpo.rc | 2 +- gettext-tools/src/Makefile.am | 28 ++++++++++++++++ gettext-tools/src/libgettextsrc.rc | 38 ++++++++++++++++++++++ libtextstyle/lib/libtextstyle.rc | 4 +-- windows/gettext.rc | 2 +- 10 files changed, 141 insertions(+), 8 deletions(-) create mode 100644 gettext-tools/gnulib-lib/libgettextlib.rc create mode 100644 gettext-tools/src/libgettextsrc.rc diff --git a/.gitignore b/.gitignore index 71aba41e9..04c65990d 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ /gettext-tools/gnulib-m4/ /gettext-tools/gnulib-lib/ !/gettext-tools/gnulib-lib/Makefile.am +!/gettext-tools/gnulib-lib/libgettextlib.rc /gettext-tools/gnulib-tests/ !/gettext-tools/gnulib-tests/ChangeLog.0 !/gettext-tools/gnulib-tests/Makefile.am diff --git a/gettext-runtime/intl/libintl.rc b/gettext-runtime/intl/libintl.rc index 25224183b..8deb64995 100644 --- a/gettext-runtime/intl/libintl.rc +++ b/gettext-runtime/intl/libintl.rc @@ -19,12 +19,12 @@ BEGIN BEGIN BLOCK "04090000" /* Lang = US English, Charset = ASCII */ BEGIN - VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see .\0" + VALUE "Comments", "This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see .\0" VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "LGPLed libintl for Windows\0" VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" VALUE "InternalName", "intl.dll\0" - VALUE "LegalCopyright", "Copyright (C) 1995-2019\0" + VALUE "LegalCopyright", "Copyright (C) 1995-2024\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "intl.dll\0" VALUE "ProductName", "GNU libintl: accessing NLS message catalogs\0" diff --git a/gettext-runtime/libasprintf/libasprintf.rc b/gettext-runtime/libasprintf/libasprintf.rc index 7502e5072..32a9a5f13 100644 --- a/gettext-runtime/libasprintf/libasprintf.rc +++ b/gettext-runtime/libasprintf/libasprintf.rc @@ -19,12 +19,12 @@ BEGIN BEGIN BLOCK "04090000" /* Lang = US English, Charset = ASCII */ BEGIN - VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see .\0" + VALUE "Comments", "This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see .\0" VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "LGPLed libasprintf for Windows\0" VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" VALUE "InternalName", "asprintf.dll\0" - VALUE "LegalCopyright", "Copyright (C) 2002-2019\0" + VALUE "LegalCopyright", "Copyright (C) 2002-2024\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "asprintf.dll\0" VALUE "ProductName", "GNU libasprintf: automatic formatted output\0" diff --git a/gettext-tools/gnulib-lib/Makefile.am b/gettext-tools/gnulib-lib/Makefile.am index 79f5d4d49..a7fa494fa 100644 --- a/gettext-tools/gnulib-lib/Makefile.am +++ b/gettext-tools/gnulib-lib/Makefile.am @@ -60,6 +60,34 @@ AM_CFLAGS = @WARN_CFLAGS@ # Rules generated and collected by gnulib-tool. include Makefile.gnulib +# Version information according to Woe32 conventions. +EXTRA_DIST += libgettextlib.rc +if WOE32 +WOE32_LIBADD = libgettextlib.res.lo +# This rule is executed only on Woe32 systems. +# Use $(RC) with libtool, $(WINDRES) when not using libtool. +# The following sed expressions come from the windres-options script. They are +# inlined here, so that they can be written in a Makefile without requiring a +# temporary file. They must contain literal newlines rather than semicolons, +# so that they work with the sed-3.02 that is shipped with MSYS. +libgettextlib.res.lo: $(srcdir)/libgettextlib.rc + nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) \ + "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \ + "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \ + "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \ + "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \ + -i $(srcdir)/libgettextlib.rc -o libgettextlib.res.lo --output-format=coff +MOSTLYCLEANFILES += libgettextlib.res.lo +else +WOE32_LIBADD = +endif +libgettextlib_la_LIBADD += $(WOE32_LIBADD) +libgettextlib_la_DEPENDENCIES += $(WOE32_LIBADD) + # OS/2 does not support a DLL name longer than 8 characters. if OS2 libgettextlib_la_LDFLAGS += -os2dllname gtlib diff --git a/gettext-tools/gnulib-lib/libgettextlib.rc b/gettext-tools/gnulib-lib/libgettextlib.rc new file mode 100644 index 000000000..f2b12d380 --- /dev/null +++ b/gettext-tools/gnulib-lib/libgettextlib.rc @@ -0,0 +1,38 @@ +/* Resources for gettextlib.dll */ + +#include + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 + PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 + FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */ +#ifdef _DEBUG + FILEFLAGS 0x1L /* VS_FF_DEBUG */ +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */ + FILETYPE 0x1L /* VFT_APP */ + FILESUBTYPE 0x0L /* VFT2_UNKNOWN */ +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "04090000" /* Lang = US English, Charset = ASCII */ + BEGIN + VALUE "Comments", "This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License. You should have received a copy of the GNU General Public License along with this program. If not, see .\0" + VALUE "CompanyName", "Free Software Foundation\0" + VALUE "FileDescription", "GPLed library for Windows\0" + VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" + VALUE "InternalName", "gettextlib.dll\0" + VALUE "LegalCopyright", "Copyright (C) 1995-2024\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "gettextlib.dll\0" + VALUE "ProductName", "GNU gettext utilities\0" + VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0 /* US English, ASCII */ + END +END diff --git a/gettext-tools/libgettextpo/libgettextpo.rc b/gettext-tools/libgettextpo/libgettextpo.rc index 1b6fb6907..4cc772d5f 100644 --- a/gettext-tools/libgettextpo/libgettextpo.rc +++ b/gettext-tools/libgettextpo/libgettextpo.rc @@ -24,7 +24,7 @@ BEGIN VALUE "FileDescription", "GPLed libgettextpo for Windows\0" VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" VALUE "InternalName", "gettextpo.dll\0" - VALUE "LegalCopyright", "Copyright (C) 1995-2019\0" + VALUE "LegalCopyright", "Copyright (C) 1995-2024\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "gettextpo.dll\0" VALUE "ProductName", "GNU libgettextpo: public API for PO files\0" diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index d99da82ab..07392c1be 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -352,6 +352,34 @@ MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyl LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la endif +# Version information according to Woe32 conventions. +EXTRA_DIST += libgettextsrc.rc +if WOE32 +WOE32_LIBADD = libgettextsrc.res.lo +# This rule is executed only on Woe32 systems. +# Use $(RC) with libtool, $(WINDRES) when not using libtool. +# The following sed expressions come from the windres-options script. They are +# inlined here, so that they can be written in a Makefile without requiring a +# temporary file. They must contain literal newlines rather than semicolons, +# so that they work with the sed-3.02 that is shipped with MSYS. +libgettextsrc.res.lo: $(srcdir)/libgettextsrc.rc + nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) \ + "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \ + "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \ + "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \ + "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \ + -i $(srcdir)/libgettextsrc.rc -o libgettextsrc.res.lo --output-format=coff +MOSTLYCLEANFILES += libgettextsrc.res.lo +else +WOE32_LIBADD = +endif +libgettextsrc_la_LIBADD = $(WOE32_LIBADD) +libgettextsrc_la_DEPENDENCIES = $(WOE32_LIBADD) + # How to build libgettextsrc.la. # Need ../gnulib-lib/libgettextlib.la. # Need $(LTLIBUNISTRING) because ulc_width_linebreaks, uc_width, etc. may be diff --git a/gettext-tools/src/libgettextsrc.rc b/gettext-tools/src/libgettextsrc.rc new file mode 100644 index 000000000..cb318d689 --- /dev/null +++ b/gettext-tools/src/libgettextsrc.rc @@ -0,0 +1,38 @@ +/* Resources for gettextsrc.dll */ + +#include + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 + PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 + FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */ +#ifdef _DEBUG + FILEFLAGS 0x1L /* VS_FF_DEBUG */ +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */ + FILETYPE 0x1L /* VFT_APP */ + FILESUBTYPE 0x0L /* VFT2_UNKNOWN */ +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "04090000" /* Lang = US English, Charset = ASCII */ + BEGIN + VALUE "Comments", "This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License. You should have received a copy of the GNU General Public License along with this program. If not, see .\0" + VALUE "CompanyName", "Free Software Foundation\0" + VALUE "FileDescription", "GPLed library for Windows\0" + VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" + VALUE "InternalName", "gettextsrc.dll\0" + VALUE "LegalCopyright", "Copyright (C) 1995-2024\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "gettextsrc.dll\0" + VALUE "ProductName", "GNU gettext utilities\0" + VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0 /* US English, ASCII */ + END +END diff --git a/libtextstyle/lib/libtextstyle.rc b/libtextstyle/lib/libtextstyle.rc index 4536676e4..6c3a99997 100644 --- a/libtextstyle/lib/libtextstyle.rc +++ b/libtextstyle/lib/libtextstyle.rc @@ -19,12 +19,12 @@ BEGIN BEGIN BLOCK "04090000" /* Lang = US English, Charset = ASCII */ BEGIN - VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 or later. You should have received a copy of the GNU General Public License along with this library; if not, see \0" + VALUE "Comments", "This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 or later. You should have received a copy of the GNU General Public License along with this library; if not, see \0" VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "GPLed libtextstyle for Windows\0" VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" VALUE "InternalName", "textstyle.dll\0" - VALUE "LegalCopyright", "Copyright (C) 2006-2019\0" + VALUE "LegalCopyright", "Copyright (C) 2006-2024\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "textstyle.dll\0" VALUE "ProductName", "GNU libtextstyle: Text styling library\0" diff --git a/windows/gettext.rc b/windows/gettext.rc index 800d1b213..8356be6d1 100644 --- a/windows/gettext.rc +++ b/windows/gettext.rc @@ -24,7 +24,7 @@ BEGIN VALUE "FileDescription", "GPLed program for Windows\0" VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" VALUE "InternalName", "*.exe\0" - VALUE "LegalCopyright", "Copyright (C) 1995-2019\0" + VALUE "LegalCopyright", "Copyright (C) 1995-2024\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "*.exe\0" VALUE "ProductName", "GNU gettext utilities\0" -- 2.47.3