app-text/ansifilter: Bump to 2.22

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-09-11 11:18:40 +02:00
parent 580c899bbe
commit 29f40a0711
2 changed files with 102 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
DIST ansifilter-2.21.tar.bz2 434994 BLAKE2B 57d85bf0b1feabf6665b4b84e6b2418985c72a12a62e0e8f39f1b5f32190b64f3224dbe84d124631a8adfe08a1699c59b072a963770d44b09f9a97662ca0b274 SHA512 9bdaf7ec769ec58258c27723ae1aab5f8227b61fe8b8ddb4b429787819c7e40f8a911daacd21427b93e2668555e97b2dc28d502c971ba496a3b50a1eeec5fbb1
DIST ansifilter-2.21.tar.bz2.asc 488 BLAKE2B 80fdedbe258417cd9eb858bbb342583a00e1cc2bf7344c30cbdbccb5a781770ecc73ae237ad03701d19a97b6c1eb7f0b49c02307533725d56b54141fd67b3c99 SHA512 f58d355aaa1362912ebae214bb6b6f5d355a6cf3fbc9ad42e8d2be8d3f0106a8eb2f7e2db69460f92816f57f5a6b33b28ad21d2c86301686975b6ad3b49c2a59
DIST ansifilter-2.22.tar.bz2 435974 BLAKE2B ab55843c4e26a0085bf4688a75cf5aa763754ce78d1561964e076525ef1e96aa02e0e16fd670ad631329656f855af6b9ab8fc2f12dc750ec99229a0da606cc4e SHA512 6f76532cef0f4083dfbf95a9e945d490388c8308401d03b715dc67eb0d0b76c1533d7abb329b986dfac44cbdf141b9783994041d54a44c5b47f3bd34d3489c97
DIST ansifilter-2.22.tar.bz2.asc 488 BLAKE2B 43b35926810fc2ebcb210ae9802b68471eba03c0208381b018848dbfb006dbe54c839fde9d59a52174caa9ccf05f79375fda19a9fe11f73e0402084a5768e109 SHA512 c7cf6045fdb00e6a7223e42108645aff47a569775685e53925943c8dfbd5717be2f4d57afa72f5f25b126be3f1b3db829bba12191383efed58fc15bb84de1f08
DIST ansifilter2_logo_256.png 54539 BLAKE2B f8b98e22b08c62769bc679f17b3f9d2faeee806d95af3b4a4876e4938813694a4924ed4684163e962d94d3f1efdd31facdae4c3eb75c98322da228bdf0a130be SHA512 ff6f76a91a4809289f90db2bcefc01e772e043a478d7f84b33b4313ed163692e7d2f87880e5fdb64f0e419f6c1ef6ec85240f5a9984223e9059f0803be313de5

View File

@@ -0,0 +1,100 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop toolchain-funcs qmake-utils verify-sig xdg-utils
DESCRIPTION="Handles text files containing ANSI terminal escape codes"
HOMEPAGE="
http://andre-simon.de/doku/ansifilter/en/ansifilter.php
https://gitlab.com/saalen/ansifilter/
"
SRC_URI="
http://andre-simon.de/zip/${P}.tar.bz2
gui? ( https://gitlab.com/uploads/-/system/project/avatar/6678914/ansifilter2_logo_256.png )
verify-sig? ( http://andre-simon.de/zip/${P}.tar.bz2.asc )
"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
IUSE="gui"
DEPEND="
gui? ( dev-qt/qtbase:6[gui,widgets] )
"
RDEPEND="
${DEPEND}
"
BDEPEND="
verify-sig? ( >=sec-keys/openpgp-keys-andresimon-20250911 )
"
DOCS=( ChangeLog.adoc README.adoc )
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/andresimon.asc
src_unpack() {
if use verify-sig ; then
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
fi
default
}
src_prepare() {
default
sed \
-e "/GZIP/d" \
-e "/COPYING/d" \
-i makefile || die
sed \
-e "s/-O2//" \
-i src/makefile || die
}
src_configure() {
if use gui ; then
pushd src/qt-gui > /dev/null || die
eqmake6
popd > /dev/null || die
fi
}
src_compile() {
emake -f makefile CXX="$(tc-getCXX)"
if use gui ; then
emake -C src/qt-gui
fi
}
src_install() {
emake -f makefile \
DESTDIR="${ED}" \
doc_dir="/usr/share/doc/${PF}" \
-j1 \
install $(usev gui install-gui)
einstalldocs
if use gui; then
newicon -s 256 "${DISTDIR}"/ansifilter2_logo_256.png "${PN}".png
fi
}
pkg_postrm() {
if use gui; then
xdg_desktop_database_update
xdg_icon_cache_update
fi
}
pkg_postinst() {
if use gui; then
xdg_desktop_database_update
xdg_icon_cache_update
fi
}