From 8276fd81f1287e4a80b0896c04fa55cfaceb99f6 Mon Sep 17 00:00:00 2001 From: Stefan Paletta Date: Wed, 7 Jun 2006 08:36:11 +0000 Subject: [PATCH] Stefan Paletta: ncurses: also build wide-char ncurses; move headers for single-byte ncurses into ncurses/, providing compatibility symlinks for SUS headers; use libtool when available, fix install of shared libs when not. [2006053011411612190] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7629 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/ncurses/ncurses.conf | 44 ++++++++++++++++++++++++----- package/base/ncurses/no-rm-so.patch | 18 ++++++++++++ 2 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 package/base/ncurses/no-rm-so.patch diff --git a/package/base/ncurses/ncurses.conf b/package/base/ncurses/ncurses.conf index be186b20e..d097bc086 100644 --- a/package/base/ncurses/ncurses.conf +++ b/package/base/ncurses/ncurses.conf @@ -20,10 +20,18 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- -prefix='' -set_confopt +libdir=$root/lib +includedir=$includedir/ncurses + +custmain=ncurses_main + +var_append extraconfopt ' ' '--with-shared' +if pkginstalled libtool && [ ${stagelevel} -gt 3 ] ; then + var_append extraconfopt ' ' '--with-libtool' +else + var_append extraconfopt ' ' '--with-normal' +fi -confopt="$confopt --with-normal --with-shared" prepatch="bunzip2 < $archdir/termtypes.ti.bz2 > misc/terminfo.src" remove_include_termcap() { @@ -31,22 +39,44 @@ remove_include_termcap() { sed -i 's,termcap.h,,g' include/Makefile } -if [ -f $root/var/adm/packages/termcap ] ; then +if pkginstalled termcap ; then echo_status "Found termcap package ->" \ "disable ncurses internal termcap library." - confopt="$confopt --disable-termcap" + var_append extraconfopt ' ' '--disable-termcap' inmake="remove_include_termcap" else hook_add postmake 6 "\ ln -svf libncurses.a $libdir/libtermcap.a; \ ln -svf libncurses.so $libdir/libtermcap.so" + hook_add postmake 8 "\ + ln -svf ncurses/termcap.h $includedir/../" fi hook_add postmake 7 "\ ln -svf libncurses.so $libdir/libcurses.so; \ - ln -svf libncurses.a $libdir/libcurses.a" + ln -svf libncurses.a $libdir/libcurses.a; \ + ln -svf ncurses/curses.h ncurses/term.h ncurses/unctrl.h $includedir/../" if [ $stagelevel = 1 ] ; then - var_append confopt ' ' '--without-cxx --without-cxx-bindings' + var_append extraconfopt ' ' '--without-cxx --without-cxx-bindings' fi var_append makeinstopt ' ' "'INSTALL_LIB=\$(INSTALL) -m 755'" + +ncurses_main() { + ncurses_build + eval "$MAKE distclean" + var_append extraconfopt ' ' '--enable-widec' + includedir=${includedir}w + ncurses_build +} + +ncurses_build() { + hook_eval preconf + eval_config_command $( eval echo $confopt ) + hook_eval premake + eval "$MAKE $makeopt" + hook_eval inmake + eval "$MAKE $makeinstopt" + hook_eval postmake +} + diff --git a/package/base/ncurses/no-rm-so.patch b/package/base/ncurses/no-rm-so.patch new file mode 100644 index 000000000..e58802f45 --- /dev/null +++ b/package/base/ncurses/no-rm-so.patch @@ -0,0 +1,18 @@ +--- ./mk-1st.awk.orig 2005-06-18 21:15:57.000000000 +0200 ++++ ./mk-1st.awk 2006-05-30 01:48:45.556155823 +0200 +@@ -207,7 +207,6 @@ + } else { + dst_dirs = "$(DESTDIR)$(libdir)"; + printf "../lib/%s : $(%s_OBJS)\n", end_name, OBJS +- print "\t-@rm -f $@"; + } + if ( subset == "termlib" || subset == "termlib+ext_tinfo" ) { + printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(TINFO_LIST) $(LDFLAGS)\n", OBJS +@@ -240,7 +239,6 @@ + src_name = sprintf("../lib/%s", end_name); + dst_name = sprintf("$(DESTDIR)$(libdir)/%s", end_name); + printf "\t@echo installing %s as %s\n", src_name, dst_name +- printf "\t-@rm -f %s\n", dst_name + printf "\t$(INSTALL_LIB) %s %s\n", src_name, dst_name + + sharedlinks("$(DESTDIR)$(libdir)")