Import package vendor original specs for necessary manipulations.

Tue, 28 Aug 2012 18:34:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:34:00 +0200
changeset 564
afdc12167a56
parent 563
e39a632d12f7
child 565
f6dc17424a45

Import package vendor original specs for necessary manipulations.

libidn/libidn.patch file | annotate | diff | comparison | revisions
libidn/libidn.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libidn/libidn.patch	Tue Aug 28 18:34:00 2012 +0200
     1.3 @@ -0,0 +1,91 @@
     1.4 +Index: configure
     1.5 +--- configure.orig	2012-05-23 10:36:44.000000000 +0200
     1.6 ++++ configure	2012-05-29 09:37:30.000000000 +0200
     1.7 +@@ -4984,10 +4984,7 @@
     1.8 + if $ac_preproc_ok; then :
     1.9 + 
    1.10 + else
    1.11 +-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    1.12 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    1.13 +-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
    1.14 +-See \`config.log' for more details" "$LINENO" 5; }
    1.15 ++    :
    1.16 + fi
    1.17 + 
    1.18 + ac_ext=c
    1.19 +Index: contrib/doxygen/Doxyfile
    1.20 +Index: gl/error.c
    1.21 +--- gl/error.c.orig	2012-04-27 10:18:42.000000000 +0200
    1.22 ++++ gl/error.c	2012-05-29 09:37:03.000000000 +0200
    1.23 +@@ -28,7 +28,7 @@
    1.24 + #include <stdlib.h>
    1.25 + #include <string.h>
    1.26 + 
    1.27 +-#if !_LIBC && ENABLE_NLS
    1.28 ++#if !_LIBC && defined(ENABLE_NLS)
    1.29 + # include "gettext.h"
    1.30 + # define _(msgid) gettext (msgid)
    1.31 + #endif
    1.32 +Index: gl/gettext.h
    1.33 +--- gl/gettext.h.orig	2012-04-27 10:18:42.000000000 +0200
    1.34 ++++ gl/gettext.h	2012-05-29 09:37:03.000000000 +0200
    1.35 +@@ -19,7 +19,7 @@
    1.36 + #define _LIBGETTEXT_H 1
    1.37 + 
    1.38 + /* NLS can be disabled through the configure --disable-nls option.  */
    1.39 +-#if ENABLE_NLS
    1.40 ++#ifdef ENABLE_NLS
    1.41 + 
    1.42 + /* Get declarations of GNU message catalog functions.  */
    1.43 + # include <libintl.h>
    1.44 +Index: lib/gl/gettext.h
    1.45 +--- lib/gl/gettext.h.orig	2012-04-27 10:18:42.000000000 +0200
    1.46 ++++ lib/gl/gettext.h	2012-05-29 09:37:03.000000000 +0200
    1.47 +@@ -19,7 +19,7 @@
    1.48 + #define _LIBGETTEXT_H 1
    1.49 + 
    1.50 + /* NLS can be disabled through the configure --disable-nls option.  */
    1.51 +-#if ENABLE_NLS
    1.52 ++#ifdef ENABLE_NLS
    1.53 + 
    1.54 + /* Get declarations of GNU message catalog functions.  */
    1.55 + # include <libintl.h>
    1.56 +Index: lib/gl/stdint.in.h
    1.57 +--- lib/gl/stdint.in.h.orig	2012-05-22 19:55:38.000000000 +0200
    1.58 ++++ lib/gl/stdint.in.h	2012-05-29 09:37:03.000000000 +0200
    1.59 +@@ -105,7 +105,7 @@
    1.60 + # include <sys/inttypes.h>
    1.61 + #endif
    1.62 + 
    1.63 +-#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
    1.64 ++#if (@HAVE_SYS_BITYPES_H@ + 0) && ! defined __BIT_TYPES_DEFINED__
    1.65 +   /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
    1.66 +      int{8,16,32,64}_t and __BIT_TYPES_DEFINED__.  In libc5 >= 5.2.2 it is
    1.67 +      included by <sys/types.h>.  */
    1.68 +@@ -535,7 +535,7 @@
    1.69 + #  define SIZE_MAX  _STDINT_MAX (0, 32, 0ul)
    1.70 + # endif
    1.71 + #else
    1.72 +-# define SIZE_MAX  _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
    1.73 ++# define SIZE_MAX  _STDINT_MAX (0, sizeof(size_t)*8, 0@SIZE_T_SUFFIX@)
    1.74 + #endif
    1.75 + 
    1.76 + /* wchar_t limits */
    1.77 +Index: lib/stringprep.c
    1.78 +--- lib/stringprep.c.orig	2012-04-27 12:48:08.000000000 +0200
    1.79 ++++ lib/stringprep.c	2012-05-29 09:37:03.000000000 +0200
    1.80 +@@ -33,6 +33,14 @@
    1.81 + 
    1.82 + #include <stdlib.h>
    1.83 + #include <string.h>
    1.84 ++#include <limits.h>
    1.85 ++
    1.86 ++#undef size_t
    1.87 ++#if 0
    1.88 ++#ifndef SIZE_MAX
    1.89 ++#define SIZE_MAX ((((size_t)1)<<(sizeof(size_t)*8))-1)
    1.90 ++#endif
    1.91 ++#endif
    1.92 + 
    1.93 + #include "stringprep.h"
    1.94 + 
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/libidn/libidn.spec	Tue Aug 28 18:34:00 2012 +0200
     2.3 @@ -0,0 +1,109 @@
     2.4 +##
     2.5 +##  libidn.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2012 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:         libidn
    2.29 +Summary:      International Domain Name (IDN) Library
    2.30 +URL:          http://www.gnu.org/software/libidn/
    2.31 +Vendor:       Simon Josefsson
    2.32 +Packager:     OpenPKG Foundation e.V.
    2.33 +Distribution: OpenPKG Community
    2.34 +Class:        BASE
    2.35 +Group:        DNS
    2.36 +License:      LGPL
    2.37 +Version:      1.25
    2.38 +Release:      20120529
    2.39 +
    2.40 +#   list of sources
    2.41 +Source0:      ftp://ftp.gnu.org/pub/gnu/libidn/libidn-%{version}.tar.gz
    2.42 +Patch0:       libidn.patch
    2.43 +
    2.44 +#   build information
    2.45 +BuildPreReq:  OpenPKG, openpkg >= 20100101
    2.46 +PreReq:       OpenPKG, openpkg >= 20100101
    2.47 +BuildPreReq:  libiconv
    2.48 +PreReq:       libiconv
    2.49 +
    2.50 +%description
    2.51 +    GNU Libidn is an implementation of the Stringprep, Punycode and
    2.52 +    IDNA specifications defined by the IETF Internationalized Domain
    2.53 +    Names (IDN) working group, used for internationalized domain names.
    2.54 +    The library contains a generic Stringprep implementation that
    2.55 +    does Unicode 3.2 NFKC normalization, mapping and prohibitation of
    2.56 +    characters, and bidirectional character handling. Profiles for
    2.57 +    iSCSI, Kerberos 5, Nameprep, SASL and XMPP are included. Punycode
    2.58 +    and ASCII Compatible Encoding (ACE) via IDNA are supported. The
    2.59 +    Stringprep API consists of two main functions, one for converting
    2.60 +    data from the system's native representation into UTF-8, and
    2.61 +    one function to perform the Stringprep processing. Adding a
    2.62 +    new Stringprep profile for your application within the API is
    2.63 +    straightforward. The Punycode API consists of one encoding function
    2.64 +    and one decoding function. The IDNA API consists of the ToASCII
    2.65 +    and ToUnicode functions, as well as an high-level interface for
    2.66 +    converting entire domain names to and from the ACE encoded form.
    2.67 +
    2.68 +%track
    2.69 +    prog libidn = {
    2.70 +        version   = %{version}
    2.71 +        url       = ftp://ftp.gnu.org/pub/gnu/libidn/
    2.72 +        regex     = libidn-(__VER__)\.tar\.gz
    2.73 +    }
    2.74 +
    2.75 +%prep
    2.76 +    %setup -q
    2.77 +    %patch -p0
    2.78 +    %{l_shtool} subst \
    2.79 +        -e 's;^\(SUBDIRS = .*\) doc \(.*\)$;\1 \2;' \
    2.80 +        Makefile.in
    2.81 +    %{l_shtool} subst \
    2.82 +        -e 's;^\(Libs: -L${libdir} -lidn\)$;\1 @LTLIBICONV@;' \
    2.83 +        libidn.pc.in
    2.84 +
    2.85 +%build
    2.86 +    CC="%{l_cc}" \
    2.87 +    CFLAGS="%{l_cflags -O}" \
    2.88 +    CPPFLAGS="%{l_cppflags}" \
    2.89 +    LDFLAGS="%{l_ldflags}" \
    2.90 +    MAKEINFO="true" \
    2.91 +    GREP=grep \
    2.92 +    ./configure \
    2.93 +        --prefix=%{l_prefix} \
    2.94 +        --includedir=%{l_prefix}/include/libidn \
    2.95 +        --with-libiconv-prefix=%{l_prefix} \
    2.96 +        --disable-shared \
    2.97 +        --disable-nls
    2.98 +    %{l_make} %{l_mflags -O}
    2.99 +
   2.100 +%install
   2.101 +    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   2.102 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   2.103 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   2.104 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/emacs
   2.105 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/Libidn.dll
   2.106 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   2.107 +        %{l_files_std}
   2.108 +
   2.109 +%files -f files
   2.110 +
   2.111 +%clean
   2.112 +

mercurial