2009-08-31 Halton Huo <[email protected]>
authorhalton
Mon, 31 Aug 2009 10:26:48 +0000
changeset 16424 5252dcba3f38
parent 16423 5982563a6968
child 16425 d6ed2a48e85f
2009-08-31 Halton Huo <[email protected]> * SUNWgobject-introspection.spec: Enable 64 bit build * base-specs/gobject-introspection.spec: Add patch3 * patches/gobject-introspection-03-64bit.diff: Added to fix 64 bit build isuse. Bugzilla ##593639.
ChangeLog
SUNWgobject-introspection.spec
base-specs/gobject-introspection.spec
patches/gobject-introspection-03-64bit.diff
--- a/ChangeLog	Mon Aug 31 08:09:59 2009 +0000
+++ b/ChangeLog	Mon Aug 31 10:26:48 2009 +0000
@@ -1,3 +1,10 @@
+2009-08-31  Halton Huo  <[email protected]>
+
+	* SUNWgobject-introspection.spec: Enable 64 bit build
+	* base-specs/gobject-introspection.spec: Add patch3
+	* patches/gobject-introspection-03-64bit.diff: Added to fix 64 bit build
+	  isuse. Bugzilla ##593639.
+
 2009-08-31  Dave Lin <[email protected]>
 
 	* SUNWgnome-pdf-viewer.spec: Redirect echo/rm to /usr/bin/* to fix
--- a/SUNWgobject-introspection.spec	Mon Aug 31 08:09:59 2009 +0000
+++ b/SUNWgobject-introspection.spec	Mon Aug 31 10:26:48 2009 +0000
@@ -21,6 +21,13 @@
 %include Solaris.inc
 
 %define pythonver 2.6
+
+%ifarch amd64 sparcv9
+%include arch64.inc
+%use gi_64 = gobject-introspection.spec
+%endif
+
+%include base.inc
 %use gi = gobject-introspection.spec
 
 Name:               SUNWgobject-introspection
@@ -45,19 +52,40 @@
 
 %prep
 rm -rf %name-%version
-mkdir %name-%version
-%gi.prep -d %name-%version
+mkdir -p %name-%version
+
+%ifarch amd64 sparcv9
+mkdir %name-%version/%{_arch64}
+%gi_64.prep -d %name-%version/%{_arch64}
+%endif
+
+mkdir %name-%version/%{base_arch}
+%gi.prep -d %name-%version/%{base_arch}
 
 %build
+
+%ifarch amd64 sparcv9
+export CFLAGS="%optflags64"
+export RPM_OPT_FLAGS="$CFLAGS"
+export LDFLAGS="$FLAG64"
+export PKG_CONFIG_PATH="%_pkg_config_path64"
+%gi_64.build -d %name-%version/%{_arch64}
+%endif
+
 export CFLAGS="%optflags"
 export RPM_OPT_FLAGS="$CFLAGS"
 export LDFLAGS="%_ldflags"
-
-%gi.build -d %name-%version
+export PKG_CONFIG_PATH="%_pkg_config_path"
+%gi.build -d %name-%version/%{base_arch}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%gi.install -d %name-%version
+
+%ifarch amd64 sparcv9
+%gi_64.install -d %name-%version/%{_arch64}
+%endif
+
+%gi.install -d %name-%version/%{base_arch}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -70,13 +98,19 @@
 %{_libdir}/*.so*
 %{_libdir}/girepository-1.0/*
 %{_libdir}/gobject-introspection/*
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%{_libdir}/%{_arch64}/*.so*
+%{_libdir}/%{_arch64}/girepository-1.0/*
+%{_libdir}/%{_arch64}/gobject-introspection/*
+%endif
 %dir %attr (0755, root, sys) %{_datadir}
 %{_datadir}/gir-1.0
 %dir %attr(0755, root, bin) %{_mandir}
 %dir %attr(0755, root, bin) %{_mandir}/*
 %{_mandir}/*/*
-%doc -d gobject-introspection-%{version} AUTHORS README COPYING
-%doc(bzip2) -d gobject-introspection-%{version} COPYING.GPL COPYING.LGPL NEWS
+%doc -d %{base_arch}/gobject-introspection-%{version} AUTHORS README COPYING
+%doc(bzip2) -d %{base_arch}/gobject-introspection-%{version} COPYING.GPL COPYING.LGPL NEWS
 %dir %attr (0755, root, other) %{_datadir}/doc
 
 %files devel
