OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   21-Sep-2008 18:23:18
  Branch: HEAD                             Handle: 2008092117231800

  Added files:
    openpkg-src/argp        argp.patch argp.spec

  Log:
    new package: argp 1.3 (Unix/C Argument Vector Manipulation Library)

  Summary:
    Revision    Changes     Path
    1.1         +157 -0     openpkg-src/argp/argp.patch
    1.1         +95 -0      openpkg-src/argp/argp.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/argp/argp.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 argp.patch
  --- /dev/null 2008-09-21 18:23:02 +0200
  +++ argp.patch        2008-09-21 18:23:18 +0200
  @@ -0,0 +1,157 @@
  +Index: argp-eexst.c
  +--- argp-eexst.c.orig        1999-10-04 23:53:17 +0200
  ++++ argp-eexst.c     2008-09-21 18:16:06 +0200
  +@@ -22,7 +22,11 @@
  + #include <config.h>
  + #endif
  + 
  +-#include <sysexits.h>
  ++#if HAVE_SYSEXITS_H
  ++# include <sysexits.h>
  ++#else
  ++# define EX_USAGE 64
  ++#endif
  + 
  + #include "argp.h"
  + 
  +Index: argp-parse.c
  +--- argp-parse.c.orig        2003-12-11 09:37:05 +0100
  ++++ argp-parse.c     2008-09-21 18:16:06 +0200
  +@@ -95,7 +95,9 @@
  + 
  + #define OPT_PROGNAME        -2
  + #define OPT_USAGE   -3
  ++#if HAVE_SLEEP && HAVE_GETPID
  + #define OPT_HANG    -4
  ++#endif
  + 
  + static const struct argp_option argp_default_options[] =
  + {
  +@@ -103,8 +105,10 @@
  +   {"usage",   OPT_USAGE,    0, 0,  N_("Give a short usage message"), 0 },
  +   {"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN,
  +      N_("Set the program name"), 0},
  ++#if OPT_HANG
  +   {"HANG",    OPT_HANG,    "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
  +      N_("Hang for SECS seconds (default 3600)"), 0 },
  ++#endif
  +   {0, 0, 0, 0, 0, 0}
  + };
  + 
  +@@ -143,7 +147,8 @@
  +     state->argv[0] = arg;
  + 
  +       break;
  +-
  ++      
  ++#if OPT_HANG
  +     case OPT_HANG:
  +       _argp_hang = atoi (arg ? arg : "3600");
  +       fprintf(state->err_stream, "%s: pid = %ld\n",
  +@@ -151,7 +156,8 @@
  +       while (_argp_hang-- > 0)
  +     __sleep (1);
  +       break;
  +-
  ++#endif
  ++      
  +     default:
  +       return EBADKEY;
  +     }
  +@@ -1277,13 +1283,13 @@
  + /* Defined here, in case a user is not inlining the definitions in
  +  * argp.h */
  + void
  +-__argp_usage (__const struct argp_state *__state) __THROW
  ++__argp_usage (__const struct argp_state *__state)
  + {
  +   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
  + }
  + 
  + int
  +-__option_is_short (__const struct argp_option *__opt) __THROW
  ++__option_is_short (__const struct argp_option *__opt)
  + {
  +   if (__opt->flags & OPTION_DOC)
  +     return 0;
  +@@ -1297,7 +1303,7 @@
  + }
  + 
  + int
  +-__option_is_end (__const struct argp_option *__opt) __THROW
  ++__option_is_end (__const struct argp_option *__opt)
  + {
  +   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
  + }
  +Index: argp.h
  +--- argp.h.orig      2003-12-11 09:37:05 +0100
  ++++ argp.h   2008-09-21 18:16:06 +0200
  +@@ -397,14 +397,14 @@
  +    routine returned a non-zero value, it is returned; otherwise 0 is
  +    returned.  This function may also call exit unless the ARGP_NO_HELP flag
  +    is set.  INPUT is a pointer to a value to be passed in to the parser.  */
  +-extern error_t argp_parse (__const struct argp *__restrict __argp,
  +-                       int __argc, char **__restrict __argv,
  +-                       unsigned __flags, int *__restrict __arg_index,
  +-                       void *__restrict __input) __THROW;
  +-extern error_t __argp_parse (__const struct argp *__restrict __argp,
  +-                         int __argc, char **__restrict __argv,
  +-                         unsigned __flags, int *__restrict __arg_index,
  +-                         void *__restrict __input) __THROW;
  ++extern error_t argp_parse (__const struct argp *__restrict argp,
  ++                       int argc, char **__restrict argv,
  ++                       unsigned flags, int *__restrict arg_index,
  ++                       void *__restrict input) __THROW;
  ++extern error_t __argp_parse (__const struct argp *__restrict argp,
  ++                         int argc, char **__restrict argv,
  ++                         unsigned flags, int *__restrict arg_index,
  ++                         void *__restrict input) __THROW;
  + 
  + /* Global variables.  */
  + 
  +@@ -564,13 +564,13 @@
  + # endif
  + 
  + ARGP_EI void
  +-__argp_usage (__const struct argp_state *__state) __THROW
  ++__argp_usage (__const struct argp_state *__state)
  + {
  +   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
  + }
  + 
  + ARGP_EI int
  +-__option_is_short (__const struct argp_option *__opt) __THROW
  ++__option_is_short (__const struct argp_option *__opt)
  + {
  +   if (__opt->flags & OPTION_DOC)
  +     return 0;
  +@@ -582,7 +582,7 @@
  + }
  + 
  + ARGP_EI int
  +-__option_is_end (__const struct argp_option *__opt) __THROW
  ++__option_is_end (__const struct argp_option *__opt)
  + {
  +   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
  + }
  +Index: configure.ac
  +--- configure.ac.orig        2004-02-23 18:57:29 +0100
  ++++ configure.ac     2008-09-21 18:16:37 +0200
  +@@ -26,7 +26,7 @@
  + 
  + # Checks for header files.
  + AC_HEADER_STDC
  +-AC_CHECK_HEADERS(limits.h malloc.h unistd.h)
  ++AC_CHECK_HEADERS(limits.h malloc.h unistd.h sysexits.h stdarg.h)
  + 
  + # Checks for typedefs, structures, and compiler characteristics.
  + AC_C_CONST
  +@@ -38,7 +38,7 @@
  + # Checks for library functions.
  + AC_FUNC_ALLOCA
  + AC_FUNC_VPRINTF
  +-AC_CHECK_FUNCS(strerror)
  ++AC_CHECK_FUNCS(strerror sleep getpid snprintf)
  + 
  + AC_REPLACE_FUNCS(mempcpy strndup strchrnul)
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/argp/argp.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 argp.spec
  --- /dev/null 2008-09-21 18:23:02 +0200
  +++ argp.spec 2008-09-21 18:23:18 +0200
  @@ -0,0 +1,95 @@
  +##
  +##  argp.spec -- OpenPKG RPM Package Specification
  +##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  +##
  +##  Permission to use, copy, modify, and distribute this software for
  +##  any purpose with or without fee is hereby granted, provided that
  +##  the above copyright notice and this permission notice appear in all
  +##  copies.
  +##
  +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +##  SUCH DAMAGE.
  +##
  +
  +#   package information
  +Name:         argp
  +Summary:      Unix/C Argument Vector Manipulation Library
  +URL:          http://www.gnu.org/software/libc/manual/html_node/Argp.html
  +Vendor:       Miles Bader
  +Packager:     OpenPKG Foundation e.V.
  +Distribution: OpenPKG Community
  +Class:        EVAL
  +Group:        Libraries
  +License:      GPL
  +Version:      1.3
  +Release:      20080921
  +
  +#   package options
  +%option       with_fsl  yes
  +
  +#   list of sources
  +Source0:      
