Skip to content

Commit

Permalink
app/text/lowdown-nix: add 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
trofi committed Nov 9, 2023
1 parent 9237d36 commit cc8d45b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-text/lowdown-nix/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST lowdown-1.0.2.tar.gz 591591 BLAKE2B c6a017419711c04cc61e9f4dc2e08b08d9fd4177124e22487d0eaee2667040264bb5c2ce02e6c27a1362bd04050a6613707339422711c0690e19ba5c089b3b44 SHA512 b4e7e7e71bf5dad2ff7f9e15409fa86c82f20ddf2304a1c3678f677adeab2aa3e609410316b7c0a4fd4019de25bb05e2f6cf9823c6d71df5ba5d23490e08de30
DIST lowdown-1.1.0.tar.gz 599219 BLAKE2B f623399cb41c5eaf180550283c5b2738993563ff30be4cfa1a471df036ed4289057d3f886a7727d85283896fbfe1316e9cc86d32c629cea1fd775af16cf58839 SHA512 b7b788694abf6760ca4abbd8d5d2c226d5406067ebf9b55307f136e1ab373e517fb20187659c09029463872310a5b39a0129842d1bc6b7bd64f2d440390e2676
53 changes: 53 additions & 0 deletions app-text/lowdown-nix/lowdown-nix-1.1.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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"

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}"

S="${WORKDIR}/lowdown-${MY_PV}"

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
}

0 comments on commit cc8d45b

Please sign in to comment.