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:   25-Aug-2008 11:48:52
  Branch: HEAD                             Handle: 2008082510485100

  Modified files:
    openpkg-src/js          js.patch js.spec

  Log:
    optionally add jsapigen tool

  Summary:
    Revision    Changes     Path
    1.29        +18 -0      openpkg-src/js/js.patch
    1.80        +36 -4      openpkg-src/js/js.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/js/js.patch
  ============================================================================
  $ cvs diff -u -r1.28 -r1.29 js.patch
  --- openpkg-src/js/js.patch   24 Aug 2008 07:23:11 -0000      1.28
  +++ openpkg-src/js/js.patch   25 Aug 2008 09:48:51 -0000      1.29
  @@ -126,3 +126,21 @@
   +    INSTALLDIRS  => 'vendor',
    );
    
  +Index: jsapigen-0.1.0/src/parser.y
  +--- jsapigen-0.1.0/src/parser.y.orig 2008-08-22 14:16:28 +0200
  ++++ jsapigen-0.1.0/src/parser.y      2008-08-25 11:01:55 +0200
  +@@ -141,12 +141,12 @@
  +     ;
  + 
  + prologue
  +-    : TOK_PROLOGUE  {char *str = strndup($1+2, strlen($1)-4);
  ++    : TOK_PROLOGUE  {char *str = strdup($1+2); str[strlen($1)-4] = '\0';
  +                      $$ = node_create_data_leaf(NODE_PROLOGUE, str);}
  +     ;
  + 
  + epilogue
  +-    : TOK_EPILOGUE  {char *str = strndup($1+2, strlen($1)-4);
  ++    : TOK_EPILOGUE  {char *str = strdup($1+2); str[strlen($1)-4] = '\0';
  +                      $$ = node_create_data_leaf(NODE_EPILOGUE, str);}
  +     ;
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/js/js.spec
  ============================================================================
  $ cvs diff -u -r1.79 -r1.80 js.spec
  --- openpkg-src/js/js.spec    24 Aug 2008 07:23:11 -0000      1.79
  +++ openpkg-src/js/js.spec    25 Aug 2008 09:48:51 -0000      1.80
  @@ -30,6 +30,7 @@
   %define       V_javascript_jslint       0.06
   %define       V_javascript_engine       0.024
   %define       V_jsmin                   20080803
  +%define       V_jsapigen                0.1.0
   
   #   package information
   Name:         js
  @@ -42,11 +43,12 @@
   Group:        Language
   License:      MPL/GPL/LGPL
   Version:      %{V_js}
  -Release:      20080824
  +Release:      20080825
   
   #   package options
   %option       with_file        yes
   %option       with_dso         yes
  +%option       with_jsapigen    no
   %option       with_perl        no
   %option       with_editline    no
   %option       with_utf8        no
  @@ -59,7 +61,8 @@
   Source4:      
http://www.cpan.org/modules/by-module/JavaScript/JavaScript-Code-%{V_javascript_code}.tar.gz
   Source5:      
http://www.cpan.org/modules/by-module/JavaScript/JavaScript-JSLint-%{V_javascript_jslint}.tar.gz
   Source6:      
http://www.cpan.org/modules/by-module/JavaScript/JE-%{V_javascript_engine}.tar.gz
  -Source7:      
ftp://ftp.openpkg.org/sources/CPY/VERSIONED/jsmin/jsmin-%{V_jsmin}.c
  +Source7:      
http://switch.dl.sourceforge.net/jsapigen/jsapigen-%{V_jsapigen}.tar.gz
  +Source8:      
ftp://ftp.openpkg.org/sources/CPY/VERSIONED/jsmin/jsmin-%{V_jsmin}.c
   Patch0:       js.patch
   
   #   build information
  @@ -75,6 +78,9 @@
   BuildPreReq:  editline
   PreReq:       editline
   %endif
  +%if "%{with_jsapigen}" == "yes"
  +BuildPreReq:  flex, bison
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -123,6 +129,11 @@
           url       = http://www.cpan.org/modules/by-module/JavaScript/
           regex     = JE-(__VER__)\.tar\.gz
       }
  +    prog js:jsapigen = {
  +        version   = %{V_jsapigen}
  +        url       = http://prdownloads.sourceforge.net/jsapigen/
  +        regex     = jsapigen-(__VER__)\.tar\.gz
  +    }
       prog js:jsmin = {
           version   = %{V_jsmin}
           url       = ftp://ftp.openpkg.org/sources/CPY/VERSIONED/jsmin/
  @@ -137,6 +148,7 @@
       %setup -q -D -T -a 4
       %setup -q -D -T -a 5
       %setup -q -D -T -a 6
  +    %setup -q -D -T -a 7
       %patch -p0
   
   %build
  @@ -170,9 +182,22 @@
         %{l_make} %{l_mflags}
       ) || exit $?
   
  -    #   build add-on tool
  +    #   build add-on tool "jsmin"
       %{l_cc} -o jsmin %{SOURCE jsmin-%{V_jsmin}.c}
   
  +    #   build add-on tool "jsapigen"
  +%if "%{with_jsapigen}" == "yes"
  +    ( cd jsapigen-%{V_jsapigen}
  +      CC="%{l_cc}" \
  +      CFLAGS="%{l_cflags -O}" \
  +      GREP="grep" \
  +      ./configure \
  +          --prefix=%{l_prefix} \
  +          --mandir=%{l_prefix}/man
  +      %{l_make} %{l_mflags}
  +    ) || exit $?
  +%endif
  +
   %if "%{with_perl}" == "yes"
       #   build add-on Perl bindings
       ( cd JavaScript-%{V_javascript}
  @@ -219,10 +244,17 @@
         strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
       ) || exit $?
   
  -    #   install add-on tool
  +    #   install add-on tool "jsmin"
       %{l_shtool} install -c -s -m 755 \
           jsmin $RPM_BUILD_ROOT%{l_prefix}/bin/
   
  +    #   install add-on tool "jsapigen"
  +%if "%{with_jsapigen}" == "yes"
  +    %{l_shtool} install -c -s -m 755 \
  +        jsapigen-%{V_jsapigen}/src/jsapigen \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin/
  +%endif
  +
   %if "%{with_perl}" == "yes"
       #   install add-on Perl bindings
       ( cd JavaScript-%{V_javascript}
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to