[perl-Glib-Object-Introspection] Import after Fedora review (rhbz #754749)
Daniel P. Berrange
berrange at fedoraproject.org
Fri Nov 25 10:22:31 UTC 2011
commit 4681ffb7d7f83b0170a867d52d212efa077a0c8d
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Fri Nov 25 10:22:18 2011 +0000
Import after Fedora review (rhbz #754749)
.gitignore | 4 ++
Glib-Object-Introspection-0.004-fpic.patch | 21 ++++++++
perl-Glib-Object-Introspection.spec | 77 ++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 103 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d41673b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.gz
+*.rpm
+.build*.log
+x86_64
diff --git a/Glib-Object-Introspection-0.004-fpic.patch b/Glib-Object-Introspection-0.004-fpic.patch
new file mode 100644
index 0000000..1eded9c
--- /dev/null
+++ b/Glib-Object-Introspection-0.004-fpic.patch
@@ -0,0 +1,21 @@
+diff -rup Glib-Object-Introspection-0.004.orig/Makefile.PL Glib-Object-Introspection-0.004.new/Makefile.PL
+--- Glib-Object-Introspection-0.004.orig/Makefile.PL 2011-11-18 17:40:22.000000000 +0000
++++ Glib-Object-Introspection-0.004.new/Makefile.PL 2011-11-23 14:04:09.981141425 +0000
+@@ -116,7 +116,7 @@ sub compile_test_libraries {
+ my %glib_flags = ExtUtils::PkgConfig->find ('glib-2.0');
+
+ # FIXME: Why is --no-as-needed necessary?
+- !system (qq(gcc -shared -Wl,--no-as-needed -g \\
++ !system (qq(gcc -shared -fPIC -Wl,--no-as-needed -g \\
+ $cairo_flags{cflags} $cairo_flags{libs} \\
+ $gio_flags{cflags} $gio_flags{libs} \\
+ $testsdir/regress.c \\
+@@ -132,7 +132,7 @@ sub compile_test_libraries {
+ 1>/dev/null 2>/dev/null))
+ && !system (qq(g-ir-compiler Regress-1.0.gir -o Regress-1.0.typelib \\
+ 1>/dev/null 2>/dev/null))
+- && !system (qq(gcc -shared -g \\
++ && !system (qq(gcc -shared -fPIC -g \\
+ $glib_flags{cflags} $glib_flags{libs} \\
+ $testsdir/gimarshallingtests.c \\
+ -o libgimarshallingtests.so 1>/dev/null 2>/dev/null))
diff --git a/perl-Glib-Object-Introspection.spec b/perl-Glib-Object-Introspection.spec
new file mode 100644
index 0000000..25d6784
--- /dev/null
+++ b/perl-Glib-Object-Introspection.spec
@@ -0,0 +1,77 @@
+
+Name: perl-Glib-Object-Introspection
+Version: 0.004
+Release: 1%{?dist}
+Summary: Dynamically create Perl language bindings
+License: LGPLv2+
+Group: Development/Libraries
+URL: http://search.cpan.org/dist/Glib-Object-Introspection/
+Source0: http://www.cpan.org/modules/by-module/Glib/Glib-Object-Introspection-%{version}.tar.gz
+# Test suite must include -fPIC otherwise it'll fail to build
+Patch1: Glib-Object-Introspection-%{version}-fpic.patch
+BuildRequires: perl(ExtUtils::Depends) >= 0.3
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(ExtUtils::PkgConfig) >= 1
+BuildRequires: perl(Glib) >= 1.24
+BuildRequires: perl(Glib::MakeHelper)
+BuildRequires: gobject-introspection-devel
+BuildRequires: perl(Test::More)
+# For the test suite
+BuildRequires: cairo-gobject-devel
+Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: perl(ExtUtils::Depends) >= 0.3
+Requires: perl(ExtUtils::PkgConfig) >= 1
+Requires: perl(Glib) >= 1.24
+
+%{?perl_default_filter}
+
+%description
+Glib::Object::Introspection uses the gobject-introspection and libffi projects
+to dynamically create Perl bindings for a wide variety of libraries. Examples
+include gtk+, webkit, libsoup and many more.
+
+
+%prep
+%setup -q -n Glib-Object-Introspection-%{version}
+%patch1 -p1
+
+%build
+# If LANG is not set to UTF8, then when later running the test
+# suite, you will see multiple failures handling UTF8 data
+LANG=en_US.UTF8 %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+LANG=en_US.UTF8 make %{?_smp_mflags}
+
+%install
+make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
+
+%{_fixperms} $RPM_BUILD_ROOT/*
+
+%check
+LANG=en_US.UTF8 make test
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE NEWS perl-Glib-Object-Introspection.doap README
+%{perl_vendorarch}/auto/*
+%{perl_vendorarch}/Glib*
+%{_mandir}/man3/*
+
+%changelog
+* Wed Nov 23 2011 Daniel P. Berrange <berrange at redhat.com> - 0.004-1
+- Import after Fedora review (rhbz #754749)
+- Update to 0.004
+- Add BR on cairo to ensure tests are built
+- Use custom perl filter for auto-provides
+- Fix license to be LGPLv2+
+
+* Mon Nov 21 2011 Daniel P. Berrange <berrange at redhat.com> - 0.003-2
+- Add missing BRs on Test::More Glib::MakeHelper & gobject-introspection-devel
+- Add requires on perl MODULE_COMPAT
+- Add comment about UTF8 requirement
+
+* Fri Nov 04 2011 Daniel P. Berrange <berrange at redhat.com> 0.003-1
+- Specfile autogenerated by cpanspec 1.78.
diff --git a/sources b/sources
index e69de29..54736dc 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+347eba738f14300095fabfcfc1216c0f Glib-Object-Introspection-0.004.tar.gz
More information about the scm-commits
mailing list