diff lib/ncurses/ncurses.sh @ 598:f4de1c69a61a

lib/ncurses: simplify
author David Demelier <markand@malikania.fr>
date Sat, 13 Jul 2019 11:48:10 +0200
parents bad483aace64
children 25cecc6dca48
line wrap: on
line diff
--- a/lib/ncurses/ncurses.sh	Sat Jul 13 11:23:58 2019 +0200
+++ b/lib/ncurses/ncurses.sh	Sat Jul 13 11:48:10 2019 +0200
@@ -35,53 +35,35 @@
 {
 	rm -rf $PKGNAME-$PKGVERSION
 	tar xvaf $PKGNAME-$PKGVERSION.tar.gz
-	pushd $PKGNAME-$PKGVERSION
+	cd $PKGNAME-$PKGVERSION
 
-	# wide version
-	mkdir wide-build && pushd wide-build
 	CC="$CC" \
 	CFLAGS="$CFLAGS" \
 	CXX="$CXX" \
 	CXXFLAGS="$CXXFLAGS" \
 	LDFLAGS="$LDFLAGS" \
 	LIBS="$LIBS" \
-	../configure \
-		--build=$CBUILD \
-		--host=$CHOST \
+	./configure \
+		--enable-pc-files \
 		--prefix= \
-		--enable-pc-files \
-		--enable-widec \
-		--prefix= \
-		--without-ada \
+		--with-cxx-shared \
+		--with-manpage-format=normal \
+		--with-normal \
 		--with-pkg-config-libdir=/lib/pkgconfig \
 		--with-shared \
-		--without-debug
-	make
-	make install DESTDIR=$DESTDIR
-	rm -f $DESTDIR/lib/lib{menuw,ncursesw,panelw,formw}.a
-	popd
-
-	# normal version
-	mkdir normal-build && pushd normal-build
-	CC="$CC" \
-	CFLAGS="$CFLAGS" \
-	CXX="$CXX" \
-	CXXFLAGS="$CXXFLAGS" \
-	LDFLAGS="$LDFLAGS" \
-	LIBS="$LIBS" \
-	../configure \
-		--enable-pc-files \
-		--prefix= \
 		--without-ada \
-		--with-pkg-config-libdir=/lib/pkgconfig \
-		--with-shared \
 		--without-debug
 	make
 	make install DESTDIR=$DESTDIR
 	rm -f $DESTDIR/lib/lib{menu,ncurses,panel,form}.a
+
+	# Add required curses symlinks.
 	ln -sf libncurses.so $DESTDIR/lib/libcurses.so
-	popd
+	for i in $DESTDIR/include/ncurses/*.h; do
+		ln -sf /include/ncurses/$(basename $i) \
+			$DESTDIR/include/$(basename $i)
+	done
 
-	popd
+	cd ..
 	rm -rf $PKGNAME-$PKGVERSION
 }