diff --git a/app-text/wgetpaste/Manifest b/app-text/wgetpaste/Manifest new file mode 100644 index 000000000..d77a1f872 --- /dev/null +++ b/app-text/wgetpaste/Manifest @@ -0,0 +1 @@ +DIST wgetpaste-2.22.tar.bz2 10842 SHA256 a903d4b93e487046226ad77037a28cb5f6cf2465bf212e5edf568c4135f6fe05 SHA512 4a9fd56b1d4924a863d10af38721469ac0116cb05b5e5e79f5ecf149ba2af69acf79a30bc66450b9363b2fa7116b20222073dc8d7bc1e7dbab79981e6ce80396 WHIRLPOOL c25fc58c0e0a01b0960ebb07e270c7c8136d1589f16eae9c1e94c614260b479abdbf5255d60d9ebe477c5acd201f0e598f69a3501cd127fb7f42e9a80b443d77 diff --git a/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/calculate_wgetpaste-22.patch b/app-text/wgetpaste/files/calculate_wgetpaste-22.patch similarity index 99% rename from profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/calculate_wgetpaste-22.patch rename to app-text/wgetpaste/files/calculate_wgetpaste-22.patch index a1efb36de..231956059 100644 --- a/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/calculate_wgetpaste-22.patch +++ b/app-text/wgetpaste/files/calculate_wgetpaste-22.patch @@ -1,4 +1,3 @@ -# Calculate format=diff merge(app-text/wgetpaste)>=2.22 diff -ruN wgetpaste-2.22.orig/wgetpaste wgetpaste-2.22/wgetpaste --- wgetpaste-2.22.orig/wgetpaste 2014-01-21 11:31:59.475610453 +0400 +++ wgetpaste-2.22/wgetpaste 2014-01-21 11:41:13.858639053 +0400 diff --git a/app-text/wgetpaste/files/wgetpaste-config-default-lodgeit b/app-text/wgetpaste/files/wgetpaste-config-default-lodgeit new file mode 100644 index 000000000..4cf55dcfd --- /dev/null +++ b/app-text/wgetpaste/files/wgetpaste-config-default-lodgeit @@ -0,0 +1 @@ +DEFAULT_SERVICE="bpaste" diff --git a/app-text/wgetpaste/files/wgetpaste-config-services b/app-text/wgetpaste/files/wgetpaste-config-services new file mode 100644 index 000000000..0f7014b17 --- /dev/null +++ b/app-text/wgetpaste/files/wgetpaste-config-services @@ -0,0 +1,6 @@ +#!/bin/bash + +SERVICES="${SERVICES} lugons" + +ENGINE_lugons=lodgeit +URL_lugons="https://paste.lugons.org/" diff --git a/app-text/wgetpaste/wgetpaste-2.22.ebuild b/app-text/wgetpaste/wgetpaste-2.22.ebuild new file mode 100644 index 000000000..5c818f178 --- /dev/null +++ b/app-text/wgetpaste/wgetpaste-2.22.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/wgetpaste/wgetpaste-2.22.ebuild,v 1.9 2014/09/14 15:32:19 mrueg Exp $ + +EAPI="4" + +inherit eutils + +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 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="zsh-completion +lodgeit-default" + +DEPEND="" +RDEPEND="net-misc/wget + zsh-completion? ( app-shells/zsh )" + +src_unpack() { + unpack "${A}" + cd "${S}" + + epatch "${FILESDIR}/calculate_wgetpaste-22.patch" +} + +src_prepare() { + sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die +} + +src_install() { + dobin ${PN} + insinto /etc/wgetpaste.d + newins "${FILESDIR}"/wgetpaste-config-services services.conf + use lodgeit-default && \ + newins "${FILESDIR}"/wgetpaste-config-default-lodgeit gentoo-default.conf + if use zsh-completion ; then + insinto /usr/share/zsh/site-functions + doins _wgetpaste + fi +} diff --git a/profiles/templates/3.1/6_ac_install_patch/app-text/.calculate_directory b/profiles/templates/3.1/6_ac_install_patch/app-text/.calculate_directory deleted file mode 100644 index 720d52e47..000000000 --- a/profiles/templates/3.1/6_ac_install_patch/app-text/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate append=skip diff --git a/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/.calculate_directory b/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/.calculate_directory deleted file mode 100644 index 5c965ea54..000000000 --- a/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate merge()!= append=skip diff --git a/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/calculate_wgetpaste.patch b/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/calculate_wgetpaste.patch deleted file mode 100644 index b584f71e6..000000000 --- a/profiles/templates/3.1/6_ac_install_patch/app-text/wgetpaste/calculate_wgetpaste.patch +++ /dev/null @@ -1,190 +0,0 @@ -# Calculate format=diff merge(app-text/wgetpaste)>=2.20&&merge(app-text/wgetpaste)<2.22 -diff -urN a/wgetpaste b/wgetpaste ---- a/wgetpaste 2012-05-05 23:15:32.000000000 +0400 -+++ b/wgetpaste 2012-06-29 12:14:53.482724926 +0400 -@@ -6,6 +6,8 @@ - - VERSION="2.20" - -+DEFAULT_SERVICE="calculate" -+ - # don't inherit LANGUAGE from the env - unset LANGUAGE - -@@ -14,7 +16,7 @@ - N=$'\n' - - ### services --SERVICES="ca codepad dpaste gists poundpython" -+SERVICES="ca codepad dpaste gists poundpython calculate" - # ca - ENGINE_ca=ca - URL_ca="http://pastebin.ca/" -@@ -39,6 +41,17 @@ - ENGINE_tinyurl=tinyurl - URL_tinyurl="http://tinyurl.com/ api-create.php" - REGEX_RAW_tinyurl='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2|' -+# calculate -+ENGINE_calculate=calculate -+if [[ "$LANG" =~ 'ru_RU' ]]; then -+ URL_calculate="http://pastebin.calculate-linux.ru" -+else -+ URL_calculate="http://pastebin.calculate-linux.org" -+fi -+DEFAULT_LANGUAGE_calculate="Text" -+DEFAULT_PARENT_calculate="" -+DEFAULT_PRIVATE_calculate=0 -+SIZE_calculate="25000 25%kB" - - ### engines - # ca -@@ -49,12 +62,12 @@ - EXPIRATIONS_ca="Never 5%minutes 10%minutes 15%minutes 30%minutes 45%minutes 1%hour 2%hours \ - 4%hours 8%hours 12%hours 1%day 2%days 3%days 1%week 2%weeks 3%weeks 1%month 2%months \ - 3%months 4%months 5%months 6%months 1%year" --POST_ca="s=Submit+Post name description type expiry % content" -+POST_ca="s=Submit+Post name description type expiry % % % content" - REGEX_URL_ca='s|^.*content="[0-9]*;\(http://[^/]*/[0-9]*\)".*$|\1|p' - REGEX_RAW_ca='s|^\(http://[^/]*/\)\([0-9]*\)$|\1raw/\2|' - # codepad - LANGUAGES_codepad="C C++ D Haskell Lua OCaml PHP Perl Plain%Text Python Ruby Scheme Tcl" --POST_codepad="submit % % lang % % code" -+POST_codepad="submit % % lang % % % % code" - REGEX_URL_codepad='s|^--.*\(http://codepad.org/[^ ]\+\)|\1|p' - REGEX_RAW_codepad='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2/raw.rb|' - # dpaste -@@ -64,7 +77,7 @@ - Ruby Rhtml Sql Xml" - EXPIRATIONS_dpaste="30%days 30%days%after%last%view" - EXPIRATION_VALUES_dpaste="off on" --POST_dpaste="submit=Paste+it poster title language hold % content" -+POST_dpaste="submit=Paste+it poster title language hold % % % content" - REGEX_RAW_dpaste='s|^\(http://[^/]*/\)[^0-9]*\([0-9]*/\)$|\1\2plain/|' - # gists - LANGUAGES_gists="ActionScript Ada Apex AppleScript Arc Arduino ASP Assembly -@@ -113,8 +126,24 @@ - javac-messages js jsp lighttpd literate-haskell llvm lua html+mako matlab matlabsession minid multi \ - html+myghty mysql nasm nginx objectpascal ocaml perl html+php php povray python pycon pytb rst ruby \ - scala scheme smalltalk smarty sourceslist sql squidconf tex text diff vim xml xslt yaml" --POST_lodgeit="submit=Paste! % % language % % code" -+POST_lodgeit="submit=Paste! % % language % % % % code" - REGEX_RAW_lodgeit='s|^\(http://[^/]*/\)show\(/[0-9]*/\)$|\1raw\2|' -+# calculate -+LANGUAGES_calculate="Apache Bash Batch Boo C C# C++ Clojure Creole_Wiki CSS \ -+CSV D Debian_control-files Django_Jinja_Templates Dylan Erlang eRuby_rhtml GAS GCC_Messages \ -+Genshi_Templates Gettext_catalogs GL_Shader_language Haskell HTML INI_File Interactive_Ruby IO \ -+IRC_Logs Java javac_Messages JavaScript JSP Lighttpd Literate_Haskell LLVM Lua Mako_Templates Matlab \ -+Matlab_Session MiniD Multi-File Myghty_Templates MySQL Nasm Nginx Object-Pascal OCaml Perl PHP \ -+PHP_(inline) Povray Python Python_Console_Sessions Python_Tracebacks reStructuredText Ruby Scala \ -+Scheme Smalltalk Smarty sources.list SQL SquidConf TeX_LaTeX Text Unified_Diff Vim XML XSLT YAML" -+LANGUAGE_VALUES_calculate="apache bash bat boo c csharp cpp clojure creole css csv d control html+django \ -+dylan erlang rhtml gas gcc-messages html+genshi gettext glsl haskell html ini irb io irc java \ -+javac-messages js jsp lighttpd literate-haskell llvm lua html+mako matlab matlabsession minid multi \ -+html+myghty mysql nasm nginx objectpascal ocaml perl html+php php povray python pycon pytb rst ruby \ -+scala scheme smalltalk smarty sourceslist sql squidconf tex text diff vim xml xslt yaml" -+POST_calculate="submit=paste! % % language % parent private % text" -+REGEX_RAW_calculate='s|^\(http://[^/]*/\)show\(/[0-9]*/\)$|\1raw\2|' -+ - - ### errors - die() { -@@ -303,6 +332,9 @@ - -s, --service SERVICE set service to use (defaults to "$DEFAULT_SERVICE") - -e, --expiration EXPIRATION set when it should expire (defaults to "$DEFAULT_EXPIRATION") - -+ -p, --parent PARENT set parent paste (defaults to "$DEFAULT_PARENT", make use id paste) (Calculate pastebin option) -+ -P, --private PRIVATE set private status (defaults to "$DEFAULT_PRIVATE") (Calculate pastebin option) -+ - -S, --list-services list supported pastebin services - -L, --list-languages list languages supported by the specified service - -E, --list-expiration list expiration setting supported by the specified service -@@ -390,6 +422,18 @@ - done | sort - } - -+showprivate() { -+ local p priv d -+ priv=PRIVATE_$ENGINE -+ [[ -n $COMPLETIONS ]] && printlist ${!priv} | sort && exit 0 -+ echo "Private supported by $(getrecipient) (case sensitive):" -+ [[ -z ${!priv} ]] && echo "$N\"$ENGINE\" has no support for setting language." >&2 && exit 1 -+ for p in ${!priv}; do -+ [[ ${p//\%/ } = $DEFAULT_PRIVATE ]] && d="*" || d=" " -+ echo " $d${p//\%/ }" -+ done | sort -+} -+ - showexpirations() { - local e expiration info d - expiration=EXPIRATIONS_$ENGINE -@@ -443,7 +487,7 @@ - post=POST_$ENGINE - if [[ -n ${!post} ]]; then - nr=${!post//[^ ]} -- [[ 6 = ${#nr} ]] || die "\"${SERVICE}\" is not supported by ${FUNCNAME}()." -+ [[ 8 = ${#nr} ]] || die "\"${SERVICE}\" is not supported by ${FUNCNAME}()." - extra=${!post%% *} - [[ '%' = $extra ]] || echo -n "$extra&" - e() { -@@ -456,7 +500,7 @@ - post=${post#$f } - done - } -- e "${!post#$extra }" NICK DESCRIPTION LANGUAGE EXPIRATION CVT_TABS INPUT -+ e "${!post#$extra }" NICK DESCRIPTION LANGUAGE EXPIRATION PARENT PRIVATE CVT_TABS INPUT - elif [[ function == $(type -t json_$ENGINE) ]]; then - json_$ENGINE "$DESCRIPTION" "$LANGUAGE" "$INPUT" - else -@@ -559,6 +603,16 @@ - -L | --list-languages ) - LISTLANGUAGES=0 - ;; -+ -p | --parent ) -+ requiredarg "$@" -+ PARENTSET=0 -+ PARENT="$2" -+ ;; -+ -P | --private ) -+ requiredarg "$@" -+ PRIVATESET=0 -+ PRIVATE="$2" -+ ;; - -n | --nick ) - requiredarg "$@" - NICK=$(escape "$2") -@@ -636,12 +690,16 @@ - DEFAULT_NICK=${DEFAULT_NICK:-$(whoami)} || die "whoami failed" - DEFAULT_SERVICE=${DEFAULT_SERVICE:-gists} - DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE:-Plain Text} -+DEFAULT_PARENT=${DEFAULT_PARENT:-''} -+DEFAULT_PRIVATE=${DEFAULT_PRIVATE:-0} - DEFAULT_EXPIRATION=${DEFAULT_EXPIRATION:-1 month} - SERVICE=${SERVICE:-${DEFAULT_SERVICE}} - ENGINE=ENGINE_$SERVICE - ENGINE="${!ENGINE}" - default="DEFAULT_NICK_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_NICK=${!default} - default="DEFAULT_LANGUAGE_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_LANGUAGE=${!default} -+default="DEFAULT_PARENT_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_PARENT=${!default} -+default="DEFAULT_PRIVATE_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_PRIVATE=${!default} - default="DEFAULT_EXPIRATION_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_EXPIRATION=${!default} - NICK=${NICK:-$(escape "${DEFAULT_NICK}")} - [[ -z $SOURCE ]] && SOURCE="stdin" -@@ -663,6 +721,10 @@ - LANGUAGE=${LANGUAGE:-${DEFAULT_LANGUAGE}} - verifylanguage - LANGUAGE=$(escape "$LANGUAGE") -+PARENT=${PARENT:-${DEFAULT_PARENT}} -+PARENT=$(escape "$PARENT") -+PRIVATE=${PRIVATE:-${DEFAULT_PRIVATE}} -+PRIVATE=$(escape "$PRIVATE") - EXPIRATION=${EXPIRATION:-${DEFAULT_EXPIRATION}} - verifyexpiration - EXPIRATION=$(escape "$EXPIRATION") -@@ -812,6 +874,7 @@ - [[ -f $TMPF ]] || TMPF=$(mktemp /tmp/wgetpaste.XXXXXX) - if [[ -f $TMPF ]]; then - postdata > "$TMPF" || die "Failed to write to temporary file: \"$TMPF\"." -+ [[ $LANG =~ ru_RU ]] && enconv $TMPF - WGETARGS="--post-file=$TMPF" - else - # fall back to using --post-data if the temporary file could not be created