Per discussion with upstream, drop the shared library patch

Signed-off-by: David Cantrell <dcantrell@redhat.com>
This commit is contained in:
David Cantrell 2020-05-19 10:31:49 -04:00
parent c96decb2ed
commit 338aa21064
4 changed files with 27 additions and 111 deletions

View File

@ -1,3 +0,0 @@
# mandoc
The mandoc package

View File

@ -1,18 +1,6 @@
diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
--- mandoc-1.14.5/Makefile.orig 2019-10-16 10:12:02.427888365 -0400
+++ mandoc-1.14.5/Makefile 2019-10-16 10:12:39.502809508 -0400
@@ -446,7 +446,7 @@ lib-install: libmandoc.so.$(SOVERSION)
$(INSTALL_LIB) libmandoc.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)
ln -s libmandoc.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libmandoc.so.$(SOMAJOR)
ln -s libmandoc.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libmandoc.so
- $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
+ $(INSTALL_HDR) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
diff -up mandoc-1.14.5/configure.orig mandoc-1.14.5/configure diff -up mandoc-1.14.5/configure.orig mandoc-1.14.5/configure
--- mandoc-1.14.5/configure.orig 2019-03-10 05:56:43.000000000 -0400 --- mandoc-1.14.5/configure.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/configure 2019-10-16 10:13:30.798700410 -0400 +++ mandoc-1.14.5/configure 2020-05-19 10:28:12.375623914 -0400
@@ -124,6 +124,7 @@ MANM_TBL="tbl" @@ -124,6 +124,7 @@ MANM_TBL="tbl"
INSTALL="install" INSTALL="install"
INSTALL_PROGRAM= INSTALL_PROGRAM=
@ -37,3 +25,15 @@ diff -up mandoc-1.14.5/configure.orig mandoc-1.14.5/configure
INSTALL_MAN = ${INSTALL_MAN} INSTALL_MAN = ${INSTALL_MAN}
INSTALL_DATA = ${INSTALL_DATA} INSTALL_DATA = ${INSTALL_DATA}
LN = ${LN} LN = ${LN}
diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
--- mandoc-1.14.5/Makefile.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/Makefile 2020-05-19 10:27:11.368836905 -0400
@@ -436,7 +436,7 @@ lib-install: libmandoc.a
mkdir -p $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man3
$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
- $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
+ $(INSTALL_HDR) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3

View File

