Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 139805 Details for
Bug 203985
eclass/vim.eclass: lots of unquoted/overquoted variables (patch provided)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
even more picky patch
vim-eclass.patch (text/plain), 14.55 KB, created by
Elias Pipping (RETIRED)
on 2008-01-01 19:03:45 UTC
(
hide
)
Description:
even more picky patch
Filename:
MIME Type:
Creator:
Elias Pipping (RETIRED)
Created:
2008-01-01 19:03:45 UTC
Size:
14.55 KB
patch
obsolete
>--- eclass/vim.eclass >+++ eclass/vim.eclass >@@ -29,13 +29,13 @@ > # This isn't a conditional inherit from portage's perspective, since $MY_PN is > # constant at cache creation time. It's therefore legal and doesn't break > # anything. I even checked with carpaski first :) (08 Sep 2004 ciaranm) >-if [[ "${MY_PN}" != "vim-core" ]] && ! version_is_at_least "6.3.086" ; then >+if [[ ${MY_PN} != vim-core ]] && ! version_is_at_least "6.3.086" ; then > IUSE="debug" > else > IUSE="" > fi > >-if [[ "${PN##*-}" == "cvs" ]] ; then >+if [[ ${PN##*-} == cvs ]] ; then > inherit cvs > fi > >@@ -54,7 +54,7 @@ > DEPEND="${DEPEND} nls? ( virtual/libintl )" > RDEPEND="${RDEPEND} nls? ( virtual/libintl )" > >-if [[ "${MY_PN}" == "vim-core" ]] ; then >+if [[ ${MY_PN} == vim-core ]] ; then > IUSE="${IUSE} livecd" > else > IUSE="${IUSE} cscope gpm perl python ruby" >@@ -78,13 +78,13 @@ > RDEPEND="${RDEPEND} selinux? ( sys-libs/libselinux )" > fi > >- if [[ "${MY_PN}" == "vim" ]] ; then >+ if [[ ${MY_PN} == vim ]] ; then > IUSE="${IUSE} vim-with-x minimal" > # see bug #111979 for modular X deps > DEPEND="${DEPEND} vim-with-x? ( x11-libs/libXt x11-libs/libX11 > x11-libs/libSM x11-proto/xproto )" > RDEPEND="${RDEPEND} vim-with-x? ( x11-libs/libXt )" >- elif [[ "${MY_PN}" == "gvim" ]] ; then >+ elif [[ ${MY_PN} == gvim ]] ; then > if version_is_at_least "6.3.086" ; then > IUSE="${IUSE} gnome gtk motif" > else >@@ -99,24 +99,24 @@ > # ebuilds don't handle it). > if [[ $(get_major_version ) -ge 7 ]] ; then > # mzscheme support is currently broken. bug #91970 >- #if [[ "${MY_PN}" != "vim-core" ]] ; then >+ #if [[ ${MY_PN} != vim-core ]] ; then > # IUSE="${IUSE} mzscheme" > # DEPEND="${DEPEND} > # mzscheme? ( dev-scheme/mzscheme )" > # RDEPEND="${RDEPEND} > # mzscheme? ( dev-scheme/mzscheme )" > #fi >- if [[ "${MY_PN}" == "gvim" ]] ; then >+ if [[ ${MY_PN} == gvim ]] ; then > IUSE="${IUSE} netbeans aqua nextaw" > DEPEND="${DEPEND} netbeans? ( dev-util/netbeans )" > RDEPEND="${RDEPEND} netbeans? ( dev-util/netbeans )" > fi >- if [[ "${MY_PN}" == "vim" ]] ; then >+ if [[ ${MY_PN} == vim ]] ; then > IUSE="${IUSE} vim-pager" > fi > > # app-vim blocks >- if [[ "${MY_PN}" != "vim-core" ]] ; then >+ if [[ ${MY_PN} != vim-core ]] ; then > # align: bug 79982 > RDEPEND="${RDEPEND} > !<app-vim/align-30-r1 >@@ -150,7 +150,7 @@ > > apply_vim_patches() { > local p >- cd ${S} || die "cd ${S} failed" >+ cd "${S}" || die "cd ${S} failed" > > # Scan the patches, applying them only to files that either > # already exist or that will be created by the patch >@@ -159,8 +159,8 @@ > # --spb, 2004/12/18 > einfo "Filtering vim patches ..." > p=${WORKDIR}/${VIM_ORG_PATCHES%.tar*}.patch >- ls ${WORKDIR}/vimpatches | sort | \ >- while read f; do gzip -dc ${WORKDIR}/vimpatches/${f}; done | gawk ' >+ ls "${WORKDIR}"/vimpatches | sort | \ >+ while read f; do gzip -dc "${WORKDIR}"/vimpatches/${f}; done | gawk ' > /^Subject: [Pp]atch/ { > if (patchnum) {printf "\n" >"/dev/stderr"} > patchnum = $3 >@@ -218,7 +218,7 @@ > vim_src_unpack() { > unpack ${A} > >- if [[ "${PN##*-}" == "cvs" ]] ; then >+ if [[ ${PN##*-} == cvs ]] ; then > ECVS_SERVER="vim.cvs.sourceforge.net:/cvsroot/vim" > ECVS_PASS="" > if [[ $(get_major_version ) -ge 7 ]] ; then >@@ -231,11 +231,11 @@ > > else > # Apply any patches available from vim.org for this version >- [[ -n "$VIM_ORG_PATCHES" ]] && apply_vim_patches >+ [[ -n $VIM_ORG_PATCHES ]] && apply_vim_patches > > # Unpack the runtime snapshot if available (only for vim-core) >- if [[ -n "$VIM_RUNTIME_SNAP" ]] ; then >- cd ${S} || die >+ if [[ -n $VIM_RUNTIME_SNAP ]] ; then >+ cd "${S}" || die > ebegin "Unpacking vim runtime snapshot" > rm -rf runtime > # Changed this from bzip2 |tar to tar -j since the former broke for >@@ -248,54 +248,54 @@ > fi > > # Another set of patches borrowed from src rpm to fix syntax errors etc. >- cd ${S} || die "cd ${S} failed" >+ cd "${S}" || die "cd ${S} failed" > EPATCH_SUFFIX="gz" EPATCH_FORCE="yes" \ >- epatch ${WORKDIR}/gentoo/patches-all/ >+ epatch "${WORKDIR}"/gentoo/patches-all/ > > # Unpack an updated netrw snapshot if necessary. This is nasty. Don't > # ask, you don't want to know. >- if [[ -n "${VIM_NETRW_SNAP}" ]] ; then >+ if [[ -n ${VIM_NETRW_SNAP} ]] ; then > ebegin "Unpacking updated netrw snapshot" > tar xjf ${DISTDIR}/${VIM_NETRW_SNAP} -C runtime/ > eend $? > fi > > # Fixup a script to use awk instead of nawk >- sed -i '1s|.*|#!/usr/bin/awk -f|' ${S}/runtime/tools/mve.awk \ >+ sed -i '1s|.*|#!/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \ > || die "mve.awk sed failed" > > # Patch to build with ruby-1.8.0_pre5 and following >- sed -i 's/defout/stdout/g' ${S}/src/if_ruby.c >+ sed -i 's/defout/stdout/g' "${S}"/src/if_ruby.c > > # 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 >+ echo '#define SYS_VIMRC_FILE "/etc/vim/vimrc"' >> "${S}"/src/feature.h >+ echo '#define SYS_GVIMRC_FILE "/etc/vim/gvimrc"' >> "${S}"/src/feature.h > > # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. > # Hopefully this pattern won't break for a while at least. > # This fixes bug 29398 (27 Sep 2003 agriffis) > sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ >- ${S}/runtime/doc/syntax.txt \ >- ${S}/runtime/doc/tagsrch.txt \ >- ${S}/runtime/doc/usr_29.txt \ >- ${S}/runtime/menu.vim \ >- ${S}/src/configure.in || die 'sed failed' >+ "${S}"/runtime/doc/syntax.txt \ >+ "${S}"/runtime/doc/tagsrch.txt \ >+ "${S}"/runtime/doc/usr_29.txt \ >+ "${S}"/runtime/menu.vim \ >+ "${S}"/src/configure.in || die 'sed failed' > > # Don't be fooled by /usr/include/libc.h. When found, vim thinks > # this is NeXT, but it's actually just a file in dev-libs/9libs > # This fixes bug 43885 (20 Mar 2004 agriffis) >- sed -i 's/ libc\.h / /' ${S}/src/configure.in || die 'sed failed' >+ sed -i 's/ libc\.h / /' "${S}"/src/configure.in || die 'sed failed' > > # gcc on sparc32 has this, uhm, interesting problem with detecting EOF > # correctly. To avoid some really entertaining error messages about stuff > # which isn't even in the source file being invalid, we'll do some trickery > # to make the error never occur. bug 66162 (02 October 2004 ciaranm) >- find ${S} -name '*.c' | while read c ; do echo >> "$c" ; done >+ find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done > > # if we're vim-7 and USE vim-pager, make the manpager.sh script >- if [[ "${MY_PN}" == "vim" ]] && [[ $(get_major_version ) -ge 7 ]] \ >+ if [[ ${MY_PN} == vim ]] && [[ $(get_major_version ) -ge 7 ]] \ > && use vim-pager ; then >- cat <<END > ${S}/runtime/macros/manpager.sh >+ cat <<END > "${S}"/runtime/macros/manpager.sh > #!/bin/sh > tr '\\267' '.' | col -b | \\ > vim \\ >@@ -307,7 +307,7 @@ > fi > > # Try to avoid sandbox problems. Bug #114475. >- if [[ $(get_major_version ) -ge 7 ]] && [[ -d "${S}/src/po" ]] ; then >+ if [[ $(get_major_version ) -ge 7 ]] && [[ -d ${S}/src/po ]] ; then > sed -i -e \ > '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ > "${S}/src/po/Makefile" >@@ -349,8 +349,8 @@ > [[ -e ${file} ]] && addwrite $file > done > >- if [[ "${MY_PN}" == "vim-core" ]] || >- ( [[ "${MY_PN}" == "vim" ]] && use minimal ); then >+ if [[ ${MY_PN} == vim-core ]] || >+ ( [[ ${MY_PN} == vim ]] && use minimal ); then > myconf="--with-features=tiny \ > --enable-gui=no \ > --without-x \ >@@ -377,7 +377,7 @@ > if [[ $(get_major_version ) -ge 7 ]] ; then > # mzscheme support is currently broken. bug #91970 > #myconf="${myconf} `use_enable mzscheme mzschemeinterp`" >- if [[ "${MY_PN}" == "gvim" ]] ; then >+ if [[ ${MY_PN} == gvim ]] ; then > myconf="${myconf} `use_enable netbeans`" > fi > fi >@@ -389,12 +389,12 @@ > die "couldn't disable cscope" > fi > >- if [[ "${MY_PN}" == "vim" ]] ; then >+ if [[ ${MY_PN} == vim ]] ; then > # don't test USE=X here ... see bug #19115 > # but need to provide a way to link against X ... see bug #20093 > myconf="${myconf} --enable-gui=no `use_with vim-with-x x`" > >- elif [[ "${MY_PN}" == "gvim" ]] ; then >+ elif [[ ${MY_PN} == gvim ]] ; then > myconf="${myconf} --with-vim-name=gvim --with-x" > > echo ; echo >@@ -448,7 +448,7 @@ > fi > fi > >- if [[ "${MY_PN}" == "vim" ]] && use minimal ; then >+ if [[ ${MY_PN} == vim ]] && use minimal ; then > myconf="${myconf} --disable-nls --disable-multibyte --disable-acl" > else > myconf="${myconf} `use_enable nls` `use_enable acl`" >@@ -476,7 +476,7 @@ > # The following allows emake to be used > make -j1 -C src auto/osdef.h objects || die "make failed" > >- if [[ "${MY_PN}" == "vim-core" ]] ; then >+ if [[ ${MY_PN} == vim-core ]] ; then > emake tools || die "emake tools failed" > rm -f src/vim > else >@@ -492,7 +492,7 @@ > } > > vim_src_install() { >- if [[ "${MY_PN}" == "vim-core" ]] ; then >+ if [[ ${MY_PN} == vim-core ]] ; then > dodir /usr/{bin,share/{man/man1,vim}} > cd src || die "cd src failed" > if [[ $(get_major_version ) -ge 7 ]] ; then >@@ -505,7 +505,7 @@ > installtools \ > install-languages \ > install-icons \ >- DESTDIR=${D} \ >+ DESTDIR="${D}" \ > BINDIR=/usr/bin \ > MANDIR=/usr/share/man \ > DATADIR=/usr/share \ >@@ -519,7 +519,7 @@ > installtools \ > install-languages \ > install-icons \ >- DESTDIR=${D} \ >+ DESTDIR="${D}" \ > BINDIR=/usr/bin \ > MANDIR=/usr/share/man \ > DATADIR=/usr/share \ >@@ -531,7 +531,7 @@ > # default vimrc is installed by vim-core since it applies to > # both vim and gvim > insinto /etc/vim/ >- newins ${FILESDIR}/vimrc${VIMRC_FILE_SUFFIX} vimrc >+ newins "${FILESDIR}"/vimrc${VIMRC_FILE_SUFFIX} vimrc > > if use livecd ; then > # To save space, install only a subset of the files if we're on a >@@ -542,7 +542,7 @@ > shopt -s extglob > rm -fr ${vimfiles}/{compiler,doc,ftplugin,indent} > rm -fr ${vimfiles}/{macros,print,tools,tutor} >- rm ${D}/usr/bin/vimtutor >+ rm "${D}"/usr/bin/vimtutor > > local keep_colors="default" > ignore=$(rm -fr ${vimfiles}/colors/!(${keep_colors}).vim ) >@@ -556,9 +556,9 @@ > # These files might have slight security issues, so we won't > # install them. See bug #77841. We don't mind if these don't > # exist. >- rm ${D}/usr/share/vim/vim${VIM_VERSION/.}/tools/{vimspell.sh,tcltags} >+ rm "${D}"/usr/share/vim/vim${VIM_VERSION/.}/tools/{vimspell.sh,tcltags} > >- elif [[ "${MY_PN}" == "gvim" ]] ; then >+ elif [[ ${MY_PN} == gvim ]] ; then > dobin src/gvim > dosym gvim /usr/bin/gvimdiff > dosym gvim /usr/bin/evim >@@ -577,28 +577,28 @@ > fi > > insinto /etc/vim >- newins ${FILESDIR}/gvimrc${GVIMRC_FILE_SUFFIX} gvimrc >+ newins "${FILESDIR}"/gvimrc${GVIMRC_FILE_SUFFIX} gvimrc > > # as of 6.3-r1, we install a desktop entry. bug #44633, and bug #68622 > # for the nicer updated version. > insinto /usr/share/applications >- newins ${FILESDIR}/gvim.desktop${GVIM_DESKTOP_SUFFIX} gvim.desktop >+ newins "${FILESDIR}"/gvim.desktop${GVIM_DESKTOP_SUFFIX} gvim.desktop > insinto /usr/share/pixmaps >- doins ${FILESDIR}/gvim.xpm >+ doins "${FILESDIR}"/gvim.xpm > > else > dobin src/vim >- ln -s vim ${D}/usr/bin/vimdiff && \ >- ln -s vim ${D}/usr/bin/rvim && \ >- ln -s vim ${D}/usr/bin/ex && \ >- ln -s vim ${D}/usr/bin/view && \ >- ln -s vim ${D}/usr/bin/rview \ >+ ln -s vim "${D}"/usr/bin/vimdiff && \ >+ ln -s vim "${D}"/usr/bin/rvim && \ >+ ln -s vim "${D}"/usr/bin/ex && \ >+ ln -s vim "${D}"/usr/bin/view && \ >+ ln -s vim "${D}"/usr/bin/rview \ > || die "/usr/bin symlinks failed" > if [[ $(get_major_version ) -ge 7 ]] && use vim-pager ; then > ln -s /usr/share/vim/vim${VIM_VERSION//./}/macros/less.sh \ >- ${D}/usr/bin/vimpager >+ "${D}"/usr/bin/vimpager > ln -s /usr/share/vim/vim${VIM_VERSION//./}/macros/manpager.sh \ >- ${D}/usr/bin/vimmanpager >+ "${D}"/usr/bin/vimmanpager > insinto /usr/share/vim/vim${VIM_VERSION//./}/macros > doins runtime/macros/manpager.sh > fperms a+x /usr/share/vim/vim${VIM_VERSION//./}/macros/manpager.sh >@@ -607,10 +607,10 @@ > > # bash completion script, bug #79018. > if version_is_at_least 6.3.1 ; then >- if [[ "${MY_PN}" == "vim-core" ]] ; then >- dobashcompletion ${FILESDIR}/xxd-completion xxd >+ if [[ ${MY_PN} == vim-core ]] ; then >+ dobashcompletion "${FILESDIR}"/xxd-completion xxd > else >- dobashcompletion ${FILESDIR}/${MY_PN}-completion ${MY_PN} >+ dobashcompletion "${FILESDIR}"/${MY_PN}-completion ${MY_PN} > fi > fi > >@@ -668,12 +668,12 @@ > update_vim_helptags > > # Update fdo mime stuff, bug #78394 >- if [[ "${MY_PN}" == "gvim" ]] ; then >+ if [[ ${MY_PN} == gvim ]] ; then > fdo-mime_mime_database_update > fi > > if [[ $(get_major_version ) -lt 7 ]] ; then >- if [[ "${MY_PN}" == "gvim" ]] ; then >+ if [[ ${MY_PN} == gvim ]] ; then > echo > elog "To enable UTF-8 viewing, set guifont and guifontwide: " > elog ":set guifont=-misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1" >@@ -684,12 +684,12 @@ > elog > elog "Then, set read encoding to UTF-8:" > elog ":set encoding=utf-8" >- elif [[ "${MY_PN}" == "vim" ]] ; then >+ elif [[ ${MY_PN} == vim ]] ; then > echo > elog "gvim has now a seperate ebuild, 'emerge gvim' will install gvim" > fi > else >- if [[ "${MY_PN}" == "vim" ]] ; then >+ if [[ ${MY_PN} == vim ]] ; then > echo > elog "To install a GUI version of vim, use the app-editors/gvim" > elog "package." >@@ -705,7 +705,7 @@ > ewarn "default." > fi > >- if [[ "${MY_PN}" != "vim-core" ]] ; then >+ if [[ ${MY_PN} != vim-core ]] ; then > echo > elog "To see what's new in this release, use :help version${VIM_VERSION/.*/}.txt" > fi >@@ -720,7 +720,7 @@ > fi > > # Scream loudly if the user is using a -cvs ebuild >- if [[ -z "${PN/*-cvs/}" ]] ; then >+ if [[ -z ${PN/*-cvs/} ]] ; then > ewarn > ewarn "You are using a -cvs ebuild. Be warned that this is not" > ewarn "officially supported and may not work." >@@ -745,14 +745,14 @@ > update_vim_symlinks > > # Update fdo mime stuff, bug #78394 >- if [[ "${MY_PN}" == "gvim" ]] ; then >+ if [[ ${MY_PN} == gvim ]] ; then > fdo-mime_mime_database_update > fi > } > > vim_src_test() { > >- if [[ "${MY_PN}" == "vim-core" ]] ; then >+ if [[ ${MY_PN} == vim-core ]] ; then > einfo "No testing needs to be done for vim-core" > return > fi >@@ -770,10 +770,10 @@ > # Don't let vim talk to X > unset DISPLAY > >- if [[ "${MY_PN}" == "gvim" ]] ; then >+ if [[ ${MY_PN} == gvim ]] ; then > # Make gvim not try to connect to X. See :help gui-x11-start > # in vim for how this evil trickery works. >- ln -s ${S}/src/gvim ${S}/src/testvim >+ ln -s "${S}"/src/gvim "${S}"/src/testvim > testprog="../testvim" > else > testprog="../vim" >@@ -781,7 +781,7 @@ > > # We've got to call make test from within testdir, since the Makefiles > # don't pass through our VIMPROG argument >- cd ${S}/src/testdir >+ cd "${S}"/src/testdir > > # Test 49 won't work inside a portage environment > einfo "Test 49 isn't sandbox-friendly, so it will be skipped."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203985
:
139802
|
139804
|
139805
|
139806