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:   09-Sep-2007 11:07:28
  Branch: HEAD                             Handle: 2007090910072700

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

  Log:
    new package: ctalk 0.09a (Object-Orientation Extensions for ISO-C)

  Summary:
    Revision    Changes     Path
    1.1         +212 -0     openpkg-src/ctalk/ctalk.patch
    1.1         +116 -0     openpkg-src/ctalk/ctalk.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/ctalk/ctalk.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 ctalk.patch
  --- /dev/null 2007-09-09 11:07:14 +0200
  +++ ctalk.patch       2007-09-09 11:07:28 +0200
  @@ -0,0 +1,212 @@
  +Index: ctalk-0.09a/classes/ctalklib
  +--- ctalk-0.09a/classes/ctalklib.orig        2007-08-16 23:48:35 +0200
  ++++ ctalk-0.09a/classes/ctalklib     2007-09-09 11:02:54 +0200
  +@@ -521,6 +521,7 @@
  + /*
  +  *   Prototypes of C library functions.
  +  */
  ++#if 0
  + extern int atoi (const char *);
  + extern double atof (const char *);
  + extern long long atoll (const char *);
  +@@ -532,6 +533,7 @@
  + extern void _error (char *, ...);
  + extern void _warning (char *, ...);
  + extern int strcmp (const char *, const char *);
  ++#endif
  + 
  + /* 
  +  *   Prototypes of ctalk library functions. 
  +Index: ctalk-0.09a/ctpp/Makefile.in
  +--- ctalk-0.09a/ctpp/Makefile.in.orig        2007-08-17 00:54:36 +0200
  ++++ ctalk-0.09a/ctpp/Makefile.in     2007-09-09 11:02:54 +0200
  +@@ -95,7 +95,7 @@
  + 
  + CFLAGS = -g3 -Wall 
  + CPPFLAGS = -I$(top_builddir)/include
  +-LIBS = $(top_builddir)/libctpp/.libs/libctpp.so
  ++LIBS = $(top_builddir)/libctpp/libctpp.la
  + DEFS = -DPKGNAME=\"$(PACKAGE)\" -DCLASSLIBDIR=\"$(pkgincludedir)\" 
-DVERSION=\"$(VERSION)\" -DHOST_OS=$(HOST_OS) -DHOST_CPU=$(HOST_CPU)
  + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
  + CONFIG_CLEAN_FILES = 
  +Index: ctalk-0.09a/ctpp/builtins.c
  +--- ctalk-0.09a/ctpp/builtins.c.orig 2007-08-17 00:42:00 +0200
  ++++ ctalk-0.09a/ctpp/builtins.c      2007-09-09 11:02:54 +0200
  +@@ -37,11 +37,6 @@
  +  *  definition to the preprocessor's name space.
  +  */
  + 
  +-#if (HOST_OS==linux-gnu) && ((HOST_CPU==i386) || (HOST_CPU==i486) || \
  +-    (HOST_CPU==i586) || (HOST_CPU==i686))
  +-#include "config/linux-gnu-x86.h"
  +-#endif
  +-
  + #include <stdio.h>
  + #include <stdlib.h>
  + #include <string.h>
  +@@ -62,17 +57,6 @@
  +   int i;
  +   char s[MAXLABEL];
  + 
  +-  /*
  +-   *  Host-dependent symbol/definition pairs from the 
  +-   *  config file included above.  See the comments in 
  +-   *  config/linux-gnu-x86.c
  +-   */
  +-  for (i = 0; builtins[i]; i+=2) {
  +-    sprintf (s, "#define %s %s\n", builtins[i], builtins[i+1]);
  +-    tokenize_define (s);
  +-  }
  +-
  +-
  +   if (gcc_macros_opt) gcc_builtins ();
  + 
  +   return 0;
  +Index: ctalk-0.09a/ctpp/i_opt.c
  +--- ctalk-0.09a/ctpp/i_opt.c.orig    2007-08-17 00:42:00 +0200
  ++++ ctalk-0.09a/ctpp/i_opt.c 2007-09-09 11:02:54 +0200
  +@@ -30,6 +30,8 @@
  + #include <stdlib.h>
  + #include <string.h>
  + #include <errno.h>
  ++#include <sys/types.h>
  ++#include <sys/stat.h>
  + #include "ctpp.h"
  + 
  + extern char source_file[FILENAME_MAX];  /* Declared in rtinfo.c. */
  +Index: ctalk-0.09a/lib/rtinfo.c
  +--- ctalk-0.09a/lib/rtinfo.c.orig    2006-11-25 05:06:56 +0100
  ++++ ctalk-0.09a/lib/rtinfo.c 2007-09-09 11:02:54 +0200
  +@@ -32,7 +32,7 @@
  + #include "parser.h"
  + 
  + extern char *tzname[2];
  +-long int timezone;
  ++long int ctalk_timezone;
  + extern int daylight;
  + 
  + RT_INFO rtinfo;
  +Index: ctalk-0.09a/libctpp/lex.c
  +--- ctalk-0.09a/libctpp/lex.c.orig   2007-08-17 00:42:02 +0200
  ++++ ctalk-0.09a/libctpp/lex.c        2007-09-09 11:02:54 +0200
  +@@ -26,6 +26,8 @@
  + #include <string.h>
  + #include <ctype.h>
  + #include <errno.h>
  ++#include <sys/types.h>
  ++#include <sys/stat.h>
  + #include "ctpp.h"
  + #include "typeof.h"
  + #include "prtinfo.h"
  +Index: ctalk-0.09a/libctpp/rtinfo.c
  +--- ctalk-0.09a/libctpp/rtinfo.c.orig        2007-08-17 00:42:02 +0200
  ++++ ctalk-0.09a/libctpp/rtinfo.c     2007-09-09 11:02:54 +0200
  +@@ -29,7 +29,7 @@
  + #include "prtinfo.h"
  + 
  + extern char *tzname[2];
  +-long int timezone;
  ++long int ctalk_timezone;
  + extern int daylight;
  + 
  + RT_INFO rtinfo;
  +Index: ctalk-0.09a/src/Makefile.in
  +--- ctalk-0.09a/src/Makefile.in.orig 2007-08-17 00:54:37 +0200
  ++++ ctalk-0.09a/src/Makefile.in      2007-09-09 11:02:54 +0200
  +@@ -92,7 +92,7 @@
  + 
  + CFLAGS = -g3 -Wall 
  + CPPFLAGS = -I$(top_builddir)/include
  +-LIBS = $(top_builddir)/lib/.libs/libctalk.so
  ++LIBS = $(top_builddir)/lib/libctalk.la
  + DEFS = -DPKGNAME=\"$(PACKAGE)\" -DCLASSLIBDIR=\"$(pkgincludedir)\" 