@@ -84,6 +118,11 @@
 %dir %attr (0755, root, bin) %dir %{_libdir}
 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
 %{_libdir}/pkgconfig/*
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
+%{_libdir}/%{_arch64}/pkgconfig/*
+%endif
 %dir %attr (0755, root, bin) %dir %{_includedir}
 %{_includedir}/*
 %dir %attr (0755, root, sys) %{_datadir}
@@ -91,6 +130,8 @@
 %{_datadir}/aclocal/*
 
 %changelog
+* Mon Aug 31 2009 - [email protected]
+- Enable 64 bit 
 * Mon Aug 24 2009 - [email protected]
 - Move from SFE, spilit base part to base-specs/gobject-introspection
 * Wed Aug 05 2009 - Halton Huo  <[email protected]>
--- a/base-specs/gobject-introspection.spec	Mon Aug 31 08:09:59 2009 +0000
+++ b/base-specs/gobject-introspection.spec	Mon Aug 31 10:26:48 2009 +0000
@@ -26,6 +26,8 @@
 # When LD is set, the dumper will crash
 #owner:halton date:2009-08-29 type:bug bugzilla:593599
 Patch2:       gobject-introspection-02-LD.diff
+#owner:halton date:2009-08-31 type:bug bugzilla:593639
+Patch3:       gobject-introspection-03-64bit.diff
 
 BuildRequires:  autoconf >= 2.59
 BuildRequires:  automake >= 1:1.8
@@ -61,6 +63,7 @@
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 #FIXME: When #590802 fixed in next release, remove following lines 
 rm -f m4/lt~obsolete.m4
@@ -75,7 +78,7 @@
     CPUS=1
 fi
 
-export PYTHON=/usr/bin/python%{pythonver}
+export PYTHON=%{_bindir}/python%{pythonver}
 
 libtoolize --copy --force
 aclocal $ACLOCAL_FLAGS -I m4
@@ -83,13 +86,16 @@
 automake -a -c -f
 autoconf
 
-./configure --prefix=%{_prefix}                     \
+./configure --prefix=%{_prefix}         \
+            --bindir=%{_bindir}         \
+            --libdir=%{_libdir}         \
+            --includedir=%{_includedir} \
+            --sysconfdir=%{_sysconfdir} \
             --mandir=%{_mandir}
 
-make
+make -j $CPU
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
 find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
@@ -133,6 +139,8 @@
 %{_libdir}/libgirepository-everything-1.0.a
 
 %changelog
+* Mon Aug 31 2009 - [email protected]
+- Add patch -64bit to fix 64 bit issue. Bugzilla #593639.
 * Sat Aug 29 2009 - [email protected]
 - Add patch -LD.diff to fix build issue with CBE 1.6.x
 * Mon Aug 24 2009 - [email protected]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gobject-introspection-03-64bit.diff	Mon Aug 31 10:26:48 2009 +0000
@@ -0,0 +1,30 @@
+--- gobject-introspection-0.6.4/giscanner/dumper.py.orig	2009-08-31 15:52:28.498099000 +0800
++++ gobject-introspection-0.6.4/giscanner/dumper.py	2009-08-31 17:31:39.578541000 +0800
+@@ -155,6 +155,10 @@
+             args.append('-I' + os.path.join(self._uninst_srcdir,
+                                                'girepository'))
+         args.extend(pkgconfig_flags)
++        cflags = os.environ.get('CFLAGS')
++        if (cflags):
++            for iflag in cflags.split():
++                args.extend([iflag])
+         for include in self._options.cpp_includes:
+             args.append('-I' + include)
+         args.extend(['-c', '-o', output])
+@@ -176,6 +180,16 @@
+ 
+         args.extend([self._linker_cmd, '-o', output])
+ 
++        cflags = os.environ.get('CFLAGS')
++        if (cflags):
++            for iflag in cflags.split():
++                args.extend([iflag])
++
++        ldflags = os.environ.get('LDFLAGS')
++        if (ldflags):
++            for iflag in ldflags.split():
++                args.extend([iflag])
++
+         # Make sure to list the library to be introspected first since it's
+         # likely to be uninstalled yet and we want the uninstalled RPATHs have
+         # priority (or we might run with installed library that is older)