CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
ncurses: updated to 6.1. Disabled stripping
[crossrootfs.git] / ncurses / Pkgfile
index 9b8bc07dd71963de877d26239c8ef339bb29d38b..ce603a52dda64dfc6d81af4fbbcb89127d3a53c6 100644 (file)
@@ -1,44 +1,46 @@
 # Description: A System V Release 4.0 curses emulation library
 # URL: http://www.gnu.org/software/ncurses/ncurses.html
 # Maintainer: CRUX System Team, core-ports at crux dot nu
-# Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
 # Depends on:
 
 name=ncurses
-version=5.7
-release=2
+version=6.1
+release=1
 source=(http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz)
 
 build() {
   cd $name-$version
+  ./configure --build=$CHOST \
+              --host=$CTARGET \
+              --with-install-prefix=$PKG \
+              --prefix=/usr \
+              --mandir=/usr/share/man \
+              --with-{normal,shared} \
+              --without-{debug,ada,tests} \
+              --enable-pc-files \
+              --enable-widec \
+              --disable-rpath \
+              --disable-rpath-hack \
+              --disable-stripping
+              
+  make
+  make DESTDIR=$PKG install
 
-  local OPTIONS="\
---build=$CHOST \
---host=$CTARGET \
---with-install-prefix=$PKG \
---prefix=/usr \
---with-normal \
---with-shared \
---without-debug \
---without-ada
-"
+  install -d $PKG/{lib,usr/include/ncursesw,usr/lib/pkgconfig}
 
-  ./configure $OPTIONS
-  make
-  make install
-  make distclean
-  
-  sed '/^BUILD_CCFLAGS/ s/-DHAVE_CONFIG_H/-DHAVE_CONFIG_H -D_GNU_SOURCE/' -i ncurses/Makefile.in
-  ./configure $OPTIONS --enable-widec
-  make 
-  make install
+  # move library to /lib and create symlinks
+  mv $PKG/usr/lib/libncursesw.so.* $PKG/lib
+  ln -sf ../../lib/libncursesw.so.$version $PKG/usr/lib/libncursesw.so
+  ln -s libncursesw.so.$version $PKG/lib/libncurses.so.${version%%.*}
 
-  mkdir $PKG/lib
+  # linker scripts and .pc files for non-wide ncurses
+  for LIB in ncurses form panel menu ; do
+    echo "INPUT(-l${LIB}w)" > $PKG/usr/lib/lib${LIB}.so
+    ln -s ${LIB}w.pc $PKG/usr/lib/pkgconfig/${LIB}.pc
+  done
 
-  for i in w ''; do \
-    mv $PKG/usr/lib/libncurses$i.so.* $PKG/lib && \
-    ln -sf libncurses$i.so $PKG/usr/lib/libcurses$i.so && \
-    ln -sf ../../lib/libncurses$i.so.5 $PKG/usr/lib/libncurses$i.so && \
-    ln -sf ../../lib/libncurses$i.so.5 $PKG/usr/lib/libncurses$i.so.5 \
-  ; done
+  # linker script for the curses library
+  echo "INPUT(-lncursesw)" > $PKG/usr/lib/libcursesw.so
+  ln -s libncurses.so $PKG/usr/lib/libcurses.so
 }