Skip to content

Commit

Permalink
Add wgpu-native ebuild
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Lisitsa <lisyarus@gmail.com>
  • Loading branch information
lisyarus committed Nov 25, 2023
1 parent 8f8a611 commit 195c881
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions media-libs/wgpu-native-bin/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST wgpu-native-bin-0.18.1.2.zip 15894253 BLAKE2B be312027dadf546f69e87079db3d6eb7a1e22b54bf36fc0356f9bd490a8759fe5cc2a02f647b431fddbdcaa2aed86271d1bd652e8bd8ad2ab6adac63f1eb186a SHA512 9ded4772bb082e6997a21aa5c03265144dd986c694736ea2c16bacb24331ef1a425a60d7f58f82ca0cab787b9bea263503f66a989f5104e64f327665be5db91d
16 changes: 16 additions & 0 deletions media-libs/wgpu-native-bin/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lisyarus@gmail.com</email>
<description>Primary maintainer</description>
</maintainer>
<longdescription>
WebGPU is an API that exposes the capabilities of GPU hardware for the Web. The API is designed from the ground up to efficiently map to (post-2014) native GPU APIs. WebGPU is not related to WebGL and does not explicitly target OpenGL ES.
wgpu-native is a native WebGPU implementation in Rust, based on wgpu-core, with C bindings.
</longdescription>
<use>
<flag name="debug">Install debug version of the library</flag>
<flag name="static-libs">Install static library binaries</flag>
</use>
</pkgmetadata>
30 changes: 30 additions & 0 deletions media-libs/wgpu-native-bin/wgpu-native-bin-0.18.1.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Native WebGPU implementation based on wgpu-core"
HOMEPAGE="https://github.com/gfx-rs/wgpu-native"

SRC_URI_BASE="https://github.com/gfx-rs/wgpu-native/releases/download/v${PV}/wgpu-linux-x86_64"
SRC_URI="debug? ( ${SRC_URI_BASE}-debug.zip -> ${P}.zip )
!debug? ( ${SRC_URI_BASE}-release.zip -> ${P}.zip )"

LICENSE="Apache-2.0 MIT"
SLOT="0"

KEYWORDS="~amd64"

IUSE="debug static-libs"

RDEPEND=""
DEPEND="${RDEPEND}"
BDEPEND=""

S="${WORKDIR}"

src_install() {
dolib.so libwgpu_native.so
use static-libs && dolib.a libwgpu_native.a
doheader webgpu.h wgpu.h
}

0 comments on commit 195c881

Please sign in to comment.