# Maintainer: PktSurf <smlinux@pktsurf.in>
app=readline
version=6.3
build=2sml
homepage="https://tiswww.case.edu/php/chet/readline/rltop.html"
download="ftp://ftp.cwru.edu/pub/bash/readline-$version.tar.gz"
desc="Line input library with editing features"
requires="netbsd-curses"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions

  for file in $srcdir/readline*-???.patch ; do
    cat $file | patch -p0 --verbose
  done
}

build() {
  ./configure \
    --prefix= \
    --with-curses \
    --enable-multibyte \
    --disable-static 

  make shared
  make install DESTDIR=$pkg

  mkfinalpkg
}

sha512sums="
39d003396e2dc5127f1d970dd0b50fa95388f2e31f9c08a513138637156b673d1e82b53fddce9ad9ee23cfe206ea8ea4b6adc900a0eb3af4a2f761e74e3856de  readline-6.3.tar.lz
e70f89ca52a4eae7e1cddd70de6a7162252231ee029c89bb3fcb0f6c8c8b46c666be910c8b2eee72e96983ec2f1a23663694dc222f67228d82e8e4684f1504a2  readline63-001.patch
4e23bd67433577e6e361d10a6c32768ea9e13b10e77493e565b870f56069b673fbcb0b860225f79fa9931845fc91d35c9a82c1385c23f8b757ebfd59f27851f4  readline63-002.patch
6bfb84a5b980091b995e2b96bdf5680f97fe670e6cac1b8606d2d75a1ef922ff5bd4e73f029f7af98a115006b7ab7828146f2cd6986287543d8a29987c91dc12  readline63-003.patch
6b683e9fe28831885135391b5a23bc580cacf0ffe720951a80f545574eda4eb064fe189801d44329b2eb2d3577db5a90f9e5ad9ed131e7e8a8ae349511632721  readline63-004.patch
b0332d7f999376788155341319d138a899a2278c338a6faaac89ecf3ed1e2248a07413dd810a76996bf25f211de787182b55f34ab3d7d31eb7519d7a48ebed32  readline63-005.patch
e9fbfa38d7b03ab2aff2e9e48918b85b4b67a729862ee47d1cc8e0aeb90c3224394a79f68829951e1377cae65742aa5385eae865f75e9c0b2e2abde42889431c  readline63-006.patch
abee331894846b360203a521d9a66fa02c03214120d5cafbd1cb4d680bd7bbef14321ae845dd67f7b5e8c87322801fd96fc9a5fd0ae026b41d98dc24a8949854  readline63-007.patch
8e30bbca3aa5cea8c2ee511abe0ec8f131608d74fe5ab24d68bcf452267f0f97446ed6e7cd482360876ce6c027280e4f4450cae05eb18f56046240f4c224841c  readline63-008.patch
"