@ -1,73 +0,0 @@
diff -up mandoc-1.14.5/Makefile.orig mandoc-1.14.5/Makefile
--- mandoc-1.14.5/Makefile.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/Makefile 2020-03-05 14:16:20.816988115 -0500
@@ -17,6 +17,10 @@
VERSION = 1.14.5
+# version for the shared object file
+SOMAJOR = 2
+SOVERSION = $(SOMAJOR).0
+
# === LIST OF FILES ====================================================
TESTSRCS = test-be32toh.c \
@@ -373,7 +377,7 @@ include Makefile.local
# === DEPENDENCY HANDLING ==============================================
-all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
+all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local libmandoc.so.$(SOMAJOR)
install: base-install $(INSTALL_TARGETS)
@@ -392,7 +396,7 @@ distclean: clean
rm -f Makefile.local config.h config.h.old config.log config.log.old
clean:
- rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
+ rm -f libmandoc.a libmandoc.so.$(SOVERSION) $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
rm -f mandoc $(MAIN_OBJS)
rm -f man.cgi $(CGI_OBJS)
rm -f mandocd catman catman.o $(MANDOCD_OBJS)
@@ -431,11 +435,14 @@ base-install: mandoc demandoc soelim
$(INSTALL_MAN) makewhatis.8 \
$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
-lib-install: libmandoc.a
+lib-install: libmandoc.a libmandoc.so.$(SOVERSION)
mkdir -p $(DESTDIR)$(LIBDIR)
mkdir -p $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man3
$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL_LIB) libmandoc.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)
+ ln -s libmandoc.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libmandoc.so.$(SOMAJOR)
+ ln -s libmandoc.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libmandoc.so
$(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \
mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
@@ -485,6 +492,8 @@ uninstall:
rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
+ rm -f $(DESTDIR)$(LIBDIR)/libmandoc.so.$(SOVERSION)
+ rm -f $(DESTDIR)$(LIBDIR)/libmandoc.so
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
@@ -514,6 +523,15 @@ Makefile.local config.h: configure $(TES
libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
+libmandoc.so.$(SOVERSION): $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
+ $(CC) -shared -Wl,-soname=libmandoc.so.$(SOMAJOR) -o $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
+
+libmandoc.so.$(SOMAJOR): libmandoc.so.$(SOVERSION)
+ ln -sf libmandoc.so.$(SOVERSION) libmandoc.so.$(SOMAJOR)
+
+libmandoc.so: libmandoc.so.$(SOVERSION)
+ ln -sf libmandoc.so.$(SOVERSION) libmandoc.so
+
mandoc: $(MAIN_OBJS) libmandoc.a
$(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)

View File

@ -1,22 +1,21 @@
Name: mandoc Name: mandoc
Version: 1.14.5 Version: 1.14.5
Release: 10%{?dist} Release: 11%{?dist}
Summary: A suite of tools for compiling mdoc and man Summary: A suite of tools for compiling mdoc and man
License: ISC License: ISC
URL: https://mandoc.bsd.lv/ URL: https://mandoc.bsd.lv/
Source0: https://mandoc.bsd.lv/snapshots/mandoc-%{version}.tar.gz Source0: https://mandoc.bsd.lv/snapshots/mandoc-%{version}.tar.gz
Patch0: mandoc-shared-library.patch
# Separate the commands for installing libraries and headers # Separate the commands for installing libraries and headers
Patch1: mandoc-install-hdr.patch Patch0: mandoc-install-hdr.patch
# Simplify the compat #if for functions # Simplify the compat #if for functions
Patch2: mandoc-simplify-compat.patch Patch1: mandoc-simplify-compat.patch
# calling with make with an empty env like "env -i | make -sf -" # calling with make with an empty env like "env -i | make -sf -"
# will cause configure to crash # will cause configure to crash
Patch3: mandoc-configure_call_make_without_env.patch Patch2: mandoc-configure_call_make_without_env.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: make BuildRequires: make
@ -31,6 +30,12 @@ Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives
Requires(preun): %{_sbindir}/update-alternatives Requires(preun): %{_sbindir}/update-alternatives
# The shared library package has been removed per discussion with the
# upstream maintainer. If using the library, the static library is
# preferred because the API is not stable.
Provides: libmandoc = %{version}-%{release}
Obsoletes: libmandoc <= 1.14.5-10
%description %description
mandoc is a suite of tools compiling mdoc, the roff macro language of choice mandoc is a suite of tools compiling mdoc, the roff macro language of choice
for BSD manual pages, and man, the predominant historical language for UNIX for BSD manual pages, and man, the predominant historical language for UNIX
@ -39,14 +44,6 @@ of the toolset is the mandoc utility program, based on the libmandoc validating
compiler, to format output for UTF-8 and ASCII UNIX terminals, HTML 5, compiler, to format output for UTF-8 and ASCII UNIX terminals, HTML 5,
PostScript, and PDF. PostScript, and PDF.
%package -n libmandoc
Summary: A validating compiler for mdoc and man
%description -n libmandoc
The mandoc library parses a UNIX manual into an abstract syntax tree (AST).
UNIX manuals are composed of mdoc(7) or man(7), and may be mixed with roff(7),
tbl(7), and eqn(7) invocations.
%package -n libmandoc-devel %package -n libmandoc-devel
Summary: Development libraries and headers for libmandoc Summary: Development libraries and headers for libmandoc
Requires: libmandoc%{?_isa} = %{version}-%{release} Requires: libmandoc%{?_isa} = %{version}-%{release}
@ -126,8 +123,6 @@ touch %{buildroot}%{_mandir}/man8/makewhatis.8
%check %check
env LD_LIBRARY_PATH="$PWD" %make_build regress env LD_LIBRARY_PATH="$PWD" %make_build regress
%ldconfig_scriptlets -n libmandoc
%postun %postun
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
if [ "$(readlink %{_sysconfdir}/alternatives/man)" = "%{_bindir}/man.mandoc" ]; then if [ "$(readlink %{_sysconfdir}/alternatives/man)" = "%{_bindir}/man.mandoc" ]; then
@ -213,15 +208,9 @@ fi
%{_mandir}/man8/makewhatis.mandoc.8.gz %{_mandir}/man8/makewhatis.mandoc.8.gz
%ghost %{_mandir}/man8/makewhatis.8.gz %ghost %{_mandir}/man8/makewhatis.8.gz
%files -n libmandoc
%license LICENSE
%{_libdir}/libmandoc.so.2.0
%{_libdir}/libmandoc.so.2
%files -n libmandoc-devel %files -n libmandoc-devel
%license LICENSE %license LICENSE
%{_libdir}/libmandoc.a %{_libdir}/libmandoc.a
%{_libdir}/libmandoc.so
%{_includedir}/eqn.h %{_includedir}/eqn.h
%{_includedir}/man.h %{_includedir}/man.h
%{_includedir}/mandoc.h %{_includedir}/mandoc.h
@ -238,12 +227,15 @@ fi
%{_mandir}/man3/tbl.3* %{_mandir}/man3/tbl.3*
%changelog %changelog
* Tue May 19 2020 David Cantrell <dcantrell@redhat.com> - 1.14.5-11
- Per discussion with upstream, drop the shared library patch
* Tue Apr 14 2020 Björn Esser <besser82@fedoraproject.org> - 1.14.5-10 * Tue Apr 14 2020 Björn Esser <besser82@fedoraproject.org> - 1.14.5-10
- libmandoc.so must be linked with COMPAT_OBJS - libmandoc.so must be linked with COMPAT_OBJS
- Add patch to fix configure script - Add patch to fix configure script
- Replace plain make with %%make_build - Replace plain make with %%make_build
* Mon Mar 09 2020 David Cantrell - 1.14.5-9 * Mon Mar 09 2020 David Cantrell <dcantrell@redhat.com> - 1.14.5-9
- BR perl-interpreter - BR perl-interpreter
* Mon Mar 09 2020 Nikola Forró <nforro@redhat.com> - 1.14.5-8 * Mon Mar 09 2020 Nikola Forró <nforro@redhat.com> - 1.14.5-8