From 529133cf9326c40861e5647b85a5ee4b254931dd Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Tue, 7 Aug 2012 13:26:58 -0500
Subject: readline 6.2

---
 abs/core/readline/PKGBUILD         | 69 ++++++++++++++++++++------------------
 abs/core/readline/inputrc          |  4 ---
 abs/core/readline/readline.install |  9 ++---
 3 files changed, 38 insertions(+), 44 deletions(-)

diff --git a/abs/core/readline/PKGBUILD b/abs/core/readline/PKGBUILD
index 24126df..037b7e1 100644
--- a/abs/core/readline/PKGBUILD
+++ b/abs/core/readline/PKGBUILD
@@ -1,35 +1,44 @@
-# $Id: PKGBUILD 82724 2010-06-16 04:51:23Z allan $
-# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# $Id: PKGBUILD 163855 2012-07-21 11:22:57Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
 # Contributor: judd <jvinet@zeroflux.org>
 
 pkgname=readline
-_patchlevel=002 #prepare for some patches
-pkgver=6.1.$_patchlevel
-pkgrel=2
+_basever=6.2
+_patchlevel=004 #prepare for some patches
+pkgver=$_basever.$_patchlevel
+pkgrel=1
 pkgdesc="GNU readline library"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 url="http://tiswww.case.edu/php/chet/readline/rltop.html"
 license=('GPL')
 depends=('glibc' 'ncurses')
-backup=("etc/inputrc")
-source=(http://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz
+backup=('etc/inputrc')
+options=('!emptydirs')
+install=readline.install
+source=(http://ftp.gnu.org/gnu/readline/readline-$_basever.tar.gz{,.sig}
         inputrc)
 if [ $_patchlevel -gt 00 ]; then
-    for (( p=1; p<=$_patchlevel; p++ )); do
-        source=(${source[@]} http://ftp.gnu.org/gnu/readline/readline-6.1-patches/readline61-$(printf "%03d" $p))
+    for (( p=1; p<=$((10#${_patchlevel})); p++ )); do
+        source=(${source[@]} http://ftp.gnu.org/gnu/readline/readline-$_basever-patches/readline${_basever//./}-$(printf "%03d" $p){,.sig})
     done
 fi
-md5sums=('fc2f7e714fe792db1ce6ddc4c9fb4ef3'
-         'e5fc955f56d9fa5beb871f3279b8fa8b'
-         'c642f2e84d820884b0bf9fd176bc6c3f'
-         '1a76781a1ea734e831588285db7ec9b1')
+md5sums=('67948acb2ca081f23359d0256e9a271c'
+         '928f7d248320a65e43c2dc427e99582b'
+         '58d54966c1191db45973cb3191ac621a'
+         '83287d52a482f790dfb30ec0a8746669'
+         '8e6a51e2e0e6e45a82752e3692c111ac'
+         '0665020ea118e8434bd145fb71f452cc'
+         '285361ca6d48c51ae2428157e174e812'
+         'c9d5d79718856e711667dede87cb7622'
+         '4437205bb1462f5f32e4812b8292c675'
+         'c08e787f50579ce301075c523fa660a4'
+         '7e39cad1d349b8ae789e4fc33dbb235f')
 
 build() {
-  cd ${srcdir}/${pkgname}-6.1
-  for p in ../readline61-*; do
-    [ -e "$p" ] || continue
-    msg "applying patch ${p}"
-    patch -Np0 -i ${p} || return 1
+  cd ${srcdir}/${pkgname}-$_basever
+  for (( p=1; p<=$((10#${_patchlevel})); p++ )); do
+    msg "applying patch readline${_basever//./}-$(printf "%03d" $p)"
+    patch -Np0 -i $srcdir/readline${_basever//./}-$(printf "%03d" $p)
   done
 
   # Remove RPATH from shared objects (FS#14366)
@@ -38,19 +47,13 @@ build() {
   # build with -fPIC for x86_64 (FS#15634)
   [ $CARCH == "x86_64" ] && CFLAGS="$CFLAGS -fPIC"
 
-  ./configure --prefix=/usr --libdir=/lib \
-        --mandir=/usr/share/man --infodir=/usr/share/info
-  make SHLIB_LIBS=-lncurses || return 1
-  make DESTDIR=${pkgdir} install || return 1
-  
-  mkdir -p ${pkgdir}/etc
-  install -m644 ../inputrc ${pkgdir}/etc/inputrc || return 1
-  #FHS recommends only shared libs in /lib
-  mkdir -p $pkgdir/usr/lib
-  mv $pkgdir/lib/*.a $pkgdir/usr/lib
+  ./configure --prefix=/usr
+  make SHLIB_LIBS=-lncurses
+}
 
-  # to make the linker find the shared lib and fix compile issues
-  cd ${pkgdir}/usr/lib
-  ln -sv /lib/libreadline.so .
-  ln -sv /lib/libhistory.so .
+package() {
+  cd ${srcdir}/${pkgname}-$_basever
+  make DESTDIR=${pkgdir} install
+  
+  install -Dm644 ${srcdir}/inputrc ${pkgdir}/etc/inputrc
 }
diff --git a/abs/core/readline/inputrc b/abs/core/readline/inputrc
index 6ad9dd9..fd13a67 100644
--- a/abs/core/readline/inputrc
+++ b/abs/core/readline/inputrc
@@ -34,7 +34,3 @@ $if mode=emacs
 "\e[H": beginning-of-line
 "\e[F": end-of-line
 $endif
-
-# Include user-specific configuration
-$include ~/.inputrc
-
diff --git a/abs/core/readline/readline.install b/abs/core/readline/readline.install
index 0d40c51..06b646f 100644
--- a/abs/core/readline/readline.install
+++ b/abs/core/readline/readline.install
@@ -1,18 +1,13 @@
-infodir=/usr/share/info
+infodir=usr/share/info
 filelist=(history.info readline.info rluserman.info)
 
-post_install() {
+post_upgrade() {
   [ -x usr/bin/install-info ] || return 0
   for file in ${filelist[@]}; do
     install-info $infodir/$file.gz $infodir/dir 2> /dev/null
   done
 }
 
-post_upgrade() {
-  post_install $1
-  echo ">> You can safely ignore any \"cannot open shared object\" errors you see above"
-}
-
 pre_remove() {
   [ -x usr/bin/install-info ] || return 0
   for file in ${filelist[@]}; do
-- 
cgit v0.12

