Import package vendor original specs for necessary manipulations.

Fri, 22 Oct 2010 13:29:57 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 22 Oct 2010 13:29:57 +0200
changeset 273
ea0bfdfbb4ad
parent 272
f96f4c1a2d1a
child 274
645efd5487b2

Import package vendor original specs for necessary manipulations.

glib2/glib2.patch file | annotate | diff | comparison | revisions
glib2/glib2.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/glib2/glib2.patch	Fri Oct 22 13:29:57 2010 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +Index: configure
     1.5 +--- configure.orig	2010-03-16 03:52:21.000000000 +0100
     1.6 ++++ configure	2010-03-17 20:07:17.000000000 +0100
     1.7 +@@ -25810,7 +25810,7 @@
     1.8 + 	      add_thread_lib="-l$thread_lib"
     1.9 + 	      IN=" in -l$thread_lib"
    1.10 + 	    fi
    1.11 +-	    LIBS="$add_thread_lib $glib_save_LIBS"
    1.12 ++	    LIBS="$add_thread_lib `echo x$glib_save_LIBS | sed -e 's;^x;;' -e 's;-lrt;;'`"
    1.13 + 
    1.14 +             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_get_priority_min$IN" >&5
    1.15 + $as_echo_n "checking for sched_get_priority_min$IN... " >&6; }
    1.16 +Index: glib-2.0.pc.in
    1.17 +--- glib-2.0.pc.in.orig	2009-04-01 01:04:20.000000000 +0200
    1.18 ++++ glib-2.0.pc.in	2010-03-17 20:07:17.000000000 +0100
    1.19 +@@ -9,6 +9,7 @@
    1.20 + 
    1.21 + Name: GLib
    1.22 + Description: C Utility Library
    1.23 ++Requires: libpcre
    1.24 + Version: @VERSION@
    1.25 + Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
    1.26 + Libs.private: @ICONV_LIBS@
    1.27 +Index: gmodule/gmodule-dl.c
    1.28 +--- gmodule/gmodule-dl.c.orig	2009-04-01 01:04:20.000000000 +0200
    1.29 ++++ gmodule/gmodule-dl.c	2010-03-17 20:07:17.000000000 +0100
    1.30 +@@ -107,6 +107,7 @@
    1.31 + static gpointer
    1.32 + _g_module_self (void)
    1.33 + {
    1.34 ++#ifndef __FreeBSD__
    1.35 +   gpointer handle;
    1.36 +   
    1.37 +   /* to query symbols from the program itself, special link options
    1.38 +@@ -118,6 +119,9 @@
    1.39 +     g_module_set_error (fetch_dlerror (TRUE));
    1.40 +   
    1.41 +   return handle;
    1.42 ++#else
    1.43 ++  return RTLD_DEFAULT;
    1.44 ++#endif
    1.45 + }
    1.46 + 
    1.47 + static void
    1.48 +Index: tests/errorcheck-mutex-test.c
    1.49 +--- tests/errorcheck-mutex-test.c.orig	2009-04-01 01:04:20.000000000 +0200
    1.50 ++++ tests/errorcheck-mutex-test.c	2010-03-17 20:07:17.000000000 +0100
    1.51 +@@ -1,3 +1,5 @@
    1.52 ++#ifdef G_THREADS_ENABLED
    1.53 ++
    1.54 + #undef G_DISABLE_ASSERT
    1.55 + #undef G_LOG_DOMAIN
    1.56 + #define G_ERRORCHECK_MUTEXES
    1.57 +@@ -102,9 +104,12 @@
    1.58 +    timed_wait_on_otherwise_locked_mutex}
    1.59 + };
    1.60 + 
    1.61 ++#endif
    1.62 ++
    1.63 + int
    1.64 + main (int argc, char* argv[])
    1.65 + {
    1.66 ++#ifdef G_THREADS_ENABLED
    1.67 +   int i;
    1.68 + 
    1.69 +   if (argc == 2)
    1.70 +@@ -126,6 +131,7 @@
    1.71 +     {
    1.72 +       fprintf (stderr, "      %s\n", func_table[i].name);
    1.73 +     }
    1.74 ++#endif
    1.75 + 
    1.76 +   return 0;
    1.77 + }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/glib2/glib2.spec	Fri Oct 22 13:29:57 2010 +0200
     2.3 @@ -0,0 +1,160 @@
     2.4 +##
     2.5 +##  glib2.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 version
    2.28 +%define       V_glib2_major  2.25
    2.29 +%define       V_glib2_minor  13
    2.30 +
    2.31 +#   package information
    2.32 +Name:         glib2
    2.33 +Summary:      The Gtk Utility Library
    2.34 +URL:          http://www.gtk.org/
    2.35 +Vendor:       The Gtk Project
    2.36 +Packager:     OpenPKG Foundation e.V.
    2.37 +Distribution: OpenPKG Community
    2.38 +Class:        BASE
    2.39 +Group:        Algorithm
    2.40 +License:      GPL
    2.41 +Version:      %{V_glib2_major}.%{V_glib2_minor}
    2.42 +Release:      20100807
    2.43 +
    2.44 +#   package options
    2.45 +%option       with_threads  yes
    2.46 +
    2.47 +#   list of sources
    2.48 +Source0:      ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/glib-%{version}.tar.gz
    2.49 +Patch0:       glib2.patch
    2.50 +
    2.51 +#   build information
    2.52 +BuildPreReq:  OpenPKG, openpkg >= 20100101, perl, make, pkgconfig
    2.53 +PreReq:       OpenPKG, openpkg >= 20100101, perl
    2.54 +BuildPreReq:  gettext, libiconv, pcre, pcre::with_utf8 = yes
    2.55 +PreReq:       gettext, libiconv, pcre, pcre::with_utf8 = yes
    2.56 +
    2.57 +%description
    2.58 +    GLib is the low-level core library that originally was split out
    2.59 +    from Gtk+. It provides data structure handling for C, portability
    2.60 +    wrappers, and interfaces for such runtime functionality as an event
    2.61 +    loop, threads, dynamic loading, and an object system.
    2.62 +
    2.63 +%track
    2.64 +    prog glib2 = {
    2.65 +        version   = %{version}
    2.66 +        url       = ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/
    2.67 +        regex     = glib-(__VER__)\.tar\.(gz|bz2)
    2.68 +    }
    2.69 +
    2.70 +%prep
    2.71 +    %setup -q -n glib-%{version}
    2.72 +    %patch -p0
    2.73 +
    2.74 +%build
    2.75 +    #   configure package
    2.76 +    %{l_shtool} subst \
    2.77 +        -e 's;\$export_dynamic_flag_spec;;g' \
    2.78 +        -e 's;eval echo \\\\;eval echo ;' \
    2.79 +        configure
    2.80 +    %{l_shtool} subst \
    2.81 +        -e 's;/glib-2\.0\.pc;/glib-x.x.pc;g' \
    2.82 +        -e 's;/gobject-2\.0\.pc;/gobject-x.x.pc;g' \
    2.83 +        -e 's;/gthread-2\.0\.pc;/gthread-x.x.pc;g' \
    2.84 +        -e 's;/gmodule-2\.0\.pc;/gmodule-x.x.pc;g' \
    2.85 +        -e 's;/gio-unix-2\.0\.pc;/gio-unix-x.x.pc;g' \
    2.86 +        -e 's;/gio-2\.0\.pc;/gio-x.x.pc;g' \
    2.87 +        -e 's;/glib-2\.0;/glib2;g' \
    2.88 +        -e 's;/gobject-2\.0;/gobject2;g' \
    2.89 +        -e 's;/gthread-2\.0;/gthread2;g' \
    2.90 +        -e 's;/gmodule-2\.0;/gmodule2;g' \
    2.91 +        -e 's;/gio-unix-2\.0;/gio-unix2;g' \
    2.92 +        -e 's;/gio-2\.0;/gio2;g' \
    2.93 +        -e 's;/glib-x\.x\.pc;/glib-2.0.pc;g' \
    2.94 +        -e 's;/gobject-x\.x\.pc;/gobject-2.0.pc;g' \
    2.95 +        -e 's;/gthread-x\.x\.pc;/gthread-2.0.pc;g' \
    2.96 +        -e 's;/gmodule-x\.x\.pc;/gmodule-2.0.pc;g' \
    2.97 +        -e 's;/gio-unix-x\.x\.pc;/gio-unix-2.0.pc;g' \
    2.98 +        -e 's;/gio-x\.x\.pc;/gio-2.0.pc;g' \
    2.99 +        -e 's;lib\(g[a-z]*\)-2\.0;lib\12;g' \
   2.100 +        `find . -name Makefile.in -print` \
   2.101 +        m4macros/glib-2.0.m4
   2.102 +    %{l_shtool} subst \
   2.103 +        -e 's;/glib-2\.0;/glib2;g' \
   2.104 +        -e 's;/gobject-2\.0;/gobject2;g' \
   2.105 +        -e 's;/gthread-2\.0;/gthread2;g' \
   2.106 +        -e 's;/gmodule-2\.0;/gmodule2;g' \
   2.107 +        -e 's;/gio-unix-2\.0;/gio-unix2;g' \
   2.108 +        -e 's;/gio-2\.0;/gio2;g' \
   2.109 +        -e 's;-l\(g[a-z]*\)-2\.0;-l\12;g' \
   2.110 +        *-2.0.pc.in
   2.111 +    libs=""
   2.112 +%if "%{with_threads}" == "yes"
   2.113 +    case "%{l_platform -t}" in
   2.114 +        *-netbsd*  ) libs="-lpthread" ;;
   2.115 +    esac
   2.116 +%endif
   2.117 +    CC="%{l_cc}" \
   2.118 +    CFLAGS="%{l_cflags -O}" \
   2.119 +    CPPFLAGS="%{l_cppflags}" \
   2.120 +    LDFLAGS="%{l_ldflags}" \
   2.121 +    LIBS="$libs" \
   2.122 +    PERL="%{l_prefix}/bin/perl" \
   2.123 +    PERL_PATH="%{l_prefix}/bin/perl" \
   2.124 +    GREP="grep" \
   2.125 +    ./configure \
   2.126 +        --prefix=%{l_prefix} \
   2.127 +        --mandir=%{l_prefix}/man \
   2.128 +        --with-libiconv=gnu \
   2.129 +        --disable-debug \
   2.130 +        --disable-shared \
   2.131 +        --with-pcre=system \
   2.132 +%if "%{with_threads}" == "yes"
   2.133 +        --enable-threads \
   2.134 +%else
   2.135 +        --disable-threads \
   2.136 +%endif
   2.137 +        --disable-gtk-doc \
   2.138 +        --disable-dtrace
   2.139 +
   2.140 +    #   build package
   2.141 +    %{l_make} %{l_mflags}
   2.142 +
   2.143 +%install
   2.144 +    #   install package
   2.145 +    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   2.146 +
   2.147 +    #   strip down installation
   2.148 +    rm -f  $RPM_BUILD_ROOT%{l_prefix}/info/dir
   2.149 +    rm -f  $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
   2.150 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   2.151 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/glib-2.0
   2.152 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gtk-doc
   2.153 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gdb
   2.154 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   2.155 +    rm $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
   2.156 +
   2.157 +    #   determine installation files
   2.158 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   2.159 +
   2.160 +%files -f files
   2.161 +
   2.162 +%clean
   2.163 +

mercurial