summaryrefslogblamecommitdiff
path: root/user/cbindgen/APKBUILD
blob: 6fffc1af63a9be67837a60f74090cc8e53bc8d57 (plain) (tree)
1
2
3
4
5
6




                                                        
            








                                                    









                                                                               

                                           
                                                                                                                                                               




                                                

                                           






















                                                                        




                                              







                                              




                                                   
 
                                                                                                                                                                   
                                                                                                                                                         
                                                                                                                                                    
                                                                                                                                                       
                                                                                                                                                        

                                                                                                                                                     
                                                                                                                                                         
                                                                                                                                                   



                                                                                                                                                          
                                                                                                                                                           







                                                                                                                                                             
                                                                                                                                                             



                                                                                                                                                             
                                                                                                                                                     


                                                                                                                                                       
                                                                                                                                                        

                                                                                                                                                            
                                                                                                                                                          
                                                                                                                                                          
                                                                                                                                                      

                                                                                                                                                     

                                                                                                                                                                            
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Gentoo Rust Maintainers <rust@gentoo.org>
# Contributor: Samuel Holland <samuel@sholland.org>
# Maintainer: Molly Miller <adelie@m-squa.red>
pkgname=cbindgen
pkgver=0.9.0
pkgrel=0
pkgdesc="Tool to generate C bindings from Rust code"
url="https://github.com/eqrion/cbindgen"
arch="all"
license="MPL-2.0"
makedepends="cargo"
source=""

# dependencies taken from Cargo.lock
cargo_deps="$pkgname-$pkgver ansi_term-0.11.0 atty-0.2.13 bitflags-1.1.0 
	c2-chacha-0.2.2 cfg-if-0.1.9 clap-2.33.0 getrandom-0.1.12 itoa-0.4.4
	lazy_static-1.4.0 libc-0.2.62 log-0.4.8 ppv-lite86-0.2.5
	proc-macro2-0.4.30 proc-macro2-1.0.3 quote-0.6.13 quote-1.0.2
	rand-0.7.0 rand_chacha-0.2.1 rand_core-0.5.1 rand_hc-0.2.0
	redox_syscall-0.1.56 remove_dir_all-0.5.2 ryu-1.0.0 serde-1.0.100
	serde_derive-1.0.100 serde_json-1.0.40 strsim-0.8.0 syn-0.15.44
	syn-1.0.5 tempfile-3.1.0 textwrap-0.11.0 toml-0.5.3 unicode-width-0.1.6
	unicode-xid-0.1.0 unicode-xid-0.2.0 vec_map-0.8.1 wasi-0.7.0
	winapi-0.3.8 winapi-i686-pc-windows-gnu-0.4.0
	winapi-x86_64-pc-windows-gnu-0.4.0"

source="$source $(echo $cargo_deps | sed -E 's#([[:graph:]]+)-([0-9.]+(-(alpha|beta|rc)[0-9.]+)?)#&.tar.gz::https://crates.io/api/v1/crates/\1/\2/download#g')"

prepare() {
	export CARGO_HOME="$srcdir/cargo-home"
	export CARGO_VENDOR="$CARGO_HOME/adelie"

	(builddir=$srcdir; default_prepare)

	mkdir -p "$CARGO_VENDOR"
	cat <<- EOF > "$CARGO_HOME/config"
		[source.adelie]
		directory = "${CARGO_VENDOR}"

		[source.crates-io]
		replace-with = "adelie"
		local-registry = "/nonexistant"
	EOF

	for _dep in $cargo_deps; do
		ln -s "$srcdir/$_dep" "$CARGO_VENDOR/$_dep"
		_sum=$(sha256sum "$srcdir/$_dep.tar.gz" | cut -d' ' -f1)
		cat <<- EOF > "$CARGO_VENDOR/$_dep/.cargo-checksum.json"
		{
			"package":"$_sum",
			"files":{}
		}
		EOF
	done
}

build() {
	export CARGO_HOME="$srcdir/cargo-home"
	cargo build -j $JOBS --release
}

check() {
	export CARGO_HOME="$srcdir/cargo-home"

	# Failing tests
	rm -rf tests/rust/expand*
	cargo test -j $JOBS --release
}

package() {
	export CARGO_HOME="$srcdir/cargo-home"
	cargo install --path . --root="$pkgdir"/usr
	rm "$pkgdir"/usr/.crates.toml
}


