diff options
author | Anna Vyalkova <cyber+gentoo@sysrq.in> | 2022-07-02 19:57:57 +0300 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2022-07-02 20:35:15 +0300 |
commit | 1dfc0d05b5beb8c5fd7ac7f91e09a1969e22bffe (patch) | |
tree | ca3db37b62724cfa2a6397e8e135ba59cae7f59e /app-text/pastebinit | |
parent | app-admin/doctl: version bump to 1.77.0 (diff) | |
download | gentoo-1dfc0d05b5beb8c5fd7ac7f91e09a1969e22bffe.tar.gz gentoo-1dfc0d05b5beb8c5fd7ac7f91e09a1969e22bffe.tar.bz2 gentoo-1dfc0d05b5beb8c5fd7ac7f91e09a1969e22bffe.zip |
app-text/pastebinit: update EAPI 7 -> 8, enable py3.10
* use optfeatures
* add `man` USE flag
* remove LINGUAS handling
* fix DeprecationWarning
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-text/pastebinit')
-rw-r--r-- | app-text/pastebinit/files/pastebinit-1.5.1-distro.patch | 13 | ||||
-rw-r--r-- | app-text/pastebinit/pastebinit-1.5.1-r1.ebuild | 73 |
2 files changed, 86 insertions, 0 deletions
diff --git a/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch b/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch new file mode 100644 index 000000000000..ee7245c03faa --- /dev/null +++ b/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch @@ -0,0 +1,13 @@ +Fix DeprecationWarning +--- a/pastebinit ++++ b/pastebinit +@@ -32,8 +32,7 @@ + # Now try to override it with a distributor pastebin + try: + import distro +- release = distro.linux_distribution( +- full_distribution_name=False)[0].lower() ++ release = distro.id() + if release == 'debian': + defaultPB = "paste.debian.net" + elif release == 'fedora': diff --git a/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild b/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild new file mode 100644 index 000000000000..aa6e1f277781 --- /dev/null +++ b/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +PYTHON_REQ_USE="xml(+)" +inherit optfeature python-single-r1 + +MY_P="${PN}_${PV}" +DESCRIPTION="A software that lets you send anything you want directly to a pastebin" +HOMEPAGE="https://launchpad.net/pastebinit" +SRC_URI="mirror://ubuntu/pool/main/p/${PN}/${MY_P}.orig.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86" +IUSE="man" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/configobj[${PYTHON_USEDEP}] + ') +" +BDEPEND=" + man? ( + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + ) +" + +PATCHES=( "${FILESDIR}"/${P}-distro.patch ) + +src_prepare() { + default + python_fix_shebang "${S}"/${PN} +} + +src_compile() { + emake -C po + + if use man; then + ebegin "Generating a manpage with xsltproc" + xsltproc --nonet \ + "${BROOT}"/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \ + pastebinit.xml + eend $? + fi +} + +src_install() { + dobin pastebinit utils/pbput + dosym pbput /usr/bin/pbget + dosym pbput /usr/bin/pbputs + + einstalldocs + doman utils/*.1 + use man && doman pastebinit.1 + + insinto /usr/share/locale + doins -r po/mo/* + + insinto /usr/share + doins -r pastebin.d +} + +pkg_postinst() { + optfeature "identification of your distribution" dev-python/distro + optfeature "pbput and pbputs scripts" app-arch/xz-utils + optfeature "pbget and pbputs scripts" app-crypt/gnupg +} |