From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kei Kebreau Subject: Re: [PATCH] gnu: Add vim-full. Date: Mon, 17 Oct 2016 14:37:47 -0400 Message-ID: <878ttmn7no.fsf@openmailbox.org> References: <20161015203841.19904-2-ng0@we.make.ritual.n0.is> <20161017163240.15227-1-ng0@we.make.ritual.n0.is> <20161017163240.15227-2-ng0@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwCnY-0007Na-UO for guix-devel@gnu.org; Mon, 17 Oct 2016 14:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwCnV-0008RO-72 for guix-devel@gnu.org; Mon, 17 Oct 2016 14:38:08 -0400 Received: from smtp19.openmailbox.org ([62.4.1.53]:51796 helo=smtp4.openmailbox.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwCnU-0008Qy-SP for guix-devel@gnu.org; Mon, 17 Oct 2016 14:38:05 -0400 In-Reply-To: <20161017163240.15227-2-ng0@we.make.ritual.n0.is> (ng0@we.make.ritual.n0.is's message of "Mon, 17 Oct 2016 16:32:40 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: ng0 Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ng0 writes: > * gnu/packages/vim.scm (vim-full): New variable. > * gnu/packages/patches/vim-8.0.0003.patch: New file. > * gnu/packages/patches/vim-8.0.0004.patch: New file. > * gnu/packages/patches/vim-8.0.0005.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add patches. > --- > gnu/local.mk | 3 ++ > gnu/packages/patches/vim-8.0.0003.patch | 87 +++++++++++++++++++++++++++= ++++++ > gnu/packages/patches/vim-8.0.0004.patch | 60 +++++++++++++++++++++++ > gnu/packages/patches/vim-8.0.0005.patch | 45 +++++++++++++++++ > gnu/packages/vim.scm | 81 +++++++++++++++++++++++++++= +++ > 5 files changed, 276 insertions(+) > create mode 100644 gnu/packages/patches/vim-8.0.0003.patch > create mode 100644 gnu/packages/patches/vim-8.0.0004.patch > create mode 100644 gnu/packages/patches/vim-8.0.0005.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index 526756f..79c1326 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -874,6 +874,9 @@ dist_patch_DATA =3D \ > %D%/packages/patches/util-linux-tests.patch \ > %D%/packages/patches/upower-builddir.patch \ > %D%/packages/patches/valgrind-enable-arm.patch \ > + %D%/packages/patches/vim-8.0.0003.patch \ > + %D%/packages/patches/vim-8.0.0004.patch \ > + %D%/packages/patches/vim-8.0.0005.patch \ > %D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \ > %D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \ > %D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \ > diff --git a/gnu/packages/patches/vim-8.0.0003.patch b/gnu/packages/patch= es/vim-8.0.0003.patch > new file mode 100644 > index 0000000..11e9c91 > --- /dev/null > +++ b/gnu/packages/patches/vim-8.0.0003.patch > @@ -0,0 +1,87 @@ > +To: vim_dev@googlegroups.com > +Subject: Patch 8.0.0003 > +Fcc: outbox > +From: Bram Moolenaar > +Mime-Version: 1.0 > +Content-Type: text/plain; charset=3DUTF-8 > +Content-Transfer-Encoding: 8bit > +------------ > + > +Patch 8.0.0003 > +Problem: getwinvar() returns wrong Value of boolean and number option= s, > + especially non big endian systems. (James McCoy) > +Solution: Cast the pointer to long or int. (closes #1060) > +Files: src/option.c, src/testdir/test_bufwintabinfo.vim > + > + > +*** vim80/src/option.c 2016-09-02 19:26:03.000000000 +0200 > +--- vim80/src/option.c 2016-09-12 19:20:38.051099762 +0200 > +*************** > +*** 12363,12370 **** > + { > + if (opt->flags & P_STRING) > + dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp); > + else > +! dict_add_nr_str(d, opt->fullname, *varp, NULL); > + } > + } > + } > +--- 12363,12372 ---- > + { > + if (opt->flags & P_STRING) > + dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp); > ++ else if (opt->flags & P_NUM) > ++ dict_add_nr_str(d, opt->fullname, *(long *)varp, NULL); > + else > +! dict_add_nr_str(d, opt->fullname, *(int *)varp, NULL); > + } > + } > + } > +*** vim80/src/testdir/test_bufwintabinfo.vim 2016-08-27 21:14:58.0000000= 00 +0200 > +--- vim80/src/testdir/test_bufwintabinfo.vim 2016-09-12 19:31:06.3463604= 20 +0200 > +*************** > +*** 87,95 **** > +--- 87,103 ---- > + endfunc > +=20=20 > + function Test_get_win_options() > ++ if has('folding') > ++ set foldlevel=3D999 > ++ endif > ++ set list > + let opts =3D getwinvar(1, '&') > + call assert_equal(v:t_dict, type(opts)) > + call assert_equal(0, opts.linebreak) > ++ call assert_equal(1, opts.list) > ++ if has('folding') > ++ call assert_equal(999, opts.foldlevel) > ++ endif > + if has('signs') > + call assert_equal('auto', opts.signcolumn) > + endif > +*************** > +*** 97,103 **** > +--- 105,116 ---- > + let opts =3D gettabwinvar(1, 1, '&') > + call assert_equal(v:t_dict, type(opts)) > + call assert_equal(0, opts.linebreak) > ++ call assert_equal(1, opts.list) > + if has('signs') > + call assert_equal('auto', opts.signcolumn) > + endif > ++ set list& > ++ if has('folding') > ++ set foldlevel=3D0 > ++ endif > + endfunc > +*** vim80/src/version.c 2016-09-12 16:30:42.348454179 +0200 > +--- vim80/src/version.c 2016-09-12 19:24:10.184148642 +0200 > +*************** > +*** 766,767 **** > +--- 766,769 ---- > + { /* Add new patch number below this line */ > ++ /**/ > ++ 3, > + /**/ > + > +--=20 > diff --git a/gnu/packages/patches/vim-8.0.0004.patch b/gnu/packages/patch= es/vim-8.0.0004.patch > new file mode 100644 > index 0000000..5d4071b > --- /dev/null > +++ b/gnu/packages/patches/vim-8.0.0004.patch > @@ -0,0 +1,60 @@ > +To: vim_dev@googlegroups.com > +Subject: Patch 8.0.0004 > +Fcc: outbox > +From: Bram Moolenaar > +Mime-Version: 1.0 > +Content-Type: text/plain; charset=3DUTF-8 > +Content-Transfer-Encoding: 8bit > +------------ > + > +Patch 8.0.0004 > +Problem: A string argument for function() that is not a function name > + results in an error message with NULL. (Christian Brabandt) > +Solution: Use the argument for the error message. > +Files: src/evalfunc.c, src/testdir/test_expr.vim > + > + > +*** vim80/src/evalfunc.c 2016-09-10 13:39:30.000000000 +0200 > +--- vim80/src/evalfunc.c 2016-09-13 23:04:02.917786784 +0200 > +*************** > +*** 3612,3618 **** > +=20=20 > + if (s =3D=3D NULL || *s =3D=3D NUL || (use_string && VIM_ISDIGIT(*= s)) > + || (is_funcref && trans_name =3D=3D NULL)) > +! EMSG2(_(e_invarg2), s); > + /* Don't check an autoload name for existence here. */ > + else if (trans_name !=3D NULL && (is_funcref > + ? find_func(trans_name) =3D=3D NULL > +--- 3612,3618 ---- > +=20=20 > + if (s =3D=3D NULL || *s =3D=3D NUL || (use_string && VIM_ISDIGIT(*= s)) > + || (is_funcref && trans_name =3D=3D NULL)) > +! EMSG2(_(e_invarg2), use_string ? get_tv_string(&argvars[0]) : s); > + /* Don't check an autoload name for existence here. */ > + else if (trans_name !=3D NULL && (is_funcref > + ? find_func(trans_name) =3D=3D NULL > +*** vim80/src/testdir/test_expr.vim 2016-09-04 21:41:26.000000000 +0200 > +--- vim80/src/testdir/test_expr.vim 2016-09-13 23:03:20.426385157 +0200 > +*************** > +*** 439,444 **** > +--- 439,447 ---- > + let s:fref =3D function(s:f) > + call assert_equal(v:t_string, s:fref('x')) > + call assert_fails("call function('s:f')", 'E700:') > ++=20 > ++ call assert_fails("call function('foo()')", 'E475:') > ++ call assert_fails("call function('foo()')", 'foo()') > + endfunc > +=20=20 > + func Test_funcref() > +*** vim80/src/version.c 2016-09-12 19:51:07.689659657 +0200 > +--- vim80/src/version.c 2016-09-14 22:06:19.364036465 +0200 > +*************** > +*** 766,767 **** > +--- 766,769 ---- > + { /* Add new patch number below this line */ > ++ /**/ > ++ 4, > + /**/ > + > +--=20 > diff --git a/gnu/packages/patches/vim-8.0.0005.patch b/gnu/packages/patch= es/vim-8.0.0005.patch > new file mode 100644 > index 0000000..ee2b831 > --- /dev/null > +++ b/gnu/packages/patches/vim-8.0.0005.patch > @@ -0,0 +1,45 @@ > +To: vim_dev@googlegroups.com > +Subject: Patch 8.0.0005 > +Fcc: outbox > +From: Bram Moolenaar > +Mime-Version: 1.0 > +Content-Type: text/plain; charset=3DUTF-8 > +Content-Transfer-Encoding: 8bit > +------------ > + > +Patch 8.0.0005 > +Problem: Netbeans test fails with Python 3. (Jonathonf) > +Solution: Encode the string before sending it. (closes #1070) > +Files: src/testdir/test_netbeans.py > + > + > +*** vim80/src/testdir/test_netbeans.py 2016-09-09 15:27:58.000000000 +02= 00 > +--- vim80/src/testdir/test_netbeans.py 2016-09-14 22:22:03.574860055 +02= 00 > +*************** > +*** 52,58 **** > + return > +=20=20 > + if len(response) > 0: > +! self.request.sendall(response) > + # Write the respoinse into the file, so that the test = can knows > + # the command was sent. > + with open("Xnetbeans", "a") as myfile: > +--- 52,58 ---- > + return > +=20=20 > + if len(response) > 0: > +! self.request.sendall(response.encode('utf-8')) > + # Write the respoinse into the file, so that the test = can knows > + # the command was sent. > + with open("Xnetbeans", "a") as myfile: > +*** vim80/src/version.c 2016-09-14 22:16:09.863803610 +0200 > +--- vim80/src/version.c 2016-09-14 22:22:39.922351477 +0200 > +*************** > +*** 766,767 **** > +--- 766,769 ---- > + { /* Add new patch number below this line */ > ++ /**/ > ++ 5, > + /**/ > + > +--=20 > diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm > index b1ee527..1b1fe60 100644 > --- a/gnu/packages/vim.scm > +++ b/gnu/packages/vim.scm > @@ -1,6 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2013 Cyril Roelandt > ;;; Copyright =C2=A9 2016 Efraim Flashner > +;;; Copyright =C2=A9 2016 ng0 > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -26,6 +27,21 @@ > #:use-module (gnu packages gawk) > #:use-module (gnu packages ncurses) > #:use-module (gnu packages perl) > + #:use-module (gnu packages ruby) > + #:use-module (gnu packages acl) > + #:use-module (gnu packages attr) > + #:use-module (gnu packages fontutils) > + #:use-module (gnu packages gettext) > + #:use-module (gnu packages glib) > + #:use-module (gnu packages gtk) > + #:use-module (gnu packages image) > + #:use-module (gnu packages linux) > + #:use-module (gnu packages lua) > + #:use-module (gnu packages pkg-config) > + #:use-module (gnu packages python) > + #:use-module (gnu packages tcl) > + #:use-module (gnu packages xdisorg) > + #:use-module (gnu packages xorg) > #:use-module (gnu packages admin) ; For GNU hostname > #:use-module (gnu packages shells)) >=20=20 > @@ -79,3 +95,68 @@ that many consider it an entire IDE. It's not just fo= r programmers, though. > Vim is perfect for all kinds of text editing, from composing email to ed= iting > configuration files.") > (license license:vim))) > + > +(define-public vim-full > + (package > + (inherit vim) > + (name "vim-full") > + (version (package-version vim)) > + (source > + (origin > + (method url-fetch) > + (uri (string-append "ftp://ftp.vim.org/pub/vim/unix/vim-" > + version ".tar.bz2")) > + (sha256 > + (base32 > + "1s34rf8089klsbdx5l0iw7vjymir0kzfrx8wb30s31wygnq29axc")) > + ;; Patches need to be applied sequentially. 8.0 is the release of > + ;; vim version 8.0.0002 so we start at 8.0.0003 > + (patches (search-patches "vim-8.0.0003.patch" > + "vim-8.0.0004.patch" > + "vim-8.0.0005.patch")))) > + (arguments > + `(#:configure-flags > + (list (string-append "--with-lua-prefix=3D" > + (assoc-ref %build-inputs "lua")) > + "--with-features=3Dhuge" > + "--enable-python3interp=3Dyes" > + "--enable-perlinterp=3Dyes" > + "--enable-rubyinterp=3Dyes" > + "--enable-tclinterp=3Dyes" > + "--enable-luainterp=3Dyes" > + "--enable-cscope" > + "--enable-sniff" > + "--enable-multibyte" > + "--enable-xim" > + "--disable-selinux" > + "--enable-gui") > + ,@(package-arguments vim))) > + (native-inputs > + `(("pkg-config" ,pkg-config))) > + (inputs > + `(("acl" ,acl) > + ("atk" ,atk) > + ("attr" ,attr) > + ("cairo" ,cairo) > + ("fontconfig" ,fontconfig) > + ("freetype" ,freetype) > + ("gdk-pixbuf" ,gdk-pixbuf) > + ("gettext" ,gnu-gettext) > + ("glib" ,glib) > + ("gpm" ,gpm) > + ("gtk" ,gtk+-2) > + ("harfbuzz" ,harfbuzz) > + ("libice" ,libice) > + ("libpng" ,libpng) > + ("libsm" ,libsm) > + ("libx11" ,libx11) > + ("libxdmcp" ,libxdmcp) > + ("libxt" ,libxt) > + ("libxpm" ,libxpm) > + ("lua" ,lua) > + ("pango" ,pango) > + ("pixman" ,pixman) > + ("python" ,python) > + ("ruby" ,ruby) > + ("tcl" ,tcl) > + ,@(package-inputs vim))))) "guix lint" complains about the patches not starting with the package name ("vim-full" in this case), but otherwise everything looks good. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBRp7AAoJEOal7jwZRnoNnn0P/0RFyHOFZWfKD6IUr2ffFT3a VvM9ilkf/JEKh3BzJe5MFbhwgBEQt8x5TcDPVDHQnzVaSxozhSTPD5B8/QGNfMa5 SrtVDt0cuBXhAFVP7nC3QbKRj669pubk2flfjYMdbDn7bEoaboAeTccJANPDV08c VvJRe1LVPBLi2QI8dFs3/+AeEDELYVJQPBQ+uMKZZLnxfVKNbDy4xg90LiHF/wIM u8R6A8Mj3YTku41JlnzKV1Zym0+aGYU4KErFyaTqZA6RwpRRKVl3Ya6IFZaoEP+n 5Iwl00meMRGqXgBBcg/+wYUktR7B9N7qRUYQfIdZ3v19LjNygpWlSiYTCieg7yQm W3I1oXSj4CSoFfn0ymO2zL4K3nwNYNFCBjLGcwuqra/PCfiM6k40aq7UipEaLuLl tomG6SSpp7HxLZazVOe0DDYavMqIkRZvzKY6E+Dzy9SrffaWcNWIyffVyX5cVHW+ nguUCiiWl7orx2U06blcVl7hIBvS9zQ/js8VW9Js1SyKP9dX9qKkgOnwG8Ppv9mK hZW3oz+1jrtDAm0TxfPmpPp1HSapH4z0HbstcDjT+ChPIGDlAumqtqWrVtuOhUAt xNaG98pBChBZW7zzIdM79hl2w118APvs6EMJ3MSvS0Y80sp1CmBJW99WwMkieP0N hW7wRHm0SpE0Upf21+u/ =VOzb -----END PGP SIGNATURE----- --=-=-=--