-DVERSION=\"$(VERSION)\"
  + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
  + CONFIG_CLEAN_FILES = 
  +Index: ctpp-1.0.15/ctpp/Makefile.in
  +--- ctpp-1.0.15/ctpp/Makefile.in.orig        2007-09-08 11:30:35 +0200
  ++++ ctpp-1.0.15/ctpp/Makefile.in     2007-09-09 11:04:03 +0200
  +@@ -121,7 +121,7 @@
  + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  + LDFLAGS = @LDFLAGS@
  + LIBOBJS = @LIBOBJS@
  +-LIBS = $(top_builddir)/libctpp/.libs/libctpp$(LIBEXT)
  ++LIBS = $(top_builddir)/libctpp/libctpp.la
  + LIBTOOL = @LIBTOOL@
  + LIB_MAJOR_VERSION = @LIB_MAJOR_VERSION@
  + LIB_MINOR_VERSION = @LIB_MINOR_VERSION@
  +Index: ctpp-1.0.15/ctpp/builtins.c
  +--- ctpp-1.0.15/ctpp/builtins.c.orig 2007-09-04 06:14:05 +0200
  ++++ ctpp-1.0.15/ctpp/builtins.c      2007-09-09 11:02:54 +0200
  +@@ -80,11 +80,12 @@
  +    *  config file included above.  See the comments in 
  +    *  config/linux-gnu-x86.c
  +    */
  ++#if defined(__linux__) && defined(__i386__)
  +   for (i = 0; builtins[i]; i+=2) {
  +     sprintf (s, "#define %s %s\n", builtins[i], builtins[i+1]);
  +     tokenize_define (s);
  +   }
  +-
  ++#endif
  + 
  +   if (gcc_macros_opt) gcc_builtins ();
  + 
  +@@ -93,9 +94,11 @@
  + 
  + int is_builtin_symbol (char *name) {
  +   int i;
  ++#if defined(__linux__) && defined(__i386__)
  +   for (i = 0; builtins[i]; i+=2) {
  +     if (!strcmp (name, builtins[i]))
  +       return TRUE;
  +   }
  ++#endif
  +   return FALSE;
  + }
  +Index: ctpp-1.0.15/ctpp/ccompat.c
  +--- ctpp-1.0.15/ctpp/ccompat.c.orig  2007-09-04 06:14:05 +0200
  ++++ ctpp-1.0.15/ctpp/ccompat.c       2007-09-09 11:02:54 +0200
  +@@ -53,8 +53,10 @@
  + 
  + char cpp_subdir[FILENAME_MAX];
  + 
  ++#if defined(__linux__) && defined(__i386__)
  + extern char *host_os;                 /* Defined in builtins.c.             
*/
  + extern char *host_cpu;
  ++#endif
  + 
  + #if defined(__DJGPP__) || defined(__CYGWIN__)
  + #define GCC_BIN "gcc.exe"
  +@@ -332,7 +334,7 @@
  + 
  +   strcpy (gcc_target, "djgpp");
  + 
  +-#else
  ++#elif defined(__linux__) && defined(__i386__)
  + 
  +   /* Try to find out what the compiler target is.  It may not 
  +      be the same as the autoconf $host.
  +Index: ctpp-1.0.15/ctpp/i_opt.c
  +--- ctpp-1.0.15/ctpp/i_opt.c.orig    2007-08-27 03:18:27 +0200
  ++++ ctpp-1.0.15/ctpp/i_opt.c 2007-09-09 11:02:54 +0200
  +@@ -30,6 +30,8 @@
  + #include <stdlib.h>
  + #include <string.h>
  + #include <errno.h>
  ++#include <sys/types.h>
  ++#include <sys/stat.h>
  + #include "ctpp.h"
  + 
  + extern char source_file[FILENAME_MAX];  /* Declared in rtinfo.c. */
  +Index: ctpp-1.0.15/libctpp/lex.c
  +--- ctpp-1.0.15/libctpp/lex.c.orig   2007-08-27 03:04:06 +0200
  ++++ ctpp-1.0.15/libctpp/lex.c        2007-09-09 11:02:54 +0200
  +@@ -26,6 +26,8 @@
  + #include <string.h>
  + #include <ctype.h>
  + #include <errno.h>
  ++#include <sys/types.h>
  ++#include <sys/stat.h>
  + #include "ctpp.h"
  + #include "typeof.h"
  + #include "prtinfo.h"
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/ctalk/ctalk.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 ctalk.spec
  --- /dev/null 2007-09-09 11:07:14 +0200
  +++ ctalk.spec        2007-09-09 11:07:28 +0200
  @@ -0,0 +1,116 @@
  +##
  +##  ctalk.spec -- OpenPKG RPM Package Specification
  +##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  +##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  +##
  +##  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 versions
  +%define       V_ctalk 0.09a
  +%define       V_ctpp  1.0.15
  +
  +#   package information
  +Name:         ctalk
  +Summary:      Object-Orientation Extensions for ISO-C
  +URL:          http://ctalk-lang.sourceforge.net/
  +Vendor:       Robert Kiesling
  +Packager:     OpenPKG Foundation e.V.
  +Distribution: OpenPKG Community
  +Class:        EVAL
  +Group:        Language
  +License:      GPL
  +Version:      %{V_ctalk}
  +Release:      20070909
  +
  +#   list of sources
  +Source0:      
