From 59c2499e0c9720169c9d5a02168c51c807a21467 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 14 May 2024 00:01:24 +0100 Subject: gentoo auto-resync : 14:05:2024 - 00:01:24 --- app-text/discount/Manifest | 2 + app-text/discount/discount-2.2.7c-r1.ebuild | 71 ++++++++++++++++++++++ .../discount/files/discount-2.2.7c-C99-fix.patch | 38 ++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 app-text/discount/discount-2.2.7c-r1.ebuild create mode 100644 app-text/discount/files/discount-2.2.7c-C99-fix.patch (limited to 'app-text/discount') diff --git a/app-text/discount/Manifest b/app-text/discount/Manifest index 21875f0d665e..81ffb29ea1ce 100644 --- a/app-text/discount/Manifest +++ b/app-text/discount/Manifest @@ -1,6 +1,8 @@ +AUX discount-2.2.7c-C99-fix.patch 1023 BLAKE2B 10defd3b772ec008793101fb29bbd3ac7e7d937da37f3fd7e1375d109ffc41f4c1464330b302e56fc59e0830b825d9d4e0d00c7f02c5459b87323a3b56ec360a SHA512 7c87fde7c0f8c959233aaead9ef1106eb92d648d5267c0aa027c150541524fd9e23f8f28a25131d948a5d4d81f3c62d0d66c0c05b899de958ea55fe746661b7a DIST discount-2.2.7c.tar.gz 133282 BLAKE2B 3258cfa34d58ef5944ae5282f6df061b8183bccc1ca7f9f3a39b3c001a8b86a4deb86b80d109d937e334b2773e5065a0f6c212ac7a79317ce2ae665778a023e2 SHA512 2a959fb24d7291b3a8c6d659b5c904b8c2f8b6d9b0666e998ca5313533cc25898b9c2114f7922272f3bc6b9bfe4bc486fe08c620b4cb2a2282624e128dc92781 DIST discount-3.0.0a.tar.gz 140250 BLAKE2B 1e89f9c58c4d90157a9ccd925b89f098538c93191937e86eeefd32810e937feb78b6eeab96aead029fc35e4bf6699a40f67bdceb3c2d70fdc645fcd14091a3e7 SHA512 d86bfc6d3e11131622046418a1f54bd9dfa5f1233e510189cd2c89dc857da31e88ffbe6670cc506ca8b9763e8fb74ed215f1018f83e25767c77acb8a7c296b8a DIST discount-3.0.0d.tar.gz 141531 BLAKE2B 723f0319d82ec240e7eed8c812278555066f092b3a764c332f8327f09cfc0420c6db18f0ab114f64b26a9fbd6f7374f309a892f53dd0f721c02741e849cd6562 SHA512 ab24722bb8513f64eed59bb2770276b91615033b494a0492a331f36c5fcd2e32b7a9f3bd7ef0bb74c107f1e0e955522c83ddba6c482fca7f18cf275334707c4d +EBUILD discount-2.2.7c-r1.ebuild 1722 BLAKE2B 23380af4903122d40cf1d693de53ce955492ff65eab3022a37d2cf07f36e7f1574d958da9e63ad1ea88e40a35d820ff52819dace8d80f39e364fdc04c27b8747 SHA512 95b6da6a378f89d9212d2c5a1fab28e458a6a231d05a610c7d76976689bb8ff38e8e235bbd4bfa53e8ca968e8ac6641661ce51c69cfb66f65f3aa9d827c43d01 EBUILD discount-2.2.7c.ebuild 1661 BLAKE2B 82f829f8e7dee3f4f5e24d323e7fb212c8054637a64f62ca4444a35c0d4f10ed9c8b45c8739bdd87c8decf5e4419559c052e99ec696d2b5dd34ae35593c67a99 SHA512 b7ee19137b62a3bf87c1fcdd8acde163f5ab223289342598a933d2ba078894ca0f77387c89d9a47db4ee05542559bc2d57a5018eb18631afeaae3adc700b2f0d EBUILD discount-3.0.0a.ebuild 1667 BLAKE2B bafdb06df50ca341f6f40c8c0567c4a2032587546da1a286ed84a439d3ad98689494f84e478b0649034018b864ab6043a7e7e91b1c39f4c4f008d91cc4ceb7ee SHA512 844df1f7aba5a69316bb9e93da213869840c8bb1d0357f20d5499381800cfec8882d643759769799d1a58b92d22050eb5f5e0f053dd0d55607a9df4dc710ef6c EBUILD discount-3.0.0d.ebuild 1667 BLAKE2B d5ddffec76d644d6fb2966d60794c66da0da8dd7697ba03d1a11c14ac8d527ce814ef8b82ef71bd2eef84e97f5bfbcdda7a46d029348ef6b8e93b71266349f06 SHA512 cb589fe6cd34dd39b8f37d9604a3690e01985d4c5ca6cfe08b2f51694c48c6bc1e2070a0fc340fa68345258faa3c3e5b226a62c48ce3757302d90be97823adbe diff --git a/app-text/discount/discount-2.2.7c-r1.ebuild b/app-text/discount/discount-2.2.7c-r1.ebuild new file mode 100644 index 000000000000..1ff52d6de8b1 --- /dev/null +++ b/app-text/discount/discount-2.2.7c-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A Markdown-to HTML translator written in C" +HOMEPAGE="http://www.pell.portland.or.us/~orc/Code/discount/" +SRC_URI="https://github.com/Orc/discount/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/2.2.7" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="minimal test" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.2.7c-C99-fix.patch +) + +src_prepare() { + default + + # for QA, we remove the Makefile’s usage of install -s. + # Drop ldconfig invocation. + # Force “librarian.sh” to respect LDFLAGS ($FLAGS should have CFLAGS + # at that point). + sed -i \ + -e '/INSTALL_PROGRAM/s,\$_strip ,,' \ + -e 's/\(LDCONFIG=\).*/\1:/' \ + -e 's/\(.\)\$FLAGS/& \1$LDFLAGS/' \ + configure.inc || die "sed configure.inc failed" +} + +src_configure() { + local configure_call=( + ./configure.sh + --libdir="${EPREFIX}/usr/$(get_libdir)" + --prefix="${EPREFIX}/usr" + --mandir="${EPREFIX}/usr/share/man" + --shared + --pkg-config + $(usex minimal '' --enable-all-features) + # Enable deterministic HTML generation behavior. Otherwise, will + # actually call rand() as part of its serialization code... + --debian-glitch + ) + einfo "Running ${configure_call[@]}" + CC="$(tc-getCC)" AR="$(tc-getAR)" \ + "${configure_call[@]}" || die +} + +src_compile() { + emake libmarkdown + emake +} + +src_install() { + emake \ + DESTDIR="${D}" \ + $(usex minimal install install.everything) \ + SAMPLE_PFX="${PN}-" +} + +pkg_postinst() { + if ! use minimal; then + elog 'Sample binaries with overly-generic names have been' + elog "prefixed with \"${PN}-\"." + fi +} diff --git a/app-text/discount/files/discount-2.2.7c-C99-fix.patch b/app-text/discount/files/discount-2.2.7c-C99-fix.patch new file mode 100644 index 000000000000..b08d3d41f844 --- /dev/null +++ b/app-text/discount/files/discount-2.2.7c-C99-fix.patch @@ -0,0 +1,38 @@ +FROM: https://github.com/Orc/discount/issues/283 +FROM: Atri Bhattacharya + +--- a/main.c ++++ b/main.c +@@ -100,14 +100,15 @@ free_it(char *object, void *ctx) + } + + char * +-external_codefmt(char *src, int len, char *lang) ++external_codefmt(const char *src, const int len, void *lang) + { + int extra = 0; + int i, x; + char *res; ++ char *ec_lang = (char *)lang; + +- if ( lang == 0 ) +- lang = "generic_code"; ++ if ( ec_lang == 0 ) ++ ec_lang = "generic_code"; + + for ( i=0; i < len; i++) { + if ( src[i] == '&' ) +@@ -117,11 +118,11 @@ external_codefmt(char *src, int len, cha + } + + /* 80 characters for the format wrappers */ +- if ( (res = malloc(len+extra+80+strlen(lang))) ==0 ) ++ if ( (res = malloc(len+extra+80+strlen(ec_lang))) ==0 ) + /* out of memory? drat! */ + return 0; + +- sprintf(res, "
\n", lang);
++    sprintf(res, "
\n", ec_lang);
+     x = strlen(res);
+     for ( i=0; i < len; i++ ) {
+ 	switch (src[i]) {
-- 
cgit v1.2.3