Date: Sunday, February 21, 2010 @ 13:10:16
  Author: dgriffiths
Revision: 69650

Merged revisions 68666,69649 via svnmerge from 
svn+ssh://gerolde.archlinux.org/srv/svn-packages/vim/trunk

........
  r68666 | dgriffiths | 2010-02-13 15:00:23 -0600 (Sat, 13 Feb 2010) | 1 line
  
  FS#16165 - Redesigned fetch_patches to enable parallel downloading
........
  r69649 | dgriffiths | 2010-02-21 12:09:59 -0600 (Sun, 21 Feb 2010) | 2 lines
  
  FS#16710
........

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

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


Property changes on: vim/repos/extra-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /vim/trunk:1-68412
   + /vim/trunk:1-69649

Modified: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2010-02-21 18:09:59 UTC (rev 69649)
+++ extra-i686/PKGBUILD 2010-02-21 18:10:16 UTC (rev 69650)
@@ -3,15 +3,15 @@
 
 pkgname=vim
 _srcver=7.2
-_patchlevel=359
+_patchlevel=368
 pkgver=${_srcver}.${_patchlevel}
 pkgrel=1
 pkgdesc='Vi Improved, a highly configurable, improved version of the vi text 
editor'
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 license=('custom:vim')
 url="http://www.vim.org";
 depends=('gpm' 'coreutils' 'perl')
-makedepends=('wget' 'sed' 'grep' 'gettext')
+makedepends=('wget' 'sed' 'grep' 'gettext' 'curl')
 backup=(etc/vimrc)
 install=${pkgname}.install
 # we need the extra-stuff to get all patches applied smoothly
@@ -20,7 +20,7 @@
         ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
         fetch_patches.sh fetch_runtime.sh vimrc archlinux.vim)
 md5sums=('f0901284b338e448bfd79ccca0041254' '35e04482f07c57221c9a751aaa3b8dac' 
\
-         'd8884786979e0e520c112faf2e176f05' '6d7e8d7868e8bfaa9a5880cd9c439320' 
\
+         'd8884786979e0e520c112faf2e176f05' '159d4d11ecaf85c06623a02c1f843d01' 
\
          '45c1c3c6aff7de0d8fc2a9d8cd5cec7d' '3f42c68545b5b1afb2e9a5b2731ef063' 
\
          '10353a61aadc3f276692d0e17db1478e')
 
@@ -29,7 +29,6 @@
   _versiondir="vim"$(echo ${_srcver} | sed "s/\.//")
   # pull in patches from vim.org (or the src cache alternatively)
   . ${srcdir}/fetch_patches.sh
-  . ${srcdir}/fetch_runtime.sh
   get_patches || return 1
 
   cd ${srcdir}/${_versiondir}
@@ -40,9 +39,17 @@
     --with-compiledby=ArchLinux --with-features=big \
     --enable-gpm --enable-acl --with-x=no --disable-gui \
     --enable-multibyte --enable-cscope \
-    --enable-perlinterp
+    --enable-perlinterp --enable-rubyinterp
     #--with-global-runtime=/usr/share/vim --with-vim-name=vim \
   make || return 1
+}
+
+package()
+{
+  . ${srcdir}/fetch_runtime.sh
+  _versiondir="vim"$(echo ${_srcver} | sed "s/\.//")
+  cd ${srcdir}/${_versiondir}
+
   make  VIMRCLOC=/etc DESTDIR=${pkgdir} install
   cd ${pkgdir}/usr/bin
   rm ex view          # provided by (n)vi in core

Modified: extra-i686/fetch_patches.sh
===================================================================
--- extra-i686/fetch_patches.sh 2010-02-21 18:09:59 UTC (rev 69649)
+++ extra-i686/fetch_patches.sh 2010-02-21 18:10:16 UTC (rev 69650)
@@ -1,67 +1,29 @@
 # the external logic for pulling in patches
 
 get_patches() {
-  _patchdir=${srcdir}/patches
-  cd ${srcdir}/${_versiondir}
-  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 ${srcdir}/${_versiondir}
-  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
 }

Reply via email to