http://switch.dl.sourceforge.net/ctalk-lang/ctalk-%{V_ctalk}.tar.gz
  +Source1:      
http://switch.dl.sourceforge.net/ctalk-lang/ctpp-%{V_ctpp}.tar.gz
  +Patch0:       ctalk.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20060823
  +PreReq:       OpenPKG, openpkg >= 20060823
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    Ctalk adds object oriented programming features, including an object
  +    class hierarchy, methods, and operator overloading, to ANSI and ISO
  +    C source code. It also contains the C99 compliant C preprocessor
  +    ctpp(1) which can be used stand-alone, too.
  +
  +%track
  +    prog ctalk = {
  +        version   = %{V_ctalk}
  +        url       = http://prdownloads.sourceforge.net/ctalk-lang/
  +        regex     = ctalk-(__VER__)\.tar\.gz
  +    }
  +    prog ctalk:ctpp = {
  +        version   = %{V_ctpp}
  +        url       = http://prdownloads.sourceforge.net/ctalk-lang/
  +        regex     = ctpp-(__VER__)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q -c
  +    %setup -q -T -D -a 1
  +    %patch -p0
  +
  +%build
  +    ( cd ctalk-%{V_ctalk}
  +      CC="%{l_cc}" \
  +      CFLAGS="%{l_cflags -O}" \
  +      ./configure \
  +          --prefix=%{l_prefix} \
  +          --mandir=%{l_prefix}/man \
  +          --infodir=%{l_prefix}/info \
  +          --disable-shared
  +      %{l_make} %{l_mflags -O}
  +    ) || exit $?
  +    ( cd ctpp-%{V_ctpp}
  +      CC="%{l_cc}" \
  +      CFLAGS="%{l_cflags -O}" \
  +      ./configure \
  +          --prefix=%{l_prefix} \
  +          --mandir=%{l_prefix}/man \
  +          --infodir=%{l_prefix}/info \
  +          --disable-shared
  +      %{l_make} %{l_mflags -O}
  +    ) || exit $?
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +    ( cd ctalk-%{V_ctalk}
  +      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  +    ) || exit $?
  +    ( cd ctpp-%{V_ctpp}
  +      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  +    ) || exit $?
  +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  +    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  +    %{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                     openpkg-cvs@openpkg.org

Reply via email to