Accepting request 90237 from editors

- Move spec skeleton functionality into /etc/vimrc (bnc#720898) 

- vim-enhanced,gvim: Never ever link against static libpython
  this happends because %{_libdir}/python$vesion/config is
  searched first and picks libpython.a instead of .so ...

OBS-URL: https://build.opensuse.org/request/show/90237
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vim?expand=0&rev=73
This commit is contained in:
Stephan Kulow 2011-11-07 15:18:10 +00:00 committed by Git OBS Bridge
commit 3ee92f9240
6 changed files with 77 additions and 53 deletions

View File

@ -1,38 +0,0 @@
" ~/.vimrc (configuration file for vim only)
" skeletons
function! SKEL_spec()
0r /usr/share/vim/current/skeletons/skeleton.spec
language time en_US
if $USER != ''
let login = $USER
elseif $LOGNAME != ''
let login = $LOGNAME
else
let login = 'unknown'
endif
let newline = stridx(login, "\n")
if newline != -1
let login = strpart(login, 0, newline)
endif
if $HOSTNAME != ''
let hostname = $HOSTNAME
else
let hostname = system('hostname -f')
if v:shell_error
let hostname = 'localhost'
endif
endif
let newline = stridx(hostname, "\n")
if newline != -1
let hostname = strpart(hostname, 0, newline)
endif
exe "%s/specRPM_CREATION_DATE/" . strftime("%a\ %b\ %d\ %Y") . "/ge"
exe "%s/specRPM_CREATION_AUTHOR_MAIL/" . login . "@" . hostname . "/ge"
exe "%s/specRPM_CREATION_NAME/" . expand("%:t:r") . "/ge"
setf spec
endfunction
autocmd BufNewFile *.spec call SKEL_spec()
" filetypes
filetype plugin on
filetype indent on
" ~/.vimrc ends here

View File

@ -1,7 +1,7 @@
# #
# spec file for package # spec file for package
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) specCURRENT_YEAR SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,8 +15,6 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# norootforbuild
Name: specRPM_CREATION_NAME Name: specRPM_CREATION_NAME
Version: Version:
Release: Release:
@ -43,9 +41,6 @@ make %{?_smp_mflags}
%install %install
%make_install %make_install
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%post %post
%postun %postun

View File

