[arch-commits] Commit in gvim/repos (3 files)

Daniel Griffiths dgriffiths at archlinux.org
Sun Feb 14 08:07:53 UTC 2010


    Date: Sunday, February 14, 2010 @ 03:07:52
  Author: dgriffiths
Revision: 68716

Merged revisions 68715 via svnmerge from 
svn+ssh://gerolde.archlinux.org/srv/svn-packages/gvim/trunk

........
  r68715 | dgriffiths | 2010-02-14 02:07:37 -0600 (Sun, 14 Feb 2010) | 1 line
........

Modified:
  gvim/repos/extra-i686/	(properties)
  gvim/repos/extra-i686/PKGBUILD
  gvim/repos/extra-i686/fetch_patches.sh

------------------+
 PKGBUILD         |   20 ++++++++++------
 fetch_patches.sh |   64 ++++++++++-------------------------------------------
 2 files changed, 26 insertions(+), 58 deletions(-)


Property changes on: gvim/repos/extra-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /gvim/trunk:1-53532
   + /gvim/trunk:1-68715

Modified: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2010-02-14 08:07:37 UTC (rev 68715)
+++ extra-i686/PKGBUILD	2010-02-14 08:07:52 UTC (rev 68716)
@@ -3,15 +3,15 @@
 
 pkgname=gvim
 _srcver=7.2
-_patchlevel=266
+_patchlevel=359
 pkgver=${_srcver}.${_patchlevel}
-pkgrel=2
+pkgrel=1
 pkgdesc="the vim text editor with advanced features enabled, such as a gui mode"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 license=('custom:vim')
 url="http://www.vim.org"
 depends=("vim>=${pkgver}" 'python' 'libxt' 'desktop-file-utils' 'gtk2')
-makedepends=('pkgconfig' 'sed' 'perl')
+makedepends=('pkgconfig' 'sed' 'perl' 'curl')
 install=${pkgname}.install
 source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
         ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
@@ -19,7 +19,7 @@
         ${pkgname}.desktop fetch_patches.sh)
 md5sums=('f0901284b338e448bfd79ccca0041254' '35e04482f07c57221c9a751aaa3b8dac' \
          'd8884786979e0e520c112faf2e176f05' '2be104c0372dd6dae19cb7968c03cd4f' \
-         'df640c8196c480795fdda24c817e0f11')
+         '159d4d11ecaf85c06623a02c1f843d01')
 
 build()
 {
@@ -28,6 +28,7 @@
   # pull in patches from vim.org (or the src cache alternatively)
   . ${srcdir}/fetch_patches.sh
   get_patches || return 1
+
   cd ${srcdir}/${_versiondir}
    # define the place for the global (g)vimrc file (set to /etc/vimrc)
   sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
@@ -36,8 +37,13 @@
     --with-x=yes --disable-gpm --enable-gui=gtk2 \
     --enable-multibyte --enable-cscope --enable-netbeans \
     --enable-perlinterp --enable-pythoninterp --disable-rubyinterp
+
   make || return 1
-   # install everything first ...
+}
+
+package() {
+  _versiondir="vim"$(echo ${_srcver} | sed "s/\.//")
+  cd ${srcdir}/${_versiondir}
   make VIMRCLOC=/etc DESTDIR=${pkgdir} install
 
    # ... and clean up what vim already has for us
@@ -65,7 +71,7 @@
   rm -rf ${pkgdir}/usr/share/vim
    # freedesktop links
   install -D -m644 ${srcdir}/${pkgname}.desktop \
-    ${startdir}/pkg/usr/share/applications/gvim.desktop
+    ${pkgdir}/usr/share/applications/gvim.desktop
   install -D -m644 ${srcdir}/${_versiondir}/runtime/vim48x48.png \
     ${pkgdir}/usr/share/pixmaps/gvim.png
 }

Modified: extra-i686/fetch_patches.sh
===================================================================
--- extra-i686/fetch_patches.sh	2010-02-14 08:07:37 UTC (rev 68715)
+++ extra-i686/fetch_patches.sh	2010-02-14 08:07:52 UTC (rev 68716)
@@ -1,67 +1,29 @@
 # the external logic for pulling in patches
 
 get_patches() {
-  _patchdir=${srcdir}/patches
-  cd ${srcdir}/vim$(echo ${_srcver} | sed "s/\.//")
-  if [ -d ${_patchdir} ]; then
-    rm -rf ${_patchdir}
-    echo -e "\tremove patches from old build"
-  fi
-  mkdir ${_patchdir} && cd ${_patchdir}
-  _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver}
 
-  # change IFS to loop line-by-line
-  _OLDIFS=$IFS
-  IFS="
-"
-  echo -e "\tfetching checksumfile for patches"
-  wget ${_rpath}/MD5SUMS >/dev/null 2>&1
+  curl ftp://ftp.vim.org/pub/vim/patches/${_srcver}/MD5SUMS | sed -e \
+    '/.gz$/d' > MD5SUMS
+  let _patchlevel=$_patchlevel+1
+  _currpatch=$(cat MD5SUMS | wc -l)
+  sed -i "${_patchlevel},\$d" MD5SUMS
+  cat MD5SUMS | awk '{ print $2 }' | sed -e \
+    "s|^|ftp://ftp.vim.org/pub/vim/patches/${_srcver}/|" | \
+    xargs -P 0 -r -n 1 wget -nv
+  md5sum -c MD5SUMS > /dev/null || return 1
+  for file in $(cat MD5SUMS | awk '{ print $2 }')
+    do patch -p0 < $file > vim.full.patch.log; done
 
-  downloads=0
-  for _line in $(/bin/cat MD5SUMS); do
-    _file=$(echo $_line | cut -d ' ' -f3)
-    [ ${_file##*.} == "gz" ] && continue
-    downloads=$((${downloads} + 1))
-    _md5=$(echo $_line | cut -d ' ' -f1)
-    if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then
-      echo -e "\thaving patch file:${_file}"
-      cp ${SRCDEST}/vim-${_srcver}/${_file} ./
-    else
-      echo -n -e "\t... fetching patch file: ${_file} ..."
-      wget ${_rpath}/${_file} >/dev/null 2>&1
-      if [ -w ${SRCDEST} ]; then
-        if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then
-          mkdir -p ${SRCDEST}/vim-${_srcver}
-        fi
-        cp ${_file} ${SRCDEST}/vim-${_srcver}/
-        echo " done!"
-      fi
-    fi
-
-    if [ $(echo "${_md5}  ${_file}" | md5sum --status -c -) ]; then
-      echo ${_file} md5sums do not match
-      return 1
-    fi
-  done
-
   ########
 
-  if [ ${downloads} != ${_patchlevel} ]; then
+  if [ ${_patchlevel} -le ${_currpatch} ]; then
     echo ""
     echo -e "\t\tWARNING!"
     echo "You are not building the latest available version! A newer patchlevel"
     echo "seems to be available. Please edit the PKGBUILD and add the latest"
-    echo "${downloads} as pkgrel number!"
+    echo "${_currpatch} as pkgrel number!"
     echo ""
     sleep 10
   fi
-  IFS=$_OLDIFS
-  rm MD5SUMS
-  cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
-  for _patchnum in $(/usr/bin/seq 1 ${_patchlevel}); do
-    _patch=${_srcver}.$(printf "%03d" ${_patchnum})
-    patch -Np0 -i ${_patchdir}/${_patch} || return 1
-  done
-  rm -rf ${_patchdir}
   return 0
 }




More information about the arch-commits mailing list