OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 16-Jul-2003 21:20:31
Branch: HEAD Handle: 2003071620203000
Modified files:
openpkg-src/ispell ispell.spec
Log:
revise my ncurses workaround, because it is a link-time only solution
and the source does not support ncurses under compile-time. So add a
kludge for checking the available vendor terminal API libraries
Summary:
Revision Changes Path
1.34 +12 -3 openpkg-src/ispell/ispell.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/ispell/ispell.spec
============================================================================
$ cvs diff -u -r1.33 -r1.34 ispell.spec
--- openpkg-src/ispell/ispell.spec 16 Jul 2003 18:29:11 -0000 1.33
+++ openpkg-src/ispell/ispell.spec 16 Jul 2003 19:20:30 -0000 1.34
@@ -49,8 +49,8 @@
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20020206, ncurses, make, bison
-PreReq: OpenPKG, openpkg >= 20020206, ncurses
+BuildPreReq: OpenPKG, openpkg >= 20020206, make, bison
+PreReq: OpenPKG, openpkg >= 20020206
AutoReq: no
AutoReqProv: no
@@ -70,6 +70,15 @@
%{l_bzip2} -d -c %{SOURCE igerman98-%{V_igerman98}.tar.bz2} | %{l_tar} xf -
%build
+ # kludge: determine whether vendor termcap, termlib or curses library exists
+ # reason: some brean-dead platforms (like SuSE, etc) have no termcap library
installed.
+ termlib=""
+ echo "int main(int argc, char *argv[]) { return 0; }" >dummy.c
+ for lib in termcap termlib curses ncurses; do
+ rc=0; %{l_cc} -o dummy dummy.c -l$lib >/dev/null 2>&1 || rc=1
+ if [ $rc -eq 0 ]; then termlib="-l$lib"; break; fi
+ done
+ [ ".$termlib" = . ] && exit 1
( echo "#define MINIMENU"
echo "#undef NO8BIT"
echo "#define MASKBITS 64"
@@ -81,7 +90,7 @@
echo "#define MAN4DIR \"%{l_prefix}/man/man4\""
echo "#define WORDS \"$RPM_BUILD_DIR/words\""
echo "#define YACC \"%{l_prefix}/bin/bison -y\""
- echo "#define TERMLIB \"%{l_ldflags} -lncurses\""
+ echo "#define TERMLIB \"$termlib\""
case "%{l_target}" in
*-linux* | *-solaris* ) echo "#define USG" ;;
esac
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]