diff --git a/CVE-2019-12735.patch b/CVE-2019-12735.patch new file mode 100644 index 0000000000000000000000000000000000000000..1b0385714cbd66940a97ae29194beb5739b3a72f --- /dev/null +++ b/CVE-2019-12735.patch @@ -0,0 +1,15 @@ +--- a/src/getchar.c 2018-10-03 04:24:53.000000000 -0400 ++++ b/src/getchar_1.c 2019-06-18 23:02:45.377000000 -0400 +@@ -1433,6 +1433,12 @@ openscript( + EMSG(_(e_nesting)); + return; + } ++ ++ // Disallow sourcing a file in the sandbox, the commands would be executed ++ // later, possibly outside of the sandbox. ++ if (check_secure()) ++ return; ++ + #ifdef FEAT_EVAL + if (ignore_script) + /* Not reading from script, also don't open one. Warning message? */ diff --git a/bugfix-rm-modify-info-version.patch b/bugfix-rm-modify-info-version.patch new file mode 100644 index 0000000000000000000000000000000000000000..1d070f081332220eba3a69990f5ee4a61c8dcb3d --- /dev/null +++ b/bugfix-rm-modify-info-version.patch @@ -0,0 +1,19 @@ +From 03f9f3b879739aa48da70572c1d66a1916e6e47d Mon Sep 17 00:00:00 2001 +From: sunguoshuai +Date: Wed, 23 Jan 2019 02:02:08 -0500 +Subject: [PATCH] vim:fix-rm-modify-info-version + +reason:fix-rm-modify-info-version + +diff -uNr vim74/src/version.c vimnew/src/version.c +--- vim74/src/version.c 2016-01-05 19:36:17.832565621 +0800 ++++ vimnew/src/version.c 2016-01-05 19:38:35.597565621 +0800 +@@ -26,7 +26,7 @@ + */ + + #include "version.h" +- ++#undef MODIFIED_BY + char *Version = VIM_VERSION_SHORT; + static char *mediumVersion = VIM_VERSION_MEDIUM; + diff --git a/gvim16.png b/gvim16.png new file mode 100644 index 0000000000000000000000000000000000000000..fb45d22a0560d23c20b65ea1922099a8ae56683e Binary files /dev/null and b/gvim16.png differ diff --git a/gvim32.png b/gvim32.png new file mode 100644 index 0000000000000000000000000000000000000000..c6e04fab21905f6d7b89acdc6f3bf2859bef143c Binary files /dev/null and b/gvim32.png differ diff --git a/gvim48.png b/gvim48.png new file mode 100644 index 0000000000000000000000000000000000000000..4bac67e62ae3e2a1079538980281ae5403ed5115 Binary files /dev/null and b/gvim48.png differ diff --git a/gvim64.png b/gvim64.png new file mode 100644 index 0000000000000000000000000000000000000000..5dcd4d33a9c7539ecd20624b8c72d13afa5c1e58 Binary files /dev/null and b/gvim64.png differ diff --git a/macros.vim b/macros.vim new file mode 100644 index 0000000000000000000000000000000000000000..a43156e7a9b88156862cb681ec2ddf7093f52583 --- /dev/null +++ b/macros.vim @@ -0,0 +1 @@ +%vimfiles_root %{_datadir}/vim/vimfiles diff --git a/spec-template.new b/spec-template.new new file mode 100644 index 0000000000000000000000000000000000000000..d9953482daa212c78874a8c21ef80eac221acb41 --- /dev/null +++ b/spec-template.new @@ -0,0 +1,35 @@ +Name: +Version: +Release: 1%{?dist} +Summary: + +Group: +License: +URL: +Source0: + +BuildRequires: +Requires: + +%description + + +%prep +%setup -q + + +%build +%configure +make %{?_smp_mflags} + + +%install +%make_install + + +%files +%doc + + + +%changelog diff --git a/vim-7.0-fixkeys.patch b/vim-7.0-fixkeys.patch new file mode 100644 index 0000000000000000000000000000000000000000..5554e1bfdf082ac7dae56ca33db1fcb1cc777b3a --- /dev/null +++ b/vim-7.0-fixkeys.patch @@ -0,0 +1,25 @@ +--- vim70aa/src/term.c.orig 2006-03-01 23:07:55.000000000 +0100 ++++ vim70aa/src/term.c 2006-03-14 15:39:12.000000000 +0100 +@@ -1008,14 +1008,14 @@ + {K_XRIGHT, IF_EB("\033[1;*C", ESC_STR "[1;*C")}, + {K_XLEFT, IF_EB("\033[1;*D", ESC_STR "[1;*D")}, + /* An extra set of function keys for vt100 mode */ +- {K_XF1, IF_EB("\033O*P", ESC_STR "O*P")}, +- {K_XF2, IF_EB("\033O*Q", ESC_STR "O*Q")}, +- {K_XF3, IF_EB("\033O*R", ESC_STR "O*R")}, +- {K_XF4, IF_EB("\033O*S", ESC_STR "O*S")}, +- {K_F1, IF_EB("\033[11;*~", ESC_STR "[11;*~")}, +- {K_F2, IF_EB("\033[12;*~", ESC_STR "[12;*~")}, +- {K_F3, IF_EB("\033[13;*~", ESC_STR "[13;*~")}, +- {K_F4, IF_EB("\033[14;*~", ESC_STR "[14;*~")}, ++ {K_XF1, IF_EB("\033[11~", ESC_STR "[11~")}, ++ {K_XF2, IF_EB("\033[12~", ESC_STR "[12~")}, ++ {K_XF3, IF_EB("\033[13~", ESC_STR "[13~")}, ++ {K_XF4, IF_EB("\033[14~", ESC_STR "[14~")}, ++ {K_F1, IF_EB("\033OP", ESC_STR "OP")}, ++ {K_F2, IF_EB("\033OQ", ESC_STR "OQ")}, ++ {K_F3, IF_EB("\033OR", ESC_STR "OR")}, ++ {K_F4, IF_EB("\033OS", ESC_STR "OS")}, + {K_F5, IF_EB("\033[15;*~", ESC_STR "[15;*~")}, + {K_F6, IF_EB("\033[17;*~", ESC_STR "[17;*~")}, + {K_F7, IF_EB("\033[18;*~", ESC_STR "[18;*~")}, diff --git a/vim-7.0-rclocation.patch b/vim-7.0-rclocation.patch new file mode 100644 index 0000000000000000000000000000000000000000..840f53e8cc330d89947618569d2a16ec2ab5305a --- /dev/null +++ b/vim-7.0-rclocation.patch @@ -0,0 +1,15 @@ +--- vim62/src/os_unix.h.rcloc 2003-08-04 15:38:05.000000000 +0200 ++++ vim62/src/os_unix.h 2003-08-04 15:39:25.000000000 +0200 +@@ -230,10 +230,10 @@ + * Unix system-dependent file names + */ + #ifndef SYS_VIMRC_FILE +-# define SYS_VIMRC_FILE "$VIM/vimrc" ++# define SYS_VIMRC_FILE "/etc/vimrc" + #endif + #ifndef SYS_GVIMRC_FILE +-# define SYS_GVIMRC_FILE "$VIM/gvimrc" ++# define SYS_GVIMRC_FILE "/etc/gvimrc" + #endif + #ifndef DFLT_HELPFILE + # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" diff --git a/vim-7.3-manpage-typo-668894-675480.patch b/vim-7.3-manpage-typo-668894-675480.patch new file mode 100644 index 0000000000000000000000000000000000000000..0604fc4bbce348bbd3dbb1264131c08cc9ef9cf2 --- /dev/null +++ b/vim-7.3-manpage-typo-668894-675480.patch @@ -0,0 +1,12 @@ +diff -up vim73/runtime/doc/vim.1.668894 vim73/runtime/doc/vim.1 +--- vim73/runtime/doc/vim.1.668894 2010-05-15 13:04:00.000000000 +0200 ++++ vim73/runtime/doc/vim.1 2012-08-28 12:41:36.000000000 +0200 +@@ -73,7 +73,7 @@ To edit a file that starts with a dash, + .TP + \- + The file to edit is read from stdin. Commands are read from stderr, which +-should be a tty. ++should be a TTY. + .TP + \-t {tag} + The file to edit and the initial cursor position depends on a "tag", a sort diff --git a/vim-7.4-checkhl.patch b/vim-7.4-checkhl.patch new file mode 100644 index 0000000000000000000000000000000000000000..f7fbf90418a27761f6ea65d230fae6248d349e83 --- /dev/null +++ b/vim-7.4-checkhl.patch @@ -0,0 +1,12 @@ +diff -up vim74/runtime/syntax/spec.vim.kh1 vim74/runtime/syntax/spec.vim +--- vim74/runtime/syntax/spec.vim.kh1 2016-08-04 15:23:25.275955301 +0200 ++++ vim74/runtime/syntax/spec.vim 2016-08-04 15:24:56.699417602 +0200 +@@ -114,7 +114,7 @@ syn region specDescriptionArea matchgrou + syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment + + "%% Scripts Section %% +-syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 ++syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|check\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 + + "%% Changelog Section %% + syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense diff --git a/vim-7.4-fstabsyntax.patch b/vim-7.4-fstabsyntax.patch new file mode 100644 index 0000000000000000000000000000000000000000..f82a66c04d7d370da94885e761bac583521e54f3 --- /dev/null +++ b/vim-7.4-fstabsyntax.patch @@ -0,0 +1,21 @@ +diff -up vim80/runtime/syntax/fstab.vim.fstabsyntax vim80/runtime/syntax/fstab.vim +--- vim80/runtime/syntax/fstab.vim.fstabsyntax 2017-11-19 20:32:49.000000000 +0100 ++++ vim80/runtime/syntax/fstab.vim 2017-11-20 16:01:31.494316342 +0100 +@@ -56,7 +56,7 @@ syn keyword fsMountPointKeyword containe + " Type + syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown + syn match fsTypeUnknown /\s\+\zs\w\+/ contained +-syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs ++syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs + + " Options + " ------- +@@ -68,7 +68,7 @@ syn match fsOptionsString /[a-zA-Z0-9_-] + syn keyword fsOptionsYesNo yes no + syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck + syn keyword fsOptionsSize 512 1024 2048 +-syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx ++syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx + syn match fsOptionsGeneral /_netdev/ + + " Options: adfs diff --git a/vim-7.4-globalsyntax.patch b/vim-7.4-globalsyntax.patch new file mode 100644 index 0000000000000000000000000000000000000000..1e0b08ed9a4b024841811343ee83f1e8bcfb9cb7 --- /dev/null +++ b/vim-7.4-globalsyntax.patch @@ -0,0 +1,12 @@ +diff -up vim74/runtime/syntax/spec.vim.orig vim74/runtime/syntax/spec.vim +--- vim74/runtime/syntax/spec.vim.orig 2016-01-12 13:51:55.727569873 +0100 ++++ vim74/runtime/syntax/spec.vim 2016-01-12 13:53:08.124991178 +0100 +@@ -114,7 +114,7 @@ syn region specDescriptionArea matchgrou + syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment + + "%% Scripts Section %% +-syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|check\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 ++syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|check\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|global\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 + + "%% Changelog Section %% + syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense diff --git a/vim-7.4-licensemacro-1151450.patch b/vim-7.4-licensemacro-1151450.patch new file mode 100644 index 0000000000000000000000000000000000000000..3a6e0a71ef0f9dc6700318c52e00ab7144ad0f81 --- /dev/null +++ b/vim-7.4-licensemacro-1151450.patch @@ -0,0 +1,15 @@ +diff -up vim74_new/runtime/syntax/spec.vim.1151450 vim74_new/runtime/syntax/spec.vim +--- vim74_new/runtime/syntax/spec.vim.1151450 2014-10-13 10:45:07.570944538 +0200 ++++ vim74_new/runtime/syntax/spec.vim 2014-10-13 10:44:09.046945965 +0200 +@@ -88,9 +88,9 @@ syn region specSectionMacroBracketArea o + "%% Files Section %% + "TODO %config valid parameters: missingok\|noreplace + "TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\) +-syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier ++syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\|license\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier + "tip: remember to include new itens in specFilesArea above +-syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' ++syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\|license\)\>' + + "valid options for certain section headers + syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1 diff --git a/vim-7.4-nowarnings.patch b/vim-7.4-nowarnings.patch new file mode 100644 index 0000000000000000000000000000000000000000..c77f9fce661613c2277e9897d5e800851376a2a5 --- /dev/null +++ b/vim-7.4-nowarnings.patch @@ -0,0 +1,11 @@ +diff -up vim74/src/ex_docmd.c.e319 vim74/src/ex_docmd.c +--- vim74/src/ex_docmd.c.e319 2016-02-17 14:48:23.033995923 +0100 ++++ vim74/src/ex_docmd.c 2016-02-17 14:48:03.712890575 +0100 +@@ -4630,6 +4630,7 @@ get_flags(exarg_T *eap) + void + ex_ni(exarg_T *eap) + { ++ return; + if (!eap->skip) + eap->errmsg = (char_u *)N_("E319: Sorry, the command is not available in this version"); + } diff --git a/vim-7.4-releasestring-1318991.patch b/vim-7.4-releasestring-1318991.patch new file mode 100644 index 0000000000000000000000000000000000000000..291b957fbba3a8ec06d408377f8ce592817817d1 --- /dev/null +++ b/vim-7.4-releasestring-1318991.patch @@ -0,0 +1,14 @@ +diff -up vim74/runtime/ftplugin/spec.vim.1318991 vim74/runtime/ftplugin/spec.vim +--- vim74/runtime/ftplugin/spec.vim.1318991 2016-08-04 15:29:42.423862424 +0200 ++++ vim74/runtime/ftplugin/spec.vim 2016-08-04 15:31:08.797299188 +0200 +@@ -41,8 +41,8 @@ else: + headers = spec.sourceHeader + version = headers["Version"] + release = headers["Release"] +- vim.command("let ver = " + version) +- vim.command("let rel = " + release) ++ vim.command("let ver = '" + version + "'") ++ vim.command("let rel = '" + release + "'") + PYEND + endif + endfunction diff --git a/vim-7.4-specsyntax.patch b/vim-7.4-specsyntax.patch new file mode 100644 index 0000000000000000000000000000000000000000..3c028b567c999bb9b41c195b20f0e10b869ebe75 --- /dev/null +++ b/vim-7.4-specsyntax.patch @@ -0,0 +1,33 @@ +diff -up vim74/runtime/syntax/spec.vim.highlite vim74/runtime/syntax/spec.vim +--- vim74/runtime/syntax/spec.vim.highlite 2016-07-04 10:17:45.000000000 +0200 ++++ vim74/runtime/syntax/spec.vim 2016-08-04 15:20:26.116049343 +0200 +@@ -38,7 +38,7 @@ syn match specNoNumberHilite 'X11\|X11R6 + syn match specManpageFile '[a-zA-Z]\.1' + + "Day, Month and most used license acronyms +-syn keyword specLicense contained GPL LGPL BSD MIT GNU ++syn keyword specLicense contained GPL LGPL BSD MIT GNU distributable + syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun + syn keyword specMonth contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec + syn keyword specMonth contained January February March April May June July August September October November December +@@ -61,9 +61,9 @@ syn cluster specListedFiles contains=spe + + "specComands + syn match specConfigure contained '\./configure' +-syn match specTarCommand contained '\". + inoremap u + +-" In many terminal emulators the mouse works just fine. By enabling it you +-" can position the cursor, Visually select and scroll with the mouse. +-if has('mouse') +- set mouse=a +-endif +- + " Switch syntax highlighting on when the terminal has colors or when using the + " GUI (which always has colors). + if &t_Co > 2 || has("gui_running") diff --git a/vim-8.1-450.tar.bz2 b/vim-8.1-450.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..364bb7eb5f7d73e1e2907cc740cd0b6d0b337ff9 Binary files /dev/null and b/vim-8.1-450.tar.bz2 differ diff --git a/vim-manpagefixes-948566.patch b/vim-manpagefixes-948566.patch new file mode 100644 index 0000000000000000000000000000000000000000..6f495600b0fe98ea26cfecfcb7eb9638dc64e890 --- /dev/null +++ b/vim-manpagefixes-948566.patch @@ -0,0 +1,326 @@ +diff -up vim73/runtime/doc/vim.man.rh1 vim73/runtime/doc/vim.man +--- vim73/runtime/doc/vim.man.rh1 2013-07-26 11:26:20.566576864 +0200 ++++ vim73/runtime/doc/vim.man 2013-07-26 11:47:42.061351469 +0200 +@@ -11,9 +11,9 @@ SYNOPSIS + vim [options] -t tag + vim [options] -q [errorfile] + +- ex ++ ex gex + view +- gvim gview evim eview ++ gvim gview vimx evim eview + rvim rview rgvim rgview + + DESCRIPTION +@@ -79,8 +79,13 @@ DESCRIPTION + the files. Can also be done with the "-R" argument. + + gvim gview +- The GUI version. Starts a new window. Can also be done with +- the "-g" argument. ++ The GUI version. Starts a new window. ++ ++ gex Starts a new gvim window in Ex mode. Can also be done with ++ the "-e" argument to gvim. ++ ++ vimx Starts gvim in "Vi" mode similar to "vim", but with ++ additional features like xterm clipboard support. + + evim eview + The GUI version in easy mode. Starts a new window. Can also +diff -urN vim73/runtime/doc/vim.1 vim73_new/runtime/doc/vim.1 +--- vim73/runtime/doc/vim.1 2013-07-31 14:13:01.039765800 +0200 ++++ vim73_new/runtime/doc/vim.1 2013-07-31 13:57:59.861912768 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +@@ -114,7 +116,12 @@ + gvim gview + The GUI version. + Starts a new window. +-Can also be done with the "\-g" argument. ++.TP ++gex ++Starts a new gvim window in Ex mode. Can also be done with the "-e" argument to gvim ++.TP ++vimx ++Starts gvim in "Vi" mode similar to "vim", but with additional features like xterm clipboard support + .TP + evim eview + The GUI version in easy mode. +@@ -458,6 +458,12 @@ + \-\-remote\-wait\-silent + As \-\-remote\-wait, but without the warning when no server is found. + .TP ++\-\-remote\-tab[\-wait][\-silent] ++As \-\-remote but use tab page per file ++.TP ++\-\-role ++Set a unique role to identify the main window ++.TP + \-\-serverlist + List the names of all Vim servers that can be found. + .TP +diff -urN vim73/runtime/doc/vim-fr.1 vim73_new/runtime/doc/vim-fr.1 +--- vim73/runtime/doc/vim-fr.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-fr.1 2013-07-31 13:59:10.587467916 +0200 +@@ -24,11 +24,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-fr.UTF-8.1 vim73_new/runtime/doc/vim-fr.UTF-8.1 +--- vim73/runtime/doc/vim-fr.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-fr.UTF-8.1 2013-07-31 13:59:28.394852347 +0200 +@@ -24,11 +24,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-it.1 vim73_new/runtime/doc/vim-it.1 +--- vim73/runtime/doc/vim-it.1 2010-07-27 22:22:52.000000000 +0200 ++++ vim73_new/runtime/doc/vim-it.1 2013-07-31 13:59:43.474331077 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-it.UTF-8.1 vim73_new/runtime/doc/vim-it.UTF-8.1 +--- vim73/runtime/doc/vim-it.UTF-8.1 2010-07-30 20:53:57.000000000 +0200 ++++ vim73_new/runtime/doc/vim-it.UTF-8.1 2013-07-31 13:59:55.985898573 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim.man vim73_new/runtime/doc/vim.man +--- vim73/runtime/doc/vim.man 2013-07-31 14:13:01.044765627 +0200 ++++ vim73_new/runtime/doc/vim.man 2013-07-31 13:53:35.107064804 +0200 +@@ -82,10 +82,10 @@ + The GUI version. Starts a new window. + + gex Starts a new gvim window in Ex mode. Can also be done with +- the "-e" argument to gvim. ++ the "-e" argument to gvim + + vimx Starts gvim in "Vi" mode similar to "vim", but with +- additional features like xterm clipboard support. ++ additional features like xterm clipboard support + + evim eview + The GUI version in easy mode. Starts a new window. Can also +diff -urN vim73/runtime/doc/vim-pl.1 vim73_new/runtime/doc/vim-pl.1 +--- vim73/runtime/doc/vim-pl.1 2010-05-15 13:04:01.000000000 +0200 ++++ vim73_new/runtime/doc/vim-pl.1 2013-07-31 14:00:21.282024131 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-pl.UTF-8.1 vim73_new/runtime/doc/vim-pl.UTF-8.1 +--- vim73/runtime/doc/vim-pl.UTF-8.1 2010-05-15 13:37:38.000000000 +0200 ++++ vim73_new/runtime/doc/vim-pl.UTF-8.1 2013-07-31 14:00:36.056513402 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-ru.1 vim73_new/runtime/doc/vim-ru.1 +--- vim73/runtime/doc/vim-ru.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-ru.1 2013-07-31 14:01:10.071337568 +0200 +@@ -17,11 +17,15 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx ++.B evim ++.B eview + .br + .B rvim + .B rview +diff -urN vim73/runtime/doc/vim-ru.UTF-8.1 vim73_new/runtime/doc/vim-ru.UTF-8.1 +--- vim73/runtime/doc/vim-ru.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-ru.UTF-8.1 2013-07-31 14:01:34.494493301 +0200 +@@ -17,11 +17,15 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx ++.B evim ++.B eview + .br + .B rvim + .B rview +diff -urN vim73/runtime/doc/vimtutor.1 vim73_new/runtime/doc/vimtutor.1 +--- vim73/runtime/doc/vimtutor.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor.1 2013-07-31 14:10:10.093671964 +0200 +@@ -4,6 +4,8 @@ + .SH SYNOPSIS + .br + .B vimtutor [\-g] [language] ++.br ++.B gvimtutor + .SH DESCRIPTION + .B Vimtutor + starts the +diff -urN vim73/runtime/doc/vimtutor-it.1 vim73_new/runtime/doc/vimtutor-it.1 +--- vim73/runtime/doc/vimtutor-it.1 2010-07-27 22:35:32.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-it.1 2013-07-31 14:10:33.564861055 +0200 +@@ -4,6 +4,8 @@ + .SH SINTASSI + .br + .B vimtutor [\-g] [lingua] ++.br ++.B gvimtutor + .SH DESCRIZIONE + .B Vimtutor + inizia il +diff -urN vim73/runtime/doc/vimtutor-it.UTF-8.1 vim73_new/runtime/doc/vimtutor-it.UTF-8.1 +--- vim73/runtime/doc/vimtutor-it.UTF-8.1 2010-07-30 20:53:57.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-it.UTF-8.1 2013-07-31 14:10:40.483622016 +0200 +@@ -4,6 +4,8 @@ + .SH SINTASSI + .br + .B vimtutor [\-g] [lingua] ++.br ++.B gvimtutor + .SH DESCRIZIONE + .B Vimtutor + inizia il +diff -urN vim73/runtime/doc/vimtutor.man vim73_new/runtime/doc/vimtutor.man +--- vim73/runtime/doc/vimtutor.man 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor.man 2013-07-31 14:11:04.786782356 +0200 +@@ -7,6 +7,7 @@ + + SYNOPSIS + vimtutor [-g] [language] ++ gvimtutor + + DESCRIPTION + Vimtutor starts the Vim tutor. It copies the tutor file first, so that +diff -urN vim73/runtime/doc/vimtutor-pl.1 vim73_new/runtime/doc/vimtutor-pl.1 +--- vim73/runtime/doc/vimtutor-pl.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-pl.1 2013-07-31 14:11:13.602477777 +0200 +@@ -4,6 +4,8 @@ + .SH SYNOPSIS + .br + .B vimtutor -g [jκzyk] ++.br ++.B gvimtutor + .SH OPIS + .B Vimtutor + uruchamia nauczyciela +diff -urN vim73/runtime/doc/vimtutor-pl.UTF-8.1 vim73_new/runtime/doc/vimtutor-pl.UTF-8.1 +--- vim73/runtime/doc/vimtutor-pl.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-pl.UTF-8.1 2013-07-31 14:11:20.571237009 +0200 +@@ -4,6 +4,8 @@ + .SH SYNOPSIS + .br + .B vimtutor -g [jΔ™zyk] ++.br ++.B gvimtutor + .SH OPIS + .B Vimtutor + uruchamia nauczyciela +diff -urN vim73/runtime/doc/vimtutor-ru.1 vim73_new/runtime/doc/vimtutor-ru.1 +--- vim73/runtime/doc/vimtutor-ru.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-ru.1 2013-07-31 14:11:35.673715221 +0200 +@@ -4,6 +4,8 @@ + .SH λοναξδξαρ στςολα + .br + .B vimtutor [ΡΪΩΛ] ++.br ++.B gvimtutor + .SH οπισαξιε + λΟΝΑΞΔΑ + .B vimtutor +diff -urN vim73/runtime/doc/vimtutor-ru.UTF-8.1 vim73_new/runtime/doc/vimtutor-ru.UTF-8.1 +--- vim73/runtime/doc/vimtutor-ru.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-ru.UTF-8.1 2013-07-31 14:11:46.649335999 +0200 +@@ -7,6 +7,8 @@ + .SH ΠžΠŸΠ˜Π‘ΠΠΠ˜Π• + Команда + .B vimtutor ++.br ++.B gvimtutor + запускаСт ΡƒΡ‡Π΅Π±Π½ΠΈΠΊ ΠΏΠΎ + .B Vim. + ΠŸΡ€ΠΈ этом сначала происходит созданиС ΠΊΠΎΠΏΠΈΠΈ Ρ„Π°ΠΉΠ»Π° ΡƒΡ‡Π΅Π±Π½ΠΈΠΊΠ°, diff --git a/vim-python3-tests.patch b/vim-python3-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..26027f748db5e88eaa31280cedc4ea92baf5d328 --- /dev/null +++ b/vim-python3-tests.patch @@ -0,0 +1,87 @@ +diff -up vim80/runtime/tools/demoserver.py.python3-tests vim80/runtime/tools/demoserver.py +--- vim80/runtime/tools/demoserver.py.python3-tests 2018-05-11 08:24:41.774618804 +0200 ++++ vim80/runtime/tools/demoserver.py 2018-05-11 09:24:48.363309856 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # Server that will accept connections from a Vim channel. + # Run this server and then in Vim you can open the channel: +diff -up vim80/src/auto/configure.python3-tests vim80/src/auto/configure +--- vim80/src/auto/configure.python3-tests 2018-05-11 08:25:03.632420873 +0200 ++++ vim80/src/auto/configure 2018-05-11 09:25:26.062000471 +0200 +@@ -6396,7 +6396,7 @@ eof + if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \ + "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then + vi_cv_path_python_plibs="-framework Python" +- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then ++ if test "x${vi_cv_path_python}" != "x/usr/bin/python2" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then + vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" + fi + else +diff -up vim80/src/configure.ac.python3-tests vim80/src/configure.ac +--- vim80/src/configure.ac.python3-tests 2018-05-11 08:25:26.070218957 +0200 ++++ vim80/src/configure.ac 2018-05-11 09:26:01.603708243 +0200 +@@ -1248,7 +1248,7 @@ eof + if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \ + "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then + vi_cv_path_python_plibs="-framework Python" +- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then ++ if test "x${vi_cv_path_python}" != "x/usr/bin/python2" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then + vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" + fi + else +diff -up vim80/src/testdir/test_channel_pipe.py.python3-tests vim80/src/testdir/test_channel_pipe.py +--- vim80/src/testdir/test_channel_pipe.py.python3-tests 2018-05-11 09:23:05.738146018 +0200 ++++ vim80/src/testdir/test_channel_pipe.py 2018-05-11 09:26:37.354413350 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # Server that will communicate over stdin/stderr + # +diff -up vim80/src/testdir/test_channel.py.python3-tests vim80/src/testdir/test_channel.py +--- vim80/src/testdir/test_channel.py.python3-tests 2018-05-11 09:22:48.522284266 +0200 ++++ vim80/src/testdir/test_channel.py 2018-05-11 09:26:17.762574955 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # Server that will accept connections from a Vim channel. + # Used by test_channel.vim. +diff -up vim80/src/testdir/test_channel_write.py.python3-tests vim80/src/testdir/test_channel_write.py +--- vim80/src/testdir/test_channel_write.py.python3-tests 2018-05-11 09:23:21.254021422 +0200 ++++ vim80/src/testdir/test_channel_write.py 2018-05-11 09:26:54.952268193 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # Program that writes a number to stdout repeatedly + # +diff -up vim80/src/testdir/test_makeencoding.py.python3-tests vim80/src/testdir/test_makeencoding.py +--- vim80/src/testdir/test_makeencoding.py.python3-tests 2018-05-11 09:23:38.990878990 +0200 ++++ vim80/src/testdir/test_makeencoding.py 2018-05-11 09:27:14.402107759 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # Test program for :make, :grep and :cgetfile. +diff -up vim80/src/testdir/test_netbeans.py.python3-tests vim80/src/testdir/test_netbeans.py +--- vim80/src/testdir/test_netbeans.py.python3-tests 2018-05-11 09:23:54.398752732 +0200 ++++ vim80/src/testdir/test_netbeans.py 2018-05-11 09:27:30.489975057 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # Server that will communicate with Vim through the netbeans interface. + # Used by test_netbeans.vim. +diff -up vim80/src/testdir/test_short_sleep.py.python3-tests vim80/src/testdir/test_short_sleep.py +--- vim80/src/testdir/test_short_sleep.py.python3-tests 2018-05-11 09:24:09.134631798 +0200 ++++ vim80/src/testdir/test_short_sleep.py 2018-05-11 09:27:48.432827053 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # Program that sleeps for 100 msec + # diff --git a/vim.csh b/vim.csh new file mode 100644 index 0000000000000000000000000000000000000000..bb9ceb14e1279e3b849ec36bacdb6dbcd1bc340c --- /dev/null +++ b/vim.csh @@ -0,0 +1,6 @@ +if ( -x /usr/bin/id ) then + if ( "`/usr/bin/id -u`" > 200 ) then + alias vi vim + endif +endif + diff --git a/vim.sh b/vim.sh new file mode 100644 index 0000000000000000000000000000000000000000..1e4ff789401c4f2bc18280832a325231f4f491f8 --- /dev/null +++ b/vim.sh @@ -0,0 +1,5 @@ +if [ -n "${BASH_VERSION-}" -o -n "${KSH_VERSION-}" -o -n "${ZSH_VERSION-}" ]; then + [ "`/usr/bin/id -u 2>/dev/null || echo 0`" -le 200 ] && return + # for bash and zsh, only if no alias is already set + alias vi >/dev/null 2>&1 || alias vi=vim +fi diff --git a/vim.spec b/vim.spec new file mode 100644 index 0000000000000000000000000000000000000000..6ac5c9a4fcdf4570ed41159a03188806dc1d536e --- /dev/null +++ b/vim.spec @@ -0,0 +1,450 @@ +%define _python3ver__ %(fullver=%{__python3} --version | awk '{print $2}';echo ${fullver:0:3}) +%define _python3path__ %{_includedir}/%{_python3ver__}m + +%{!?_with_selinux__:%global _with_selinux__ 1} +%{!?_with_ruby__:%define _with_ruby__ 1} +%{!?_with_lua__:%define _with_lua__ 1} +%{!?_with_netbeans__:%define _with_netbeans__ 1} + +%define vimdir vim81 + +Name: vim +Epoch: 2 +Version: 8.1.450 +Release: 3 +Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text. +License: Vim and MIT +URL: http://www.vim.org +Source0: ftp://ftp.vim.org/pub/vim/unix/vim-8.1-450.tar.bz2 +Source1: vim.sh +Source2: vim.csh +Source3: virc +Source4: vimrc +Source5: gvim16.png +Source6: gvim32.png +Source7: gvim48.png +Source8: gvim64.png +Source9: macros.vim +Source10: spec-template.new + +Patch0000: vim-7.0-fixkeys.patch +Patch0001: vim-7.4-specsyntax.patch +Patch0002: vim-7.4-syntax.patch +Patch0003: vim-7.4-nowarnings.patch +Patch0004: vim-7.0-rclocation.patch +Patch0005: vim-7.4-checkhl.patch +Patch0006: vim-7.4-fstabsyntax.patch +Patch0007: vim-7.4-syncolor.patch +Patch0008: vim-7.3-manpage-typo-668894-675480.patch +Patch0009: vim-manpagefixes-948566.patch +Patch0010: vim-7.4-licensemacro-1151450.patch +Patch0011: vim-7.4-globalsyntax.patch +Patch0012: vim-7.4-releasestring-1318991.patch +Patch0013: vim-8.0-copy-paste.patch +Patch0014: vim-python3-tests.patch + +Patch6000: CVE-2019-12735.patch + +Patch9000: bugfix-rm-modify-info-version.patch + +BuildRequires: autoconf python-devel python3-devel ncurses-devel gettext perl-devel perl-generators +BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS) libacl-devel gpm-devel file +BuildRequires: desktop-file-utils >= 0.2.93 +%if %{_with_selinux__} +BuildRequires: libselinux-devel +%endif +%if %{_with_ruby__} +BuildRequires: ruby-devel ruby +%endif +%if %{_with_lua__} +BuildRequires: lua-devel +%endif +Requires: desktop-file-utils +Conflicts: filesystem < 3 + +%description +Vim is an advanced text editor that seeks to provide the power of the +de-facto Unix editor 'Vi', with a more complete feature set. Vim is a +highly configurable text editor built to enable efficient text editing. +It is an improved version of the vi editor distributed with most UNIX +systems. + +%package common +Summary: This contains some common files to use vim editor. +Requires: %{name}-filesystem +Conflicts: man-pages-fr < 0.9.7-14 man-pages-it < 0.3.0-17 man-pages-pl < 0.24-2 %{name}-minimal < 8.0.1428-4 + +%description common +This common package contains files that will be needed when you run vim editor. This is also needed by vim-enhaned and vim-X11 packages. + +%package minimal +Summary: This package provides the basic and minimal functionalities of vim editor. +Provides: vi = %{version}-%{release} %{_bindir}/vi +Conflicts: %{name}-common < 8.0.1428-4 + +%description minimal +The minimal package provides a minimal version of vim editor. It will be installed as /usr/bin/vi. + +%package enhanced +Summary: This is a package containing enhanced vim editor. +Requires: vim-common = %{epoch}:%{version}-%{release} which gpm-libs +Provides: vim = %{version}-%{release} %{_bindir}/mergetool %{_bindir}/vim +Suggests: python2 python2-libs python3 python3-libs +Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Suggests: perl-libs perl-devel +%if %{_with_ruby__} +Suggests: ruby-libs ruby +%endif +%if %{_with_lua__} +Suggests: lua-libs +%endif + +%description enhanced +This packages includes some enhancements for the vim editor. + +%package filesystem +Summary: The vim filesystem. +BuildArch: noarch + +%description filesystem +This package contains the vim filesystem. + +%package X11 +Summary: Vim for the X Window System i.e.gvim +BuildRequires: gtk3-devel libX11-devel libSM-devel libXt-devel libXpm-devel libICE-devel libappstream-glib +Requires: vim-common = %{epoch}:%{version}-%{release} libattr >= 2.4 gtk3 hicolor-icon-theme +Requires: libICE libSM libX11 libXt cairo gdk-pixbuf2 pango +Provides: gvim = %{version}-%{release} %{_bindir}/mergetool %{_bindir}/gvim +Suggests: python2 python2-libs python3 python3-libs +Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Suggests: perl-libs perl-devel +%if %{_with_ruby__} +Suggests: ruby-libs ruby +%endif +%if %{_with_lua__} +Suggests: lua-libs +%endif + +%description X11 +This X11 package serves you the ability to use vim with graphics and mouse. + +%prep +%autosetup -b 0 -n %{vimdir} -p1 + +%build +%define _make_cmd__() %{make_build} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir}; cp vim %{?1}; %{!?2:make clean} + +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I%{_python3path__} -D__linux__ -D_REENTRANT" +export CXXFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I%{_python3path__} -D__linux__ -D_REENTRANT" + +sed -i 's/nawk/awk/g' runtime/tools/mve.awk +cd src; autoconf + +cp -f os_unix.h os_unix.h.bak + +sed -i 's/vimrc/virc/' os_unix.h +%configure --with-features=small --with-x=no --enable-multibyte --disable-netbeans \ + --disable-pythoninterp --disable-perlinterp --disable-tclinterp --with-tlib=ncurses \ + --enable-gui=no --disable-gpm --exec-prefix=/ \ + --enable-fail-if-missing \ +%if %{_with_selinux__} + --enable-selinux \ +%else + --disable-selinux \ +%endif + +%{_make_cmd__ vim-minimal} + +mv os_unix.h.bak os_unix.h + +%configure --with-features=huge --enable-pythoninterp=dynamic --enable-python3interp=dynamic \ + --enable-perlinterp=dynamic --disable-tclinterp --with-x=yes --enable-xim --enable-multibyte \ + --with-tlib=ncurses --enable-gtk3-check --enable-gui=gtk3 \ + --enable-cscope --enable-fail-if-missing \ +%if %{_with_netbeans__} + --enable-netbeans \ +%else + --disable-netbeans \ +%endif +%if %{_with_selinux__} + --enable-selinux \ +%else + --disable-selinux \ +%endif +%if %{_with_ruby__} + --enable-rubyinterp=dynamic \ +%else + --disable-rubyinterp \ +%endif +%if %{_with_lua__} + --enable-luainterp=dynamic \ +%else + --disable-luainterp \ +%endif + +%{_make_cmd__ vim-X11} + +%configure --with-features=huge --enable-pythoninterp=dynamic --enable-python3interp=dynamic \ + --enable-perlinterp=dynamic --disable-tclinterp --with-x=no --enable-gui=no --enable-multibyte \ + --enable-cscope --with-tlib=ncurses \ + --enable-fail-if-missing \ +%if %{_with_netbeans__} + --enable-netbeans \ +%else + --disable-netbeans \ +%endif +%if %{_with_selinux__} + --enable-selinux \ +%else + --disable-selinux \ +%endif +%if %{_with_ruby__} + --enable-rubyinterp=dynamic \ +%else + --disable-rubyinterp \ +%endif +%if %{_with_lua__} + --enable-luainterp=dynamic \ +%else + --disable-luainterp \ +%endif + +%{_make_cmd__ vim-enhanced noclean} + +%install +pushd src +%make_install BINDIR=%{_bindir} VIMRCLOC=%{_sysconfdir} VIMRUNTIMEDIR=%{_datadir}/%{name}/%{vimdir} +make installgtutorbin DESTDIR=%{buildroot} BINDIR=%{_bindir} VIMRCLOC=%{_sysconfdir} VIMRUNTIMEDIR=%{_datadir}/%{name}/%{vimdir} + +install -m755 vim-minimal %{buildroot}%{_bindir}/vi +install -m755 vim-enhanced %{buildroot}%{_bindir}/vim +install -m755 vim-X11 %{buildroot}%{_bindir}/gvim +popd + +rm -f README*.info + +for dir in {autoload,colors,compiler,doc,ftdetect,ftplugin,indent,keymap,lang,plugin,print,spell,syntax,tutor} +do + install -d %{buildroot}%{_datadir}/%{name}/vimfiles/${dir} + install -d %{buildroot}%{_datadir}/%{name}/vimfiles/after/${dir} +done +install -m644 %{SOURCE10} %{buildroot}%{_datadir}/%{name}/vimfiles/template.spec + +install -m644 %{_builddir}/%{vimdir}/runtime/doc/uganda.txt %{_builddir}/%{vimdir}/LICENSE + +install -d %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps +install -m644 %{SOURCE5} %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/gvim.png +install -m644 %{SOURCE6} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/gvim.png +install -m644 %{SOURCE7} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gvim.png +install -m644 %{SOURCE8} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/gvim.png + +install -d %{buildroot}%{_metainfodir} +cat > %{buildroot}%{_metainfodir}/gvim.appdata.xml < + + + + gvim.desktop + CC0-1.0 + Vim + +

