From 29a5fa8880df986e4398c5cf25f1885a36d87848 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sun, 25 Sep 2016 04:38:22 +0000 Subject: [PATCH] app-editors/joe: Make Go syntax support optional via USE=go --- app-editors/joe/joe-4.2.ebuild | 14 ++++++++++++-- app-editors/joe/joe-4.3-r1.ebuild | 13 +++++++++++-- app-editors/joe/metadata.xml | 1 + 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/app-editors/joe/joe-4.2.ebuild b/app-editors/joe/joe-4.2.ebuild index 94c12f9..c5eb54c 100644 --- a/app-editors/joe/joe-4.2.ebuild +++ b/app-editors/joe/joe-4.2.ebuild @@ -8,18 +8,28 @@ 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" +LICENSE="GPL-1+ go? ( CC-BY-3.0 )" SLOT="0" KEYWORDS="alpha amd64 arm ~ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris" -IUSE="xterm" +IUSE="+go xterm" DEPEND=">=sys-libs/ncurses-5.2-r2" RDEPEND="xterm? ( >=x11-terms/xterm-239 )" DOCS=( README.md NEWS.md docs/hacking.md docs/man.md ) +inherit autotools + src_prepare() { default + + # The Go syntax definition is licensed under more restrictive terms, so allow the user to disable it + if ! use go; then + sed -i 's~\b\(syntax\/\)\?go\.jsf\b~~g' configure.ac syntax/Makefile.am + rm syntax/go.jsf{,.in} || die 'rm go.jsf failed' + eautoreconf + fi + # Enable xterm mouse support in the rc files if use xterm; then cd "${S}"/rc diff --git a/app-editors/joe/joe-4.3-r1.ebuild b/app-editors/joe/joe-4.3-r1.ebuild index 170a0d7..d09fb19 100644 --- a/app-editors/joe/joe-4.3-r1.ebuild +++ b/app-editors/joe/joe-4.3-r1.ebuild @@ -10,10 +10,10 @@ 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" +LICENSE="GPL-1+ go? ( CC-BY-3.0 )" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris" -IUSE="xterm" +IUSE="+go xterm" DEPEND=">=sys-libs/ncurses-5.2-r2:0=" RDEPEND="${DEPEND} @@ -23,8 +23,17 @@ DOCS=( README.md NEWS.md docs/hacking.md docs/man.md ) PATCHES=( "${FILESDIR}/${PN}-4.3-tinfo.patch" ) +inherit autotools + src_prepare() { default + + # The Go syntax definition is licensed under more restrictive terms, so allow the user to disable it + if ! use go; then + sed -i 's~\b\(syntax\/\)\?go\.jsf\b~~g' configure.ac syntax/Makefile.am + rm syntax/go.jsf{,.in} || die 'rm go.jsf failed' + fi + # Enable xterm mouse support in the rc files if use xterm; then pushd "${S}"/rc &>/dev/null || die diff --git a/app-editors/joe/metadata.xml b/app-editors/joe/metadata.xml index 9fd1399..a49f888 100644 --- a/app-editors/joe/metadata.xml +++ b/app-editors/joe/metadata.xml @@ -17,6 +17,7 @@ of VI. + Install syntax for the Go language Enable full xterm clipboard support -- 2.7.3