[packages/skia] build shared libs (only shared libs)
glen
glen at pld-linux.org
Sun Mar 3 21:35:02 CET 2013
commit b2bf62b230688067101ef646deaa4ecbf58877fe
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Mar 3 22:33:55 2013 +0200
build shared libs (only shared libs)
shared-libs.patch | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
skia.spec | 21 +++++++-
2 files changed, 176 insertions(+), 1 deletion(-)
---
diff --git a/skia.spec b/skia.spec
index 2525bc6..77f55dd 100644
--- a/skia.spec
+++ b/skia.spec
@@ -1,6 +1,6 @@
#
# Conditional build:
-%bcond_without static_libs # don't build static library
+%bcond_with static_libs # don't build static library
%bcond_without verbose # verbose build (V=1)
%define subver 20130302
@@ -15,6 +15,7 @@ Source0: %{name}-%{subver}.tar.xz
# Source0-md5: e2de2d4871a315cd1e252f77cd96dca2
Source1: get-source.sh
Source2: gclient.conf
+Patch0: shared-libs.patch
URL: https://sites.google.com/site/skiadocs/
BuildRequires: Mesa-libGL-devel
BuildRequires: Mesa-libGLU-devel
@@ -54,6 +55,7 @@ Statyczna biblioteka skia.
%prep
%setup -qn %{name}-%{subver}
+%patch0 -p1
%build
%{__python} gyp_skia \
@@ -82,14 +84,30 @@ cp -a include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
cd out/%{!?debug:Release}%{?debug:Debug}
+install -p lib.target/lib*.so $RPM_BUILD_ROOT%{_libdir}
+
+%if %{with static_libs}
cp -p lib*.a $RPM_BUILD_ROOT%{_libdir}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+# ldconfig to update ld.so.cache
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
%doc README LICENSE
+%attr(755,root,root) %{_libdir}/libskia_core.so
+%attr(755,root,root) %{_libdir}/libskia_gr.so
+%attr(755,root,root) %{_libdir}/libskia_opts.so
+%attr(755,root,root) %{_libdir}/libskia_opts_ssse3.so
+%attr(755,root,root) %{_libdir}/libskia_ports.so
+%attr(755,root,root) %{_libdir}/libskia_sfnt.so
+%attr(755,root,root) %{_libdir}/libskia_skgr.so
+%attr(755,root,root) %{_libdir}/libskia_utils.so
%files devel
%defattr(644,root,root,755)
@@ -103,6 +121,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libskia_opts.a
%{_libdir}/libskia_opts_ssse3.a
%{_libdir}/libskia_ports.a
+%{_libdir}/libskia_sfnt.a
%{_libdir}/libskia_skgr.a
%{_libdir}/libskia_utils.a
%endif
diff --git a/shared-libs.patch b/shared-libs.patch
new file mode 100644
index 0000000..56ddf32
--- /dev/null
+++ b/shared-libs.patch
@@ -0,0 +1,156 @@
+--- skia-20130302/gyp/core.gyp 2013-03-03 19:56:16.214695060 +0200
++++ skia-20130302/gyp/core.gyp 2013-03-03 20:04:49.685003753 +0200
+@@ -4,8 +4,8 @@
+ {
+ 'target_name': 'core',
+ 'product_name': 'skia_core',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'msvs_guid': 'B7760B5E-BFA8-486B-ACFD-49E3A6DE8E76',
+
+ 'includes': [
+--- skia-20130302/gyp/opts.gyp 2013-03-03 19:57:15.794031796 +0200
++++ skia-20130302/gyp/opts.gyp 2013-03-03 20:04:09.793160557 +0200
+@@ -21,8 +21,8 @@
+ {
+ 'target_name': 'opts',
+ 'product_name': 'skia_opts',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'include_dirs': [
+ '../include/config',
+ '../include/core',
+@@ -105,8 +105,8 @@
+ {
+ 'target_name': 'opts_ssse3',
+ 'product_name': 'skia_opts_ssse3',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'include_dirs': [
+ '../include/config',
+ '../include/core',
+@@ -140,8 +140,8 @@
+ {
+ 'target_name': 'opts_neon',
+ 'product_name': 'skia_opts_neon',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'include_dirs': [
+ '../include/config',
+ '../include/core',
+--- skia-20130302/gyp/utils.gyp 2013-03-03 20:04:26.900617671 +0200
++++ skia-20130302/gyp/utils.gyp 2013-03-03 20:04:26.900617671 +0200
+@@ -1,10 +1,13 @@
+ {
++ 'variables': {
++ 'use_system_cityhash%': 1,
++ },
+ 'targets': [
+ {
+ 'target_name': 'utils',
+ 'product_name': 'skia_utils',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'dependencies': [
+ 'cityhash',
+ ],
+@@ -210,6 +213,10 @@
+ ],
+ },
+ },
++ ],
++ 'conditions': [
++ ['use_system_cityhash==0', {
++ 'targets': [
+ {
+ 'target_name': 'cityhash',
+ 'type': 'static_library',
+@@ -250,8 +257,26 @@
+ ],
+ }],
+ ],
+- },
+- ],
++ }],
++ }, { # use_system_cityhash==1
++ 'targets': [
++ {
++ 'target_name': 'cityhash',
++ 'type': 'none',
++ 'direct_dependent_settings': {
++ 'defines': [
++ 'USE_SYSTEM_CITYHASH',
++ ],
++ },
++ 'link_settings': {
++ 'libraries': [
++ '-lcityhash',
++ ],
++ },
++ }
++ ],
++ }],
++ ], # conditions
+ }
+
+ # Local Variables:
+--- skia-20130302/gyp/ports.gyp 2013-03-03 19:57:30.324703183 +0200
++++ skia-20130302/gyp/ports.gyp 2013-03-03 20:05:06.739125069 +0200
+@@ -4,8 +4,8 @@
+ {
+ 'target_name': 'ports',
+ 'product_name': 'skia_ports',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'dependencies': [
+ 'core.gyp:core',
+ 'sfnt.gyp:sfnt',
+--- skia-20130302/gyp/gpu.gyp 2013-03-03 22:20:06.559592070 +0200
++++ skia-20130302/gyp/gpu.gyp 2013-03-03 22:21:40.353892658 +0200
+@@ -119,8 +119,8 @@
+ {
+ 'target_name': 'skgr',
+ 'product_name': 'skia_skgr',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'includes': [
+ 'gpu.gypi',
+ ],
+@@ -170,8 +170,8 @@
+ {
+ 'target_name': 'gr',
+ 'product_name': 'skia_gr',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'includes': [
+ 'gpu.gypi',
+ ],
+--- skia-20130302/gyp/sfnt.gyp~ 2013-03-02 01:14:22.000000000 +0200
++++ skia-20130302/gyp/sfnt.gyp 2013-03-03 22:22:25.635968899 +0200
+@@ -3,8 +3,8 @@
+ {
+ 'target_name': 'sfnt',
+ 'product_name': 'skia_sfnt',
+- 'type': 'static_library',
+- 'standalone_static_library': 1,
++ 'type': 'shared_library',
++ 'standalone_static_library': 0,
+ 'dependencies': [
+ 'core.gyp:core',
+ ],
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/skia.git/commitdiff/b2bf62b230688067101ef646deaa4ecbf58877fe
More information about the pld-cvs-commit
mailing list