joe: upgraded package to upstream

Upgraded app-editors/joe to version 4.6 on amd64, arm

BUG=none
TEST=runs on host and hatch, builds on arm-generic

Change-Id: If0f2a16577875564a96aafae826aa0d123a58f04
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2136327
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Craig Hesling <hesling@chromium.org>
Tested-by: Kenneth Albanowski <kenalba@google.com>
Commit-Queue: Kenneth Albanowski <kenalba@google.com>
diff --git a/app-editors/joe/Manifest b/app-editors/joe/Manifest
new file mode 100644
index 0000000..8bb2678
--- /dev/null
+++ b/app-editors/joe/Manifest
@@ -0,0 +1 @@
+DIST joe-4.6.tar.gz 1895046 BLAKE2B fbf53d3b5b066cb32bb26b08d7d314a3bb89ac5ae22db498cdf3597bf8cb322bd9aa05543debd47ac7380a33982c388e13f38c60747503494c582393ae8eb13d SHA512 3dd64a994fb3d352a12bf027ef16d57d14ac2577fd63fb6b6e25cae46052befaa7c15dc029bff2f8c3275df90f0343bd46313601055d97277ea4540e109fbe82
diff --git a/app-editors/joe/files/joe-4.3-tinfo.patch b/app-editors/joe/files/joe-4.3-tinfo.patch
new file mode 100644
index 0000000..fd259e1
--- /dev/null
+++ b/app-editors/joe/files/joe-4.3-tinfo.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Lars Wendler <polynomial-c@gentoo.org>
+# Date 1473084371 -7200
+#      Mon Sep 05 16:06:11 2016 +0200
+# Node ID ae8afbceeed4e446a63ad3111291a98d1390ade2
+# Parent  57c0a14aedcb8eef82d5828721b55aac02847ee7
+configure.ac: search for ncurses' tinfo library if available
+
+ncurses can be built to split out the lowlevel terminfo library
+from ncurses library. In this case there's a libtinfo.so file
+alongside the usual libncurses*.so files.
+This patch adds tinfo to AC_SEARCH_LIBS when ncurses support
+is enabled. Without this patch configure silently fails to find
+tgetflag and thus does not link to ncurses at all.
+I've tested this change on both, ncurses with separate tinfo lib
+and ncurses without separate tinfo lib and in both cases joe
+successfully links against ncurses.
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,7 +39,7 @@
+ 	curses=$enableval, curses=yes)
+ 
+ if test "$curses" = "yes"; then
+-	search_libs="ncurses curses"
++	search_libs="tinfo ncurses curses"
+ fi
+ 
+ AC_ARG_ENABLE(termcap,
diff --git a/app-editors/joe/files/joe-4.6-db.patch b/app-editors/joe/files/joe-4.6-db.patch
new file mode 100644
index 0000000..6270e90
--- /dev/null
+++ b/app-editors/joe/files/joe-4.6-db.patch
@@ -0,0 +1,11 @@
+--- a/desktop/Makefile.am	2018-01-15 12:01:12.624449958 +0100
++++ b/desktop/Makefile.am	2018-01-15 12:01:38.964448343 +0100
+@@ -1,8 +1,2 @@
+ desktopdir = $(datarootdir)/applications
+ dist_desktop_DATA = joe.desktop jmacs.desktop jstar.desktop jpico.desktop
+-
+-update-databases:
+-	-update-desktop-database $(desktopdir)
+-
+-install-data-hook: update-databases
+-uninstall-hook: update-databases
diff --git a/app-editors/joe/joe-4.6.ebuild b/app-editors/joe/joe-4.6.ebuild
new file mode 100644
index 0000000..78c6d65
--- /dev/null
+++ b/app-editors/joe/joe-4.6.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools gnome2-utils
+
+DESCRIPTION="A free ASCII-Text Screen Editor for UNIX"
+HOMEPAGE="https://sourceforge.net/projects/joe-editor/"
+SRC_URI="mirror://sourceforge/joe-editor/${P}.tar.gz"
+
+LICENSE="GPL-1+ CC-BY-3.0"
+SLOT="0"
+KEYWORDS="*"
+IUSE="xterm"
+
+DEPEND=">=sys-libs/ncurses-5.2-r2:0="
+RDEPEND="${DEPEND}
+	xterm? ( >=x11-terms/xterm-239 )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-4.3-tinfo.patch"
+	"${FILESDIR}/${P}-db.patch"
+)
+
+DOCS=( README.md NEWS.md docs/hacking.md docs/man.md )
+
+src_prepare() {
+	default
+	# Enable xterm mouse support in the rc files
+	if use xterm; then
+		pushd "${S}"/rc &>/dev/null || die
+		local i
+		for i in *rc*.in; do
+			sed -e 's/^ -\(mouse\|joexterm\)/-\1/' -i "${i}" || die
+		done
+		popd &>/dev/null
+	fi
+	eautoreconf
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+	gnome2_icon_cache_update
+	if use xterm; then
+		elog "To enable full xterm clipboard you need to set the allowWindowOps"
+		elog "resources to true. This is usually found in /etc/X11/app-defaults/XTerm"
+		elog "This is false by default due to potential security problems on some"
+		elog "architectures (see bug #91453)."
+	fi
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	gnome2_icon_cache_update
+}
diff --git a/app-editors/joe/metadata.xml b/app-editors/joe/metadata.xml
new file mode 100644
index 0000000..9fd1399
--- /dev/null
+++ b/app-editors/joe/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+            <email>amynka@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+  <email>emacs@gentoo.org</email>
+  <name>Gentoo Emacs project</name>
+</maintainer>
+<longdescription>
+  JOE (Joe's own editor) has the feel of most IBM PC text editors: The
+  key-sequences are reminiscent of WordStar and Turbo-C. JOE is much more
+  powerful than those editors, however. JOE has all of the features a UNIX
+  user should expect: full use of termcap/terminfo, excellent screen update
+  optimizations, simple installation, and all of the UNIX-integration features
+  of VI.
+</longdescription> 
+<use>
+  <flag name="xterm">Enable full xterm clipboard support</flag>
+</use>
+<upstream>
+  <remote-id type="sourceforge">joe-editor</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/metadata/md5-cache/app-editors/joe-4.6 b/metadata/md5-cache/app-editors/joe-4.6
new file mode 100644
index 0000000..bb173db
--- /dev/null
+++ b/metadata/md5-cache/app-editors/joe-4.6
@@ -0,0 +1,13 @@
+DEFINED_PHASES=postinst postrm prepare
+DEPEND=>=sys-libs/ncurses-5.2-r2:0= >=app-portage/elt-patches-20170815 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=sys-apps/sed-4
+DESCRIPTION=A free ASCII-Text Screen Editor for UNIX
+EAPI=6
+HOMEPAGE=https://sourceforge.net/projects/joe-editor/
+IUSE=xterm
+KEYWORDS=*
+LICENSE=GPL-1+ CC-BY-3.0
+RDEPEND=>=sys-libs/ncurses-5.2-r2:0= xterm? ( >=x11-terms/xterm-239 )
+SLOT=0
+SRC_URI=mirror://sourceforge/joe-editor/joe-4.6.tar.gz
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	06133990e861be0fe60c2b428fd025d9	gnome2-utils	c6060f4ab634aca444c4b2176b0f3877	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	b2f01ad412baf81650c23fcf0975fa33	toolchain-funcs	209edad4a5c4812e7b2f8021650974f0	xdg-utils	ff2ff954e6b17929574eee4efc5152ba
+_md5_=31095ca48811aecb8996ea4d2e527dbe