summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2025-02-07 10:27:01 -0800
committerPatrick McLean <chutzpah@gentoo.org>2025-02-07 10:27:25 -0800
commitc40c04c2548c24ef1d125af26f1c9305d2648421 (patch)
treebace4038f94761c5cd463195a0d19b553decba3b /app-text/lowdown
parentprofiles: Last-rites for net-misc/AQtion (diff)
downloadgentoo-c40c04c2548c24ef1d125af26f1c9305d2648421.tar.gz
gentoo-c40c04c2548c24ef1d125af26f1c9305d2648421.tar.bz2
gentoo-c40c04c2548c24ef1d125af26f1c9305d2648421.zip
app-text/lowdown: add 2.0.0
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-text/lowdown')
-rw-r--r--app-text/lowdown/Manifest1
-rw-r--r--app-text/lowdown/files/lowdown-2.0.0-shared-linking.patch66
-rw-r--r--app-text/lowdown/lowdown-2.0.0.ebuild69
3 files changed, 136 insertions, 0 deletions
diff --git a/app-text/lowdown/Manifest b/app-text/lowdown/Manifest
index 212ef7893275..1b8b28392c1b 100644
--- a/app-text/lowdown/Manifest
+++ b/app-text/lowdown/Manifest
@@ -1,3 +1,4 @@
DIST lowdown-1.1.1.tar.gz 600635 BLAKE2B 39c0a2472ff6b9b3fa2b6d72c1f2d482592976f7b50c1bbaf1965bfbb6d28f22e0a7498bb54087bb83070bd74ea673409be97815f51a0a5a67e980bbfc4e01b2 SHA512 2a69da945a83696480651e8221d73bcb18bac9bc38bb88126ddf73520d2a4ff396dde08a7abf6f550669ec9ba34abdaa186b0980f312fa157371ee754576bb6a
DIST lowdown-1.3.2.tar.gz 670610 BLAKE2B 80238e7c6a27c45d6b3f65fbb9435639db5f424aad28c05a94093c5fab3982b1b05b5c3d779e5f74d8b2e71046301c2e3c0ee83496f44f6b8597cd0b3797eb14 SHA512 9592fd270c61d7e827a0e7885ce5faef545a33e61afa0d4cf4549cf5866d82873b042a9cb4465d7b504c686a7b89c748257c470c3b3ccb1ec6f1203a7e6bf392
DIST lowdown-1.4.0.tar.gz 675327 BLAKE2B 1e734acefe3d293dd6e60f27ff943b484ac99a9e393fd118df09be6dd9671294a91de306393817af9422fec67ed9eda22e2515538b490ac07bdd93ac2e5617e4 SHA512 61b88fc24c9c69a324536bc5cc3edbd453f59945cda264df8751cf361992487081911d3ba6cb04346d5ef451d96a4b56e69a76985849349ef049eca0a098b7ee
+DIST lowdown-2.0.0.tar.gz 675824 BLAKE2B 01df89f7703f3c313b373b0eee2eee86d409a06fe298be6f90cd0198fb84a3eedf8e5ea9c03082797bfa0ff76b28f6c4d032e28f6b1d233af2a988bef46cf689 SHA512 520741453556710ebdd379de2f1b6444c0019ed556e5c9852b1bb8b2cbd5853cf5edb80e65dc9e1d4fabfb028b96af0adf776642ba07aa3af436d4c57e7d7811
diff --git a/app-text/lowdown/files/lowdown-2.0.0-shared-linking.patch b/app-text/lowdown/files/lowdown-2.0.0-shared-linking.patch
new file mode 100644
index 000000000000..6e68260a6225
--- /dev/null
+++ b/app-text/lowdown/files/lowdown-2.0.0-shared-linking.patch
@@ -0,0 +1,66 @@
+diff --git a/Makefile b/Makefile
+index 3b61566..3d0548f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -122,19 +122,6 @@ THUMBS = screen-mandoc.thumb.jpg \
+ screen-groff.thumb.jpg \
+ screen-term.thumb.jpg
+ CFLAGS += -DVERSION=\"$(VERSION)\"
+-# Hack around broken Mac OS X nested sandboxes.
+-# If SANDBOX_INIT_ERROR_IGNORE is set to "always", errors from
+-# sandbox_init() are ignored. If set to anything else, the user must
+-# also set SANDBOX_INIT_ERROR_IGNORE in their environment to ignore
+-# failure.
+-# Has no effect unless HAVE_SANDBOX_INIT is defined.
+-.ifdef SANDBOX_INIT_ERROR_IGNORE
+-.if $(SANDBOX_INIT_ERROR_IGNORE) == "always"
+-CFLAGS += -DSANDBOX_INIT_ERROR_IGNORE=2
+-.else
+-CFLAGS += -DSANDBOX_INIT_ERROR_IGNORE=1
+-.endif
+-.endif
+ # Because the objects will be compiled into a shared library:
+ CFLAGS += -fPIC
+ # To avoid exporting internal functions (lowdown.h has default visibility).
+@@ -171,11 +158,11 @@ 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 $(LDADD)
++lowdown: liblowdown.so main.o compats.o
++ $(CC) -o $@ main.o compats.o -L. -llowdown $(LDFLAGS) $(LDADD_MD5) -lm $(LDADD)
+
+ lowdown-diff: lowdown
+- ln -f lowdown lowdown-diff
++ ln -s lowdown lowdown-diff
+
+ liblowdown.a: $(OBJS) $(COMPAT_OBJS)
+ $(AR) rs $@ $(OBJS) $(COMPAT_OBJS)
+@@ -193,7 +180,7 @@ uninstall:
+ rm -f $(MANDIR)/man$$section/$$name ; \
+ done
+
+-install: bins
++install: bins install_libs
+ mkdir -p $(DESTDIR)$(BINDIR)
+ mkdir -p $(DESTDIR)$(MANDIR)/man1
+ mkdir -p $(DESTDIR)$(MANDIR)/man5
+@@ -208,7 +195,7 @@ install: bins
+ $(INSTALL_DATA) share/ms/* $(DESTDIR)$(SHAREDIR)/lowdown/ms
+ $(INSTALL_DATA) share/odt/* $(DESTDIR)$(SHAREDIR)/lowdown/odt
+ $(INSTALL_PROGRAM) lowdown $(DESTDIR)$(BINDIR)
+- $(INSTALL_PROGRAM) lowdown-diff $(DESTDIR)$(BINDIR)
++ ln -s lowdown $(DESTDIR)$(BINDIR)/lowdown-diff
+ for f in $(MAN1S) $(MAN5S) ; do \
+ name=`basename $$f .html` ; \
+ section=$${name##*.} ; \
+@@ -251,7 +238,7 @@ install_static: liblowdown.a install_lib_common
+
+ uninstall_libs: uninstall_shared uninstall_static
+
+-install_libs: install_shared install_static
++install_libs: install_shared
+
+ distcheck: lowdown.tar.gz.sha512
+ mandoc -Tlint -Werror man/*.[135]
diff --git a/app-text/lowdown/lowdown-2.0.0.ebuild b/app-text/lowdown/lowdown-2.0.0.ebuild
new file mode 100644
index 000000000000..b7265610ed8c
--- /dev/null
+++ b/app-text/lowdown/lowdown-2.0.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 2021-2025 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/3"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86"
+
+DEPEND="
+ virtual/libcrypt:=
+"
+RDEPEND="
+ ${DEPEND}
+"
+
+# configure tests for a bunch of BSD functions on Linux
+QA_CONFIG_IMPL_DECL_SKIP=(
+ crypt_newhash
+ crypt_checkpass
+ warnc
+ errc
+ getexecname
+ getprogname
+ memset_s
+ pledge
+ recallocarray
+ strlcat
+ strlcpy
+ strtonum
+ TAILQ_FOREACH_SAFE
+ unveil
+ arc4random
+ b64_ntop
+)
+
+PATCHES=(
+ "${FILESDIR}/lowdown-0.10.0-pkgconfig-libmd.patch"
+ "${FILESDIR}/lowdown-2.0.0-shared-linking.patch"
+)
+
+src_configure() {
+ append-flags -fPIC
+ tc-export CC AR
+
+ ./configure \
+ PREFIX="${EPREFIX}/usr" \
+ MANDIR="${EPREFIX}/usr/share/man" \
+ LDFLAGS="${LDFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ || die "./configure failed"
+}
+
+src_compile() {
+ emake $(usex elibc_musl UTF8_LOCALE=C.UTF-8 '')
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}" emake regress
+}