vim-7.0-rclocation.patch: Remove downstream patch
Removal of downstream patch - new /usr/share/vim/{vimrc,virc} symlinks are created for loading /etc/{vimrc,virc}. New symlinks point to original files in /etc. The overhead is needed for getting rid of the patch and for test suite, because setting VIMRCLOC and VIMRUNTIMEDIR during build doesn't work - vim then always looks into VIMRUNTIMEDIR for vimrc, and upstream doesn't want to change this (see https://github.com/vim/vim/issues/8878)
This commit is contained in:
parent
3d7b0a4bb0
commit
405468dc2e
@ -1,15 +0,0 @@
|
|||||||
--- 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"
|
|
31
vim.spec
31
vim.spec
@ -62,7 +62,6 @@ BuildRequires: hunspell-devel
|
|||||||
# reported upstream as https://github.com/vim/vim/pull/8882
|
# reported upstream as https://github.com/vim/vim/pull/8882
|
||||||
Patch3000: vim-7.4-syntax.patch
|
Patch3000: vim-7.4-syntax.patch
|
||||||
Patch3002: vim-7.4-nowarnings.patch
|
Patch3002: vim-7.4-nowarnings.patch
|
||||||
Patch3004: vim-7.0-rclocation.patch
|
|
||||||
Patch3007: vim-7.4-fstabsyntax.patch
|
Patch3007: vim-7.4-fstabsyntax.patch
|
||||||
Patch3008: vim-7.4-syncolor.patch
|
Patch3008: vim-7.4-syncolor.patch
|
||||||
Patch3010: vim-7.3-manpage-typo-668894-675480.patch
|
Patch3010: vim-7.3-manpage-typo-668894-675480.patch
|
||||||
@ -328,7 +327,6 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
|
|||||||
|
|
||||||
%patch3000 -p1
|
%patch3000 -p1
|
||||||
%patch3002 -p1 -b .nowarnings
|
%patch3002 -p1 -b .nowarnings
|
||||||
%patch3004 -p1
|
|
||||||
%patch3007 -p1 -b .fstabsyntax
|
%patch3007 -p1 -b .fstabsyntax
|
||||||
%patch3008 -p1 -b .syncolor
|
%patch3008 -p1 -b .syncolor
|
||||||
%patch3010 -p1
|
%patch3010 -p1
|
||||||
@ -343,14 +341,10 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
|
|||||||
cd src
|
cd src
|
||||||
autoconf
|
autoconf
|
||||||
|
|
||||||
sed -e "s+VIMRCLOC = \$(VIMLOC)+VIMRCLOC = /etc+" Makefile > Makefile.tmp
|
|
||||||
mv -f Makefile.tmp Makefile
|
|
||||||
|
|
||||||
export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2"
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2"
|
||||||
export CXXFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2"
|
export CXXFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2"
|
||||||
|
|
||||||
cp -f os_unix.h os_unix.h.save
|
cp -f os_unix.h os_unix.h.save
|
||||||
cp -f ex_cmds.c ex_cmds.c.save
|
|
||||||
|
|
||||||
# Configure options:
|
# Configure options:
|
||||||
# --enable-fail-if-missing - we need to fail if configure options aren't satisfied
|
# --enable-fail-if-missing - we need to fail if configure options aren't satisfied
|
||||||
@ -365,7 +359,8 @@ cp -f ex_cmds.c ex_cmds.c.save
|
|||||||
# --disable-gpm - disabling support for General Purpose Mouse - Linux mouse daemon
|
# --disable-gpm - disabling support for General Purpose Mouse - Linux mouse daemon
|
||||||
|
|
||||||
perl -pi -e "s/vimrc/virc/" os_unix.h
|
perl -pi -e "s/vimrc/virc/" os_unix.h
|
||||||
%configure --prefix=%{_prefix} --with-features=small --with-x=no \
|
%configure \
|
||||||
|
--prefix=%{_prefix} --with-features=small --with-x=no \
|
||||||
--enable-multibyte \
|
--enable-multibyte \
|
||||||
--disable-netbeans \
|
--disable-netbeans \
|
||||||
%if %{WITH_SELINUX}
|
%if %{WITH_SELINUX}
|
||||||
@ -382,19 +377,19 @@ perl -pi -e "s/vimrc/virc/" os_unix.h
|
|||||||
--disable-canberra \
|
--disable-canberra \
|
||||||
--disable-libsodium
|
--disable-libsodium
|
||||||
|
|
||||||
%make_build VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir}
|
%make_build
|
||||||
cp vim minimal-vim
|
cp vim minimal-vim
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
mv -f os_unix.h.save os_unix.h
|
mv -f os_unix.h.save os_unix.h
|
||||||
mv -f ex_cmds.c.save ex_cmds.c
|
|
||||||
|
|
||||||
# More configure options:
|
# More configure options:
|
||||||
# --enable-xim - enabling X Input Method - international input module for X,
|
# --enable-xim - enabling X Input Method - international input module for X,
|
||||||
# it is for multibyte languages in Vim with X
|
# it is for multibyte languages in Vim with X
|
||||||
# --enable-termtruecolor - use terminal with true colors
|
# --enable-termtruecolor - use terminal with true colors
|
||||||
|
|
||||||
%configure --with-features=huge \
|
%configure \
|
||||||
|
--with-features=huge \
|
||||||
--enable-python3interp=dynamic \
|
--enable-python3interp=dynamic \
|
||||||
--enable-perlinterp=dynamic \
|
--enable-perlinterp=dynamic \
|
||||||
--disable-tclinterp --with-x=yes \
|
--disable-tclinterp --with-x=yes \
|
||||||
@ -432,11 +427,12 @@ mv -f ex_cmds.c.save ex_cmds.c
|
|||||||
--enable-fail-if-missing \
|
--enable-fail-if-missing \
|
||||||
--enable-canberra
|
--enable-canberra
|
||||||
|
|
||||||
%make_build VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir}
|
%make_build
|
||||||
cp vim gvim
|
cp vim gvim
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
%configure --prefix=%{_prefix} --with-features=huge \
|
%configure \
|
||||||
|
--prefix=%{_prefix} --with-features=huge \
|
||||||
--enable-python3interp=dynamic \
|
--enable-python3interp=dynamic \
|
||||||
--enable-perlinterp=dynamic \
|
--enable-perlinterp=dynamic \
|
||||||
--disable-tclinterp \
|
--disable-tclinterp \
|
||||||
@ -474,7 +470,7 @@ make clean
|
|||||||
--enable-fail-if-missing \
|
--enable-fail-if-missing \
|
||||||
--disable-canberra
|
--disable-canberra
|
||||||
|
|
||||||
%make_build VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir}
|
%make_build
|
||||||
cp vim enhanced-vim
|
cp vim enhanced-vim
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -491,11 +487,11 @@ cd src
|
|||||||
# Adding STRIP=/bin/true, because Vim wants to strip the binaries by himself
|
# Adding STRIP=/bin/true, because Vim wants to strip the binaries by himself
|
||||||
# and put the stripped files into correct dirs. Build system (koji/brew)
|
# and put the stripped files into correct dirs. Build system (koji/brew)
|
||||||
# does it for us, so there is no need to do it in Vim
|
# does it for us, so there is no need to do it in Vim
|
||||||
%make_install BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} STRIP=/bin/true
|
%make_install BINDIR=%{_bindir} STRIP=/bin/true
|
||||||
# make install creates vim binary and view symlink, they will be wrappers
|
# make install creates vim binary and view symlink, they will be wrappers
|
||||||
# so remove them here
|
# so remove them here
|
||||||
%{_bindir}/rm -f %{buildroot}%{_bindir}/{vim,view}
|
%{_bindir}/rm -f %{buildroot}%{_bindir}/{vim,view}
|
||||||
make installgtutorbin DESTDIR=%{buildroot} BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir}
|
make installgtutorbin DESTDIR=%{buildroot} BINDIR=%{_bindir}
|
||||||
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps
|
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps
|
||||||
mkdir -p %{buildroot}%{_libexecdir}
|
mkdir -p %{buildroot}%{_libexecdir}
|
||||||
install -m755 minimal-vim %{buildroot}%{_libexecdir}/vi
|
install -m755 minimal-vim %{buildroot}%{_libexecdir}/vi
|
||||||
@ -634,6 +630,9 @@ mkdir -p %{buildroot}/%{_datadir}/fish/vendor_functions.d/
|
|||||||
install -p -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/virc
|
install -p -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/virc
|
||||||
install -p -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/vimrc
|
install -p -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/vimrc
|
||||||
|
|
||||||
|
ln -sf %{_sysconfdir}/virc %{buildroot}/%{_datadir}/%{name}/virc
|
||||||
|
ln -sf %{_sysconfdir}/vimrc %{buildroot}/%{_datadir}/%{name}/vimrc
|
||||||
|
|
||||||
# if Vim isn't built for Fedora, use redhat augroup
|
# if Vim isn't built for Fedora, use redhat augroup
|
||||||
%if 0%{?rhel} >= 7
|
%if 0%{?rhel} >= 7
|
||||||
sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/vimrc
|
sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/vimrc
|
||||||
@ -689,6 +688,7 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
|
|||||||
%doc runtime/docs
|
%doc runtime/docs
|
||||||
%dir %{_datadir}/%{name}
|
%dir %{_datadir}/%{name}
|
||||||
%{_datadir}/%{name}/vimfiles/template.spec
|
%{_datadir}/%{name}/vimfiles/template.spec
|
||||||
|
%{_datadir}/%{name}/vimrc
|
||||||
%dir %{_datadir}/%{name}/%{vimdir}
|
%dir %{_datadir}/%{name}/%{vimdir}
|
||||||
%{_datadir}/%{name}/%{vimdir}/rgb.txt
|
%{_datadir}/%{name}/%{vimdir}/rgb.txt
|
||||||
%{_datadir}/%{name}/%{vimdir}/autoload
|
%{_datadir}/%{name}/%{vimdir}/autoload
|
||||||
@ -837,6 +837,7 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
|
|||||||
%{_bindir}/vi
|
%{_bindir}/vi
|
||||||
%{_bindir}/view
|
%{_bindir}/view
|
||||||
%{_datadir}/%{name}/%{vimdir}/defaults.vim
|
%{_datadir}/%{name}/%{vimdir}/defaults.vim
|
||||||
|
%{_datadir}/%{name}/virc
|
||||||
%{_libexecdir}/vi
|
%{_libexecdir}/vi
|
||||||
%{_mandir}/man1/vi.*
|
%{_mandir}/man1/vi.*
|
||||||
%{_mandir}/man1/ex.*
|
%{_mandir}/man1/ex.*
|
||||||
|
Loading…
Reference in New Issue
Block a user