summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2017-10-26 13:15:27 +0200
committerPatrice Clement <monsieurp@gentoo.org>2017-10-26 15:01:25 +0200
commit50686d6e0a840e65a2f040e43496148daed5bfb7 (patch)
tree20f85c38f4c8d6c0c6a4b73d609b937f9f8ca961 /app-editors
parentx11-misc/albert: version bump 0.14.4 (diff)
downloadgentoo-50686d6e0a840e65a2f040e43496148daed5bfb7.tar.gz
gentoo-50686d6e0a840e65a2f040e43496148daed5bfb7.tar.bz2
gentoo-50686d6e0a840e65a2f040e43496148daed5bfb7.zip
app-editors/gvim: do away with symlinks and just call eselect vi update.
This commit also update the 9999 ebuild. Bug: https://bugs.gentoo.org/635482 Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/gvim/gvim-8.0.1188.ebuild43
-rw-r--r--app-editors/gvim/gvim-9999.ebuild43
2 files changed, 16 insertions, 70 deletions
diff --git a/app-editors/gvim/gvim-8.0.1188.ebuild b/app-editors/gvim/gvim-8.0.1188.ebuild
index 779093320ac6..b19e4d692308 100644
--- a/app-editors/gvim/gvim-8.0.1188.ebuild
+++ b/app-editors/gvim/gvim-8.0.1188.ebuild
@@ -302,39 +302,12 @@ src_test() {
emake -j1 VIMPROG=../testvim -C src/testdir nongui
}
-# Make convenience symlinks, hopefully without stepping on toes. Some
-# of these links are "owned" by the vim ebuild when it is installed,
-# but they might be good for gvim as well (see bug 45828)
-update_vim_symlinks() {
- local f syms
- syms="vimdiff rvim rview"
+# Call eselect vi update with --if-unset
+# to respect user's choice (bug 187449)
+eselect_vi_update() {
einfo "Calling eselect vi update..."
- # Call this with --if-unset to respect user's choice (bug 187449)
eselect vi update --if-unset
-
- # Make or remove convenience symlink, vim -> gvim
- if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
- ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null || die
- elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
- rm "${EROOT}"/usr/bin/vim || die
- fi
-
- # Make or remove convenience symlinks to vim
- if [[ -f "${EROOT}"/usr/bin/vim ]]; then
- for f in ${syms}; do
- ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null || die
- done
- else
- for f in ${syms}; do
- if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
- rm -v "${EROOT}"/usr/bin/${f} || die
- fi
- done
- fi
-
- # This will still break if you merge then remove the vi package,
- # but there's only so much you can do, eh? Unfortunately we don't
- # have triggers like are done in rpm-land.
+ eend $?
}
src_install() {
@@ -379,8 +352,8 @@ pkg_postinst() {
# Update icon cache
gnome2_icon_cache_update
- # Make convenience symlinks
- update_vim_symlinks
+ # Call eselect vi update
+ eselect_vi_update
}
pkg_postrm() {
@@ -393,6 +366,6 @@ pkg_postrm() {
# Update icon cache
gnome2_icon_cache_update
- # Make convenience symlinks
- update_vim_symlinks
+ # Call eselect vi update
+ eselect_vi_update
}
diff --git a/app-editors/gvim/gvim-9999.ebuild b/app-editors/gvim/gvim-9999.ebuild
index 779093320ac6..b19e4d692308 100644
--- a/app-editors/gvim/gvim-9999.ebuild
+++ b/app-editors/gvim/gvim-9999.ebuild
@@ -302,39 +302,12 @@ src_test() {
emake -j1 VIMPROG=../testvim -C src/testdir nongui
}
-# Make convenience symlinks, hopefully without stepping on toes. Some
-# of these links are "owned" by the vim ebuild when it is installed,
-# but they might be good for gvim as well (see bug 45828)
-update_vim_symlinks() {
- local f syms
- syms="vimdiff rvim rview"
+# Call eselect vi update with --if-unset
+# to respect user's choice (bug 187449)
+eselect_vi_update() {
einfo "Calling eselect vi update..."
- # Call this with --if-unset to respect user's choice (bug 187449)
eselect vi update --if-unset
-
- # Make or remove convenience symlink, vim -> gvim
- if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
- ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null || die
- elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
- rm "${EROOT}"/usr/bin/vim || die
- fi
-
- # Make or remove convenience symlinks to vim
- if [[ -f "${EROOT}"/usr/bin/vim ]]; then
- for f in ${syms}; do
- ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null || die
- done
- else
- for f in ${syms}; do
- if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
- rm -v "${EROOT}"/usr/bin/${f} || die
- fi
- done
- fi
-
- # This will still break if you merge then remove the vi package,
- # but there's only so much you can do, eh? Unfortunately we don't
- # have triggers like are done in rpm-land.
+ eend $?
}
src_install() {
@@ -379,8 +352,8 @@ pkg_postinst() {
# Update icon cache
gnome2_icon_cache_update
- # Make convenience symlinks
- update_vim_symlinks
+ # Call eselect vi update
+ eselect_vi_update
}
pkg_postrm() {
@@ -393,6 +366,6 @@ pkg_postrm() {
# Update icon cache
gnome2_icon_cache_update
- # Make convenience symlinks
- update_vim_symlinks
+ # Call eselect vi update
+ eselect_vi_update
}