public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alessandro Barbieri" <lssndrbarbieri@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-libs/skia/
Date: Sat, 25 Apr 2020 00:37:24 +0000 (UTC)	[thread overview]
Message-ID: <1587775035.9d1db4a3a02af5233999f88d1fc5f9b569f03ce5.Alessandro-Barbieri@gentoo> (raw)

commit:     9d1db4a3a02af5233999f88d1fc5f9b569f03ce5
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Apr 23 13:12:09 2020 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat Apr 25 00:37:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9d1db4a3

media-libs/skia: new package

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 media-libs/skia/Manifest       |   1 +
 media-libs/skia/metadata.xml   |  13 ++++
 media-libs/skia/skia-84.ebuild | 142 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 156 insertions(+)

diff --git a/media-libs/skia/Manifest b/media-libs/skia/Manifest
new file mode 100644
index 0000000..f1160cc
--- /dev/null
+++ b/media-libs/skia/Manifest
@@ -0,0 +1 @@
+DIST skia-84.tar.gz 46451124 BLAKE2B f64d5a4e66307ab99214e36be402064e75acd83d9f6e4957b52c3be3c1088feb92ac53ef6a15b94d3bbd74f5567c34146cc837e750c4867c02254a5ff258b2fb SHA512 e2455d57db4de093b7ce5c0a9ef7260df7ad7bebbe7684e39153a4bd7c80169629bdb58163fec5ed304b1f8a846200ce7100a8d067540afee6eff6a230393542

diff --git a/media-libs/skia/metadata.xml b/media-libs/skia/metadata.xml
new file mode 100644
index 0000000..8e363d5
--- /dev/null
+++ b/media-libs/skia/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+  <longdescription lang="en">
+Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms. It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.
+
+Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source.
+  </longdescription>
+  <use>
+    <flag name="dawn">use Dawn, a WebGPU implementation</flag>
+  </use>
+</pkgmetadata>

diff --git a/media-libs/skia/skia-84.ebuild b/media-libs/skia/skia-84.ebuild
new file mode 100644
index 0000000..ec24265
--- /dev/null
+++ b/media-libs/skia/skia-84.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit ninja-utils python-any-r1
+
+COMMIT="2fc431eaea2979f6e6b20cdb715db8861d5a47b1"
+
+SRC_URI="https://github.com/google/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+DESCRIPTION="A complete 2D graphic library for drawing Text, Geometries, and Images"
+HOMEPAGE="
+	https://skia.org
+	https://github.com/google/skia
+"
+LICENSE="BSD"
+SLOT="0"
+IUSE="dawn expat gif jpeg png pdf webp zlib"
+#TODO: find out how to enable and link: angle egl ffmpeg fontconfig freetype gl harfbuzz heif icu lua opencl piex sfntly wuffs vulkan xps s
+
+#TODO: find out which deps are needed for gl/egl/vulkan/X/gif/xps
+#	fontconfig? ( media-libs/fontconfig )
+#	freetype? ( media-libs/freetype )
+#	ffmpeg? ( virtual/ffmpeg )
+#	harfbuzz? ( media-libs/harfbuzz )
+#	heif? ( media-libs/libheif )
+#	icu? ( dev-libs/icu )
+#	virtual/opengl
+#	lua? ( dev-lang/lua )
+#	opencl? ( virtual/opencl )
+RDEPEND="
+	expat? ( dev-libs/expat )
+	jpeg? ( media-libs/libjpeg-turbo )
+	png? ( media-libs/libpng )
+	webp? ( media-libs/libwebp )
+	zlib? ( sys-libs/zlib )
+"
+DEPEND="
+	${PYTHON_DEPS}
+	${RDEPEND}
+"
+BDEPEND="
+	dev-util/gn
+"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+src_prepare() {
+	default
+	# https://chromium.googlesource.com/chromium/src/third_party/zlib
+	# https://github.com/jtkukunas/zlib
+	sed \
+		-e '/:zlib_x86/d' \
+		-e '/third_party("zlib_x86/,/^}/d' \
+		-i third_party/zlib/BUILD.gn
+}
+
+src_configure() {
+	python_setup
+	tc-export AR CC CXX
+
+	local myconf_gn=()
+	passflags() {
+		local _f _x
+		_f=( ${1} )
+		_x="[$(printf '"%s", ' "${_f[@]}")]"
+		myconf_gn+=( extra_${2}="${_x}" )
+	}
+	passflags "${CFLAGS}" cflags_c
+	passflags "${CXXFLAGS}" cflags_cc
+	passflags "${CFLAGS}" ldflags
+
+	myconf_gn+=(
+		ar=\"${AR}\"
+		cc=\"${CC}\"
+		cxx=\"${CXX}\"
+		is_component_build=true
+		is_official_build=true
+
+		skia_enable_pdf=$(usex pdf true false)
+
+		skia_use_dawn=$(usex dawn true false)
+		skia_use_expat=$(usex expat true false)
+		skia_use_libgifcodec=$(usex gif true false)
+		skia_use_libjpeg_turbo_decode=$(usex jpeg true false)
+		skia_use_libjpeg_turbo_encode=$(usex jpeg true false)
+		skia_use_libpng_decode=$(usex png true false)
+		skia_use_libpng_encode=$(usex png true false)
+		skia_use_libwebp_decode=$(usex webp true false)
+		skia_use_libwebp_encode=$(usex webp true false)
+		skia_use_zlib=$(usex zlib true false)
+
+		skia_use_direct3d=false
+		skia_use_dng_sdk=false
+		skia_use_fonthost_mac=false
+		skia_use_metal=false
+	)
+#		skia_use_angle=$(usex angle true false)
+#		skia_use_egl=$(usex egl true false)
+#		skia_use_fontconfig=$(usex fontconfig true false)
+#		skia_use_freetype=$(usex freetype true false)
+#		skia_use_ffmpeg=$(usex ffmpeg  true false)
+#		skia_use_gl=$(usex gl true false)
+#		skia_use_harfbuzz=$(usex harfbuzz true false)
+#		skia_use_icu=$(usex icu true false)
+#		skia_use_libheif=$(usex heif true false)
+#		skia_use_lua=$(usex lua true false)
+#		skia_use_opencl=$(usex opencl true false)
+#		skia_use_vulkan=$(usex vulkan true false)
+#		skia_use_x11=$(usex X true false)
+#		skia_use_xps=$(usex xps true false)
+#		skia_use_piex=$(usex piex true false)
+#		skia_use_sfntly=$(usex sfntly true false)
+#		skia_use_wuffs=$(usex wuffs true false)
+
+#	use freetype	&& myconf_gn+=( skia_use_system_freetype2=true )
+#	use harfbuzz	&& myconf_gn+=( skia_use_system_harfbuzz=true )
+#	use icu		&& myconf_gn+=( skia_use_system_icu=true )
+	use jpeg	&& myconf_gn+=( skia_use_system_libjpeg_turbo=true )
+#	use lua		&& myconf_gn+=( skia_use_system_lua=true )
+	use png		&& myconf_gn+=( skia_use_system_libpng=true )
+	use webp	&& myconf_gn+=( skia_use_system_libwebp=true )
+	use zlib	&& myconf_gn+=( skia_use_system_zlib=true )
+
+	myconf_gn="${myconf_gn[@]} ${EXTRA_GN}"
+	set -- gn gen --args="${myconf_gn% }" out/Release
+	echo "$@"
+	"$@" || die
+}
+
+src_compile() {
+	eninja -C out/Release
+}
+
+src_install() {
+	dolib.so out/Release/*.so
+	insinto "/usr/include/${PN}"
+	doins -r include/.
+}


             reply	other threads:[~2020-04-25  0:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25  0:37 Alessandro Barbieri [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-04-25  0:37 [gentoo-commits] repo/proj/guru:dev commit in: media-libs/skia/ Alessandro Barbieri
2020-04-26 20:38 Alessandro Barbieri
2020-04-30 19:17 Alessandro Barbieri
2020-11-23 23:54 Theo Anderson
2020-12-23  8:22 Theo Anderson
2021-04-15 12:44 Andrew Ammerlaan
2021-04-15 12:51 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2021-04-15 12:44 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2021-04-24 18:51 Alessandro Barbieri
2021-05-05  7:32 Alessandro Barbieri
2021-10-09  9:30 Theo Anderson
2022-03-10 18:23 Alessandro Barbieri
2022-05-29 21:04 Alessandro Barbieri
2022-05-29 21:04 Alessandro Barbieri
2022-05-29 21:04 Alessandro Barbieri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1587775035.9d1db4a3a02af5233999f88d1fc5f9b569f03ce5.Alessandro-Barbieri@gentoo \
    --to=lssndrbarbieri@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox