diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2019-06-21 23:07:48 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2019-06-21 23:07:48 +0000 |
commit | 86d0de126ffdebdb8cee9581ce51c16a6f20b58b (patch) | |
tree | 0f7210e0fa2bb0ac3a81e16cf67c4cfcc5e19bb2 | |
parent | 05f4acb0b857ed8dc101fa5a8284cd6971c1cb23 (diff) | |
parent | 01cfb07924a0ece35528a5b61c5f256cbf3b3759 (diff) | |
download | packages-86d0de126ffdebdb8cee9581ce51c16a6f20b58b.tar.gz packages-86d0de126ffdebdb8cee9581ce51c16a6f20b58b.tar.bz2 packages-86d0de126ffdebdb8cee9581ce51c16a6f20b58b.tar.xz packages-86d0de126ffdebdb8cee9581ce51c16a6f20b58b.zip |
Merge branch 'cbindgen' into 'master'
user/cbindgen: new package
This package is needed to build recent versions of Firefox. This was initially based on Alpine's APKBUILD file, which was then converted to use vendored sources, with Gentoo's `cargo.eclass` used as a reference (thanks @smaeul).
This compiles correctly on `aarch64`, and an early draft of this package has been used to compile Firefox 67 on `aarch64` and `x86_64`, however the package in its current form has not received any further testing at this time.
One possible issue here is that the Rust dependency list was pulled verbatim from the `Cargo.lock` created by running `cargo build` inside a copy of the unpacked source tarball, and includes a number of platform-specific libraries (e.g. for Windows and RedoxOS) which are not actually used in the build -- I don't see any harm in this, but others may have objections.
See merge request !248
-rw-r--r-- | user/cbindgen/APKBUILD | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/user/cbindgen/APKBUILD b/user/cbindgen/APKBUILD new file mode 100644 index 000000000..6a8530b95 --- /dev/null +++ b/user/cbindgen/APKBUILD @@ -0,0 +1,127 @@ +# 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.8.7 +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.92 serde_derive-1.0.92 + serde_json-1.0.39 strsim-0.8.0 syn-0.15.36 tempfile-3.0.8 termion-1.5.3 + textwrap-0.11.0 toml-0.4.10 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" + +for _dep in $cargo_deps; do + _dep_name=${_dep%-*} + _dep_ver=${_dep##*-} + source="$source $_dep.tar.gz::https://crates.io/api/v1/crates/$_dep_name/$_dep_ver/download" +done + +prepare() { + export CARGO_HOME="$srcdir/cargo-home" + export CARGO_VENDOR="$CARGO_HOME/adelie" + + 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() { + cd "$builddir" + export CARGO_HOME="$srcdir/cargo-home" + cargo build -j $JOBS --release +} + +check() { + cd "$builddir" + export CARGO_HOME="$srcdir/cargo-home" + + # Failing tests + rm -rf tests/rust/expand* + cargo test -j $JOBS --release +} + +package() { + cd "$builddir" + export CARGO_HOME="$srcdir/cargo-home" + cargo install --path . --root="$pkgdir"/usr + rm "$pkgdir"/usr/.crates.toml +} + +sha512sums="0238fa87100f1792cbb2b2c977bdc13a9a8a3e916f841ee112f69335a8ecb2a9fc99d3a0ce5eda16c9eead7ccbe8e7b3b8248d4ceaa218bbea0ac9a6a20e805d cbindgen-0.8.7.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 +a8a33cf76a4f899205b2ede5e91859e03d038b178f685a36991c1836ab0c37f91ff50db4145e825838ac0fb4c526c9f496d00f87ac1790d101f4e83779fc5124 serde-1.0.92.tar.gz +37da456bb1392e4eacad07118dd8a6590552f455151f35bf4b350305772eddc8b232b61c36940c287df85b61ccc9867602cfc7012f7b7b645ab97cff45baeaab serde_derive-1.0.92.tar.gz +7180e5deb60e196f6b1ba3ac2a1bad6cea59d29f65fa7fb9258beb3d7012d6f3ea624e21fbb17868f5a21224f93b3f7b24875a94d50ba0d05e5b8d2aef632036 serde_json-1.0.39.tar.gz +1d55a8d946cd55f5f37d06aea536549ded95739fa58c0f2da285a0041154c181f663682bdcac643aa198b3e762d694a04f058db985c62ebe22b5c16327ba6d34 strsim-0.8.0.tar.gz +7cd22f17d3740223d94b64405ba6283fb90a4ec170bd55de652a409a537b5355717dfb09dab991e1bbb799e57d1d48fc07c061adbe35f5b7da3bcdcdc8723ddf syn-0.15.36.tar.gz +88f5bb3ac88b192b9f106d5902ac7563114b901df8c36cbb7f2eb7dccd631e19093cd1ec6aa82e4b833f35ab265072e81f3205773654c263555bee22a78abc00 tempfile-3.0.8.tar.gz +1cbe60f97d5f8b95e6a57ec9b7cfcf37459bc8dbcf8424b055f04b2ecdaf069e1bb52222364a2f380dc3f63039fe3823d424228af1c212a8b3790b7dd55d5deb termion-1.5.3.tar.gz +f5c0fe4f28ff1a3a0931e8e235b5157a45f67967985bcc752418c5ec3481fca44a8ae4800088889b37e8cd0533f53d3c456d5ffd19b767b3f83a87b49a2e209a textwrap-0.11.0.tar.gz +15bc40159478207d204e46ff2459dd3146d8f5508f07399f310ec8266190df8a1375e860fc8a7b3fb372b01e9d0f65eaecdc1b896ac2a921070ce76fde82f160 toml-0.4.10.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" |