blob: 85db9d603271eb776fbde656db621df191503932 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# 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.11 autocfg-0.1.4
bitflags-1.1.0 cfg-if-0.1.9 clap-2.33.0 cloudabi-0.0.3
fuchsia-cprng-0.1.1 itoa-0.4.4 libc-0.2.58 log-0.4.6 numtoa-0.1.0
proc-macro2-0.4.30 quote-0.6.12 rand-0.6.5 rand_chacha-0.1.1
rand_core-0.3.1 rand_core-0.4.0 rand_hc-0.1.0 rand_isaac-0.1.1
rand_jitter-0.1.4 rand_os-0.1.3 rand_pcg-0.1.2 rand_xorshift-0.1.1
rdrand-0.4.0 redox_syscall-0.1.54 redox_termios-0.1.1
remove_dir_all-0.5.2 ryu-0.2.8 serde-1.0.93 serde_derive-1.0.93
serde_json-1.0.39 strsim-0.8.0 syn-0.15.38 tempfile-3.0.8 termion-1.5.3
textwrap-0.11.0 toml-0.5.1 unicode-width-0.1.5 unicode-xid-0.1.0
vec_map-0.8.1 winapi-0.3.7 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
9d6417dc1e8abdb4969418525b36c451274fd76769adb57bef9875ef62ef521c50d58626ebc4f96d2bea32cbadb6999fd67653b570293d7253b403b6d0736c79 atty-0.2.11.tar.gz
811b68ea24a836980026abba12598b35359abdff5660e6e9d3cc65e3edbedcd10dffc208900af5d4c21e983e1218b5fb5499117c05ab60b3e4716f0529b231ce autocfg-0.1.4.tar.gz
e3e611cf35a1ed4930727d530e6c78add895bd96636ca1354f1269b3d0e36e77fbb9ec850fe1f448a10f09ea2b2f89c2b16bb96b7da585851ce4c29a308968e3 bitflags-1.1.0.tar.gz
45f7322217d291b3905ffdc45cadd5a7a7baf440f9a82a5b5596192ed0ac54353a3ecae0326d5807aae99bc4d79e0406d71bd65745ec8d9f8815a7c9436d648c cfg-if-0.1.9.tar.gz
f1075031414d48e4340bfe308904a95a31b72460724773c52a0bc8c004e625a04c904a39fc5420cb8c26a633321f9b5f4f69019c7aae5ed89900b63ed8c21a91 clap-2.33.0.tar.gz
691ed793e9b35ba382f03897f4c0efc31a528394862a27b814ba8993ad30bbe0ebc9808484baf580e8b69d9c13ad1612776a1efd0f6981545b420139ff83592c cloudabi-0.0.3.tar.gz
ea9f5beb0dfcb023c22cfc2b37ce52dfcf3a2cbbed0f79ffffc332878858386805c65dce8469a431002367562d857a6c064e075688540c27fcb4056a110059d2 fuchsia-cprng-0.1.1.tar.gz
f5e04bd908457e7592243ce64a99c5283428b767f4cc17d77946770411b06fccb0250625263c3e84a02a018ea7e8a0e4216e1929a71988bab8e1dbf603d3801d itoa-0.4.4.tar.gz
9127ad9a94f75655740fc3a2278c7a17d5f03c4cd12c8833c1a1ecb7a860ec8581fbc969f5c2e23b8eecb9131d9d8271131ad6a675b785f18fb55d830bcc0491 libc-0.2.58.tar.gz
3844c771f97531ae7312c6bb0cf74ccaab94925f68bf1172419cc44fa4b5373f3ac6b42fb6d0ba636a970b295ea5d1b5abbe72b4da67a103e8dc4ed48a0cc5cb log-0.4.6.tar.gz
41b5c774048592c5867fba217c85d4ece4540e0f3ab0eea7dd1a6af340ba46dae42bbca62ea7fe3afdb258660f39a3d3082264c99dea67d3d1ae178d00a01354 numtoa-0.1.0.tar.gz
73a8de3f1d76a8baf2d45afc1497bba8c0cbf231bf9b6750b9cee2473f492d5f3957ac149998da720acc8287c96d604971b51dcdfa629523bbdd97c297856ac0 proc-macro2-0.4.30.tar.gz
5d58945b0c9b41e368458a1661ae7b2ceed2e3285d377088afe5fde38e1db945ab42326d096cd6d13d82f5f80fe73d204c5fbe3c7abdea149eb6d7ca7c5e6798 quote-0.6.12.tar.gz
2eb84bed29708b8ba109f4329bf6f1cac6caed9d91b2aaf185d68dd2eda73d3fb7be2897d0596fb28352e799ccf92c161ee44599d5cb426ba9c3b8c747831904 rand-0.6.5.tar.gz
200d39362ffd6d91cfe80634e951c7323a5df8a382c91e3afcef1ecb143a16dc47a17db7f1a746b18e4ea8bfd36bc31ceaeff6d0116e166f8b34e4a8530b3c1b rand_chacha-0.1.1.tar.gz
5a7ae601124502bede760fd3179c2b28059ebc3b5983bfcb6b8fa62fb58df95cedc1aeb2734e792d894dfa4620801c13c29702f9cbee64243121575d4b6b9114 rand_core-0.3.1.tar.gz
f80e76dabd3308a12880a9aa8b7be83db39b02778c95bb63f862488789a2a67e2f08d4f2dd1ad803c61df0a9fc7f6620aa753b3bf394542ce27c89189a911845 rand_core-0.4.0.tar.gz
808d8c167daa66a2608884d5d3f1444cdb21f8ca1c61e59fc9bdfb506a634ebb22c0143cfc0574e15313f82559fd2d117a46910eba3b4eb7e0052ec280f5cd2f rand_hc-0.1.0.tar.gz
9e8f6c79abc53352c971f8182dcaa7979904d5649eec9008262bb0aaf0585b4c4817351cd80ffa8d07f172ff4c82d85a09ef2642a08f608fc6be3e246ed7f82e rand_isaac-0.1.1.tar.gz
fe3791612cf82bd0ad1a115c442b4a007141647eecd48f49dff9a5d326c374663d9bd2e511c8d292e1dba44665359b522cd5d57ccd3a18598e88e42ee1670e4a rand_jitter-0.1.4.tar.gz
01e81a692b78df3b2bd65bc285e5052ccaf208c7d0ace414f251db4fcff7f9ae1502ee60ca5745c95e778d3d5efe15fa84153c17c422b6b6bfee829376c14575 rand_os-0.1.3.tar.gz
6bc684778ba60c2e48793d4759b40cb0d35b0bc20ca0fc39fdff7c3f8fe9082dd7b5d5f26a7f17bafc6f3568924eac1bbe45820b1c2b09c91731ea5487d76d9c rand_pcg-0.1.2.tar.gz
3205499ed2584467dedb4641a48f3ca8fedc263b1d9431d36a251af0bc4701d99ce4b5219d515b9b24210dd3ef2faace6efa886aa50f361e07f53dd0fb0841e5 rand_xorshift-0.1.1.tar.gz
6476275d124bee28747191471e8d8f321a3b1c148c1f2a7ece4175f5244a7de90afe5f99d2eba5244d886b92e38232398864bf90e6d434b09494533942c8d894 rdrand-0.4.0.tar.gz
38ee15c2fa470428329b3888fef1f1b5bc57ffae96b6ec505fc051f33a8da86512afddfeb6966cb2342382a5cbccb624a825767d3492b3d6d21d6f8e97e57e9e redox_syscall-0.1.54.tar.gz
201d051900e919e2c6c6769ef252e51979d90133df16b6605e2a2f424cfb2e6e505e21add75ef5854fe5e0cab1ed1f1c1451010f072ae4bc8703c585a4323981 redox_termios-0.1.1.tar.gz
d19a45398a93adbcef9f233f6b3eaf4a63ae95f5bbae00c880b40c5edd34449e7f798ebcd4d11843c68ddfa15e11bed21d434b224e4a175dcb64ae011c13c8cd remove_dir_all-0.5.2.tar.gz
15a17fa06cb971847386013b7bc80e0483bb30f62062ac1e3200d588cb52771a7d34cdd74aba51de46341d303bd29065cf1f8cdcc17c23576cfadaefe63384b4 ryu-0.2.8.tar.gz
ec7712ad54bae2d93524e49730e2707b20ef91c8aa05084c6bbbd17e3ca77532cc672b8ae8f3ace25fc72a109cdc06a4b3f74515b7afe35faff6887984ae9309 serde-1.0.93.tar.gz
e9ba64c934eab1c2091697d36338ea6c47d0409b0097c87376fa6b05de21391aeb228e52b1c846894c37aee44550f4059c3ee9f58840d79d4ef5be4c61293f2b serde_derive-1.0.93.tar.gz
7180e5deb60e196f6b1ba3ac2a1bad6cea59d29f65fa7fb9258beb3d7012d6f3ea624e21fbb17868f5a21224f93b3f7b24875a94d50ba0d05e5b8d2aef632036 serde_json-1.0.39.tar.gz
1d55a8d946cd55f5f37d06aea536549ded95739fa58c0f2da285a0041154c181f663682bdcac643aa198b3e762d694a04f058db985c62ebe22b5c16327ba6d34 strsim-0.8.0.tar.gz
e460d6b67e3237e8e88292e2fd170ef16f6b0e30b1c7c11b8177f36c86b083ca1de2727e75f183d2708f6839138aa73865e7944a822c2d85783a79caf3fa2e6c syn-0.15.38.tar.gz
88f5bb3ac88b192b9f106d5902ac7563114b901df8c36cbb7f2eb7dccd631e19093cd1ec6aa82e4b833f35ab265072e81f3205773654c263555bee22a78abc00 tempfile-3.0.8.tar.gz
1cbe60f97d5f8b95e6a57ec9b7cfcf37459bc8dbcf8424b055f04b2ecdaf069e1bb52222364a2f380dc3f63039fe3823d424228af1c212a8b3790b7dd55d5deb termion-1.5.3.tar.gz
f5c0fe4f28ff1a3a0931e8e235b5157a45f67967985bcc752418c5ec3481fca44a8ae4800088889b37e8cd0533f53d3c456d5ffd19b767b3f83a87b49a2e209a textwrap-0.11.0.tar.gz
4b8b9212934b8a8bf8f09fc9c63219f3bd8d21a1bc5ec4f4208fa833743951ddb53cb99b5fa27b9b59d2223cc74a7274d6eb196255e44650bb633e24b2529073 toml-0.5.1.tar.gz
bd5ac5f0433953d79408074239edc7c43ce23d56659d467805d81ab01c576a3cf77ccedb3bba41d48bc4ad46a8905ac8a1927b99312053ef6295fd940a6766d2 unicode-width-0.1.5.tar.gz
cc5343e2166938322cfd7c73f1f918f2a9c46846ac0ef55933d1e44cdfaf6f7da2b7ff18b68e356c47b6d8ba5565eda0db42c347dcbde830683f341ac2b1849d unicode-xid-0.1.0.tar.gz
026cf10dc7ba98ae51dd312fc847cbaea41c25f0da5db6e0e22c2ecf75584bbf876d7bd96035fbbcf6696d702d5a3f25977e02a2d77cf519aa21e3ed05710e40 vec_map-0.8.1.tar.gz
6871b93ad8d48e39b90cb7b31b3132f84665f965b4dfe06fcebdfb873e7d099007cf3d7a50e832a941c3425ad2f39c3ab48a77151e60863685b97fc05c71d134 winapi-0.3.7.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"
|