sha512sums="134a748ec781dde54d7810d6f5f98a5a84784d4acdd13a4c13eb4ae67fc278ccd2b123eea56461a124e7aa17b99e0a5a20f39f06286ce259e6e3eb24c43f29ae  cbindgen-0.9.0.tar.gz
a637466a380748f939b3af090b8c0333f35581925bc03f4dda9b3f95d338836403cf5487ae3af9ff68f8245a837f8ab061aabe57a126a6a2c20f2e972c77d1fa  ansi_term-0.11.0.tar.gz
4554ca7dedb4c2e8693e5847ef1fe66161ed4cb2c19156bb03f41ce7e7ea21838369dabaf447a60d1468de8bfbb7087438c12934c4569dde63df074f168569ad  atty-0.2.13.tar.gz
e3e611cf35a1ed4930727d530e6c78add895bd96636ca1354f1269b3d0e36e77fbb9ec850fe1f448a10f09ea2b2f89c2b16bb96b7da585851ce4c29a308968e3  bitflags-1.1.0.tar.gz
d8edeff2f4eefb9504160d7f4d3c450661d10905c23cc4950736ab76e73bd1e88127c006bc762d63694847f2cc981ceeb0727ecf18e8fad7c89209d7a9e70f14  c2-chacha-0.2.2.tar.gz
45f7322217d291b3905ffdc45cadd5a7a7baf440f9a82a5b5596192ed0ac54353a3ecae0326d5807aae99bc4d79e0406d71bd65745ec8d9f8815a7c9436d648c  cfg-if-0.1.9.tar.gz
f1075031414d48e4340bfe308904a95a31b72460724773c52a0bc8c004e625a04c904a39fc5420cb8c26a633321f9b5f4f69019c7aae5ed89900b63ed8c21a91  clap-2.33.0.tar.gz
0577f21f0ff01154453da92dd125c3bdea12a2bb2e7f5581add4306e28dfc448a0c084e9e64a0ef1da7baf8415965ea4ee32a5ef38d5af8ce4c6addab3cb0518  getrandom-0.1.12.tar.gz
f5e04bd908457e7592243ce64a99c5283428b767f4cc17d77946770411b06fccb0250625263c3e84a02a018ea7e8a0e4216e1929a71988bab8e1dbf603d3801d  itoa-0.4.4.tar.gz
e124c0521ec7c950f3c4a066821918da7a9c6e711115d98009ae7c351928fdddead852e7596fea5937a9c30e4e4ce8eee7099b20248b5d6e3b2494b6a6d88cb8  lazy_static-1.4.0.tar.gz
93c178429a099606d4d61576d74204e87c042c4591b8472eb56eb3ddee883b135e28be09ff48e2718c4cdadbfc641e3a313665fe493d64b1820a7e6018f79d1e  libc-0.2.62.tar.gz
0b71f97d5964134b5eea1332347e177806b2f171d0be5c410c0ff1539470b242ba9f0933fafd853e4171a43b5e373a150af18918924be431c7216022553a8a3b  log-0.4.8.tar.gz
281ea3479c4a8996aac643b707e75ca0a079681b1f182a074de0d9989ff9f1df6922cb8e4152af76025ebb4c2d00e6889aecc2a4f0fa66531eceb732aef62243  ppv-lite86-0.2.5.tar.gz
73a8de3f1d76a8baf2d45afc1497bba8c0cbf231bf9b6750b9cee2473f492d5f3957ac149998da720acc8287c96d604971b51dcdfa629523bbdd97c297856ac0  proc-macro2-0.4.30.tar.gz
ff4e32e42d206191741880e362e39e33149fec4f94cb38e2693e956e4c0dd680dba4712f436fddbc092a7ebef23b7cd4693345fb93d5b9713a516960c2bfd82e  proc-macro2-1.0.3.tar.gz
bafa9ba42ea6ff2d6df652384485c58327de6eaea2832423eedd8ef8b4aace673c23b70f1f22106515ac13d7f625cb8b1a5e8c4388c1701ea3cd86fb9ac3056e  quote-0.6.13.tar.gz
67778dff9dc5c4edcdd6454b74ad9353bb6c0c4e51c16cb82f2e393a7d7a0cde084d3c93279b718a8398c40af0a9377ebfae5321e69e635efd8390c125b75ce4  quote-1.0.2.tar.gz
20c82ed8edf0bd203ac6f04f746b80abf5ad5716b307cd76fda399f26519ccc3b757f390058e7d8826508ed8a2b524c49ebad56a79fa77416b386f2b9a854352  rand-0.7.0.tar.gz
30933fdb94ca8d4bf040a7e08a42944a0d7c2f3f6a9a3d547e74bc32f922b0eb79d85afb1f6c85c78dc115170e70bdf96b36f0478d61ba5651876d5350ad18f6  rand_chacha-0.2.1.tar.gz
4f7500b35e165e6c817fdd67a50745d5497d24e554bb554705097e37258751e8755c4d6b8a69fcb5e1977708ba78620bc35d640e4e018fcd4e88d9dbdbebdcbf  rand_core-0.5.1.tar.gz
bca185612bed5cee4da76fb68fe854105da276f5bf2da464e596d586b925df798cc692ed881e276ab77c36b4b0551930966c93656be122ad05899d87853533b0  rand_hc-0.2.0.tar.gz
17a3044327aa733c830dd74e210d6bda32622617d1c5af9d70d7647232d8569ad0b04ccb14042cbabb5d97ad98e3f1f5a9968a75387354ffb4d175e9577115a1  redox_syscall-0.1.56.tar.gz
d19a45398a93adbcef9f233f6b3eaf4a63ae95f5bbae00c880b40c5edd34449e7f798ebcd4d11843c68ddfa15e11bed21d434b224e4a175dcb64ae011c13c8cd  remove_dir_all-0.5.2.tar.gz
b5dd360611fdf76ff13d377c1c79ce09a4fab90a8b7fc917a4424b8246c8a0da7d3ec515b8c69b695d936b1207072d173b9f40fd5cb218f1eab947862112caf0  ryu-1.0.0.tar.gz
bce506b4d30c9743f69a8c599eeb5bfde8e4951f1700901ce03eb9cd198e3725bcd625121f494f8d12e98200520899917794b5943b355acf8993f00d1ede4282  serde-1.0.100.tar.gz
f47e62d3f30b15acf0e5435c5df939bb6089c060bf91e891a7cc0f9e7bb8243c5500a145ec41e6aba7fd1f5fb571e552dbc95eb78633d7a47ed08ed35f0b0848  serde_derive-1.0.100.tar.gz
d09bc95c963f510686106d9885f3420b9eabba8bf32626597dafd43ffbe91ea72ee4a3fedfca922794a727214d73929970acced8eccaa23616cde33dfde9f842  serde_json-1.0.40.tar.gz
1d55a8d946cd55f5f37d06aea536549ded95739fa58c0f2da285a0041154c181f663682bdcac643aa198b3e762d694a04f058db985c62ebe22b5c16327ba6d34  strsim-0.8.0.tar.gz
c6c9b5887425e1e5fab905e477fcea41bba191693c471cf26922a9dfdd59ed957155a399406cc3723933a869565e7295183dabedfc34e3e2a20874ba94c7ead7  syn-0.15.44.tar.gz
4cc18966040b1f86916876aa5ad8029a126f7ab8db55408b3f4bc343dd82dc357899dd4a7afc514c65fd269245f8850f8f2834b08bc2ee6cf6774282f75feadc  syn-1.0.5.tar.gz
a87ee51c36a81a8a8eb8f091eb57926682f38b707f7f641332d8752170e6c139a656ae49c6861f51e07c2fab5c86cc9b2ac158f5d89c6bff15d18934dd4e7ba5  tempfile-3.1.0.tar.gz
f5c0fe4f28ff1a3a0931e8e235b5157a45f67967985bcc752418c5ec3481fca44a8ae4800088889b37e8cd0533f53d3c456d5ffd19b767b3f83a87b49a2e209a  textwrap-0.11.0.tar.gz
f3798afe9cbededee2c5d0cc2cd45a9a5b09004bc4d6f0e2863aa56a3aa377e9eb8fc2e4c557fe448afbec77bea5bb6953fe6ff59cb83389351ea207bd912458  toml-0.5.3.tar.gz
d6c2e5a99ea359d866393a6b00e0e21e5d80e4e665e457c0f2f0bbebda53afeab75b1d9b6b79102339ee621bac5050e7d41621703a8fd9ffe1e74a5a4301aa05  unicode-width-0.1.6.tar.gz
cc5343e2166938322cfd7c73f1f918f2a9c46846ac0ef55933d1e44cdfaf6f7da2b7ff18b68e356c47b6d8ba5565eda0db42c347dcbde830683f341ac2b1849d  unicode-xid-0.1.0.tar.gz
590f727d8d8354023062ae5fe7ac5bed1bcf79d86b883effd7f33b3ea3b1c8922998a63d621ca6962a969e890fa6edd009871f21cd57b1969264f41ba3f78359  unicode-xid-0.2.0.tar.gz
026cf10dc7ba98ae51dd312fc847cbaea41c25f0da5db6e0e22c2ecf75584bbf876d7bd96035fbbcf6696d702d5a3f25977e02a2d77cf519aa21e3ed05710e40  vec_map-0.8.1.tar.gz
1950e78df7f0ba21b917680633d092704f1fb906bd973de4ddc43cedb7bf449f6e881d50e3aa0d5595e8d58796915d582b69c116ef536f819b6f035affea18f0  wasi-0.7.0.tar.gz
5a899ee5f09f30d742b8b8eba78da05cd9f4c664408fdeb9370373f8756a962a23e3f1c07619e745b3270138606c9a369076c02c3f5353f657df09d203d9a736  winapi-0.3.8.tar.gz
a672ccefd0730a8166fef1d4e39f9034d9ae426a3f5e28d1f4169fa5c5790767693f281d890e7804773b34acdb0ae1febac33cde8c50c0044a5a6152c7209ec2  winapi-i686-pc-windows-gnu-0.4.0.tar.gz
4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513  winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz"