forked from wownero/wownero
Compare commits
198 Commits
master
...
release-v0
Author | SHA1 | Date |
---|---|---|
jw | 19466231e8 | 5 years ago |
jw | abf9c1a58e | 5 years ago |
jw | ab19a0ae15 | 5 years ago |
jw | a8be4465d9 | 5 years ago |
jw | bfd7154cbb | 5 years ago |
wowario | 8d00a34b2c | 5 years ago |
wowario | fa50d74571 | 5 years ago |
wowario | 7c7f8647ca | 5 years ago |
naughtyfox | 5b19c9a7b7 | 5 years ago |
moneromooo-monero | 586b32a7ca | 5 years ago |
jw | 09bf93a931 | 5 years ago |
wowario | 7b06d497f4 | 5 years ago |
wowario | 95a6414342 | 5 years ago |
wowario | d6422cc81c | 5 years ago |
wowario | 661e3841fb | 5 years ago |
wowario | ce3c9b1119 | 5 years ago |
wowario | 05e391fc54 | 5 years ago |
wowario | d77ac12218 | 5 years ago |
wowario | 87d457d4ac | 5 years ago |
SChernykh | 0dbbd13baa | 5 years ago |
wowario | dee662ce10 | 5 years ago |
wowario | 0742c615e2 | 5 years ago |
fuwa | 8058facbb3 | 5 years ago |
wowario | 2e06575559 | 5 years ago |
wowario | bbf8d72e18 | 5 years ago |
wowario | d6c12cd641 | 5 years ago |
wowario | f84028f88c | 5 years ago |
wowario | 2fbe9f7730 | 5 years ago |
wowario | 2b1829f649 | 5 years ago |
wowario | 3cfc60d416 | 5 years ago |
wowario | 9b19be69a1 | 5 years ago |
Riccardo Spagni | 6e093aa478 | 5 years ago |
moneromooo-monero | eaaa1e5a35 | 5 years ago |
moneromooo-monero | 1ff89b1364 | 5 years ago |
cslashm | 9acb635efd | 5 years ago |
moneromooo-monero | 5fd8022721 | 5 years ago |
moneromooo | 385f232f5e | 5 years ago |
moneromooo-monero | 41f7e77ca5 | 5 years ago |
Riccardo Spagni | fb4c29b960 | 5 years ago |
moneromooo-monero | 8aee860157 | 5 years ago |
moneromooo-monero | 1c745c3b04 | 5 years ago |
TheCharlatan | 7e9ecf35dd | 5 years ago |
selsta | b4a6c93d94 | 5 years ago |
selsta | eaa36e8f26 | 5 years ago |
moneromooo-monero | 1e5f2e4c58 | 5 years ago |
Riccardo Spagni | 39875ebdd4 | 5 years ago |
Riccardo Spagni | 72a1b05c13 | 5 years ago |
Dusan Klinec | 9fad3c060b | 5 years ago |
moneromooo-monero | b117840c81 | 5 years ago |
moneromooo-monero | 0622741c03 | 5 years ago |
moneromooo-monero | 362ecad06c | 5 years ago |
stoffu | b45b4e58f4 | 5 years ago |
moneromooo-monero | 4bcb105e6c | 5 years ago |
moneromooo-monero | 7553fdcbb3 | 5 years ago |
moneromooo-monero | 32745e0696 | 5 years ago |
moneromooo-monero | 56b6e9a89f | 5 years ago |
moneromooo-monero | b91d510669 | 5 years ago |
moneromooo-monero | 93c2e6f521 | 5 years ago |
moneromooo-monero | 0470ea5ac0 | 5 years ago |
moneromooo-monero | f94c615fc3 | 5 years ago |
xiphon | ebb1580493 | 5 years ago |
moneromooo-monero | d2abdff997 | 5 years ago |
Pol Mauri | baf9984f32 | 5 years ago |
cslashm | 356ea85da7 | 5 years ago |
cslashm | e1b8e3d7b4 | 5 years ago |
cslashm | d56c1d68f9 | 5 years ago |
cslashm | 6314a4e78a | 5 years ago |
Tom Smeding | 02db718dfe | 5 years ago |
moneromooo-monero | a315729e98 | 5 years ago |
moneromooo-monero | 423cf4406d | 5 years ago |
moneromooo-monero | 33a76e92f4 | 5 years ago |
moneromooo-monero | 7ad2500f68 | 5 years ago |
moneromooo-monero | 7057806c49 | 5 years ago |
moneromooo-monero | b5c9aed261 | 5 years ago |
moneromooo-monero | 817be97f39 | 5 years ago |
moneromooo-monero | 73574c7380 | 5 years ago |
moneromooo-monero | 2a616c8b15 | 5 years ago |
moneromooo-monero | 8fdc0d4cb3 | 5 years ago |
moneromooo-monero | 66d1424200 | 5 years ago |
moneromooo-monero | 3974e40efa | 5 years ago |
Jethro Grassie | ad6a732f24 | 5 years ago |
moneromooo-monero | abb4728cf7 | 5 years ago |
moneromooo-monero | 51a7dd045e | 5 years ago |
moneromooo-monero | 7942e862b8 | 5 years ago |
moneromooo-monero | eb982caad1 | 5 years ago |
moneromooo-monero | eb5a2cbdd2 | 5 years ago |
moneromooo-monero | cdf2e30825 | 5 years ago |
moneromooo-monero | 7eab7b6a72 | 5 years ago |
moneromooo-monero | bc19bcb2f6 | 5 years ago |
moneromooo-monero | 3353e6e784 | 5 years ago |
moneromooo-monero | eaf602bceb | 5 years ago |
moneromooo-monero | d48a44d161 | 5 years ago |
moneromooo-monero | d5c079ef1e | 5 years ago |
Riccardo Spagni | ba1fd08e41 | 5 years ago |
Lee Clagett | 6246aada9d | 5 years ago |
moneromooo-monero | 18683acc84 | 5 years ago |
moneromooo-monero | 89c74b5710 | 5 years ago |
moneromooo-monero | 650594ab63 | 5 years ago |
xiphon | 7e669f2d43 | 5 years ago |
moneromooo-monero | 586e9189a6 | 5 years ago |
moneromooo-monero | e776762bf6 | 5 years ago |
stoffu | 13edabb3e6 | 5 years ago |
iDunk5400 | d1d21b0378 | 5 years ago |
moneromooo-monero | 0bed77b72e | 5 years ago |
moneromooo-monero | 627c303c2f | 5 years ago |
moneromooo-monero | b26d373800 | 5 years ago |
moneromooo-monero | 5ebebc1420 | 5 years ago |
moneromooo-monero | 4fccdaea6a | 5 years ago |
Riccardo Spagni | 01a67e96b1 | 5 years ago |
Riccardo Spagni | 72f5fb8019 | 5 years ago |
stoffu | 2777f8c421 | 5 years ago |
Tyler Baker | 154c7abdb3 | 5 years ago |
xiphon | 83aa5c70d0 | 5 years ago |
Riccardo Spagni | 6834ce6de2 | 6 years ago |
Riccardo Spagni | 8beb3cd2a1 | 6 years ago |
Riccardo Spagni | dc24639e64 | 6 years ago |
Riccardo Spagni | 92f42b1e81 | 6 years ago |
Riccardo Spagni | 29d7ef0fe0 | 6 years ago |
Riccardo Spagni | a9504f7001 | 6 years ago |
Riccardo Spagni | 3c36a6a227 | 6 years ago |
moneromooo-monero | b215ea9f56 | 6 years ago |
moneromooo-monero | 067e232b19 | 6 years ago |
moneromooo-monero | d7f3805d2e | 6 years ago |
wow nero | a04d68f698 | 6 years ago |
moneromooo-monero | 3b04e2e3d4 | 6 years ago |
moneromooo-monero | e25d21a788 | 6 years ago |
moneromooo-monero | 2509717b11 | 6 years ago |
Riccardo Spagni | 77ef8c1839 | 6 years ago |
Riccardo Spagni | e0f4606a72 | 6 years ago |
Riccardo Spagni | d7d6d23867 | 6 years ago |
Riccardo Spagni | 1b9e6861b7 | 6 years ago |
Riccardo Spagni | cc33d3b2de | 6 years ago |
Riccardo Spagni | d8f95843c4 | 6 years ago |
Riccardo Spagni | e16982617b | 6 years ago |
Riccardo Spagni | eca27122df | 6 years ago |
Riccardo Spagni | 4b609dede3 | 6 years ago |
Riccardo Spagni | 5209bbd0c5 | 6 years ago |
Riccardo Spagni | 161fd13768 | 6 years ago |
Riccardo Spagni | 49c11b2248 | 6 years ago |
Riccardo Spagni | f5df0e272e | 6 years ago |
Riccardo Spagni | 34da7d852b | 6 years ago |
Riccardo Spagni | 84cc3b916e | 6 years ago |
Riccardo Spagni | 24e519b9b6 | 6 years ago |
Riccardo Spagni | 3512eb5e68 | 6 years ago |
Riccardo Spagni | 42545e9adc | 6 years ago |
Riccardo Spagni | 9d97ffb804 | 6 years ago |
Riccardo Spagni | 71b9dd96ca | 6 years ago |
Riccardo Spagni | b63f1ea637 | 6 years ago |
Riccardo Spagni | 5f83ec59ca | 6 years ago |
Riccardo Spagni | b26ab0b580 | 6 years ago |
Riccardo Spagni | 17ab6fdd5a | 6 years ago |
Riccardo Spagni | a2cd4f2cc7 | 6 years ago |
Riccardo Spagni | 9556ba0d66 | 6 years ago |
Riccardo Spagni | b8cee6bf9e | 6 years ago |
Riccardo Spagni | 5adbede27f | 6 years ago |
Riccardo Spagni | 735a33e8d8 | 6 years ago |
Riccardo Spagni | e037534f44 | 6 years ago |
Riccardo Spagni | 9570081ae5 | 6 years ago |
Riccardo Spagni | e0fa7fa384 | 6 years ago |
Riccardo Spagni | 9c426a30f9 | 6 years ago |
Riccardo Spagni | ca9b2493ee | 6 years ago |
Riccardo Spagni | cf436cde1a | 6 years ago |
Riccardo Spagni | b99e670f84 | 6 years ago |
Riccardo Spagni | 88a0985104 | 6 years ago |
Riccardo Spagni | 4701a78ad1 | 6 years ago |
Riccardo Spagni | 861895e92d | 6 years ago |
Riccardo Spagni | 5fc4d57ee5 | 6 years ago |
Riccardo Spagni | efbd42f9d9 | 6 years ago |
Riccardo Spagni | 4cbaa6e43d | 6 years ago |
Riccardo Spagni | f0b3bbf808 | 6 years ago |
Riccardo Spagni | 33aa05678f | 6 years ago |
Riccardo Spagni | 37252f6aec | 6 years ago |
Riccardo Spagni | 67e6c4370b | 6 years ago |
moneromooo-monero | 7340300460 | 6 years ago |
moneromooo-monero | 7dd11711b0 | 6 years ago |
moneromooo-monero | bcf3f6afdd | 6 years ago |
moneromooo-monero | 3ebd05d4e5 | 6 years ago |
moneromooo-monero | a093092ef7 | 6 years ago |
moneromooo-monero | 1eebb82bcc | 6 years ago |
moneromooo-monero | fb6a363050 | 6 years ago |
moneromooo-monero | 2e2139ffb7 | 6 years ago |
moneromooo-monero | 0749a8bd3c | 6 years ago |
moneromooo-monero | 1b0afeeb1c | 6 years ago |
moneromooo-monero | 418a993618 | 6 years ago |
moneromooo-monero | ea7f954381 | 6 years ago |
moneromooo-monero | 6e8554221f | 6 years ago |
moneromooo-monero | 53df2deb36 | 6 years ago |
moneromooo-monero | e67016ddb4 | 6 years ago |
moneromooo-monero | 661439f4e0 | 6 years ago |
moneromooo-monero | 5fdcda50ee | 6 years ago |
wow nero | 921b0fb11b | 6 years ago |
moneromooo-monero | 7ece1550e1 | 6 years ago |
xiphon | 85318e7800 | 6 years ago |
moneromooo-monero | a085da3247 | 6 years ago |
moneromooo-monero | d8b1ec8b8b | 6 years ago |
moneromooo-monero | 02563bf4b9 | 6 years ago |
moneromooo-monero | c57a65b246 | 6 years ago |
Dusan Klinec | 06d05c21eb | 6 years ago |
@ -1,96 +0,0 @@
|
||||
name: continuous-integration/gh-actions/cli
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: update brew and install dependencies
|
||||
run: brew update && brew install boost hidapi zmq libpgm miniupnpc ldns expat libunwind-headers protobuf
|
||||
- name: build
|
||||
run: make -j3
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb git
|
||||
- name: build
|
||||
run: make release-static-win64 -j2
|
||||
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: remove bundled boost
|
||||
run: sudo rm -rf /usr/local/share/boost
|
||||
- name: set apt conf
|
||||
run: |
|
||||
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
- name: update apt
|
||||
run: sudo apt update
|
||||
- name: install monero dependencies
|
||||
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler
|
||||
- name: build
|
||||
run: make -j3
|
||||
|
||||
libwallet-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: remove bundled boost
|
||||
run: sudo rm -rf /usr/local/share/boost
|
||||
- name: set apt conf
|
||||
run: |
|
||||
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
- name: update apt
|
||||
run: sudo apt update
|
||||
- name: install monero dependencies
|
||||
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler
|
||||
- name: build
|
||||
run: cmake -DBUILD_GUI_DEPS=ON && make -j3
|
||||
|
||||
test-ubuntu:
|
||||
needs: build-ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: remove bundled boost
|
||||
run: sudo rm -rf /usr/local/share/boost
|
||||
- name: set apt conf
|
||||
run: |
|
||||
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
- name: update apt
|
||||
run: sudo apt update
|
||||
- name: install monero dependencies
|
||||
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler
|
||||
- name: install requests
|
||||
run: pip install requests
|
||||
- name: tests
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: ON
|
||||
run: make release-test -j3
|
@ -1,233 +0,0 @@
|
||||
# Anonymity Networks with Monero
|
||||
|
||||
Currently only Tor and I2P have been integrated into Monero. The usage of
|
||||
these networks is still considered experimental - there are a few pessimistic
|
||||
cases where privacy is leaked. The design is intended to maximize privacy of
|
||||
the source of a transaction by broadcasting it over an anonymity network, while
|
||||
relying on IPv4 for the remainder of messages to make surrounding node attacks
|
||||
(via sybil) more difficult.
|
||||
|
||||
|
||||
## Behavior
|
||||
|
||||
If _any_ anonymity network is enabled, transactions being broadcast that lack
|
||||
a valid "context" (i.e. the transaction did not come from a p2p connection),
|
||||
will only be sent to peers on anonymity networks. If an anonymity network is
|
||||
enabled but no peers over an anonymity network are available, an error is
|
||||
logged and the transaction is kept for future broadcasting over an anonymity
|
||||
network. The transaction will not be broadcast unless an anonymity connection
|
||||
is made or until `monerod` is shutdown and restarted with only public
|
||||
connections enabled.
|
||||
|
||||
Anonymity networks can also be used with `monero-wallet-cli` and
|
||||
`monero-wallet-rpc` - the wallets will connect to a daemon through a proxy. The
|
||||
daemon must provide a hidden service for the RPC itself, which is separate from
|
||||
the hidden service for P2P connections.
|
||||
|
||||
|
||||
## P2P Commands
|
||||
|
||||
Only handshakes, peer timed syncs and transaction broadcast messages are
|
||||
supported over anonymity networks. If one `--add-exclusive-node` p2p address
|
||||
is specified, then no syncing will take place and only transaction broadcasting
|
||||
can occur. It is therefore recommended that `--add-exclusive-node` be combined
|
||||
with additional exclusive IPv4 address(es).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Outbound Connections
|
||||
|
||||
Connecting to an anonymous address requires the command line option
|
||||
`--tx-proxy` which tells `monerod` the ip/port of a socks proxy provided by a
|
||||
separate process. On most systems the configuration will look like:
|
||||
|
||||
```
|
||||
--tx-proxy tor,127.0.0.1:9050,10
|
||||
--tx-proxy i2p,127.0.0.1:9000
|
||||
```
|
||||
|
||||
which tells `monerod` that ".onion" p2p addresses can be forwarded to a socks
|
||||
proxy at IP 127.0.0.1 port 9050 with a max of 10 outgoing connections and
|
||||
".b32.i2p" p2p addresses can be forwarded to a socks proxy at IP 127.0.0.1 port
|
||||
9000 with the default max outgoing connections.
|
||||
|
||||
If desired, peers can be manually specified:
|
||||
|
||||
```
|
||||
--add-exclusive-node rveahdfho7wo4b2m.onion:28083
|
||||
--add-peer rveahdfho7wo4b2m.onion:28083
|
||||
```
|
||||
|
||||
Either option can be listed multiple times, and can specify any mix of Tor,
|
||||
I2P, and IPv4 addresses. Using `--add-exclusive-node` will prevent the usage of
|
||||
seed nodes on ALL networks, which will typically be undesirable.
|
||||
|
||||
### Inbound Connections
|
||||
|
||||
Receiving anonymity connections is done through the option
|
||||
`--anonymous-inbound`. This option tells `monerod` the inbound address, network
|
||||
type, and max connections:
|
||||
|
||||
```
|
||||
--anonymous-inbound rveahdfho7wo4b2m.onion:28083,127.0.0.1:28083,25
|
||||
--anonymous-inbound cmeua5767mz2q5jsaelk2rxhf67agrwuetaso5dzbenyzwlbkg2q.b32.i2p:5000,127.0.0.1:30000
|
||||
```
|
||||
|
||||
which tells `monerod` that a max of 25 inbound Tor connections are being
|
||||
received at address "rveahdfho7wo4b2m.onion:28083" and forwarded to `monerod`
|
||||
localhost port 28083, and a default max I2P connections are being received at
|
||||
address "cmeua5767mz2q5jsaelk2rxhf67agrwuetaso5dzbenyzwlbkg2q.b32.i2p:5000" and
|
||||
forwarded to `monerod` localhost port 30000.
|
||||
These addresses will be shared with outgoing peers, over the same network type,
|
||||
otherwise the peer will not be notified of the peer address by the proxy.
|
||||
|
||||
### Wallet RPC
|
||||
|
||||
An anonymity network can be configured to forward incoming connections to a
|
||||
`monerod` RPC port - which is independent from the configuration for incoming
|
||||
P2P anonymity connections. The anonymity network (Tor/i2p) is
|
||||
[configured in the same manner](#configuration), except the localhost port
|
||||
must be the RPC port (typically 18081 for mainnet) instead of the p2p port:
|
||||
|
||||
```
|
||||
HiddenServiceDir /var/lib/tor/data/monero
|
||||
HiddenServicePort 18081 127.0.0.1:18081
|
||||
```
|
||||
|
||||
Then the wallet will be configured to use a Tor/i2p address:
|
||||
```
|
||||
--proxy 127.0.0.1:9050
|
||||
--daemon-address rveahdfho7wo4b2m.onion
|
||||
```
|
||||
|
||||
The proxy must match the address type - a Tor proxy will not work properly with
|
||||
i2p addresses, etc.
|
||||
|
||||
i2p and onion addresses provide the information necessary to authenticate and
|
||||
encrypt the connection from end-to-end. If desired, SSL can also be applied to
|
||||
the connection with `--daemon-address https://rveahdfho7wo4b2m.onion` which
|
||||
requires a server certificate that is signed by a "root" certificate on the
|
||||
machine running the wallet. Alternatively, `--daemon-cert-file` can be used to
|
||||
specify a certificate to authenticate the server.
|
||||
|
||||
Proxies can also be used to connect to "clearnet" (ipv4 addresses or ICANN
|
||||
domains), but `--daemon-cert-file` _must_ be used for authentication and
|
||||
encryption.
|
||||
|
||||
### Network Types
|
||||
|
||||
#### Tor & I2P
|
||||
|
||||
Options `--add-exclusive-node` and `--add-peer` recognize ".onion" and
|
||||
".b32.i2p" addresses, and will properly forward those addresses to the proxy
|
||||
provided with `--tx-proxy tor,...` or `--tx-proxy i2p,...`.
|
||||
|
||||
Option `--anonymous-inbound` also recognizes ".onion" and ".b32.i2p" addresses,
|
||||
and will automatically be sent out to outgoing Tor/I2P connections so the peer
|
||||
can distribute the address to its other peers.
|
||||
|
||||
##### Configuration
|
||||
|
||||
Tor must be configured for hidden services. An example configuration ("torrc")
|
||||
might look like:
|
||||
|
||||
```
|
||||
HiddenServiceDir /var/lib/tor/data/monero
|
||||
HiddenServicePort 28083 127.0.0.1:28083
|
||||
```
|
||||
|
||||
This will store key information in `/var/lib/tor/data/monero` and will forward
|
||||
"Tor port" 28083 to port 28083 of ip 127.0.0.1. The file
|
||||
`/usr/lib/tor/data/monero/hostname` will contain the ".onion" address for use
|
||||
with `--anonymous-inbound`.
|
||||
|
||||
I2P must be configured with a standard server tunnel. Configuration differs by
|
||||
I2P implementation.
|
||||
|
||||
## Privacy Limitations
|
||||
|
||||
There are currently some techniques that could be used to _possibly_ identify
|
||||
the machine that broadcast a transaction over an anonymity network.
|
||||
|
||||
### Timestamps
|
||||
|
||||
The peer timed sync command sends the current time in the message. This value
|
||||
can be used to link an onion address to an IPv4/IPv6 address. If a peer first
|
||||
sees a transaction over Tor, it could _assume_ (possibly incorrectly) that the
|
||||
transaction originated from the peer. If both the Tor connection and an
|
||||
IPv4/IPv6 connection have timestamps that are approximately close in value they
|
||||
could be used to link the two connections. This is less likely to happen if the
|
||||
system clock is fairly accurate - many peers on the Monero network should have
|
||||
similar timestamps.
|
||||
|
||||
#### Mitigation
|
||||
|
||||
Keep the system clock accurate so that fingerprinting is more difficult. In
|
||||
the future a random offset might be applied to anonymity networks so that if
|
||||
the system clock is noticeably off (and therefore more fingerprintable),
|
||||
linking the public IPv4/IPv6 connections with the anonymity networks will be
|
||||
more difficult.
|
||||
|
||||
### Intermittent Monero Syncing
|
||||
|
||||
If a user only runs `monerod` to send a transaction then quit, this can also
|
||||
be used by an ISP to link a user to a transaction.
|
||||
|
||||
#### Mitigation
|
||||
|
||||
Run `monerod` as often as possible to conceal when transactions are being sent.
|
||||
Future versions will also have peers that first receive a transaction over an
|
||||
anonymity network delay the broadcast to public peers by a randomized amount.
|
||||
This will not completely mitigate a user who syncs up sends then quits, in
|
||||
part because this rule is not enforceable, so this mitigation strategy is
|
||||
simply a best effort attempt.
|
||||
|
||||
### Active Bandwidth Shaping
|
||||
|
||||
An attacker could attempt to bandwidth shape traffic in an attempt to determine
|
||||
the source of a Tor/I2P connection. There isn't great mitigation against
|
||||
this, but I2P should provide better protection against this attack since
|
||||
the connections are not circuit based.
|
||||
|
||||
#### Mitigation
|
||||
|
||||
The best mitigation is to use I2P instead of Tor. However, I2P
|
||||
has a smaller set of users (less cover traffic) and academic reviews, so there
|
||||
is a trade off in potential issues. Also, anyone attempting this strategy really
|
||||
wants to uncover a user, it seems unlikely that this would be performed against
|
||||
every Tor/I2P user.
|
||||
|
||||
### I2P/Tor Stream Used Twice
|
||||
|
||||
If a single I2P/Tor stream is used 2+ times for transmitting a transaction, the
|
||||
operator of the hidden service can conclude that both transactions came from the
|
||||
same source. If the subsequent transactions spend a change output from the
|
||||
earlier transactions, this will also reveal the "real" spend in the ring
|
||||
signature. This issue was (primarily) raised by @secparam on Twitter.
|
||||
|
||||
#### Mitigation
|
||||
|
||||
`monerod` currently selects two outgoing connections every 5 minutes for
|
||||
transmitting transactions over I2P/Tor. Using outgoing connections prevents an
|
||||
adversary from making many incoming connections to obtain information (this
|
||||
technique was taken from Dandelion). Outgoing connections also do not have a
|
||||
persistent public key identity - the creation of a new circuit will generate
|
||||
a new public key identity. The lock time on a change address is ~20 minutes, so
|
||||
`monerod` will have rotated its selected outgoing connections several times in
|
||||
most cases. However, the number of outgoing connections is typically a small
|
||||
fixed number, so there is a decent probability of re-use with the same public
|
||||
key identity.
|
||||
|
||||
@secparam (twitter) recommended changing circuits (Tor) as an additional
|
||||
precaution. This is likely not a good idea - forcibly requesting Tor to change
|
||||
circuits is observable by the ISP. Instead, `monerod` should likely disconnect
|
||||
from peers occasionally. Tor will rotate circuits every ~10 minutes, so
|
||||
establishing new connections will use a new public key identity and make it
|
||||
more difficult for the hidden service to link information. This process will
|
||||
have to be done carefully because closing/reconnecting connections can also
|
||||
leak information to hidden services if done improperly.
|
||||
|
||||
At the current time, if users need to frequently make transactions, I2P/Tor
|
||||
will improve privacy from ISPs and other common adversaries, but still have
|
||||
some metadata leakages to unknown hidden service operators.
|
@ -1,165 +0,0 @@
|
||||
# Levin Protocol
|
||||
This is a document explaining the current design of the levin protocol, as
|
||||
used by Monero. The protocol is largely inherited from cryptonote, but has
|
||||
undergone some changes.
|
||||
|
||||
This document also may differ from the `struct bucket_head2` in Monero's
|
||||
code slightly - the spec here is slightly more strict to allow for
|
||||
extensibility.
|
||||
|
||||
One of the goals of this document is to clearly indicate what is being sent
|
||||
"on the wire" to identify metadata that could de-anonymize users over I2P/Tor.
|
||||
These issues will be addressed as they are found. See `ANONMITY_NETWORKS.md` in
|
||||
the top-level folder for any outstanding issues.
|
||||
|
||||
> This document does not currently list all data being sent by the monero
|
||||
> protocol, that portion is a work-in-progress. Please take the time to do it
|
||||
> if interested in learning about Monero p2p traffic!
|
||||
|
||||
|
||||
## Header
|
||||
This header is sent for every Monero p2p message.
|
||||
|
||||
```
|
||||
0 1 2 3
|
||||
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| 0x01 | 0x21 | 0x01 | 0x01 |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| 0x01 | 0x01 | 0x01 | 0x01 |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Length |
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| E. Response | Command
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Return Code
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|Q|S|B|E| Reserved
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| 0x01 | 0x00 | 0x00 |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| 0x00 |
|
||||
+-+-+-+-+-+-+-+-+
|
||||
```
|
||||
|
||||
### Signature
|
||||
The first 8 bytes are the "signature" which helps identify the protocol (in
|
||||
case someone connected to the wrong port, etc). The comments indicate that byte
|
||||
sequence is from "benders nightmare".
|
||||
|
||||
This also can be used by deep packet inspection (DPI) engines to identify
|
||||
Monero when the link is not encrypted. SSL has been proposed as a means to
|
||||
mitigate this issue, but BIP-151 or the Noise protocol should also be considered.
|
||||
|
||||
### Length
|
||||
The length is an unsigned 64-bit little endian integer. The length does _not_
|
||||
include the header.
|
||||
|
||||
The implementation currently rejects received messages that exceed 100 MB
|
||||
(base 10) by default.
|
||||
|
||||
### Expect Response
|
||||
A zero-byte if no response is expected from the peer, and a non-zero byte if a
|
||||
response is expected from the peer. Peers must respond to requests with this
|
||||
flag in the same order that they were received, however, other messages can be
|
||||
sent between responses.
|
||||
|
||||
There are some commands in the
|
||||
[cryptonote protocol](#cryptonote-protocol-commands) where a response is
|
||||
expected from the peer, but this flag is not set. Those responses are returned
|
||||
as notify messages and can be sent in any order by the peer.
|
||||
|
||||
### Command
|
||||
An unsigned 32-bit little endian integer representing the Monero specific
|
||||
command being invoked.
|
||||
|
||||
### Return Code
|
||||
A signed 32-bit little integer integer representing the response from the peer
|
||||
from the last command that was invoked. This is `0` for request messages.
|
||||
|
||||
### Flags
|
||||
* `Q` - Bit is set if the message is a request.
|
||||
* `S` - Bit is set if the message is a response.
|
||||
* `B` - Bit is set if this is a the beginning of a [fragmented message](#fragmented-messages).
|
||||
* `E` - Bit is set if this is the end of a [fragmented message](#fragmented-messages).
|
||||
|
||||
### Version
|
||||
A fixed value of `1` as an unsigned 32-bit little endian integer.
|
||||
|
||||
|
||||
## Message Flow
|
||||
The protocol can be subdivided into: (1) notifications, (2) requests,
|
||||
(3) responses, (4) fragmented messages, and (5) dummy messages. Response
|
||||
messages must be sent in the same order that a peer issued a request message.
|
||||
A peer does not have to send a response immediately following a request - any
|
||||
other message type can be sent instead.
|
||||
|
||||
### Notifications
|
||||
Notifications are one-way messages that can be sent at any time without
|
||||
an expectation of a response from the peer. The `Q` bit must be set, the `S`,
|
||||
`B` and `E` bits must be unset, and the `Expect Response` field must be zeroed.
|
||||
|
||||
Some notifications must be in response to other notifications. This is not
|
||||
part of the levin messaging layer, and is described in the
|
||||
[commands](#commands) section.
|
||||
|
||||
### Requests
|
||||
Requests are the basis of the admin protocol for Monero. The `Q` bit must be
|
||||
set, the `S`, `B` and `E` bits must be unset, and the `Expect Response` field
|
||||
must be non-zero. The peer is expected to send a response message with the same
|
||||
`command` number.
|
||||
|
||||
### Responses
|
||||
Response message can only be sent after a peer first issues a request message.
|
||||
Responses must have the `S` bit set, the `Q`, `B` and `E` bits unset, and have
|
||||
a zeroed `Expect Response` field. The `Command` field must be the same value
|
||||
that was sent in the request message. The `Return Code` is specific to the
|
||||
`Command` being issued (see [commands])(#commands)).
|
||||
|
||||
### Fragmented
|
||||
Fragmented messages were introduced for the "white noise" feature for i2p/tor.
|
||||
A transaction can be sent in fragments to conceal when "real" data is being
|
||||
sent instead of dummy messages. Only one fragmented message can be sent at a
|
||||
time, and bits `B` and `E` are never set at the same time
|
||||
(see [dummy messages](#dummy)). The re-constructed message must contain a
|
||||
levin header for a different (non-fragment) message type.
|
||||
|
||||
The `Q` and `S` bits are never set and the `Expect Response` field must always
|
||||
be zero. The first fragment has the `B` bit set, neither `B` nor `E` is set for
|
||||
"middle" fragments, and `E` is set for the last fragment.
|
||||
|
||||
### Dummy
|
||||
Dummy messages have the `B` and `E` bits set, the `Q` and `S` bits unset, and
|
||||
the `Expect Reponse` field zeroed. When a message of this type is received, the
|
||||
contents can be safely ignored.
|
||||
|
||||
|
||||
## Commands
|
||||
### P2P (Admin) Commands
|
||||
|
||||
#### (`1001` Request) Handshake
|
||||
#### (`1001` Response) Handshake
|
||||
#### (`1002` Request) Timed Sync
|
||||
#### (`1002` Response) Timed Sync
|
||||
#### (`1003` Request) Ping
|
||||
#### (`1003` Response) Ping
|
||||
#### (`1004` Request) Stat Info
|
||||
#### (`1004` Response) Stat Info
|
||||
#### (`1005` Request) Network State
|
||||
#### (`1005` Response) Network State
|
||||
#### (`1006` Request) Peer ID
|
||||
#### (`1006` Reponse) Peer ID
|
||||
#### (`1007` Request) Support Flags
|
||||
#### (`1007` Response) Support Flags
|
||||
|
||||
### Cryptonote Protocol Commands
|
||||
|
||||
#### (`2001` Notification) New Block
|
||||
#### (`2002` Notification) New Transactions
|
||||
#### (`2003` Notification) Request Get Objects
|
||||
#### (`2004` Notification) Response Get Objects
|
||||
#### (`2006` Notification) Request Chain
|
||||
#### (`2007` Notification) Response Chain Entry
|
||||
#### (`2008` Notification) New Fluffy Block
|
||||
#### (`2009` Notification) Request Fluffy Missing TX
|
@ -0,0 +1,39 @@
|
||||
# Maintainer: wowario <wowario at protonmail dot com>
|
||||
# Contributor: wowario <wowario at protonmail dot com>
|
||||
|
||||
pkgbase=('wownero-git')
|
||||
pkgname=('wownero-git')
|
||||
pkgver=0.5.0.2
|
||||
pkgrel=1
|
||||
pkgdesc="a fairly launched privacy-centric meme coin with no premine and a finite supply"
|
||||
license=('custom:Cryptonote')
|
||||
arch=('x86_64')
|
||||
url="http://wownero.org/"
|
||||
depends=('boost-libs' 'zeromq' 'unbound' 'libusb')
|
||||
makedepends=('git' 'cmake' 'boost')
|
||||
provides=('wownero-git')
|
||||
|
||||
source=("${pkgname}"::"git+https://github.com/wownero/wownero")
|
||||
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/${pkgname}"
|
||||
printf "$(echo ${pkgver} | sed 's/\.r.*//').r%s.g%s" \
|
||||
"$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}"
|
||||
git fetch --tags && git checkout tags/v0.5.0.2 -b v0.5.0.2
|
||||
USE_SINGLE_BUILDDIR=1 make
|
||||
}
|
||||
|
||||
package_wownero-git() {
|
||||
install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
install -Dm644 "${srcdir}/${pkgname}/utils/conf/wownerod.conf" "${pkgdir}/etc/wownerod.conf"
|
||||
install -Dm644 "${srcdir}/${pkgname}/utils/systemd/wownerod.service" "${pkgdir}/usr/lib/systemd/system/wownerod.service"
|
||||
install -Dm755 "${srcdir}/${pkgname}/build/release/bin/wownerod" "${pkgdir}/usr/bin/wownerod"
|
||||
install -Dm755 "${srcdir}/${pkgname}/build/release/bin/wownero-wallet-cli" "${pkgdir}/usr/bin/wownero-wallet-cli"
|
||||
install -Dm755 "${srcdir}/${pkgname}/build/release/bin/wownero-wallet-rpc" "${pkgdir}/usr/bin/wownero-wallet-rpc"
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# The Current/Future Status of ZMQ in Monero
|
||||
|
||||
## ZMQ Pub/Sub
|
||||
Client `ZMQ_SUB` sockets must "subscribe" to topics before it receives any data.
|
||||
This allows filtering on the server side, so network traffic is reduced. Monero
|
||||
allows for filtering on: (1) format, (2) context, and (3) event.
|
||||
|
||||
* **format** refers to the _wire_ format (i.e. JSON) used to send event
|
||||
information.
|
||||
* **context** allows for a reduction in fields for the event, so the
|
||||
daemon doesn't waste cycles serializing fields that get ignored.
|
||||
* **event** refers to status changes occurring within the daemon (i.e. new
|
||||
block to main chain).
|
||||
|
||||
* Formats:
|
||||
* `json`
|
||||
* Contexts:
|
||||
* `full` - the entire block or transaction is transmitted (the hash can be
|
||||
computed remotely).
|
||||
* `minimal` - the bare minimum for a remote client to react to an event is
|
||||
sent.
|
||||
* Events:
|
||||
* `chain_main` - changes to the primary/main blockchain.
|
||||
* `txpool_add` - new _publicly visible_ transactions in the mempool.
|
||||
Includes previously unseen transactions in a block but _not_ the
|
||||
`miner_tx`. Does not "re-publish" after a reorg. Includes `do_not_relay`
|
||||
transactions.
|
||||
|
||||
The subscription topics are formatted as `format-context-event`, with prefix
|
||||
matching supported by both Monero and ZMQ. The `format`, `context` and `event`
|
||||
will _never_ have hyphens or colons in their name. For example, subscribing to
|
||||
`json-minimal-chain_main` will send minimal information in JSON when changes
|
||||
to the main/primary blockchain occur. Whereas, subscribing to `json-minimal`
|
||||
will send minimal information in JSON on all available events supported by the
|
||||
daemon.
|
||||
|
||||
The Monero daemon will ensure that events prefixed by `chain` will be sent in
|
||||
"chain-order" - the `prev_id` (hash) field will _always_ refer to a previous
|
||||
block. On rollbacks/reorgs, the event will reference an earlier block in the
|
||||
chain instead of the last block. The Monero daemon also ensures that
|
||||
`txpool_add` events are sent before `chain_*` events - the `chain_*` messages
|
||||
will only serialize miner transactions since the other transactions were
|
||||
previously published via `txpool_add`. This prevents transactions from being
|
||||
serialized twice, even when the transaction was first observed in a block.
|
||||
|
||||
ZMQ Pub/Sub will drop messages if the network is congested, so the above rules
|
||||
for send order are used for detecting lost messages. A missing gap in `height`
|
||||
or `prev_id` for `chain_*` events indicates a lost pub message. Missing
|
||||
`txpool_add` messages can only be detected at the next `chain_` message.
|
||||
|
||||
Since blockchain events can be dropped, clients will likely want to have a
|
||||
timeout against `chain_main` events. The `GetLastBlockHeader` RPC is useful
|
||||
for checking the current chain state. Dropped messages should be rare in most
|
||||
conditions.
|
||||
|
||||
The Monero daemon will send a `txpool_add` pub exactly once for each
|
||||
transaction, even after a reorg or restarts. Clients should use the
|
||||
`GetTransactionPool` after a reorg to get all transactions that have been put
|
||||
back into the tx pool or been invalidated due to a double-spend.
|
||||
|
||||
|
@ -1,181 +0,0 @@
|
||||
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" ON)
|
||||
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" ON)
|
||||
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" OFF)
|
||||
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" OFF)
|
||||
OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
|
||||
|
||||
# Helper function to fix cmake < 3.6.0 FindProtobuf variables
|
||||
function(_trezor_protobuf_fix_vars)
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.6.0")
|
||||
foreach(UPPER
|
||||
PROTOBUF_SRC_ROOT_FOLDER
|
||||
PROTOBUF_IMPORT_DIRS
|
||||
PROTOBUF_DEBUG
|
||||
PROTOBUF_LIBRARY
|
||||
PROTOBUF_PROTOC_LIBRARY
|
||||
PROTOBUF_INCLUDE_DIR
|
||||
PROTOBUF_PROTOC_EXECUTABLE
|
||||
PROTOBUF_LIBRARY_DEBUG
|
||||
PROTOBUF_PROTOC_LIBRARY_DEBUG
|
||||
PROTOBUF_LITE_LIBRARY
|
||||
PROTOBUF_LITE_LIBRARY_DEBUG
|
||||
)
|
||||
if (DEFINED ${UPPER})
|
||||
string(REPLACE "PROTOBUF_" "Protobuf_" Camel ${UPPER})
|
||||
if (NOT DEFINED ${Camel})
|
||||
set(${Camel} ${${UPPER}} PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Use Trezor master switch
|
||||
if (USE_DEVICE_TREZOR)
|
||||
# Protobuf is required to build protobuf messages for Trezor
|
||||
include(FindProtobuf OPTIONAL)
|
||||
find_package(Protobuf)
|
||||
_trezor_protobuf_fix_vars()
|
||||
|
||||
# Protobuf handling the cache variables set in docker.
|
||||
if(NOT Protobuf_FOUND AND NOT Protobuf_LIBRARY AND NOT Protobuf_PROTOC_EXECUTABLE AND NOT Protobuf_INCLUDE_DIR)
|
||||
message(STATUS "Could not find Protobuf")
|
||||
elseif(NOT Protobuf_LIBRARY OR NOT EXISTS "${Protobuf_LIBRARY}")
|
||||
message(STATUS "Protobuf library not found: ${Protobuf_LIBRARY}")
|
||||
unset(Protobuf_FOUND)
|
||||
elseif(NOT Protobuf_PROTOC_EXECUTABLE OR NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
message(STATUS "Protobuf executable not found: ${Protobuf_PROTOC_EXECUTABLE}")
|
||||
unset(Protobuf_FOUND)
|
||||
elseif(NOT Protobuf_INCLUDE_DIR OR NOT EXISTS "${Protobuf_INCLUDE_DIR}")
|
||||
message(STATUS "Protobuf include dir not found: ${Protobuf_INCLUDE_DIR}")
|
||||
unset(Protobuf_FOUND)
|
||||
else()
|
||||
message(STATUS "Protobuf lib: ${Protobuf_LIBRARY}, inc: ${Protobuf_INCLUDE_DIR}, protoc: ${Protobuf_PROTOC_EXECUTABLE}")
|
||||
set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIR})
|
||||
set(Protobuf_FOUND 1) # override found if all rquired info was provided by variables
|
||||
endif()
|
||||
|
||||
if(TREZOR_DEBUG)
|
||||
set(USE_DEVICE_TREZOR_DEBUG 1)
|
||||
endif()
|
||||
|
||||
# Compile debugging support (for tests)
|
||||
if (USE_DEVICE_TREZOR_DEBUG)
|
||||
add_definitions(-DWITH_TREZOR_DEBUGGING=1)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Trezor support disabled by USE_DEVICE_TREZOR")
|
||||
endif()
|
||||
|
||||
if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
|
||||
if (NOT "$ENV{TREZOR_PYTHON}" STREQUAL "")
|
||||
set(TREZOR_PYTHON "$ENV{TREZOR_PYTHON}" CACHE INTERNAL "Copied from environment variable TREZOR_PYTHON")
|
||||
else()
|
||||
find_package(Python QUIET COMPONENTS Interpreter) # cmake 3.12+
|
||||
if(Python_Interpreter_FOUND)
|
||||
set(TREZOR_PYTHON "${Python_EXECUTABLE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TREZOR_PYTHON)
|
||||
find_package(PythonInterp)
|
||||
if(PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE)
|
||||
set(TREZOR_PYTHON "${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TREZOR_PYTHON)
|
||||
message(STATUS "Trezor: Python not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Protobuf compilation test
|
||||
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
|
||||
execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_CURRENT_LIST_DIR}" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_CURRENT_LIST_DIR}/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
|
||||
if(RET)
|
||||
message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}")
|
||||
endif()
|
||||
|
||||
try_compile(Protobuf_COMPILE_TEST_PASSED
|
||||
"${CMAKE_BINARY_DIR}"
|
||||
SOURCES
|
||||
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp"
|
||||
CMAKE_FLAGS
|
||||
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
|
||||
"-DCMAKE_CXX_STANDARD=11"
|
||||
LINK_LIBRARIES ${Protobuf_LIBRARY}
|
||||
OUTPUT_VARIABLE OUTPUT
|
||||
)
|
||||
if(NOT Protobuf_COMPILE_TEST_PASSED)
|
||||
message(STATUS "Protobuf Compilation test failed: ${OUTPUT}.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Try to build protobuf messages
|
||||
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_TEST_PASSED)
|
||||
set(ENV{PROTOBUF_INCLUDE_DIRS} "${Protobuf_INCLUDE_DIR}")
|
||||
set(ENV{PROTOBUF_PROTOC_EXECUTABLE} "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
set(TREZOR_PROTOBUF_PARAMS "")
|
||||
if (USE_DEVICE_TREZOR_DEBUG)
|
||||
set(TREZOR_PROTOBUF_PARAMS "--debug")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${TREZOR_PYTHON} tools/build_protob.py ${TREZOR_PROTOBUF_PARAMS} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
|
||||
if(RET)
|
||||
message(WARNING "Trezor protobuf messages could not be regenerated (err=${RET}, python ${PYTHON})."
|
||||
"OUT: ${OUT}, ERR: ${ERR}."
|
||||
"Please read src/device_trezor/trezor/tools/README.md")
|
||||
else()
|
||||
message(STATUS "Trezor protobuf messages regenerated out: \"${OUT}.\"")
|
||||
set(DEVICE_TREZOR_READY 1)
|
||||
add_definitions(-DDEVICE_TREZOR_READY=1)
|
||||
add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_definitions(-DTREZOR_DEBUG=1)
|
||||
endif()
|
||||
|
||||
if(USE_DEVICE_TREZOR_UDP_RELEASE)
|
||||
add_definitions(-DUSE_DEVICE_TREZOR_UDP_RELEASE=1)
|
||||
endif()
|
||||
|
||||
if (Protobuf_INCLUDE_DIR)
|
||||
include_directories(${Protobuf_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# LibUSB support, check for particular version
|
||||
# Include support only if compilation test passes
|
||||
if (USE_DEVICE_TREZOR_LIBUSB)
|
||||
find_package(LibUSB)
|
||||
endif()
|
||||
|
||||
if (LibUSB_COMPILE_TEST_PASSED)
|
||||
add_definitions(-DHAVE_TREZOR_LIBUSB=1)
|
||||
if(LibUSB_INCLUDE_DIRS)
|
||||
include_directories(${LibUSB_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(TREZOR_LIBUSB_LIBRARIES "")
|
||||
if(LibUSB_COMPILE_TEST_PASSED)
|
||||
list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES} ${LIBUSB_DEP_LINKER})
|
||||
message(STATUS "Trezor compatible LibUSB found at: ${LibUSB_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
if (BUILD_GUI_DEPS)
|
||||
set(TREZOR_DEP_LIBS "")
|
||||
set(TREZOR_DEP_LINKER "")
|
||||
|
||||
if (Protobuf_LIBRARY)
|
||||
list(APPEND TREZOR_DEP_LIBS ${Protobuf_LIBRARY})
|
||||
string(APPEND TREZOR_DEP_LINKER " -lprotobuf")
|
||||
endif()
|
||||
|
||||
if (TREZOR_LIBUSB_LIBRARIES)
|
||||
list(APPEND TREZOR_DEP_LIBS ${TREZOR_LIBUSB_LIBRARIES})
|
||||
string(APPEND TREZOR_DEP_LINKER " -lusb-1.0 ${LIBUSB_DEP_LINKER}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
@ -1,98 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindBacktrace
|
||||
# -------------
|
||||
#
|
||||
# Find provider for backtrace(3).
|
||||
#
|
||||
# Checks if OS supports backtrace(3) via either libc or custom library.
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ``Backtrace_HEADER``
|
||||
# The header file needed for backtrace(3). Cached.
|
||||
# Could be forcibly set by user.
|
||||
# ``Backtrace_INCLUDE_DIRS``
|
||||
# The include directories needed to use backtrace(3) header.
|
||||
# ``Backtrace_LIBRARIES``
|
||||
# The libraries (linker flags) needed to use backtrace(3), if any.
|
||||
# ``Backtrace_FOUND``
|
||||
# Is set if and only if backtrace(3) support detected.
|
||||
#
|
||||
# The following cache variables are also available to set or use:
|
||||
#
|
||||
# ``Backtrace_LIBRARY``
|
||||
# The external library providing backtrace, if any.
|
||||
# ``Backtrace_INCLUDE_DIR``
|
||||
# The directory holding the backtrace(3) header.
|
||||
#
|
||||
# Typical usage is to generate of header file using configure_file() with the
|
||||
# contents like the following::
|
||||
#
|
||||
# #cmakedefine01 Backtrace_FOUND
|
||||
# #if Backtrace_FOUND
|
||||
# # include <${Backtrace_HEADER}>
|
||||
# #endif
|
||||
#
|
||||
# And then reference that generated header file in actual source.
|
||||
|
||||
include(CMakePushCheckState)
|
||||
include(CheckSymbolExists)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# List of variables to be provided to find_package_handle_standard_args()
|
||||
set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
|
||||
|
||||
if(Backtrace_HEADER)
|
||||
set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}")
|
||||
else(Backtrace_HEADER)
|
||||
set(_Backtrace_HEADER_TRY "execinfo.h")
|
||||
endif(Backtrace_HEADER)
|
||||
|
||||
find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}")
|
||||
set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
||||
|
||||
if (NOT DEFINED Backtrace_LIBRARY)
|
||||
# First, check if we already have backtrace(), e.g., in libc
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_QUIET ${Backtrace_FIND_QUIETLY})
|
||||
check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND)
|
||||
cmake_pop_check_state()
|
||||
endif()
|
||||
|
||||
if(_Backtrace_SYM_FOUND)
|
||||
# Avoid repeating the message() call below each time CMake is run.
|
||||
if(NOT Backtrace_FIND_QUIETLY AND NOT DEFINED Backtrace_LIBRARY)
|
||||
message(STATUS "backtrace facility detected in default set of libraries")
|
||||
endif()
|
||||
set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries")
|
||||
else()
|
||||
# Check for external library, for non-glibc systems
|
||||
if(Backtrace_INCLUDE_DIR)
|
||||
# OpenBSD has libbacktrace renamed to libexecinfo
|
||||
find_library(Backtrace_LIBRARY "execinfo")
|
||||
elseif() # respect user wishes
|
||||
set(_Backtrace_HEADER_TRY "backtrace.h")
|
||||
find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
|
||||
find_library(Backtrace_LIBRARY "backtrace")
|
||||
endif()
|
||||
|
||||
# Prepend list with library path as it's more common practice
|
||||
set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS})
|
||||
endif()
|
||||
|
||||
message(STATUS "Backtrace_LIBRARY: ${Backtrace_LIBRARY}")
|
||||
if(Backtrace_LIBRARY STREQUAL "NOTFOUND")
|
||||
set(Backtrace_LIBRARY "")
|
||||
endif()
|
||||
if(Backtrace_LIBRARY STREQUAL "Backtrace_LIBRARY-NOTFOUND")
|
||||
set(Backtrace_LIBRARY "")
|
||||
endif()
|
||||
|
||||
set(Backtrace_LIBRARIES ${Backtrace_LIBRARY})
|
||||
set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility")
|
||||
|
||||
find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS})
|
||||
mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY)
|
@ -0,0 +1,25 @@
|
||||
# - Try to find Berkeley DB
|
||||
# Once done this will define
|
||||
#
|
||||
# BERKELEY_DB_FOUND - system has Berkeley DB
|
||||
# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory
|
||||
# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB
|
||||
# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB
|
||||
|
||||
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
find_path(BERKELEY_DB_INCLUDE_DIR db_cxx.h
|
||||
/usr/include/db4
|
||||
/usr/local/include/db4
|
||||
)
|
||||
|
||||
find_library(BERKELEY_DB_LIBRARIES NAMES db_cxx )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES)
|
||||
# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES )
|
||||
|
@ -1,67 +0,0 @@
|
||||
# Copyright (c) 2014-2020, The Monero Project
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# - Try to find readline include dirs and libraries
|
||||
#
|
||||
# Automatically finds ccache build accelerator, if it's found in PATH.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# project(monero)
|
||||
# include(FindCcache) # Include AFTER the project() macro to be able to reach the CMAKE_CXX_COMPILER variable
|
||||
#
|
||||
# Properties modified by this module:
|
||||
#
|
||||
# GLOBAL PROPERTY RULE_LAUNCH_COMPILE set to ccache, when ccache found
|
||||
# GLOBAL PROPERTY RULE_LAUNCH_LINK set to ccache, when ccache found
|
||||
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if (CCACHE_FOUND)
|
||||
# Try to compile a test program with ccache, in order to verify if it really works. (needed on exotic setups)
|
||||
set(TEST_PROJECT "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp")
|
||||
file(WRITE "${TEST_PROJECT}/CMakeLists.txt" [=[
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(test)
|
||||
option (CCACHE "")
|
||||
file(WRITE "${CMAKE_SOURCE_DIR}/test.cpp" "int main() { return 0; }")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE}")
|
||||
add_executable(main test.cpp)
|
||||
]=])
|
||||
try_compile(RET "${TEST_PROJECT}/build" "${TEST_PROJECT}" "test" CMAKE_FLAGS -DCCACHE="${CCACHE_FOUND}")
|
||||
unset(TEST_PROJECT)
|
||||
if (${RET})
|
||||
# Success
|
||||
message(STATUS "Found usable ccache: ${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_FOUND}")
|
||||
else()
|
||||
message(STATUS "Found ccache ${CCACHE_FOUND}, but is UNUSABLE! Return code: ${RET}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "ccache NOT found! Please install it for faster rebuilds.")
|
||||
endif()
|
@ -1,155 +0,0 @@
|
||||
# - Find libusb for portable USB support
|
||||
# This module will find libusb as published by
|
||||
# http://libusb.sf.net and
|
||||
# http://libusb-win32.sf.net
|
||||
#
|
||||
# It will use PkgConfig if present and supported, else search
|
||||
# it on its own. If the LibUSB_ROOT_DIR environment variable
|
||||
# is defined, it will be used as base path.
|
||||
# The following standard variables get defined:
|
||||
# LibUSB_FOUND: true if LibUSB was found
|
||||
# LibUSB_HEADER_FILE: the location of the C header file
|
||||
# LibUSB_INCLUDE_DIRS: the directory that contains the include file
|
||||
# LibUSB_LIBRARIES: the library
|
||||
# source: https://github.com/IntelRealSense/librealsense
|
||||
|
||||
include ( CheckLibraryExists )
|
||||
include ( CheckIncludeFile )
|
||||
|
||||
find_package ( PkgConfig )
|
||||
if ( PKG_CONFIG_FOUND )
|
||||
pkg_check_modules ( PKGCONFIG_LIBUSB libusb-1.0 )
|
||||
if ( NOT PKGCONFIG_LIBUSB_FOUND )
|
||||
pkg_check_modules ( PKGCONFIG_LIBUSB libusb )
|
||||
endif ( NOT PKGCONFIG_LIBUSB_FOUND )
|
||||
endif ( PKG_CONFIG_FOUND )
|
||||
|
||||
if ( PKGCONFIG_LIBUSB_FOUND )
|
||||
set ( LibUSB_INCLUDE_DIRS ${PKGCONFIG_LIBUSB_INCLUDE_DIRS} )
|
||||
foreach ( i ${PKGCONFIG_LIBUSB_LIBRARIES} )
|
||||
string ( REGEX MATCH "[^-]*" ibase "${i}" )
|
||||
find_library ( ${ibase}_LIBRARY
|
||||
NAMES ${i}
|
||||
PATHS ${PKGCONFIG_LIBUSB_LIBRARY_DIRS}
|
||||
)
|
||||
if ( ${ibase}_LIBRARY )
|
||||
list ( APPEND LibUSB_LIBRARIES ${${ibase}_LIBRARY} )
|
||||
endif ( ${ibase}_LIBRARY )
|
||||
mark_as_advanced ( ${ibase}_LIBRARY )
|
||||
endforeach ( i )
|
||||
|
||||
else ( PKGCONFIG_LIBUSB_FOUND )
|
||||
find_file ( LibUSB_HEADER_FILE
|
||||
NAMES
|
||||
libusb.h usb.h
|
||||
PATHS
|
||||
$ENV{ProgramFiles}/LibUSB-Win32
|
||||
$ENV{LibUSB_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
libusb-1.0
|
||||
include/libusb-1.0
|
||||
)
|
||||
mark_as_advanced ( LibUSB_HEADER_FILE )
|
||||
get_filename_component ( LibUSB_INCLUDE_DIRS "${LibUSB_HEADER_FILE}" PATH )
|
||||
|
||||
if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
|
||||
# LibUSB-Win32 binary distribution contains several libs.
|
||||
# Use the lib that got compiled with the same compiler.
|
||||
if ( MSVC )
|
||||
if ( WIN32 )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/msvc )
|
||||
else ( WIN32 )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/msvc_x64 )
|
||||
endif ( WIN32 )
|
||||
elseif ( BORLAND )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/bcc )
|
||||
elseif ( CMAKE_COMPILER_IS_GNUCC )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/gcc )
|
||||
endif ( MSVC )
|
||||
endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
|
||||
|
||||
find_library ( usb_LIBRARY
|
||||
NAMES
|
||||
usb-1.0 libusb usb
|
||||
PATHS
|
||||
$ENV{ProgramFiles}/LibUSB-Win32
|
||||
$ENV{LibUSB_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
${LibUSB_LIBRARY_PATH_SUFFIX}
|
||||
)
|
||||
mark_as_advanced ( usb_LIBRARY )
|
||||
if ( usb_LIBRARY )
|
||||
set ( LibUSB_LIBRARIES ${usb_LIBRARY} )
|
||||
endif ( usb_LIBRARY )
|
||||
|
||||
endif ( PKGCONFIG_LIBUSB_FOUND )
|
||||
|
||||
if ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
|
||||
set ( LibUSB_FOUND true )
|
||||
endif ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
|
||||
|
||||
if ( LibUSB_FOUND )
|
||||
set ( CMAKE_REQUIRED_INCLUDES "${LibUSB_INCLUDE_DIRS}" )
|
||||
check_include_file ( "${LibUSB_HEADER_FILE}" LibUSB_FOUND )
|
||||
endif ( LibUSB_FOUND )
|
||||
|
||||
if ( LibUSB_FOUND )
|
||||
check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
|
||||
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
|
||||
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
|
||||
|
||||
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
||||
find_library(LIBUDEV_LIBRARY udev)
|
||||
if(LIBUDEV_LIBRARY)
|
||||
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")
|
||||
else()
|
||||
message(WARNING "libudev library not found, binaries may fail to link.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Library 1.0.16+ compilation test.
|
||||
# The check_library_exists does not work well on Apple with shared libs.
|
||||
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
|
||||
if (APPLE)
|
||||
if(DEPENDS)
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
|
||||
else()
|
||||
find_library(COREFOUNDATION CoreFoundation)
|
||||
find_library(IOKIT IOKit)
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
|
||||
|
||||
if(STATIC)
|
||||
find_library(OBJC objc.a)
|
||||
set(LIBUSB_DEP_LINKER ${OBJC})
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LIBUSB_DEP_LINKER})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (WIN32)
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
|
||||
endif()
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
|
||||
|
||||
try_compile(LibUSB_COMPILE_TEST_PASSED
|
||||
${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_CURRENT_LIST_DIR}/test-libusb-version.c"
|
||||
CMAKE_FLAGS
|
||||
"-DINCLUDE_DIRECTORIES=${LibUSB_INCLUDE_DIRS}"
|
||||
"-DLINK_DIRECTORIES=${LibUSB_LIBRARIES}"
|
||||
LINK_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES}
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
unset(TEST_COMPILE_EXTRA_LIBRARIES)
|
||||
message(STATUS "LibUSB Compilation test: ${LibUSB_COMPILE_TEST_PASSED}")
|
||||
endif()
|
||||
endif ( LibUSB_FOUND )
|
||||
|
||||
if ( NOT LibUSB_FOUND )
|
||||
if ( NOT LibUSB_FIND_QUIETLY )
|
||||
message ( STATUS "LibUSB not found, try setting LibUSB_ROOT_DIR environment variable." )
|
||||
endif ( NOT LibUSB_FIND_QUIETLY )
|
||||
if ( LibUSB_FIND_REQUIRED )
|
||||
message ( FATAL_ERROR "" )
|
||||
endif ( LibUSB_FIND_REQUIRED )
|
||||
endif ( NOT LibUSB_FOUND )
|
@ -1,52 +0,0 @@
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#define UNUSED(expr) (void)(expr)
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
libusb_device **devs;
|
||||
libusb_context *ctx = NULL;
|
||||
|
||||
int r = libusb_init(&ctx); UNUSED(r);
|
||||
ssize_t cnt = libusb_get_device_list(ctx, &devs); UNUSED(cnt);
|
||||
|
||||
struct libusb_device_descriptor desc;
|
||||
r = libusb_get_device_descriptor(devs[0], &desc); UNUSED(r);
|
||||
uint8_t bus_id = libusb_get_bus_number(devs[0]); UNUSED(bus_id);
|
||||
uint8_t addr = libusb_get_device_address(devs[0]); UNUSED(addr);
|
||||
|
||||
uint8_t tmp_path[16];
|
||||
r = libusb_get_port_numbers(devs[0], tmp_path, sizeof(tmp_path));
|
||||
UNUSED(r);
|
||||
UNUSED(tmp_path);
|
||||
|
||||
libusb_free_device_list(devs, 1);
|
||||
libusb_exit(ctx);
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
#include "test-protobuf.pb.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
google::protobuf::UnknownFieldSet ufs;
|
||||
ufs.ClearAndFreeMemory();
|
||||
|
||||
Success sc;
|
||||
sc.set_message("test");
|
||||
sc.SerializeToOstream(&std::cerr);
|
||||
return 0;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
syntax = "proto2";
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
message Success {
|
||||
optional string message = 1;
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Brewfile for Monero
|
||||
# A homebrew Brewfile installs all required dependencies in one shot
|
||||
# see https://coderwall.com/p/afmnbq/homebrew-s-new-feature-brewfiles
|
||||
# https://github.com/Homebrew/homebrew-bundle
|
||||
# execute brew bundle in the directory containing the Brewfile
|
||||
|
||||
tap "homebrew/bundle"
|
||||
tap "homebrew/cask"
|
||||
tap "homebrew/cask-versions"
|
||||
tap "homebrew/core"
|
||||
|
||||
brew "autoconf"
|
||||
brew "autogen"
|
||||
brew "automake"
|
||||
brew "binutils"
|
||||
brew "coreutils"
|
||||
brew "cmake"
|
||||
brew "pkg-config"
|
||||
brew "boost"
|
||||
brew "openssl"
|
||||
brew "hidapi"
|
||||
brew "zmq"
|
||||
brew "libpgm"
|
||||
brew "unbound"
|
||||
brew "libsodium"
|
||||
brew "miniupnpc"
|
||||
brew "readline"
|
||||
brew "ldns"
|
||||
brew "expat"
|
||||
brew "doxygen"
|
||||
brew "graphviz"
|
||||
brew "libunwind-headers"
|
||||
brew "xz"
|
||||
brew "protobuf"
|
@ -0,0 +1,18 @@
|
||||
version: '1.0'
|
||||
steps:
|
||||
init_submodules:
|
||||
title: Init Submodules
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
image: codefreshio/git-image:latest
|
||||
working_directory: ${{main_clone}}
|
||||
|
||||
BuildingDockerImage:
|
||||
title: Building Docker Image
|
||||
type: build
|
||||
image_name: monero
|
||||
working_directory: ./
|
||||
tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
|
||||
dockerfile: Dockerfile
|
||||
build_arguments:
|
||||
- NPROC=1
|
@ -1,22 +0,0 @@
|
||||
ANDROID_API=21
|
||||
|
||||
ifeq ($(host_arch),arm)
|
||||
host_toolchain=arm-linux-androideabi-
|
||||
endif
|
||||
|
||||
android_CC=$(host_toolchain)clang
|
||||
android_CXX=$(host_toolchain)clang++
|
||||
android_RANLIB=:
|
||||
|
||||
android_CFLAGS=-pipe
|
||||
android_CXXFLAGS=$(android_CFLAGS)
|
||||
android_ARFLAGS=crsD
|
||||
|
||||
android_release_CFLAGS=-O2
|
||||
android_release_CXXFLAGS=$(android_release_CFLAGS)
|
||||
|
||||
android_debug_CFLAGS=-g -O0
|
||||
android_debug_CXXFLAGS=$(android_debug_CFLAGS)
|
||||
|
||||
android_native_toolchain=android_ndk
|
||||
|
@ -1,18 +0,0 @@
|
||||
freebsd_CC=clang-8
|
||||
freebsd_CXX=clang++-8
|
||||
freebsd_AR=ar
|
||||
freebsd_RANLIB=ranlib
|
||||
freebsd_NM=nm
|
||||
|
||||
freebsd_CFLAGS=-pipe
|
||||
freebsd_CXXFLAGS=$(freebsd_CFLAGS)
|
||||
freebsd_ARFLAGS=cr
|
||||
|
||||
freebsd_release_CFLAGS=-O2
|
||||
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
|
||||
|
||||
freebsd_debug_CFLAGS=-g -O0
|
||||
freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
|
||||
|
||||
freebsd_native_toolchain=freebsd_base
|
||||
|
@ -1,22 +0,0 @@
|
||||
package=android_ndk
|
||||
$(package)_version=17b
|
||||
$(package)_download_path=https://dl.google.com/android/repository/
|
||||
$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
|
||||
$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts_arm=--arch arm
|
||||
$(package)_config_opts_aarch64=--arch arm64
|
||||
endef
|
||||
|
||||
define $(package)_extract_cmds
|
||||
echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
|
||||
unzip -q $($(1)_source_dir)/$($(package)_file_name)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
|
||||
--install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
|
||||
mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
|
||||
endef
|
||||
|
@ -0,0 +1,31 @@
|
||||
package=bdb
|
||||
$(package)_version=4.8.30
|
||||
$(package)_download_path=http://download.oracle.com/berkeley-db
|
||||
$(package)_file_name=db-$($(package)_version).NC.tar.gz
|
||||
$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
|
||||
$(package)_build_subdir=build_unix
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
|
||||
$(package)_config_opts_mingw32=--enable-mingw
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
$(package)_cxxflags=-std=c++11
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \
|
||||
sed -i.old 's/atomic_init/atomic_init_db/' dbinc/atomic.h mp/mp_region.c mp/mp_mvcc.c mp/mp_fget.c mutex/mut_method.c mutex/mut_tas.c && \
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
../dist/$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) libdb_cxx-4.8.a libdb-4.8.a
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include
|
||||
endef
|
@ -0,0 +1,67 @@
|
||||
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
# https://cmake.org/cmake/help/latest
|
||||
|
||||
# Can't set `cmake_minimum_required` or `cmake_policy` in toolchain
|
||||
# since toolchain is read before CMakeLists.txt
|
||||
# See `target-cmake.in` for CMAKE_POLICY_DEFAULT_CMPNNNN
|
||||
|
||||
# Check if we are using mxe supplied version
|
||||
# - toolchain is included multiple times so set a guard in
|
||||
# environment to suppress duplicate messages
|
||||
if(NOT ${CMAKE_COMMAND} STREQUAL @PREFIX@/@BUILD@/bin/cmake AND NOT DEFINED ENV{_MXE_CMAKE_TOOLCHAIN_INCLUDED})
|
||||
message(WARNING "
|
||||
** Warning: direct use of toolchain file is deprecated
|
||||
** Please use prefixed wrapper script instead:
|
||||
@TARGET@-cmake [options] <path-to-source>
|
||||
- uses mxe supplied cmake version @CMAKE_VERSION@
|
||||
- loads toolchain
|
||||
- loads common run results
|
||||
- sets various policy defaults
|
||||
")
|
||||
set(ENV{_MXE_CMAKE_TOOLCHAIN_INCLUDED} TRUE)
|
||||
endif()
|
||||
|
||||
## General configuration
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(MSYS 1)
|
||||
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON)
|
||||
# Workaround for https://www.cmake.org/Bug/view.php?id=14075
|
||||
set(CMAKE_CROSS_COMPILING ON)
|
||||
|
||||
|
||||
## Library config
|
||||
set(BUILD_SHARED_LIBS @CMAKE_SHARED_BOOL@ CACHE BOOL "BUILD_SHARED_LIBS" FORCE)
|
||||
set(BUILD_STATIC_LIBS @CMAKE_STATIC_BOOL@ CACHE BOOL "BUILD_STATIC_LIBS" FORCE)
|
||||
set(BUILD_SHARED @CMAKE_SHARED_BOOL@ CACHE BOOL "BUILD_SHARED" FORCE)
|
||||
set(BUILD_STATIC @CMAKE_STATIC_BOOL@ CACHE BOOL "BUILD_STATIC" FORCE)
|
||||
set(LIBTYPE @LIBTYPE@)
|
||||
|
||||
|
||||
## Paths etc.
|
||||
set(CMAKE_FIND_ROOT_PATH @PREFIX@/@TARGET@)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_PREFIX_PATH @PREFIX@/@TARGET@)
|
||||
set(CMAKE_INSTALL_PREFIX @PREFIX@/@TARGET@ CACHE PATH "Installation Prefix")
|
||||
# For custom mxe FindPackage scripts
|
||||
set(CMAKE_MODULE_PATH "@PREFIX@/share/cmake/modules" ${CMAKE_MODULE_PATH})
|
||||
|
||||
|
||||
## Programs
|
||||
set(CMAKE_C_COMPILER @PREFIX@/bin/@TARGET@-gcc)
|
||||
set(CMAKE_CXX_COMPILER @PREFIX@/bin/@TARGET@-g++)
|
||||
set(CMAKE_Fortran_COMPILER @PREFIX@/bin/@TARGET@-gfortran)
|
||||
set(CMAKE_RC_COMPILER @PREFIX@/bin/@TARGET@-windres)
|
||||
# CMAKE_RC_COMPILE_OBJECT is defined in:
|
||||
# <cmake root>/share/cmake-X.Y/Modules/Platform/Windows-windres.cmake
|
||||
set(CPACK_NSIS_EXECUTABLE @TARGET@-makensis)
|
||||
|
||||
## Individual package configuration
|
||||
file(GLOB mxe_cmake_files
|
||||
"@CMAKE_TOOLCHAIN_DIR@/*.cmake"
|
||||
)
|
||||
foreach(mxe_cmake_file ${mxe_cmake_files})
|
||||
include(${mxe_cmake_file})
|
||||
endforeach()
|
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "== Using MXE wrapper: @PREFIX@/bin/@TARGET@-cmake"
|
||||
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html
|
||||
# https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.html
|
||||
POLICIES=(0017,0020)
|
||||
|
||||
unset NO_MXE_TOOLCHAIN
|
||||
if echo -- "$@" | grep -Ewq "(--build|-E|--system-information)" ; then
|
||||
NO_MXE_TOOLCHAIN=1
|
||||
fi
|
||||
if [[ "$NO_MXE_TOOLCHAIN" == "1" ]]; then
|
||||
echo "== Skip using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@"
|
||||
# see https://github.com/mxe/mxe/issues/932
|
||||
exec "@PREFIX@/@BUILD@/bin/cmake" "$@"
|
||||
else
|
||||
echo " - cmake version @CMAKE_VERSION@"
|
||||
echo " - warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored"
|
||||
echo "== Using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@"
|
||||
echo "== Using MXE runresult: @CMAKE_RUNRESULT_FILE@"
|
||||
if ! ( echo "$@" | grep --silent "DCMAKE_BUILD_TYPE" ) ; then
|
||||
echo '== Adding "-DCMAKE_BUILD_TYPE=Release"'
|
||||
set -- "-DCMAKE_BUILD_TYPE=Release" "$@"
|
||||
fi
|
||||
exec "@PREFIX@/@BUILD@/bin/cmake" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="@CMAKE_TOOLCHAIN_FILE@" \
|
||||
`eval echo -DCMAKE_POLICY_DEFAULT_CMP{$POLICIES}=NEW` \
|
||||
-C"@CMAKE_RUNRESULT_FILE@" "$@"
|
||||
fi
|
@ -0,0 +1,18 @@
|
||||
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
# 2.8.9 is Debian Wheezy version
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
# use default C and CXX languages
|
||||
project(mxe)
|
||||
|
||||
# see cmake --help-policy <cmp> for details
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
if (POLICY CMP0020)
|
||||
cmake_policy(SET CMP0020 NEW)
|
||||
endif()
|
||||
|
||||
# so we can find pkg-test.cmake files to include
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../.. ${CMAKE_MODULE_PATH})
|
||||
|
||||
include(${PKG}-test)
|
@ -0,0 +1,15 @@
|
||||
package=cppzmq
|
||||
$(package)_version=4.2.3
|
||||
$(package)_download_path=https://github.com/zeromq/cppzmq/archive/
|
||||
$(package)_file_name=v$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=3e6b57bf49115f4ae893b1ff7848ead7267013087dc7be1ab27636a97144d373
|
||||
$(package)_dependencies=zeromq
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir $($(package)_staging_prefix_dir)/include &&\
|
||||
cp zmq.hpp $($(package)_staging_prefix_dir)/include
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf bin share
|
||||
endef
|
@ -1,23 +0,0 @@
|
||||
package=freebsd_base
|
||||
$(package)_version=11.3
|
||||
$(package)_download_path=https://download.freebsd.org/ftp/releases/amd64/$($(package)_version)-RELEASE/
|
||||
$(package)_download_file=base.txz
|
||||
$(package)_file_name=freebsd-base-$($(package)_version).txz
|
||||
$(package)_sha256_hash=4599023ac136325b86f2fddeec64c1624daa83657e40b00b2ef944c81463a4ff
|
||||
|
||||
define $(package)_extract_cmds
|
||||
echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
|
||||
tar xf $($(1)_source_dir)/$($(package)_file_name) ./lib/ ./usr/lib/ ./usr/include/
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
mkdir bin &&\
|
||||
echo "exec /usr/bin/clang-8 -target x86_64-unknown-freebsd$($(package)_version) --sysroot=$(host_prefix)/native $$$$""@" > bin/clang-8 &&\
|
||||
echo "exec /usr/bin/clang++-8 -target x86_64-unknown-freebsd$($(package)_version) --sysroot=$(host_prefix)/native $$$$""@" > bin/clang++-8 &&\
|
||||
chmod 755 bin/*
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir $($(package)_staging_dir)/$(host_prefix)/native &&\
|
||||
mv bin lib usr $($(package)_staging_dir)/$(host_prefix)/native
|
||||
endef
|
@ -1,39 +0,0 @@
|
||||
package=gtest
|
||||
$(package)_version=1.8.1
|
||||
$(package)_download_path=https://github.com/google/googletest/archive/
|
||||
$(package)_download_file=release-$($(package)_version).tar.gz
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
|
||||
$(package)_cxxflags=-std=c++11
|
||||
$(package)_cxxflags_linux=-fPIC
|
||||
|
||||
define $(package)_config_cmds
|
||||
cd googletest && \
|
||||
CC="$(host_prefix)/native/bin/$($(package)_cc)" \
|
||||
CXX="$(host_prefix)/native/bin/$($(package)_cxx)" \
|
||||
AR="$(host_prefix)/native/bin/$($(package)_ar)" \
|
||||
RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
|
||||
LIBTOOL="$(host_prefix)/native/bin/$($(package)_libtool)" \
|
||||
CXXFLAGS="$($(package)_cxxflags)" \
|
||||
CCFLAGS="$($(package)_ccflags)" \
|
||||
CPPFLAGS="$($(package)_cppflags)" \
|
||||
CFLAGS="$($(package)_cflags) $($(package)_cppflags)" \
|
||||
LDLAGS="$($(package)_ldflags)" \
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \
|
||||
-DTOOLCHAIN_PREFIX=$(host_toolchain) \
|
||||
-DCMAKE_AR="$(host_prefix)/native/bin/$($(package)_ar)" \
|
||||
-DCMAKE_RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=ON
|
||||
endef
|
||||
# -DCMAKE_TOOLCHAIN_FILE=$(HOST)/share/toolchain.cmake
|
||||
|
||||
define $(package)_build_cmds
|
||||
cd googletest && CC="$(host_prefix)/native/bin/$($(package)_cc)" $(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir $($(package)_staging_prefix_dir)/lib $($(package)_staging_prefix_dir)/include &&\
|
||||
cp googletest/libgtest.a $($(package)_staging_prefix_dir)/lib/ &&\
|
||||
cp googletest/libgtest_main.a $($(package)_staging_prefix_dir)/lib/ &&\
|
||||
cp -a googletest/include/* $($(package)_staging_prefix_dir)/include/
|
||||
endef
|
@ -0,0 +1,30 @@
|
||||
package=libevent
|
||||
$(package)_version=2.1.8-stable
|
||||
$(package)_download_path=https://github.com/libevent/libevent/archive/
|
||||
$(package)_file_name=release-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
./autogen.sh
|
||||
endef
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
|
||||
$(package)_config_opts_release=--disable-debug-mode
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
endef
|
@ -0,0 +1,28 @@
|
||||
package=miniupnpc
|
||||
$(package)_version=2.0.20170509
|
||||
$(package)_download_path=http://miniupnp.free.fr/files
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_build_opts=CC="$($(package)_cc)"
|
||||
$(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)"
|
||||
$(package)_build_opts_mingw32=-f Makefile.mingw
|
||||
$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
mkdir dll && \
|
||||
sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \
|
||||
sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) libminiupnpc.a $($(package)_build_opts)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\
|
||||
install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\
|
||||
install libminiupnpc.a $($(package)_staging_prefix_dir)/lib
|
||||
endef
|
@ -1,23 +0,0 @@
|
||||
package=native_cmake
|
||||
$(package)_version=3.14.0
|
||||
$(package)_version_dot=v3.14
|
||||
$(package)_download_path=https://cmake.org/files/$($(package)_version_dot)/
|
||||
$(package)_file_name=cmake-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
./bootstrap &&\
|
||||
./configure $($(package)_config_opts)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmd
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
@ -1,27 +0,0 @@
|
||||
package=protobuf3
|
||||
$(package)_version=3.6.1
|
||||
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)/
|
||||
$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=b3732e471a9bb7950f090fd0457ebd2536a9ba0891b7f3785919c654fe2a2529
|
||||
$(package)_cxxflags=-std=c++11
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --prefix=$(build_prefix)
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) -C src
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm lib/libprotoc.a
|
||||
endef
|
@ -1,64 +0,0 @@
|
||||
package=ncurses
|
||||
$(package)_version=6.1
|
||||
$(package)_download_path=https://ftp.gnu.org/gnu/ncurses
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17
|
||||
$(package)_patches=fallback.c
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_build_opts=CC="$($(package)_cc)"
|
||||
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" ARFLAGS=$($(package)_arflags) cf_cv_ar_flags=""
|
||||
$(package)_config_env_darwin=RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin11-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin11-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
|
||||
$(package)_config_opts=--prefix=$(host_prefix)
|
||||
$(package)_config_opts+=--disable-shared
|
||||
$(package)_config_opts+=--with-build-cc=gcc
|
||||
$(package)_config_opts+=--without-debug
|
||||
$(package)_config_opts+=--without-ada
|
||||
$(package)_config_opts+=--without-cxx-binding
|
||||
$(package)_config_opts+=--without-cxx
|
||||
$(package)_config_opts+=--without-ticlib
|
||||
$(package)_config_opts+=--without-tic
|
||||
$(package)_config_opts+=--without-progs
|
||||
$(package)_config_opts+=--without-tests
|
||||
$(package)_config_opts+=--without-tack
|
||||
$(package)_config_opts+=--without-manpages
|
||||
$(package)_config_opts+=--with-termlib=tinfo
|
||||
$(package)_config_opts+=--disable-tic-depends
|
||||
$(package)_config_opts+=--disable-big-strings
|
||||
$(package)_config_opts+=--disable-ext-colors
|
||||
$(package)_config_opts+=--enable-pc-files
|
||||
$(package)_config_opts+=--host=$(HOST)
|
||||
$(pacakge)_config_opts+=--without-shared
|
||||
$(pacakge)_config_opts+=--without-pthread
|
||||
$(pacakge)_config_opts+=--disable-rpath
|
||||
$(pacakge)_config_opts+=--disable-colorfgbg
|
||||
$(pacakge)_config_opts+=--disable-ext-mouse
|
||||
$(pacakge)_config_opts+=--disable-symlinks
|
||||
$(pacakge)_config_opts+=--enable-warnings
|
||||
$(pacakge)_config_opts+=--enable-assertions
|
||||
$(package)_config_opts+=--with-default-terminfo-dir=/etc/_terminfo_
|
||||
$(package)_config_opts+=--with-terminfo-dirs=/etc/_terminfo_
|
||||
$(pacakge)_config_opts+=--enable-database
|
||||
$(pacakge)_config_opts+=--enable-sp-funcs
|
||||
$(pacakge)_config_opts+=--disable-term-driver
|
||||
$(pacakge)_config_opts+=--enable-interop
|
||||
$(pacakge)_config_opts+=--enable-widec
|
||||
$(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
cp $($(package)_patch_dir)/fallback.c ncurses
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
./configure $($(package)_config_opts)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) $($(package)_build_opts) V=1
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) install.libs DESTDIR=$($(package)_staging_dir)
|
||||
endef
|
||||
|
@ -1,36 +1,24 @@
|
||||
packages:=boost openssl zeromq libiconv
|
||||
|
||||
packages:=boost openssl libevent zeromq cppzmq zlib expat ldns cppzmq readline libiconv qt hidapi
|
||||
native_packages := native_ccache
|
||||
|
||||
hardware_packages := hidapi protobuf libusb
|
||||
hardware_native_packages := native_protobuf
|
||||
|
||||
android_native_packages = android_ndk
|
||||
android_packages = ncurses readline sodium
|
||||
|
||||
darwin_native_packages = native_biplist native_ds_store native_mac_alias $(hardware_native_packages)
|
||||
darwin_packages = sodium ncurses readline $(hardware_packages)
|
||||
wallet_packages=bdb
|
||||
|
||||
# not really native...
|
||||
freebsd_native_packages = freebsd_base
|
||||
freebsd_packages = ncurses readline sodium
|
||||
darwin_native_packages = native_biplist native_ds_store native_mac_alias
|
||||
darwin_packages = sodium-darwin
|
||||
|
||||
linux_packages = eudev ncurses readline sodium $(hardware_packages)
|
||||
linux_native_packages = $(hardware_native_packages)
|
||||
qt_packages = qt
|
||||
linux_packages = eudev libusb
|
||||
|
||||
ifeq ($(build_tests),ON)
|
||||
packages += gtest
|
||||
ifeq ($(host_os),linux)
|
||||
packages += unwind
|
||||
packages += sodium
|
||||
endif
|
||||
|
||||
ifneq ($(host_arch),riscv64)
|
||||
linux_packages += unwind
|
||||
ifeq ($(host_os),mingw32)
|
||||
packages += icu4c
|
||||
packages += sodium
|
||||
endif
|
||||
|
||||
mingw32_packages = icu4c sodium $(hardware_packages)
|
||||
mingw32_native_packages = $(hardware_native_packages)
|
||||
|
||||
ifneq ($(build_os),darwin)
|
||||
darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
|
||||
packages += readline
|
||||
endif
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
package=sodium-darwin
|
||||
$(package)_version=1.0.15
|
||||
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
|
||||
$(package)_file_name=libsodium-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=fb6a9e879a2f674592e4328c5d9f79f082405ee4bb05cb6e679b90afe9e178f4
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)"
|
||||
$(package)_config_opts=--enable-static --disable-shared
|
||||
$(package)_config_opts+=--prefix=$(host_prefix)
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
./autogen.sh &&\
|
||||
$($(package)_autoconf) $($(package)_config_opts) RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin11-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin11-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
echo "path is problematic here" &&\
|
||||
make
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
@ -0,0 +1,27 @@
|
||||
package=zlib
|
||||
$(package)_version=1.2.11
|
||||
$(package)_download_path=http://www.zlib.net
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_build_opts= CC="$($(package)_cc)"
|
||||
$(package)_build_opts+=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
|
||||
$(package)_build_opts+=RANLIB="$($(package)_ranlib)"
|
||||
$(package)_build_opts+=AR="$($(package)_ar)"
|
||||
$(package)_build_opts_darwin+=AR="$($(package)_libtool)"
|
||||
$(package)_build_opts_darwin+=ARFLAGS="-o"
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
./configure --static --prefix=$(host_prefix)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) $($(package)_build_opts) libz.a
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install $($(package)_build_opts)
|
||||
endef
|
||||
|
@ -1,28 +0,0 @@
|
||||
--- boost_1_64_0/tools/build/src/tools/gcc.jam.O 2017-04-17 03:22:26.000000000 +0100
|
||||
+++ boost_1_64_0/tools/build/src/tools/gcc.jam 2019-11-15 15:46:16.957937137 +0000
|
||||
@@ -243,6 +243,8 @@
|
||||
{
|
||||
ECHO notice: using gcc archiver :: $(condition) :: $(archiver[1]) ;
|
||||
}
|
||||
+ local arflags = [ feature.get-values <arflags> : $(options) ] ;
|
||||
+ toolset.flags gcc.archive .ARFLAGS $(condition) : $(arflags) ;
|
||||
|
||||
# - Ranlib.
|
||||
local ranlib = [ common.get-invocation-command gcc
|
||||
@@ -970,6 +972,7 @@
|
||||
# logic in intel-linux, but that is hardly worth the trouble as on Linux, 'ar'
|
||||
# is always available.
|
||||
.AR = ar ;
|
||||
+.ARFLAGS = rc ;
|
||||
.RANLIB = ranlib ;
|
||||
|
||||
toolset.flags gcc.archive AROPTIONS <archiveflags> ;
|
||||
@@ -1011,7 +1014,7 @@
|
||||
#
|
||||
actions piecemeal archive
|
||||
{
|
||||
- "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
|
||||
+ "$(.AR)" $(AROPTIONS) $(.ARFLAGS) "$(<)" "$(>)"
|
||||
"$(.RANLIB)" "$(<)"
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/preload/configure b/preload/configure
|
||||
index aab5c77..e20b8f0 100755
|
||||
--- a/preload/configure
|
||||
+++ b/preload/configure
|
||||
@@ -588,7 +588,7 @@ MAKEFLAGS=
|
||||
PACKAGE_NAME='libiconv'
|
||||
PACKAGE_TARNAME='libiconv'
|
||||
PACKAGE_VERSION='0'
|
||||
-PACKAGE_STRING='libiconv 0'
|
||||
+PACKAGE_STRING='libiconv0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- cctools/Makefile.am.O 2016-06-09 15:06:16.000000000 +0100
|
||||
+++ cctools/Makefile.am 2019-11-18 08:59:20.078663220 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
if ISDARWIN
|
||||
-SUBDIRS=libstuff ar as misc otool ld64 $(LD_CLASSIC)
|
||||
+SUBDIRS=libstuff ar as misc ld64 $(LD_CLASSIC)
|
||||
else
|
||||
-SUBDIRS=libstuff ar as misc libobjc2 otool ld64 $(LD_CLASSIC)
|
||||
+SUBDIRS=libstuff ar as misc ld64 $(LD_CLASSIC)
|
||||
endif
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
||||
--- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
|
||||
+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
|
||||
@@ -52,6 +52,7 @@
|
||||
//
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
+#include <qpa/qplatformprintdevice.h>
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
||||
--- x/qtbase/src/plugins/plugins.pro
|
||||
+++ y/qtbase/src/plugins/plugins.pro
|
||||
@@ -9,6 +9,3 @@ qtHaveModule(gui) {
|
||||
!android:qtConfig(library): SUBDIRS *= generic
|
||||
}
|
||||
qtHaveModule(widgets): SUBDIRS += styles
|
||||
-
|
||||
-!winrt:qtHaveModule(printsupport): \
|
||||
- SUBDIRS += printsupport
|
@ -1,11 +1,11 @@
|
||||
--- old/qtbase/mkspecs/features/qt_module.prf
|
||||
+++ new/qtbase/mkspecs/features/qt_module.prf
|
||||
@@ -269,7 +269,7 @@ load(qt_installs)
|
||||
@@ -245,7 +245,7 @@
|
||||
load(qt_targets)
|
||||
|
||||
# this builds on top of qt_common
|
||||
-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
|
||||
+if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
|
||||
-!internal_module:!lib_bundle:if(unix|mingw) {
|
||||
+unix|mingw {
|
||||
CONFIG += create_pc
|
||||
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||
host_build: \
|
||||
|
@ -1,15 +0,0 @@
|
||||
--- old/qtbase/src/tools/rcc/rcc.cpp
|
||||
+++ new/qtbase/src/tools/rcc/rcc.cpp
|
||||
@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
|
||||
if (lib.formatVersion() >= 2) {
|
||||
// last modified time stamp
|
||||
const QDateTime lastModified = m_fileInfo.lastModified();
|
||||
- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0));
|
||||
+ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
|
||||
+ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
|
||||
+ if (sourceDate != 0)
|
||||
+ lastmod = sourceDate;
|
||||
+ lib.writeNumber8(lastmod);
|
||||
if (text || pass1)
|
||||
lib.writeChar('\n');
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001
|
||||
From: Carl Dong <contact@carldong.me>
|
||||
Date: Thu, 18 Jul 2019 17:22:05 -0400
|
||||
Subject: [PATCH] Wrap xlib related code blocks in #if's
|
||||
|
||||
They are not necessary to compile QT.
|
||||
---
|
||||
qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
|
||||
index 7c62c2e2b3..c05c6c0a07 100644
|
||||
--- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
|
||||
+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
|
||||
@@ -49,7 +49,9 @@
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtGui/QBitmap>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
#include <X11/cursorfont.h>
|
||||
+#endif
|
||||
#include <xcb/xfixes.h>
|
||||
#include <xcb/xcb_image.h>
|
||||
|
||||
@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window)
|
||||
xcb_flush(xcb_connection());
|
||||
}
|
||||
|
||||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
static int cursorIdForShape(int cshape)
|
||||
{
|
||||
int cursorId = 0;
|
||||
@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape)
|
||||
}
|
||||
return cursorId;
|
||||
}
|
||||
+#endif
|
||||
|
||||
xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
|
||||
{
|
||||
@@ -556,7 +560,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
|
||||
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
||||
{
|
||||
xcb_connection_t *conn = xcb_connection();
|
||||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
int cursorId = cursorIdForShape(cshape);
|
||||
+#endif
|
||||
xcb_cursor_t cursor = XCB_NONE;
|
||||
|
||||
// Try Xcursor first
|
||||
@@ -586,6 +592,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
||||
// Non-standard X11 cursors are created from bitmaps
|
||||
cursor = createNonStandardCursor(cshape);
|
||||
|
||||
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
// Create a glpyh cursor if everything else failed
|
||||
if (!cursor && cursorId) {
|
||||
cursor = xcb_generate_id(conn);
|
||||
@@ -593,6 +600,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
||||
cursorId, cursorId + 1,
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
|
||||
const char *name = cursorNames[cshape].front();
|
||||
---
|
||||
2.22.0
|
||||
|
@ -0,0 +1,37 @@
|
||||
diff -dur old/qtbase/src/plugins/platforms/windows/qwindowscontext.h new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
|
||||
--- old/qtbase/src/plugins/platforms/windows/qwindowscontext.h
|
||||
+++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
|
||||
@@ -136,10 +136,18 @@
|
||||
inline void init();
|
||||
|
||||
typedef HRESULT (WINAPI *SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
|
||||
+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
|
||||
+ typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, ITEMIDLIST **);
|
||||
+#else
|
||||
typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, PIDLIST_ABSOLUTE *);
|
||||
+#endif
|
||||
typedef HRESULT (WINAPI *SHGetStockIconInfo)(int , int , _SHSTOCKICONINFO *);
|
||||
typedef HRESULT (WINAPI *SHGetImageList)(int, REFIID , void **);
|
||||
+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
|
||||
+ typedef HRESULT (WINAPI *SHCreateItemFromIDList)(const ITEMIDLIST *, REFIID, void **);
|
||||
+#else
|
||||
typedef HRESULT (WINAPI *SHCreateItemFromIDList)(PCIDLIST_ABSOLUTE, REFIID, void **);
|
||||
+#endif
|
||||
|
||||
SHCreateItemFromParsingName sHCreateItemFromParsingName;
|
||||
SHGetKnownFolderIDList sHGetKnownFolderIDList;
|
||||
diff -dur old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
|
||||
--- old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
|
||||
+++ new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
|
||||
@@ -1016,7 +1016,11 @@
|
||||
qWarning() << __FUNCTION__ << ": Invalid CLSID: " << url.path();
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
|
||||
+ ITEMIDLIST *idList;
|
||||
+#else
|
||||
PIDLIST_ABSOLUTE idList;
|
||||
+#endif
|
||||
HRESULT hr = QWindowsContext::shell32dll.sHGetKnownFolderIDList(uuid, 0, 0, &idList);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning("%s: SHGetKnownFolderIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString()));
|
@ -0,0 +1,34 @@
|
||||
From dbdd5f0ffbce52c8b789ed09f1aa3f1da6c02e23 Mon Sep 17 00:00:00 2001
|
||||
From: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
|
||||
Date: Fri, 30 Mar 2018 11:58:16 -0700
|
||||
Subject: [PATCH] QCoreTextFontEngine: Fix build with Xcode 9.3
|
||||
|
||||
Apple LLVM version 9.1.0 (clang-902.0.39.1)
|
||||
|
||||
Error message:
|
||||
|
||||
.../qfontengine_coretext.mm:827:20: error: qualified reference to
|
||||
'QFixed' is a constructor name rather than a type in this context
|
||||
return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
|
||||
|
||||
Change-Id: Iebe26b3b087a16b10664208fc8851cbddb47f043
|
||||
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
|
||||
---
|
||||
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
index 25ff69d877d..98b753eff96 100644
|
||||
--- old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
+++ new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
@@ -824,7 +824,7 @@ void QCoreTextFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, gl
|
||||
|
||||
QFixed QCoreTextFontEngine::emSquareSize() const
|
||||
{
|
||||
- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
|
||||
+ return QFixed(int(CTFontGetUnitsPerEm(ctfont)));
|
||||
}
|
||||
|
||||
QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const
|
||||
--
|
||||
2.16.3
|
@ -0,0 +1,187 @@
|
||||
From c0572cecbeadc8fe24c70c5c39d49210a39ac719 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Gu <timothygu99@gmail.com>
|
||||
Date: Tue, 30 Sep 2014 10:32:33 -0700
|
||||
Subject: [PATCH 1/2] signals: safeguard the remaining usage of frequently
|
||||
missing signals
|
||||
|
||||
diff --git a/input.c b/input.c
|
||||
index 117dfe8..465f0b9 100644
|
||||
--- a/input.c
|
||||
+++ b/input.c
|
||||
@@ -532,9 +532,17 @@ rl_getc (stream)
|
||||
Otherwise (not EINTR), some error occurred, also signifying EOF. */
|
||||
if (errno != EINTR)
|
||||
return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
|
||||
- else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
|
||||
+ else if (_rl_caught_signal == SIGTERM
|
||||
+#if defined(SIGHUP)
|
||||
+ || _rl_caught_signal == SIGHUP
|
||||
+#endif
|
||||
+ )
|
||||
return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
|
||||
- else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
|
||||
+ else if (_rl_caught_signal == SIGINT
|
||||
+#if defined(SIGQUIT)
|
||||
+ || _rl_caught_signal == SIGQUIT
|
||||
+#endif
|
||||
+ )
|
||||
RL_CHECK_SIGNALS ();
|
||||
|
||||
if (rl_signal_event_hook)
|
||||
diff --git a/signals.c b/signals.c
|
||||
index 61f02f9..7c921d6 100644
|
||||
--- a/signals.c
|
||||
+++ b/signals.c
|
||||
@@ -216,7 +216,9 @@ _rl_handle_signal (sig)
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case SIGTERM:
|
||||
+#if defined (SIGHUP)
|
||||
case SIGHUP:
|
||||
+#endif
|
||||
#if defined (SIGTSTP)
|
||||
case SIGTSTP:
|
||||
case SIGTTOU:
|
||||
@@ -426,7 +428,9 @@ rl_set_signals ()
|
||||
|
||||
rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
|
||||
rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term);
|
||||
+#if defined (SIGHUP)
|
||||
rl_maybe_set_sighandler (SIGHUP, rl_signal_handler, &old_hup);
|
||||
+#endif
|
||||
#if defined (SIGQUIT)
|
||||
rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit);
|
||||
#endif
|
||||
@@ -491,7 +495,9 @@ rl_clear_signals ()
|
||||
overhead */
|
||||
rl_maybe_restore_sighandler (SIGINT, &old_int);
|
||||
rl_maybe_restore_sighandler (SIGTERM, &old_term);
|
||||
+#if defined (SIGHUP)
|
||||
rl_maybe_restore_sighandler (SIGHUP, &old_hup);
|
||||
+#endif
|
||||
#if defined (SIGQUIT)
|
||||
rl_maybe_restore_sighandler (SIGQUIT, &old_quit);
|
||||
#endif
|
||||
--
|
||||
1.8.3.2
|
||||
|
||||
|
||||
From 6896ffa4fc85bf0dfae58e69a860d2076c1d9fd2 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Gu <timothygu99@gmail.com>
|
||||
Date: Tue, 30 Sep 2014 17:16:32 -0700
|
||||
Subject: [PATCH 2/2] Handle missing S_IS* macros more gracefully
|
||||
|
||||
diff --git a/colors.c b/colors.c
|
||||
index 89d9035..ec19844 100644
|
||||
--- a/colors.c
|
||||
+++ b/colors.c
|
||||
@@ -152,14 +152,22 @@ _rl_print_color_indicator (char *f)
|
||||
{
|
||||
colored_filetype = C_FILE;
|
||||
|
||||
+#if defined (S_ISUID)
|
||||
if ((mode & S_ISUID) != 0 && is_colored (C_SETUID))
|
||||
colored_filetype = C_SETUID;
|
||||
- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID))
|
||||
+ else
|
||||
+#endif
|
||||
+#if defined (S_ISGID)
|
||||
+ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID))
|
||||
colored_filetype = C_SETGID;
|
||||
- else if (is_colored (C_CAP) && 0) //f->has_capability)
|
||||
+ else
|
||||
+#endif
|
||||
+ if (is_colored (C_CAP) && 0) //f->has_capability)
|
||||
colored_filetype = C_CAP;
|
||||
+#if defined(S_IXUGO)
|
||||
else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC))
|
||||
colored_filetype = C_EXEC;
|
||||
+#endif
|
||||
else if ((1 < astat.st_nlink) && is_colored (C_MULTIHARDLINK))
|
||||
colored_filetype = C_MULTIHARDLINK;
|
||||
}
|
||||
@@ -173,8 +181,10 @@ _rl_print_color_indicator (char *f)
|
||||
colored_filetype = C_STICKY_OTHER_WRITABLE;
|
||||
else
|
||||
#endif
|
||||
+#if defined (S_IWOTH)
|
||||
if ((mode & S_IWOTH) != 0 && is_colored (C_OTHER_WRITABLE))
|
||||
colored_filetype = C_OTHER_WRITABLE;
|
||||
+#endif
|
||||
#if defined (S_ISVTX)
|
||||
else if ((mode & S_ISVTX) != 0 && is_colored (C_STICKY))
|
||||
colored_filetype = C_STICKY;
|
||||
diff --git a/colors.h b/colors.h
|
||||
index fc926e5..e62edd0 100644
|
||||
--- a/colors.h
|
||||
+++ b/colors.h
|
||||
@@ -96,7 +96,7 @@ enum indicator_no
|
||||
};
|
||||
|
||||
|
||||
-#if !S_IXUGO
|
||||
+#if !S_IXUGO && defined(S_IXUSR) && defined(S_IXGRP) && defined(S_IXOTH)
|
||||
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
|
||||
#endif
|
||||
|
||||
diff --git a/posixstat.h b/posixstat.h
|
||||
index 3eb7f29..854a2c9 100644
|
||||
--- a/posixstat.h
|
||||
+++ b/posixstat.h
|
||||
@@ -78,30 +78,44 @@
|
||||
|
||||
#if defined (S_IFBLK) && !defined (S_ISBLK)
|
||||
#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */
|
||||
+#elif !defined (S_IFBLK)
|
||||
+#define S_ISBLK(m) 0
|
||||
#endif
|
||||
|
||||
#if defined (S_IFCHR) && !defined (S_ISCHR)
|
||||
#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */
|
||||
+#elif !defined (S_IFCHR)
|
||||
+#define S_ISCHR(m) 0
|
||||
#endif
|
||||
|
||||
#if defined (S_IFDIR) && !defined (S_ISDIR)
|
||||
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */
|
||||
+#elif !defined (S_IFDIR)
|
||||
+#define S_ISDIR(m) 0
|
||||
#endif
|
||||
|
||||
#if defined (S_IFREG) && !defined (S_ISREG)
|
||||
#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */
|
||||
+#elif !defined (S_IFREG)
|
||||
+#define S_ISREG(m) 0
|
||||
#endif
|
||||
|
||||
#if defined (S_IFIFO) && !defined (S_ISFIFO)
|
||||
#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */
|
||||
+#elif !defined (S_IFIFO)
|
||||
+#define S_ISFIFO(m) 0
|
||||
#endif
|
||||
|
||||
#if defined (S_IFLNK) && !defined (S_ISLNK)
|
||||
#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */
|
||||
+#elif !defined (S_IFLNK)
|
||||
+#define S_ISLNK(m) 0
|
||||
#endif
|
||||
|
||||
#if defined (S_IFSOCK) && !defined (S_ISSOCK)
|
||||
#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */
|
||||
+#elif !defined (S_IFSOCK)
|
||||
+#define S_ISSOCK(m) 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -137,6 +151,8 @@
|
||||
/* These are non-standard, but are used in builtins.c$symbolic_umask() */
|
||||
#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
|
||||
#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH)
|
||||
+#if defined(S_IXUSR) && defined(S_IXGRP) && defined(S_IXOTH)
|
||||
#define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
|
||||
+#endif
|
||||
|
||||
#endif /* _POSIXSTAT_H_ */
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,25 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9e2de27c..0fa85c2d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -807,6 +807,10 @@ AS_IF([test "x$EMSCRIPTEN" = "x"],[
|
||||
# include <sys/random.h>
|
||||
#endif
|
||||
]], [[
|
||||
+#ifdef __linux__
|
||||
+# error getrandom() is currently disabled on Linux to support glibc < 2.25
|
||||
+#endif
|
||||
+
|
||||
unsigned char buf;
|
||||
(void) getrandom((void *) &buf, 1U, 0U);
|
||||
]])],
|
||||
@@ -825,6 +829,9 @@ unsigned char buf;
|
||||
# include <sys/random.h>
|
||||
#endif
|
||||
]], [[
|
||||
+#ifdef __linux__
|
||||
+# error getentropy() is currently disabled on Linux to support glibc < 2.25
|
||||
+#endif
|
||||
#ifdef __APPLE__
|
||||
# error getentropy() is currently disabled on Apple operating systems
|
||||
#endif
|
@ -1,13 +0,0 @@
|
||||
diff --git a/configure b/configure
|
||||
index b29f769..ca008ae 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -591,7 +591,7 @@ MAKEFLAGS=
|
||||
PACKAGE_NAME='libsodium'
|
||||
PACKAGE_TARNAME='libsodium'
|
||||
PACKAGE_VERSION='1.0.18'
|
||||
-PACKAGE_STRING='libsodium 1.0.18'
|
||||
+PACKAGE_STRING='libsodium'
|
||||
PACKAGE_BUGREPORT='https://github.com/jedisct1/libsodium/issues'
|
||||
PACKAGE_URL='https://github.com/jedisct1/libsodium'
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- config/ltmain.sh.O 2017-01-13 16:00:54.000000000 +0000
|
||||
+++ config/ltmain.sh 2019-11-17 06:46:51.994402494 +0000
|
||||
@@ -7957,6 +7957,8 @@
|
||||
esac
|
||||
done
|
||||
fi
|
||||
+ oldobjs=`for obj in $oldobjs; do echo $obj; done | sort`
|
||||
+ oldobjs=" `echo $oldobjs`"
|
||||
eval cmds=\"$old_archive_cmds\"
|
||||
|
||||
func_len " $cmds"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue