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:   08-Oct-2007 09:06:37
  Branch: HEAD                             Handle: 2007100808063700

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

  Log:
    new package: msort 8.42 (File Record Sorting)

  Summary:
    Revision    Changes     Path
    1.1         +184 -0     openpkg-src/msort/msort.patch
    1.1         +99 -0      openpkg-src/msort/msort.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/msort/msort.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 msort.patch
  --- /dev/null 2007-10-08 09:06:17 +0200
  +++ msort.patch       2007-10-08 09:06:37 +0200
  @@ -0,0 +1,184 @@
  +Index: compdefs.h
  +--- compdefs.h.orig  2007-03-23 04:51:52 +0100
  ++++ compdefs.h       2007-10-08 09:03:21 +0200
  +@@ -4,9 +4,6 @@
  + #if defined HAVE_LOCALE_H && defined HAVE_SETLOCALE && defined HAVE_WCSXFRM
  + #define LOCALE_SORT_ORDER
  + #endif
  +-#if defined HAVE_LOCALE_H && defined HAVE_SETLOCALE && defined 
HAVE_LIBINTL_H
  +-#define LOCALE_GETTEXT
  +-#endif
  + 
  + #if defined USEUNINUMOK && defined HAVE_UNINUM_NSDEFS_H && defined 
