Browse Source

allow Perl Glib bindings to build with and without thread support in Glib

master
parent
commit
880384d071
  1. 12
      perl-gtk/perl-gtk.patch
  2. 12
      perl-gtk/perl-gtk.spec

12
perl-gtk/perl-gtk.patch

@ -0,0 +1,12 @@
Index: Glib-1.113/Makefile.PL
--- Glib-1.113/Makefile.PL.orig 2005-10-18 18:39:44 +0200
+++ Glib-1.113/Makefile.PL 2006-01-02 16:28:17 +0100
@@ -112,6 +112,8 @@
# this will be inherited by dependant modules, so they can find their
# generated files.
$glib->set_inc ($glibcfg{cflags} . $gthreadcfg{cflags} . ' -I. ');
+$gthreadcfg{libs} =~ s/-pthread/-lpthread/sg;
+$gthreadcfg{libs} =~ s/(-lpthread)(.+)$/$2$1/s;
$glib->set_libs ($glibcfg{libs} . $gthreadcfg{libs});
my $cwd = cwd();
$glib->add_typemaps (map {File::Spec->catfile($cwd,$_)} 'typemap');

12
perl-gtk/perl-gtk.spec

@ -26,8 +26,8 @@
%define V_perl 5.8.7
%define V_gtk_perl 0.7009
%define V_cairo 0.02
%define V_glib 1.112
%define V_gtk2 1.112
%define V_glib 1.113
%define V_gtk2 1.113
# package information
Name: perl-gtk
@ -40,7 +40,7 @@ Class: PLUS
Group: Language
License: GPL/Artistic
Version: %{V_perl}
Release: 20051214
Release: 20060102
# package options
%option with_gtk1 yes
@ -51,6 +51,7 @@ Source0: http://www.cpan.org/modules/by-module/Gtk/Gtk-Perl-%{V_gtk_perl}.t
Source1: http://osdn.dl.sourceforge.net/sourceforge/gtk2-perl/Cairo-%{V_cairo}.tar.gz
Source2: http://osdn.dl.sourceforge.net/sourceforge/gtk2-perl/Glib-%{V_glib}.tar.gz
Source3: http://osdn.dl.sourceforge.net/sourceforge/gtk2-perl/Gtk2-%{V_gtk2}.tar.gz
Patch0: perl-gtk.patch
# build information
Prefix: %{l_prefix}
@ -62,8 +63,8 @@ BuildPreReq: gtk, perl-xml
PreReq: gtk, perl-xml
%endif
%if "%{with_gtk2}" == "yes"
BuildPreReq: perl-module, perl-xml >= %{V_perl}-20030920, glib2::with_threads = no, gtk2, pango, atk, cairo
PreReq: perl-module, perl-xml >= %{V_perl}-20030920, glib2::with_threads = no, gtk2, pango, atk, cairo
BuildPreReq: perl-module, perl-xml >= %{V_perl}-20030920, gtk2, pango, atk, cairo
PreReq: perl-module, perl-xml >= %{V_perl}-20030920, gtk2, pango, atk, cairo
%endif
AutoReq: no
AutoReqProv: no
@ -106,6 +107,7 @@ AutoReqProv: no
%setup -q -T -D -a 1
%setup -q -T -D -a 2
%setup -q -T -D -a 3
%patch -p0
%build

Loading…
Cancel
Save