+ Vim is an advanced text editor that seeks to provide the power of the + de-facto Unix editor 'Vi', with a more complete feature set. + It's useful whether you're already using vi or using a different editor. +

+

+ Vim is a highly configurable text editor built to enable efficient text + editing. + Vim is often called a "programmer's editor," and so useful for programming + that many consider it an entire IDE. It is not just for programmers, though. + Vim is perfect for all kinds of text editing, from composing email to + editing configuration files. +

+
+ + + https://raw.githubusercontent.com/zdohnal/vim/zdohnal-screenshot/gvim16_9.png + + + http://www.vim.org/ +
+EOF + +%define _linkvi__ %{buildroot}%{_bindir}/{rvi,rview,view,ex} +%define _linkvim__ %{buildroot}%{_bindir}/{rvim,vimdiff} +%define _linkgvim__ %{buildroot}%{_bindir}/{gview,gex,evim,gvimdiff,vimx} +%define _linkcmds__() for file in %{expand:%{_link%{1}__}};do ln -sf %{1} ${file};done; + +%{_linkcmds__ vi} +%{_linkcmds__ vim} +%{_linkcmds__ gvim} + +pushd %{buildroot}%{_mandir}/man1 +sed -i 's,%{buildroot},,' {vim.1,vimtutor.1} +rm -f rvim.1 +install -p vim.1 vi.1 +ln -sf vi.1.gz rvi.1.gz +ln -sf vim.1.gz vimdiff.1.gz +popd + +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{_builddir}/%{vimdir}/runtime/gvim.desktop + +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml + +pushd %{buildroot}%{_datadir}/%{name}/%{vimdir}/tutor +ln -sf menu_ja_jp.ujis.vim %{buildroot}%{_datadir}/%{name}/%{vimdir}/lang/menu_ja_jp.eucjp.vim +for files in {tutor.ca,tutor.it,tutor.fr,tutor.es,tutor.de,tutor.sv,tutor.no} +do + iconv -f CP1252 -t UTF8 ${files} -o ${files}.bak;mv ${files}.bak ${files} +done +iconv -f ISO-8859-2 -t UTF8 tutor.pl -o tutor.pl.bak;mv tutor.pl.bak tutor.pl +iconv -f ISO-8859-2 -t UTF8 tutor.sk -o tutor.sk.bak;mv tutor.sk.bak tutor.sk +iconv -f KOI8R -t UTF8 tutor.ru -o tutor.ru.bak;mv tutor.ru.bak tutor.ru +popd + +install -Dpm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/vim.sh +install -pm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/vim.csh +install -pm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/virc +install -pm644 %{SOURCE4} %{buildroot}%{_sysconfdir}/vimrc + +install -Dpm644 %{SOURCE9} %{buildroot}%{_rpmconfigdir}/macros.d/macros.vim + +pushd %{buildroot}%{_mandir} +for files in `find ??/ -type f` +do + if [[ "`file ${files}`" == *UTF-8\ Unicode\ text* ]] + then + continue + fi + iconv -f latin1 -t UTF8 ${files} -o ${files}.bak; mv ${files}.bak ${files} +done +popd + +mv %{buildroot}%{_mandir}/ru.UTF-8 %{buildroot}%{_mandir}/ru + +install -d %{buildroot}%{_mandir}/man5 +for files in %{buildroot}%{_mandir}/{man1/{rvim.1,gvim.1,gex.1,gview.1,vimx.1},man5/vimrc.5} +do + echo ".so man1/vim.1" > ${files} +done +echo ".so man1/vimdiff.1" > %{buildroot}%{_mandir}/man1/gvimdiff.1 +echo ".so man1/vimtutor.1" > %{buildroot}%{_mandir}/man1/gvimtutor.1 +echo ".so man1/vi.1" > %{buildroot}%{_mandir}/man5/virc.5 +touch %{buildroot}%{_datadir}/%{name}/vimfiles/doc/tags + +pushd runtime +rm -rf doc +ln -sf ../../%{name}/%{vimdir}/doc docs +popd + +%transfiletriggerin common -- %{_datadir}/%{name}/vimfiles/doc +%{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || : + +%transfiletriggerpostun common -- %{_datadir}/%{name}/vimfiles/doc +> %{_datadir}/%{name}/vimfiles/doc/tags || : +%{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || : + +%files common +%exclude %{_datadir}/vim/%{vimdir}/macros/maze/maze*.c +%exclude %{_datadir}/vim/%{vimdir}/tools +%exclude %{_datadir}/vim/%{vimdir}/doc/vim2html.pl +%exclude %{_mandir}/{pl.ISO8859-2,it.ISO8859-1,ru.KOI8-R,fr.ISO8859-1,da.ISO8859-1} +%exclude %{_mandir}/{de.ISO8859-1,fr.UTF-8,it.UTF-8,pl.UTF-8,da.UTF-8,de.UTF-8} +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc README* +%doc runtime/docs +%config(noreplace) %{_sysconfdir}/vimrc +%{_datadir}/%{name}/vimfiles/template.spec +%{_datadir}/%{name}/%{vimdir}/{rgb.txt,autoload,colors,compiler,pack,doc} +%{_datadir}/%{name}/%{vimdir}/{*.vim,ftplugin,indent,keymap,macros,plugin} +%{_datadir}/%{name}/%{vimdir}/{print,syntax,tutor,spell} +%{_datadir}/%{name}/%{vimdir}/lang/{*.vim,*.txt} +%{_bindir}/xxd +%lang(af) %{_datadir}/%{name}/%{vimdir}/lang/af +%lang(ca) %{_datadir}/%{name}/%{vimdir}/lang/ca +%lang(cs) %{_datadir}/%{name}/%{vimdir}/lang/cs +%lang(cs.cp1250) %{_datadir}/%{name}/%{vimdir}/lang/cs.cp1250 +%lang(da) %{_datadir}/%{name}/%{vimdir}/lang/da +%lang(de) %{_datadir}/%{name}/%{vimdir}/lang/de +%lang(en_GB) %{_datadir}/%{name}/%{vimdir}/lang/en_GB +%lang(eo) %{_datadir}/%{name}/%{vimdir}/lang/eo +%lang(es) %{_datadir}/%{name}/%{vimdir}/lang/es +%lang(fi) %{_datadir}/%{name}/%{vimdir}/lang/fi +%lang(fr) %{_datadir}/%{name}/%{vimdir}/lang/fr +%lang(ga) %{_datadir}/%{name}/%{vimdir}/lang/ga +%lang(it) %{_datadir}/%{name}/%{vimdir}/lang/it +%lang(ja) %{_datadir}/%{name}/%{vimdir}/lang/ja +%lang(ja.euc-jp) %{_datadir}/%{name}/%{vimdir}/lang/ja.euc-jp +%lang(ja.sjis) %{_datadir}/%{name}/%{vimdir}/lang/ja.sjis +%lang(ko) %{_datadir}/%{name}/%{vimdir}/lang/ko +%lang(ko) %{_datadir}/%{name}/%{vimdir}/lang/ko.UTF-8 +%lang(lv) %{_datadir}/%{name}/%{vimdir}/lang/lv +%lang(nb) %{_datadir}/%{name}/%{vimdir}/lang/nb +%lang(nl) %{_datadir}/%{name}/%{vimdir}/lang/nl +%lang(no) %{_datadir}/%{name}/%{vimdir}/lang/no +%lang(pl) %{_datadir}/%{name}/%{vimdir}/lang/pl +%lang(pl.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/pl.UTF-8 +%lang(pl.cp1250) %{_datadir}/%{name}/%{vimdir}/lang/pl.cp1250 +%lang(pt_BR) %{_datadir}/%{name}/%{vimdir}/lang/pt_BR +%lang(ru) %{_datadir}/%{name}/%{vimdir}/lang/ru +%lang(ru.cp1251) %{_datadir}/%{name}/%{vimdir}/lang/ru.cp1251 +%lang(sk) %{_datadir}/%{name}/%{vimdir}/lang/sk +%lang(sk.cp1250) %{_datadir}/%{name}/%{vimdir}/lang/sk.cp1250 +%lang(sr) %{_datadir}/%{name}/%{vimdir}/lang/sr +%lang(sv) %{_datadir}/%{name}/%{vimdir}/lang/sv +%lang(uk) %{_datadir}/%{name}/%{vimdir}/lang/uk +%lang(uk.cp1251) %{_datadir}/%{name}/%{vimdir}/lang/uk.cp1251 +%lang(vi) %{_datadir}/%{name}/%{vimdir}/lang/vi +%lang(zh_CN) %{_datadir}/%{name}/%{vimdir}/lang/zh_CN +%lang(zh_CN.cp936) %{_datadir}/%{name}/%{vimdir}/lang/zh_CN.cp936 +%lang(zh_TW) %{_datadir}/%{name}/%{vimdir}/lang/zh_TW +%lang(zh_CN.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/zh_CN.UTF-8 +%lang(zh_TW.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/zh_TW.UTF-8 +%lang(fr) %{_mandir}/fr/man1/* +%lang(da) %{_mandir}/da/man1/* +%lang(de) %{_mandir}/de/man1/* +%lang(it) %{_mandir}/it/man1/* +%lang(ja) %{_mandir}/ja/man1/* +%lang(pl) %{_mandir}/pl/man1/* +%lang(ru) %{_mandir}/ru/man1/* +%{_mandir}/man1/{gex.*,gview.*,gvim*,rvim.*,vim.*,vimdiff.*} +%{_mandir}/man1/{vimtutor.*,vimx.*,xxd.*} +%{_mandir}/man5/vimrc.* + +%files minimal +%config(noreplace) %{_sysconfdir}/virc +%{_bindir}/{ex,vi,view,rvi,rview} +%{_mandir}/man1/{vi.*,ex.*,rvi.*,rview.*,view.*} +%{_mandir}/man5/virc.* + +%files enhanced +%config(noreplace) %{_sysconfdir}/profile.d/vim.* +%{_bindir}/{vim,rvim,vimdiff,vimtutor} + +%files filesystem +%{_rpmconfigdir}/macros.d/macros.vim +%dir %{_datadir}/%{name}/vimfiles/after/* +%dir %{_datadir}/%{name}/vimfiles/{autoload,colors,compiler,doc,ftdetect,ftplugin} +%dir %{_datadir}/%{name}/vimfiles/{indent,keymap,lang,plugin,print,spell,syntax,tutor} +%ghost %{_datadir}/%{name}/vimfiles/doc/tags + +%files X11 +%exclude /%{_datadir}/applications/vim.desktop +%{_datadir}/metainfo/*.appdata.xml +%{_datadir}/applications/* +%{_datadir}/icons/{hicolor,locolor}/*/apps/* +%{_bindir}/{gvimtutor,gvim,gvimdiff,gview,gex} +%{_bindir}/{vimtutor,vimx,evim} +%{_mandir}/man1/evim.* + +%changelog +* Sat Dec 22 2019 openEuler Buildteam - 2:8.1.450-3 +- update vimrc/virc info + +* Mon Sep 23 2019 huzhiyu - 2:8.1.450-2 +- Package init diff --git a/vimrc b/vimrc new file mode 100644 index 0000000000000000000000000000000000000000..39d71225a2d35d9ec7b2d7a618cf09cd7921fd7d --- /dev/null +++ b/vimrc @@ -0,0 +1,64 @@ +if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" + set fileencodings=ucs-bom,utf-8,latin1 +endif + +set nocompatible " Use Vim defaults (much better!) +set bs=indent,eol,start " allow backspacing over everything in insert mode +"set ai " always set autoindenting on +"set backup " keep a backup file +set viminfo='20,\"50 " read/write a .viminfo file, don't store more + " than 50 lines of registers +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time + +" Only do this part when compiled with support for autocommands +if has("autocmd") + augroup openEuler + autocmd! + " In text files, always limit the width of text to 78 characters + " autocmd BufRead *.txt set tw=78 + " When editing a file, always jump to the last cursor position + autocmd BufReadPost * + \ if line("'\"") > 0 && line ("'\"") <= line("$") | + \ exe "normal! g'\"" | + \ endif + " don't write swapfile on most commonly used directories for NFS mounts or USB sticks + autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp + " start with spec file template + autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec + augroup END +endif + +if has("cscope") && filereadable("/usr/bin/cscope") + set csprg=/usr/bin/cscope + set csto=0 + set cst + set nocsverb + " add any database in current directory + if filereadable("cscope.out") + cs add $PWD/cscope.out + " else add database pointed to by environment + elseif $CSCOPE_DB != "" + cs add $CSCOPE_DB + endif + set csverb +endif + +" Switch syntax highlighting on, when the terminal has colors +" Also switch on highlighting the last used search pattern. +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch +endif + +filetype plugin on + +if &term=="xterm" + set t_Co=8 + set t_Sb=[4%dm + set t_Sf=[3%dm +endif + +" Don't wake up system with blinking cursor: +" http://www.linuxpowertop.org/known.php +let &guicursor = &guicursor . ",a:blinkon0" diff --git a/virc b/virc new file mode 100644 index 0000000000000000000000000000000000000000..cafa6024ef451885ae595cf40e1cf667943eaf3d --- /dev/null +++ b/virc @@ -0,0 +1,37 @@ +if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" + set fileencodings=ucs-bom,utf-8,latin1 +endif + +set nocompatible " Use Vim defaults (much better!) +set bs=indent,eol,start " allow backspacing over everything in insert mode +"set ai " always set autoindenting on +"set backup " keep a backup file +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time + +" Only do this part when compiled with support for autocommands +if has("autocmd") + augroup openEuler + autocmd! + " In text files, always limit the width of text to 78 characters + " autocmd BufRead *.txt set tw=78 + " When editing a file, always jump to the last cursor position + autocmd BufReadPost * + \ if line("'\"") > 0 && line ("'\"") <= line("$") | + \ exe "normal! g'\"" | + \ endif + " don't write swapfile on most commonly used directories for NFS mounts or USB sticks + autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp + " start with spec file template + autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec + augroup END +endif + + +filetype plugin on + +if &term=="xterm" + set t_Co=8 + set t_Sb=[4%dm + set t_Sf=[3%dm +endif