Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/pastebinit/files/, app-text/pastebinit/
Date: Sat, 02 Jul 2022 17:43:39
Message-Id: 1656783315.1dfc0d05b5beb8c5fd7ac7f91e09a1969e22bffe.juippis@gentoo
1 commit: 1dfc0d05b5beb8c5fd7ac7f91e09a1969e22bffe
2 Author: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Sat Jul 2 16:57:57 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 2 17:35:15 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dfc0d05
7
8 app-text/pastebinit: update EAPI 7 -> 8, enable py3.10
9
10 * use optfeatures
11 * add `man` USE flag
12 * remove LINGUAS handling
13 * fix DeprecationWarning
14
15 Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in>
16 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
17
18 .../pastebinit/files/pastebinit-1.5.1-distro.patch | 13 ++++
19 app-text/pastebinit/pastebinit-1.5.1-r1.ebuild | 73 ++++++++++++++++++++++
20 2 files changed, 86 insertions(+)
21
22 diff --git a/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch b/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch
23 new file mode 100644
24 index 000000000000..ee7245c03faa
25 --- /dev/null
26 +++ b/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch
27 @@ -0,0 +1,13 @@
28 +Fix DeprecationWarning
29 +--- a/pastebinit
30 ++++ b/pastebinit
31 +@@ -32,8 +32,7 @@
32 + # Now try to override it with a distributor pastebin
33 + try:
34 + import distro
35 +- release = distro.linux_distribution(
36 +- full_distribution_name=False)[0].lower()
37 ++ release = distro.id()
38 + if release == 'debian':
39 + defaultPB = "paste.debian.net"
40 + elif release == 'fedora':
41
42 diff --git a/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild b/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild
43 new file mode 100644
44 index 000000000000..aa6e1f277781
45 --- /dev/null
46 +++ b/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild
47 @@ -0,0 +1,73 @@
48 +# Copyright 1999-2022 Gentoo Authors
49 +# Distributed under the terms of the GNU General Public License v2
50 +
51 +EAPI=8
52 +
53 +PYTHON_COMPAT=( python3_{8..11} )
54 +PYTHON_REQ_USE="xml(+)"
55 +inherit optfeature python-single-r1
56 +
57 +MY_P="${PN}_${PV}"
58 +DESCRIPTION="A software that lets you send anything you want directly to a pastebin"
59 +HOMEPAGE="https://launchpad.net/pastebinit"
60 +SRC_URI="mirror://ubuntu/pool/main/p/${PN}/${MY_P}.orig.tar.gz"
61 +
62 +LICENSE="GPL-2"
63 +SLOT="0"
64 +KEYWORDS="~amd64 ~riscv ~x86"
65 +IUSE="man"
66 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
67 +
68 +RDEPEND="
69 + ${PYTHON_DEPS}
70 + $(python_gen_cond_dep '
71 + dev-python/configobj[${PYTHON_USEDEP}]
72 + ')
73 +"
74 +BDEPEND="
75 + man? (
76 + app-text/docbook-xsl-stylesheets
77 + dev-libs/libxslt
78 + )
79 +"
80 +
81 +PATCHES=( "${FILESDIR}"/${P}-distro.patch )
82 +
83 +src_prepare() {
84 + default
85 + python_fix_shebang "${S}"/${PN}
86 +}
87 +
88 +src_compile() {
89 + emake -C po
90 +
91 + if use man; then
92 + ebegin "Generating a manpage with xsltproc"
93 + xsltproc --nonet \
94 + "${BROOT}"/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \
95 + pastebinit.xml
96 + eend $?
97 + fi
98 +}
99 +
100 +src_install() {
101 + dobin pastebinit utils/pbput
102 + dosym pbput /usr/bin/pbget
103 + dosym pbput /usr/bin/pbputs
104 +
105 + einstalldocs
106 + doman utils/*.1
107 + use man && doman pastebinit.1
108 +
109 + insinto /usr/share/locale
110 + doins -r po/mo/*
111 +
112 + insinto /usr/share
113 + doins -r pastebin.d
114 +}
115 +
116 +pkg_postinst() {
117 + optfeature "identification of your distribution" dev-python/distro
118 + optfeature "pbput and pbputs scripts" app-arch/xz-utils
119 + optfeature "pbget and pbputs scripts" app-crypt/gnupg
120 +}