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:   22-Aug-2004 12:45:46
  Branch: HEAD                             Handle: 2004082211454500

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

  Log:
    new package: dhrystone 2.1 (The Dhrystone CPU Integer Arithmetic
    Benchmark)

  Summary:
    Revision    Changes     Path
    1.1         +31 -0      openpkg-src/dhrystone/dhrystone.patch
    1.1         +118 -0     openpkg-src/dhrystone/dhrystone.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/dhrystone/dhrystone.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 dhrystone.patch
  --- /dev/null 2004-08-22 12:45:45 +0200
  +++ dhrystone.patch   2004-08-22 12:45:45 +0200
  @@ -0,0 +1,31 @@
  +Index: dhry_1.c
  +--- dhry_1.c.orig    1988-07-12 21:35:10 +0200
  ++++ dhry_1.c 2004-08-22 12:33:23 +0200
  +@@ -28,7 +28,6 @@
  + int             Arr_1_Glob [50];
  + int             Arr_2_Glob [50] [50];
  + 
  +-extern char     *malloc ();
  + Enumeration     Func_1 ();
  +   /* forward declaration necessary since Enumeration may not simply be int */
  + 
  +@@ -45,19 +44,16 @@
  + 
  + #ifdef TIMES
  + struct tms      time_info;
  +-extern  int     times ();
  +                 /* see library function "times" */
  + #define Too_Small_Time (2*HZ)
  +                 /* Measurements should last at least about 2 seconds */
  + #endif
  + #ifdef TIME
  +-extern long     time();
  +                 /* see library function "time"  */
  + #define Too_Small_Time 2
  +                 /* Measurements should last at least 2 seconds */
  + #endif
  + #ifdef MSC_CLOCK
  +-extern clock_t      clock();
  + #define Too_Small_Time (2*HZ)
  + #endif
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/dhrystone/dhrystone.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 dhrystone.spec
  --- /dev/null 2004-08-22 12:45:45 +0200
  +++ dhrystone.spec    2004-08-22 12:45:45 +0200
  @@ -0,0 +1,118 @@
  +##
  +##  dhrystone.spec -- OpenPKG RPM Specification
  +##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  +##  Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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 information
  +Name:         dhrystone
  +Summary:      The Dhrystone CPU Integer Arithmetic Benchmark
  +URL:          http://www.dhrystone.org/
  +Vendor:       Reinhold Weicker
  +Packager:     The OpenPKG Project
  +Distribution: OpenPKG
  +Class:        EVAL
  +Group:        Benchmark
  +License:      Open Source
  +Version:      2.1
  +Release:      20040822
  +
  +#   list of sources
  +Source0:      http://ftp.digital.com/pub/misc/dhry%{version}.tar.Z
  +Patch0:       dhrystone.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130
  +PreReq:       OpenPKG, openpkg >= 20040130
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    Dhrystone is a benchmark invented by Reinhold P. Weicker that tests
  +    the integer performance of a CPU and the optimisation capabilities
  +    of the compiler used to generate the code. The output from the
  +    benchmark is the number of Dhrystones per second (the number of
  +    iterations of the main code loop per second).
  +
  +    One common representation of the Dhrystone benchmark is the DMIP
  +    - Dhrystone MIPS - obtained when the Dhrystone score is divided
  +    by 1,857 (the number of Dhrystones per second obtained on the VAX
  +    11/785, a 1 MIPS machine).
  +
  +    Dhrystone was named as a pun on the Whetstone benchmark. Like most
  +    synthetic benchmarks, the Dhrystone benchmark is not particularly
  +    useful in measuring the performance of real-world computer systems
  +    and has fallen into disuse, replaced by benchmarks that more closely
  +    resemble typical actual usage.
  +
  +%track
  +    prog dhrystone = {
  +        version   = %{version}
  +        url       = ftp://ftp.dhrystone.org/pub/dhrystone/
  +        regex     = dhrystone-(__VER__)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q -c
  +    %patch -p0
  +
  +%build
  +    mflags=""
  +    mflags="$mflags PROGS=unix"
  +    mflags="$mflags CC=\"%{l_cc}\""
  +    mflags="$mflags OPTIMIZE=\"%{l_cflags -O}\""
  +    mflags="$mflags STRUCTASSIGN="
  +    mflags="$mflags ENUMS="
  +    mflags="$mflags TIME_FUNC=-DTIMES"
  +    mflags="$mflags HZ=100"
  +    eval %{l_make} %{l_mflags} $mflags
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin \
  +        $RPM_BUILD_ROOT%{l_prefix}/share/dhrystone
  +    ( echo "#!/bin/sh"
  +      echo "iterations=${1-5000000}"
  +      echo "( echo $iterations | %{l_prefix}/bin/dry2"
  +      echo "  echo $iterations | %{l_prefix}/bin/dry2reg"
  +      echo ") | tee dhrystone.out"
  +    ) >dhrystone.sh
  +    %{l_shtool} install -c -m 755 \
  +        dhrystone.sh $RPM_BUILD_ROOT%{l_prefix}/bin/dhrystone
  +    %{l_shtool} install -c -s -m 755 \
  +        dry2 dry2reg $RPM_BUILD_ROOT%{l_prefix}/bin/
  +    %{l_shtool} install -c -m 644 \
  +        Rationale $RPM_BUILD_ROOT%{l_prefix}/share/dhrystone/rationale.txt
  +    %{l_shtool} install -c -m 644 \
  +        clarify.doc $RPM_BUILD_ROOT%{l_prefix}/share/dhrystone/clarify.txt
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
  +        '%doc %{l_prefix}/share/dhrystone/*.txt'
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to