@ -2,9 +2,42 @@
" author: Klaus Franken <kfr@suse.de> " author: Klaus Franken <kfr@suse.de>
" author: Werner Fink <werner@suse.de> " author: Werner Fink <werner@suse.de>
" author: Florian La Roche <florian@suse.de> " author: Florian La Roche <florian@suse.de>
" version: 00/01/20 " version: 06/11/2011
" commented lines start with `"' " commented lines start with `"'
function! SKEL_spec()
0r /usr/share/vim/current/skeletons/skeleton.spec
language time en_US
if $USER != ''
let login = $USER
elseif $LOGNAME != ''
let login = $LOGNAME
else
let login = 'unknown'
endif
let newline = stridx(login, "\n")
if newline != -1
let login = strpart(login, 0, newline)
endif
if $HOSTNAME != ''
let hostname = $HOSTNAME
else
let hostname = system('hostname -f')
if v:shell_error
let hostname = 'localhost'
endif
endif
let newline = stridx(hostname, "\n")
if newline != -1
let hostname = strpart(hostname, 0, newline)
endif
exe "%s/specCURRENT_YEAR/" . strftime("%Y") . "/ge"
exe "%s/specRPM_CREATION_DATE/" . strftime("%a\ %b\ %d\ %Y") . "/ge"
exe "%s/specRPM_CREATION_AUTHOR_MAIL/" . login . "@" . hostname . "/ge"
exe "%s/specRPM_CREATION_NAME/" . expand("%:t:r") . "/ge"
setf spec
endfunction
" enable syntax highlighting " enable syntax highlighting
syntax on syntax on
@ -248,5 +281,8 @@ endif " has("autocmd")
" that it potentially can open for malicious users to do harmful things. " that it potentially can open for malicious users to do harmful things.
set nomodeline set nomodeline
" Skeleton for spec files
autocmd BufNewFile *.spec call SKEL_spec()
" get easier to use and more user friendly vim defaults " get easier to use and more user friendly vim defaults
" /etc/vimrc ends here " /etc/vimrc ends here

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Nov 7 12:59:21 UTC 2011 - idonmez@suse.com
- Move spec skeleton functionality into /etc/vimrc (bnc#720898)
-------------------------------------------------------------------
Sun Nov 6 03:49:09 UTC 2011 - crrodriguez@opensuse.org
- vim-enhanced,gvim: Never ever link against static libpython
this happends because %{_libdir}/python$vesion/config is
searched first and picks libpython.a instead of .so ...
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 18 17:16:30 CEST 2011 - dmueller@suse.de Tue Oct 18 17:16:30 CEST 2011 - dmueller@suse.de

View File

@ -88,7 +88,6 @@ Source15: vim132
Source18: missing-vim-client Source18: missing-vim-client
Source19: gvim.desktop Source19: gvim.desktop
Source20: spec.skeleton Source20: spec.skeleton
Source21: dot.vimrc
Source22: vim.conf Source22: vim.conf
Source23: apparmor.vim Source23: apparmor.vim
Source98: %{name}-7.3-patches.tar.bz2 Source98: %{name}-7.3-patches.tar.bz2
@ -112,6 +111,7 @@ Patch22: %{name}-7.3-filetype_mine.patch
Patch25: vim-7.2-lzma-support.patch Patch25: vim-7.2-lzma-support.patch
Patch27: %{name}-7.3-disable_gcc_warning_eval_c.patch Patch27: %{name}-7.3-disable_gcc_warning_eval_c.patch
Patch100: vim-7.1.314-CVE-2009-0316-debian.patch Patch100: vim-7.1.314-CVE-2009-0316-debian.patch
Patch101: vim73-no-static-libpython.patch
%description %description
Vim (Vi IMproved) is an almost compatible version of the UNIX editor Vim (Vi IMproved) is an almost compatible version of the UNIX editor
@ -277,6 +277,7 @@ cp %{SOURCE23} runtime/syntax/apparmor.vim
#%patch25 #%patch25
%patch27 -p1 %patch27 -p1
%patch100 -p1 %patch100 -p1
%patch101
cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE8} %{SOURCE10} . cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE8} %{SOURCE10} .
#rename no nb $RPM_BUILD_DIR/vim*/src/po/no.* #rename no nb $RPM_BUILD_DIR/vim*/src/po/no.*
#rename menu_no menu_nb $RPM_BUILD_DIR/vim*/runtime/lang/menu_no* #rename menu_no menu_nb $RPM_BUILD_DIR/vim*/runtime/lang/menu_no*
@ -314,6 +315,10 @@ export GUI_OPTIONS="\
--enable-gtk2-check \ --enable-gtk2-check \
--with-gtk-prefix=/opt/gnome \ --with-gtk-prefix=/opt/gnome \
--with-gnome=/opt/gnome" --with-gnome=/opt/gnome"
pushd src
autoconf
popd
# #
# build small default binary # build small default binary
%configure \ %configure \
@ -350,10 +355,10 @@ sed -i -e 's|define HAVE_DATE_TIME 1|undef HAVE_DATE_TIME|' src/auto/config.h
gcc %{optflags} %{SOURCE13} -o vitmp gcc %{optflags} %{SOURCE13} -o vitmp
%install %install
#
# create icon directory to have the icon from the tarball installed # create icon directory to have the icon from the tarball installed
install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
%makeinstall STRIP=: %makeinstall STRIP=:
# the last installed binary is gvim. preserve it and # the last installed binary is gvim. preserve it and
# fix its symlinks. e* was added here as it doesnt make much sense in # fix its symlinks. e* was added here as it doesnt make much sense in
# console # console
@ -361,13 +366,14 @@ mv -v %{buildroot}%{_bindir}/{vim,gvim-normal}
for f in egvim egview eview evim gex gvi gview gvimdiff rgview rgvim ; do for f in egvim egview eview evim gex gvi gview gvimdiff rgview rgvim ; do
ln -s -vf gvim %{buildroot}%{_bindir}/$f ln -s -vf gvim %{buildroot}%{_bindir}/$f
done done
#
# install the other binaries # install the other binaries
install -D -m 0755 vim-normal %{buildroot}/bin/vim-normal install -D -m 0755 vim-normal %{buildroot}/bin/vim-normal
install -D -m 0755 vim-enhanced %{buildroot}%{_bindir}/vim-enhanced install -D -m 0755 vim-enhanced %{buildroot}%{_bindir}/vim-enhanced
%if 0%{?with_splitted_gvim} %if 0%{?with_splitted_gvim}
install -D -m 0755 gvim-enhanced %{buildroot}%{_bindir}/gvim-enhanced install -D -m 0755 gvim-enhanced %{buildroot}%{_bindir}/gvim-enhanced
%endif %endif
# compat symlinks # compat symlinks
# we need a dummy target for /etc/alternatives/vim # we need a dummy target for /etc/alternatives/vim
mkdir -p %{buildroot}%{_sysconfdir}/alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives
@ -378,21 +384,23 @@ ln -s -f /bin/vim %{buildroot}%{_bindir}/vim
ln -s -f /bin/vim %{buildroot}%{_bindir}/vi ln -s -f /bin/vim %{buildroot}%{_bindir}/vi
ln -s -f vim %{buildroot}%{_bindir}/edit ln -s -f vim %{buildroot}%{_bindir}/edit
ln -s -f /bin/vim %{buildroot}/bin/ex ln -s -f /bin/vim %{buildroot}/bin/ex
#
# man pages # man pages
ln -s -f vim.1.gz %{buildroot}%{_mandir}/man1/vi.1.gz ln -s -f vim.1.gz %{buildroot}%{_mandir}/man1/vi.1.gz
ln -s -f vim.1.gz %{buildroot}%{_mandir}/man1/ex.1.gz ln -s -f vim.1.gz %{buildroot}%{_mandir}/man1/ex.1.gz
#
# vitmp # vitmp
install -m 0755 vitmp %{buildroot}%{_bindir}/vitmp install -m 0755 vitmp %{buildroot}%{_bindir}/vitmp
install -m 0644 %{SOURCE14} %{buildroot}%{_mandir}/man1/vitmp.1 install -m 0644 %{SOURCE14} %{buildroot}%{_mandir}/man1/vitmp.1
install -m 0755 %{SOURCE15} %{buildroot}%{_datadir}/vim/%{VIM_SUBDIR}/tools/vim132 install -m 0755 %{SOURCE15} %{buildroot}%{_datadir}/vim/%{VIM_SUBDIR}/tools/vim132
#
# make the vim settings more generic # make the vim settings more generic
ln -s -f %{VIM_SUBDIR} %{buildroot}%{_datadir}/vim/current ln -s -f %{VIM_SUBDIR} %{buildroot}%{_datadir}/vim/current
# additional files # additional files
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/vimrc install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/vimrc
install -D -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/gvimrc install -D -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/gvimrc
# create site wide runtime directory # create site wide runtime directory
mkdir -p -m 0755 %{buildroot}%{site_runtimepath}/after mkdir -p -m 0755 %{buildroot}%{site_runtimepath}/after
mkdir -m 0755 %{buildroot}%{site_runtimepath}/autoload mkdir -m 0755 %{buildroot}%{site_runtimepath}/autoload
@ -404,9 +412,9 @@ mkdir -m 0755 %{buildroot}%{site_runtimepath}/ftdetect
mkdir -m 0755 %{buildroot}%{site_runtimepath}/after/syntax mkdir -m 0755 %{buildroot}%{site_runtimepath}/after/syntax
mkdir -m 0755 %{buildroot}%{_datadir}/vim/current/skeletons mkdir -m 0755 %{buildroot}%{_datadir}/vim/current/skeletons
mkdir -m 0755 %{buildroot}%{_sysconfdir}/skel mkdir -m 0755 %{buildroot}%{_sysconfdir}/skel
# install spec helper # install spec helper
install -m 0644 %{SOURCE20} %{buildroot}%{_datadir}/vim/current/skeletons/skeleton.spec install -m 0644 %{SOURCE20} %{buildroot}%{_datadir}/vim/current/skeletons/skeleton.spec
install -m 0644 %{SOURCE21} %{buildroot}%{_sysconfdir}/skel/.vimrc
# desktop file for gvim # desktop file for gvim
install -D -m 0644 %{SOURCE19} %{buildroot}%{_datadir}/applications/gvim.desktop install -D -m 0644 %{SOURCE19} %{buildroot}%{_datadir}/applications/gvim.desktop
@ -515,7 +523,6 @@ fi
%files base %files base
%defattr(-,root,root,-) %defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/vimrc %config(noreplace) %{_sysconfdir}/vimrc
%config(noreplace) %{_sysconfdir}/skel/.vimrc
%ghost %{_sysconfdir}/alternatives/vim %ghost %{_sysconfdir}/alternatives/vim
%dir /usr/lib/tmpfiles.d %dir /usr/lib/tmpfiles.d
%config(noreplace) /usr/lib/tmpfiles.d/vim.conf %config(noreplace) /usr/lib/tmpfiles.d/vim.conf

View File

@ -0,0 +1,11 @@
--- src/configure.in.orig
+++ src/configure.in
@@ -881,7 +881,7 @@ eof
if test "${vi_cv_var_python_version}" = "1.4"; then
vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
else
- vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
+ vi_cv_path_python_plibs="-lpython${vi_cv_var_python_version}"
fi
vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
dnl remove -ltermcap, it can conflict with an earlier -lncurses