diff --git a/app-text/lowdown-nix/Manifest b/app-text/lowdown-nix/Manifest index d18de48..7984fd1 100644 --- a/app-text/lowdown-nix/Manifest +++ b/app-text/lowdown-nix/Manifest @@ -1,3 +1,4 @@ DIST lowdown-1.1.0.tar.gz 599219 BLAKE2B f623399cb41c5eaf180550283c5b2738993563ff30be4cfa1a471df036ed4289057d3f886a7727d85283896fbfe1316e9cc86d32c629cea1fd775af16cf58839 SHA512 b7b788694abf6760ca4abbd8d5d2c226d5406067ebf9b55307f136e1ab373e517fb20187659c09029463872310a5b39a0129842d1bc6b7bd64f2d440390e2676 DIST lowdown-1.1.1.tar.gz 600635 BLAKE2B 39c0a2472ff6b9b3fa2b6d72c1f2d482592976f7b50c1bbaf1965bfbb6d28f22e0a7498bb54087bb83070bd74ea673409be97815f51a0a5a67e980bbfc4e01b2 SHA512 2a69da945a83696480651e8221d73bcb18bac9bc38bb88126ddf73520d2a4ff396dde08a7abf6f550669ec9ba34abdaa186b0980f312fa157371ee754576bb6a DIST lowdown-1.2.0.tar.gz 657032 BLAKE2B 73b3bfc1b09bc6beb38949a344e5b458f8a1537a99ce48710d170f0553c099d0226b6082923b01c02971d3f82c9773ae95e8792f56ccf0d530708aecab480766 SHA512 ed989e12f1bd6da03cbf139bfe0fb0100fbe23cac266990bb1bc34a3e0be3d4512e1ab1da2397c439d20dc40dd7daa4fc4318116ef2b5e759368e9a28e483744 +DIST lowdown-1.3.0.tar.gz 666560 BLAKE2B 8bf9da6163a65bff7ac5774d0d31a0dc1438832944b2560a9f725bf9c83c359575fdb828d5065a0138e84466c9a95ca514c72cba6c457a0bb02f9e4558cce017 SHA512 ac51e8ff74450bf02d3c8e41f129f15f2ac92d47a07c020f10eea143b506fd113afac0e9bec447c336cf70176ebc886a8933fa38f5779931c9dfd9c06421fcda diff --git a/app-text/lowdown-nix/lowdown-nix-1.3.0.ebuild b/app-text/lowdown-nix/lowdown-nix-1.3.0.ebuild new file mode 100644 index 0000000..eaaa448 --- /dev/null +++ b/app-text/lowdown-nix/lowdown-nix-1.3.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# ::nix-guix note: we fork app-text/lowdown::gentoo version because it +# has a hard time providing working library. A bit of past failed +# attempts: +# - https://bugs.gentoo.org/811111 +# - https://bugs.gentoo.org/832590 +# - https://bugs.gentoo.org/832797 +# and is still broken in app-text/lowdown-0.11.1-r1 (missing liblowdown.so) +# +# To peacefully coexist with app-text/lowdown we install everything into a prefix. + +EAPI=8 + +inherit toolchain-funcs + +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 -> lowdown-${PV}.tar.gz" +S="${WORKDIR}/lowdown-${MY_PV}" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# By default portage runs 'strip -g' on .a files. +# This is known to break liblowdown.a when it's built with -flto: +# https://github.com/trofi/nix-guix-gentoo/issues/19 +# Chances are it's a toolchain bug (or a limitation of LTO): +# https://gcc.gnu.org/PR105877 +RESTRICT=strip + +DEPEND=" + app-crypt/libmd:= + virtual/libcrypt:= +" +RDEPEND="${DEPEND}" + +src_configure() { + CC="$(tc-getCC)" \ + ./configure \ + PREFIX="${EPREFIX}"/usr/$(get_libdir)/lowdown-nix \ + || die "./configure failed" +} + +src_install() { + default + # install static libraries for sys-apps/nix + emake DESTDIR="${D}" install_static +}