From: "Louis Sautier" <sbraz@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/, app-text/wgetpaste/files/
Date: Mon, 26 Aug 2019 23:14:36 +0000 (UTC) [thread overview]
Message-ID: <1566861170.dead0ce4020de9e4d2cc394b122f2ac03346010b.sbraz@gentoo> (raw)
commit: dead0ce4020de9e4d2cc394b122f2ac03346010b
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 26 23:11:34 2019 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Mon Aug 26 23:12:50 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dead0ce4
app-text/wgetpaste: backport upstream's patch to fix bpaste.net
Package-Manager: Portage-2.3.71, Repoman-2.3.16
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
.../files/wgetpaste-2.29-fix-bpaste.patch | 40 ++++++++++++++++++++++
app-text/wgetpaste/wgetpaste-2.29-r1.ebuild | 29 ++++++++++++++++
2 files changed, 69 insertions(+)
diff --git a/app-text/wgetpaste/files/wgetpaste-2.29-fix-bpaste.patch b/app-text/wgetpaste/files/wgetpaste-2.29-fix-bpaste.patch
new file mode 100644
index 00000000000..0af9a6f855d
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.29-fix-bpaste.patch
@@ -0,0 +1,40 @@
+From 6175f89cb618fef83882ed86ab049a7fd1035770 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bo=20=C3=98rsted=20Andresen?= <zlin@exherbo.org>
+Date: Tue, 23 Jul 2019 00:16:19 +0200
+Subject: [PATCH] Fix handling of bpaste urls.
+
+---
+ wgetpaste | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/wgetpaste b/wgetpaste
+index 585fcd9..99eb7f1 100755
+--- a/wgetpaste
++++ b/wgetpaste
+@@ -181,7 +181,8 @@ xml+cheetah xml+django xml+evoque xml+lasso xml+mako xml+myghty xml+php xml+erb
+ xml+velocity xml xquery xslt xtend yaml"
+ EXPIRATIONS_pinnwand="1day 1week 1month never"
+ POST_pinnwand="submit=Paste! % % lexer expiry % code"
+-REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[[:alnum:]]*/\?\)$|\1raw\2|'
++REGEX_LOC_pinnwand="\(/show/[^ ]*\).*$|https://bpaste.net\1"
++REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[^ ]*/\?\)$|\1raw\2|'
+
+ ### errors
+ die() {
+@@ -550,11 +551,15 @@ postdata() {
+
+ # get url from response from server
+ geturl() {
+- local regex
++ local regex location
+ regex=REGEX_URL_$ENGINE
++ location=REGEX_LOC_$ENGINE
+ if [[ -n ${!regex} ]]; then
+ [[ needstdout = $1 ]] && return 0
+ sed -n -e "${!regex}" <<< "$*"
++ elif [[ -n ${!location} ]]; then
++ [[ needstdout = $1 ]] && return 1
++ sed -n -e "s|^.*Location: ${!location}|p" <<< "$*"
+ else
+ [[ needstdout = $1 ]] && return 1
+ sed -n -e 's|^.*Location: \(https\{0,1\}://[^ ]*\).*$|\1|p' <<< "$*"
diff --git a/app-text/wgetpaste/wgetpaste-2.29-r1.ebuild b/app-text/wgetpaste/wgetpaste-2.29-r1.ebuild
new file mode 100644
index 00000000000..175617a320c
--- /dev/null
+++ b/app-text/wgetpaste/wgetpaste-2.29-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+DESCRIPTION="Command-line interface to various pastebins"
+HOMEPAGE="http://wgetpaste.zlin.dk/"
+SRC_URI="http://wgetpaste.zlin.dk/${P}.tar.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+ssl"
+
+DEPEND=""
+RDEPEND="net-misc/wget[ssl?]"
+
+PATCHES=( "${FILESDIR}/${P}-fix-bpaste.patch" )
+
+src_prepare() {
+ sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
+ default
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /usr/share/zsh/site-functions
+ doins _wgetpaste
+}
next reply other threads:[~2019-08-26 23:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 23:14 Louis Sautier [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-29 3:13 [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/, app-text/wgetpaste/files/ Sam James
2023-01-14 23:25 Sam James
2021-02-25 16:57 Ben Kohler
2019-02-23 18:46 Mikle Kolyada
2019-02-23 18:43 Mikle Kolyada
2019-02-23 15:34 Ben Kohler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1566861170.dead0ce4020de9e4d2cc394b122f2ac03346010b.sbraz@gentoo \
--to=sbraz@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox