gettext: Remove useless sed

The second expression

    's/xmlError *err/const &/'

does nothing, because " *" actually matches zero, one, or several white
spaces, not a white space and an asterisk.

And the first expression

    '/libxml\/xmlerror.h/i #include <libxml/xmlversion.h>'

includes a header, but we are not using anything in the header.

The intention of the sed command is fix a compatibility issue with
system libxml, but LFS does not have a system libxml so the fix is not
needed for LFS.  And, if we just fix up the second expression to

    's/xmlError \*err/const &/'

making it actually work, it'll cause a FTBFS with shipped libxml (used
in LFS because system does not have libxml), so we cannot easily fix it
either.

For now just remove the sed.  If gettext-0.23.1 isn't released before
LFS 12.3 freeze, we can either apply the upstream patch to make it work
for both shipped libxml and system libxml, or add the corrected sed with
"nodump" and some alarming texts.
This commit is contained in:
Xi Ruoyao 2024-12-17 21:26:26 +08:00
parent 72fae0d02c
commit 8f5b4a7910
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -43,12 +43,6 @@
<sect2 role="installation">
<title>Installation of Gettext</title>
<para>First fix some compatibility issues with other programs:</para>
<screen><userinput remap="pre">sed -e '/libxml\/xmlerror.h/i #include &lt;libxml/xmlversion.h&gt;' \
-e 's/xmlError *err/const &amp;/' \
-i gettext-tools/src/its.c</userinput></screen>
<para>Prepare Gettext for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \