dev-libs/flatbuffers: new package
authorMichael Palimaka <kensington@gentoo.org>
Sat, 4 Mar 2017 11:51:53 +0000 (22:51 +1100)
committerMichael Palimaka <kensington@gentoo.org>
Sat, 4 Mar 2017 12:30:10 +0000 (23:30 +1100)
Package-Manager: Portage-2.3.4, Repoman-2.3.2

dev-libs/flatbuffers/Manifest [new file with mode: 0644]
dev-libs/flatbuffers/flatbuffers-1.6.0.ebuild [new file with mode: 0644]
dev-libs/flatbuffers/metadata.xml [new file with mode: 0644]

diff --git a/dev-libs/flatbuffers/Manifest b/dev-libs/flatbuffers/Manifest
new file mode 100644 (file)
index 0000000..0640c01
--- /dev/null
@@ -0,0 +1 @@
+DIST flatbuffers-1.6.0.tar.gz 440968 SHA256 768c50ebf5823f8cde81a9e38ffff115c8f5a5d031a37520d0024e7b9c6cd22e SHA512 d1e4d47cac663010eda58ca801e6da5e9d54104115dbb70b125b9251041611229e39c17a4b63f06eee2424f3cdd733b8efa49c723759ad533a07d33ef8406bcc WHIRLPOOL 1572de7bf181d00bbdf68d27b6ce369693f7eeb4a27aa56adfd9eb46554c520d0a66350eb2db071c5b4a8fb00b2bf67cb06732a2c7d1e716d2347ea72a4882a0
diff --git a/dev-libs/flatbuffers/flatbuffers-1.6.0.ebuild b/dev-libs/flatbuffers/flatbuffers-1.6.0.ebuild
new file mode 100644 (file)
index 0000000..80004da
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="Memory efficient serialization library"
+HOMEPAGE="https://google.github.io/flatbuffers/"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="static-libs test"
+
+src_prepare() {
+       sed -i -e "s/DESTINATION lib/DESTINATION $(get_libdir)/" CMakeLists.txt || die
+
+       cmake-utils_src_prepare
+}
+
+src_configure() {
+       append-cppflags -std=c++11
+
+       local mycmakeargs=(
+               -DFLATBUFFERS_BUILD_FLATLIB=$(usex static-libs)
+               -DFLATBUFFERS_BUILD_SHAREDLIB=ON
+               -DFLATBUFFERS_BUILD_TESTS=$(usex test)
+       )
+
+       cmake-utils_src_configure
+}
diff --git a/dev-libs/flatbuffers/metadata.xml b/dev-libs/flatbuffers/metadata.xml
new file mode 100644 (file)
index 0000000..2fdbf33
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="project">
+               <email>kde@gentoo.org</email>
+               <name>Gentoo KDE Project</name>
+       </maintainer>
+</pkgmetadata>