summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/nano')
-rw-r--r--app-editors/nano/Manifest4
-rw-r--r--app-editors/nano/files/gentoo.nanorc-r198
-rw-r--r--app-editors/nano/metadata.xml45
-rw-r--r--app-editors/nano/nano-5.7.ebuild89
-rw-r--r--app-editors/nano/nano-5.8.ebuild89
-rw-r--r--app-editors/nano/nano-7.2-r1.ebuild (renamed from app-editors/nano/nano-5.6.1.ebuild)60
-rw-r--r--app-editors/nano/nano-9999.ebuild60
7 files changed, 202 insertions, 243 deletions
diff --git a/app-editors/nano/Manifest b/app-editors/nano/Manifest
index 59d6aa4d0820..dbc18247066b 100644
--- a/app-editors/nano/Manifest
+++ b/app-editors/nano/Manifest
@@ -1,3 +1 @@
-DIST nano-5.6.1.tar.gz 2957693 BLAKE2B dbd1a63b6e0997a30a2ef40ad3248a7f53e2613d4662d5b9fc585bd0e2dfe78f8e8c71354e1a5bbf043ca99e0a69742df7846656d1f0706af79bcbfc53b6d1a6 SHA512 e27ca4411472409bd6ff8d812405e4d8aa869c1348c0a6adbb1c538fb5bdd112b322ef6d8a13df0b43c472d925b94111ac676d03f360d79181dee335a4fd09cf
-DIST nano-5.7.tar.gz 2989413 BLAKE2B 604f3140bd963661bb7d13933b5bac867bcfd90635287dc8f160e4bda094641c20f2fe2157fe1b5eda28842f78c4e651a354ed6edcafe67b4f2bf6c9eda0051c SHA512 f6d580918c488b15a5f8f77b4b52ea3e86535c251fe32dd978bae014bcadd543a5696f7741018ffd05b6271c1defe6a67687577f3cfe059ed2b4d3e422b2a694
-DIST nano-5.8.tar.gz 3038948 BLAKE2B 126976539e8ab3a7be986edc7422bc58d31e0c81dffbf34c9b701d09d268233ed0de4f07ac8d2dd0963b768cce4e2afe89a4f8ed9fd216a71ebac98c7f403deb SHA512 dd3a7e328f256052707c4d28f2ca32f9e44de123e3dee3c0747fbab222d215b2a895c403b9274fd286e19477b8be3314fc83167eec32194370105b1e70c05a3f
+DIST nano-7.2.tar.xz 1608444 BLAKE2B c7e3b18383e9f2f9db1f6059c875ddd164d730ea0e5b363e66fb8e5f30e8598ba49a5afd8eea3a55e295f1e43fb136019f60cc9154ae276c5d589002c0e5298a SHA512 a6dfa70edab62e439a9a998ca214f2415d57dbdc01766ad2e4b14048836557a32755f8b09de13c6a89023f215b61d2854017b389eae8d097ca6f3ba73ce2f583
diff --git a/app-editors/nano/files/gentoo.nanorc-r1 b/app-editors/nano/files/gentoo.nanorc-r1
new file mode 100644
index 000000000000..100877dd16d4
--- /dev/null
+++ b/app-editors/nano/files/gentoo.nanorc-r1
@@ -0,0 +1,98 @@
+## Syntax highlighting for Gentoo ebuilds/eclasses,
+## and (further down) for Portage control files.
+
+syntax ebuild "\.e(build|class)$"
+comment "#"
+
+linter bash -n
+
+## All the standard portage functions:
+color brightgreen "(^|\<default_)src_(unpack|prepare|configure|compile|install|test)\>"
+color brightgreen "^pkg_(config|nofetch|info|pretend|setup|(pre|post)(inst|rm))\>"
+color brightgreen "\<default(_pkg_nofetch|_src_(unpack|prepare|configure|compile|test))?\>"
+## Bash-related syntax:
+color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
+color green "\<(declare|eval|exec|export|let|local)\>"
+color green "[][{}():;|`$<>!=&\]"
+color green "-[defhnrsuwxzL]\>"
+color green "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>"
+
+## Variables... official portage ones in red, all others in bright red:
+color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
+color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:digit:]]|@)+\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
+color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|[BIPR]?DEPEND|PROVIDE|PROPERTIES|REQUIRED_USE|RESTRICT)\>"
+color red "\<(S|E?D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|EPREFIX|(B|E|E?SYS)?ROOT|WORKDIR)\>"
+color red "\<(T|TMPDIR|HOME)\>"
+color red "\<(AS|C(PP|XX)?|FF|GO|LD|RUST)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>" "\<(MERGE_TYPE|REPLACING_VERSIONS|REPLACED_BY_VERSION)\>"
+color red "\<EBUILD_PHASE(_FUNC)?\>"
+color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>"
+color red "\<(PATCHES|(HTML_)?DOCS)\>" "\<WANT_(AUTO(CONF|MAKE)|LIBTOOL)\>" "\<AUTOTOOLS_(AUTO_)?DEPEND\>" "\<AM_OPTS\>" "\<AT_(NOEAUTOHEADER|NOEAUTOMAKE|NOELIBTOOLIZE|M4DIR)\>"
+color red "\<ECONF_SOURCE\>"
+
+## Portage commands:
+color magenta "\<(use(_(with|enable|if_iuse)|x|v)?|in_iuse) [!a-zA-Z0-9_+ -]*" "inherit.*"
+color brightblue "\<e(apply(_user)?|begin|end|conf|install(docs)?|make|ninja|qmake5|ant|(qa)?warn|infon?|error|log|patch(_user)?|new(group|user))\>"
+color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make)|libtoolize)\>"
+color brightblue "\<e(stack|shopts|umask)_(push|pop)\>" "\<get_libdir\>" "\<ver_(cut|rs|test)\>" "\<version_is_at_least\>"
+color brightblue "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
+color brightblue "\<(assert|die|hasv?|inherit|nonfatal)\>" "\<(use(_(with|enable|if_iuse)|x|v)?|in_iuse)\>" "\<(has|best)_version\>"
+color brightblue "\<(do|new)(ins|s?bin|doc|header|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
+color brightblue "\<do(compress|dir|html|mo|strip|sym)\>" "\<keepdir\>"
+color brightblue "\<prepall(docs|info|man|strip)?\>" "\<prep(info|lib|lib\.(so|a)|man|strip)\>"
+color brightblue "\<(doc|ins|exe)?into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
+color brightblue "\<add(read|write|predict|deny)\>"
+### common eclasses
+color brightblue "\<edo(b)?\>"
+### flag-o-matic.eclass, toolchain-funcs.eclass
+color brightblue "\<(all-flag-vars)\>"
+color brightblue "\<(filter-(flags|lfs-flags|lto|mfpmath))\>"
+color brightblue "\<strip-flags\>"
+color brightblue "\<append-(cpp|c|cxx|f|lfs|ld)?flags\>"
+color brightblue "\<replace-flags\>" "\<replace-cpu-flags\>"
+color brightblue "\<is-(ld?)flagq?\>"
+color brightblue "\<(append-atomic-flags|no-as-needed|raw-ldflags|append-libs|replace-sparc64-flags|get-flag|strip-unsupported-flags)\>"
+color brightblue "\<tc-get(BUILD_)?(AR|AS|CC|CPP|CXX|DLLWRAP|F77|FC|GCJ|GO|LD|STRINGS|STRIP|NM|OBJCOPY|OBJDUMP|PKG_CONFIG|RANLIB|RC|READELF)\>"
+color brightblue "\<test-flag(s)?-(CC|CXX|F77|FC|CCLD)\>"
+color brightblue "\<tc-ld-(is-(gold|lld)|disable-gold|force-bfd)\>"
+color brightblue "\<tc-(arch(-kernel)?|check-openmp|export|has-(tls|openmp)|is-cross-compiler)\>"
+color brightblue "\<tc-is-(clang|gcc)\>"
+color brightblue "\<(clang|gcc)-(fullversion|(major-|minor|micro-)version)\>"
+### debugging
+color brightblue "\<debug-print(-function|-section)\>"
+
+## Common commands used in ebuilds:
+color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|unset|xargs)\>"
+## Comments (doesn't work that well):
+color yellow "(^|[[:space:]])#.*"
+## Strings (doesn't work that well):
+color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
+## Trailing space is bad!
+color ,green "[[:space:]]+$"
+## Mixed whitespace is also bad.
+color ,green " "
+
+
+syntax /etc/portage "\.(accept_keywords|env|keywords|mask|unmask|use)(/.+)?$"
+comment "#"
+
+## Base text:
+color green ".+"
+## Likely version and slot numbers:
+color magenta "-[[:digit:].]+(_(alpha|beta|pre|rc|p)[[:digit:]]*)*(-r[[:digit:]]+)?([:[:space:]]|$)"
+color magenta ":[^[:space:]]+([[:space:]]|$)"
+## Use flags (must come after version/slot):
+color brightred "[[:space:]]+\+?[A-Za-z0-9+_@-]+"
+color brightblue "[[:space:]]+-[A-Za-z0-9+_@-]+"
+## Accepted arches:
+color white "[~-]?\<(alpha|amd64|arm(64)?|hppa|ia64|loong|m68k|mips|ppc(64)?|riscv|s390|sparc|x86)(-(linux|macos|solaris))?\>"
+color white "[[:space:]][*~-]?\*"
+## Categories:
+color cyan "^[[:space:]]*[^/]*/"
+## Masking regulators:
+color brightmagenta "^[[:space:]]*(=|~|<|<=|>|>=)"
+## Comments:
+color yellow "#.*"
+## Trailing space is bad!
+color ,green "[[:space:]]+$"
+## Mixed whitespace is also bad.
+color ,green " "
diff --git a/app-editors/nano/metadata.xml b/app-editors/nano/metadata.xml
index add7f71937d3..0e05c7d4c62f 100644
--- a/app-editors/nano/metadata.xml
+++ b/app-editors/nano/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>polynomial-c@gentoo.org</email>
- <name>Lars Wendler</name>
-</maintainer>
-<longdescription>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <longdescription>
GNU nano - an enhanced clone of the Pico text editor.
The nano project was started because of a few "problems" with the
@@ -21,22 +21,19 @@ require a command line flag. Yuck.
nano aims to solve these problems by emulating the functionality of
Pico as closely as possible while addressing the problems above and
perhaps providing other extra functionality.
-</longdescription>
-<use>
- <flag name="justify">Enable justify/unjustify functions for text formatting.</flag>
- <flag name="debug">
- Enable debug messages and assert warnings. Note that these will all be sent
- straight to stderr rather than some logging facility.
- </flag>
- <flag name="magic">
- Add magic file support (sys-apps/file) to automatically detect appropriate syntax highlighting
- </flag>
- <flag name="minimal">
- Disable all fancy features, including ones that otherwise have a dedicated
- USE flag (such as spelling).
- </flag>
- <flag name="split-usr">
- Enable this if /bin and /usr/bin are separate directories
- </flag>
-</use>
+ </longdescription>
+ <use>
+ <flag name="justify">Enable justify/unjustify functions for text formatting.</flag>
+ <flag name="debug">
+ Enable debug messages and assert warnings. Note that these will all be sent
+ straight to stderr rather than some logging facility.
+ </flag>
+ <flag name="magic">
+ Add magic file support (<pkg>sys-apps/file</pkg>) to automatically detect appropriate syntax highlighting
+ </flag>
+ <flag name="minimal">
+ Disable all fancy features, including ones that otherwise have a dedicated
+ USE flag (such as spelling).
+ </flag>
+ </use>
</pkgmetadata>
diff --git a/app-editors/nano/nano-5.7.ebuild b/app-editors/nano/nano-5.7.ebuild
deleted file mode 100644
index aaa4c8829842..000000000000
--- a/app-editors/nano/nano-5.7.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git"
- inherit git-r3 autotools
-else
- MY_P="${PN}-${PV/_}"
- SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="GNU GPL'd Pico clone with more functionality"
-HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide"
-
-LICENSE="GPL-3"
-SLOT="0"
-IUSE="debug justify magic minimal ncurses nls +spell +split-usr static unicode"
-
-LIB_DEPEND=">=sys-libs/ncurses-5.9-r1:0=[unicode?]
- sys-libs/ncurses:0=[static-libs(+)]
- magic? ( sys-apps/file[static-libs(+)] )
- nls? ( virtual/libintl )"
-RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
- static? ( ${LIB_DEPEND} )"
-BDEPEND="
- nls? ( sys-devel/gettext )
- virtual/pkgconfig
-"
-
-REQUIRED_USE="
- magic? ( !minimal )
-"
-
-src_prepare() {
- default
- if [[ ${PV} == "9999" ]] ; then
- eautoreconf
- fi
-}
-
-src_configure() {
- use static && append-ldflags -static
- local myconf=(
- --bindir="${EPREFIX}"/bin
- --htmldir=/trash
- $(use_enable !minimal color)
- $(use_enable !minimal multibuffer)
- $(use_enable !minimal nanorc)
- $(use_enable magic libmagic)
- $(use_enable spell speller)
- $(use_enable justify)
- $(use_enable debug)
- $(use_enable nls)
- $(use_enable unicode utf8)
- $(use_enable minimal tiny)
- )
- econf "${myconf[@]}"
-}
-
-src_install() {
- default
- # don't use "${ED}" here or things break (#654534)
- rm -r "${D}"/trash || die
-
- dodoc doc/sample.nanorc
- docinto html
- dodoc doc/faq.html
- insinto /etc
- newins doc/sample.nanorc nanorc
- if ! use minimal ; then
- # Enable colorization by default.
- sed -i \
- -e '/^# include /s:# *::' \
- "${ED}"/etc/nanorc || die
-
- # Since nano-5.0 these are no longer being "enabled" by default
- # (bug #736848)
- local rcdir="/usr/share/nano"
- mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
- rmdir "${ED}"${rcdir}/extra || die
- fi
-
- use split-usr && dosym ../../bin/nano /usr/bin/nano
-}
diff --git a/app-editors/nano/nano-5.8.ebuild b/app-editors/nano/nano-5.8.ebuild
deleted file mode 100644
index aaa4c8829842..000000000000
--- a/app-editors/nano/nano-5.8.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git"
- inherit git-r3 autotools
-else
- MY_P="${PN}-${PV/_}"
- SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="GNU GPL'd Pico clone with more functionality"
-HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide"
-
-LICENSE="GPL-3"
-SLOT="0"
-IUSE="debug justify magic minimal ncurses nls +spell +split-usr static unicode"
-
-LIB_DEPEND=">=sys-libs/ncurses-5.9-r1:0=[unicode?]
- sys-libs/ncurses:0=[static-libs(+)]
- magic? ( sys-apps/file[static-libs(+)] )
- nls? ( virtual/libintl )"
-RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
- static? ( ${LIB_DEPEND} )"
-BDEPEND="
- nls? ( sys-devel/gettext )
- virtual/pkgconfig
-"
-
-REQUIRED_USE="
- magic? ( !minimal )
-"
-
-src_prepare() {
- default
- if [[ ${PV} == "9999" ]] ; then
- eautoreconf
- fi
-}
-
-src_configure() {
- use static && append-ldflags -static
- local myconf=(
- --bindir="${EPREFIX}"/bin
- --htmldir=/trash
- $(use_enable !minimal color)
- $(use_enable !minimal multibuffer)
- $(use_enable !minimal nanorc)
- $(use_enable magic libmagic)
- $(use_enable spell speller)
- $(use_enable justify)
- $(use_enable debug)
- $(use_enable nls)
- $(use_enable unicode utf8)
- $(use_enable minimal tiny)
- )
- econf "${myconf[@]}"
-}
-
-src_install() {
- default
- # don't use "${ED}" here or things break (#654534)
- rm -r "${D}"/trash || die
-
- dodoc doc/sample.nanorc
- docinto html
- dodoc doc/faq.html
- insinto /etc
- newins doc/sample.nanorc nanorc
- if ! use minimal ; then
- # Enable colorization by default.
- sed -i \
- -e '/^# include /s:# *::' \
- "${ED}"/etc/nanorc || die
-
- # Since nano-5.0 these are no longer being "enabled" by default
- # (bug #736848)
- local rcdir="/usr/share/nano"
- mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
- rmdir "${ED}"${rcdir}/extra || die
- fi
-
- use split-usr && dosym ../../bin/nano /usr/bin/nano
-}
diff --git a/app-editors/nano/nano-5.6.1.ebuild b/app-editors/nano/nano-7.2-r1.ebuild
index e1d933b0f49f..4f09eadd022b 100644
--- a/app-editors/nano/nano-5.6.1.ebuild
+++ b/app-editors/nano/nano-7.2-r1.ebuild
@@ -1,32 +1,37 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit flag-o-matic
-if [[ ${PV} == "9999" ]] ; then
+
+if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git"
- inherit git-r3 autotools
+ inherit autotools git-r3
else
MY_P="${PN}-${PV/_}"
- SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"
-HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide"
+HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Guide"
-LICENSE="GPL-3"
+LICENSE="GPL-3+ LGPL-2.1+ || ( GPL-3+ FDL-1.2+ )"
SLOT="0"
-IUSE="debug justify magic minimal ncurses nls +spell +split-usr static unicode"
+IUSE="debug justify magic minimal ncurses nls +spell static unicode"
-LIB_DEPEND=">=sys-libs/ncurses-5.9-r1:0=[unicode?]
- sys-libs/ncurses:0=[static-libs(+)]
+LIB_DEPEND="
+ >=sys-libs/ncurses-5.9-r1:=[unicode(+)?]
+ sys-libs/ncurses:=[static-libs(+)]
magic? ( sys-apps/file[static-libs(+)] )
- nls? ( virtual/libintl )"
+ nls? ( virtual/libintl )
+"
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
- static? ( ${LIB_DEPEND} )"
+DEPEND="
+ ${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+"
BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
@@ -38,14 +43,16 @@ REQUIRED_USE="
src_prepare() {
default
- if [[ ${PV} == "9999" ]] ; then
+
+ if [[ ${PV} == 9999 ]] ; then
eautoreconf
fi
}
src_configure() {
use static && append-ldflags -static
- local myconf=(
+
+ local myconfargs=(
--bindir="${EPREFIX}"/bin
--htmldir=/trash
$(use_enable !minimal color)
@@ -59,12 +66,14 @@ src_configure() {
$(use_enable unicode utf8)
$(use_enable minimal tiny)
)
- econf "${myconf[@]}"
+
+ econf "${myconfargs[@]}"
}
src_install() {
default
- # don't use "${ED}" here or things break (#654534)
+
+ # Don't use "${ED}" here or things break (#654534)
rm -r "${D}"/trash || die
dodoc doc/sample.nanorc
@@ -72,6 +81,7 @@ src_install() {
dodoc doc/faq.html
insinto /etc
newins doc/sample.nanorc nanorc
+
if ! use minimal ; then
# Enable colorization by default.
sed -i \
@@ -83,7 +93,19 @@ src_install() {
local rcdir="/usr/share/nano"
mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
rmdir "${ED}"${rcdir}/extra || die
+
+ insinto "${rcdir}"
+ newins "${FILESDIR}/gentoo.nanorc-r1" gentoo.nanorc
fi
+}
+
+pkg_postrm() {
+ [[ -n ${REPLACED_BY_VERSION} ]] && return
- use split-usr && dosym ../../bin/nano /usr/bin/nano
+ local e
+ e=$(unset EDITOR; . "${EROOT}"/etc/profile &>/dev/null; echo "${EDITOR}")
+ if [[ ${e##*/} == nano ]]; then
+ ewarn "The EDITOR variable is still set to ${e}."
+ ewarn "You can update it with \"eselect editor\"."
+ fi
}
diff --git a/app-editors/nano/nano-9999.ebuild b/app-editors/nano/nano-9999.ebuild
index aaa4c8829842..80da99c51009 100644
--- a/app-editors/nano/nano-9999.ebuild
+++ b/app-editors/nano/nano-9999.ebuild
@@ -1,32 +1,37 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit flag-o-matic
-if [[ ${PV} == "9999" ]] ; then
+
+if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git"
- inherit git-r3 autotools
+ inherit autotools git-r3
else
MY_P="${PN}-${PV/_}"
- SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"
-HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide"
+HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Guide"
-LICENSE="GPL-3"
+LICENSE="GPL-3+ LGPL-2.1+ || ( GPL-3+ FDL-1.2+ )"
SLOT="0"
-IUSE="debug justify magic minimal ncurses nls +spell +split-usr static unicode"
+IUSE="debug justify magic minimal ncurses nls +spell static unicode"
-LIB_DEPEND=">=sys-libs/ncurses-5.9-r1:0=[unicode?]
- sys-libs/ncurses:0=[static-libs(+)]
+LIB_DEPEND="
+ >=sys-libs/ncurses-5.9-r1:=[unicode(+)?]
+ sys-libs/ncurses:=[static-libs(+)]
magic? ( sys-apps/file[static-libs(+)] )
- nls? ( virtual/libintl )"
+ nls? ( virtual/libintl )
+"
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
- static? ( ${LIB_DEPEND} )"
+DEPEND="
+ ${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+"
BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
@@ -38,14 +43,16 @@ REQUIRED_USE="
src_prepare() {
default
- if [[ ${PV} == "9999" ]] ; then
+
+ if [[ ${PV} == 9999 ]] ; then
eautoreconf
fi
}
src_configure() {
use static && append-ldflags -static
- local myconf=(
+
+ local myconfargs=(
--bindir="${EPREFIX}"/bin
--htmldir=/trash
$(use_enable !minimal color)
@@ -59,12 +66,14 @@ src_configure() {
$(use_enable unicode utf8)
$(use_enable minimal tiny)
)
- econf "${myconf[@]}"
+
+ econf "${myconfargs[@]}"
}
src_install() {
default
- # don't use "${ED}" here or things break (#654534)
+
+ # Don't use "${ED}" here or things break (#654534)
rm -r "${D}"/trash || die
dodoc doc/sample.nanorc
@@ -72,6 +81,7 @@ src_install() {
dodoc doc/faq.html
insinto /etc
newins doc/sample.nanorc nanorc
+
if ! use minimal ; then
# Enable colorization by default.
sed -i \
@@ -83,7 +93,19 @@ src_install() {
local rcdir="/usr/share/nano"
mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
rmdir "${ED}"${rcdir}/extra || die
+
+ insinto "${rcdir}"
+ newins "${FILESDIR}/gentoo.nanorc-r1" gentoo.nanorc
fi
+}
+
+pkg_postrm() {
+ [[ -n ${REPLACED_BY_VERSION} ]] && return
- use split-usr && dosym ../../bin/nano /usr/bin/nano
+ local e
+ e=$(unset EDITOR; . "${EROOT}"/etc/profile &>/dev/null; echo "${EDITOR}")
+ if [[ ${e##*/} == nano ]]; then
+ ewarn "The EDITOR variable is still set to ${e}."
+ ewarn "You can update it with \"eselect editor\"."
+ fi
}