Import package vendor original specs for necessary manipulations.

Fri, 22 Oct 2010 13:22:33 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 22 Oct 2010 13:22:33 +0200
changeset 271
f45355418dfd
parent 270
42bbe3abe794
child 272
f96f4c1a2d1a

Import package vendor original specs for necessary manipulations.

gettext/gettext.patch file | annotate | diff | comparison | revisions
gettext/gettext.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gettext/gettext.patch	Fri Oct 22 13:22:33 2010 +0200
     1.3 @@ -0,0 +1,25 @@
     1.4 +Index: gettext-runtime/intl/plural-exp.c
     1.5 +--- gettext-runtime/intl/plural-exp.c.orig	2009-06-28 21:44:04.000000000 +0200
     1.6 ++++ gettext-runtime/intl/plural-exp.c	2010-05-10 08:51:14.000000000 +0200
     1.7 +@@ -27,7 +27,7 @@
     1.8 + 
     1.9 + #include "plural-exp.h"
    1.10 + 
    1.11 +-#if (defined __GNUC__ && !(__APPLE_CC__ > 1) && !defined __cplusplus) \
    1.12 ++#if (defined __GNUC__ && !(__APPLE_CC__+0 > 1) && !defined __cplusplus) \
    1.13 +     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
    1.14 + 
    1.15 + /* These structs are the constant expression for the germanic plural
    1.16 +Index: gettext-tools/gnulib-lib/execute.c
    1.17 +--- gettext-tools/gnulib-lib/execute.c.orig	2010-02-16 22:32:17.000000000 +0100
    1.18 ++++ gettext-tools/gnulib-lib/execute.c	2010-05-10 20:22:18.000000000 +0200
    1.19 +@@ -200,6 +200,9 @@
    1.20 +      subprocess to exit with return code 127.  It is implementation
    1.21 +      dependent which error is reported which way.  We treat both cases as
    1.22 +      equivalent.  */
    1.23 ++#ifndef HAVE_ENVIRON_DECL
    1.24 ++  extern char **environ;
    1.25 ++#endif
    1.26 +   sigset_t blocked_signals;
    1.27 +   posix_spawn_file_actions_t actions;
    1.28 +   bool actions_allocated;
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/gettext/gettext.spec	Fri Oct 22 13:22:33 2010 +0200
     2.3 @@ -0,0 +1,139 @@
     2.4 +##
     2.5 +##  gettext.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package information
    2.28 +Name:         gettext
    2.29 +Summary:      GNU National Language Support (NLS) Toolkit
    2.30 +URL:          http://www.gnu.org/software/gettext/
    2.31 +Vendor:       Free Software Foundation
    2.32 +Packager:     OpenPKG Foundation e.V.
    2.33 +Distribution: OpenPKG Community
    2.34 +Class:        BASE
    2.35 +Group:        Charset
    2.36 +License:      GPL
    2.37 +Version:      0.18.1.1
    2.38 +Release:      20100607
    2.39 +
    2.40 +#   list of sources
    2.41 +Source0:      ftp://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.gz
    2.42 +Patch0:       gettext.patch
    2.43 +
    2.44 +#   build information
    2.45 +BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, make, automake
    2.46 +PreReq:       OpenPKG, openpkg >= 20100101
    2.47 +BuildPreReq:  libiconv
    2.48 +PreReq:       libiconv
    2.49 +
    2.50 +%description
    2.51 +    Gettext is the GNU toolkit for National Language Support (NLS).
    2.52 +
    2.53 +%track
    2.54 +    prog gettext = {
    2.55 +        version   = %{version}
    2.56 +        url       = ftp://ftp.gnu.org/gnu/gettext/
    2.57 +        regex     = gettext-(__VER__)\.tar\.gz
    2.58 +    }
    2.59 +
    2.60 +%prep
    2.61 +    %setup -q
    2.62 +    %patch -p0
    2.63 +
    2.64 +%build
    2.65 +    #   strip Automake version numbers from binaries
    2.66 +    %{l_shtool} subst \
    2.67 +        -e 's;-${am__api_version};;g' \
    2.68 +        `find . -name configure -print`
    2.69 +
    2.70 +    #   remove part that conflicts with libiconv
    2.71 +    %{l_shtool} subst \
    2.72 +        -e '/localcharset.\$lo/d' \
    2.73 +        gettext-runtime/intl/Makefile.in
    2.74 +    %{l_shtool} subst \
    2.75 +        -e 's;\(SUBDIRS.*=.*\)intl-java ;\1;' \
    2.76 +        -e 's;\(SUBDIRS.*=.*\)intl-csharp ;\1;' \
    2.77 +         gettext-runtime/Makefile.in
    2.78 +    %{l_shtool} subst \
    2.79 +        -e 's;^.*intl-java/Makefile.*$;;' \
    2.80 +        -e 's;^.*intl-csharp/Makefile.*$;;' \
    2.81 +        gettext-runtime/configure
    2.82 +
    2.83 +    #   disable a few parts from building
    2.84 +    %{l_shtool} subst \
    2.85 +        -e 's;@BUILDJAVA@;no;g' \
    2.86 +        -e 's;@BUILDJAVAEXE@;no;g' \
    2.87 +        -e 's;@BUILDCSHARP@;no;g' \
    2.88 +        gettext-tools/src/Makefile.in
    2.89 +    %{l_shtool} subst \
    2.90 +        -e 's;^\(SUBDIRS =.*\)tests gnulib-tests examples;\1;' \
    2.91 +        gettext-tools/Makefile.in
    2.92 +    %{l_shtool} subst \
    2.93 +        -e 's;\#if USEJEXE;#ifdef USEJEXE;' \
    2.94 +        gettext-tools/src/read-java.c \
    2.95 +        gettext-tools/src/urlget.c
    2.96 +
    2.97 +    #   configure toolkit
    2.98 +    CC="%{l_cc}" \
    2.99 +    CFLAGS="%{l_cflags -O}" \
   2.100 +    CPPFLAGS="%{l_cppflags}" \
   2.101 +    LDFLAGS="%{l_ldflags}" \
   2.102 +    GREP="grep" \
   2.103 +    ./configure \
   2.104 +        --prefix=%{l_prefix} \
   2.105 +        --datarootdir=%{l_prefix}/share \
   2.106 +        --mandir=%{l_prefix}/man \
   2.107 +        --infodir=%{l_prefix}/info \
   2.108 +        --with-libiconv-prefix=%{l_prefix} \
   2.109 +        --with-included-gettext \
   2.110 +        --without-libexpat-prefix \
   2.111 +        --disable-libasprintf \
   2.112 +        --disable-csharp \
   2.113 +        --disable-java \
   2.114 +        --disable-shared
   2.115 +
   2.116 +    #   build toolkit
   2.117 +    %{l_make} %{l_mflags}
   2.118 +
   2.119 +%install
   2.120 +
   2.121 +    #   install toolkit
   2.122 +    %{l_make} %{l_mflags} install \
   2.123 +        AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
   2.124 +        DESTDIR=$RPM_BUILD_ROOT
   2.125 +
   2.126 +    #   strip down installation
   2.127 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   2.128 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
   2.129 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gettext/projects
   2.130 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   2.131 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
   2.132 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
   2.133 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libgettext*.la
   2.134 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   2.135 +
   2.136 +    #   determine installation files
   2.137 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   2.138 +
   2.139 +%files -f files
   2.140 +
   2.141 +%clean
   2.142 +

mercurial