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