diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/Manifest b/sdk_container/src/third_party/portage-stable/app-editors/nano/Manifest index 8b3194b5ca..3ae9428c36 100644 --- a/sdk_container/src/third_party/portage-stable/app-editors/nano/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/Manifest @@ -1,2 +1,3 @@ -DIST nano-5.8.tar.gz 3038948 BLAKE2B 126976539e8ab3a7be986edc7422bc58d31e0c81dffbf34c9b701d09d268233ed0de4f07ac8d2dd0963b768cce4e2afe89a4f8ed9fd216a71ebac98c7f403deb SHA512 dd3a7e328f256052707c4d28f2ca32f9e44de123e3dee3c0747fbab222d215b2a895c403b9274fd286e19477b8be3314fc83167eec32194370105b1e70c05a3f -DIST nano-5.9.tar.gz 3093675 BLAKE2B d4fa2f0e64b6ab243a2b127ff894e900098f6261f5d46657ff3459cc0b51683a63fc5de54bd4545b47bc16c633b09142f8501b84a09df3e8123da5233a063766 SHA512 61bf4de300579bc6f0028a2237e105228d8657819c02f32c7ef8f84f9c54734df8fb9a9cddbce0f7721ebc5ac8ae4799c118291ae15480082f8b1317019a485d +DIST nano-6.4.tar.xz 1593804 BLAKE2B b59ff7a741ce4c8b31afdbbfaf1d704cccbceddcd7f1421f30a6dd40495ec456ca891aeb9777c070c6cce4e9c594f83798ff0cdacdfe06e81b0aa0b700033da3 SHA512 cff2d9d90f1a23ab8905320e651f8bbc9d38046153a4f64bbc21927687d9628135915468b00b28f88a0eb7d395d1bcb0b9b7abcf367e5a46a5f3da01d8d6e72b +DIST nano-7.1.tar.xz 1605272 BLAKE2B cc606a04b34e723da01326d617b50f79711d0b35034b3e75f410fa7e277ba3eddbb1a408a80255533d2fa953f23fee745979363d5621b63a79bd89b29d8d528e SHA512 e3226df636d3ae1d94e2907ce8bbdb8de69eb45afd02fb1c83e275a1dcc288081809041adbfdade35a580bcb9f9632d21a45d764b43d22b3e4cfd87c7757c4e0 +DIST nano-7.2.tar.xz 1608444 BLAKE2B c7e3b18383e9f2f9db1f6059c875ddd164d730ea0e5b363e66fb8e5f30e8598ba49a5afd8eea3a55e295f1e43fb136019f60cc9154ae276c5d589002c0e5298a SHA512 a6dfa70edab62e439a9a998ca214f2415d57dbdc01766ad2e4b14048836557a32755f8b09de13c6a89023f215b61d2854017b389eae8d097ca6f3ba73ce2f583 diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/files/gentoo.nanorc-r1 b/sdk_container/src/third_party/portage-stable/app-editors/nano/files/gentoo.nanorc-r1 new file mode 100644 index 0000000000..b6b04800eb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/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 "(^|\" +color brightgreen "^pkg_(config|nofetch|info|pretend|setup|(pre|post)(inst|rm))\>" +color brightgreen "\" +## 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|USERLAND)\>" +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\>" "\" "\<(MERGE_TYPE|REPLACING_VERSIONS|REPLACED_BY_VERSION)\>" +color red "\" +color red "\" +color red "\<(PATCHES|(HTML_)?DOCS)\>" "\" "\" "\" "\" +color red "\" + +## Portage commands: +color magenta "\<(use(_(with|enable|if_iuse)|x|v)?|in_iuse) [!a-zA-Z0-9_+ -]*" "inherit.*" +color brightblue "\" +color brightblue "\" "\" +color brightblue "\" "\" "\" "\" +color brightblue "\" "\" +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 "\" "\" +color brightblue "\" "\" +color brightblue "\<(doc|ins|exe)?into\>" "\" "\<(exe|ins|dir)opts\>" +color brightblue "\" +### common eclasses +color brightblue "\" +### flag-o-matic.eclass, toolchain-funcs.eclass +color brightblue "\<(all-flag-vars)\>" +color brightblue "\<(filter-(flags|lfs-flags|lto|mfpmath))\>" +color brightblue "\" +color brightblue "\" +color brightblue "\" "\" +color brightblue "\" +color brightblue "\<(append-atomic-flags|no-as-needed|raw-ldflags|append-libs|replace-sparc64-flags|get-flag|strip-unsupported-flags)\>" +color brightblue "\" +color brightblue "\" +color brightblue "\" +color brightblue "\" +color brightblue "\" +color brightblue "\<(clang|gcc)-(fullversion|(major-|minor|micro-)version)\>" +### debugging +color brightblue "\" + +## 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)(-(cygwin|linux|macos|solaris|winnt))?\>" +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/sdk_container/src/third_party/portage-stable/app-editors/nano/metadata.xml b/sdk_container/src/third_party/portage-stable/app-editors/nano/metadata.xml index 6ec35ae205..f0ba3c2c58 100644 --- a/sdk_container/src/third_party/portage-stable/app-editors/nano/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/metadata.xml @@ -1,11 +1,11 @@ - - polynomial-c@gentoo.org - Lars Wendler - - + + base-system@gentoo.org + Gentoo Base System + + 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,22 @@ 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. - - - Enable justify/unjustify functions for text formatting. - - Enable debug messages and assert warnings. Note that these will all be sent - straight to stderr rather than some logging facility. - - - Add magic file support (sys-apps/file) to automatically detect appropriate syntax highlighting - - - Disable all fancy features, including ones that otherwise have a dedicated - USE flag (such as spelling). - - - Enable this if /bin and /usr/bin are separate directories - - + + + Enable justify/unjustify functions for text formatting. + + Enable debug messages and assert warnings. Note that these will all be sent + straight to stderr rather than some logging facility. + + + Add magic file support (sys-apps/file) to automatically detect appropriate syntax highlighting + + + Disable all fancy features, including ones that otherwise have a dedicated + USE flag (such as spelling). + + + Enable this if /bin and /usr/bin are separate directories + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.9.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-6.4.ebuild similarity index 65% rename from sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.9.ebuild rename to sdk_container/src/third_party/portage-stable/app-editors/nano/nano-6.4.ebuild index 188b7842b1..e6c3f4ce90 100644 --- a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-6.4.ebuild @@ -1,22 +1,23 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 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 ~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" +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" @@ -24,10 +25,13 @@ 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 @@ -39,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) @@ -60,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 @@ -73,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 \ @@ -84,7 +93,21 @@ 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 use split-usr && dosym ../../bin/nano /usr/bin/nano } + +pkg_postrm() { + [[ -n ${REPLACED_BY_VERSION} ]] && return + + 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/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-7.1.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-7.1.ebuild new file mode 100644 index 0000000000..1cc0796fdf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-7.1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git" + inherit autotools git-r3 +else + MY_P="${PN}-${PV/_}" + 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 ~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+ LGPL-2.1+ || ( GPL-3+ FDL-1.2+ )" +SLOT="0" +IUSE="debug justify magic minimal ncurses nls +spell static unicode" + +LIB_DEPEND=" + >=sys-libs/ncurses-5.9-r1:=[unicode(+)?] + sys-libs/ncurses:=[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 myconfargs=( + --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 "${myconfargs[@]}" +} + +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 + + insinto "${rcdir}" + newins "${FILESDIR}/gentoo.nanorc-r1" gentoo.nanorc + fi +} + +pkg_postrm() { + [[ -n ${REPLACED_BY_VERSION} ]] && return + + 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/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.8-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-7.2.ebuild similarity index 61% rename from sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.8-r2.ebuild rename to sdk_container/src/third_party/portage-stable/app-editors/nano/nano-7.2.ebuild index 64cdf0ed0e..9c1f9193b9 100644 --- a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.8-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-7.2.ebuild @@ -1,33 +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 ~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" +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:=[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 @@ -39,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) @@ -60,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 @@ -73,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 \ @@ -84,7 +93,19 @@ src_install() { 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 + insinto "${rcdir}" + newins "${FILESDIR}/gentoo.nanorc-r1" gentoo.nanorc + fi +} + +pkg_postrm() { + [[ -n ${REPLACED_BY_VERSION} ]] && return + + 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/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-9999.ebuild index 188b7842b1..1cc0796fdf 100644 --- a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-9999.ebuild @@ -1,33 +1,37 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 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 ~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" +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:=[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 @@ -39,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) @@ -60,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 @@ -73,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 \ @@ -84,7 +93,19 @@ src_install() { 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 + insinto "${rcdir}" + newins "${FILESDIR}/gentoo.nanorc-r1" gentoo.nanorc + fi +} + +pkg_postrm() { + [[ -n ${REPLACED_BY_VERSION} ]] && return + + 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 }