diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2022-01-29 12:37:00 -0800 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2022-01-29 12:37:14 -0800 |
commit | f105d97dc268c469b1cdc2f503d68ec77007c684 (patch) | |
tree | 7c130cce12ab325db829377fcd61655abae661ba /app-text/lowdown | |
parent | app-admin/sudo: fix newins source (diff) | |
download | gentoo-f105d97dc268c469b1cdc2f503d68ec77007c684.tar.gz gentoo-f105d97dc268c469b1cdc2f503d68ec77007c684.tar.bz2 gentoo-f105d97dc268c469b1cdc2f503d68ec77007c684.zip |
app-text/lowdown: Bump to 0.10.0, install lib (bug #811111)
Closes: https://bugs.gentoo.org/811111
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-text/lowdown')
-rw-r--r-- | app-text/lowdown/Manifest | 1 | ||||
-rw-r--r-- | app-text/lowdown/files/lowdown-0.10.0-dont-install-static-lib.patch | 12 | ||||
-rw-r--r-- | app-text/lowdown/files/lowdown-0.10.0-linking.patch | 43 | ||||
-rw-r--r-- | app-text/lowdown/files/lowdown-0.10.0-shared-library.patch | 53 | ||||
-rw-r--r-- | app-text/lowdown/lowdown-0.10.0.ebuild | 46 |
5 files changed, 155 insertions, 0 deletions
diff --git a/app-text/lowdown/Manifest b/app-text/lowdown/Manifest index ba3e9378cc09..e1d3afdf8827 100644 --- a/app-text/lowdown/Manifest +++ b/app-text/lowdown/Manifest @@ -1 +1,2 @@ +DIST lowdown-0.10.0.tar.gz 547397 BLAKE2B 93d87e3aca2466398a625750b928062fbafd26311899e52ddd8264218675e78d30714c920f3331619fcd510a92cc6046401c946f5bd1465d6fd46f26937318ac SHA512 7454e618607628ec0a1649f44f5ec64f8778ecaa151f6aad4984935e297abfe8e84ffc321d3c93cec5d336ff14b6bf9a0ff9054e7363cc58ba708a5b60db9048 DIST lowdown-0.8.4.tar.gz 520735 BLAKE2B dc66b92f285b186ca83b9fad1cccfef9b395233ef56756e9ea9071b5502cd81dc6ce2d67d7ef265dab8953010af0907cd76125cd4442cfbfc2bcf8c63e097809 SHA512 cd46ead69ed038bf3ccf848b784327d66c78dd8adbc9ae4bfee660b9b1e52844ac8c7ad0377f8f38a3fee0d2e523f979a22d6b547c7964304accef0951cfca34 diff --git a/app-text/lowdown/files/lowdown-0.10.0-dont-install-static-lib.patch b/app-text/lowdown/files/lowdown-0.10.0-dont-install-static-lib.patch new file mode 100644 index 000000000000..4a120c32ed29 --- /dev/null +++ b/app-text/lowdown/files/lowdown-0.10.0-dont-install-static-lib.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile b/Makefile +index f13a364..d013a1c 100644 +--- a/Makefile ++++ b/Makefile +@@ -153,7 +153,6 @@ install: all + $(INSTALL_DATA) lowdown.pc $(DESTDIR)$(LIBDIR)/pkgconfig + $(INSTALL_PROGRAM) lowdown $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) lowdown-diff $(DESTDIR)$(BINDIR) +- $(INSTALL_LIB) liblowdown.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) liblowdown.so $(DESTDIR)$(LIBDIR) + $(INSTALL_DATA) lowdown.h $(DESTDIR)$(INCLUDEDIR) + for f in $(MANS) ; do \ diff --git a/app-text/lowdown/files/lowdown-0.10.0-linking.patch b/app-text/lowdown/files/lowdown-0.10.0-linking.patch new file mode 100644 index 000000000000..e0ab7285e07a --- /dev/null +++ b/app-text/lowdown/files/lowdown-0.10.0-linking.patch @@ -0,0 +1,43 @@ +diff --git a/Makefile b/Makefile +index d013a1c..c9de4d4 100644 +--- a/Makefile ++++ b/Makefile +@@ -130,8 +130,8 @@ installwww: www + $(INSTALL) -m 0444 lowdown.tar.gz $(WWWDIR)/snapshots + $(INSTALL) -m 0444 lowdown.tar.gz.sha512 $(WWWDIR)/snapshots + +-lowdown: liblowdown.a main.o +- $(CC) -o $@ main.o liblowdown.a $(LDFLAGS) $(LDADD_MD5) -lm ++lowdown: liblowdown.so main.o ++ $(CC) -o $@ main.o -L. -llowdown $(LDFLAGS) $(LDADD_MD5) -lm + + lowdown-diff: lowdown + ln -f lowdown lowdown-diff +@@ -141,7 +141,8 @@ liblowdown.a: $(OBJS) $(COMPAT_OBJS) + + + liblowdown.so: $(OBJS) $(COMPAT_OBJS) +- $(CC) -shared -o $@ $(OBJS) $(COMPAT_OBJS) $(LDFLAGS) ++ $(CC) -shared -o $@.1 $(OBJS) $(COMPAT_OBJS) $(LDFLAGS) -Wl,-soname,$@.1 ++ ln -s $@.1 $@ + + install: all + mkdir -p $(DESTDIR)$(BINDIR) +@@ -153,7 +154,7 @@ install: all + $(INSTALL_DATA) lowdown.pc $(DESTDIR)$(LIBDIR)/pkgconfig + $(INSTALL_PROGRAM) lowdown $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) lowdown-diff $(DESTDIR)$(BINDIR) +- $(INSTALL_LIB) liblowdown.so $(DESTDIR)$(LIBDIR) ++ $(INSTALL_LIB) liblowdown.so.1 $(DESTDIR)$(LIBDIR) + $(INSTALL_DATA) lowdown.h $(DESTDIR)$(INCLUDEDIR) + for f in $(MANS) ; do \ + name=`basename $$f .html` ; \ +@@ -271,7 +272,7 @@ main.o: lowdown.h + + clean: + rm -f $(OBJS) $(COMPAT_OBJS) main.o +- rm -f lowdown lowdown-diff liblowdown.a liblowdown.so lowdown.pc ++ rm -f lowdown lowdown-diff liblowdown.a liblowdown.so liblowdown.so.1 lowdown.pc + rm -f index.xml diff.xml diff.diff.xml README.xml lowdown.tar.gz.sha512 lowdown.tar.gz + rm -f $(PDFS) $(HTMLS) $(THUMBS) + rm -f index.latex.aux index.latex.latex index.latex.log index.latex.out diff --git a/app-text/lowdown/files/lowdown-0.10.0-shared-library.patch b/app-text/lowdown/files/lowdown-0.10.0-shared-library.patch new file mode 100644 index 000000000000..0adfe762fb57 --- /dev/null +++ b/app-text/lowdown/files/lowdown-0.10.0-shared-library.patch @@ -0,0 +1,53 @@ +commit e33536ae131e31adf77d3258c0cdd3da10868534 +Author: Kristaps Dz <kristaps@bsd.lv> +Date: Thu Nov 4 12:27:21 2021 +0000 + + Generate a shared library as well. + + Earlier, the library interface was just moving too quickly. Now, I + don't think I'll be changing it much---if at all, unless to add new + front-ends. + + References https://github.com/kristapsdz/lowdown/issues/45 + +diff --git a/Makefile b/Makefile +index 475f780..f13a364 100644 +--- a/Makefile ++++ b/Makefile +@@ -118,7 +118,7 @@ REGRESS_ARGS += "--parse-no-autolink" + REGRESS_ARGS += "--parse-no-cmark" + REGRESS_ARGS += "--parse-no-deflists" + +-all: lowdown lowdown-diff lowdown.pc ++all: lowdown lowdown-diff liblowdown.so lowdown.pc + + www: $(HTMLS) $(PDFS) $(THUMBS) lowdown.tar.gz lowdown.tar.gz.sha512 + +@@ -139,6 +139,10 @@ lowdown-diff: lowdown + liblowdown.a: $(OBJS) $(COMPAT_OBJS) + $(AR) rs $@ $(OBJS) $(COMPAT_OBJS) + ++ ++liblowdown.so: $(OBJS) $(COMPAT_OBJS) ++ $(CC) -shared -o $@ $(OBJS) $(COMPAT_OBJS) $(LDFLAGS) ++ + install: all + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig +@@ -150,6 +154,7 @@ install: all + $(INSTALL_PROGRAM) lowdown $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) lowdown-diff $(DESTDIR)$(BINDIR) + $(INSTALL_LIB) liblowdown.a $(DESTDIR)$(LIBDIR) ++ $(INSTALL_LIB) liblowdown.so $(DESTDIR)$(LIBDIR) + $(INSTALL_DATA) lowdown.h $(DESTDIR)$(INCLUDEDIR) + for f in $(MANS) ; do \ + name=`basename $$f .html` ; \ +@@ -267,7 +272,7 @@ main.o: lowdown.h + + clean: + rm -f $(OBJS) $(COMPAT_OBJS) main.o +- rm -f lowdown lowdown-diff liblowdown.a lowdown.pc ++ rm -f lowdown lowdown-diff liblowdown.a liblowdown.so lowdown.pc + rm -f index.xml diff.xml diff.diff.xml README.xml lowdown.tar.gz.sha512 lowdown.tar.gz + rm -f $(PDFS) $(HTMLS) $(THUMBS) + rm -f index.latex.aux index.latex.latex index.latex.log index.latex.out diff --git a/app-text/lowdown/lowdown-0.10.0.ebuild b/app-text/lowdown/lowdown-0.10.0.ebuild new file mode 100644 index 000000000000..a38987c1e1aa --- /dev/null +++ b/app-text/lowdown/lowdown-0.10.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs flag-o-matic + +MY_PV="VERSION_${PV//./_}" +DESCRIPTION="Markdown translator producing HTML5, roff documents in the ms and man formats" +HOMEPAGE="https://kristaps.bsd.lv/lowdown/" +SRC_URI="https://github.com/kristapsdz/lowdown/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="virtual/libcrypt:=" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/lowdown-0.10.0-shared-library.patch" + "${FILESDIR}/lowdown-0.10.0-dont-install-static-lib.patch" + "${FILESDIR}/lowdown-0.10.0-linking.patch" +) + +src_configure() { + append-flags -fPIC + tc-export CC AR + + ./configure \ + PREFIX="/usr" \ + MANDIR="/usr/share/man" \ + LDFLAGS="${LDFLAGS}" \ + CPPFLAGS="${CPPFLAGS}" \ + LIBDIR="/usr/$(get_libdir)" \ + || die "./configure failed" +} + +src_compile() { + emake $(usex elibc_musl UTF8_LOCALE=C.UTF-8 '') +} + +src_test() { + emake regress +} |