[packages/skia] new, attempt to package skia
glen
glen at pld-linux.org
Sat Mar 2 00:07:44 CET 2013
commit f832f86680810d5bcc6e29eafdd2bffc7fbb0888
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Mar 2 01:06:08 2013 +0200
new, attempt to package skia
gclient.conf | 17 +++++++++
get-source.sh | 48 ++++++++++++++++++++++++++
skia.spec | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 173 insertions(+)
---
diff --git a/skia.spec b/skia.spec
new file mode 100644
index 0000000..eff6595
--- /dev/null
+++ b/skia.spec
@@ -0,0 +1,108 @@
+#
+# Conditional build:
+%bcond_without static_libs # don't build static library
+%bcond_without verbose # verbose build (V=1)
+
+%define subver 20130302
+%define rel 0.1
+Summary: 2D graphic library
+Name: skia
+Version: 0
+Release: 0.%{rel}.%{subver}
+License: BSD
+Group: Development/Libraries
+Source0: %{name}-%{subver}.tar.xz
+# Source0-md5: d3338ba25a4130d8a5e0678cb416cf02
+Source1: get-source.sh
+Source2: gclient.conf
+URL: https://sites.google.com/site/skiadocs/
+#BuildRequires: cityhash-devel
+BuildRequires: libstdc++-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Skia is a complete 2D graphic library for drawing Text, Geometries,
+and Images.
+
+%package devel
+Summary: The development files for skia
+Summary(pl.UTF-8): Pliki programistyczne skia
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for development with skia.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe do tworzenia programów z użyciem skia.
+
+%package static
+Summary: Static skia library
+Summary(pl.UTF-8): Statyczna biblioteka skia
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static skia library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka skia.
+
+%prep
+%setup -qn %{name}-%{subver}
+
+mv skia/{README,LICENSE} .
+
+%build
+cd skia
+%{__python} gyp_skia \
+ --format=make \
+ --depth=. \
+ skia.gyp
+
+%{__make} -r \
+ BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
+ %{?with_verbose:V=1} \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ LDFLAGS="%{rpmldflags} -fuse-ld=gold" \
+ CC.host="%{__cc}" \
+ CXX.host="%{__cxx}" \
+ LDFLAGS.host="%{rpmldflags}" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+ CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
+ skia_base_libs
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
+
+cd skia
+cp -a include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
+
+cd out/%{!?debug:Release}%{?debug:Debug}
+
+cp -p lib*.a $RPM_BUILD_ROOT%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README LICENSE
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/%{name}
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libskia_core.a
+%{_libdir}/libskia_gr.a
+%{_libdir}/libskia_opts.a
+%{_libdir}/libskia_opts_ssse3.a
+%{_libdir}/libskia_ports.a
+%{_libdir}/libskia_skgr.a
+%{_libdir}/libskia_utils.a
+%endif
diff --git a/gclient.conf b/gclient.conf
new file mode 100644
index 0000000..4e815fb
--- /dev/null
+++ b/gclient.conf
@@ -0,0 +1,17 @@
+solutions = [{
+ "name" : "skia",
+ "url" : "http://skia.googlecode.com/svn/trunk",
+ "deps_file" : "DEPS",
+ "managed" : True,
+ "custom_deps" : {
+ # Windows only
+ 'skia/third_party/externals/angle': None,
+ 'skia/third_party/externals/cityhash': None
+# 'skia/third_party/externals/freetype': 'https://android.googlesource.com/platform/external/freetype.git',
+# 'skia/third_party/externals/gyp': 'http://gyp.googlecode.com/svn/trunk@1563',
+# 'skia/third_party/externals/jsoncpp': 'http://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/jsoncpp@248',
+# 'skia/third_party/externals/jsoncpp-chromium': 'http://src.chromium.org/svn/trunk/src/third_party/jsoncpp@125399',
+# 'skia/third_party/externals/libjpeg': 'http://src.chromium.org/svn/trunk/src/third_party/libjpeg@125399',
+ },
+ "safesync_url": "",
+}]
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..0c7a527
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Make snapshot of skia
+# https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/linux
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+set -e
+
+package=skia
+specfile=$package.spec
+baseurl=http://$package.googlecode.com/svn
+svnurl=$baseurl/trunk
+release_dir=$package-$(date +%Y%m%d)
+tarball=$release_dir.tar.xz
+
+# get depot tools
+# http://www.chromium.org/developers/how-tos/install-depot-tools
+test -d depot_tools || {
+ # could also checkout:
+ # svn co http://src.chromium.org/svn/trunk/tools/depot_tools
+ wget -c https://src.chromium.org/svn/trunk/tools/depot_tools.zip
+ unzip -qq depot_tools.zip
+ chmod a+x depot_tools/gclient depot_tools/update_depot_tools
+}
+
+topdir=${PWD:-($pwd)}
+gclient=$topdir/gclient.conf
+install -d $package
+cd $package
+
+if [ ! -f $gclient ]; then
+ # create initial config that can be later modified
+ ../depot_tools/gclient config $svnurl --gclientfile=$gclient
+fi
+
+cp -p $gclient .gclient
+
+# emulate gclient config, preserving our deps
+sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
+
+../depot_tools/gclient sync --nohooks -v
+
+cd ..
+
+cp -al $package $release_dir
+XZ_OPT=-e9 tar -caf $tarball --exclude-vcs $release_dir
+rm -rf $release_dir
+
+../md5 $specfile
+../dropin $tarball &
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/skia.git/commitdiff/f832f86680810d5bcc6e29eafdd2bffc7fbb0888
More information about the pld-cvs-commit
mailing list