http://www.lysator.liu.se/~nisse/archive/argp-standalone-%{version}.tar.gz
  +Patch0:       argp.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20060823, make, gcc, autoconf
  +PreReq:       OpenPKG, openpkg >= 20060823
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    This is LSH's stand-alone variant of GLIBC's "argp" library
  +    for manipulating Unix/C style argument vectors.
  +
  +%track
  +    prog argp = {
  +        version   = %{version}
  +        url       = http://www.lysator.liu.se/~nisse/archive/
  +        regex     = argp-standalone-(__VER__)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q -n argp-standalone-%{version}
  +    %patch -p0
  +
  +%build
  +    autoheader
  +    autoconf
  +    CC="%{l_cc}" \
  +    CFLAGS="%{l_cflags -O}" \
  +    AUTOMAKE="true" \
  +    AUTOCONF="true" \
  +    AUTOHEADER="true" \
  +    ACLOCAL="true" \
  +    ./configure \
  +        --prefix=%{l_prefix}
  +    %{l_make} %{l_mflags -O}
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/include \
  +        $RPM_BUILD_ROOT%{l_prefix}/lib
  +    %{l_shtool} install -c -m 644 \
  +        argp.h $RPM_BUILD_ROOT%{l_prefix}/include/
  +    %{l_shtool} install -c -m 644 \
  +        libargp.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to