Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525820 - =app-editors/vim-qt-20140827 version bump
Summary: =app-editors/vim-qt-20140827 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://github.com/equalsraf/vim-qt/r...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-18 23:12 UTC by Coacher
Modified: 2014-10-26 23:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
vim-qt-99999999.ebuild (vim-qt-99999999.ebuild,3.38 KB, text/plain)
2014-10-26 03:09 UTC, Coacher
Details
vim-qt-desktop (vim-qt.desktop,189 bytes, text/plain)
2014-10-26 03:28 UTC, Coacher
Details
vim-qt.desktop (vim-qt.desktop,189 bytes, text/plain)
2014-10-26 03:29 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2014-10-18 23:12:33 UTC
Please bump to recent package version.

Could also please 9999 version to tree?

Reproducible: Always
Comment 1 Coacher 2014-10-19 07:46:03 UTC
(In reply to Coacher from comment #0)
> Could also please 9999 version to tree?

*please add
Comment 2 Ben de Groot (RETIRED) gentoo-dev 2014-10-19 09:17:17 UTC
> > Could also please 9999 version to tree?
> 
> *please add

No. It's our policy to keep live ebuilds in the qt overlay.
Comment 3 Coacher 2014-10-19 17:54:47 UTC
(In reply to Ben de Groot from comment #2)
> > > Could also please 9999 version to tree?
> > 
> > *please add
> 
> No. It's our policy to keep live ebuilds in the qt overlay.

OK.

I've looked at live ebuild from qt overlay, but it seems to be out of sync from the latest one from tree: some python-related stuff differs and vim-core version. So I was not sure whether live ebuild from qt overlay gets enough attention.
Comment 4 Ben de Groot (RETIRED) gentoo-dev 2014-10-21 12:34:44 UTC
(In reply to Coacher from comment #3)
> I've looked at live ebuild from qt overlay, but it seems to be out of sync
> from the latest one from tree: some python-related stuff differs and
> vim-core version. So I was not sure whether live ebuild from qt overlay gets
> enough attention.

You're free to contribute improvements. TBH, I haven't had time for this package in recent months.
Comment 5 Coacher 2014-10-24 22:23:14 UTC
(In reply to Ben de Groot from comment #4)
> (In reply to Coacher from comment #3)
> > I've looked at live ebuild from qt overlay, but it seems to be out of sync
> > from the latest one from tree: some python-related stuff differs and
> > vim-core version. So I was not sure whether live ebuild from qt overlay gets
> > enough attention.
> 
> You're free to contribute improvements. TBH, I haven't had time for this
> package in recent months.

OK, I'll see what I can do.
Comment 6 Ben de Groot (RETIRED) gentoo-dev 2014-10-25 02:25:44 UTC
Since I had some more time today, I have committed both the version bump and the updates to the live ebuild.
Comment 7 Coacher 2014-10-25 21:05:59 UTC
(In reply to Ben de Groot from comment #6)
> Since I had some more time today, I have committed both the version bump and
> the updates to the live ebuild.

Thanks!
Comment 8 Coacher 2014-10-26 03:09:14 UTC
Created attachment 387404 [details]
vim-qt-99999999.ebuild

(In reply to Ben de Groot from comment #6)
> Since I had some more time today, I have committed both the version bump and
> the updates to the live ebuild.

Though you've already commited changes I would like to propose some results I've got. I was drawing inspiration from live ebuild for gvim.

Here is a diff to live ebuild from qt overlay. Below I provide a brief explanation on changes. Hope this will be useful.

--- vim-qt-99999999.ebuild	2014-10-26 06:03:07.928583675 +0300
+++ app-editors/vim-qt/vim-qt-99999999.ebuild	2014-10-26 06:06:58.833580771 +0300
@@ -3,13 +3,10 @@
 # $Header: $
 
 EAPI=5
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python{2_7,3_3} )
 PYTHON_REQ_USE="threads"
 inherit eutils fdo-mime flag-o-matic python-single-r1
 
-DESCRIPTION="Qt GUI version of the Vim text editor"
-HOMEPAGE="https://bitbucket.org/equalsraf/vim-qt/wiki/Home"
-
 if [[ ${PV} == *9999* ]]; then
 	inherit git-r3
 	EGIT_REPO_URI=(
@@ -24,60 +21,111 @@
 	S="${WORKDIR}/${PN}-package-${PV}"
 fi
 
-LICENSE="vim"
-SLOT="0"
-IUSE="acl cscope debug gpm lua luajit nls perl python ruby"
+DESCRIPTION="Qt GUI version of the Vim text editor"
+HOMEPAGE="https://bitbucket.org/equalsraf/vim-qt/wiki/Home"
 
-RDEPEND="app-admin/eselect-vi
-	>=app-editors/vim-core-7.4.417[acl?]
-	sys-libs/ncurses
+SLOT="0"
+LICENSE="vim"
+IUSE="acl cscope debug gpm lua luajit nls perl python racket ruby selinux"
+REQUIRED_USE="
+	python? ( ${PYTHON_REQUIRED_USE} )
+	luajit? ( lua )
+"
+
+RDEPEND="
+	>=app-editors/vim-core-7.4.417
+	>=app-admin/eselect-vi-1.1
+	>=sys-libs/ncurses-5.2-r2
 	>=dev-qt/qtcore-4.7.0:4
 	>=dev-qt/qtgui-4.7.0:4
 	acl? ( kernel_linux? ( sys-apps/acl ) )
 	cscope? ( dev-util/cscope )
 	gpm? ( sys-libs/gpm )
-	lua? ( luajit? ( dev-lang/luajit )
-		!luajit? ( dev-lang/lua ) )
+	lua? (
+		luajit? ( dev-lang/luajit )
+		!luajit? ( dev-lang/lua[deprecated] )
+	)
 	nls? ( virtual/libintl )
 	perl? ( >=dev-lang/perl-5.16.0 )
 	python? ( ${PYTHON_DEPS} )
-	ruby? ( || ( dev-lang/ruby:2.0 dev-lang/ruby:1.9 ) )"
+	racket? ( dev-scheme/racket )
+	ruby? ( || ( dev-lang/ruby:2.0 dev-lang/ruby:1.9 ) )
+	selinux? ( sys-libs/libselinux )
+"
 DEPEND="${RDEPEND}
+	>=app-admin/eselect-vi-1.1
 	dev-util/ctags
 	sys-devel/autoconf
 	virtual/pkgconfig
-	nls? ( sys-devel/gettext )"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+	nls? ( sys-devel/gettext )
+"
 
 pkg_setup() {
-	export LC_COLLATE="C" # prevent locale brokenness bug #82186
+	# people with broken alphabets run into trouble. bug 82186.
+	unset LANG LC_ALL
+	export LC_COLLATE="C"
+
 	use python && python-single-r1_pkg_setup
 }
 
+src_prepare() {
+	# Read vimrc and gvimrc from /etc/vim
+	echo '#define SYS_VIMRC_FILE "/etc/vim/vimrc"' >> "${S}"/src/feature.h
+	echo '#define SYS_GVIMRC_FILE "/etc/vim/gvimrc"' >> "${S}"/src/feature.h
+}
+
 src_configure() {
+	local myconf
+
 	use debug && append-flags "-DDEBUG"
 
-	local myconf="--with-features=huge --enable-multibyte"
+	myconf="--with-features=huge --enable-multibyte"
 	myconf+=" $(use_enable acl)"
+	myconf+=" $(use_enable cscope)"
 	myconf+=" $(use_enable gpm)"
-	myconf+=" $(use_enable nls)"
 	myconf+=" $(use_enable lua luainterp)"
 	myconf+=" $(use_with luajit)"
+	myconf+=" $(use_enable nls)"
 	myconf+=" $(use_enable perl perlinterp)"
-	myconf+=" $(use_enable python pythoninterp)"
+	myconf+=" $(use_enable racket mzschemeinterp)"
 	myconf+=" $(use_enable ruby rubyinterp)"
-	myconf+=" --enable-gui=qt --with-vim-name=qvim --with-x"
+	myconf+=" $(use_enable selinux)"
 
+	if use python ; then
+		if [[ ${EPYTHON} == python3* ]] ; then
+			myconf+=" --enable-python3interp"
+			export vi_cv_path_python3="${PYTHON}"
+		else
+			myconf+=" --enable-pythoninterp"
+			export vi_cv_path_python="${PYTHON}"
+		fi
+	else
+		myconf+=" --disable-pythoninterp --disable-python3interp"
+	fi
+
+	# --with-features=huge forces on cscope even if we --disable it. We need
+	# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
 	if ! use cscope ; then
-		sed -i -e '/# define FEAT_CSCOPE/d' src/feature.h || die 'sed failed'
+		sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
+			die "couldn't disable cscope"
 	fi
-	econf ${myconf}
+
+	econf \
+		--with-modified-by=Gentoo-${PVR} \
+		--enable-gui=qt --with-vim-name=qvim --with-x \
+		${myconf}
 }
 
 src_install() {
 	dobin src/qvim
+	dosym qvim /usr/bin/qvimdiff
+
+	dodir /usr/share/man/man1
+	echo ".so vim.1" > "${ED}"/usr/share/man/man1/qvim.1
+	echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/qvimdiff.1
+
+	newmenu "${FILESDIR}"/vim-qt.desktop vim-qt.desktop
 	doicon -s 64 src/qt/icons/vim-qt.png
-	make_desktop_entry qvim Vim-qt vim-qt "Qt;TextEditor;Development;"
 }
 
 pkg_postinst() {
Comment 9 Coacher 2014-10-26 03:27:35 UTC
(In reply to Coacher from comment #8)
> Below I provide a brief explanation on changes. Hope this will be useful.

1. Add python 3.3 to PYTHON_COMPAT. I've tested qvim with this version and it works fine at least with a rather simple stuff, but it should work fine in general as well.

2. Rearrange DESC, SLOT, etc. to be in the same order as in gvim/vim ebuilds.

3. Add racket and selinux to IUSE, I've mzsxheme with racket and it works fine. I was not able to test selinux, but it should work since selinux code is minimalistic. It would be nice if there was someone who could actually test this.

4. Fix a couple of of issues with lua USE/REQUIRED_USE. See #499950, #500376.

5. Add some versioning to DEPEND. Though it is probably unnecessary since packages in tree are at least several versions away. However, this versioning is preserde in gvim/vim ebuilds and vim eclass. Also I am not sure whether we really need to depend on vim-core[acl?]. Why it is there? gvim doesn't have it.

6. Define Gentoo specific VIMRC/GVIMRC default locations.

7. Actually process forgotten cscope USE in src_configure().

8. Add proper python3 support in src_configure(). Copied from gvim ebuild. Works fine.

9. Add '--with-modified-by' to configure options. Nice to have some branding:)

10. Extend a bit fixes for cscope and broken locales. Copied from gvim ebuild.

11. Create qvimdiff symlink. It is a must for any vim user I think. Use vim and vimdiff man pages for qvim and qvimdiff.

12. Copy desktop file, not create one on the fly, as it would be nice to have qvim called with -f option to have it detached from terminal. Desktop file is attached below.
Comment 10 Coacher 2014-10-26 03:28:03 UTC
Created attachment 387406 [details]
vim-qt-desktop
Comment 11 Coacher 2014-10-26 03:29:55 UTC
Created attachment 387408 [details]
vim-qt.desktop

I've used vim-Qt name here like it is on project homepage.
Comment 12 Davide Pesavento (RETIRED) gentoo-dev 2014-10-26 13:03:55 UTC
Open another bug please
Comment 13 Coacher 2014-10-26 16:04:29 UTC
(In reply to Davide Pesavento from comment #12)
> Open another bug please

Done. See bug #526938.