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 openpkg-web          Date:   28-Jul-2003 20:29:01
  Branch: HEAD                             Handle: 2003072819285902

  Modified files:
    openpkg-src/hexer       hexer.spec
    openpkg-web             news.txt

  Log:
    make aware of brain-dead platforms like SuSE which not even have
    termcap

  Summary:
    Revision    Changes     Path
    1.25        +28 -5      openpkg-src/hexer/hexer.spec
    1.5876      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/hexer/hexer.spec
  ============================================================================
  $ cvs diff -u -r1.24 -r1.25 hexer.spec
  --- openpkg-src/hexer/hexer.spec      18 Jul 2003 13:06:26 -0000      1.24
  +++ openpkg-src/hexer/hexer.spec      28 Jul 2003 18:29:01 -0000      1.25
  @@ -33,7 +33,7 @@
   Group:        Editor
   License:      BSD
   Version:      0.1.4c
  -Release:      20030718
  +Release:      20030728
   
   #   list of sources
   Source0:      
ftp://ftp.netsw.org/system/tools/fileutils/edit/hexer-%{version}.tar.gz
  @@ -55,25 +55,48 @@
       %patch -p0
   
   %build
  +    #   choose platform specific configuration file
  +    #   and always rely on having an ISO C compiler
       ext=any
       case "%{l_target}" in
           *-freebsd* ) ext=bsd   ;;
           *-linux*   ) ext=linux ;;
           *-solaris* ) ext=sunos ;;
       esac
  -    #   always rely on ISO C compilers
       %{l_shtool} install \
           -e 's;\(USE_STDARG\).*;\1 1;' \
           config.$ext config.h
  -    %{l_make} %{l_mflags} CC="%{l_cc}" CFLAGS="%{l_cflags -O} \$(DEFINES)"
  +
  +    #   determine available terminal library
  +    #   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
  +
  +    #   build package
  +    %{l_make} %{l_mflags} \
  +        CC="%{l_cc}" \
  +        CFLAGS="%{l_cflags -O} \$(DEFINES)" \
  +        TERMCAP="$termlib -lm"
   
   %install
       rm -rf $RPM_BUILD_ROOT
  +
  +    #   install package
       %{l_shtool} mkdir -f -p -m 755 \
           $RPM_BUILD_ROOT%{l_prefix}/bin \
           $RPM_BUILD_ROOT%{l_prefix}/man/man1
  -    %{l_shtool} install -c -s -m 755 hexer $RPM_BUILD_ROOT%{l_prefix}/bin/
  -    %{l_shtool} install -c -m 644 hexer.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  +    %{l_shtool} install -c -s -m 755 \
  +        hexer $RPM_BUILD_ROOT%{l_prefix}/bin/
  +    %{l_shtool} install -c -m 644 \
  +        hexer.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  +
  +    #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
   %files -f files
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.5875 -r1.5876 news.txt
  --- openpkg-web/news.txt      28 Jul 2003 18:12:32 -0000      1.5875
  +++ openpkg-web/news.txt      28 Jul 2003 18:28:59 -0000      1.5876
  @@ -1,3 +1,4 @@
  +28-Jul-2003: Upgraded package: P<hexer-0.1.4c-20030728>
   28-Jul-2003: Upgraded package: P<icon-9.4.2-20030728>
   28-Jul-2003: Upgraded package: P<openpkg-tool-20030728-20030728>
   28-Jul-2003: Upgraded package: P<openpkg-20030728-20030728>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to