Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: cbindgen #6757

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ btrfs-du-bin
cachyos-ananicy-rules-git
cantata
caprine-deb
cbindgen
celeste-bin
cheat
chezmoi-deb
Expand Down
17 changes: 17 additions & 0 deletions packages/cbindgen/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pkgbase = cbindgen
gives = cbindgen
pkgver = 0.27.0
pkgrel = 1
pkgdesc = A tool for generating C bindings to Rust code
url = https://github.com/mozilla/cbindgen
arch = amd64
arch = arm64
depends = libglib2.0-dev
makedepends = libglib2.0-dev
makedepends = git
pacdeps = rust-bin
license = MPL-2.0
source = git+https://github.com/mozilla/cbindgen#tag=v0.27.0
b2sums = 76b445f7f9729107a04451433d047f50b5ac52c7dc501685f00d0558dab82e2bc09d23a8b5c33ea231e1a2fae81533ba8e64d21a43d524b6dd0de170114c6ea5

pkgname = cbindgen
43 changes: 43 additions & 0 deletions packages/cbindgen/cbindgen.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
pkgname=cbindgen
gives=cbindgen
pkgver=0.27.0
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
pkgrel=1
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
pkgdesc="A tool for generating C bindings to Rust code"
url="https://github.com/mozilla/cbindgen"
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
arch=("amd64" "arm64")
license=(MPL-2.0)
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
depends=(
libglib2.0-dev
)
makedepends=(
libglib2.0-dev
git
)
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
pacdeps=("rust-bin")
source=("git+${url}#tag=v${pkgver}")
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
b2sums=('76b445f7f9729107a04451433d047f50b5ac52c7dc501685f00d0558dab82e2bc09d23a8b5c33ea231e1a2fae81533ba8e64d21a43d524b6dd0de170114c6ea5')
external_connection="true"

prepare() {
cd cbindgen
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
cd cbindgen

# Use debug
export CARGO_PROFILE_RELEASE_DEBUG=2

# Use LTO
export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1

cargo build --release
Xdavius marked this conversation as resolved.
Show resolved Hide resolved
}

package() {
cd cbindgen
install -Dt "${pkgdir}/usr/bin" target/release/cbindgen
install -Dt "${pkgdir}/usr/share/doc/${pkgname}" -m644 CHANGES \
{README,docs,internals}.md
}
18 changes: 18 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,24 @@ pkgbase = caprine-deb

pkgname = caprine-deb
---
pkgbase = cbindgen
gives = cbindgen
pkgver = 0.27.0
pkgrel = 1
pkgdesc = A tool for generating C bindings to Rust code
url = https://github.com/mozilla/cbindgen
arch = amd64
arch = arm64
depends = libglib2.0-dev
makedepends = libglib2.0-dev
makedepends = git
pacdeps = rust-bin
license = MPL-2.0
source = git+https://github.com/mozilla/cbindgen#tag=v0.27.0
b2sums = 76b445f7f9729107a04451433d047f50b5ac52c7dc501685f00d0558dab82e2bc09d23a8b5c33ea231e1a2fae81533ba8e64d21a43d524b6dd0de170114c6ea5

pkgname = cbindgen
---
pkgbase = celeste-bin
gives = celeste
pkgver = 0.8.0
Expand Down
Loading