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 5f86b1af9330c059352b71866937f0f1f01cb840..ce603a52dda64dfc6d81af4fbbcb89127d3a53c6 100644 (file)
@@ -5,39 +5,42 @@
 # Depends on:
 
 name=ncurses
-version=5.9
+version=6.1
 release=1
 source=(http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz)
 
 build() {
   cd $name-$version
-
-  local OPTIONS="\
---build=$CHOST \
---host=$CTARGET \
---with-install-prefix=$PKG \
---prefix=/usr \
---with-normal \
---with-shared \
---without-debug \
---without-ada
-"
-
-  ./configure $OPTIONS
+  ./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 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
+  make DESTDIR=$PKG install
 
-  mkdir $PKG/lib
+  install -d $PKG/{lib,usr/include/ncursesw,usr/lib/pkgconfig}
 
-  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.$version $PKG/usr/lib/libncurses$i.so
+  # 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%%.*}
+
+  # 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
+
+  # linker script for the curses library
+  echo "INPUT(-lncursesw)" > $PKG/usr/lib/libcursesw.so
+  ln -s libncurses.so $PKG/usr/lib/libcurses.so
 }