HAVE_UNINUM_UNINUM_H
  + #define USE_UNINUM
  +Index: configure
  +--- configure.orig   2007-10-05 12:10:50 +0200
  ++++ configure        2007-10-08 09:03:21 +0200
  +@@ -3051,7 +3051,7 @@
  +   echo $ECHO_N "(cached) $ECHO_C" >&6
  + else
  +   ac_check_lib_save_LIBS=$LIBS
  +-LIBS="-ltre  $LIBS"
  ++LIBS="-ltre -lutf8 $LIBS"
  + cat >conftest.$ac_ext <<_ACEOF
  + /* confdefs.h.  */
  + _ACEOF
  +@@ -3114,7 +3114,7 @@
  + #define HAVE_LIBTRE 1
  + _ACEOF
  + 
  +-  LIBS="-ltre $LIBS"
  ++  LIBS="-ltre -lutf8 $LIBS"
  + 
  + else
  +   { { echo "$as_me:$LINENO: error: libtre not found. see 
http://laurikari.net/tre/"; >&5
  +Index: conversions.c
  +--- conversions.c.orig       2007-10-05 10:59:19 +0200
  ++++ conversions.c    2007-10-08 09:03:21 +0200
  +@@ -23,7 +23,7 @@
  + #ifdef HAVE_STDINT_H
  + #include <stdint.h>
  + #endif
  +-#include <wchar.h>
  ++#include "utf8/wchar.h"
  + #include <stdio.h>
  + #ifdef HAVE_UNINUM_UNICODE_H
  + #include <uninum/unicode.h>
  +Index: dstr.c
  +--- dstr.c.orig      2007-10-05 10:59:22 +0200
  ++++ dstr.c   2007-10-08 09:03:21 +0200
  +@@ -24,7 +24,7 @@
  + #ifdef HAVE_STDINT_H
  + #include <stdint.h>
  + #endif
  +-#include <wchar.h>
  ++#include "utf8/wchar.h"
  + #ifdef HAVE_UNINUM_UNICODE_H
  + #include <uninum/unicode.h>
  + #else
  +Index: input.c
  +--- input.c.orig     2007-10-05 11:00:44 +0200
  ++++ input.c  2007-10-08 09:04:15 +0200
  +@@ -25,7 +25,7 @@
  + #ifdef HAVE_STDINT_H
  + #include <stdint.h>
  + #endif
  +-#include <wchar.h>
  ++#include "utf8/wchar.h"
  + #ifdef LOCALE_GETTEXT
  + #include <libintl.h>
  + #define _(x) gettext(x)
  +@@ -60,23 +60,23 @@
  +   switch (c)
  +     { 
  +     case UTF8_NOTENOUGHBYTES:
  +-      fprintf(fp,gettext("Truncated UTF-8 sequence encountered at record 
%ld, byte %ld.\n"),
  ++      fprintf(fp,_("Truncated UTF-8 sequence encountered at record %ld, 
byte %ld.\n"),
  +           RecordNumber, ByteCnt);
  +       exit(1);
  +       break;
  +     case UTF8_BADINCODE:
  +-      fprintf(fp,gettext("Invalid UTF-8 code encountered at record %ld, 
byte %ld.\n"),
  ++      fprintf(fp,_("Invalid UTF-8 code encountered at record %ld, byte 
%ld.\n"),
  +           RecordNumber, ByteCnt);
  +       ExplicateBadUTF8(fp,rp);
  +       exit(1);
  +       break;
  +     case UTF8_BADOUTCODE:
  +-      fprintf(fp,gettext("Encountered invalid Unicode at record %ld, byte 
%ld.\n"),
  ++      fprintf(fp,_("Encountered invalid Unicode at record %ld, byte 
%ld.\n"),
  +           RecordNumber, ByteCnt);
  +       exit(1);
  +       break;
  +     case UTF8_IOERROR:
  +-      snprintf(msg,MSGSIZE-1,gettext("Error reading input at record %ld, 
byte %ld.\n"),
  ++      snprintf(msg,MSGSIZE-1,_("Error reading input at record %ld, byte 
%ld.\n"),
  +            RecordNumber,ByteCnt);
  +       perror(msg);
  +       exit(1);
  +Index: misc.c
  +--- misc.c.orig      2007-10-05 11:01:30 +0200
  ++++ misc.c   2007-10-08 09:03:21 +0200
  +@@ -17,6 +17,7 @@
  +  */
  + 
  + #include "config.h"
  ++#include "utf8/wchar.h"
  + #include "compdefs.h"
  + #include <stdlib.h>
  + #ifdef HAVE_STDINT_H
  +@@ -34,7 +35,6 @@
  + #define _(x) (x)
  + #endif
  + #include <time.h>
  +-#include <wchar.h>
  + #include <errno.h>
  + #ifndef USEUTF8PROC
  + #include <unicode/umachine.h>
  +@@ -43,15 +43,15 @@
  + #include <utf8proc.h>
  + #include "unorm.h"
  + #endif
  +-#include <tre/regex.h>
  ++#include "tre/regex.h"
  + #include "key.h"
  + #ifdef HAVE_UNINUM_UNICODE_H
  + #include <uninum/unicode.h>
  ++#include <uninum/nsdefs.h>
  ++#include <uninum/uninum.h>
  + #else
  + #include "unicode.h"
  + #endif
  +-#include <uninum/nsdefs.h>
  +-#include <uninum/uninum.h>
  + #include "dstr.h"
  + #include "exitcode.h"
  + #include "retcodes.h"
  +Index: msort.c
  +--- msort.c.orig     2007-10-05 12:01:07 +0200
  ++++ msort.c  2007-10-08 09:03:21 +0200
  +@@ -50,7 +50,7 @@
  + #include <sys/file.h>
  + #include <sys/stat.h>
  + #include <wctype.h>
  +-#include <wchar.h>
  ++#include "utf8/wchar.h"
  + #include <time.h>
  + #include <errno.h>
  + #ifndef USEUTF8PROC
  +@@ -68,7 +68,7 @@
  + #include <uninum/nsdefs.h>
  + #include <uninum/uninum.h>
  + #endif
  +-#include <tre/regex.h>
  ++#include "tre/regex.h"
  + 
  + 
  + #ifdef HAVE_LONG_LONG
  +Index: sorts.c
  +--- sorts.c.orig     2007-10-05 11:02:36 +0200
  ++++ sorts.c  2007-10-08 09:03:21 +0200
  +@@ -24,9 +24,9 @@
  + #endif
  + #include <stdio.h>
  + #include <string.h>
  +-#include <wchar.h>
  ++#include "utf8/wchar.h"
  + #include <wctype.h>
  +-#include <tre/regex.h>
  ++#include "tre/regex.h"
  + #ifdef HAVE_UNINUM_UNICODE_H
  + #include <uninum/unicode.h>
  + #else
  +Index: strs.c
  +--- strs.c.orig      2007-10-05 11:02:14 +0200
  ++++ strs.c   2007-10-08 09:03:21 +0200
  +@@ -25,7 +25,7 @@
  + #include <stdio.h>
  + #include <string.h>
  + #include <stdio.h>
  +-#include <wchar.h>
  ++#include "utf8/wchar.h"
  + #ifdef HAVE_UNINUM_UNICODE_H
  + #include <uninum/unicode.h>
  + #else
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/msort/msort.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 msort.spec
  --- /dev/null 2007-10-08 09:06:17 +0200
  +++ msort.spec        2007-10-08 09:06:37 +0200
  @@ -0,0 +1,99 @@
  +##
  +##  msort.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 information
  +Name:         msort
  +Summary:      File Record Sorting
  +URL:          http://billposer.org/Software/msort.html
  +Vendor:       Bill Poser
  +Packager:     OpenPKG Foundation e.V.
  +Distribution: OpenPKG Community
  +Class:        EVAL
  +Group:        ShellUtils
  +License:      GPL
  +Version:      8.42
  +Release:      20071008
  +
  +#   list of sources
  +Source0:      http://billposer.org/Software/Downloads/msort-%{version}.tar.gz
  +Patch0:       msort.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc
  +PreReq:       OpenPKG, openpkg >= 20040130
  +BuildPreReq:  libutf8, libutf8proc, tre, tre::with_utf8 = yes
  +PreReq:       libutf8, libutf8proc, tre, tre::with_utf8 = yes
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    msort(1) is a program for sorting files in sophisticated ways. It
  +    was originally developed for alphabetizing dictionaries of "exotic"
  +    languages, for which it has been extensively used, but is useful for
  +    many other purposes. msort(1) differs from typical sort(1) utilities
  +    in providing greater flexibility in parsing the input into records
  +    and identifying key fields and greater control over the sort order.
  +
  +%track
  +    prog msort = {
  +        version   = %{version}
  +        url       = http://billposer.org/Software/msort.html
  +        regex     = msort-(__VER__)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q
  +    %patch -p0
  +
  +%build
  +    ( echo "ac_cv_header_libintl_h=no"
  +    ) >config.cache
  +    export CC="%{l_cc}"
  +    export CFLAGS="%{l_cflags -O}"
  +    export CPPFLAGS="%{l_cppflags}"
  +    export LDFLAGS="%{l_ldflags}"
  +    CFLAGS="$CFLAGS `pkg-config tre --cflags-only-other`"
  +    CPPFLAGS="$CPPFLAGS `pkg-config tre --cflags-only-I`"
  +    LDFLAGS="$LDFLAGS `pkg-config tre --libs-only-L`"
  +    LIBS="$LIBS `pkg-config tre --libs-only-l`"
  +    ./configure \
  +        --cache-file=./config.cache \
  +        --prefix=%{l_prefix} \
  +        --disable-uninum \
  +        --disable-allocaok
  +    %{l_make} %{l_mflags -O}
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  +    %{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