SHA256
1
0
forked from pool/expat

Accepting request 1147950 from home:david.anes:branches:devel:libraries:c_c++

- Fix handling of xmlwf.1 to avoid workarounds in specfile:
  * Added libxml2-fix-xmlwf.1-handling.patch 
- Call buildconf.sh to avoid (future) issues with expat_config.h.in

- Add manpage for xmlwf, which is now available in the released tarball.

OBS-URL: https://build.opensuse.org/request/show/1147950
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/expat?expand=0&rev=108
This commit is contained in:
David Anes 2024-02-20 13:03:48 +00:00 committed by Git OBS Bridge
parent 39c80d1cc4
commit 5efd2a4e56
3 changed files with 103 additions and 8 deletions

View File

@ -1,10 +1,18 @@
-------------------------------------------------------------------
Tue Feb 20 12:21:17 UTC 2024 - David Anes <david.anes@suse.com>
- Fix handling of xmlwf.1 to avoid workarounds in specfile:
* Added libxml2-fix-xmlwf.1-handling.patch
- Call buildconf.sh to avoid (future) issues with expat_config.h.in
-------------------------------------------------------------------
Mon Feb 12 20:44:14 UTC 2024 - David Anes <david.anes@suse.com>
- Update keyring automatically from keyserver during OBS service run.
- Explicitly use --without-docbook (before it was implicit).
- Include missing files for documentation and examples.
- Add manpage for xmlwf, which is not available in the release tarball.
- Add manpage for xmlwf, which is now available in the released tarball.
- Clean the spec file a bit.
- Update to 2.6.0:

View File

@ -31,6 +31,11 @@ Source3: %{name}faq.html
# https://www.gentoo.org/inside-gentoo/developers/index.html#sping
# https://github.com/libexpat/libexpat/issues/537#issuecomment-1003796884
Source4: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3176ef7db2367f1fca4f306b1f9b0e909af37285#/expat.keyring
# PATCH-UPSTREAM: Re-work handling of xmlwf.1
# https://github.com/libexpat/libexpat/pull/824
Patch0: libxml2-fix-xmlwf.1-handling.patch
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkgconfig
@ -64,10 +69,13 @@ This package contains the development headers for the library found
in libexpat.
%prep
%setup -q
%autosetup -p1
cp %{SOURCE3} .
# instead of autoreconf, it needs this to avoid breakign expat_config.h.in
./buildconf.sh
%build
%configure \
--disable-silent-rules \
@ -78,13 +86,7 @@ cp %{SOURCE3} .
%if 0%{?do_profiling}
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}" LDFLAGS="%{optflags} %{cflags_profile_generate}"
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}" LDFLAGS="%{optflags} %{cflags_profile_generate}" check
# make clean removes 'docs/xmlwf.1' and breaks build system when
# docbook is not avaiable, so save it for later, clean and move
# it back again to it's original location
# See: https://github.com/libexpat/libexpat/issues/821
mv doc/xmlwf.1 .
%make_build clean
mv xmlwf.1 doc/
%make_build CFLAGS="%{optflags} %{cflags_profile_feedback}"
%else
%make_build CFLAGS="%{optflags}"

View File

@ -0,0 +1,85 @@
From 0f6b39d2f513aae16c7377fc802c25ab81551c42 Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Tue, 13 Feb 2024 19:42:04 +0100
Subject: [PATCH] Autotools: Re-work handling of xmlwf.1
File "doc/xmlwf.1" should not be cleaned when building with
"./configure --without-docbook", and re-compilation of the file
should take precedence over a pre-built copy where available.
Also, variable CLEANFILES can be used to simplify things a bit
in Makefile.am.
---
expat/configure.ac | 17 ++++++++++++++---
expat/doc/Makefile.am | 18 ++++++++----------
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git expat/configure.ac expat/configure.ac
index a5d1ff931..8a9eddef0 100644
--- expat/configure.ac
+++ expat/configure.ac
@@ -357,11 +357,22 @@ AS_IF([test "x${DOCBOOK_TO_MAN}" != x -a "x$with_docbook" != xno],
page for xmlwf.])])])
dnl This will make sure that a release tarball shipping a pre-rendered xmlwf man page will
-dnl get it installed, independent of whether some flavor of docbook2man is available.
+dnl get it installed, when no working flavor of docbook2man is available (or wanted).
dnl This relies on file xmlwf.1 being at least as recent as its source file xmlwf.xml.
AS_IF([test -f "${srcdir}"/doc/xmlwf.1],
- [AM_CONDITIONAL(WITH_DOCBOOK, [true])],
- [AM_CONDITIONAL(WITH_DOCBOOK, [test "x${DOCBOOK_TO_MAN}" != x])])
+ [AM_CONDITIONAL(WITH_MANPAGE, [true])
+ AS_IF([test "x$with_docbook" = xno -o "x${DOCBOOK_TO_MAN}" = x],
+ [AM_CONDITIONAL(WITH_PREBUILT_MANPAGE, [true])
+ AM_CONDITIONAL(WITH_DISTRIBUTABLE_MANPAGE, [false])],
+ [AM_CONDITIONAL(WITH_PREBUILT_MANPAGE, [false])
+ AM_CONDITIONAL(WITH_DISTRIBUTABLE_MANPAGE, [true])])
+ ],
+ [AS_IF([test "x$with_docbook" != xno -a "x${DOCBOOK_TO_MAN}" != x],
+ [AM_CONDITIONAL(WITH_MANPAGE, [true])
+ AM_CONDITIONAL(WITH_DISTRIBUTABLE_MANPAGE, [true])],
+ [AM_CONDITIONAL(WITH_MANPAGE, [false])
+ AM_CONDITIONAL(WITH_DISTRIBUTABLE_MANPAGE, [false])])
+ AM_CONDITIONAL(WITH_PREBUILT_MANPAGE, [false])])
dnl Configure CMake file templates
dnl NOTE: The *_TRUE variables read here are Automake conditionals
diff --git expat/doc/Makefile.am expat/doc/Makefile.am
index c3a3ce59c..751365ebd 100644
--- expat/doc/Makefile.am
+++ expat/doc/Makefile.am
@@ -32,26 +32,24 @@
.PHONY: dist-hook # not inside conditional to avoid automake warning
-if WITH_DOCBOOK
+if WITH_MANPAGE
dist_man_MANS = xmlwf.1
xmlwf.1: xmlwf.xml
-rm -f $@
- $(DOCBOOK_TO_MAN) $<
+ test x$(DOCBOOK_TO_MAN) != x && $(DOCBOOK_TO_MAN) $<
test -f $@ || mv XMLWF.1 $@
-else
+endif
+
+if !WITH_DISTRIBUTABLE_MANPAGE
dist-hook:
@echo 'ERROR: Configure with --with-docbook for "make dist".' 1>&2
@false
endif
-# https://www.gnu.org/software/automake/manual/automake.html#What-Gets-Cleaned
-.PHONY: clean-local
-clean-local: clean-local-check
-
-.PHONY: clean-local-check
-clean-local-check:
- $(RM) xmlwf.1
+if !WITH_PREBUILT_MANPAGE
+CLEANFILES = xmlwf.1
+endif
EXTRA_DIST = \
ok.min.css \