Use subtree again to allow publishing the crate (#34)
* change: update Cargo.toml, lib.rs, CHANGELOG.md for 0.1.6 release. * Squashed 'depend/zcash/' content from commit 9af3bce26 git-subtree-dir: depend/zcash git-subtree-split: 9af3bce265ba428382006b0940678418d65f505f * fix: delete depend/zcash/Cargo.toml to prevent cargo from ignoring it * ci: add cargo package test * change(doc): explain the subtree / squash issue in README.md
This commit is contained in:
parent
2be4323142
commit
c9fbc441ef
|
@ -26,6 +26,28 @@ jobs:
|
|||
with:
|
||||
command: check
|
||||
|
||||
# Test that "cargo package" works. This make sure it's publishable,
|
||||
# since we had issues where "cargo build" worked but "package" didn't.
|
||||
package:
|
||||
name: Package
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- stable
|
||||
- nightly
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: package
|
||||
|
||||
test-versions:
|
||||
name: Test Suite
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[submodule "depend/zcash"]
|
||||
path = depend/zcash
|
||||
url = https://github.com/zcash/zcash.git
|
||||
branch = master
|
|
@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
<!-- next-header -->
|
||||
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
## [0.1.6] - 2022-05-16
|
||||
|
||||
### Changed
|
||||
|
@ -41,7 +43,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Updated `bindgen` to a non yanked version
|
||||
|
||||
<!-- next-url -->
|
||||
[Unreleased]: https://github.com/ZcashFoundation/zcash_script/compare/v0.1.5...HEAD
|
||||
[Unreleased]: https://github.com/ZcashFoundation/zcash_script/compare/v0.1.6...HEAD
|
||||
[0.1.6]: https://github.com/ZcashFoundation/zcash_script/compare/v0.1.5...v0.1.6
|
||||
[0.1.5]: https://github.com/ZcashFoundation/zcash_script/compare/v0.1.4...v0.1.5
|
||||
[0.1.4]: https://github.com/ZcashFoundation/zcash_script/compare/v0.1.3...v0.1.4
|
||||
[0.1.3]: https://github.com/ZcashFoundation/zcash_script/compare/v0.1.2...v0.1.3
|
||||
|
|
|
@ -10,17 +10,12 @@ description = "ffi bindings to zcashd's zcash_script library"
|
|||
documentation = "https://docs.rs/zcash_script"
|
||||
repository = "https://github.com/ZcashFoundation/zcash_script"
|
||||
include = [
|
||||
"/.github/workflows/ci.yml",
|
||||
"/.gitignore",
|
||||
"/.gitmodules",
|
||||
"Cargo.toml",
|
||||
"Cargo.toml.orig",
|
||||
"/LICENSE",
|
||||
"/README.md",
|
||||
"build.rs",
|
||||
"depend/check_uint128_t.c",
|
||||
"src/blake2b.rs",
|
||||
"src/lib.rs",
|
||||
"src/*.rs",
|
||||
"/depend/check_uint128_t.c",
|
||||
"/depend/zcash/src/script/zcash_script.h",
|
||||
"/depend/zcash/src/script/zcash_script.cpp",
|
||||
"/depend/zcash/src/utilstrencodings.cpp",
|
||||
|
|
50
README.md
50
README.md
|
@ -30,43 +30,40 @@ To do that, check for versions in:
|
|||
- `librustzcash/Cargo.toml` in the revision pointed to by `zcash` (also check for patches)
|
||||
- `librustzcash/<crate>/Cargo.toml` in the revision pointed to by `zcash`
|
||||
|
||||
### Cloning and checking out `depend/zcash`
|
||||
|
||||
Clone this repository using:
|
||||
```console
|
||||
git clone --recurse-submodules
|
||||
```
|
||||
|
||||
Or if you've already cloned:
|
||||
```console
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
To pull the latest version, use:
|
||||
```console
|
||||
git pull --recurse-submodules
|
||||
```
|
||||
|
||||
### Updating `depend/zcash`
|
||||
|
||||
If you need to change the submodule's base branch:
|
||||
```console
|
||||
git config -f .gitmodules submodule.depend/zcash.branch <branch-name>
|
||||
```
|
||||
We keep a copy of the zcash source in `depend/zcash` with the help of `git subtree`.
|
||||
It has one single difference that must be enforced everytime it's updated: the root
|
||||
`Cargo.toml` must be deleted, since otherwise cargo will ignore the entire folder
|
||||
when publishing the crate (see https://github.com/rust-lang/cargo/issues/8597).
|
||||
|
||||
To pull in recent changes from the upstream repo:
|
||||
If you need to update the zcash source, run:
|
||||
|
||||
```console
|
||||
git submodule update --remote
|
||||
git subtree pull -P depend/zcash https://github.com/zcash/zcash.git <ref> --squash
|
||||
```
|
||||
|
||||
To use a specific commit:
|
||||
where `<ref>` is a reference to a branch, tag or commit (it should be a tag when preparing
|
||||
a release, but it will be likely a branch or commit when testing).
|
||||
|
||||
The command will likely report a conflict due to the deleted `Cargo.toml` file.
|
||||
Just run
|
||||
|
||||
```console
|
||||
cd depend/zcash
|
||||
git checkout <commit-hash>
|
||||
git rm depend/zcash/Cargo.toml
|
||||
```
|
||||
|
||||
and then commit the updates. Note: after updating zcash, the PR that includes it must *not* be
|
||||
squashed-and-merged, due to how subtree works. Otherwise you will get errors
|
||||
when trying to update zcash again.
|
||||
|
||||
If that ends up happening, you can always `git rm depend/zcash` and start over
|
||||
(run the same command as above, but with `add` instead of `pull`);
|
||||
our usage of `subtree` is to just have a convenient way of pulling copies of `zcash`.
|
||||
(Unfortunately, switching to submodules is not a good solution due to the need of
|
||||
deleting the `Cargo.toml`.)
|
||||
|
||||
|
||||
### Publishing New Releases
|
||||
|
||||
Releases for `zcash-script` are made with the help of [cargo release](https://github.com/sunng87/cargo-release).
|
||||
|
@ -75,6 +72,7 @@ Releases for `zcash-script` are made with the help of [cargo release](https://gi
|
|||
|
||||
* create a new branch batch the release commits into a PR
|
||||
* update `CHANGELOG.md` to document any major changes since the last release
|
||||
https://github.com/rust-lang/cargo/issues/8597)
|
||||
* open a PR to merge your branch into `master`
|
||||
* locally run `cargo release -- <level>` where `level` can be `patch`, `minor`, or `major` ([source](https://github.com/sunng87/cargo-release/blob/master/docs/reference.md#bump-level))
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 16b49eadd56086aae10f2907e5b8e77b773f1813
|
|
@ -0,0 +1,8 @@
|
|||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
# The directory for this source is set to RUST_VENDORED_SOURCES by src/Makefile.am
|
|
@ -0,0 +1 @@
|
|||
src/clientversion.cpp export-subst
|
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report about a bug in zcashd.
|
||||
title: ''
|
||||
labels: 'bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
This issue tracker is only for technical issues related to zcashd.
|
||||
|
||||
General Zcash questions and/or support requests and are best directed to the
|
||||
Zcash Forum: https://forum.zcashcommunity.com/
|
||||
|
||||
For reporting security vulnerabilities or for sensitive discussions with our
|
||||
security team, please email security@z.cash . You can use this GPG key to send
|
||||
an encrypted message:
|
||||
https://z.cash/gpg-pubkeys/security.asc
|
||||
fingerprint: AF85 0445 546C 18B7 86F9 2C62 88FB 8B86 D8B5 A68C
|
||||
|
||||
The key and fingerprint are duplicated on our Public Keys page:
|
||||
https://z.cash/support/pubkeys.html
|
||||
-->
|
||||
|
||||
### Describe the issue
|
||||
Please provide a general summary of the issue you're experiencing
|
||||
|
||||
### Can you reliably reproduce the issue?
|
||||
#### If so, please list the steps to reproduce below:
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected behaviour
|
||||
Tell us what should happen
|
||||
|
||||
### Actual behaviour + errors
|
||||
Tell us what happens instead including any noticeable error output (any messages
|
||||
displayed on-screen when e.g. a crash occurred)
|
||||
|
||||
### The version of Zcash you were using:
|
||||
Run `zcashd --version` to find out
|
||||
|
||||
### Machine specs:
|
||||
- OS name + version:
|
||||
- CPU:
|
||||
- RAM:
|
||||
- Disk size:
|
||||
- Disk Type (HD/SDD):
|
||||
- Linux kernel version (uname -a):
|
||||
- Compiler version (gcc --version):
|
||||
- Linker version (ld -v):
|
||||
- Assembler version (as --version):
|
||||
|
||||
### Any extra information that might be useful in the debugging process.
|
||||
This includes the relevant contents of `~/.zcash/debug.log`. You can paste raw
|
||||
text, attach the file directly in the issue or link to the text via a pastebin
|
||||
type site. Please also include any non-standard things you did during
|
||||
compilation (extra flags, dependency version changes etc.) if applicable.
|
||||
|
||||
### Do you have a backup of `~/.zcash` directory and/or take a VM snapshot?
|
||||
- Backing up / making a copy of the `~/.zcash` directory might help make the
|
||||
problem reproducible. Please redact appropriately.
|
||||
- Taking a VM snapshot is really helpful for interactively testing fixes
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for zcashd.
|
||||
title: ''
|
||||
labels: 'use case'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Example: I'm always
|
||||
frustrated when [...]
|
||||
|
||||
## Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
## Alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've
|
||||
considered.
|
||||
|
||||
## Additional context
|
||||
Add any other context or screenshots about the feature request here.
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
name: UX report
|
||||
about: Was zcashd hard to use? It's not you, it's us. We want to hear about it.
|
||||
title: 'UX: '
|
||||
labels: 'usability'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Did zcashd not do what you expected?
|
||||
Was it hard to figure out how to do something?
|
||||
Could an error message be more helpful?
|
||||
It's not you, it's us. We want to hear about it. -->
|
||||
|
||||
## What were you trying to do
|
||||
|
||||
## What happened
|
|
@ -0,0 +1,14 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
timezone: Etc/UTC
|
||||
open-pull-requests-limit: 10
|
||||
reviewers:
|
||||
- str4d
|
||||
assignees:
|
||||
- str4d
|
||||
labels:
|
||||
- "A-CI"
|
|
@ -0,0 +1,5 @@
|
|||
Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
|
||||
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
|
||||
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release
|
||||
|
||||
As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged
|
|
@ -0,0 +1,32 @@
|
|||
name: zcashd book
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v1
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
|
||||
- name: Install mdbook-katex
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: mdbook-katex
|
||||
|
||||
- name: Build zcashd book
|
||||
run: mdbook build doc/book/
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./doc/book/book
|
|
@ -0,0 +1,106 @@
|
|||
name: Lints
|
||||
|
||||
# We only run these lints on trial-merges of PRs to reduce noise.
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
commit-script-check:
|
||||
name: Scripted diffs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Check scripted diffs
|
||||
run: ./test/lint/commit-script-check.sh ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
|
||||
general-lints:
|
||||
name: General
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cargo patches
|
||||
run: ./test/lint/lint-cargo-patches.sh
|
||||
if: always()
|
||||
|
||||
- name: Include guards
|
||||
run: ./test/lint/lint-include-guards.sh
|
||||
if: always()
|
||||
|
||||
- name: Includes
|
||||
run: ./test/lint/lint-includes.sh
|
||||
if: always()
|
||||
|
||||
- name: Locale dependence
|
||||
run: ./test/lint/lint-locale-dependence.sh
|
||||
if: always()
|
||||
continue-on-error: true # Temporary until we get this passing
|
||||
|
||||
- name: Shebang
|
||||
run: ./test/lint/lint-shebang.sh
|
||||
if: always()
|
||||
continue-on-error: true # Temporary until we get this passing
|
||||
|
||||
- name: Shell locale
|
||||
run: ./test/lint/lint-shell-locale.sh
|
||||
if: always()
|
||||
continue-on-error: true # Temporary until we get this passing
|
||||
|
||||
- name: Shellcheck
|
||||
run: ./test/lint/lint-shell.sh
|
||||
if: always()
|
||||
continue-on-error: true # Temporary until we get this passing
|
||||
|
||||
- name: Whitespace
|
||||
run: ./test/lint/lint-whitespace.sh
|
||||
if: always()
|
||||
|
||||
python:
|
||||
name: Python
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: sudo python3 -m pip install pyflakes
|
||||
|
||||
- name: Pyflakes
|
||||
run: pyflakes qa src zcutil
|
||||
if: always()
|
||||
|
||||
- name: UTF-8 encoding
|
||||
run: ./test/lint/lint-python-utf8-encoding.sh
|
||||
if: always()
|
||||
|
||||
rust-clippy:
|
||||
name: Clippy (1.59.0)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.59.0
|
||||
components: clippy
|
||||
override: true
|
||||
- name: Run clippy
|
||||
uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
name: Clippy (1.59.0)
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all-features --all-targets -- -D warnings
|
||||
|
||||
rustfmt:
|
||||
name: Rustfmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.59.0
|
||||
override: true
|
||||
- run: rustup component add rustfmt
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: -- --check
|
|
@ -0,0 +1,129 @@
|
|||
*.tar.gz
|
||||
*.deb
|
||||
*.exe
|
||||
src/bitcoin
|
||||
src/zcashd
|
||||
src/zcashd-wallet-tool
|
||||
src/zcash-cli
|
||||
src/zcash-gtest
|
||||
src/zcash-tx
|
||||
src/test/test_bitcoin
|
||||
zcutil/bin/
|
||||
|
||||
*zcashTest.pk
|
||||
*zcashTest.vk
|
||||
|
||||
# autoreconf
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
build-aux/depcomp
|
||||
build-aux/install-sh
|
||||
build-aux/ltmain.sh
|
||||
build-aux/m4/libtool.m4
|
||||
build-aux/m4/lt~obsolete.m4
|
||||
build-aux/m4/ltoptions.m4
|
||||
build-aux/m4/ltsugar.m4
|
||||
build-aux/m4/ltversion.m4
|
||||
build-aux/missing
|
||||
build-aux/compile
|
||||
build-aux/test-driver
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
libtool
|
||||
src/config/bitcoin-config.h
|
||||
src/config/bitcoin-config.h.in
|
||||
src/config/stamp-h1
|
||||
share/setup.nsi
|
||||
confdefs.h
|
||||
conftest.cpp
|
||||
conftest.err
|
||||
|
||||
cache/
|
||||
venv-mnf/
|
||||
src/univalue/gen
|
||||
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs
|
||||
.*.swp
|
||||
*.*~*
|
||||
*.bak
|
||||
*.rej
|
||||
*.orig
|
||||
*.pyc
|
||||
*.o
|
||||
*.o.tmp
|
||||
*.o-*
|
||||
.zcash
|
||||
*.a
|
||||
*.lib
|
||||
*.pb.cc
|
||||
*.pb.h
|
||||
.vscode
|
||||
|
||||
*.log
|
||||
*.trs
|
||||
*.dmg
|
||||
|
||||
*.json.h
|
||||
*.raw.h
|
||||
|
||||
#libtool object files
|
||||
*.lo
|
||||
*.la
|
||||
|
||||
# Compilation
|
||||
Makefile
|
||||
|
||||
# Rust
|
||||
.cargo/.configured-for-*
|
||||
.cargo/config
|
||||
target/
|
||||
|
||||
# Unit-tests
|
||||
Makefile.test
|
||||
src/test/buildenv.py
|
||||
|
||||
# Resources cpp
|
||||
qrc_*.cpp
|
||||
|
||||
# Mac specific
|
||||
.DS_Store
|
||||
build
|
||||
|
||||
#lcov
|
||||
*.gcno
|
||||
*.gcda
|
||||
/*.info
|
||||
test_bitcoin.coverage/
|
||||
zcash-gtest.coverage/
|
||||
total.coverage/
|
||||
coverage_percent.txt
|
||||
afl-temp
|
||||
|
||||
#build tests
|
||||
linux-coverage-build
|
||||
linux-build
|
||||
win32-build
|
||||
qa/pull-tester/tests_config.py
|
||||
qa/pull-tester/tests_config.ini
|
||||
qa/cache/*
|
||||
|
||||
!src/leveldb*/Makefile
|
||||
|
||||
/doc/doxygen/
|
||||
|
||||
libzcash_script.pc
|
||||
|
||||
contrib/debian/files
|
||||
contrib/debian/substvars
|
||||
|
||||
src/fuzzing/*/input
|
||||
src/fuzzing/*/output
|
||||
src/fuzz.cpp
|
||||
|
||||
.updatecheck-token
|
|
@ -0,0 +1 @@
|
|||
Please read [our Development Guidelines](https://zcash.readthedocs.io/en/latest/rtd_pages/development_guidelines.html).
|
|
@ -0,0 +1,44 @@
|
|||
Copyright (c) 2016-2022 The Zcash developers
|
||||
Copyright (c) 2009-2022 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2022 Bitcoin Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
The MIT software license (https://www.opensource.org/licenses/mit-license.php)
|
||||
above applies to the code directly included in this source distribution, with
|
||||
the exception of certain Autoconf macros. Dependencies downloaded as part of
|
||||
the build process may be covered by other open-source licenses. The MIT-licensed
|
||||
source code is not considered a derived work of these Autoconf macros or of the
|
||||
dependencies. For further details see 'contrib/debian/copyright'.
|
||||
|
||||
|
||||
Although almost all of the Zcash code is licensed under "permissive" open source
|
||||
licenses, users and distributors should note that when built using the default
|
||||
build options, Zcash depends on Oracle Berkeley DB 6.2.x, which is licensed
|
||||
under the GNU Affero General Public License.
|
||||
|
||||
|
||||
Contributors should understand licensing implications before modifying the
|
||||
following files in build-aux/m4 (see https://github.com/zcash/zcash/issues/2827):
|
||||
|
||||
* ax_check_compile_flag.m4
|
||||
* ax_check_link_flag.m4
|
||||
* ax_check_preproc_flag.m4
|
||||
* ax_pthread.m4
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,5 @@
|
|||
Building Zcash
|
||||
|
||||
See the Zcash documentation wiki (https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html) for instructions on building zcashd,
|
||||
the intended-for-services, no-graphical-interface, reference
|
||||
implementation of Zcash.
|
|
@ -0,0 +1,176 @@
|
|||
# Copyright (c) 2016-2019 The Zcash developers
|
||||
# Copyright (c) 2013-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2013-2019 Bitcoin Developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
||||
# Pattern rule to print variables, e.g. make print-top_srcdir
|
||||
print-%:
|
||||
@echo $* = $($*)
|
||||
|
||||
ACLOCAL_AMFLAGS = -I build-aux/m4
|
||||
SUBDIRS = src
|
||||
if ENABLE_MAN
|
||||
SUBDIRS += doc/man
|
||||
endif
|
||||
.PHONY: deploy FORCE
|
||||
|
||||
GZIP_ENV="-9n"
|
||||
|
||||
if BUILD_BITCOIN_LIBS
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libzcash_script.pc
|
||||
endif
|
||||
|
||||
BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/$(BITCOIN_CLI_NAME)$(EXEEXT)
|
||||
|
||||
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
|
||||
|
||||
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
|
||||
$(top_srcdir)/contrib/devtools/security-check.py
|
||||
|
||||
COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
|
||||
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
|
||||
baseline_filtered.info \
|
||||
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
|
||||
zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
|
||||
|
||||
dist-hook:
|
||||
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
|
||||
|
||||
$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
|
||||
$(MAKE) -C src $(patsubst src/%,%,$@)
|
||||
|
||||
$(BITCOIND_BIN): FORCE
|
||||
$(MAKE) -C src $(@F)
|
||||
|
||||
$(BITCOIN_CLI_BIN): FORCE
|
||||
$(MAKE) -C src $(@F)
|
||||
|
||||
check-security: FORCE
|
||||
$(MAKE) -C src check-security
|
||||
|
||||
check-symbols: FORCE
|
||||
$(MAKE) -C src check-symbols
|
||||
|
||||
if USE_LCOV
|
||||
|
||||
baseline.info:
|
||||
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
|
||||
|
||||
baseline_filtered.info: baseline.info
|
||||
$(LCOV) -r $< "/usr/include/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
|
||||
"$(abs_builddir)/src/gtest/*" \
|
||||
"$(abs_builddir)/src/test/*" \
|
||||
"$(abs_builddir)/src/wallet/gtest/*" \
|
||||
"$(abs_builddir)/src/wallet/test/*" \
|
||||
-o $@
|
||||
|
||||
leveldb_baseline.info: baseline_filtered.info
|
||||
$(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
|
||||
|
||||
leveldb_baseline_filtered.info: leveldb_baseline.info
|
||||
$(LCOV) -r $< "/usr/include/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
|
||||
"$(abs_builddir)/src/gtest/*" \
|
||||
"$(abs_builddir)/src/test/*" \
|
||||
"$(abs_builddir)/src/wallet/gtest/*" \
|
||||
"$(abs_builddir)/src/wallet/test/*" \
|
||||
-o $@
|
||||
|
||||
baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
|
||||
$(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
|
||||
|
||||
test_bitcoin.info: baseline_filtered_combined.info
|
||||
$(MAKE) -C src/ bitcoin_test_check
|
||||
$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
|
||||
$(LCOV) -z -d $(abs_builddir)/src
|
||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||
|
||||
test_bitcoin_filtered.info: test_bitcoin.info
|
||||
$(LCOV) -r $< "/usr/include/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
|
||||
"$(abs_builddir)/src/gtest/*" \
|
||||
"$(abs_builddir)/src/test/*" \
|
||||
"$(abs_builddir)/src/wallet/gtest/*" \
|
||||
"$(abs_builddir)/src/wallet/test/*" \
|
||||
-o $@
|
||||
|
||||
zcash-gtest.info: baseline_filtered_combined.info
|
||||
$(MAKE) -C src/ zcash-gtest_check
|
||||
$(LCOV) -c -d $(abs_builddir)/src -t zcash-gtest -o $@
|
||||
$(LCOV) -z -d $(abs_builddir)/src
|
||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||
|
||||
zcash-gtest_filtered.info: zcash-gtest.info
|
||||
$(LCOV) -r $< "/usr/include/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
|
||||
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
|
||||
"$(abs_builddir)/src/gtest/*" \
|
||||
"$(abs_builddir)/src/test/*" \
|
||||
"$(abs_builddir)/src/wallet/gtest/*" \
|
||||
"$(abs_builddir)/src/wallet/test/*" \
|
||||
-o $@
|
||||
|
||||
test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
|
||||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
|
||||
|
||||
zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info
|
||||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@
|
||||
|
||||
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info
|
||||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a zcash-gtest_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||
|
||||
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
|
||||
$(GENHTML) -s $< -o $(@D)
|
||||
@touch $@
|
||||
|
||||
zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info
|
||||
$(GENHTML) -s $< -o $(@D)
|
||||
@touch $@
|
||||
|
||||
cov-zcash: zcash-gtest.coverage/.dirstamp
|
||||
|
||||
total.coverage/.dirstamp: total_coverage.info
|
||||
$(GENHTML) -s $< -o $(@D)
|
||||
@touch $@
|
||||
|
||||
cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
|
||||
|
||||
endif
|
||||
|
||||
dist_bin_SCRIPTS = zcutil/fetch-params.sh
|
||||
dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
|
||||
|
||||
RUST_DIST = $(top_srcdir)/.cargo $(top_srcdir)/Cargo.toml $(top_srcdir)/Cargo.lock rust-toolchain
|
||||
|
||||
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-tests qa/zcash $(DIST_DOCS) $(BIN_CHECKS) $(RUST_DIST)
|
||||
|
||||
install-exec-hook:
|
||||
mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
|
||||
|
||||
.INTERMEDIATE: $(COVERAGE_INFO)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||
|
||||
clean-local:
|
||||
rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/
|
||||
rm -rf afl-temp
|
||||
rm -rf qa/pull-tester/__pycache__
|
||||
|
||||
distclean-local:
|
||||
rm -f zcutil/bin/db_*
|
||||
rmdir zcutil/bin 2>/dev/null || true
|
|
@ -0,0 +1,66 @@
|
|||
Zcash 5.0.0
|
||||
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
|
||||
===========
|
||||
|
||||
What is Zcash?
|
||||
--------------
|
||||
|
||||
[Zcash](https://z.cash/) is an implementation of the "Zerocash" protocol.
|
||||
Based on Bitcoin's code, Zcash intends to offer a far higher standard of privacy
|
||||
through a sophisticated zero-knowledge proving scheme that preserves
|
||||
confidentiality of transaction metadata. More technical details are available
|
||||
in our [Protocol Specification](https://zips.z.cash/protocol/protocol.pdf).
|
||||
|
||||
This software is the Zcash client. It downloads and stores the entire history
|
||||
of Zcash transactions; depending on the speed of your computer and network
|
||||
connection, the synchronization process could take a day or more once the
|
||||
blockchain has reached a significant size.
|
||||
|
||||
<p align="center">
|
||||
<img src="doc/imgs/zcashd_screen.gif" height="500">
|
||||
</p>
|
||||
|
||||
#### :lock: Security Warnings
|
||||
|
||||
See important security warnings on the
|
||||
[Security Information page](https://z.cash/support/security/).
|
||||
|
||||
**Zcash is experimental and a work in progress.** Use it at your own risk.
|
||||
|
||||
#### :ledger: Deprecation Policy
|
||||
|
||||
This release is considered deprecated 16 weeks after the release day. There
|
||||
is an automatic deprecation shutdown feature which will halt the node some
|
||||
time after this 16-week period. The automatic feature is based on block
|
||||
height.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please see our [user guide](https://zcash.readthedocs.io/en/latest/rtd_pages/rtd_docs/user_guide.html) for joining the main Zcash network.
|
||||
|
||||
### Need Help?
|
||||
|
||||
* :blue_book: See the documentation at the [ReadTheDocs](https://zcash.readthedocs.io)
|
||||
for help and more information.
|
||||
* :incoming_envelope: Ask for help on the [Zcash](https://forum.z.cash/) forum.
|
||||
* :speech_balloon: Join our community on [Discord](https://discordapp.com/invite/PhJY6Pm)
|
||||
|
||||
Participation in the Zcash project is subject to a
|
||||
[Code of Conduct](code_of_conduct.md).
|
||||
|
||||
### Building
|
||||
|
||||
Build Zcash along with most dependencies from source by running the following command:
|
||||
|
||||
```
|
||||
./zcutil/build.sh -j$(nproc)
|
||||
```
|
||||
|
||||
Currently, Zcash is only officially supported on Debian and Ubuntu. See the
|
||||
[Debian / Ubuntu build](https://zcash.readthedocs.io/en/latest/rtd_pages/Debian-Ubuntu-build.html)
|
||||
for detailed instructions.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
For license information see the file [COPYING](COPYING).
|
|
@ -0,0 +1,66 @@
|
|||
This page is copyright The Electric Coin Company, 2019. It is posted in order to conform to this standard: https://github.com/RD-Crypto-Spec/Responsible-Disclosure/tree/d47a5a3dafa5942c8849a93441745fdd186731e6
|
||||
|
||||
# Security Disclosures
|
||||
## Receiving Disclosures
|
||||
|
||||
The Electric Coin Company is committed to working with researchers who submit security vulnerability notifications to us to resolve those issues on an appropriate timeline and perform a coordinated release, giving credit to the reporter if they would like.
|
||||
|
||||
Please submit issues to security@z.cash, using the following PGP key:
|
||||
|
||||
```
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBFaegcoBCAC+G82ZBYYm1GoVn4dKa0WiLYD/Q+BuU89PS1X7A4eOOy8g9yS4
|
||||
wJKMzB0AxFsH/t85P7pPZwHw3i2gmiJKeIqEGhEBL08D3id2u6ZyCnwDuWs0i6My
|
||||
MXWTwK5shvE61ZI/KPbjemoOG6MPF5QdrouNqei2Vk+4RjbRCyyS0A59GQi2dNZX
|
||||
BMwTnHnUZ5qi6T0RFelqJ3dE5Nc/UwJPdAcg71c3b3dMOHjaDBMPB6+fTLBeidV6
|
||||
5B72nGO3eIYkMUNj+qCQmM/esRkmGmlDH/9WGMBOKCq7Yw3LyEoPOi5cba1m8SN2
|
||||
xFlNzkUGrlVrwZMF+1UdjvN7BGDypA3Dr/STABEBAAG0JVpjYXNoIFNlY3VyaXR5
|
||||
IFRlYW0gPHNlY3VyaXR5QHouY2FzaD6JATcEEwEIACEFAlaegcoCGwMFCwkIBwIG
|
||||
FQgJCgsCBBYCAwECHgECF4AACgkQiPuLhti1poxlRAf/bZ6fhUby5bAbViAO4TzQ
|
||||
yfbD0ksGeF8MHicPz7HqOYuXAE9GrKnVAOFptwRo94O+iRC5aXhW8OAP+38IWorv
|
||||
gsAuag7Y8k0nlfNdrJRqqJpjyxtiuv+cd2o5dre8E9PVNE5IPv9qEJA4Zag3snmC
|
||||
a+O4HAqKeXYddunFq2drLkTRlOwuFkGXJzwi3VSNVYCuuGyezFDuaD45ltmsXgid
|
||||
jZSdnnc6L1BrEd9LVzahvFV0+fT4bNKQHQDk+f0RTnHed+m9NqAoC9K8ftPTQ/i4
|
||||
5+W/dXJATztWDrJ7ZevHXGR+RAhMNsT1psvnQsJzMkUz1GMdQOtk4PfuZLGSIiTM
|
||||
ErkBDQRWnoHKAQgAp+w+xsPJWFdadE6Ok1aZC0Lk1J9xU/cqX1aBlkwi5SynwOkV
|
||||
Eg1xNHLJMelp13bgDjLRsvaMbsseaCVk3goNln4atNbZpqz6FoM/f8pJx52LFD0j
|
||||
CFFOVUlGEF0h+KdFr+3JHI+mg+3ifXTD4Dajj4lpu8kR/FQjftcxyttByz01wLRO
|
||||
sK5BDC856WzHXAJuX6TpX4sGJujzKoLXR5V0SkUopqn9g4aJGnWuNh4kyOQI6fd7
|
||||
YZyPZhWDrXdgInCKAKAgq8r6hgSDMYFvmflp6+reCfeOe1VFF8q3Foio02YPIrQW
|
||||
WjjH0w6nOvOKCEtxistz1sP6ZoYq4gR41LOwIQARAQABiQEfBBgBCAAJBQJWnoHK
|
||||
AhsMAAoJEIj7i4bYtaaMiA4IALIy4xP/Btu86yT3b53t8cfYZddFSO8Nlg+y3EMu
|
||||
1LchdSOpWgpXCvQ7d4ndWGsuBSmQ+jaRwU2UIkq2iIxf5cg63dJz9grAcF6MXCrO
|
||||
t5BSowFC4m3RFaEaG6G6SjDVIA0ZEdEMFd9Gzc1ikqbVLyNuJXKmzz0evvbAJgVO
|
||||
D0nht5ifwLjQxM4olvYHUwtT0wPhniH69ghFo8LQiMgncjaukDzbgANiuj07QYy/
|
||||
DlzhQUsp1qZvqZnVKqUJ3lFb86b6zoqoRNiUnvP9JB2v3kLG0T39UlcXUFnZJ/4H
|
||||
CDHCrwSovQRMHtoOWZijBNobO2y1d0FkUpzNlNw44Ssw0Vo=
|
||||
=6GYS
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
```
|
||||
|
||||
## Sending Disclosures
|
||||
|
||||
In the case where we become aware of security issues affecting other projects that has never affected Zcash, our intention is to inform those projects of security issues on a best effort basis.
|
||||
|
||||
In the case where we fix a security issue in Zcash that also affects the following neighboring projects, our intention is to engage in responsible disclosures with them as described in https://github.com/RD-Crypto-Spec/Responsible-Disclosure, subject to the deviations described in the section at the bottom of this document.
|
||||
|
||||
## Bilateral Responsible Disclosure Agreements
|
||||
|
||||
We have set up agreements with the following neighboring projects to share vulnerability information, subject to the deviations described in the next section.
|
||||
|
||||
Specifically, we have agreed to engage in responsible disclosures for security issues affecting this repository with the following contacts:
|
||||
|
||||
- Zcash Foundation https://github.com/ZcashFoundation/zebra/security/policy
|
||||
- Horizen security@horizen.com via PGP
|
||||
- Komodo ca333@komodoplatform.com via PGP
|
||||
- BitcoinABC https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/DISCLOSURE_POLICY.md
|
||||
|
||||
## Deviations from the Standard
|
||||
|
||||
Zcash is a technology that provides strong privacy. Notes are encrypted to their destination, and then the monetary base is kept via zero-knowledge proofs intended to only be creatable by the real holder of Zcash. If this fails, and a counterfeiting bug results, that counterfeiting bug might be exploited without any way for blockchain analyzers to identify the perpetrator or which data in the blockchain has been used to exploit the bug. Rollbacks before that point, such as have been executed in some other projects in such cases, are therefore impossible.
|
||||
|
||||
The standard describes reporters of vulnerabilities including full details of an issue, in order to reproduce it. This is necessary for instance in the case of an external researcher both demonstrating and proving that there really is a security issue, and that security issue really has the impact that they say it has - allowing the development team to accurately prioritize and resolve the issue.
|
||||
|
||||
In the case of a counterfeiting bug, however, just like in CVE-2019-7167, we might decide not to include those details with our reports to partners ahead of coordinated release, so long as we are sure that they are vulnerable.
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2016-2019 The Zcash developers
|
||||
# Copyright (c) 2013-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2013-2019 Bitcoin Developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
||||
export LC_ALL=C
|
||||
set -e
|
||||
srcdir="$(dirname $0)"
|
||||
cd "$srcdir"
|
||||
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then
|
||||
LIBTOOLIZE="${GLIBTOOLIZE}"
|
||||
export LIBTOOLIZE
|
||||
fi
|
||||
autoreconf --install --force --warnings=all
|
|
@ -0,0 +1,291 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for the Boost C++ libraries of a particular version (or newer)
|
||||
#
|
||||
# If no path to the installed boost library is given the macro searches
|
||||
# under /usr, /usr/local, /opt and /opt/local and evaluates the
|
||||
# $BOOST_ROOT environment variable. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Peter Adolphs
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 26
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
AC_ARG_WITH([boost],
|
||||
[AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
|
||||
[use Boost library from a standard location (ARG=yes),
|
||||
from the specified location (ARG=<path>),
|
||||
or disable it (ARG=no)
|
||||
@<:@ARG=yes@:>@ ])],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ac_boost_path=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ac_boost_path="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
|
||||
[
|
||||
if test -d "$withval"
|
||||
then
|
||||
ac_boost_lib_path="$withval"
|
||||
else
|
||||
AC_MSG_ERROR(--with-boost-libdir expected directory name)
|
||||
fi
|
||||
],
|
||||
[ac_boost_lib_path=""]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
|
||||
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
|
||||
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
|
||||
boost_lib_version_req_sub_minor="0"
|
||||
fi
|
||||
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
|
||||
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
|
||||
succeeded=no
|
||||
|
||||
dnl On 64-bit systems check for system libraries in both lib64 and lib.
|
||||
dnl The former is specified by FHS, but e.g. Debian does not adhere to
|
||||
dnl this (as it rises problems for generic multi-arch support).
|
||||
dnl The last entry in the list is chosen by default when no libraries
|
||||
dnl are found, e.g. when only header-only libraries are installed!
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
x86_64)
|
||||
libsubdirs="lib64 libx32 lib lib64"
|
||||
;;
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le)
|
||||
libsubdirs="lib64 lib lib64 ppc64le"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
|
||||
dnl them priority over the other paths since, if libs are found there, they
|
||||
dnl are almost assuredly the ones desired.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
|
||||
|
||||
case ${host_cpu} in
|
||||
i?86)
|
||||
libsubdirs="lib/i386-${host_os} $libsubdirs"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl some arches may advertise a cpu type that doesn't line up with their
|
||||
dnl prefix's cpu type. For example, uname may report armv7l while libs are
|
||||
dnl installed to /usr/lib/arm-linux-gnueabihf. Try getting the compiler's
|
||||
dnl value for an extra chance of finding the correct path.
|
||||
libsubdirs="lib/`$CXX -dumpmachine 2>/dev/null` $libsubdirs"
|
||||
|
||||
dnl first we check the system location for boost libraries
|
||||
dnl this location is chosen if boost libraries are installed with the --layout=system option
|
||||
dnl or if you install boost with RPM
|
||||
if test "$ac_boost_path" != ""; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include"
|
||||
for ac_boost_path_tmp in $libsubdirs; do
|
||||
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif test "$cross_compiling" != yes; then
|
||||
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
if test "$ac_boost_lib_path" != ""; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_lib_path"
|
||||
fi
|
||||
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
|
||||
|
||||
dnl if we found no boost with system layout we search for boost libraries
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
BOOST_LDFLAGS=
|
||||
_version=0
|
||||
if test "$ac_boost_path" != ""; then
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
_version=$_version_tmp
|
||||
fi
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
dnl if nothing found search for layout used in Windows distributions
|
||||
if test -z "$BOOST_CPPFLAGS"; then
|
||||
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$cross_compiling" != yes; then
|
||||
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
_version=$_version_tmp
|
||||
best_path=$ac_boost_path
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test "$ac_boost_lib_path" = ""; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$best_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOST_ROOT" != "x"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
|
||||
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
if test "$succeeded" != "yes" ; then
|
||||
if test "$_version" = "0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
else
|
||||
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
|
||||
fi
|
||||
# execute ACTION-IF-NOT-FOUND (if present):
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
|
||||
# execute ACTION-IF-FOUND (if present):
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
|
||||
])
|
|
@ -0,0 +1,119 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_CHRONO
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for System library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CHRONO_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_CHRONO
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2012 Xiyue Deng <manphiz@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN([AX_BOOST_CHRONO],
|
||||
[
|
||||
AC_ARG_WITH([boost-chrono],
|
||||
AS_HELP_STRING([--with-boost-chrono@<:@=special-lib@:>@],
|
||||
[use the Chrono library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-chrono=boost_chrono-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_chrono_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_chrono_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Chrono library is available,
|
||||
ax_cv_boost_chrono,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/chrono.hpp>]],
|
||||
[[boost::chrono::system_clock::time_point time;]])],
|
||||
ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_chrono" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_CHRONO,,[define if the Boost::Chrono library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
if test "x$ax_boost_user_chrono_lib" = "x"; then
|
||||
ax_lib=
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
|
||||
[link_chrono="no"])
|
||||
done
|
||||
if test "x$link_chrono" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_chrono*.dll* $BOOSTLIBDIR/boost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_chrono.*\)\.dll.*$;\1;' -e 's;^\(boost_chrono.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
|
||||
[link_chrono="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_chrono_lib boost_chrono-$ax_boost_user_chrono_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
|
||||
[link_chrono="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_chrono library!)
|
||||
fi
|
||||
if test "x$link_chrono" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,119 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_FILESYSTEM
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Filesystem library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_FILESYSTEM_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_FILESYSTEM
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Michael Tindal
|
||||
# Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 26
|
||||
|
||||
AC_DEFUN([AX_BOOST_FILESYSTEM],
|
||||
[
|
||||
AC_ARG_WITH([boost-filesystem],
|
||||
AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
|
||||
[use the Filesystem library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_filesystem_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_filesystem_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
LIBS_SAVED=$LIBS
|
||||
LIBS="$LIBS $BOOST_SYSTEM_LIB"
|
||||
export LIBS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
|
||||
ax_cv_boost_filesystem,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
|
||||
[[using namespace boost::filesystem;
|
||||
path my_path( "foo/bar/data.txt" );
|
||||
return 0;]])],
|
||||
ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_filesystem" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
ax_lib=
|
||||
if test "x$ax_boost_user_filesystem_lib" = "x"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
if test "x$link_filesystem" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_filesystem library!)
|
||||
fi
|
||||
if test "x$link_filesystem" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
LIBS="$LIBS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,108 @@
|
|||
# ============================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_program_options.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_PROGRAM_OPTIONS
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for program options library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_PROGRAM_OPTIONS
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 24
|
||||
|
||||
AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
|
||||
[
|
||||
AC_ARG_WITH([boost-program-options],
|
||||
AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
|
||||
[use the program options library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_program_options_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_program_options_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
export want_boost
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
|
||||
ax_cv_boost_program_options,
|
||||
[AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options/errors.hpp>
|
||||
]],
|
||||
[[boost::program_options::error err("Error message");
|
||||
return 0;]])],
|
||||
ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "$ax_cv_boost_program_options" = yes; then
|
||||
AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_program_options_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
if test "x$link_program_options" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_program_options library!)
|
||||
fi
|
||||
if test "x$link_program_options" != "xyes"; then
|
||||
AC_MSG_ERROR([Could not link against [$ax_lib] !])
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,122 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_SYSTEM
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for System library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_SYSTEM_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_SYSTEM
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2008 Michael Tindal
|
||||
# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 18
|
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
[
|
||||
AC_ARG_WITH([boost-system],
|
||||
AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
|
||||
[use the System library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-system=boost_system-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_system_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_system_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::System library is available,
|
||||
ax_cv_boost_system,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
CXXFLAGS=
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
|
||||
[[boost::system::error_category *a = 0;]])],
|
||||
ax_cv_boost_system=yes, ax_cv_boost_system=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_system" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
if test "x$ax_boost_user_system_lib" = "x"; then
|
||||
ax_lib=
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
if test "x$link_system" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_system library!)
|
||||
fi
|
||||
if test "x$link_system" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,150 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_THREAD
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Thread library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_THREAD_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_THREAD
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Michael Tindal
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 27
|
||||
|
||||
AC_DEFUN([AX_BOOST_THREAD],
|
||||
[
|
||||
AC_ARG_WITH([boost-thread],
|
||||
AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
|
||||
[use the Thread library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-thread=boost_thread-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_thread_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_thread_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Thread library is available,
|
||||
ax_cv_boost_thread,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
CXXFLAGS="-pthreads $CXXFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
CXXFLAGS="-mthreads $CXXFLAGS"
|
||||
else
|
||||
CXXFLAGS="-pthread $CXXFLAGS"
|
||||
fi
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
|
||||
[[boost::thread_group thrds;
|
||||
return 0;]])],
|
||||
ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_thread" = "xyes"; then
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
||||
else
|
||||
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
LDFLAGS="-pthread $LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
if test "x$ax_boost_user_thread_lib" = "x"; then
|
||||
ax_lib=
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
if test "x$link_thread" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_thread library!)
|
||||
fi
|
||||
if test "x$link_thread" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
else
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,138 @@
|
|||
# ================================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html
|
||||
# ================================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Unit_Test_Framework library from the Boost C++ libraries. The
|
||||
# macro requires a preceding call to AX_BOOST_BASE. Further documentation
|
||||
# is available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_UNIT_TEST_FRAMEWORK
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 19
|
||||
|
||||
AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
|
||||
[
|
||||
AC_ARG_WITH([boost-unit-test-framework],
|
||||
AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@],
|
||||
[use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_unit_test_framework_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_unit_test_framework_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available,
|
||||
ax_cv_boost_unit_test_framework,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]],
|
||||
[[using boost::unit_test::test_suite;
|
||||
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]])],
|
||||
ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
ax_lib=
|
||||
for monitor_library in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.so* $BOOSTLIBDIR/libboost_unit_test_framework*.dylib* $BOOSTLIBDIR/libboost_unit_test_framework*.a* 2>/dev/null` ; do
|
||||
if test -r $monitor_library ; then
|
||||
libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a.*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_unit_test_framework="yes"
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
fi
|
||||
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "x$link_unit_test_framework" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_unit_test_framework*.dll* $BOOSTLIBDIR/boost_unit_test_framework*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;' -e 's;^\(boost_unit_test_framework.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break],
|
||||
[link_unit_test_framework="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
for ax_lib in boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib $ax_boost_user_unit_test_framework_lib ; do
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
break;
|
||||
fi
|
||||
for unittest_library in `ls $BOOSTLIBDIR/lib${ax_lib}.so* $BOOSTLIBDIR/lib${ax_lib}.a* 2>/dev/null` ; do
|
||||
if test -r $unittest_library ; then
|
||||
libextension=`echo $unittest_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_unit_test_framework="yes"
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
fi
|
||||
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_unit_test_framework library!)
|
||||
fi
|
||||
if test "x$link_unit_test_framework" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,74 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
|
@ -0,0 +1,74 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the linker or gives an error.
|
||||
# (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
|
||||
# when the check is done. The check is thus made with the flags: "LDFLAGS
|
||||
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
|
||||
# issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_LINK_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
|
||||
AC_DEFUN([AX_CHECK_LINK_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS $4 $1"
|
||||
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
LDFLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_LINK_FLAGS
|
|
@ -0,0 +1,74 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's
|
||||
# preprocessor or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the preprocessor's default
|
||||
# flags when the check is done. The check is thus made with the flags:
|
||||
# "CPPFLAGS EXTRA-FLAGS FLAG". This can for example be used to force the
|
||||
# preprocessor to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_PREPROC_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{COMPILE,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
|
||||
AC_DEFUN([AX_CHECK_PREPROC_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $4 $1"
|
||||
AC_PREPROC_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
CPPFLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_PREPROC_FLAGS
|
|
@ -0,0 +1,951 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the specified
|
||||
# version of the C++ standard. If necessary, add switches to CXX and
|
||||
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
|
||||
# or '14' (for the C++14 standard).
|
||||
#
|
||||
# The second argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The third argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline support for the specified C++ standard is
|
||||
# required and that the macro should error out if no mode with that
|
||||
# support is found. If specified 'optional', then configuration proceeds
|
||||
# regardless, after defining HAVE_CXX${VERSION} if and only if a
|
||||
# supporting mode is found.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
|
||||
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 11
|
||||
|
||||
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
|
||||
dnl (serial version number 13).
|
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
||||
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
|
||||
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
|
||||
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
|
||||
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$2], [], [],
|
||||
[$2], [ext], [],
|
||||
[$2], [noext], [],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
|
||||
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
|
||||
m4_if([$2], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
switch="-std=gnu++${alternative}"
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$2], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
dnl HP's aCC needs +std=c++11 according to:
|
||||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||
dnl Cray's crayCC needs "-h std=c++11"
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x$ac_success = xyes; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||
fi
|
||||
fi
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX$1=0
|
||||
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||
else
|
||||
HAVE_CXX$1=1
|
||||
AC_DEFINE(HAVE_CXX$1,1,
|
||||
[define if the compiler supports basic C++$1 syntax])
|
||||
fi
|
||||
AC_SUBST(HAVE_CXX$1)
|
||||
])
|
||||
|
||||
|
||||
dnl Test body for checking C++11 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
)
|
||||
|
||||
|
||||
dnl Test body for checking C++14 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
)
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
)
|
||||
|
||||
dnl Tests for new features in C++11
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++11, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201103L
|
||||
|
||||
#error "This is not a C++11 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx11
|
||||
{
|
||||
|
||||
namespace test_static_assert
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_final_override
|
||||
{
|
||||
|
||||
struct Base
|
||||
{
|
||||
virtual ~Base() {}
|
||||
virtual void f() {}
|
||||
};
|
||||
|
||||
struct Derived : public Base
|
||||
{
|
||||
virtual ~Derived() override {}
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_double_right_angle_brackets
|
||||
{
|
||||
|
||||
template < typename T >
|
||||
struct check {};
|
||||
|
||||
typedef check<void> single_type;
|
||||
typedef check<check<void>> double_type;
|
||||
typedef check<check<check<void>>> triple_type;
|
||||
typedef check<check<check<check<void>>>> quadruple_type;
|
||||
|
||||
}
|
||||
|
||||
namespace test_decltype
|
||||
{
|
||||
|
||||
int
|
||||
f()
|
||||
{
|
||||
int a = 1;
|
||||
decltype(a) b = 2;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_type_deduction
|
||||
{
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
auto
|
||||
add(T1 a1, T2 a2) -> decltype(a1 + a2)
|
||||
{
|
||||
return a1 + a2;
|
||||
}
|
||||
|
||||
int
|
||||
test(const int c, volatile int v)
|
||||
{
|
||||
static_assert(is_same<int, decltype(0)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(c)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(v)>::value == false, "");
|
||||
auto ac = c;
|
||||
auto av = v;
|
||||
auto sumi = ac + av + 'x';
|
||||
auto sumf = ac + av + 1.0;
|
||||
static_assert(is_same<int, decltype(ac)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(av)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumi)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumf)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
|
||||
return (sumf > 0.0) ? sumi : add(c, v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_noexcept
|
||||
{
|
||||
|
||||
int f() { return 0; }
|
||||
int g() noexcept { return 0; }
|
||||
|
||||
static_assert(noexcept(f()) == false, "");
|
||||
static_assert(noexcept(g()) == true, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
|
||||
{
|
||||
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
|
||||
}
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
return strlen_c_r(s, 0UL);
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("1") == 1UL, "");
|
||||
static_assert(strlen_c("example") == 7UL, "");
|
||||
static_assert(strlen_c("another\0example") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_rvalue_references
|
||||
{
|
||||
|
||||
template < int N >
|
||||
struct answer
|
||||
{
|
||||
static constexpr int value = N;
|
||||
};
|
||||
|
||||
answer<1> f(int&) { return answer<1>(); }
|
||||
answer<2> f(const int&) { return answer<2>(); }
|
||||
answer<3> f(int&&) { return answer<3>(); }
|
||||
|
||||
void
|
||||
test()
|
||||
{
|
||||
int i = 0;
|
||||
const int c = 0;
|
||||
static_assert(decltype(f(i))::value == 1, "");
|
||||
static_assert(decltype(f(c))::value == 2, "");
|
||||
static_assert(decltype(f(0))::value == 3, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_uniform_initialization
|
||||
{
|
||||
|
||||
struct test
|
||||
{
|
||||
static const int zero {};
|
||||
static const int one {1};
|
||||
};
|
||||
|
||||
static_assert(test::zero == 0, "");
|
||||
static_assert(test::one == 1, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambdas
|
||||
{
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
auto lambda1 = [](){};
|
||||
auto lambda2 = lambda1;
|
||||
lambda1();
|
||||
lambda2();
|
||||
}
|
||||
|
||||
int
|
||||
test2()
|
||||
{
|
||||
auto a = [](int i, int j){ return i + j; }(1, 2);
|
||||
auto b = []() -> int { return '0'; }();
|
||||
auto c = [=](){ return a + b; }();
|
||||
auto d = [&](){ return c; }();
|
||||
auto e = [a, &b](int x) mutable {
|
||||
const auto identity = [](int y){ return y; };
|
||||
for (auto i = 0; i < a; ++i)
|
||||
a += b--;
|
||||
return x + identity(a + b);
|
||||
}(0);
|
||||
return a + b + c + d + e;
|
||||
}
|
||||
|
||||
int
|
||||
test3()
|
||||
{
|
||||
const auto nullary = [](){ return 0; };
|
||||
const auto unary = [](int x){ return x; };
|
||||
using nullary_t = decltype(nullary);
|
||||
using unary_t = decltype(unary);
|
||||
const auto higher1st = [](nullary_t f){ return f(); };
|
||||
const auto higher2nd = [unary](nullary_t f1){
|
||||
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
|
||||
};
|
||||
return higher1st(nullary) + higher2nd(nullary)(unary);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_variadic_templates
|
||||
{
|
||||
|
||||
template <int...>
|
||||
struct sum;
|
||||
|
||||
template <int N0, int... N1toN>
|
||||
struct sum<N0, N1toN...>
|
||||
{
|
||||
static constexpr auto value = N0 + sum<N1toN...>::value;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct sum<>
|
||||
{
|
||||
static constexpr auto value = 0;
|
||||
};
|
||||
|
||||
static_assert(sum<>::value == 0, "");
|
||||
static_assert(sum<1>::value == 1, "");
|
||||
static_assert(sum<23>::value == 23, "");
|
||||
static_assert(sum<1, 2>::value == 3, "");
|
||||
static_assert(sum<5, 5, 11>::value == 21, "");
|
||||
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
|
||||
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
|
||||
// because of this.
|
||||
namespace test_template_alias_sfinae
|
||||
{
|
||||
|
||||
struct foo {};
|
||||
|
||||
template<typename T>
|
||||
using member = typename T::member_type;
|
||||
|
||||
template<typename T>
|
||||
void func(...) {}
|
||||
|
||||
template<typename T>
|
||||
void func(member<T>*) {}
|
||||
|
||||
void test();
|
||||
|
||||
void test() { func<foo>(0); }
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx11
|
||||
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++14
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++14, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201402L
|
||||
|
||||
#error "This is not a C++14 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx14
|
||||
{
|
||||
|
||||
namespace test_polymorphic_lambdas
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
const auto lambda = [](auto&&... args){
|
||||
const auto istiny = [](auto x){
|
||||
return (sizeof(x) == 1UL) ? 1 : 0;
|
||||
};
|
||||
const int aretiny[] = { istiny(args)... };
|
||||
return aretiny[0];
|
||||
};
|
||||
return lambda(1, 1L, 1.0f, '1');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_binary_literals
|
||||
{
|
||||
|
||||
constexpr auto ivii = 0b0000000000101010;
|
||||
static_assert(ivii == 42, "wrong value");
|
||||
|
||||
}
|
||||
|
||||
namespace test_generalized_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
constexpr unsigned long
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
auto length = 0UL;
|
||||
for (auto p = s; *p; ++p)
|
||||
++length;
|
||||
return length;
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("x") == 1UL, "");
|
||||
static_assert(strlen_c("test") == 4UL, "");
|
||||
static_assert(strlen_c("another\0test") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_init_capture
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
const auto lambda1 = [a = x](int b){ return a + b; };
|
||||
const auto lambda2 = [a = lambda1(x)](){ return a; };
|
||||
return lambda2();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_digit_separators
|
||||
{
|
||||
|
||||
constexpr auto ten_million = 100'000'000;
|
||||
static_assert(ten_million == 100000000, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_return_type_deduction
|
||||
{
|
||||
|
||||
auto f(int& x) { return x; }
|
||||
decltype(auto) g(int& x) { return x; }
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static constexpr auto value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static constexpr auto value = true;
|
||||
};
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
static_assert(is_same<int, decltype(f(x))>::value, "");
|
||||
static_assert(is_same<int&, decltype(g(x))>::value, "");
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx14
|
||||
|
||||
#endif // __cplusplus >= 201402L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++17
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++17, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201703L
|
||||
|
||||
#error "This is not a C++17 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#include <initializer_list>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
namespace cxx17
|
||||
{
|
||||
|
||||
namespace test_constexpr_lambdas
|
||||
{
|
||||
|
||||
constexpr int foo = [](){return 42;}();
|
||||
|
||||
}
|
||||
|
||||
namespace test::nested_namespace::definitions
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace test_fold_expression
|
||||
{
|
||||
|
||||
template<typename... Args>
|
||||
int multiply(Args... args)
|
||||
{
|
||||
return (args * ... * 1);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
bool all(Args... args)
|
||||
{
|
||||
return (args && ...);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_static_assert
|
||||
{
|
||||
|
||||
static_assert (true);
|
||||
|
||||
}
|
||||
|
||||
namespace test_auto_brace_init_list
|
||||
{
|
||||
|
||||
auto foo = {5};
|
||||
auto bar {5};
|
||||
|
||||
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
|
||||
static_assert(std::is_same<int, decltype(bar)>::value);
|
||||
}
|
||||
|
||||
namespace test_typename_in_template_template_parameter
|
||||
{
|
||||
|
||||
template<template<typename> typename X> struct D;
|
||||
|
||||
}
|
||||
|
||||
namespace test_fallthrough_nodiscard_maybe_unused_attributes
|
||||
{
|
||||
|
||||
int f1()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
[[nodiscard]] int f2()
|
||||
{
|
||||
[[maybe_unused]] auto unused = f1();
|
||||
|
||||
switch (f1())
|
||||
{
|
||||
case 17:
|
||||
f1();
|
||||
[[fallthrough]];
|
||||
case 42:
|
||||
f1();
|
||||
}
|
||||
return f1();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_aggregate_initialization
|
||||
{
|
||||
|
||||
struct base1
|
||||
{
|
||||
int b1, b2 = 42;
|
||||
};
|
||||
|
||||
struct base2
|
||||
{
|
||||
base2() {
|
||||
b3 = 42;
|
||||
}
|
||||
int b3;
|
||||
};
|
||||
|
||||
struct derived : base1, base2
|
||||
{
|
||||
int d;
|
||||
};
|
||||
|
||||
derived d1 {{1, 2}, {}, 4}; // full initialization
|
||||
derived d2 {{}, {}, 4}; // value-initialized bases
|
||||
|
||||
}
|
||||
|
||||
namespace test_general_range_based_for_loop
|
||||
{
|
||||
|
||||
struct iter
|
||||
{
|
||||
int i;
|
||||
|
||||
int& operator* ()
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
const int& operator* () const
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
iter& operator++()
|
||||
{
|
||||
++i;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
struct sentinel
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
bool operator== (const iter& i, const sentinel& s)
|
||||
{
|
||||
return i.i == s.i;
|
||||
}
|
||||
|
||||
bool operator!= (const iter& i, const sentinel& s)
|
||||
{
|
||||
return !(i == s);
|
||||
}
|
||||
|
||||
struct range
|
||||
{
|
||||
iter begin() const
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
|
||||
sentinel end() const
|
||||
{
|
||||
return {5};
|
||||
}
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
range r {};
|
||||
|
||||
for (auto i : r)
|
||||
{
|
||||
[[maybe_unused]] auto v = i;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_capture_asterisk_this_by_value
|
||||
{
|
||||
|
||||
struct t
|
||||
{
|
||||
int i;
|
||||
int foo()
|
||||
{
|
||||
return [*this]()
|
||||
{
|
||||
return i;
|
||||
}();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_enum_class_construction
|
||||
{
|
||||
|
||||
enum class byte : unsigned char
|
||||
{};
|
||||
|
||||
byte foo {42};
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr_if
|
||||
{
|
||||
|
||||
template <bool cond>
|
||||
int f ()
|
||||
{
|
||||
if constexpr(cond)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_selection_statement_with_initializer
|
||||
{
|
||||
|
||||
int f()
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
|
||||
int f2()
|
||||
{
|
||||
if (auto i = f(); i > 0)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
switch (auto i = f(); i + 4)
|
||||
{
|
||||
case 17:
|
||||
return 2;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_template_argument_deduction_for_class_templates
|
||||
{
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct pair
|
||||
{
|
||||
pair (T1 p1, T2 p2)
|
||||
: m1 {p1},
|
||||
m2 {p2}
|
||||
{}
|
||||
|
||||
T1 m1;
|
||||
T2 m2;
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
[[maybe_unused]] auto p = pair{13, 42u};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_non_type_auto_template_parameters
|
||||
{
|
||||
|
||||
template <auto n>
|
||||
struct B
|
||||
{};
|
||||
|
||||
B<5> b1;
|
||||
B<'a'> b2;
|
||||
|
||||
}
|
||||
|
||||
namespace test_structured_bindings
|
||||
{
|
||||
|
||||
int arr[2] = { 1, 2 };
|
||||
std::pair<int, int> pr = { 1, 2 };
|
||||
|
||||
auto f1() -> int(&)[2]
|
||||
{
|
||||
return arr;
|
||||
}
|
||||
|
||||
auto f2() -> std::pair<int, int>&
|
||||
{
|
||||
return pr;
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
int x1 : 2;
|
||||
volatile double y1;
|
||||
};
|
||||
|
||||
S f3()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
auto [ x1, y1 ] = f1();
|
||||
auto& [ xr1, yr1 ] = f1();
|
||||
auto [ x2, y2 ] = f2();
|
||||
auto& [ xr2, yr2 ] = f2();
|
||||
const auto [ x3, y3 ] = f3();
|
||||
|
||||
}
|
||||
|
||||
namespace test_exception_spec_type_system
|
||||
{
|
||||
|
||||
struct Good {};
|
||||
struct Bad {};
|
||||
|
||||
void g1() noexcept;
|
||||
void g2();
|
||||
|
||||
template<typename T>
|
||||
Bad
|
||||
f(T*, T*);
|
||||
|
||||
template<typename T1, typename T2>
|
||||
Good
|
||||
f(T1*, T2*);
|
||||
|
||||
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
|
||||
|
||||
}
|
||||
|
||||
namespace test_inline_variables
|
||||
{
|
||||
|
||||
template<class T> void f(T)
|
||||
{}
|
||||
|
||||
template<class T> inline T g(T)
|
||||
{
|
||||
return T{};
|
||||
}
|
||||
|
||||
template<> inline void f<>(int)
|
||||
{}
|
||||
|
||||
template<> int g<>(int)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx17
|
||||
|
||||
#endif // __cplusplus < 201703L
|
||||
|
||||
]])
|
|
@ -0,0 +1,223 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks if the compiler supports one of GCC's function
|
||||
# attributes; many other compilers also provide function attributes with
|
||||
# the same syntax. Compiler warnings are used to detect supported
|
||||
# attributes as unsupported ones are ignored by default so quieting
|
||||
# warnings when using this macro will yield false positives.
|
||||
#
|
||||
# The ATTRIBUTE parameter holds the name of the attribute to be checked.
|
||||
#
|
||||
# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
|
||||
#
|
||||
# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
|
||||
# variable.
|
||||
#
|
||||
# The macro currently supports the following function attributes:
|
||||
#
|
||||
# alias
|
||||
# aligned
|
||||
# alloc_size
|
||||
# always_inline
|
||||
# artificial
|
||||
# cold
|
||||
# const
|
||||
# constructor
|
||||
# constructor_priority for constructor attribute with priority
|
||||
# deprecated
|
||||
# destructor
|
||||
# dllexport
|
||||
# dllimport
|
||||
# error
|
||||
# externally_visible
|
||||
# flatten
|
||||
# format
|
||||
# format_arg
|
||||
# gnu_inline
|
||||
# hot
|
||||
# ifunc
|
||||
# leaf
|
||||
# malloc
|
||||
# noclone
|
||||
# noinline
|
||||
# nonnull
|
||||
# noreturn
|
||||
# nothrow
|
||||
# optimize
|
||||
# pure
|
||||
# unused
|
||||
# used
|
||||
# visibility
|
||||
# warning
|
||||
# warn_unused_result
|
||||
# weak
|
||||
# weakref
|
||||
#
|
||||
# Unsupported function attributes will be tested with a prototype returning
|
||||
# an int and not accepting any arguments and the result of the check might
|
||||
# be wrong or meaningless so use with care.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 3
|
||||
|
||||
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
||||
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
|
||||
|
||||
AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
m4_case([$1],
|
||||
[alias], [
|
||||
int foo( void ) { return 0; }
|
||||
int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[aligned], [
|
||||
int foo( void ) __attribute__(($1(32)));
|
||||
],
|
||||
[alloc_size], [
|
||||
void *foo(int a) __attribute__(($1(1)));
|
||||
],
|
||||
[always_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[artificial], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[cold], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[const], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[constructor_priority], [
|
||||
int foo( void ) __attribute__((__constructor__(65535/2)));
|
||||
],
|
||||
[constructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[deprecated], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[destructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[dllexport], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[dllimport], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[error], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[externally_visible], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[flatten], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[format], [
|
||||
int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
|
||||
],
|
||||
[format_arg], [
|
||||
char *foo(const char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[gnu_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[hot], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[ifunc], [
|
||||
int my_foo( void ) { return 0; }
|
||||
static int (*resolve_foo(void))(void) { return my_foo; }
|
||||
int foo( void ) __attribute__(($1("resolve_foo")));
|
||||
],
|
||||
[leaf], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[malloc], [
|
||||
void *foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noclone], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noinline], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[nonnull], [
|
||||
int foo(char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[noreturn], [
|
||||
void foo( void ) __attribute__(($1));
|
||||
],
|
||||
[nothrow], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[optimize], [
|
||||
__attribute__(($1(3))) int foo( void ) { return 0; }
|
||||
],
|
||||
[pure], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[unused], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[used], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[visibility], [
|
||||
int foo_def( void ) __attribute__(($1("default")));
|
||||
int foo_hid( void ) __attribute__(($1("hidden")));
|
||||
int foo_int( void ) __attribute__(($1("internal")));
|
||||
int foo_pro( void ) __attribute__(($1("protected")));
|
||||
],
|
||||
[warning], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[warn_unused_result], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weak], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weakref], [
|
||||
static int foo( void ) { return 0; }
|
||||
static int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[
|
||||
m4_warn([syntax], [Unsupported attribute $1, the test may fail])
|
||||
int foo( void ) __attribute__(($1));
|
||||
]
|
||||
)], [])
|
||||
],
|
||||
dnl GCC doesn't exit with an error if an unknown attribute is
|
||||
dnl provided but only outputs a warning, so accept the attribute
|
||||
dnl only if no warning were issued.
|
||||
[AS_IF([test -s conftest.err],
|
||||
[AS_VAR_SET([ac_var], [no])],
|
||||
[AS_VAR_SET([ac_var], [yes])])],
|
||||
[AS_VAR_SET([ac_var], [no])])
|
||||
])
|
||||
|
||||
AS_IF([test yes = AS_VAR_GET([ac_var])],
|
||||
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
|
||||
[Define to 1 if the system has the `$1' function attribute])], [])
|
||||
|
||||
AS_VAR_POPDEF([ac_var])
|
||||
])
|
|
@ -0,0 +1,485 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro figures out how to build C programs using POSIX threads. It
|
||||
# sets the PTHREAD_LIBS output variable to the threads library and linker
|
||||
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
|
||||
# flags that are needed. (The user can also force certain compiler
|
||||
# flags/libs to be tested by setting these environment variables.)
|
||||
#
|
||||
# Also sets PTHREAD_CC to any special C compiler that is needed for
|
||||
# multi-threaded programs (defaults to the value of CC otherwise). (This
|
||||
# is necessary on AIX to use the special cc_r compiler alias.)
|
||||
#
|
||||
# NOTE: You are assumed to not only compile your program with these flags,
|
||||
# but also to link with them as well. For example, you might link with
|
||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
#
|
||||
# If you are only building threaded programs, you may wish to use these
|
||||
# variables in your default LIBS, CFLAGS, and CC:
|
||||
#
|
||||
# LIBS="$PTHREAD_LIBS $LIBS"
|
||||
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
# CC="$PTHREAD_CC"
|
||||
#
|
||||
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
||||
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
|
||||
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
||||
#
|
||||
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
||||
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
||||
# PTHREAD_CFLAGS.
|
||||
#
|
||||
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
|
||||
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
|
||||
# is not found. If ACTION-IF-FOUND is not specified, the default action
|
||||
# will define HAVE_PTHREAD.
|
||||
#
|
||||
# Please let the authors know if this macro fails on any platform, or if
|
||||
# you have any other suggestions or comments. This macro was based on work
|
||||
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
|
||||
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
|
||||
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
|
||||
# grateful for the helpful feedback of numerous users.
|
||||
#
|
||||
# Updated for Autoconf 2.68 by Daniel Richard G.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 22
|
||||
|
||||
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
||||
AC_DEFUN([AX_PTHREAD], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
AC_LANG_PUSH([C])
|
||||
ax_pthread_ok=no
|
||||
|
||||
# We used to check for pthread.h first, but this fails if pthread.h
|
||||
# requires special compiler flags (e.g. on Tru64 or Sequent).
|
||||
# It gets checked for in the link test anyway.
|
||||
|
||||
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
||||
# etcetera environment variables, and if threads linking works using
|
||||
# them:
|
||||
if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
|
||||
ax_pthread_save_CC="$CC"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
|
||||
AC_MSG_RESULT([$ax_pthread_ok])
|
||||
if test "x$ax_pthread_ok" = "xno"; then
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
fi
|
||||
CC="$ax_pthread_save_CC"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
fi
|
||||
|
||||
# We must check for the threads library under a number of different
|
||||
# names; the ordering is very important because some systems
|
||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
||||
# libraries is broken (non-POSIX).
|
||||
|
||||
# Create a list of thread flags to try. Items starting with a "-" are
|
||||
# C compiler flags, and other items are library names, except for "none"
|
||||
# which indicates that we try without any flags at all, and "pthread-config"
|
||||
# which is a program returning the flags for the Pth emulation library.
|
||||
|
||||
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
||||
|
||||
# The ordering *is* (sometimes) important. Some notes on the
|
||||
# individual items follow:
|
||||
|
||||
# pthreads: AIX (must check this before -lpthread)
|
||||
# none: in case threads are in libc; should be tried before -Kthread and
|
||||
# other compiler flags to prevent continual compiler warnings
|
||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
|
||||
# (Note: HP C rejects this with "bad form for `-t' option")
|
||||
# -pthreads: Solaris/gcc (Note: HP C also rejects)
|
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
||||
# doesn't hurt to check since this sometimes defines pthreads and
|
||||
# -D_REENTRANT too), HP C (must be checked before -lpthread, which
|
||||
# is present but should not be used directly; and before -mthreads,
|
||||
# because the compiler interprets this as "-mt" + "-hreads")
|
||||
# -mthreads: Mingw32/gcc, Lynx/gcc
|
||||
# pthread: Linux, etcetera
|
||||
# --thread-safe: KAI C++
|
||||
# pthread-config: use pthread-config program (for GNU Pth library)
|
||||
|
||||
case $host_os in
|
||||
|
||||
freebsd*)
|
||||
|
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
||||
|
||||
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
hpux*)
|
||||
|
||||
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
|
||||
# multi-threading and also sets -lpthread."
|
||||
|
||||
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
openedition*)
|
||||
|
||||
# IBM z/OS requires a feature-test macro to be defined in order to
|
||||
# enable POSIX threads at all, so give the user a hint if this is
|
||||
# not set. (We don't define these ourselves, as they can affect
|
||||
# other portions of the system API in unpredictable ways.)
|
||||
|
||||
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
|
||||
[
|
||||
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
|
||||
AX_PTHREAD_ZOS_MISSING
|
||||
# endif
|
||||
],
|
||||
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
|
||||
# On Solaris (at least, for some versions), libc contains stubbed
|
||||
# (non-functional) versions of the pthreads routines, so link-based
|
||||
# tests will erroneously succeed. (N.B.: The stubs are missing
|
||||
# pthread_cleanup_push, or rather a function called by this macro,
|
||||
# so we could check for that, but who knows whether they'll stub
|
||||
# that too in a future libc.) So we'll check first for the
|
||||
# standard Solaris way of linking pthreads (-mt -lpthread).
|
||||
|
||||
ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
|
||||
;;
|
||||
esac
|
||||
|
||||
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
|
||||
|
||||
AS_IF([test "x$GCC" = "xyes"],
|
||||
[ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
|
||||
|
||||
# The presence of a feature test macro requesting re-entrant function
|
||||
# definitions is, on some systems, a strong hint that pthreads support is
|
||||
# correctly enabled
|
||||
|
||||
case $host_os in
|
||||
darwin* | hpux* | linux* | osf* | solaris*)
|
||||
ax_pthread_check_macro="_REENTRANT"
|
||||
;;
|
||||
|
||||
aix* | freebsd*)
|
||||
ax_pthread_check_macro="_THREAD_SAFE"
|
||||
;;
|
||||
|
||||
*)
|
||||
ax_pthread_check_macro="--"
|
||||
;;
|
||||
esac
|
||||
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
|
||||
[ax_pthread_check_cond=0],
|
||||
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
|
||||
|
||||
# Are we compiling with Clang?
|
||||
|
||||
AC_CACHE_CHECK([whether $CC is Clang],
|
||||
[ax_cv_PTHREAD_CLANG],
|
||||
[ax_cv_PTHREAD_CLANG=no
|
||||
# Note that Autoconf sets GCC=yes for Clang as well as GCC
|
||||
if test "x$GCC" = "xyes"; then
|
||||
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
|
||||
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
|
||||
# if defined(__clang__) && defined(__llvm__)
|
||||
AX_PTHREAD_CC_IS_CLANG
|
||||
# endif
|
||||
],
|
||||
[ax_cv_PTHREAD_CLANG=yes])
|
||||
fi
|
||||
])
|
||||
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
|
||||
|
||||
ax_pthread_clang_warning=no
|
||||
|
||||
# Clang needs special handling, because older versions handle the -pthread
|
||||
# option in a rather... idiosyncratic way
|
||||
|
||||
if test "x$ax_pthread_clang" = "xyes"; then
|
||||
|
||||
# Clang takes -pthread; it has never supported any other flag
|
||||
|
||||
# (Note 1: This will need to be revisited if a system that Clang
|
||||
# supports has POSIX threads in a separate library. This tends not
|
||||
# to be the way of modern systems, but it's conceivable.)
|
||||
|
||||
# (Note 2: On some systems, notably Darwin, -pthread is not needed
|
||||
# to get POSIX threads support; the API is always present and
|
||||
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
|
||||
# -pthread does define _REENTRANT, and while the Darwin headers
|
||||
# ignore this macro, third-party headers might not.)
|
||||
|
||||
PTHREAD_CFLAGS="-pthread"
|
||||
PTHREAD_LIBS=
|
||||
|
||||
ax_pthread_ok=yes
|
||||
|
||||
# However, older versions of Clang make a point of warning the user
|
||||
# that, in an invocation where only linking and no compilation is
|
||||
# taking place, the -pthread option has no effect ("argument unused
|
||||
# during compilation"). They expect -pthread to be passed in only
|
||||
# when source code is being compiled.
|
||||
#
|
||||
# Problem is, this is at odds with the way Automake and most other
|
||||
# C build frameworks function, which is that the same flags used in
|
||||
# compilation (CFLAGS) are also used in linking. Many systems
|
||||
# supported by AX_PTHREAD require exactly this for POSIX threads
|
||||
# support, and in fact it is often not straightforward to specify a
|
||||
# flag that is used only in the compilation phase and not in
|
||||
# linking. Such a scenario is extremely rare in practice.
|
||||
#
|
||||
# Even though use of the -pthread flag in linking would only print
|
||||
# a warning, this can be a nuisance for well-run software projects
|
||||
# that build with -Werror. So if the active version of Clang has
|
||||
# this misfeature, we search for an option to squash it.
|
||||
|
||||
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
|
||||
# Create an alternate version of $ac_link that compiles and
|
||||
# links in two steps (.c -> .o, .o -> exe) instead of one
|
||||
# (.c -> exe), because the warning occurs only in the second
|
||||
# step
|
||||
ax_pthread_save_ac_link="$ac_link"
|
||||
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
|
||||
ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
|
||||
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
|
||||
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
|
||||
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[ac_link="$ax_pthread_2step_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[break])
|
||||
])
|
||||
done
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
|
||||
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
|
||||
])
|
||||
|
||||
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
|
||||
no | unknown) ;;
|
||||
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
|
||||
esac
|
||||
|
||||
fi # $ax_pthread_clang = yes
|
||||
|
||||
if test "x$ax_pthread_ok" = "xno"; then
|
||||
for ax_pthread_try_flag in $ax_pthread_flags; do
|
||||
|
||||
case $ax_pthread_try_flag in
|
||||
none)
|
||||
AC_MSG_CHECKING([whether pthreads work without any flags])
|
||||
;;
|
||||
|
||||
-mt,pthread)
|
||||
AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
|
||||
PTHREAD_CFLAGS="-mt"
|
||||
PTHREAD_LIBS="-lpthread"
|
||||
;;
|
||||
|
||||
-*)
|
||||
AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
|
||||
PTHREAD_CFLAGS="$ax_pthread_try_flag"
|
||||
;;
|
||||
|
||||
pthread-config)
|
||||
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
|
||||
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
|
||||
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
||||
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
|
||||
PTHREAD_LIBS="-l$ax_pthread_try_flag"
|
||||
;;
|
||||
esac
|
||||
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
|
||||
# Check for various functions. We must include pthread.h,
|
||||
# since some functions may be macros. (On the Sequent, we
|
||||
# need a special flag -Kthread to make this header compile.)
|
||||
# We check for pthread_join because it is in -lpthread on IRIX
|
||||
# while pthread_create is in libc. We check for pthread_attr_init
|
||||
# due to DEC craziness with -lpthreads. We check for
|
||||
# pthread_cleanup_push because it is one of the few pthread
|
||||
# functions on Solaris that doesn't have a non-functional libc stub.
|
||||
# We try pthread_create on general principles.
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
|
||||
# if $ax_pthread_check_cond
|
||||
# error "$ax_pthread_check_macro must be defined"
|
||||
# endif
|
||||
static void routine(void *a) { a = 0; }
|
||||
static void *start_routine(void *a) { return a; }],
|
||||
[pthread_t th; pthread_attr_t attr;
|
||||
pthread_create(&th, 0, start_routine, 0);
|
||||
pthread_join(th, 0);
|
||||
pthread_attr_init(&attr);
|
||||
pthread_cleanup_push(routine, 0);
|
||||
pthread_cleanup_pop(0) /* ; */])],
|
||||
[ax_pthread_ok=yes],
|
||||
[])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
|
||||
AC_MSG_RESULT([$ax_pthread_ok])
|
||||
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
|
||||
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
done
|
||||
fi
|
||||
|
||||
# Various other checks:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
|
||||
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
||||
AC_CACHE_CHECK([for joinable pthread attribute],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR=unknown
|
||||
for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[int attr = $ax_pthread_attr; return attr /* ; */])],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
|
||||
[])
|
||||
done
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
|
||||
test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
|
||||
test "x$ax_pthread_joinable_attr_defined" != "xyes"],
|
||||
[AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
|
||||
[$ax_cv_PTHREAD_JOINABLE_ATTR],
|
||||
[Define to necessary symbol if this constant
|
||||
uses a non-standard name on your system.])
|
||||
ax_pthread_joinable_attr_defined=yes
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([whether more special flags are required for pthreads],
|
||||
[ax_cv_PTHREAD_SPECIAL_FLAGS],
|
||||
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
|
||||
case $host_os in
|
||||
solaris*)
|
||||
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
|
||||
test "x$ax_pthread_special_flags_added" != "xyes"],
|
||||
[PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
|
||||
ax_pthread_special_flags_added=yes])
|
||||
|
||||
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
|
||||
[[int i = PTHREAD_PRIO_INHERIT;]])],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
|
||||
test "x$ax_pthread_prio_inherit_defined" != "xyes"],
|
||||
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
|
||||
ax_pthread_prio_inherit_defined=yes
|
||||
])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
|
||||
# More AIX lossage: compile with *_r variant
|
||||
if test "x$GCC" != "xyes"; then
|
||||
case $host_os in
|
||||
aix*)
|
||||
AS_CASE(["x/$CC"],
|
||||
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
|
||||
[#handle absolute path differently from PATH based program lookup
|
||||
AS_CASE(["x$CC"],
|
||||
[x/*],
|
||||
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
|
||||
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
|
||||
|
||||
AC_SUBST([PTHREAD_LIBS])
|
||||
AC_SUBST([PTHREAD_CFLAGS])
|
||||
AC_SUBST([PTHREAD_CC])
|
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
|
||||
:
|
||||
else
|
||||
ax_pthread_ok=no
|
||||
$2
|
||||
fi
|
||||
AC_LANG_POP
|
||||
])dnl AX_PTHREAD
|
|
@ -0,0 +1,72 @@
|
|||
dnl Copyright (c) 2016-2019 The Zcash developers
|
||||
dnl Copyright (c) 2013-2019 The Bitcoin Core developers
|
||||
dnl Copyright (c) 2013-2019 Bitcoin Developers
|
||||
dnl Distributed under the MIT software license, see the accompanying
|
||||
dnl file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
||||
AC_DEFUN([BITCOIN_FIND_BDB62],[
|
||||
AC_MSG_CHECKING([for Berkeley DB C++ headers])
|
||||
BDB_CPPFLAGS=
|
||||
BDB_LIBS=
|
||||
bdbpath=X
|
||||
bdb62path=X
|
||||
bdbdirlist=
|
||||
for _vn in 6.2 62 6 ''; do
|
||||
for _pfx in b lib ''; do
|
||||
bdbdirlist="$bdbdirlist ${_pfx}db${_vn}"
|
||||
done
|
||||
done
|
||||
for searchpath in $bdbdirlist ''; do
|
||||
test -n "${searchpath}" && searchpath="${searchpath}/"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !((DB_VERSION_MAJOR == 6 && DB_VERSION_MINOR >= 2) || DB_VERSION_MAJOR > 6)
|
||||
#error "failed to find bdb 6.2+"
|
||||
#endif
|
||||
]])],[
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
bdbpath="${searchpath}"
|
||||
fi
|
||||
],[
|
||||
continue
|
||||
])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !(DB_VERSION_MAJOR == 6 && DB_VERSION_MINOR == 2)
|
||||
#error "failed to find bdb 6.2"
|
||||
#endif
|
||||
]])],[
|
||||
bdb62path="${searchpath}"
|
||||
break
|
||||
],[])
|
||||
done
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
|
||||
elif test "x$bdb62path" = "xX"; then
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
|
||||
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 6.2])],[
|
||||
AC_MSG_WARN([Found Berkeley DB other than 6.2; wallets opened by this build will not be portable!])
|
||||
],[
|
||||
AC_MSG_ERROR([Found Berkeley DB other than 6.2, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
|
||||
])
|
||||
else
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb62path}],db_cxx)
|
||||
bdbpath="${bdb62path}"
|
||||
fi
|
||||
AC_SUBST(BDB_CPPFLAGS)
|
||||
|
||||
# TODO: Ideally this could find the library version and make sure it matches the headers being used
|
||||
for searchlib in db_cxx-6.2 db_cxx; do
|
||||
AC_CHECK_LIB([$searchlib],[main],[
|
||||
BDB_LIBS="-l${searchlib}"
|
||||
break
|
||||
])
|
||||
done
|
||||
if test "x$BDB_LIBS" = "x"; then
|
||||
AC_MSG_ERROR([libdb_cxx missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
|
||||
fi
|
||||
AC_SUBST(BDB_LIBS)
|
||||
])
|
|
@ -0,0 +1,20 @@
|
|||
dnl Copyright (c) 2016-2019 The Zcash developers
|
||||
dnl Copyright (c) 2013-2019 The Bitcoin Core developers
|
||||
dnl Copyright (c) 2013-2019 Bitcoin Developers
|
||||
dnl Distributed under the MIT software license, see the accompanying
|
||||
dnl file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
||||
dnl BITCOIN_SUBDIR_TO_INCLUDE([CPPFLAGS-VARIABLE-NAME],[SUBDIRECTORY-NAME],[HEADER-FILE])
|
||||
dnl SUBDIRECTORY-NAME must end with a path separator
|
||||
AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
|
||||
if test "x$2" = "x"; then
|
||||
AC_MSG_RESULT([default])
|
||||
else
|
||||
echo "#include <$2$3.h>" >conftest.cpp
|
||||
newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
|
||||
AC_MSG_RESULT([${newinclpath}])
|
||||
if test "x${newinclpath}" != "x"; then
|
||||
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
||||
fi
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,46 @@
|
|||
dnl Copyright (c) 2015 Tim Kosse <tim.kosse@filezilla-project.org>
|
||||
dnl Copying and distribution of this file, with or without modification, are
|
||||
dnl permitted in any medium without royalty provided the copyright notice
|
||||
dnl and this notice are preserved. This file is offered as-is, without any
|
||||
dnl warranty.
|
||||
|
||||
# Some versions of gcc/libstdc++ require linking with -latomic if
|
||||
# using the C++ atomic library.
|
||||
#
|
||||
# Sourced from http://bugs.debian.org/797228
|
||||
|
||||
m4_define([_CHECK_ATOMIC_testbody], [[
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
|
||||
int main() {
|
||||
std::atomic<int64_t> a{};
|
||||
|
||||
int64_t v = 5;
|
||||
int64_t r = a.fetch_add(v);
|
||||
return static_cast<int>(r);
|
||||
}
|
||||
]])
|
||||
|
||||
AC_DEFUN([CHECK_ATOMIC], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_MSG_CHECKING([whether std::atomic can be used without link library])
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS="$LIBS -latomic"
|
||||
AC_MSG_CHECKING([whether std::atomic needs -latomic])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_FAILURE([cannot figure out how to use std::atomic])
|
||||
])
|
||||
])
|
||||
|
||||
AC_LANG_POP
|
||||
])
|
|
@ -0,0 +1,65 @@
|
|||
# Contributor Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, and in the interest of
|
||||
fostering an open and welcoming community, we pledge to respect all people who
|
||||
contribute through reporting issues, posting feature requests, updating
|
||||
documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free
|
||||
experience for everyone, regardless of level of experience, gender, gender
|
||||
identity and expression, sexual orientation, disability, personal appearance,
|
||||
body size, race, ethnicity, age, religion, or nationality.
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* The use of language or imagery that originates with, or has been
|
||||
adopted as a symbol or "dog-whistle" for, any of: right-wing extremism,
|
||||
anti-Semitism, Islamophobia, white supremacism, eugenics, homophobia, or
|
||||
transphobia (whether or not the use by itself falls into those categories)
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic
|
||||
addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful. Note that contributors may be volunteers
|
||||
who do not represent Electric Coin Company. They are free to express their own
|
||||
opinions so long as they adhere to these guidelines.
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to
|
||||
fairly and consistently applying these principles to every aspect of managing
|
||||
this project. Project maintainers who do not follow or enforce the Code of
|
||||
Conduct may be permanently removed from the project team.
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting a project maintainer (see below). All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. Maintainers are
|
||||
obligated to maintain confidentiality with regard to the reporter of an
|
||||
incident.
|
||||
|
||||
You may send reports to [our Conduct email](mailto:conduct@z.cash).
|
||||
|
||||
If you wish to contact specific maintainers directly, the following have made
|
||||
themselves available for conduct issues:
|
||||
|
||||
- Daira Hopwood (daira at z.cash)
|
||||
- Sean Bowe (sean at z.cash)
|
||||
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 1.3.0, available at
|
||||
[https://www.contributor-covenant.org/version/1/3/0/][version]
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[version]: https://www.contributor-covenant.org/version/1/3/0/
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,43 @@
|
|||
*** Warning: This document has not been updated for Zcash and may be inaccurate. ***
|
||||
|
||||
Wallet Tools
|
||||
---------------------
|
||||
|
||||
### [BitRPC](/contrib/bitrpc) ###
|
||||
Allows for sending of all standard Bitcoin commands via RPC rather than as command line args.
|
||||
|
||||
Repository Tools
|
||||
---------------------
|
||||
|
||||
### [Developer tools](/contrib/devtools) ###
|
||||
Specific tools for developers working on this repository.
|
||||
Contains the script `github-merge.sh` for merging github pull requests securely and signing them using GPG.
|
||||
|
||||
### [Linearize](/contrib/linearize) ###
|
||||
Construct a linear, no-fork, best version of the blockchain.
|
||||
|
||||
### [Qos](/contrib/qos) ###
|
||||
|
||||
A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
|
||||
|
||||
### [Seeds](/contrib/seeds) ###
|
||||
Utility to generate the pnSeed[] array that is compiled into the client.
|
||||
|
||||
Build Tools and Keys
|
||||
---------------------
|
||||
|
||||
### [Debian](/contrib/debian) ###
|
||||
Contains files used to package bitcoind/bitcoin-qt
|
||||
for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.
|
||||
|
||||
### [Gitian-descriptors](/contrib/gitian-descriptors) ###
|
||||
Gavin's notes on getting gitian builds up and running using KVM.
|
||||
|
||||
### [Gitian-downloader](/contrib/gitian-downloader)
|
||||
Various PGP files of core developers.
|
||||
|
||||
Test and Verify Tools
|
||||
---------------------
|
||||
|
||||
### [TestGen](/contrib/testgen) ###
|
||||
Utilities to generate test vectors for the data-driven Bitcoin tests.
|
|
@ -0,0 +1,8 @@
|
|||
### BitRPC
|
||||
Allows for sending of all standard Bitcoin commands via RPC rather than as command line args.
|
||||
|
||||
### Looking for Wallet Tools?
|
||||
BitRPC.py is able to do the exact same thing as `walletchangepass.py` and `walletunlock.py`. Their respective commands in BitRPC.py are:
|
||||
|
||||
bitrpc.py walletpassphrasechange
|
||||
bitrpc.py walletpassphrase
|
|
@ -0,0 +1,335 @@
|
|||
from jsonrpc import ServiceProxy
|
||||
import sys
|
||||
import string
|
||||
import getpass
|
||||
|
||||
# ===== BEGIN USER SETTINGS =====
|
||||
# if you do not set these you will be prompted for a password for every command
|
||||
rpcuser = ""
|
||||
rpcpass = ""
|
||||
# ====== END USER SETTINGS ======
|
||||
|
||||
|
||||
if rpcpass == "":
|
||||
access = ServiceProxy("http://127.0.0.1:8232")
|
||||
else:
|
||||
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:8232")
|
||||
cmd = sys.argv[1].lower()
|
||||
|
||||
if cmd == "backupwallet":
|
||||
try:
|
||||
path = raw_input("Enter destination path/filename: ")
|
||||
print access.backupwallet(path)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "encryptwallet":
|
||||
try:
|
||||
pwd = getpass.getpass(prompt="Enter passphrase: ")
|
||||
pwd2 = getpass.getpass(prompt="Repeat passphrase: ")
|
||||
if pwd == pwd2:
|
||||
access.encryptwallet(pwd)
|
||||
print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n"
|
||||
else:
|
||||
print "\n---Passphrases do not match---\n"
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getaccount":
|
||||
try:
|
||||
addr = raw_input("Enter a Bitcoin address: ")
|
||||
print access.getaccount(addr)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getaccountaddress":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
print access.getaccountaddress(acct)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getaddressesbyaccount":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
print access.getaddressesbyaccount(acct)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getbalance":
|
||||
try:
|
||||
acct = raw_input("Enter an account (optional): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.getbalance(acct, mc)
|
||||
except:
|
||||
print access.getbalance()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getblockbycount":
|
||||
try:
|
||||
height = raw_input("Height: ")
|
||||
print access.getblockbycount(height)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getblockcount":
|
||||
try:
|
||||
print access.getblockcount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getblocknumber":
|
||||
try:
|
||||
print access.getblocknumber()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getconnectioncount":
|
||||
try:
|
||||
print access.getconnectioncount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getdifficulty":
|
||||
try:
|
||||
print access.getdifficulty()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getgenerate":
|
||||
try:
|
||||
print access.getgenerate()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "gethashespersec":
|
||||
try:
|
||||
print access.gethashespersec()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getinfo":
|
||||
try:
|
||||
print access.getinfo()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getnewaddress":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
try:
|
||||
print access.getnewaddress(acct)
|
||||
except:
|
||||
print access.getnewaddress()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getreceivedbyaccount":
|
||||
try:
|
||||
acct = raw_input("Enter an account (optional): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.getreceivedbyaccount(acct, mc)
|
||||
except:
|
||||
print access.getreceivedbyaccount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getreceivedbyaddress":
|
||||
try:
|
||||
addr = raw_input("Enter a Bitcoin address (optional): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.getreceivedbyaddress(addr, mc)
|
||||
except:
|
||||
print access.getreceivedbyaddress()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "gettransaction":
|
||||
try:
|
||||
txid = raw_input("Enter a transaction ID: ")
|
||||
print access.gettransaction(txid)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getwork":
|
||||
try:
|
||||
data = raw_input("Data (optional): ")
|
||||
try:
|
||||
print access.gettransaction(data)
|
||||
except:
|
||||
print access.gettransaction()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "help":
|
||||
try:
|
||||
cmd = raw_input("Command (optional): ")
|
||||
try:
|
||||
print access.help(cmd)
|
||||
except:
|
||||
print access.help()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listaccounts":
|
||||
try:
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.listaccounts(mc)
|
||||
except:
|
||||
print access.listaccounts()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listreceivedbyaccount":
|
||||
try:
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
incemp = raw_input("Include empty? (true/false, optional): ")
|
||||
try:
|
||||
print access.listreceivedbyaccount(mc, incemp)
|
||||
except:
|
||||
print access.listreceivedbyaccount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listreceivedbyaddress":
|
||||
try:
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
incemp = raw_input("Include empty? (true/false, optional): ")
|
||||
try:
|
||||
print access.listreceivedbyaddress(mc, incemp)
|
||||
except:
|
||||
print access.listreceivedbyaddress()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listtransactions":
|
||||
try:
|
||||
acct = raw_input("Account (optional): ")
|
||||
count = raw_input("Number of transactions (optional): ")
|
||||
frm = raw_input("Skip (optional):")
|
||||
try:
|
||||
print access.listtransactions(acct, count, frm)
|
||||
except:
|
||||
print access.listtransactions()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "move":
|
||||
try:
|
||||
frm = raw_input("From: ")
|
||||
to = raw_input("To: ")
|
||||
amt = raw_input("Amount:")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
try:
|
||||
print access.move(frm, to, amt, mc, comment)
|
||||
except:
|
||||
print access.move(frm, to, amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "sendfrom":
|
||||
try:
|
||||
frm = raw_input("From: ")
|
||||
to = raw_input("To: ")
|
||||
amt = raw_input("Amount:")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
commentto = raw_input("Comment-to (optional): ")
|
||||
try:
|
||||
print access.sendfrom(frm, to, amt, mc, comment, commentto)
|
||||
except:
|
||||
print access.sendfrom(frm, to, amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "sendmany":
|
||||
try:
|
||||
frm = raw_input("From: ")
|
||||
to = raw_input("To (in format address1:amount1,address2:amount2,...): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
try:
|
||||
print access.sendmany(frm,to,mc,comment)
|
||||
except:
|
||||
print access.sendmany(frm,to)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "sendtoaddress":
|
||||
try:
|
||||
to = raw_input("To (in format address1:amount1,address2:amount2,...): ")
|
||||
amt = raw_input("Amount:")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
commentto = raw_input("Comment-to (optional): ")
|
||||
try:
|
||||
print access.sendtoaddress(to,amt,comment,commentto)
|
||||
except:
|
||||
print access.sendtoaddress(to,amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "setaccount":
|
||||
try:
|
||||
addr = raw_input("Address: ")
|
||||
acct = raw_input("Account:")
|
||||
print access.setaccount(addr,acct)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "setgenerate":
|
||||
try:
|
||||
gen= raw_input("Generate? (true/false): ")
|
||||
cpus = raw_input("Max processors/cores (-1 for unlimited, optional):")
|
||||
try:
|
||||
print access.setgenerate(gen, cpus)
|
||||
except:
|
||||
print access.setgenerate(gen)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "settxfee":
|
||||
try:
|
||||
amt = raw_input("Amount:")
|
||||
print access.settxfee(amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "stop":
|
||||
try:
|
||||
print access.stop()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "validateaddress":
|
||||
try:
|
||||
addr = raw_input("Address: ")
|
||||
print access.validateaddress(addr)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "walletpassphrase":
|
||||
try:
|
||||
pwd = getpass.getpass(prompt="Enter wallet passphrase: ")
|
||||
access.walletpassphrase(pwd, 60)
|
||||
print "\n---Wallet unlocked---\n"
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "walletpassphrasechange":
|
||||
try:
|
||||
pwd = getpass.getpass(prompt="Enter old wallet passphrase: ")
|
||||
pwd2 = getpass.getpass(prompt="Enter new wallet passphrase: ")
|
||||
access.walletpassphrasechange(pwd, pwd2)
|
||||
print
|
||||
print "\n---Passphrase changed---\n"
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
else:
|
||||
print "Command not found or not supported"
|
|
@ -0,0 +1,42 @@
|
|||
ARG FROMBASEOS
|
||||
ARG FROMBASEOS_BUILD_TAG=latest
|
||||
FROM electriccoinco/zcashd-build-$FROMBASEOS$FROMBASEOS_BUILD_TAG
|
||||
|
||||
ARG DUMBINIT_VERSION=1.2.2
|
||||
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DUMBINIT_VERSION}/dumb-init_${DUMBINIT_VERSION}_amd64
|
||||
RUN chmod +x /usr/bin/dumb-init
|
||||
|
||||
# Buildbot user
|
||||
ARG BUILDBOT_USER=zcbbworker
|
||||
ARG BUILDBOT_UID=2001
|
||||
RUN useradd --home-dir /home/$BUILDBOT_USER \
|
||||
--shell /bin/bash \
|
||||
--create-home \
|
||||
--uid $BUILDBOT_UID\
|
||||
$BUILDBOT_USER
|
||||
|
||||
USER $BUILDBOT_USER
|
||||
WORKDIR /home/$BUILDBOT_USER
|
||||
|
||||
ADD bbworker-requirements.txt requirements.txt
|
||||
RUN python -m venv venv \
|
||||
&& . venv/bin/activate \
|
||||
&& python -m pip install wheel \
|
||||
&& python -m pip install -r requirements.txt
|
||||
|
||||
# Buildbot worker
|
||||
ARG BASEOS
|
||||
ENV BUILDBOT_WORKER_NAME=$BASEOS-docker
|
||||
ENV BUILDBOT_WORKER_PASS=thisgetssetwhenpodisstarted
|
||||
ENV BUILDBOT_MASTER_HOST=dev-ci.z.cash
|
||||
ENV BUILDBOT_MASTER_PORT=9899
|
||||
|
||||
WORKDIR /home/$BUILDBOT_USER
|
||||
RUN venv/bin/buildbot-worker create-worker $BUILDBOT_WORKER_NAME \
|
||||
$BUILDBOT_MASTER_HOST:$BUILDBOT_MASTER_PORT \
|
||||
$BUILDBOT_WORKER_NAME $BUILDBOT_WORKER_PASS \
|
||||
&& echo "OS: $BASEOS" > $BUILDBOT_WORKER_NAME/info/host
|
||||
ADD bbworker-buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
|
||||
|
||||
WORKDIR /home/$BUILDBOT_USER/$BUILDBOT_WORKER_NAME
|
||||
CMD ["/usr/bin/dumb-init", "../venv/bin/twistd", "--pidfile=", "-ny", "buildbot.tac"]
|
|
@ -0,0 +1,35 @@
|
|||
FROM electriccoinco/zcashd-build-arch
|
||||
|
||||
# Buildbot user
|
||||
ARG BUILDBOT_USER=zcbbworker
|
||||
ARG BUILDBOT_UID=2001
|
||||
RUN useradd --home-dir /home/$BUILDBOT_USER \
|
||||
--shell /bin/bash \
|
||||
--create-home \
|
||||
--uid $BUILDBOT_UID\
|
||||
$BUILDBOT_USER
|
||||
|
||||
USER $BUILDBOT_USER
|
||||
WORKDIR /home/$BUILDBOT_USER
|
||||
|
||||
ADD bbworker-requirements.txt requirements.txt
|
||||
RUN python -m venv venv \
|
||||
&& . venv/bin/activate \
|
||||
&& python -m pip install wheel \
|
||||
&& python -m pip install -r requirements.txt
|
||||
|
||||
# Buildbot worker
|
||||
ARG BUILDBOT_WORKER_NAME=arch-docker
|
||||
ARG BUILDBOT_WORKER_PASS=thisgetssetwhenpodisstarted
|
||||
ARG BUILDBOT_MASTER_HOST=dev-ci.z.cash
|
||||
ARG BUILDBOT_MASTER_PORT=9899
|
||||
|
||||
WORKDIR /home/$BUILDBOT_USER
|
||||
RUN venv/bin/buildbot-worker create-worker $BUILDBOT_WORKER_NAME \
|
||||
$BUILDBOT_MASTER_HOST:$BUILDBOT_MASTER_PORT \
|
||||
$BUILDBOT_WORKER_NAME $BUILDBOT_WORKER_PASS \
|
||||
&& echo "OS: Centos 8" > $BUILDBOT_WORKER_NAME/info/host
|
||||
ADD bbworker-buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
|
||||
|
||||
WORKDIR /home/$BUILDBOT_USER/$BUILDBOT_WORKER_NAME
|
||||
CMD ["/usr/bin/dumb-init", "../venv/bin/twistd", "--pidfile=", "-ny", "buildbot.tac"]
|
|
@ -0,0 +1,35 @@
|
|||
FROM electriccoinco/zcashd-build-centos8
|
||||
|
||||
# Buildbot user
|
||||
ARG BUILDBOT_USER=zcbbworker
|
||||
ARG BUILDBOT_UID=2001
|
||||
RUN useradd --home-dir /home/$BUILDBOT_USER \
|
||||
--shell /bin/bash \
|
||||
--create-home \
|
||||
--uid $BUILDBOT_UID\
|
||||
$BUILDBOT_USER
|
||||
|
||||
USER $BUILDBOT_USER
|
||||
WORKDIR /home/$BUILDBOT_USER
|
||||
|
||||
ADD bbworker-requirements.txt requirements.txt
|
||||
RUN python3 -m venv venv \
|
||||
&& . venv/bin/activate \
|
||||
&& python -m pip install wheel \
|
||||
&& python -m pip install -r requirements.txt
|
||||
|
||||
# Buildbot worker
|
||||
ARG BUILDBOT_WORKER_NAME=centos8-docker
|
||||
ARG BUILDBOT_WORKER_PASS=thisgetssetwhenpodisstarted
|
||||
ARG BUILDBOT_MASTER_HOST=dev-ci.z.cash
|
||||
ARG BUILDBOT_MASTER_PORT=9899
|
||||
|
||||
WORKDIR /home/$BUILDBOT_USER
|
||||
RUN venv/bin/buildbot-worker create-worker $BUILDBOT_WORKER_NAME \
|
||||
$BUILDBOT_MASTER_HOST:$BUILDBOT_MASTER_PORT \
|
||||
$BUILDBOT_WORKER_NAME $BUILDBOT_WORKER_PASS \
|
||||
&& echo "OS: Centos 8" > $BUILDBOT_WORKER_NAME/info/host
|
||||
ADD bbworker-buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
|
||||
|
||||
WORKDIR /home/$BUILDBOT_USER/$BUILDBOT_WORKER_NAME
|
||||
CMD ["/usr/bin/dumb-init", "../venv/bin/twistd", "--pidfile=", "-ny", "buildbot.tac"]
|
|
@ -0,0 +1,30 @@
|
|||
ARG FROMBASEOS
|
||||
ARG FROMBASEOS_BUILD_TAG
|
||||
FROM $FROMBASEOS:$FROMBASEOS_BUILD_TAG
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ADD apt-package-list.txt /tmp/apt-package-list.txt
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y $(tr "\n" " " < /tmp/apt-package-list.txt) \
|
||||
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
||||
|
||||
ARG PYTHONVERSION=3.7.5
|
||||
RUN apt-get install -y \
|
||||
build-essential \
|
||||
zlib1g-dev \
|
||||
libncurses5-dev \
|
||||
libgdbm-dev \
|
||||
libnss3-dev \
|
||||
libssl-dev \
|
||||
libreadline-dev \
|
||||
libffi-dev \
|
||||
curl
|
||||
WORKDIR /tmp
|
||||
RUN curl https://www.python.org/ftp/python/$PYTHONVERSION/Python-$PYTHONVERSION.tar.xz -o python.tar.xz \
|
||||
&& tar -xf python.tar.xz \
|
||||
&& cd Python-$PYTHONVERSION \
|
||||
&& ./configure --enable-optimizations \
|
||||
&& make -j 8 \
|
||||
&& make altinstall \
|
||||
&& update-alternatives --install /usr/bin/python python /usr/local/bin/python3.7 1
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.7 1
|
|
@ -0,0 +1,9 @@
|
|||
ARG FROMBASEOS
|
||||
ARG FROMBASEOS_BUILD_TAG
|
||||
FROM $FROMBASEOS:$FROMBASEOS_BUILD_TAG
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ADD apt-package-list.txt /tmp/apt-package-list.txt
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y $(tr "\n" " " < /tmp/apt-package-list.txt) \
|
||||
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
|
@ -0,0 +1,23 @@
|
|||
ARG ARCHLINUX_TAG
|
||||
FROM archlinux:$ARCHLINUX_TAG
|
||||
|
||||
RUN pacman -Syyu --noconfirm \
|
||||
&& pacman -S --noconfirm \
|
||||
base-devel \
|
||||
git \
|
||||
python3 \
|
||||
python-pip \
|
||||
wget
|
||||
|
||||
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
|
||||
RUN chmod +x /usr/bin/dumb-init
|
||||
RUN python -m pip install virtualenv
|
||||
# AUR for libtinfo5 Source: https://dev.to/cloudx/testing-our-package-build-in-the-docker-world-34p0
|
||||
RUN useradd builduser -m \
|
||||
&& passwd -d builduser \
|
||||
&& cd /home/builduser \
|
||||
&& git clone "https://aur.archlinux.org/ncurses5-compat-libs.git" ncurses5-compat-libs \
|
||||
&& chown builduser -R ncurses5-compat-libs \
|
||||
&& (printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers) \
|
||||
&& sudo -u builduser bash -c 'gpg --keyserver pool.sks-keyservers.net --recv-keys 702353E0F7E48EDB' \
|
||||
&& sudo -u builduser bash -c 'cd ~/ncurses5-compat-libs && makepkg -si --noconfirm'
|
|
@ -0,0 +1,14 @@
|
|||
FROM centos:8
|
||||
|
||||
RUN yum update -y \
|
||||
&& dnf group install -y "Development Tools" \
|
||||
&& yum install -y \
|
||||
ncurses-compat-libs \
|
||||
python3 \
|
||||
python3-devel \
|
||||
wget
|
||||
|
||||
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
|
||||
RUN chmod +x /usr/bin/dumb-init
|
||||
RUN alternatives --set python /usr/bin/python3 \
|
||||
&& python3 -m pip install virtualenv
|
|
@ -0,0 +1,8 @@
|
|||
ARG FROMBASEOS
|
||||
ARG FROMBASEOS_BUILD_TAG=latest
|
||||
FROM electriccoinco/zcashd-build-$FROMBASEOS$FROMBASEOS_BUILD_TAG
|
||||
|
||||
RUN useradd -ms /bin/bash -U debian
|
||||
USER debian:debian
|
||||
WORKDIR /home/debian
|
||||
CMD ["sleep", "infinity"]
|
|
@ -0,0 +1,42 @@
|
|||
# zcashd ci Docker images
|
||||
|
||||
These Dockerfiles can be used to build zcashd.
|
||||
|
||||
The current objective is to build a base image for each distribution that includes the system packages to build zcashd. From `build` images, more targeted images are created.
|
||||
|
||||
The process is meant to be automated, but an example `docker-build.sh` script is included.
|
||||
|
||||
|
||||
## build images
|
||||
`apt-package-list.txt` contains the required packages for debian based systems.
|
||||
|
||||
`Dockerfile-build.apt` uses that file, and some build time arguments, to build apt based build images.
|
||||
|
||||
Currently available images are hosted at
|
||||
https://hub.docker.com/r/electriccoinco/zcashd-build/tags
|
||||
|
||||
|
||||
## gitian images
|
||||
|
||||
`Dockerfile-gitian.apt` uses the build images to generate images for use with [gitian-builder](https://github.com/devrandom/gitian-builder)
|
||||
|
||||
Currently available images are hosted at https://hub.docker.com/r/electriccoinco/zcashd-gitian/tags
|
||||
|
||||
|
||||
## bbworker images
|
||||
|
||||
`Dockerfile-bbworker.apt` uses the build images for use with [buildbot](https://buildbot.net)
|
||||
|
||||
- bbworker-buildbot.tac is a required worker boot file (most is overridden at instancitation)
|
||||
- bbworker-requirements.txt is the python package requirements for the buildbot worker
|
||||
|
||||
Currently available images are hosted at https://hub.docker.com/r/electriccoinco/zcashd-bbworker/tags
|
||||
|
||||
|
||||
### Stand alone, best effort images
|
||||
|
||||
Additional buildbot workers for Centos8 and Arch.
|
||||
|
||||
- Dockerfile-bbworker.arch
|
||||
- Dockerfile-bbworker.centos8
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
autoconf
|
||||
bsdmainutils
|
||||
build-essential
|
||||
cmake
|
||||
curl
|
||||
g++-aarch64-linux-gnu
|
||||
git
|
||||
lcov
|
||||
libcap-dev
|
||||
libffi-dev
|
||||
libtinfo5
|
||||
libtool
|
||||
libssl-dev
|
||||
libz-dev
|
||||
libbz2-dev
|
||||
mingw-w64
|
||||
pkg-config
|
||||
python3
|
||||
python3-dev
|
||||
python3-venv
|
||||
valgrind
|
||||
wget
|
||||
zstd
|
|
@ -0,0 +1,40 @@
|
|||
import fnmatch
|
||||
import os
|
||||
import sys
|
||||
|
||||
from twisted.application import service
|
||||
from twisted.python.log import FileLogObserver
|
||||
from twisted.python.log import ILogObserver
|
||||
|
||||
from buildbot_worker.bot import Worker
|
||||
|
||||
# setup worker
|
||||
basedir = os.environ.get("BUILDBOT_BASEDIR",
|
||||
os.path.abspath(os.path.dirname(__file__)))
|
||||
application = service.Application('buildbot-worker')
|
||||
|
||||
|
||||
application.setComponent(ILogObserver, FileLogObserver(sys.stdout).emit)
|
||||
# and worker on the same process!
|
||||
buildmaster_host = os.environ.get("BUILDMASTER", 'localhost')
|
||||
port = int(os.environ.get("BUILDMASTER_PORT", 9989))
|
||||
workername = os.environ.get("WORKERNAME", 'docker')
|
||||
passwd = os.environ.get("WORKERPASS")
|
||||
|
||||
# delete the password from the environ so that it is not leaked in the log
|
||||
blacklist = os.environ.get("WORKER_ENVIRONMENT_BLACKLIST", "WORKERPASS").split()
|
||||
for name in list(os.environ.keys()):
|
||||
for toremove in blacklist:
|
||||
if fnmatch.fnmatch(name, toremove):
|
||||
del os.environ[name]
|
||||
|
||||
keepalive = 600
|
||||
umask = None
|
||||
maxdelay = 300
|
||||
allow_shutdown = None
|
||||
maxretries = 10
|
||||
|
||||
s = Worker(buildmaster_host, port, workername, passwd, basedir,
|
||||
keepalive, umask=umask, maxdelay=maxdelay,
|
||||
allow_shutdown=allow_shutdown, maxRetries=maxretries)
|
||||
s.setServiceParent(application)
|
|
@ -0,0 +1,9 @@
|
|||
buildbot-worker
|
||||
pyblake2
|
||||
pyflakes
|
||||
pyutil
|
||||
pyzmq
|
||||
requests
|
||||
simplejson
|
||||
twisted[tls]
|
||||
wheel
|
|
@ -0,0 +1,62 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export LC_ALL=C
|
||||
set -exo pipefail
|
||||
|
||||
# Debian 9
|
||||
docker build . -f Dockerfile-build-python.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-build-debian9
|
||||
docker push electriccoinco/zcashd-build-debian9
|
||||
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-bbworker-debian9
|
||||
docker push electriccoinco/zcashd-bbworker-debian9
|
||||
|
||||
# Debian 10
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-build-debian10
|
||||
docker push electriccoinco/zcashd-build-debian10
|
||||
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-gitian-debian10
|
||||
docker push electriccoinco/zcashd-gitian-debian10
|
||||
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-bbworker-debian10
|
||||
docker push electriccoinco/zcashd-bbworker-debian10
|
||||
|
||||
# Debian 11
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=bullseye -t electriccoinco/zcashd-build-debian11
|
||||
docker push electriccoinco/zcashd-build-debian11
|
||||
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=bullseye -t electriccoinco/zcashd-gitian-debian11
|
||||
docker push electriccoinco/zcashd-gitian-debian11
|
||||
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=bullseye -t electriccoinco/zcashd-bbworker-debian11
|
||||
docker push electriccoinco/zcashd-bbworker-debian11
|
||||
|
||||
# Ubuntu 16.04
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=16.04 -t electriccoinco/zcashd-build-ubuntu1604
|
||||
docker push electriccoinco/zcashd-build-ubuntu1604
|
||||
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1604 -t electriccoinco/zcashd-gitian-ubuntu1604
|
||||
docker push electriccoinco/zcashd-gitian-ubuntu1604
|
||||
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1604 -t electriccoinco/zcashd-bbworker-ubuntu1604
|
||||
docker push electriccoinco/zcashd-bbworker-ubuntu1604
|
||||
|
||||
# Ubuntu 18.04
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=18.04 -t electriccoinco/zcashd-build-ubuntu1804
|
||||
docker push electriccoinco/zcashd-build-ubuntu1804
|
||||
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1804 -t electriccoinco/zcashd-gitian-ubuntu1804
|
||||
docker push electriccoinco/zcashd-gitian-ubuntu1804
|
||||
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1804 -t electriccoinco/zcashd-bbworker-ubuntu1804
|
||||
docker push electriccoinco/zcashd-bbworker-ubuntu1804
|
||||
|
||||
# Ubuntu 20.04
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=20.04 -t electriccoinco/zcashd-build-ubuntu2004
|
||||
docker push electriccoinco/zcashd-build-ubuntu2004
|
||||
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=2004 -t electriccoinco/zcashd-gitian-ubuntu2004
|
||||
docker push electriccoinco/zcashd-gitian-ubuntu2004
|
||||
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=2004 -t electriccoinco/zcashd-bbworker-ubuntu2004
|
||||
docker push electriccoinco/zcashd-bbworker-ubuntu2004
|
||||
|
||||
# Centos8
|
||||
docker build . -f Dockerfile-build.centos8 -t electriccoinco/zcashd-build-centos8
|
||||
docker build . -f Dockerfile-bbworker.centos8 -t electriccoinco/zcashd-bbworker-centos8
|
||||
docker push electriccoinco/zcashd-build-centos8
|
||||
docker push electriccoinco/zcashd-bbworker-centos8
|
||||
|
||||
# Arch 20200908
|
||||
docker build . -f Dockerfile-build.arch --build-arg ARCHLINUX_TAG=20200908 -t electriccoinco/zcashd-build-arch
|
||||
docker build . -f Dockerfile-bbworker.arch -t electriccoinco/zcashd-bbworker-arch
|
||||
docker push electriccoinco/zcashd-build-arch
|
||||
docker push electriccoinco/zcashd-bbworker-arch
|
|
@ -0,0 +1,9 @@
|
|||
ARG FROMBASEOS
|
||||
ARG FROMBASEOS_BUILD_TAG
|
||||
FROM $FROMBASEOS:$FROMBASEOS_BUILD_TAG
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ADD apt-package-list.txt /tmp/apt-package-list.txt
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y $(tr "\n" " " < /tmp/apt-package-list.txt) \
|
||||
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
|
@ -0,0 +1,14 @@
|
|||
ARG FROMBASEOS
|
||||
ARG FROMBASEOS_BUILD_TAG
|
||||
FROM $FROMBASEOS:$FROMBASEOS_BUILD_TAG
|
||||
|
||||
RUN pacman -Syyu --noconfirm \
|
||||
&& pacman -S --noconfirm \
|
||||
base-devel \
|
||||
git \
|
||||
python3 \
|
||||
python-pip \
|
||||
ncurses \
|
||||
wget
|
||||
|
||||
RUN sudo link /lib/libtinfo.so.6 /lib/libtinfo.so.5
|
|
@ -0,0 +1,14 @@
|
|||
FROM centos:8
|
||||
|
||||
RUN yum update -y \
|
||||
&& dnf group install -y "Development Tools" \
|
||||
&& yum install -y \
|
||||
ncurses-compat-libs \
|
||||
python3 \
|
||||
python3-devel \
|
||||
wget
|
||||
|
||||
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
|
||||
RUN chmod +x /usr/bin/dumb-init
|
||||
RUN alternatives --set python /usr/bin/python3 \
|
||||
&& python3 -m pip install virtualenv
|
|
@ -0,0 +1,11 @@
|
|||
ARG FROMBASEOS
|
||||
ARG FROMBASEOS_BUILD_TAG
|
||||
FROM electriccoinco/zcashd-build-$FROMBASEOS$FROMBASEOS_BUILD_TAG
|
||||
|
||||
ADD requirements.txt requirements.txt
|
||||
RUN python -m venv venv \
|
||||
&& . venv/bin/activate \
|
||||
&& pip install --upgrade pip \
|
||||
&& python -m pip install -r requirements.txt
|
||||
|
||||
ADD ./zcash-params /home/.zcash-params
|
|
@ -0,0 +1,35 @@
|
|||
# zcashd ci Docker images
|
||||
|
||||
These Dockerfiles can be used to build zcashd.
|
||||
|
||||
The current objective is to build a base image for each distribution that includes the system packages to build zcashd. From `build` images, more targeted images are created.
|
||||
|
||||
The process is meant to be automated, but an example `docker-build.sh` script is included.
|
||||
|
||||
|
||||
## build images
|
||||
`apt-package-tekton-list.txt` contains the required packages for debian based systems.
|
||||
|
||||
`Dockerfile-build.apt` uses that file, and some build time arguments, to build apt based build images.
|
||||
|
||||
Currently available images are hosted at
|
||||
https://hub.docker.com/r/electriccoinco/zcashd-build/tags
|
||||
|
||||
|
||||
|
||||
## Tekton worker images
|
||||
|
||||
`Dockerfile-tekton-worker` uses the above build images as a base and layers on toolchains needed for testing
|
||||
|
||||
- requirements.txt is the python package requirements for the tekton worker
|
||||
|
||||
Currently available images are hosted at https://hub.docker.com/r/electriccoinco
|
||||
|
||||
|
||||
### Stand alone, best effort images
|
||||
|
||||
Additional Tekton base builders for Centos8 and Arch. Can be used with `Dockerfile-tekton-worker` to create Tekton workers.
|
||||
|
||||
- Dockerfile-build.arch
|
||||
- Dockerfile-build.centos8
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
autoconf
|
||||
bsdmainutils
|
||||
build-essential
|
||||
cmake
|
||||
curl
|
||||
g++-aarch64-linux-gnu
|
||||
git
|
||||
lcov
|
||||
libcap-dev
|
||||
libffi-dev
|
||||
libtinfo5
|
||||
libtool
|
||||
libssl-dev
|
||||
libz-dev
|
||||
libbz2-dev
|
||||
mingw-w64
|
||||
pkg-config
|
||||
python3
|
||||
python3-pip
|
||||
python3-dev
|
||||
python3-venv
|
||||
valgrind
|
||||
wget
|
||||
zstd
|
|
@ -0,0 +1,60 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export LC_ALL=C
|
||||
set -exo pipefail
|
||||
|
||||
# Debian 9
|
||||
docker build . -f Dockerfile-build-python.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-build-debian9
|
||||
docker push electriccoinco/zcashd-build-debian9
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-worker-debian9
|
||||
docker push electriccoinco/zcashd-worker-debian9
|
||||
|
||||
# Debian 10
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-build-debian10
|
||||
docker push electriccoinco/zcashd-build-debian10
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-worker-debian10
|
||||
docker push electriccoinco/zcashd-worker-debian10
|
||||
|
||||
# Debian 11
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=bullseye -t electriccoinco/zcashd-build-debian11
|
||||
docker push electriccoinco/zcashd-build-debian11
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=11 -t electriccoinco/zcashd-worker-debian11
|
||||
docker push electriccoinco/zcashd-worker-debian11
|
||||
|
||||
# Ubuntu 16.04
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=16.04 -t electriccoinco/zcashd-build-ubuntu1604
|
||||
docker push electriccoinco/zcashd-build-ubuntu1604
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1604 -t electriccoinco/zcashd-worker-ubuntu1604
|
||||
docker push electriccoinco/zcashd-worker-ubuntu1604
|
||||
|
||||
# Ubuntu 18.04
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=18.04 -t electriccoinco/zcashd-build-ubuntu1804
|
||||
docker push electriccoinco/zcashd-build-ubuntu1804
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1804 -t electriccoinco/zcashd-worker-ubuntu1804
|
||||
docker push electriccoinco/zcashd-worker-ubuntu1804
|
||||
|
||||
# Ubuntu 20.04
|
||||
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=20.04 -t electriccoinco/zcashd-build-ubuntu2004
|
||||
docker push electriccoinco/zcashd-build-ubuntu2004
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=2004 -t electriccoinco/zcashd-worker-ubuntu2004
|
||||
docker push electriccoinco/zcashd-worker-ubuntu2004
|
||||
|
||||
# Centos8
|
||||
docker build . -f Dockerfile-build.centos8 -t electriccoinco/zcashd-build-centos8
|
||||
docker push electriccoinco/zcashd-build-centos8
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg FROMBASEOS=centos --build-arg FROMBASEOS_BUILD_TAG=8 -t electriccoinco/zcashd-worker-centos8
|
||||
docker push electriccoinco/zcashd-worker-centos8
|
||||
|
||||
# Arch 20210418.0.20194
|
||||
docker build . -f Dockerfile-build.arch --build-arg FROMBASEOS=archlinux --build-arg FROMBASEOS_BUILD_TAG=base-20210418.0.20194 -t electriccoinco/zcashd-build-archlinux
|
||||
docker push electriccoinco/zcashd-build-archlinux
|
||||
|
||||
docker build . -f Dockerfile-tekton-worker --build-arg FROMBASEOS=archlinux -t electriccoinco/zcashd-worker-archlinux
|
||||
docker push electriccoinco/zcashd-worker-archlinux
|
|
@ -0,0 +1,8 @@
|
|||
wheel
|
||||
pyblake2
|
||||
pyflakes
|
||||
pyutil
|
||||
pyzmq
|
||||
requests
|
||||
simplejson
|
||||
twisted[tls]
|
|
@ -0,0 +1,62 @@
|
|||
# Zcash CI workers
|
||||
|
||||
This folder contains the Ansible playbooks for configuring a fresh OS
|
||||
installation for use as a Buildbot worker in Zcash's CI.
|
||||
|
||||
# Criteria for Adding Workers
|
||||
|
||||
a. Don't add workers until users complain about a problem on a platform that
|
||||
doesn't yet have workers. However, if we anticipate many users will use a
|
||||
platform, we may pre-emptively add an unsupported worker for it.
|
||||
|
||||
b. Prioritize the platforms that seem to have the most users.
|
||||
|
||||
c. When adding workers, start by adding workers for the "most common" variant of
|
||||
any distro. Then if users later encounter problems with a sub-variant, we can
|
||||
consider adding new workers at that point. Example: add Ubuntu Desktop before
|
||||
Xubuntu, on the assumption the former has a larger population base, and the
|
||||
latter only materially differs in the GUI.
|
||||
|
||||
# Setting up a latent worker on Amazon EC2
|
||||
|
||||
1. Add a regular (non-latent) worker to the master.cfg for dev-ci.z.cash, and
|
||||
deploy the changes.
|
||||
- This enables the Ansible playbook to run to completion, ending in the worker
|
||||
connecting to the master.
|
||||
|
||||
2. Start a basic EC2 instance using the template AMI for the target OS.
|
||||
- Choose the smallest instance size, it won't be used for building Zcash.
|
||||
|
||||
3. Figure out which user to log into the instance with.
|
||||
- E.g. for the Ubuntu template, use "ubuntu" instead of "root"
|
||||
- If you get an Ansible error later with a message like "Failed to connect to
|
||||
the host via ssh: Received message too long 1349281121\r\n", that means the
|
||||
instance is sending a text string in response to the SSH connection, and the
|
||||
Ansible protocol is balking. Try manually logging in with the same
|
||||
credentials to diagnose.
|
||||
|
||||
4. Create `inventory/hosts` containing the following:
|
||||
|
||||
[zcash-ci-worker-unix]
|
||||
some-name ansible_host=<INSTANCE_IP> ansible_ssh_user=<USERNAME>
|
||||
|
||||
5. Run `ansible-playbook -e buildbot_worker_host_template=templates/host.ec2.j2 -i inventory/hosts unix.yml`,
|
||||
passing in the worker's Buildbot name and password.
|
||||
- After a successful run, the worker should be connected to dev-ci.z.cash and
|
||||
visible in its worker list.
|
||||
|
||||
6. Create an AMI from the instance. This is the worker AMI to put into the
|
||||
master.cfg for dev-ci.z.cash.
|
||||
- 16 GB of storage should be sufficient.
|
||||
|
||||
7. SSH into the instance, and edit the worker config to connect to ci.z.cash.
|
||||
|
||||
8. Create an AMI from the instance. This is the worker AMI to put into the
|
||||
master.cfg for ci.z.cash.
|
||||
- 16 GB of storage should be sufficient.
|
||||
|
||||
9. Delete the instance (it is no longer needed).
|
||||
|
||||
10. Edit the master.cfg to turn the new worker into a latent (using the new AMI
|
||||
IDs), add it to the appropriate worker groups, set up new builders etc.
|
||||
- Deploy this via the normal PR review process.
|
|
@ -0,0 +1,2 @@
|
|||
[ssh_connection]
|
||||
pipelining = True
|
|
@ -0,0 +1,2 @@
|
|||
export PATH=$HOME/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
export EDITOR=vim
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
# Configure a Buildbot worker
|
||||
- include: unix.yml
|
||||
|
||||
- name: Install grind-specific worker dependencies
|
||||
hosts: zcash-ci-worker-unix
|
||||
become: true
|
||||
|
||||
vars_files:
|
||||
- vars/default.yml
|
||||
|
||||
tasks:
|
||||
- name: Get dependencies for distribution
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version | int }}.yml"
|
||||
- "vars/{{ ansible_distribution }}.yml"
|
||||
- "vars/{{ ansible_os_family }}.yml"
|
||||
skip: true
|
||||
|
||||
- name: Install required packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ grind_deps }}"
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- name: Check if brew is installed
|
||||
stat:
|
||||
path: /usr/local/bin/brew
|
||||
register: brew_check
|
||||
|
||||
- name: Fail if brew is unavailable
|
||||
fail:
|
||||
msg: 'brew is not installed! Please install Homebrew: https://docs.brew.sh/Installation.html'
|
||||
when: not brew_check.stat.exists
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- name: Fetch pip installer
|
||||
get_url:
|
||||
url: https://bootstrap.pypa.io/get-pip.py
|
||||
dest: /tmp/get-pip.py
|
||||
|
||||
- name: Install pip
|
||||
command: "{{ ansible_python.executable }} /tmp/get-pip.py"
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>net.buildbot.worker</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>{{ buildbot_worker_dir }}/venv/bin/buildbot-worker</string>
|
||||
<string>start</string>
|
||||
<string>{{ buildbot_worker_name }}</string>
|
||||
</array>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>{{ buildbot_worker_dir }}</string>
|
||||
<key>UserName</key>
|
||||
<string>{{ buildbot_worker_user }}</string>
|
||||
<key>KeepAlive</key>
|
||||
<dict>
|
||||
<key>NetworkState</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=Buildbot worker
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile={{ buildbot_worker_dir }}/{{ buildbot_worker_name }}/twistd.pid
|
||||
WorkingDirectory={{ buildbot_worker_dir }}
|
||||
ExecStart={{ buildbot_worker_dir }}/venv/bin/buildbot-worker start {{ buildbot_worker_name }}
|
||||
ExecReload={{ buildbot_worker_dir }}/venv/bin/buildbot-worker restart {{ buildbot_worker_name }}
|
||||
ExecStop={{ buildbot_worker_dir }}/venv/bin/buildbot-worker stop {{ buildbot_worker_name }}
|
||||
Restart=always
|
||||
User={{ buildbot_worker_user }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1 @@
|
|||
OS: {{ ansible_distribution }} {{ ansible_distribution_version }}
|
|
@ -0,0 +1,3 @@
|
|||
OS: {{ ansible_distribution }} {{ ansible_distribution_version }}
|
||||
Memory: {{ ansible_memtotal_mb }} MB
|
||||
CPU: {{ ansible_processor if ansible_processor is string else ansible_processor[1] }} ({{ ansible_processor_cores }} cores)
|
|
@ -0,0 +1,209 @@
|
|||
---
|
||||
- name: Configure a Buildbot worker for Zcash CI
|
||||
hosts: zcash-ci-worker-unix
|
||||
become: true
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- vars/default.yml
|
||||
- vars/buildbot.yml
|
||||
|
||||
vars_prompt:
|
||||
- name: "buildbot_worker_admin"
|
||||
prompt: "Admin details"
|
||||
default: "Zcash <sysadmin@z.cash>"
|
||||
- name: "buildbot_worker_name"
|
||||
prompt: "Buildbot worker name (provided by ZECC)"
|
||||
private: no
|
||||
- name: "buildbot_worker_password"
|
||||
prompt: "Buildbot worker password (provided by ZECC)"
|
||||
|
||||
pre_tasks:
|
||||
- name: Install Python 2.7 for Ansible and Buildbot
|
||||
raw: test -e /usr/bin/python || test -e /usr/bin/python2 || test -e /usr/bin/python2.7 || test -e /usr/local/bin/python2.7 || (test -e /usr/bin/apt && apt -qqy update && apt install -qqy python) || (test -e /usr/bin/dnf && dnf install -qqy python2) || (test -e /usr/sbin/pkg && pkg install -qqy python2)
|
||||
register: output
|
||||
changed_when:
|
||||
- output.stdout != ""
|
||||
- output.stdout != "\r\n"
|
||||
|
||||
- name: Check if Python is in the configured location
|
||||
raw: test -e {{ ansible_python_interpreter }}
|
||||
ignore_errors: true
|
||||
register: python_check
|
||||
when: ansible_python_interpreter is defined
|
||||
|
||||
- name: Fail if configured Python is unavailable
|
||||
fail:
|
||||
msg: "Python is not accessible at {{ ansible_python_interpreter }} on this host! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary."
|
||||
when: ansible_python_interpreter is defined and python_check.rc == 1
|
||||
|
||||
- name: Check if Python is in the default location
|
||||
raw: test -e /usr/bin/python
|
||||
ignore_errors: true
|
||||
register: python_check
|
||||
when: ansible_python_interpreter is undefined
|
||||
|
||||
- name: Fail if default Python is unavailable
|
||||
fail:
|
||||
msg: Python is not accessible at /usr/bin/python on this host! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary.
|
||||
when: ansible_python_interpreter is undefined and python_check.rc == 1
|
||||
|
||||
- name: Gathering Facts
|
||||
setup:
|
||||
tags: deps
|
||||
|
||||
- name: Fail if Python is the wrong version
|
||||
fail:
|
||||
msg: "The Python binary at {{ ansible_python.executable }} is version {{ ansible_python_version }}! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary."
|
||||
when: ansible_python.version.major != 2 or ansible_python.version.minor != 7
|
||||
|
||||
tasks:
|
||||
- name: Get dependencies for distribution
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version | int }}.yml"
|
||||
- "vars/{{ ansible_distribution }}.yml"
|
||||
- "vars/{{ ansible_os_family }}.yml"
|
||||
skip: true
|
||||
tags: deps
|
||||
|
||||
- name: Collate dependencies
|
||||
set_fact:
|
||||
package_deps: "{{ buildbot_deps + fetch_deps + conf_deps + build_deps + link_deps + dist_deps }}"
|
||||
python_modules: "{{ buildbot_modules + rpc_test_modules }}"
|
||||
tags: deps
|
||||
|
||||
- name: Install Homebrew [MacOSX]
|
||||
include: tasks/install-brew.yml
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
tags: deps
|
||||
|
||||
- name: Update rolling release [Arch Linux]
|
||||
pacman:
|
||||
update_cache: yes
|
||||
upgrade: yes
|
||||
when: ansible_distribution == 'Archlinux'
|
||||
tags: deps
|
||||
|
||||
- name: Install required packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ package_deps }}"
|
||||
become_user: "{{ ansible_ssh_user if ansible_distribution == 'MacOSX' else 'root' }}"
|
||||
tags: deps
|
||||
|
||||
- name: Install pip [CentOS, MacOSX]
|
||||
include: tasks/install-pip.yml
|
||||
when: ansible_distribution in ['CentOS', 'MacOSX']
|
||||
|
||||
- name: Install required Python system modules
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
executable: "{{ '/usr/local/bin/pip' if ansible_distribution == 'MacOSX' else omit }}"
|
||||
with_items: "{{ system_modules }}"
|
||||
|
||||
- name: Set up the Buildbot worker user
|
||||
user:
|
||||
name: "{{ buildbot_worker_user }}"
|
||||
comment: Buildbot worker
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
|
||||
- name: Get absolute path to Buildbot worker home directory
|
||||
command: echo ~
|
||||
register: homedir
|
||||
become_user: "{{ buildbot_worker_user }}"
|
||||
|
||||
- name: Save absolute path to Buildbot worker home directory
|
||||
set_fact:
|
||||
buildbot_worker_dir: "{{ homedir.stdout }}"
|
||||
|
||||
- name: Install required Python modules
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
virtualenv: "~{{ buildbot_worker_user }}/venv"
|
||||
virtualenv_command: "{{ '/usr/local/bin/virtualenv' if ansible_distribution == 'MacOSX' else omit }}"
|
||||
with_items: "{{ python_modules }}"
|
||||
become_user: "{{ buildbot_worker_user }}"
|
||||
notify: restart buildbot-worker
|
||||
|
||||
- name: Create Buildbot worker
|
||||
command: >
|
||||
~{{ buildbot_worker_user }}/venv/bin/buildbot-worker create-worker ~/{{ buildbot_worker_name }}
|
||||
{{ buildbot_master_host }}:{{ buildbot_master_port }}
|
||||
{{ buildbot_worker_name|quote }} {{ buildbot_worker_password|quote }}
|
||||
args:
|
||||
creates: "~/{{ buildbot_worker_name }}/buildbot.tac"
|
||||
become_user: "{{ buildbot_worker_user }}"
|
||||
|
||||
- name: Set admin details for Buildbot worker
|
||||
copy:
|
||||
content: "{{ buildbot_worker_admin }}"
|
||||
dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/admin"
|
||||
owner: "{{ buildbot_worker_user }}"
|
||||
group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Set host details for Buildbot worker
|
||||
template:
|
||||
src: "{{ buildbot_worker_host_template }}"
|
||||
dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/host"
|
||||
owner: "{{ buildbot_worker_user }}"
|
||||
group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Install custom bashrc for virtualenv
|
||||
copy:
|
||||
src: bashrc
|
||||
dest: "~{{ buildbot_worker_user }}/.bashrc"
|
||||
owner: "{{ buildbot_worker_user }}"
|
||||
group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Copy Buildbot worker systemd service unit
|
||||
template:
|
||||
src: templates/buildbot-worker.service.j2
|
||||
dest: "/etc/systemd/system/buildbot-worker.service"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: ansible_distribution != 'MacOSX'
|
||||
notify: reload systemd
|
||||
|
||||
- name: Copy Buildbot worker launchd service unit
|
||||
template:
|
||||
src: templates/buildbot-worker.plist.j2
|
||||
dest: "/Library/LaunchDaemons/net.buildbot.worker.plist"
|
||||
owner: root
|
||||
group: wheel
|
||||
mode: "0644"
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
|
||||
- name: Start Buildbot worker
|
||||
service:
|
||||
name: buildbot-worker
|
||||
state: started
|
||||
enabled: yes
|
||||
when: ansible_distribution != 'MacOSX'
|
||||
|
||||
- name: Load Buildbot worker service [MacOSX]
|
||||
command: launchctl load /Library/LaunchDaemons/net.buildbot.worker.plist
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
|
||||
- name: Start Buildbot worker [MacOSX]
|
||||
command: launchctl start net.buildbot.worker
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
|
||||
handlers:
|
||||
- name: restart buildbot-worker
|
||||
service:
|
||||
name: buildbot-worker
|
||||
state: restarted
|
||||
|
||||
- name: reload systemd
|
||||
command: /bin/systemctl daemon-reload
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
buildbot_deps:
|
||||
- python2-pip
|
||||
build_deps:
|
||||
- cmake
|
||||
- multilib/gcc
|
||||
- make
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
buildbot_deps: [] # Empty to remove python-pip
|
||||
build_deps:
|
||||
- bzip2
|
||||
- cmake
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- make
|
||||
- patch
|
||||
dist_deps:
|
||||
- pkgconfig # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
- python-devel
|
||||
- redhat-rpm-config
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
build_deps:
|
||||
- build-essential # Depends on g++, libc6-dev, make
|
||||
- cmake
|
||||
dist_deps:
|
||||
- python-dev
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
build_deps:
|
||||
- cmake
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- make
|
||||
- patch
|
||||
dist_deps:
|
||||
- pkgconfig # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
- python-devel
|
||||
- redhat-rpm-config
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
buildbot_deps:
|
||||
- py27-pip
|
||||
build_deps:
|
||||
- cmake
|
||||
- gcc
|
||||
- gmake
|
||||
dist_deps:
|
||||
- bash
|
||||
- pkgconf # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
buildbot_deps:
|
||||
- coreutils # For gnproc etc.
|
||||
# Most are already installed
|
||||
build_deps:
|
||||
- cmake
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
build_deps:
|
||||
- build-essential # Depends on g++, libc6-dev, make
|
||||
- cmake
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
buildbot_worker_user: zcbbworker
|
||||
buildbot_master_host: dev-ci.z.cash
|
||||
buildbot_master_port: 9899
|
||||
buildbot_worker_host_template: templates/host.j2
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
# These variables can be overridden in distribution files.
|
||||
|
||||
# Dependencies required to install Buildbot
|
||||
buildbot_deps:
|
||||
- python-pip # So we can install Python modules
|
||||
|
||||
# Dependencies required to download files
|
||||
fetch_deps:
|
||||
- curl # For depends/
|
||||
- git
|
||||
- wget # For zcutil/fetch-params.sh
|
||||
|
||||
# Dependencies required to configure Zcash
|
||||
conf_deps:
|
||||
- autoconf
|
||||
- automake
|
||||
- m4
|
||||
- pkg-config
|
||||
|
||||
# Dependencies required to compile Zcash
|
||||
build_deps:
|
||||
- cmake
|
||||
- g++
|
||||
- gcc
|
||||
- make
|
||||
|
||||
# Dependencies required to link Zcash
|
||||
link_deps:
|
||||
- libtool
|
||||
|
||||
# Additional distribution-specific dependencies
|
||||
dist_deps: []
|
||||
|
||||
# Additional grind-specific dependencies
|
||||
grind_deps:
|
||||
- lcov
|
||||
- valgrind
|
||||
|
||||
# Python modules required on the system
|
||||
system_modules:
|
||||
- virtualenv
|
||||
|
||||
# Python modules required for a Zcash Buildbot worker
|
||||
buildbot_modules:
|
||||
- pip # Needs to be updated first so Buildbot installs
|
||||
- buildbot-worker
|
||||
- pyflakes
|
||||
|
||||
# Python modules required to run the Zcash RPC test suite
|
||||
rpc_test_modules:
|
||||
- pyblake2
|
||||
- pyzmq
|
|
@ -0,0 +1,593 @@
|
|||
zcash (5.0.0) stable; urgency=medium
|
||||
|
||||
* 5.0.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Tue, 10 May 2022 19:52:28 -0600
|
||||
|
||||
zcash (5.0.0~rc1) stable; urgency=medium
|
||||
|
||||
* 5.0.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Mon, 09 May 2022 15:35:33 +0000
|
||||
|
||||
zcash (4.7.0) stable; urgency=medium
|
||||
|
||||
* 4.7.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 13 Apr 2022 22:04:00 -0600
|
||||
|
||||
zcash (4.6.0+2) stable; urgency=medium
|
||||
|
||||
* 4.6.0-2 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Mon, 04 Apr 2022 21:53:34 +0000
|
||||
|
||||
zcash (4.7.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.7.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Tue, 22 Mar 2022 21:14:02 +0000
|
||||
|
||||
zcash (4.6.0+1) stable; urgency=medium
|
||||
|
||||
* 4.6.0-1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 05 Jan 2022 20:18:43 +0000
|
||||
|
||||
zcash (4.6.0) stable; urgency=medium
|
||||
|
||||
* 4.6.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Thu, 23 Dec 2021 00:35:41 +0000
|
||||
|
||||
zcash (4.6.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.6.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Sat, 18 Dec 2021 04:25:50 +0000
|
||||
|
||||
zcash (4.5.1+1) stable; urgency=medium
|
||||
|
||||
* 4.5.1-1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Fri, 08 Oct 2021 17:03:31 +0000
|
||||
|
||||
zcash (4.5.1) stable; urgency=medium
|
||||
|
||||
* 4.5.1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 29 Sep 2021 01:49:51 +0100
|
||||
|
||||
zcash (4.5.0) stable; urgency=medium
|
||||
|
||||
* 4.5.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Thu, 23 Sep 2021 04:20:16 +0100
|
||||
|
||||
zcash (4.5.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.5.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Thu, 16 Sep 2021 23:34:14 +0100
|
||||
|
||||
zcash (4.4.1) stable; urgency=medium
|
||||
|
||||
* 4.4.1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 09 Jun 2021 23:19:49 +0100
|
||||
|
||||
zcash (4.4.1~rc1) stable; urgency=medium
|
||||
|
||||
* 4.4.1-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Tue, 08 Jun 2021 22:45:20 +0100
|
||||
|
||||
zcash (4.4.0) stable; urgency=medium
|
||||
|
||||
* 4.4.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Thu, 15 Apr 2021 16:55:39 +1200
|
||||
|
||||
zcash (4.4.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.4.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Fri, 09 Apr 2021 17:40:36 +1200
|
||||
|
||||
zcash (4.3.0) stable; urgency=medium
|
||||
|
||||
* 4.3.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 24 Feb 2021 20:17:10 +0000
|
||||
|
||||
zcash (4.3.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.3.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Fri, 19 Feb 2021 22:05:06 +0000
|
||||
|
||||
zcash (4.2.0) stable; urgency=medium
|
||||
|
||||
* 4.2.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Mon, 21 Dec 2020 12:55:52 -0700
|
||||
|
||||
zcash (4.2.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.2.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Sat, 19 Dec 2020 09:53:28 -0700
|
||||
|
||||
zcash (4.1.1) stable; urgency=medium
|
||||
|
||||
* 4.1.1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Mon, 16 Nov 2020 10:23:40 -0700
|
||||
|
||||
zcash (4.1.0) stable; urgency=medium
|
||||
|
||||
* 4.1.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Mon, 02 Nov 2020 13:40:54 -0700
|
||||
|
||||
zcash (4.1.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.1.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 28 Oct 2020 02:51:45 +0800
|
||||
|
||||
zcash (4.0.0) stable; urgency=medium
|
||||
|
||||
* 4.0.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Tue, 01 Sep 2020 13:31:19 -0600
|
||||
|
||||
zcash (4.0.0~rc1) stable; urgency=medium
|
||||
|
||||
* 4.0.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 26 Aug 2020 10:17:07 -0600
|
||||
|
||||
zcash (3.1.0) stable; urgency=medium
|
||||
|
||||
* 3.1.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Tue, 28 Jul 2020 07:02:06 +0800
|
||||
|
||||
zcash (3.1.0~rc2) stable; urgency=medium
|
||||
|
||||
* 3.1.0-rc2 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 15 Jul 2020 21:51:09 +0800
|
||||
|
||||
zcash (3.1.0~rc1) stable; urgency=medium
|
||||
|
||||
* 3.1.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Tue, 14 Jul 2020 14:38:11 +0800
|
||||
|
||||
zcash (3.0.0) stable; urgency=medium
|
||||
|
||||
* 3.0.0 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Fri, 22 May 2020 11:48:24 -0600
|
||||
|
||||
zcash (3.0.0~rc1) stable; urgency=medium
|
||||
|
||||
* 3.0.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Thu, 21 May 2020 07:34:53 -0600
|
||||
|
||||
zcash (2.1.2+3) stable; urgency=medium
|
||||
|
||||
* 2.1.2-3 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Fri, 08 May 2020 12:41:23 -0600
|
||||
|
||||
zcash (2.1.2+2) stable; urgency=medium
|
||||
|
||||
* 2.1.2-2 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Fri, 08 May 2020 11:43:55 -0600
|
||||
|
||||
zcash (2.1.2+1) stable; urgency=medium
|
||||
|
||||
* 2.1.2-1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 06 May 2020 10:52:57 -0600
|
||||
|
||||
zcash (2.1.2) stable; urgency=medium
|
||||
|
||||
* 2.1.2 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 22 Apr 2020 10:46:06 -0600
|
||||
|
||||
zcash (2.1.2~rc1) stable; urgency=medium
|
||||
|
||||
* 2.1.2-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Wed, 15 Apr 2020 17:47:45 -0600
|
||||
|
||||
zcash (2.1.1+1) stable; urgency=critical
|
||||
|
||||
* 2.1.1-1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Thu, 06 Feb 2020 16:53:19 -0700
|
||||
|
||||
zcash (2.1.1) stable; urgency=medium
|
||||
|
||||
* 2.1.1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Fri, 17 Jan 2020 10:27:31 -0700
|
||||
|
||||
zcash (2.1.1~rc2) stable; urgency=medium
|
||||
|
||||
* 2.1.1-rc2 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Mon, 13 Jan 2020 17:56:29 -0700
|
||||
|
||||
zcash (2.1.1~rc1) stable; urgency=medium
|
||||
|
||||
* 2.1.1-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@electriccoin.co> Tue, 07 Jan 2020 20:13:52 -0700
|
||||
|
||||
zcash (2.1.0+1) stable; urgency=medium
|
||||
|
||||
* 2.1.0-1 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Fri, 08 Nov 2019 18:56:32 +0000
|
||||
|
||||
zcash (2.1.0) stable; urgency=medium
|
||||
|
||||
* 2.1.0 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Sat, 02 Nov 2019 11:01:00 -0600
|
||||
|
||||
zcash (2.1.0~rc1) stable; urgency=medium
|
||||
|
||||
* 2.1.0-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Tue, 22 Oct 2019 14:52:02 -0600
|
||||
|
||||
zcash (2.0.7+3) stable; urgency=critical
|
||||
|
||||
* 2.0.7-3 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Tue, 24 Sep 2019 21:01:13 +0100
|
||||
|
||||
zcash (2.0.7+2) stable; urgency=medium
|
||||
|
||||
* 2.0.7-2 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Fri, 30 Aug 2019 17:47:52 -0600
|
||||
|
||||
zcash (2.0.7+1) stable; urgency=medium
|
||||
|
||||
* 2.0.7-1 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Thu, 29 Aug 2019 13:07:52 -0600
|
||||
|
||||
zcash (2.0.7) stable; urgency=medium
|
||||
|
||||
* 2.0.7 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Mon, 19 Aug 2019 15:09:14 -0600
|
||||
|
||||
zcash (2.0.7~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.7-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Fri, 09 Aug 2019 17:05:51 -0600
|
||||
|
||||
zcash (2.0.6) stable; urgency=medium
|
||||
|
||||
* 2.0.6 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Wed, 19 Jun 2019 00:28:06 +0100
|
||||
|
||||
zcash (2.0.6~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.6-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Wed, 12 Jun 2019 16:36:57 +0100
|
||||
|
||||
zcash (2.0.5+2) stable; urgency=medium
|
||||
|
||||
* 2.0.5-2 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Wed, 15 May 2019 09:56:01 -0600
|
||||
|
||||
zcash (2.0.5+1) stable; urgency=medium
|
||||
|
||||
* 2.0.5-1 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Wed, 08 May 2019 06:57:28 -0600
|
||||
|
||||
zcash (2.0.5) stable; urgency=medium
|
||||
|
||||
* 2.0.5 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Fri, 03 May 2019 16:35:30 -0600
|
||||
|
||||
zcash (2.0.5~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.5-rc1 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Wed, 01 May 2019 14:16:08 -0600
|
||||
|
||||
zcash (2.0.4) stable; urgency=medium
|
||||
|
||||
* 2.0.4 release.
|
||||
|
||||
-- Electric Coin Company <team@z.cash> Tue, 26 Mar 2019 11:29:21 -0700
|
||||
|
||||
zcash (2.0.4~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.4-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 20 Mar 2019 09:39:43 -0700
|
||||
|
||||
zcash (2.0.3) stable; urgency=medium
|
||||
|
||||
* 2.0.3 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 11 Feb 2019 09:16:09 -0800
|
||||
|
||||
zcash (2.0.3~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.3-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 04 Feb 2019 12:05:43 -0800
|
||||
|
||||
zcash (2.0.2) stable; urgency=medium
|
||||
|
||||
* 2.0.2 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 28 Nov 2018 11:09:08 -0800
|
||||
|
||||
zcash (2.0.2~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.2-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sun, 18 Nov 2018 10:19:49 -0800
|
||||
|
||||
zcash (2.0.1) stable; urgency=medium
|
||||
|
||||
* 2.0.1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sun, 14 Oct 2018 13:40:30 -0700
|
||||
|
||||
zcash (2.0.1~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.1-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 08 Oct 2018 12:40:54 -0700
|
||||
|
||||
zcash (2.0.0) stable; urgency=medium
|
||||
|
||||
* 2.0.0 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 15 Aug 2018 17:57:50 -0700
|
||||
|
||||
zcash (2.0.0~rc1) stable; urgency=medium
|
||||
|
||||
* 2.0.0-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 09 Aug 2018 16:56:56 +0000
|
||||
|
||||
zcash (1.1.2) stable; urgency=medium
|
||||
|
||||
* 1.1.2 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sun, 01 Jul 2018 20:12:33 -0700
|
||||
|
||||
zcash (1.1.2~rc1) stable; urgency=medium
|
||||
|
||||
* 1.1.2-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 22 Jun 2018 17:03:41 -0700
|
||||
|
||||
zcash (1.1.1) stable; urgency=medium
|
||||
|
||||
* 1.1.1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 25 May 2018 15:49:34 +1200
|
||||
|
||||
zcash (1.1.1~rc2) stable; urgency=medium
|
||||
|
||||
* 1.1.1-rc2 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 23 May 2018 09:28:50 -0700
|
||||
|
||||
zcash (1.1.1~rc1) stable; urgency=medium
|
||||
|
||||
* 1.1.1-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sat, 19 May 2018 10:16:14 +1200
|
||||
|
||||
zcash (1.1.0) stable; urgency=medium
|
||||
|
||||
* 1.1.0 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 11 Apr 2018 20:15:29 -0600
|
||||
|
||||
zcash (1.1.0~rc1) stable; urgency=medium
|
||||
|
||||
* 1.1.0-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 05 Apr 2018 03:26:17 +0100
|
||||
|
||||
zcash (1.0.15) stable; urgency=medium
|
||||
|
||||
* 1.0.15 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 28 Feb 2018 16:58:19 +0000
|
||||
|
||||
zcash (1.0.15~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.15-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sat, 24 Feb 2018 04:20:05 +0000
|
||||
|
||||
zcash (1.0.14) stable; urgency=medium
|
||||
|
||||
* 1.0.14 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 03 Jan 2018 23:54:16 +0100
|
||||
|
||||
zcash (1.0.14~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.14-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 22 Dec 2017 10:12:41 +0000
|
||||
|
||||
zcash (1.0.13) stable; urgency=medium
|
||||
|
||||
* 1.0.13 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 20 Nov 2017 12:31:53 +0000
|
||||
|
||||
zcash (1.0.13~rc2) stable; urgency=medium
|
||||
|
||||
* 1.0.13-rc2 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 17 Nov 2017 18:01:08 +0000
|
||||
|
||||
zcash (1.0.13~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.13-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 15 Nov 2017 00:02:21 +0000
|
||||
|
||||
zcash (1.0.12) stable; urgency=medium
|
||||
|
||||
* 1.0.12 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 28 Sep 2017 01:26:44 +0100
|
||||
|
||||
zcash (1.0.12~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.12-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sat, 23 Sep 2017 10:51:36 +0100
|
||||
|
||||
zcash (1.0.11) stable; urgency=medium
|
||||
|
||||
* 1.0.11 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Tue, 15 Aug 2017 10:06:25 +0100
|
||||
|
||||
zcash (1.0.11~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.11-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Tue, 01 Aug 2017 17:12:52 +0200
|
||||
|
||||
zcash (1.0.10+1) stable; urgency=medium
|
||||
|
||||
* 1.0.10-1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 23 Jun 2017 19:50:41 -0700
|
||||
|
||||
zcash (1.0.10) stable; urgency=medium
|
||||
|
||||
* 1.0.10 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 22 Jun 2017 15:13:04 +1200
|
||||
|
||||
zcash (1.0.9) stable; urgency=medium
|
||||
|
||||
* 1.0.9 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 24 May 2017 12:51:06 -0700
|
||||
|
||||
zcash (1.0.8+1) jessie; urgency=high
|
||||
|
||||
* 1.0.8-1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 13 Apr 2017 20:20:37 -0700
|
||||
|
||||
zcash (1.0.8) jessie; urgency=medium
|
||||
|
||||
* 1.0.8 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 27 Mar 2017 21:30:07 +0100
|
||||
|
||||
zcash (1.0.7+1) jessie; urgency=medium
|
||||
|
||||
* 1.0.7-1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 08 Mar 2017 13:51:11 -0800
|
||||
|
||||
zcash (1.0.7) jessie; urgency=medium
|
||||
|
||||
* 1.0.7 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 03 Mar 2017 20:55:04 -0800
|
||||
|
||||
zcash (1.0.6) jessie; urgency=medium
|
||||
|
||||
* 1.0.6 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 10 Feb 2017 10:23:00 -0800
|
||||
|
||||
zcash (1.0.5) jessie; urgency=medium
|
||||
|
||||
* 1.0.5 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 19 Jan 2017 19:23:40 -0700
|
||||
|
||||
zcash (1.0.4) jessie; urgency=medium
|
||||
|
||||
* 1.0.4 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 15 Dec 2016 16:46:14 +1300
|
||||
|
||||
zcash (1.0.3) jessie; urgency=medium
|
||||
|
||||
* 1.0.3 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 17 Nov 2016 15:56:00 -0700
|
||||
|
||||
zcash (1.0.2) jessie; urgency=medium
|
||||
|
||||
* 1.0.2 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 07 Nov 2016 19:01:35 -0600
|
||||
|
||||
zcash (1.0.1) jessie; urgency=medium
|
||||
|
||||
* 1.0.1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 03 Nov 2016 23:21:09 -0500
|
||||
|
||||
zcash (1.0.0-sprout) jessie; urgency=medium
|
||||
|
||||
* 1.0.0 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 28 Oct 2016 03:00:50 -0700
|
||||
|
||||
zcash (1.0.0-rc4) jessie; urgency=medium
|
||||
|
||||
* 1.0.0-rc4 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 27 Oct 2016 13:36:00 +0100
|
||||
|
||||
zcash (1.0.0-rc3) jessie; urgency=medium
|
||||
|
||||
* 1.0.0-rc3 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 26 Oct 2016 23:17:03 +0100
|
||||
|
||||
zcash (1.0.0-rc2) jessie; urgency=medium
|
||||
|
||||
* 1.0.0-rc2 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sun, 23 Oct 2016 01:51:27 +0100
|
||||
|
||||
zcash (1.0.0-rc1) jessie; urgency=medium
|
||||
|
||||
* Initial packaging for Debian.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 17 Oct 2016 11:47:02 -0700
|
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,22 @@
|
|||
Source: zcash
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Electric Coin Company <team@electriccoin.co>
|
||||
Homepage: https://z.cash
|
||||
Build-Depends: autoconf, automake, bsdmainutils, build-essential,
|
||||
git, g++-multilib, libc6-dev, libtool,
|
||||
m4, ncurses-dev, pkg-config, python,
|
||||
unzip, wget, zlib1g-dev
|
||||
Vcs-Git: https://github.com/zcash/zcash.git
|
||||
Vcs-Browser: https://github.com/zcash/zcash
|
||||
|
||||
Package: zcash
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: Zcash libraries and tools
|
||||
Based on Bitcoin's code, it intends to offer a far higher standard
|
||||
of privacy and anonymity through a sophisticiated zero-knowledge
|
||||
proving scheme which preserves confidentiality of transaction metadata.
|
||||
Think of it as HTTPS for money.
|
||||
This package provides the daemon, zcashd, and the CLI tool,
|
||||
zcash-cli, to interact with the daemon.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,129 @@
|
|||
##
|
||||
## zcash.conf configuration file. Lines beginning with # are comments.
|
||||
##
|
||||
|
||||
# Network-related settings:
|
||||
|
||||
# Run on the test network instead of the real zcash network.
|
||||
#testnet=0
|
||||
|
||||
# Run a regression test network
|
||||
#regtest=0
|
||||
|
||||
# Connect via a SOCKS5 proxy
|
||||
#proxy=127.0.0.1:9050
|
||||
|
||||
# Bind to given address and always listen on it. Use [host]:port notation for IPv6
|
||||
#bind=<addr>
|
||||
|
||||
# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
|
||||
#whitebind=<addr>
|
||||
|
||||
##############################################################
|
||||
## Quick Primer on addnode vs connect ##
|
||||
## Let's say for instance you use addnode=4.2.2.4 ##
|
||||
## addnode will connect you to and tell you about the ##
|
||||
## nodes connected to 4.2.2.4. In addition it will tell ##
|
||||
## the other nodes connected to it that you exist so ##
|
||||
## they can connect to you. ##
|
||||
## connect will not do the above when you 'connect' to it. ##
|
||||
## It will *only* connect you to 4.2.2.4 and no one else.##
|
||||
## ##
|
||||
## So if you're behind a firewall, or have other problems ##
|
||||
## finding nodes, add some using 'addnode'. ##
|
||||
## ##
|
||||
## If you want to stay private, use 'connect' to only ##
|
||||
## connect to "trusted" nodes. ##
|
||||
## ##
|
||||
## If you run multiple nodes on a LAN, there's no need for ##
|
||||
## all of them to open lots of connections. Instead ##
|
||||
## 'connect' them all to one node that is port forwarded ##
|
||||
## and has lots of connections. ##
|
||||
## Thanks goes to [Noodle] on Freenode. ##
|
||||
##############################################################
|
||||
|
||||
# Use as many addnode= settings as you like to connect to specific peers
|
||||
#addnode=69.164.218.197
|
||||
#addnode=10.0.0.2:8233
|
||||
|
||||
# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
|
||||
#connect=69.164.218.197
|
||||
#connect=10.0.0.1:8233
|
||||
|
||||
# Listening mode, enabled by default except when 'connect' is being used
|
||||
#listen=1
|
||||
|
||||
# Maximum number of inbound+outbound connections.
|
||||
#maxconnections=
|
||||
|
||||
#
|
||||
# JSON-RPC options (for controlling a running Zcash/zcashd process)
|
||||
#
|
||||
|
||||
# server=1 tells zcashd to accept JSON-RPC commands (set as default if not specified)
|
||||
#server=1
|
||||
|
||||
# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
|
||||
# This option can be specified multiple times (default: bind to all interfaces)
|
||||
#rpcbind=<addr>
|
||||
|
||||
# You must set rpcuser and rpcpassword to secure the JSON-RPC api
|
||||
#rpcuser=Ulysses
|
||||
#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
|
||||
|
||||
# How many seconds zcash will wait for a complete RPC HTTP request.
|
||||
# after the HTTP connection is established.
|
||||
#rpcclienttimeout=30
|
||||
|
||||
# By default, only RPC connections from localhost are allowed.
|
||||
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
|
||||
# either as a single IPv4/IPv6 or with a subnet specification.
|
||||
|
||||
# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
|
||||
# because the rpcpassword is transmitted over the network unencrypted and also because anyone
|
||||
# that can authenticate on the RPC port can steal your keys + take over the account running zcashd
|
||||
# For more information see https://github.com/zcash/zcash/issues/1497
|
||||
|
||||
#rpcallowip=10.1.1.34/255.255.255.0
|
||||
#rpcallowip=1.2.3.4/24
|
||||
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96
|
||||
|
||||
# Listen for RPC connections on this TCP port:
|
||||
#rpcport=8232
|
||||
|
||||
# You can use Zcash or zcashd to send commands to Zcash/zcashd
|
||||
# running on another host using this option:
|
||||
#rpcconnect=127.0.0.1
|
||||
|
||||
# Transaction Fee
|
||||
|
||||
# Send transactions as zero-fee transactions if possible (default: 0)
|
||||
#sendfreetransactions=0
|
||||
|
||||
# Create transactions that have enough fees (or priority) so they are likely to # begin confirmation within n blocks (default: 1).
|
||||
# This setting is overridden by the -paytxfee option.
|
||||
#txconfirmtarget=n
|
||||
|
||||
# Miscellaneous options
|
||||
|
||||
# Enable attempt to mine zcash.
|
||||
#gen=0
|
||||
|
||||
# Set the number of threads to be used for mining zcash (-1 = all cores).
|
||||
#genproclimit=1
|
||||
|
||||
# Specify a different Equihash solver (e.g. "tromp") to try to mine zcash
|
||||
# faster when gen=1.
|
||||
#equihashsolver=default
|
||||
|
||||
# Pre-generate this many public/private key pairs, so wallet backups will be valid for
|
||||
# both prior transactions and several dozen future transactions.
|
||||
#keypool=100
|
||||
|
||||
# Pay an optional transaction fee every time you send zcash. Transactions with fees
|
||||
# are more likely than free transactions to be included in generated blocks, so may
|
||||
# be validated sooner. This setting does not affect private transactions created with
|
||||
# 'z_sendmany'.
|
||||
#paytxfee=0.00
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
# postinst script for zcash
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
# postrm script for zcash
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||
# <overwriter-version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
# preinst script for zcash
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
# prerm script for zcash
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
|
||||
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||
# package maintainers to append CFLAGS
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
# package maintainers to append LDFLAGS
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
|
||||
%:
|
||||
dh $@ --with autotools_dev
|
||||
|
||||
|
||||
# dh_make generated override targets
|
||||
# This is example for Cmake (See https://bugs.debian.org/641051 )
|
||||
#override_dh_auto_configure:
|
||||
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
|
||||
|
|
@ -0,0 +1 @@
|
|||
DEBIAN/examples/zcash.conf
|
|
@ -0,0 +1,3 @@
|
|||
usr/bin/zcashd
|
||||
usr/bin/zcash-cli
|
||||
usr/bin/zcash-fetch-params
|
|
@ -0,0 +1,2 @@
|
|||
DEBIAN/manpages/zcash-cli.1
|
||||
DEBIAN/manpages/zcashd.1
|
|
@ -0,0 +1,102 @@
|
|||
Contents
|
||||
===========
|
||||
This directory contains tools for developers working on this repository.
|
||||
|
||||
github-merge.sh
|
||||
==================
|
||||
|
||||
A small script to automate merging pull-requests securely and sign them with GPG.
|
||||
|
||||
For example:
|
||||
|
||||
./github-merge.sh bitcoin/bitcoin 3077
|
||||
|
||||
(in any git repository) will help you merge pull request #3077 for the
|
||||
bitcoin/bitcoin repository.
|
||||
|
||||
What it does:
|
||||
* Fetch master and the pull request.
|
||||
* Locally construct a merge commit.
|
||||
* Show the diff that merge results in.
|
||||
* Ask you to verify the resulting source tree (so you can do a make
|
||||
check or whatever).
|
||||
* Ask you whether to GPG sign the merge commit.
|
||||
* Ask you whether to push the result upstream.
|
||||
|
||||
This means that there are no potential race conditions (where a
|
||||
pullreq gets updated while you're reviewing it, but before you click
|
||||
merge), and when using GPG signatures, that even a compromised github
|
||||
couldn't mess with the sources.
|
||||
|
||||
Setup
|
||||
---------
|
||||
Configuring the github-merge tool for the bitcoin repository is done in the following way:
|
||||
|
||||
git config githubmerge.repository bitcoin/bitcoin
|
||||
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
|
||||
git config --global user.signingkey mykeyid (if you want to GPG sign)
|
||||
|
||||
fix-copyright-headers.py
|
||||
===========================
|
||||
|
||||
Every year newly updated files need to have its copyright headers updated to reflect the current year.
|
||||
If you run this script from src/ it will automatically update the year on the copyright header for all
|
||||
.cpp and .h files if these have a git commit from the current year.
|
||||
|
||||
For example a file changed in 2014 (with 2014 being the current year):
|
||||
```// Copyright (c) 2009-2013 The Bitcoin Core developers```
|
||||
|
||||
would be changed to:
|
||||
```// Copyright (c) 2009-2014 The Bitcoin Core developers```
|
||||
|
||||
symbol-check.py
|
||||
==================
|
||||
|
||||
A script to check that the (Linux) executables produced by gitian only contain
|
||||
allowed gcc, glibc and libstdc++ version symbols. This makes sure they are
|
||||
still compatible with the minimum supported Linux distribution versions.
|
||||
|
||||
Example usage after a gitian build:
|
||||
|
||||
find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
|
||||
|
||||
If only supported symbols are used the return value will be 0 and the output will be empty.
|
||||
|
||||
If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed:
|
||||
|
||||
.../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14
|
||||
.../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15
|
||||
.../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
|
||||
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
|
||||
|
||||
update-translations.py
|
||||
=======================
|
||||
|
||||
Run this script from the root of the repository to update all translations from transifex.
|
||||
It will do the following automatically:
|
||||
|
||||
- fetch all translations
|
||||
- post-process them into valid and committable format
|
||||
- add missing translations to the build system (TODO)
|
||||
|
||||
See doc/translation-process.md for more information.
|
||||
|
||||
gen-manpages.sh
|
||||
===============
|
||||
|
||||
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
|
||||
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
|
||||
|
||||
git-subtree-check.sh
|
||||
====================
|
||||
|
||||
Run this script from the root of the repository to verify that a subtree matches the contents of
|
||||
the commit it claims to have been updated to.
|
||||
|
||||
To use, make sure that you have fetched the upstream repository branch in which the subtree is
|
||||
maintained:
|
||||
* for src/secp256k1: https://github.com/bitcoin/secp256k1.git (branch master)
|
||||
* for sec/leveldb: https://github.com/bitcoin/leveldb.git (branch bitcoin-fork)
|
||||
|
||||
Usage: git-subtree-check.sh DIR COMMIT
|
||||
COMMIT may be omitted, in which case HEAD is used.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue