forked from such-gitea/wownero
Compare commits
82 Commits
getOutputD
...
v0.9.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21fa2b944b | ||
|
|
711f8c9d34 | ||
|
|
4228f785c0 | ||
|
|
9e86c1c90d | ||
|
|
c40d8f5672 | ||
|
|
0f998b9b55 | ||
|
|
38f0472a6e | ||
|
|
9774fc7868 | ||
|
|
c14276fb7c | ||
|
|
755c308c23 | ||
|
|
4053e2ae14 | ||
|
|
df5779790c | ||
|
|
aae4bf32aa | ||
|
|
d37785db0c | ||
|
|
2a38ee251a | ||
|
|
e49e6ae142 | ||
|
|
5731efa127 | ||
|
|
26a64f99d3 | ||
|
|
e47fbe1476 | ||
|
|
4cc5e174d9 | ||
|
|
7bdf566225 | ||
|
|
6b80ac2ae7 | ||
|
|
4d15c0aa13 | ||
|
|
8345e5b7bc | ||
|
|
12d81b4af1 | ||
|
|
e2260ab8ab | ||
|
|
e28f22ba2f | ||
|
|
80a21da5ba | ||
|
|
94b5378a3b | ||
|
|
cfc8640492 | ||
|
|
69e41b9d4e | ||
|
|
bcc824cac3 | ||
|
|
46b4016134 | ||
|
|
8b73fabd2a | ||
|
|
b6dee49900 | ||
|
|
1bf5b86967 | ||
|
|
dc0ac9c252 | ||
|
|
2051c5f078 | ||
|
|
51169a6c2d | ||
|
|
b8396218a3 | ||
|
|
17c5e8f949 | ||
|
|
3e8bf154eb | ||
|
|
498436c9b4 | ||
|
|
9a58ac48d2 | ||
|
|
90b7699717 | ||
|
|
1917bd3d53 | ||
|
|
cb654bbc27 | ||
|
|
ec60b05faa | ||
|
|
58e1f2f02a | ||
|
|
af941bed58 | ||
|
|
10c30ea5aa | ||
|
|
83fe535888 | ||
|
|
e52e01a445 | ||
|
|
284ec84502 | ||
|
|
86f12066f2 | ||
|
|
c336e15f0c | ||
|
|
e09d17ba1f | ||
|
|
9364b49ecb | ||
|
|
5cd3a15491 | ||
|
|
b303931b23 | ||
|
|
7b4e1b0859 | ||
|
|
8fb16a3280 | ||
|
|
4e097c26a2 | ||
|
|
2aabc5863e | ||
|
|
2a6d817ea1 | ||
|
|
f6533856df | ||
|
|
32497a641c | ||
|
|
aaa015b3e7 | ||
|
|
9c35901592 | ||
|
|
f9c0871877 | ||
|
|
96d1d08f48 | ||
|
|
2e8fae1b4c | ||
|
|
d99c27e24d | ||
|
|
48eeca2077 | ||
|
|
96ae690083 | ||
|
|
b9974f7bff | ||
|
|
389a02d93f | ||
|
|
a3c9befbb5 | ||
|
|
08a0e737f9 | ||
|
|
1396426d59 | ||
|
|
93cc82423e | ||
|
|
572d7ea5ef |
10
.drone.yml
Normal file
10
.drone.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: linux-build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: linux-build
|
||||||
|
image: wownero/wow-dependencies:v1.0
|
||||||
|
commands:
|
||||||
|
- make -j2 release-static-linux-x86_64
|
||||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -1 +1 @@
|
|||||||
custom: https://www.getmonero.org/get-started/contributing/
|
custom: https://dev-funding.webui.wowkira.com
|
||||||
|
|||||||
166
.github/workflows/build.yml
vendored
166
.github/workflows/build.yml
vendored
@@ -1,184 +1,96 @@
|
|||||||
name: ci/gh-actions/cli
|
name: continuous-integration/gh-actions/cli
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- 'docs/**'
|
|
||||||
- '**/README.md'
|
|
||||||
|
|
||||||
# The below variables reduce repetitions across similar targets
|
|
||||||
env:
|
|
||||||
REMOVE_BUNDLED_BOOST : rm -rf /usr/local/share/boost
|
|
||||||
BUILD_DEFAULT_LINUX: |
|
|
||||||
cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build -j3
|
|
||||||
APT_INSTALL_LINUX: '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 ccache'
|
|
||||||
APT_SET_CONF: |
|
|
||||||
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
|
|
||||||
CCACHE_SETTINGS: |
|
|
||||||
ccache --max-size=150M
|
|
||||||
ccache --set-config=compression=true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
env:
|
|
||||||
CCACHE_TEMPDIR: /tmp/.ccache-temp
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v3
|
- name: update brew and install dependencies
|
||||||
with:
|
run: brew update && brew install boost hidapi zmq libpgm miniupnpc ldns expat libunwind-headers protobuf
|
||||||
path: /Users/runner/Library/Caches/ccache
|
|
||||||
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
|
||||||
restore-keys: ccache-${{ runner.os }}-build-
|
|
||||||
- name: install dependencies
|
|
||||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf ccache
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: make -j3
|
||||||
${{env.CCACHE_SETTINGS}}
|
|
||||||
make -j3
|
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
env:
|
|
||||||
CCACHE_TEMPDIR: C:\Users\runneradmin\.ccache-temp
|
|
||||||
CCACHE_DIR: C:\Users\runneradmin\.ccache
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v3
|
- uses: eine/setup-msys2@v1
|
||||||
with:
|
|
||||||
path: C:\Users\runneradmin\.ccache
|
|
||||||
key: ccache-${{ runner.os }}-build-${{ github.sha }}
|
|
||||||
restore-keys: ccache-${{ runner.os }}-build-
|
|
||||||
- uses: msys2/setup-msys2@v2
|
|
||||||
with:
|
with:
|
||||||
update: true
|
update: true
|
||||||
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache 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 mingw-w64-x86_64-unbound git
|
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
|
- name: build
|
||||||
run: |
|
run: make release-static-win64 -j2
|
||||||
${{env.CCACHE_SETTINGS}}
|
|
||||||
make release-static-win64 -j2
|
|
||||||
|
|
||||||
# See the OS labels and monitor deprecations here:
|
|
||||||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
|
||||||
|
|
||||||
build-ubuntu:
|
build-ubuntu:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
CCACHE_TEMPDIR: /tmp/.ccache-temp
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-22.04, ubuntu-20.04]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.ccache
|
|
||||||
key: ccache-${{ runner.os }}-build-${{ matrix.os }}-${{ github.sha }}
|
|
||||||
restore-keys: ccache-${{ runner.os }}-build-${{ matrix.os }}
|
|
||||||
- name: remove bundled boost
|
- name: remove bundled boost
|
||||||
run: ${{env.REMOVE_BUNDLED_BOOST}}
|
run: sudo rm -rf /usr/local/share/boost
|
||||||
- name: set apt conf
|
- name: set apt conf
|
||||||
run: ${{env.APT_SET_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
|
- name: update apt
|
||||||
run: sudo apt update
|
run: sudo apt update
|
||||||
- name: install monero dependencies
|
- name: install monero dependencies
|
||||||
run: ${{env.APT_INSTALL_LINUX}}
|
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
|
- name: build
|
||||||
run: |
|
run: make -j3
|
||||||
${{env.CCACHE_SETTINGS}}
|
|
||||||
${{env.BUILD_DEFAULT_LINUX}}
|
|
||||||
|
|
||||||
libwallet-ubuntu:
|
libwallet-ubuntu:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
CCACHE_TEMPDIR: /tmp/.ccache-temp
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.ccache
|
|
||||||
key: ccache-${{ runner.os }}-libwallet-${{ github.sha }}
|
|
||||||
restore-keys: ccache-${{ runner.os }}-libwallet-
|
|
||||||
- name: remove bundled boost
|
- name: remove bundled boost
|
||||||
run: ${{env.REMOVE_BUNDLED_BOOST}}
|
run: sudo rm -rf /usr/local/share/boost
|
||||||
- name: set apt conf
|
- name: set apt conf
|
||||||
run: ${{env.APT_SET_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
|
- name: update apt
|
||||||
run: sudo apt update
|
run: sudo apt update
|
||||||
- name: install monero dependencies
|
- name: install monero dependencies
|
||||||
run: ${{env.APT_INSTALL_LINUX}}
|
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
|
- name: build
|
||||||
run: |
|
run: cmake -DBUILD_GUI_DEPS=ON && make -j3
|
||||||
${{env.CCACHE_SETTINGS}}
|
|
||||||
cmake .
|
|
||||||
make wallet_api -j3
|
|
||||||
|
|
||||||
test-ubuntu:
|
test-ubuntu:
|
||||||
needs: build-ubuntu
|
needs: build-ubuntu
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
CCACHE_TEMPDIR: /tmp/.ccache-temp
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: ccache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.ccache
|
|
||||||
key: ccache-${{ runner.os }}-build-ubuntu-latest-${{ github.sha }}
|
|
||||||
restore-keys: ccache-${{ runner.os }}-build-ubuntu-latest
|
|
||||||
- name: remove bundled boost
|
- name: remove bundled boost
|
||||||
run: ${{env.REMOVE_BUNDLED_BOOST}}
|
run: sudo rm -rf /usr/local/share/boost
|
||||||
- name: set apt conf
|
- name: set apt conf
|
||||||
run: ${{env.APT_SET_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
|
- name: update apt
|
||||||
run: sudo apt update
|
run: sudo apt update
|
||||||
- name: install monero dependencies
|
- name: install monero dependencies
|
||||||
run: ${{env.APT_INSTALL_LINUX}}
|
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 Python dependencies
|
- name: install requests
|
||||||
run: pip install requests psutil monotonic zmq deepdiff
|
run: pip install requests
|
||||||
- name: tests
|
- name: tests
|
||||||
env:
|
env:
|
||||||
CTEST_OUTPUT_ON_FAILURE: ON
|
CTEST_OUTPUT_ON_FAILURE: ON
|
||||||
DNS_PUBLIC: tcp://9.9.9.9
|
run: make release-test -j3
|
||||||
run: |
|
|
||||||
${{env.CCACHE_SETTINGS}}
|
|
||||||
${{env.BUILD_DEFAULT_LINUX}}
|
|
||||||
cmake --build build --target test
|
|
||||||
|
|
||||||
# ARCH="default" (not "native") ensures, that a different execution host can execute binaries compiled elsewhere.
|
|
||||||
# BUILD_SHARED_LIBS=ON speeds up the linkage part a bit, reduces size, and is the only place where the dynamic linkage is tested.
|
|
||||||
|
|
||||||
source-archive:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: recursive
|
|
||||||
- name: archive
|
|
||||||
run: |
|
|
||||||
pip install git-archive-all
|
|
||||||
export VERSION="monero-$(git describe)"
|
|
||||||
export OUTPUT="$VERSION.tar"
|
|
||||||
echo "OUTPUT=$OUTPUT" >> $GITHUB_ENV
|
|
||||||
/home/runner/.local/bin/git-archive-all --prefix "$VERSION/" --force-submodules "$OUTPUT"
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.OUTPUT }}
|
|
||||||
path: /home/runner/work/monero/monero/${{ env.OUTPUT }}
|
|
||||||
|
|||||||
106
.github/workflows/depends.yml
vendored
106
.github/workflows/depends.yml
vendored
@@ -1,106 +0,0 @@
|
|||||||
name: ci/gh-actions/depends
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- 'docs/**'
|
|
||||||
- '**/README.md'
|
|
||||||
|
|
||||||
env:
|
|
||||||
APT_SET_CONF: |
|
|
||||||
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
|
|
||||||
CCACHE_SETTINGS: |
|
|
||||||
ccache --max-size=150M
|
|
||||||
ccache --set-config=compression=true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-cross:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
env:
|
|
||||||
CCACHE_TEMPDIR: /tmp/.ccache-temp
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
toolchain:
|
|
||||||
- name: "RISCV 64bit"
|
|
||||||
host: "riscv64-linux-gnu"
|
|
||||||
packages: "python3 gperf g++-riscv64-linux-gnu"
|
|
||||||
- name: "ARM v7"
|
|
||||||
host: "arm-linux-gnueabihf"
|
|
||||||
packages: "python3 gperf g++-arm-linux-gnueabihf"
|
|
||||||
- name: "ARM v8"
|
|
||||||
host: "aarch64-linux-gnu"
|
|
||||||
packages: "python3 gperf g++-aarch64-linux-gnu"
|
|
||||||
- name: "i686 Win"
|
|
||||||
host: "i686-w64-mingw32"
|
|
||||||
packages: "python3 g++-mingw-w64-i686"
|
|
||||||
- name: "i686 Linux"
|
|
||||||
host: "i686-pc-linux-gnu"
|
|
||||||
packages: "gperf cmake g++-multilib python3-zmq"
|
|
||||||
- name: "Win64"
|
|
||||||
host: "x86_64-w64-mingw32"
|
|
||||||
packages: "cmake python3 g++-mingw-w64-x86-64"
|
|
||||||
- name: "x86_64 Linux"
|
|
||||||
host: "x86_64-unknown-linux-gnu"
|
|
||||||
packages: "gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
|
|
||||||
- name: "Cross-Mac x86_64"
|
|
||||||
host: "x86_64-apple-darwin11"
|
|
||||||
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
|
|
||||||
- name: "Cross-Mac aarch64"
|
|
||||||
host: "aarch64-apple-darwin11"
|
|
||||||
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
|
|
||||||
- name: "x86_64 Freebsd"
|
|
||||||
host: "x86_64-unknown-freebsd"
|
|
||||||
packages: "clang-8 gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
|
|
||||||
name: ${{ matrix.toolchain.name }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: recursive
|
|
||||||
# Most volatile cache
|
|
||||||
- name: ccache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.ccache
|
|
||||||
key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }}
|
|
||||||
restore-keys: ccache-${{ matrix.toolchain.host }}-
|
|
||||||
# Less volatile cache
|
|
||||||
- name: depends cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: contrib/depends/built
|
|
||||||
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
|
||||||
restore-keys: |
|
|
||||||
depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
|
||||||
depends-${{ matrix.toolchain.host }}-
|
|
||||||
# Static cache
|
|
||||||
- name: OSX SDK cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: contrib/depends/sdk-sources
|
|
||||||
key: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
|
|
||||||
restore-keys: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
|
|
||||||
- name: set apt conf
|
|
||||||
run: ${{env.APT_SET_CONF}}
|
|
||||||
- name: install dependencies
|
|
||||||
run: sudo apt update; sudo apt -y install build-essential libtool cmake autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache ${{ matrix.toolchain.packages }}
|
|
||||||
- name: prepare w64-mingw32
|
|
||||||
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'i686-w64-mingw32' }}
|
|
||||||
run: |
|
|
||||||
sudo update-alternatives --set ${{ matrix.toolchain.host }}-g++ $(which ${{ matrix.toolchain.host }}-g++-posix)
|
|
||||||
sudo update-alternatives --set ${{ matrix.toolchain.host }}-gcc $(which ${{ matrix.toolchain.host }}-gcc-posix)
|
|
||||||
- name: build
|
|
||||||
run: |
|
|
||||||
${{env.CCACHE_SETTINGS}}
|
|
||||||
make depends target=${{ matrix.toolchain.host }} -j2
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin11' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.toolchain.name }}
|
|
||||||
path: |
|
|
||||||
/home/runner/work/monero/monero/build/${{ matrix.toolchain.host }}/release/bin/monero-wallet-cli*
|
|
||||||
/home/runner/work/monero/monero/build/${{ matrix.toolchain.host }}/release/bin/monerod*
|
|
||||||
49
.github/workflows/gitian.yml
vendored
49
.github/workflows/gitian.yml
vendored
@@ -1,49 +0,0 @@
|
|||||||
name: ci/gh-actions/gitian
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-gitian:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
operating-system:
|
|
||||||
- name: "Linux"
|
|
||||||
option: "l"
|
|
||||||
- name: "Windows"
|
|
||||||
option: "w"
|
|
||||||
- name: "Android"
|
|
||||||
option: "a"
|
|
||||||
- name: "FreeBSD"
|
|
||||||
option: "f"
|
|
||||||
- name: "macOS"
|
|
||||||
option: "m"
|
|
||||||
name: ${{ matrix.operating-system.name }}
|
|
||||||
steps:
|
|
||||||
- name: prepare
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
curl -O https://raw.githubusercontent.com/monero-project/monero/${{ github.ref_name }}/contrib/gitian/gitian-build.py
|
|
||||||
chmod +x gitian-build.py
|
|
||||||
- name: setup
|
|
||||||
run: |
|
|
||||||
./gitian-build.py --setup --docker github-actions ${{ github.ref_name }}
|
|
||||||
- name: build
|
|
||||||
run: |
|
|
||||||
./gitian-build.py --docker --detach-sign --no-commit --build -j 3 -o ${{ matrix.operating-system.option }} github-actions ${{ github.ref_name }}
|
|
||||||
- name: post build
|
|
||||||
run: |
|
|
||||||
cd out/${{ github.ref_name }}
|
|
||||||
shasum -a256 *
|
|
||||||
echo \`\`\` >> $GITHUB_STEP_SUMMARY
|
|
||||||
shasum -a256 * >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo \`\`\` >> $GITHUB_STEP_SUMMARY
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.operating-system.name }}
|
|
||||||
path: |
|
|
||||||
out/${{ github.ref_name }}/*
|
|
||||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -23,13 +23,6 @@ cscope.po.out
|
|||||||
external/miniupnpc/Makefile
|
external/miniupnpc/Makefile
|
||||||
miniupnpcstrings.h
|
miniupnpcstrings.h
|
||||||
version/
|
version/
|
||||||
ClangBuildAnalyzerSession.txt
|
|
||||||
|
|
||||||
# gitian
|
|
||||||
contrib/gitian/builder/
|
|
||||||
contrib/gitian/docker/
|
|
||||||
contrib/gitian/sigs/
|
|
||||||
|
|
||||||
# Created by https://www.gitignore.io
|
# Created by https://www.gitignore.io
|
||||||
|
|
||||||
### C++ ###
|
### C++ ###
|
||||||
@@ -76,8 +69,6 @@ cmake-build-debug/
|
|||||||
# KDE directory preferences
|
# KDE directory preferences
|
||||||
.directory
|
.directory
|
||||||
|
|
||||||
### VSCode ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Eclipse ###
|
### Eclipse ###
|
||||||
*.pydevproject
|
*.pydevproject
|
||||||
@@ -118,5 +109,3 @@ nbproject
|
|||||||
/testnet
|
/testnet
|
||||||
|
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
|
||||||
*.log
|
|
||||||
|
|||||||
24
.gitmodules
vendored
24
.gitmodules
vendored
@@ -1,19 +1,19 @@
|
|||||||
|
[submodule "external/unbound"]
|
||||||
|
path = external/unbound
|
||||||
|
url = https://git.wownero.com/wownero/unbound
|
||||||
|
branch = monero
|
||||||
[submodule "external/miniupnp"]
|
[submodule "external/miniupnp"]
|
||||||
path = external/miniupnp
|
path = external/miniupnp
|
||||||
url = https://github.com/miniupnp/miniupnp
|
url = https://git.wownero.com/wownero/miniupnp
|
||||||
|
branch = monero
|
||||||
[submodule "external/rapidjson"]
|
[submodule "external/rapidjson"]
|
||||||
path = external/rapidjson
|
path = external/rapidjson
|
||||||
url = https://github.com/Tencent/rapidjson
|
url = https://git.wownero.com/wownero/rapidjson
|
||||||
[submodule "external/trezor-common"]
|
[submodule "external/RandomWOW"]
|
||||||
active = false
|
path = external/RandomWOW
|
||||||
path = external/trezor-common
|
url = https://git.wownero.com/wownero/RandomWOW
|
||||||
url = https://github.com/trezor/trezor-common.git
|
branch = 1.1.8-wow
|
||||||
[submodule "external/supercop"]
|
[submodule "external/supercop"]
|
||||||
path = external/supercop
|
path = external/supercop
|
||||||
url = https://github.com/monero-project/supercop
|
url = https://git.wownero.com/wownero/supercop
|
||||||
branch = monero
|
branch = monero
|
||||||
[submodule "external/randomwow"]
|
|
||||||
path = external/randomwow
|
|
||||||
url = https://codeberg.org/wownero/RandomWOW
|
|
||||||
branch = 1.2.1-wow
|
|
||||||
|
|
||||||
|
|||||||
66
.travis.yml
Normal file
66
.travis.yml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
|
os: linux
|
||||||
|
language: minimal
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- contrib/depends/built
|
||||||
|
- contrib/depends/sdk-sources
|
||||||
|
- $HOME/.ccache
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- MAKEJOBS=-j3
|
||||||
|
- CCACHE_SIZE=100M
|
||||||
|
- CCACHE_TEMPDIR=/tmp/.ccache-temp
|
||||||
|
- CCACHE_COMPRESS=1
|
||||||
|
- CCACHE_DIR=$HOME/.ccache
|
||||||
|
- BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
|
||||||
|
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
|
||||||
|
- DOCKER_PACKAGES="build-essential libtool cmake autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache"
|
||||||
|
matrix:
|
||||||
|
# RISCV 64bit
|
||||||
|
- HOST=riscv64-linux-gnu PACKAGES="python3 gperf g++-riscv64-linux-gnu"
|
||||||
|
# ARM v7
|
||||||
|
- HOST=arm-linux-gnueabihf PACKAGES="python3 gperf g++-arm-linux-gnueabihf"
|
||||||
|
# ARM v8
|
||||||
|
- HOST=aarch64-linux-gnu PACKAGES="python3 gperf g++-aarch64-linux-gnu"
|
||||||
|
# i686 Win
|
||||||
|
- HOST=i686-w64-mingw32 DEP_OPTS="NO_QT=1" PACKAGES="python3 g++-mingw-w64-i686 qttools5-dev-tools" MAKEJOBS=-j2
|
||||||
|
# i686 Linux
|
||||||
|
- HOST=i686-pc-linux-gnu PACKAGES="gperf cmake g++-multilib python3-zmq"
|
||||||
|
# Win64
|
||||||
|
- HOST=x86_64-w64-mingw32 DEP_OPTS="NO_QT=1" PACKAGES="cmake python3 g++-mingw-w64-x86-64 qttools5-dev-tools"
|
||||||
|
# x86_64 Linux
|
||||||
|
- HOST=x86_64-unknown-linux-gnu PACKAGES="gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
|
||||||
|
# Cross-Mac
|
||||||
|
- HOST=x86_64-apple-darwin11 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" OSX_SDK=10.11
|
||||||
|
# x86_64 Freebsd
|
||||||
|
- HOST=x86_64-unknown-freebsd PACKAGES="clang-8 gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
|
||||||
|
install:
|
||||||
|
- env | grep -E '^(CCACHE_|DISPLAY|CONFIG_SHELL)' | tee /tmp/env
|
||||||
|
- if [[ $HOST = *-mingw32 ]]; then DOCKER_ADMIN="--cap-add SYS_ADMIN"; fi
|
||||||
|
- DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env ubuntu:18.04)
|
||||||
|
- DOCKER_EXEC="docker exec $DOCKER_ID"
|
||||||
|
- if [ -n "$DPKG_ADD_ARCH" ]; then $DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi
|
||||||
|
- travis_retry $DOCKER_EXEC apt-get update
|
||||||
|
- travis_retry $DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES
|
||||||
|
before_script:
|
||||||
|
- mkdir -p contrib/depends/SDKs contrib/depends/sdk-sources
|
||||||
|
- if [ -n "$OSX_SDK" -a ! -f contrib/depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o contrib/depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
|
||||||
|
- if [ -n "$OSX_SDK" -a -f contrib/depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C contrib/depends/SDKs -xf contrib/depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
|
||||||
|
- if [[ $HOST = *-mingw32 ]]; then $DOCKER_EXEC bash -c "update-alternatives --set $HOST-g++ \$(which $HOST-g++-posix)"; fi
|
||||||
|
- if [[ $HOST = *-mingw32 ]]; then $DOCKER_EXEC bash -c "update-alternatives --set $HOST-gcc \$(which $HOST-gcc-posix)"; fi
|
||||||
|
- if [ -z "$NO_DEPENDS" ]; then $DOCKER_EXEC bash -c "make $MAKEJOBS -C contrib/depends HOST=$HOST $DEP_OPTS"; fi
|
||||||
|
script:
|
||||||
|
- git submodule init && git submodule update
|
||||||
|
- export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
|
||||||
|
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
|
||||||
|
- if [ -z "$NO_DEPENDS" ]; then $DOCKER_EXEC ccache --max-size=$CCACHE_SIZE; fi
|
||||||
|
- $DOCKER_EXEC bash -c "mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/contrib/depends/$HOST/share/toolchain.cmake .. && make $MAKEJOBS"
|
||||||
|
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/contrib/depends/$HOST/lib
|
||||||
|
after_script:
|
||||||
|
- echo $TRAVIS_COMMIT_RANGE
|
||||||
|
- echo $TRAVIS_COMMIT_LOG
|
||||||
@@ -36,6 +36,10 @@ with additional exclusive IPv4 address(es).
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
Anonymity networks have no seed nodes (the feature is still considered
|
||||||
|
experimental), so a user must specify an address. If configured properly,
|
||||||
|
additional peers can be found through typical p2p peerlist sharing.
|
||||||
|
|
||||||
### Outbound Connections
|
### Outbound Connections
|
||||||
|
|
||||||
Connecting to an anonymous address requires the command line option
|
Connecting to an anonymous address requires the command line option
|
||||||
@@ -50,9 +54,8 @@ separate process. On most systems the configuration will look like:
|
|||||||
which tells `monerod` that ".onion" p2p addresses can be forwarded to a socks
|
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
|
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
|
".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.
|
9000 with the default max outgoing connections. Since there are no seed nodes
|
||||||
|
for anonymity connections, peers must be manually specified:
|
||||||
If desired, peers can be manually specified:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
--add-exclusive-node rveahdfho7wo4b2m.onion:28083
|
--add-exclusive-node rveahdfho7wo4b2m.onion:28083
|
||||||
@@ -71,13 +74,13 @@ type, and max connections:
|
|||||||
|
|
||||||
```
|
```
|
||||||
--anonymous-inbound rveahdfho7wo4b2m.onion:28083,127.0.0.1:28083,25
|
--anonymous-inbound rveahdfho7wo4b2m.onion:28083,127.0.0.1:28083,25
|
||||||
--anonymous-inbound cmeua5767mz2q5jsaelk2rxhf67agrwuetaso5dzbenyzwlbkg2q.b32.i2p,127.0.0.1:30000
|
--anonymous-inbound cmeua5767mz2q5jsaelk2rxhf67agrwuetaso5dzbenyzwlbkg2q.b32.i2p:5000,127.0.0.1:30000
|
||||||
```
|
```
|
||||||
|
|
||||||
which tells `monerod` that a max of 25 inbound Tor connections are being
|
which tells `monerod` that a max of 25 inbound Tor connections are being
|
||||||
received at address "rveahdfho7wo4b2m.onion:28083" and forwarded to `monerod`
|
received at address "rveahdfho7wo4b2m.onion:28083" and forwarded to `monerod`
|
||||||
localhost port 28083, and a default max I2P connections are being received at
|
localhost port 28083, and a default max I2P connections are being received at
|
||||||
address "cmeua5767mz2q5jsaelk2rxhf67agrwuetaso5dzbenyzwlbkg2q.b32.i2p" and
|
address "cmeua5767mz2q5jsaelk2rxhf67agrwuetaso5dzbenyzwlbkg2q.b32.i2p:5000" and
|
||||||
forwarded to `monerod` localhost port 30000.
|
forwarded to `monerod` localhost port 30000.
|
||||||
These addresses will be shared with outgoing peers, over the same network type,
|
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.
|
otherwise the peer will not be notified of the peer address by the proxy.
|
||||||
404
CMakeLists.txt
404
CMakeLists.txt
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
@@ -43,7 +43,7 @@ if (IOS)
|
|||||||
INCLUDE(CmakeLists_IOS.txt)
|
INCLUDE(CmakeLists_IOS.txt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 2.8.7)
|
||||||
message(STATUS "CMake version ${CMAKE_VERSION}")
|
message(STATUS "CMake version ${CMAKE_VERSION}")
|
||||||
|
|
||||||
project(monero)
|
project(monero)
|
||||||
@@ -54,52 +54,24 @@ if (USE_CCACHE)
|
|||||||
else()
|
else()
|
||||||
message(STATUS "ccache deselected")
|
message(STATUS "ccache deselected")
|
||||||
endif()
|
endif()
|
||||||
option (USE_COMPILATION_TIME_PROFILER "Use compilation time profiler (for CLang >= 9 only)" OFF)
|
|
||||||
if (USE_COMPILATION_TIME_PROFILER)
|
|
||||||
if (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
|
||||||
message(FATAL_ERROR "The flag USE_COMPILATION_TIME_PROFILER is meant to be set only for CLang compiler!")
|
|
||||||
endif()
|
|
||||||
add_compile_options("-ftime-trace")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "ninja")
|
# Job pool feature requires Ninja.
|
||||||
set(MONERO_PARALLEL_COMPILE_JOBS "" CACHE STRING "The maximum number of concurrent compilation jobs.")
|
if (${CMAKE_VERSION} VERSION_GREATER "3.0.0")
|
||||||
if (MONERO_PARALLEL_COMPILE_JOBS)
|
set(WOWNERO_PARALLEL_COMPILE_JOBS "" CACHE STRING "The maximum number of concurrent compilation jobs.")
|
||||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${MONERO_PARALLEL_COMPILE_JOBS})
|
if (WOWNERO_PARALLEL_COMPILE_JOBS)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${WOWNERO_PARALLEL_COMPILE_JOBS})
|
||||||
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
|
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(MONERO_PARALLEL_LINK_JOBS "" CACHE STRING "The maximum number of concurrent link jobs.")
|
set(WOWNERO_PARALLEL_LINK_JOBS "" CACHE STRING "The maximum number of concurrent link jobs.")
|
||||||
if (MONERO_PARALLEL_LINK_JOBS)
|
if (WOWNERO_PARALLEL_LINK_JOBS)
|
||||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${MONERO_PARALLEL_LINK_JOBS})
|
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${WOWNERO_PARALLEL_LINK_JOBS})
|
||||||
set(CMAKE_JOB_POOL_LINK link_job_pool)
|
set(CMAKE_JOB_POOL_LINK link_job_pool)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
|
||||||
|
|
||||||
option (USE_CLANG_TIDY_C "Lint the code with clang-tidy - variant C" OFF)
|
|
||||||
option (USE_CLANG_TIDY_CXX "Lint the code with clang-tidy - variant C++" OFF)
|
|
||||||
if (USE_CLANG_TIDY_C AND USE_CLANG_TIDY_CXX)
|
|
||||||
message(FATAL_ERROR "Enabling both USE_CLANG_TIDY_C and USE_CLANG_TIDY_CXX simultaneously crashes clang-tidy.")
|
|
||||||
endif()
|
|
||||||
if (USE_CLANG_TIDY_C OR USE_CLANG_TIDY_CXX)
|
|
||||||
include(SetClangTidy)
|
|
||||||
endif()
|
|
||||||
if (USE_CLANG_TIDY_C)
|
|
||||||
monero_clang_tidy("C")
|
|
||||||
elseif (USE_CLANG_TIDY_CXX)
|
|
||||||
monero_clang_tidy("CXX")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
enable_language(C ASM)
|
enable_language(C ASM)
|
||||||
|
|
||||||
# Require C11/C++11 and disable extensions for all targets
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
|
||||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
|
||||||
set(CMAKE_C_EXTENSIONS OFF)
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
||||||
|
|
||||||
function (die msg)
|
function (die msg)
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
string(ASCII 27 Esc)
|
string(ASCII 27 Esc)
|
||||||
@@ -114,20 +86,16 @@ function (die msg)
|
|||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
function (add_c_flag_if_supported flag var)
|
function (add_c_flag_if_supported flag var)
|
||||||
# Prepending the flag with -Werror will only add the flag,
|
string(REPLACE "-" "_" supported ${flag}_c)
|
||||||
# if it doesn't result in generation of a warning of using a flag unknown to the compiler.
|
check_c_compiler_flag(${flag} ${supported})
|
||||||
set(TMP "-Werror ${flag}")
|
|
||||||
string(REGEX REPLACE "[- ]" "_" supported ${TMP}_c)
|
|
||||||
check_c_compiler_flag(${TMP} ${supported})
|
|
||||||
if(${${supported}})
|
if(${${supported}})
|
||||||
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
|
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function (add_cxx_flag_if_supported flag var)
|
function (add_cxx_flag_if_supported flag var)
|
||||||
set(TMP "-Werror ${flag}")
|
string(REPLACE "-" "_" supported ${flag}_cxx)
|
||||||
string(REGEX REPLACE "[- ]" "_" supported ${TMP}_cxx)
|
check_cxx_compiler_flag(${flag} ${supported})
|
||||||
check_cxx_compiler_flag(${TMP} ${supported})
|
|
||||||
if(${${supported}})
|
if(${${supported}})
|
||||||
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
|
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
@@ -158,108 +126,6 @@ function (add_definition_if_library_exists library function header var)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
option(RELINK_TARGETS "Relink targets, when just a dependant .so changed, but not its header?" OFF)
|
|
||||||
function (monero_set_target_no_relink target)
|
|
||||||
if (RELINK_TARGETS MATCHES OFF)
|
|
||||||
# Will not relink the target, when just its dependant .so has changed, but not it's interface
|
|
||||||
set_target_properties("${target}" PROPERTIES LINK_DEPENDS_NO_SHARED true)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
option(STRIP_TARGETS "Strip symbols from targets?" OFF)
|
|
||||||
function (monero_set_target_strip target)
|
|
||||||
if (STRIP_TARGETS)
|
|
||||||
set_target_properties("${target}" PROPERTIES LINK_FLAGS_RELEASE -s)
|
|
||||||
set_target_properties("${target}" PROPERTIES LINK_FLAGS_DEBUG -s)
|
|
||||||
# Stripping from Debug might make sense if you're low on disk space, but want to test if debug version builds properly.
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function (monero_add_minimal_executable name)
|
|
||||||
source_group("${name}"
|
|
||||||
FILES
|
|
||||||
${ARGN})
|
|
||||||
|
|
||||||
add_executable("${name}"
|
|
||||||
${ARGN})
|
|
||||||
monero_set_target_no_relink("${name}")
|
|
||||||
monero_set_target_strip ("${name}")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# Finds all headers in a directory and its subdirs, to be able to search for them and autosave in IDEs.
|
|
||||||
#
|
|
||||||
# Parameters:
|
|
||||||
# - headers_found: Output variable, which will hold the found headers
|
|
||||||
# - module_root_dir: The search path for the headers. Typically it will be the module's root dir, so "${CMAKE_CURRENT_SOURCE_DIR}" or a derivative of it.
|
|
||||||
macro (monero_find_all_headers headers_found module_root_dir)
|
|
||||||
file(GLOB ${headers_found}
|
|
||||||
"${module_root_dir}/*.h*" # h* will include hpps as well.
|
|
||||||
"${module_root_dir}/**/*.h*" # Any number of subdirs will be included.
|
|
||||||
"${module_root_dir}/*.inl" # .inl is typically template code and is being treated as headers (it's being included).
|
|
||||||
"${module_root_dir}/**/*.inl"
|
|
||||||
)
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
# Function to forbid undefined symbols and also verify
|
|
||||||
# 1) Test project with all types of libraries and without undefined symbols can compile successfully
|
|
||||||
# 2) Test project with all types of libraries and undefined symbols can not compile successfully
|
|
||||||
function(forbid_undefined_symbols)
|
|
||||||
unset(TMP)
|
|
||||||
# https://www.unix.com/man-page/linux/1/ld, --no-undefined, Report unresolved symbol references from regular object files.
|
|
||||||
add_linker_flag_if_supported(-Wl,--no-undefined TMP)
|
|
||||||
# https://www.unix.com/man-page/osx/1/ld/, -undefined, Specifies how undefined symbols are to be treated.
|
|
||||||
add_linker_flag_if_supported(-Wl,-undefined,error TMP)
|
|
||||||
string(APPEND CMAKE_SHARED_LINKER_FLAGS ${TMP})
|
|
||||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS ${TMP})
|
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} PARENT_SCOPE)
|
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} PARENT_SCOPE)
|
|
||||||
set(TEST_PROJECT "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_project")
|
|
||||||
foreach(EXPECT IN ITEMS TRUE FALSE)
|
|
||||||
file(REMOVE_RECURSE "${TEST_PROJECT}")
|
|
||||||
file(MAKE_DIRECTORY "${TEST_PROJECT}")
|
|
||||||
file(WRITE "${TEST_PROJECT}/CMakeLists.txt"
|
|
||||||
[=[
|
|
||||||
cmake_minimum_required(VERSION 3.1)
|
|
||||||
project(test)
|
|
||||||
option(EXPECT_SUCCESS "" ON)
|
|
||||||
file(WRITE "${CMAKE_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }")
|
|
||||||
if (EXPECT_SUCCESS)
|
|
||||||
file(APPEND "${CMAKE_SOURCE_DIR}/incorrect_source.cpp" " void undefined_symbol() {}; ")
|
|
||||||
endif()
|
|
||||||
add_library(l0 SHARED incorrect_source.cpp)
|
|
||||||
add_library(l1 MODULE incorrect_source.cpp)
|
|
||||||
add_library(l2 STATIC incorrect_source.cpp)
|
|
||||||
add_library(l3 OBJECT incorrect_source.cpp)
|
|
||||||
]=]
|
|
||||||
)
|
|
||||||
try_compile(SUCCESS "${TEST_PROJECT}/build" "${TEST_PROJECT}" test
|
|
||||||
CMAKE_FLAGS
|
|
||||||
"-DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}"
|
|
||||||
"-DCMAKE_MODULE_LINKER_FLAGS=${CMAKE_MODULE_LINKER_FLAGS}"
|
|
||||||
"-DEXPECT_SUCCESS=${EXPECT}"
|
|
||||||
)
|
|
||||||
if (NOT ${SUCCESS} STREQUAL ${EXPECT})
|
|
||||||
message(FATAL_ERROR "Undefined symbols test failure: expect(${EXPECT}), success(${SUCCESS})")
|
|
||||||
endif()
|
|
||||||
file(REMOVE_RECURSE "${TEST_PROJECT}")
|
|
||||||
endforeach()
|
|
||||||
endfunction()
|
|
||||||
if (NOT (CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*") AND NOT OSSFUZZ)
|
|
||||||
forbid_undefined_symbols()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (MINGW)
|
|
||||||
function(export_all_symbols)
|
|
||||||
unset(TMP)
|
|
||||||
add_linker_flag_if_supported(-Wl,--export-all-symbols TMP)
|
|
||||||
string(APPEND CMAKE_SHARED_LINKER_FLAGS ${TMP})
|
|
||||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS ${TMP})
|
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} PARENT_SCOPE)
|
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
export_all_symbols()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
||||||
message(STATUS "Setting default build type: ${CMAKE_BUILD_TYPE}")
|
message(STATUS "Setting default build type: ${CMAKE_BUILD_TYPE}")
|
||||||
@@ -325,16 +191,6 @@ if(ARCH_ID STREQUAL "s390x")
|
|||||||
set(S390X 1)
|
set(S390X 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARCH_ID STREQUAL "riscv64")
|
|
||||||
set(RISCV 1)
|
|
||||||
set(RISCV64 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ARCH_ID STREQUAL "riscv32")
|
|
||||||
set(RISCV 1)
|
|
||||||
set(RISCV32 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32 OR ARM OR PPC64LE OR PPC64 OR PPC)
|
if(WIN32 OR ARM OR PPC64LE OR PPC64 OR PPC)
|
||||||
set(OPT_FLAGS_RELEASE "-O2")
|
set(OPT_FLAGS_RELEASE "-O2")
|
||||||
else()
|
else()
|
||||||
@@ -349,6 +205,15 @@ else()
|
|||||||
message(STATUS "Building without build tag")
|
message(STATUS "Building without build tag")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Update and init submodules by default
|
||||||
|
if(NOT MANUAL_SUBMODULES)
|
||||||
|
find_package(Git)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
message(STATUS "Initializing submodules")
|
||||||
|
execute_process(COMMAND git "submodule" "update" "--init" "--recursive" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT MANUAL_SUBMODULES)
|
if(NOT MANUAL_SUBMODULES)
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
if(GIT_FOUND)
|
if(GIT_FOUND)
|
||||||
@@ -359,16 +224,15 @@ if(NOT MANUAL_SUBMODULES)
|
|||||||
if (upToDate)
|
if (upToDate)
|
||||||
message(STATUS "Submodule '${relative_path}' is up-to-date")
|
message(STATUS "Submodule '${relative_path}' is up-to-date")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Initializing submodules")
|
message(FATAL_ERROR "Submodule '${relative_path}' is not up-to-date. Please update all submodules with\ngit submodule update --init --force\nor run cmake with -DMANUAL_SUBMODULES=1\n")
|
||||||
execute_process(COMMAND git "submodule" "update" "--init" "--recursive" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
|
||||||
endif()
|
endif()
|
||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
message(STATUS "Checking submodules")
|
message(STATUS "Checking submodules")
|
||||||
check_submodule(external/miniupnp)
|
check_submodule(external/miniupnp)
|
||||||
|
check_submodule(external/unbound)
|
||||||
check_submodule(external/rapidjson)
|
check_submodule(external/rapidjson)
|
||||||
#check_submodule(external/trezor-common)
|
check_submodule(external/RandomWOW)
|
||||||
check_submodule(external/randomwow)
|
|
||||||
check_submodule(external/supercop)
|
check_submodule(external/supercop)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -403,6 +267,18 @@ endif()
|
|||||||
message(STATUS "BOOST_IGNORE_SYSTEM_PATHS defaults to ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT}")
|
message(STATUS "BOOST_IGNORE_SYSTEM_PATHS defaults to ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT}")
|
||||||
option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost installation" ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT})
|
option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost installation" ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT})
|
||||||
|
|
||||||
|
|
||||||
|
if (NOT DEFINED ENV{DEVELOPER_LIBUNBOUND_OLD})
|
||||||
|
message(STATUS "Could not find DEVELOPER_LIBUNBOUND_OLD in env (not required)")
|
||||||
|
elseif ("$ENV{DEVELOPER_LIBUNBOUND_OLD}" EQUAL 1)
|
||||||
|
message(STATUS "Found: env DEVELOPER_LIBUNBOUND_OLD = 1, will use the work around")
|
||||||
|
add_definitions(-DDEVELOPER_LIBUNBOUND_OLD)
|
||||||
|
elseif ("$ENV{DEVELOPER_LIBUNBOUND_OLD}" EQUAL 0)
|
||||||
|
message(STATUS "Found: env DEVELOPER_LIBUNBOUND_OLD = 0")
|
||||||
|
else()
|
||||||
|
message(STATUS "Found: env DEVELOPER_LIBUNBOUND_OLD with bad value. Will NOT use the work around")
|
||||||
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
@@ -462,7 +338,10 @@ endif()
|
|||||||
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
|
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
cmake_policy(SET CMP0042 NEW)
|
include_directories(SYSTEM /usr/include/malloc)
|
||||||
|
if(POLICY CMP0042)
|
||||||
|
cmake_policy(SET CMP0042 NEW)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC OR MINGW)
|
if(MSVC OR MINGW)
|
||||||
@@ -473,11 +352,9 @@ endif()
|
|||||||
option(STATIC "Link libraries statically" ${DEFAULT_STATIC})
|
option(STATIC "Link libraries statically" ${DEFAULT_STATIC})
|
||||||
|
|
||||||
# This is a CMake built-in switch that concerns internal libraries
|
# This is a CMake built-in switch that concerns internal libraries
|
||||||
set(BUILD_SHARED_LIBS_DEFAULT OFF)
|
if (NOT DEFINED BUILD_SHARED_LIBS AND NOT STATIC AND CMAKE_BUILD_TYPE_LOWER STREQUAL "debug")
|
||||||
if (NOT STATIC AND CMAKE_BUILD_TYPE_LOWER STREQUAL "debug")
|
set(BUILD_SHARED_LIBS ON)
|
||||||
set(BUILD_SHARED_LIBS_DEFAULT ON)
|
|
||||||
endif()
|
endif()
|
||||||
option(BUILD_SHARED_LIBS "Build internal libraries as shared" ${BUILD_SHARED_LIBS_DEFAULT})
|
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
message(STATUS "Building internal libraries with position independent code")
|
message(STATUS "Building internal libraries with position independent code")
|
||||||
@@ -509,7 +386,6 @@ if(STATIC)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DZMQ_STATIC")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DZMQ_STATIC")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(SANITIZE "Use ASAN memory sanitizer" OFF)
|
|
||||||
if(SANITIZE)
|
if(SANITIZE)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
message(FATAL_ERROR "Cannot sanitize with MSVC")
|
message(FATAL_ERROR "Cannot sanitize with MSVC")
|
||||||
@@ -578,7 +454,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (APPLE AND NOT IOS)
|
if (APPLE AND NOT IOS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
|
||||||
if (NOT OPENSSL_ROOT_DIR)
|
if (NOT OPENSSL_ROOT_DIR)
|
||||||
EXECUTE_PROCESS(COMMAND brew --prefix openssl
|
EXECUTE_PROCESS(COMMAND brew --prefix openssl
|
||||||
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
||||||
@@ -596,10 +472,6 @@ if(STATIC AND NOT IOS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
list(APPEND OPENSSL_LIBRARIES ws2_32 crypt32)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(HIDAPI)
|
find_package(HIDAPI)
|
||||||
|
|
||||||
add_definition_if_library_exists(c memset_s "string.h" HAVE_MEMSET_S)
|
add_definition_if_library_exists(c memset_s "string.h" HAVE_MEMSET_S)
|
||||||
@@ -611,59 +483,6 @@ add_definitions(-DAUTO_INITIALIZE_EASYLOGGINGPP)
|
|||||||
set(MONERO_GENERATED_HEADERS_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated_include")
|
set(MONERO_GENERATED_HEADERS_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated_include")
|
||||||
include_directories(${MONERO_GENERATED_HEADERS_DIR})
|
include_directories(${MONERO_GENERATED_HEADERS_DIR})
|
||||||
|
|
||||||
# As of OpenBSD 6.8, -march=<anything> breaks the build
|
|
||||||
function(set_default_arch)
|
|
||||||
if (OPENBSD)
|
|
||||||
set(ARCH default)
|
|
||||||
else()
|
|
||||||
set(ARCH native)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(ARCH ${ARCH} CACHE STRING "CPU to build for: -march value or 'default' to not pass -march at all")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
if (NOT (MSVC OR ARCH))
|
|
||||||
set_default_arch()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
option(COVERAGE "Enable profiling for test coverage report" OFF)
|
|
||||||
if(COVERAGE)
|
|
||||||
message(STATUS "Building with profiling for test coverage report")
|
|
||||||
endif()
|
|
||||||
macro (monero_enable_coverage)
|
|
||||||
if(COVERAGE)
|
|
||||||
foreach(COV_FLAG -fprofile-arcs -ftest-coverage --coverage)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COV_FLAG}")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COV_FLAG}")
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
function (monero_add_library name)
|
|
||||||
monero_add_library_with_deps(NAME "${name}" SOURCES ${ARGN})
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function (monero_add_library_with_deps)
|
|
||||||
cmake_parse_arguments(MONERO_ADD_LIBRARY "" "NAME" "DEPENDS;SOURCES" ${ARGN})
|
|
||||||
source_group("${MONERO_ADD_LIBRARY_NAME}" FILES ${MONERO_ADD_LIBRARY_SOURCES})
|
|
||||||
|
|
||||||
# Define a ("virtual") object library and an actual library that links those
|
|
||||||
# objects together. The virtual libraries can be arbitrarily combined to link
|
|
||||||
# any subset of objects into one library archive. This is used for releasing
|
|
||||||
# libwallet, which combines multiple components.
|
|
||||||
set(objlib obj_${MONERO_ADD_LIBRARY_NAME})
|
|
||||||
add_library(${objlib} OBJECT ${MONERO_ADD_LIBRARY_SOURCES})
|
|
||||||
add_library("${MONERO_ADD_LIBRARY_NAME}" $<TARGET_OBJECTS:${objlib}>)
|
|
||||||
monero_set_target_no_relink("${MONERO_ADD_LIBRARY_NAME}")
|
|
||||||
monero_set_target_strip ("${MONERO_ADD_LIBRARY_NAME}")
|
|
||||||
if (MONERO_ADD_LIBRARY_DEPENDS)
|
|
||||||
add_dependencies(${objlib} ${MONERO_ADD_LIBRARY_DEPENDS})
|
|
||||||
endif()
|
|
||||||
set_property(TARGET "${MONERO_ADD_LIBRARY_NAME}" PROPERTY FOLDER "libs")
|
|
||||||
target_compile_definitions(${objlib}
|
|
||||||
PRIVATE $<TARGET_PROPERTY:${MONERO_ADD_LIBRARY_NAME},INTERFACE_COMPILE_DEFINITIONS>)
|
|
||||||
endfunction ()
|
|
||||||
|
|
||||||
# Generate header for embedded translations
|
# Generate header for embedded translations
|
||||||
# Generate header for embedded translations, use target toolchain if depends, otherwise use the
|
# Generate header for embedded translations, use target toolchain if depends, otherwise use the
|
||||||
# lrelease and lupdate binaries from the host
|
# lrelease and lupdate binaries from the host
|
||||||
@@ -673,12 +492,13 @@ ExternalProject_Add(generate_translations_header
|
|||||||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
|
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
|
||||||
STAMP_DIR ${LRELEASE_PATH}
|
STAMP_DIR ${LRELEASE_PATH}
|
||||||
CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
|
CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
|
||||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "")
|
INSTALL_COMMAND cmake -E echo "")
|
||||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
|
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
|
||||||
add_subdirectory(external)
|
add_subdirectory(external)
|
||||||
|
|
||||||
# Final setup for libunbound
|
# Final setup for libunbound
|
||||||
include_directories(${UNBOUND_INCLUDE_DIR})
|
include_directories(${UNBOUND_INCLUDE})
|
||||||
|
link_directories(${UNBOUND_LIBRARY_DIRS})
|
||||||
|
|
||||||
# Final setup for easylogging++
|
# Final setup for easylogging++
|
||||||
include_directories(${EASYLOGGING_INCLUDE})
|
include_directories(${EASYLOGGING_INCLUDE})
|
||||||
@@ -697,7 +517,7 @@ if (HIDAPI_FOUND)
|
|||||||
add_definitions(-DHAVE_HIDAPI)
|
add_definitions(-DHAVE_HIDAPI)
|
||||||
include_directories(${HIDAPI_INCLUDE_DIR})
|
include_directories(${HIDAPI_INCLUDE_DIR})
|
||||||
link_directories(${LIBHIDAPI_LIBRARY_DIRS})
|
link_directories(${LIBHIDAPI_LIBRARY_DIRS})
|
||||||
else()
|
else (HIDAPI_FOUND)
|
||||||
message(STATUS "Could not find HIDAPI")
|
message(STATUS "Could not find HIDAPI")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -716,6 +536,9 @@ if(MSVC)
|
|||||||
include_directories(SYSTEM src/platform/msc)
|
include_directories(SYSTEM src/platform/msc)
|
||||||
else()
|
else()
|
||||||
include(TestCXXAcceptsFlag)
|
include(TestCXXAcceptsFlag)
|
||||||
|
if (NOT ARCH)
|
||||||
|
set(ARCH native CACHE STRING "CPU to build for: -march value or 'default' to not pass -march at all")
|
||||||
|
endif()
|
||||||
message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}")
|
message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}")
|
||||||
if(ARCH STREQUAL "default")
|
if(ARCH STREQUAL "default")
|
||||||
set(ARCH_FLAG "")
|
set(ARCH_FLAG "")
|
||||||
@@ -749,7 +572,7 @@ else()
|
|||||||
message(STATUS "AES support explicitly disabled")
|
message(STATUS "AES support explicitly disabled")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")
|
||||||
elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X AND NOT RISCV)
|
elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X)
|
||||||
message(STATUS "AES support enabled")
|
message(STATUS "AES support enabled")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
||||||
@@ -757,8 +580,6 @@ else()
|
|||||||
message(STATUS "AES support not available on POWER")
|
message(STATUS "AES support not available on POWER")
|
||||||
elseif(S390X)
|
elseif(S390X)
|
||||||
message(STATUS "AES support not available on s390x")
|
message(STATUS "AES support not available on s390x")
|
||||||
elseif(RISCV)
|
|
||||||
message(STATUS "AES support not available on RISC-V")
|
|
||||||
elseif(ARM6)
|
elseif(ARM6)
|
||||||
message(STATUS "AES support not available on ARMv6")
|
message(STATUS "AES support not available on ARMv6")
|
||||||
elseif(ARM7)
|
elseif(ARM7)
|
||||||
@@ -778,8 +599,8 @@ else()
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAG}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAG}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}")
|
||||||
|
|
||||||
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
|
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
if(ARM)
|
if(ARM)
|
||||||
set(WARNINGS "${WARNINGS} -Wno-error=inline-asm")
|
set(WARNINGS "${WARNINGS} -Wno-error=inline-asm")
|
||||||
endif()
|
endif()
|
||||||
@@ -795,26 +616,32 @@ else()
|
|||||||
set(USE_LTO_DEFAULT false)
|
set(USE_LTO_DEFAULT false)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,10485760")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,10485760")
|
||||||
if(NOT BUILD_64)
|
if(NOT BUILD_64)
|
||||||
add_definitions(-DWINVER=0x0600 -D_WIN32_WINNT=0x0600)
|
add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wold-style-definition -Wstrict-prototypes")
|
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wold-style-definition -Wstrict-prototypes")
|
||||||
set(CXX_WARNINGS "-Wno-reorder -Wno-missing-field-initializers")
|
set(CXX_WARNINGS "-Wno-reorder -Wno-missing-field-initializers")
|
||||||
try_compile(STATIC_ASSERT_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/test-static-assert.c" CMAKE_FLAGS -DCMAKE_C_STANDARD=11)
|
try_compile(STATIC_ASSERT_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/test-static-assert.c" COMPILE_DEFINITIONS "-std=c11")
|
||||||
if(STATIC_ASSERT_RES)
|
if(STATIC_ASSERT_RES)
|
||||||
set(STATIC_ASSERT_FLAG "")
|
set(STATIC_ASSERT_FLAG "")
|
||||||
else()
|
else()
|
||||||
set(STATIC_ASSERT_FLAG "-Dstatic_assert=_Static_assert")
|
set(STATIC_ASSERT_FLAG "-Dstatic_assert=_Static_assert")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
try_compile(STATIC_ASSERT_CPP_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/test-static-assert.cpp" CMAKE_FLAGS -DCMAKE_CXX_STANDARD=11)
|
try_compile(STATIC_ASSERT_CPP_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/test-static-assert.cpp" COMPILE_DEFINITIONS "-std=c++11")
|
||||||
if(STATIC_ASSERT_CPP_RES)
|
if(STATIC_ASSERT_CPP_RES)
|
||||||
set(STATIC_ASSERT_CPP_FLAG "")
|
set(STATIC_ASSERT_CPP_FLAG "")
|
||||||
else()
|
else()
|
||||||
set(STATIC_ASSERT_CPP_FLAG "-Dstatic_assert=_Static_assert")
|
set(STATIC_ASSERT_CPP_FLAG "-Dstatic_assert=_Static_assert")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
monero_enable_coverage()
|
option(COVERAGE "Enable profiling for test coverage report" 0)
|
||||||
|
|
||||||
|
if(COVERAGE)
|
||||||
|
message(STATUS "Building with profiling for test coverage report")
|
||||||
|
set(COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage --coverage")
|
||||||
|
endif()
|
||||||
|
|
||||||
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
||||||
# is fixed in the code (Issue #847), force compiler to be conservative.
|
# is fixed in the code (Issue #847), force compiler to be conservative.
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing")
|
||||||
@@ -857,16 +684,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# linker
|
# linker
|
||||||
if (NOT SANITIZE AND NOT OSSFUZZ AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND (CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1 OR NOT STATIC))))
|
if (NOT SANITIZE AND NOT OSSFUZZ AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)))
|
||||||
# PIE executables randomly crash at startup with ASAN
|
# PIE executables randomly crash at startup with ASAN
|
||||||
# Windows binaries die on startup with PIE when compiled with GCC <9.x
|
# Windows binaries die on startup with PIE when compiled with GCC <9.x
|
||||||
# Windows dynamically-linked binaries die on startup with PIE regardless of GCC version
|
add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
|
||||||
# Clang does not support -pie flag
|
|
||||||
add_linker_flag_if_supported("-Wl,-pie" LD_SECURITY_FLAGS)
|
|
||||||
else()
|
|
||||||
add_linker_flag_if_supported("-pie" LD_SECURITY_FLAGS)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS)
|
add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS)
|
||||||
add_linker_flag_if_supported(-Wl,-z,now LD_SECURITY_FLAGS)
|
add_linker_flag_if_supported(-Wl,-z,now LD_SECURITY_FLAGS)
|
||||||
@@ -892,19 +713,12 @@ else()
|
|||||||
add_linker_flag_if_supported(-Wl,--high-entropy-va LD_SECURITY_FLAGS)
|
add_linker_flag_if_supported(-Wl,--high-entropy-va LD_SECURITY_FLAGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Warnings, that when ignored are so severe, that they can segfault or even UB any application.
|
|
||||||
# Treat them as errors.
|
|
||||||
add_c_flag_if_supported( -Werror=switch C_SECURITY_FLAGS)
|
|
||||||
add_cxx_flag_if_supported(-Werror=switch CXX_SECURITY_FLAGS)
|
|
||||||
add_c_flag_if_supported( -Werror=return-type C_SECURITY_FLAGS)
|
|
||||||
add_cxx_flag_if_supported(-Werror=return-type CXX_SECURITY_FLAGS)
|
|
||||||
|
|
||||||
message(STATUS "Using C security hardening flags: ${C_SECURITY_FLAGS}")
|
message(STATUS "Using C security hardening flags: ${C_SECURITY_FLAGS}")
|
||||||
message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
|
message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
|
||||||
message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
|
message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${COVERAGE_FLAGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${COVERAGE_FLAGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${LD_BACKCOMPAT_FLAGS}")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${LD_BACKCOMPAT_FLAGS}")
|
||||||
|
|
||||||
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
||||||
@@ -1008,6 +822,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(DEBUG_FLAGS "-g3")
|
set(DEBUG_FLAGS "-g3")
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8))
|
||||||
|
set(DEBUG_FLAGS "${DEBUG_FLAGS} -Og ")
|
||||||
|
else()
|
||||||
|
set(DEBUG_FLAGS "${DEBUG_FLAGS} -O0 ")
|
||||||
|
endif()
|
||||||
|
|
||||||
# At least some CLANGs default to not enough for monero
|
# At least some CLANGs default to not enough for monero
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=900")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=900")
|
||||||
@@ -1017,7 +836,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
set(USE_LTO ${USE_LTO_DEFAULT} CACHE BOOL "Use Link-Time Optimization (Release mode only)")
|
set(USE_LTO ${USE_LTO_DEFAULT} CACHE BOOL "Use Link-Time Optimization (Release mode only)")
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
# There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled, so explicitly disable
|
# There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled, so explicitly disable
|
||||||
set(USE_LTO false)
|
set(USE_LTO false)
|
||||||
endif()
|
endif()
|
||||||
@@ -1076,39 +895,26 @@ if(STATIC)
|
|||||||
set(Boost_USE_STATIC_LIBS ON)
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
set(Boost_USE_STATIC_RUNTIME ON)
|
set(Boost_USE_STATIC_RUNTIME ON)
|
||||||
endif()
|
endif()
|
||||||
|
find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options locale)
|
||||||
|
|
||||||
# Find Boost headers
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
|
||||||
set(BOOST_MIN_VER 1.62)
|
|
||||||
find_package(Boost ${BOOST_MIN_VER} QUIET REQUIRED)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
if(NOT Boost_FOUND)
|
||||||
die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=${BOOST_MIN_VER}) or the equivalent")
|
die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=1.58) or the equivalent")
|
||||||
elseif(Boost_FOUND)
|
elseif(Boost_FOUND)
|
||||||
message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}")
|
message(STATUS "Found Boost Version: ${Boost_VERSION}")
|
||||||
|
if (Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 1.62.0 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1))
|
||||||
set(BOOST_COMPONENTS filesystem thread date_time chrono serialization program_options locale)
|
set(BOOST_BEFORE_1_62 true)
|
||||||
|
|
||||||
# Boost System is header-only since 1.69
|
|
||||||
if (Boost_VERSION_STRING VERSION_LESS 1.69.0)
|
|
||||||
list(APPEND BOOST_COMPONENTS system)
|
|
||||||
endif()
|
endif()
|
||||||
|
if (NOT Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 106200 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1))
|
||||||
# Boost Regex is header-only since 1.77
|
set(BOOST_BEFORE_1_62 true)
|
||||||
if (Boost_VERSION_STRING VERSION_LESS 1.77.0)
|
endif()
|
||||||
list(APPEND BOOST_COMPONENTS regex)
|
if (BOOST_BEFORE_1_62)
|
||||||
|
message(FATAL_ERROR "Boost ${Boost_VERSION} (older than 1.62) is too old to link with OpenSSL ${OPENSSL_VERSION} (1.1 or newer) found at ${OPENSSL_INCLUDE_DIR} and ${OPENSSL_LIBRARIES}. "
|
||||||
|
"Update Boost or install OpenSSL 1.0 and set path to it when running cmake: "
|
||||||
|
"cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0'")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Boost components: ${BOOST_COMPONENTS}")
|
|
||||||
|
|
||||||
# Find required Boost libraries
|
|
||||||
find_package(Boost ${BOOST_MIN_VER} QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DBOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
|
|
||||||
add_definitions(-DBOOST_NO_AUTO_PTR)
|
|
||||||
add_definitions(-DBOOST_UUID_DISABLE_ALIGNMENT) # This restores UUID's std::has_unique_object_representations property
|
|
||||||
|
|
||||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
||||||
@@ -1137,12 +943,10 @@ list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
|
|||||||
if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
|
if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
if(DEPENDS)
|
if(DEPENDS)
|
||||||
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework AppKit -framework IOKit")
|
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
|
||||||
else()
|
else()
|
||||||
find_library(COREFOUNDATION CoreFoundation)
|
find_library(COREFOUNDATION CoreFoundation)
|
||||||
find_library(APPKIT AppKit)
|
|
||||||
find_library(IOKIT IOKit)
|
find_library(IOKIT IOKit)
|
||||||
list(APPEND EXTRA_LIBRARIES ${APPKIT})
|
|
||||||
list(APPEND EXTRA_LIBRARIES ${IOKIT})
|
list(APPEND EXTRA_LIBRARIES ${IOKIT})
|
||||||
list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
|
list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
|
||||||
endif()
|
endif()
|
||||||
@@ -1177,7 +981,7 @@ if(ANDROID)
|
|||||||
set(ATOMIC libatomic.a)
|
set(ATOMIC libatomic.a)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=user-defined-warnings")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=user-defined-warnings")
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND NOT FREEBSD)
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND NOT FREEBSD)
|
||||||
find_library(ATOMIC atomic)
|
find_library(ATOMIC atomic)
|
||||||
if (ATOMIC_FOUND)
|
if (ATOMIC_FOUND)
|
||||||
list(APPEND EXTRA_LIBRARIES ${ATOMIC})
|
list(APPEND EXTRA_LIBRARIES ${ATOMIC})
|
||||||
@@ -1191,9 +995,6 @@ find_library(NORM_LIBRARY norm)
|
|||||||
find_library(GSSAPI_LIBRARY gssapi_krb5)
|
find_library(GSSAPI_LIBRARY gssapi_krb5)
|
||||||
find_library(PROTOLIB_LIBRARY protolib)
|
find_library(PROTOLIB_LIBRARY protolib)
|
||||||
find_library(SODIUM_LIBRARY sodium)
|
find_library(SODIUM_LIBRARY sodium)
|
||||||
find_library(BSD_LIBRARY bsd)
|
|
||||||
find_library(MD_LIBRARY md)
|
|
||||||
find_library(PROTOKIT_LIBRARY protokit)
|
|
||||||
|
|
||||||
if(NOT ZMQ_INCLUDE_PATH)
|
if(NOT ZMQ_INCLUDE_PATH)
|
||||||
message(FATAL_ERROR "Could not find required header zmq.h")
|
message(FATAL_ERROR "Could not find required header zmq.h")
|
||||||
@@ -1201,7 +1002,6 @@ endif()
|
|||||||
if(NOT ZMQ_LIB)
|
if(NOT ZMQ_LIB)
|
||||||
message(FATAL_ERROR "Could not find required libzmq")
|
message(FATAL_ERROR "Could not find required libzmq")
|
||||||
endif()
|
endif()
|
||||||
include_directories(${ZMQ_INCLUDE_PATH})
|
|
||||||
if(PGM_LIBRARY)
|
if(PGM_LIBRARY)
|
||||||
set(ZMQ_LIB "${ZMQ_LIB};${PGM_LIBRARY}")
|
set(ZMQ_LIB "${ZMQ_LIB};${PGM_LIBRARY}")
|
||||||
endif()
|
endif()
|
||||||
@@ -1215,24 +1015,7 @@ if(PROTOLIB_LIBRARY)
|
|||||||
set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}")
|
set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}")
|
||||||
endif()
|
endif()
|
||||||
if(SODIUM_LIBRARY)
|
if(SODIUM_LIBRARY)
|
||||||
message(STATUS "ZMQ_LIB: ${ZMQ_LIB};${SODIUM_LIBRARY}")
|
|
||||||
set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
|
set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
|
||||||
find_path(SODIUM_INCLUDE_PATH sodium/crypto_verify_32.h)
|
|
||||||
if (SODIUM_INCLUDE_PATH)
|
|
||||||
message(STATUS "SODIUM_INCLUDE_PATH: ${SODIUM_INCLUDE_PATH}")
|
|
||||||
include_directories(${SODIUM_INCLUDE_PATH})
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Could not find required sodium/crypto_verify_32.h")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if(BSD_LIBRARY)
|
|
||||||
set(ZMQ_LIB "${ZMQ_LIB};${BSD_LIBRARY}")
|
|
||||||
endif()
|
|
||||||
if(MD_LIBRARY)
|
|
||||||
set(ZMQ_LIB "${ZMQ_LIB};${MD_LIBRARY}")
|
|
||||||
endif()
|
|
||||||
if(PROTOKIT_LIBRARY)
|
|
||||||
set(ZMQ_LIB "${ZMQ_LIB};${PROTOKIT_LIBRARY}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
|
include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
|
||||||
@@ -1278,6 +1061,13 @@ endif()
|
|||||||
# when ON - will install libwallet_merged into "lib"
|
# when ON - will install libwallet_merged into "lib"
|
||||||
option(BUILD_GUI_DEPS "Build GUI dependencies." OFF)
|
option(BUILD_GUI_DEPS "Build GUI dependencies." OFF)
|
||||||
|
|
||||||
|
# This is not nice, distribution packagers should not enable this, but depend
|
||||||
|
# on libunbound shipped with their distribution instead
|
||||||
|
option(INSTALL_VENDORED_LIBUNBOUND "Install libunbound binary built from source vendored with this repo." OFF)
|
||||||
|
|
||||||
|
|
||||||
|
CHECK_C_COMPILER_FLAG(-std=c11 HAVE_C11)
|
||||||
|
|
||||||
find_package(PythonInterp)
|
find_package(PythonInterp)
|
||||||
find_program(iwyu_tool_path NAMES iwyu_tool.py iwyu_tool)
|
find_program(iwyu_tool_path NAMES iwyu_tool.py iwyu_tool)
|
||||||
if (iwyu_tool_path AND PYTHONINTERP_FOUND)
|
if (iwyu_tool_path AND PYTHONINTERP_FOUND)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Portions Copyright (c) 2017-2022, The Monero Project
|
# Portions Copyright (c) 2017-2020, The Monero Project
|
||||||
# This file is based off of the https://code.google.com/archive/p/ios-cmake/
|
# This file is based off of the https://code.google.com/archive/p/ios-cmake/
|
||||||
# It has been altered for Monero iOS development
|
# It has been altered for Monero iOS development
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ of software solid and usable.
|
|||||||
* If modifying code for which Doxygen headers exist, that header must be modified to match.
|
* If modifying code for which Doxygen headers exist, that header must be modified to match.
|
||||||
* Tests would be nice to have if you're adding functionality.
|
* Tests would be nice to have if you're adding functionality.
|
||||||
|
|
||||||
Patches are preferably to be sent via a GitHub pull request. If that
|
Patches are preferably to be sent via a Github pull request. If that
|
||||||
can't be done, patches in "git format-patch" format can be sent
|
can't be done, patches in "git format-patch" format can be sent
|
||||||
(eg, posted to fpaste.org with a long enough timeout and a link
|
(eg, posted to fpaste.org with a long enough timeout and a link
|
||||||
posted to #monero-dev on irc.libera.chat).
|
posted to #monero-dev on irc.freenode.net).
|
||||||
|
|
||||||
Patches should be self contained. A good rule of thumb is to have
|
Patches should be self contained. A good rule of thumb is to have
|
||||||
one patch per separate issue, feature, or logical change. Also, no
|
one patch per separate issue, feature, or logical change. Also, no
|
||||||
other changes, such as random whitespace changes, reindentation,
|
other changes, such as random whitespace changes, reindentation,
|
||||||
or fixing typos, spelling, or wording, unless user visible.
|
or fixing typoes, spelling, or wording, unless user visible.
|
||||||
Following the code style of the particular chunk of code you're
|
Following the code style of the particular chunk of code you're
|
||||||
modifying is encouraged. Proper squashing should be done (eg, if
|
modifying is encouraged. Proper squashing should be done (eg, if
|
||||||
you're making a buggy patch, then a later patch to fix the bug,
|
you're making a buggy patch, then a later patch to fix the bug,
|
||||||
@@ -43,7 +43,7 @@ Commit messages should be sensible. That means a subject line that
|
|||||||
describes the patch, with an optional longer body that gives details,
|
describes the patch, with an optional longer body that gives details,
|
||||||
documentation, etc.
|
documentation, etc.
|
||||||
|
|
||||||
When submitting a pull request on GitHub, make sure your branch is
|
When submitting a pull request on Github, make sure your branch is
|
||||||
rebased. No merge commits nor stray commits from other people in
|
rebased. No merge commits nor stray commits from other people in
|
||||||
your submitted branch, please. You may be asked to rebase if there
|
your submitted branch, please. You may be asked to rebase if there
|
||||||
are conflicts (even trivially resolvable ones).
|
are conflicts (even trivially resolvable ones).
|
||||||
@@ -56,7 +56,7 @@ the previous paragraph is here.
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright (c) 2009-2015 Pieter Hintjens.
|
Copyright (c) 2009-2015 Pieter Hintjens.
|
||||||
Copyright (c) 2017-2022, The Monero Project
|
Copyright (c) 2017-2018 The Monero Project.
|
||||||
|
|
||||||
This Specification is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
|
This Specification is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
259
Dockerfile
259
Dockerfile
@@ -1,66 +1,223 @@
|
|||||||
# Multistage docker build, requires docker 17.05
|
ARG DEBIAN_VERSION="${DEBIAN_VERSION:-stable-slim}"
|
||||||
|
FROM debian:${DEBIAN_VERSION} as git-wow
|
||||||
|
|
||||||
# builder stage
|
WORKDIR /data
|
||||||
FROM ubuntu:20.04 as builder
|
|
||||||
|
|
||||||
RUN set -ex && \
|
#Cmake
|
||||||
apt-get update && \
|
ARG CMAKE_VERSION=3.14.6
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install \
|
ARG CMAKE_VERSION_DOT=v3.14
|
||||||
automake \
|
ARG CMAKE_HASH=4e8ea11cabe459308671b476469eace1622e770317a15951d7b55a82ccaaccb9
|
||||||
autotools-dev \
|
## Boost
|
||||||
bsdmainutils \
|
ARG BOOST_VERSION=1_70_0
|
||||||
build-essential \
|
ARG BOOST_VERSION_DOT=1.70.0
|
||||||
|
ARG BOOST_HASH=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
|
||||||
|
|
||||||
|
ENV CFLAGS='-fPIC -O2 -g'
|
||||||
|
ENV CXXFLAGS='-fPIC -O2 -g'
|
||||||
|
ENV LDFLAGS='-static-libstdc++'
|
||||||
|
|
||||||
|
ENV BASE_DIR /usr/local
|
||||||
|
|
||||||
|
RUN apt-get update -qq && apt-get --no-install-recommends -yqq install \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
ccache \
|
g++ \
|
||||||
cmake \
|
make \
|
||||||
curl \
|
|
||||||
git \
|
|
||||||
libtool \
|
|
||||||
pkg-config \
|
pkg-config \
|
||||||
gperf
|
git \
|
||||||
|
curl \
|
||||||
|
libtool-bin \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
bzip2 \
|
||||||
|
xsltproc \
|
||||||
|
gperf \
|
||||||
|
unzip > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& echo "\e[32mbuilding: Cmake\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& curl -s -O https://cmake.org/files/${CMAKE_VERSION_DOT}/cmake-${CMAKE_VERSION}.tar.gz > /dev/null \
|
||||||
|
&& echo "${CMAKE_HASH} cmake-${CMAKE_VERSION}.tar.gz" | sha256sum -c \
|
||||||
|
&& tar -xzf cmake-${CMAKE_VERSION}.tar.gz > /dev/null \
|
||||||
|
&& cd cmake-${CMAKE_VERSION} || exit 1 \
|
||||||
|
&& echo "\e[32mmatrix style build text redirected to /dev/null. This will take some time. Go ahead make some coffee and check your emails.\e[39m" \
|
||||||
|
&& ./configure --prefix=$BASE_DIR > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/cmake-${CMAKE_VERSION} \
|
||||||
|
&& rm -rf /data/cmake-${CMAKE_VERSION}.tar.gz \
|
||||||
|
&& echo "\e[32mbuilding: Boost\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 > /dev/null \
|
||||||
|
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
|
||||||
|
&& tar -xvf boost_${BOOST_VERSION}.tar.bz2 > /dev/null \
|
||||||
|
&& cd boost_${BOOST_VERSION} || exit 1 \
|
||||||
|
&& ./bootstrap.sh > /dev/null \
|
||||||
|
&& ./b2 -a install --prefix=$BASE_DIR --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale threading=multi threadapi=pthread cflags="$CFLAGS" cxxflags="$CXXFLAGS" stage > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/boost_${BOOST_VERSION} \
|
||||||
|
&& rm -rf /data/boost_${BOOST_VERSION}.tar.bz2
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /data
|
||||||
COPY . .
|
ENV BASE_DIR /usr/local
|
||||||
|
|
||||||
ARG NPROC
|
# OpenSSL
|
||||||
RUN set -ex && \
|
ARG OPENSSL_VERSION=1.1.1
|
||||||
git submodule init && git submodule update && \
|
ARG OPENSSL_FIX=g
|
||||||
rm -rf build && \
|
ARG OPENSSL_HASH=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
|
||||||
if [ -z "$NPROC" ] ; \
|
# ZMQ
|
||||||
then make -j$(nproc) depends target=x86_64-linux-gnu ; \
|
ARG ZMQ_VERSION=v4.3.2
|
||||||
else make -j$NPROC depends target=x86_64-linux-gnu ; \
|
ARG ZMQ_HASH=a84ffa12b2eb3569ced199660bac5ad128bff1f0
|
||||||
fi
|
# zmq.hpp
|
||||||
|
ARG CPPZMQ_VERSION=v4.4.1
|
||||||
|
ARG CPPZMQ_HASH=f5b36e563598d48fcc0d82e589d3596afef945ae
|
||||||
|
# Readline
|
||||||
|
ARG READLINE_VERSION=8.0
|
||||||
|
ARG READLINE_HASH=e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461
|
||||||
|
# Sodium
|
||||||
|
ARG SODIUM_VERSION=1.0.18
|
||||||
|
ARG SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677
|
||||||
|
|
||||||
# runtime stage
|
ENV CFLAGS='-fPIC -O2 -g'
|
||||||
FROM ubuntu:20.04
|
ENV CXXFLAGS='-fPIC -O2 -g'
|
||||||
|
ENV LDFLAGS='-static-libstdc++'
|
||||||
|
|
||||||
RUN set -ex && \
|
RUN echo "\e[32mbuilding: Openssl\e[39m" \
|
||||||
apt-get update && \
|
&& set -ex \
|
||||||
apt-get --no-install-recommends --yes install ca-certificates && \
|
&& curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}${OPENSSL_FIX}.tar.gz > /dev/null \
|
||||||
apt-get clean && \
|
# && curl -s -O https://www.openssl.org/source/old/${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}${OPENSSL_FIX}.tar.gz > /dev/null \
|
||||||
rm -rf /var/lib/apt
|
&& echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}${OPENSSL_FIX}.tar.gz" | sha256sum -c \
|
||||||
COPY --from=builder /src/build/x86_64-linux-gnu/release/bin /usr/local/bin/
|
&& tar -xzf openssl-${OPENSSL_VERSION}${OPENSSL_FIX}.tar.gz > /dev/null \
|
||||||
|
&& cd openssl-${OPENSSL_VERSION}${OPENSSL_FIX} || exit 1 \
|
||||||
|
&& ./Configure --prefix=$BASE_DIR linux-x86_64 no-shared --static "$CFLAGS" > /dev/null \
|
||||||
|
&& make build_generated > /dev/null \
|
||||||
|
&& make libcrypto.a > /dev/null \
|
||||||
|
&& echo "\e[32mblah, blah, shared libraries from the glib, something, something. Don't worry about it.\e[39m" \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/openssl-${OPENSSL_VERSION}${OPENSSL_FIX} \
|
||||||
|
&& rm -rf /data/openssl-${OPENSSL_VERSION}${OPENSSL_FIX}.tar.gz \
|
||||||
|
&& echo "\e[32mbuilding: ZMQ\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& git clone --branch ${ZMQ_VERSION} --single-branch --depth 1 https://github.com/zeromq/libzmq.git > /dev/null \
|
||||||
|
&& cd libzmq || exit 1 \
|
||||||
|
&& test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \
|
||||||
|
&& ./autogen.sh > /dev/null \
|
||||||
|
&& ./configure --prefix=$BASE_DIR --enable-libunwind=no --enable-static --disable-shared > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& ldconfig > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/libzmq \
|
||||||
|
&& echo "\e[32mbuilding: zmq.hpp\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& git clone --branch ${CPPZMQ_VERSION} --single-branch --depth 1 https://github.com/zeromq/cppzmq.git > /dev/null \
|
||||||
|
&& cd cppzmq || exit 1 \
|
||||||
|
&& test `git rev-parse HEAD` = ${CPPZMQ_HASH} || exit 1 \
|
||||||
|
&& mv *.hpp $BASE_DIR/include \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/cppzmq \
|
||||||
|
&& echo "\e[32mbuilding: Readline\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& curl -s -O https://ftp.gnu.org/gnu/readline/readline-${READLINE_VERSION}.tar.gz > /dev/null \
|
||||||
|
&& echo "${READLINE_HASH} readline-${READLINE_VERSION}.tar.gz" | sha256sum -c \
|
||||||
|
&& tar -xzf readline-${READLINE_VERSION}.tar.gz > /dev/null \
|
||||||
|
&& cd readline-${READLINE_VERSION} || exit 1 \
|
||||||
|
&& ./configure --prefix=$BASE_DIR > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/readline-${READLINE_VERSION} \
|
||||||
|
&& rm -rf readline-${READLINE_VERSION}.tar.gz \
|
||||||
|
&& echo "\e[32mbuilding: Sodium\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& git clone --branch ${SODIUM_VERSION} --single-branch --depth 1 https://github.com/jedisct1/libsodium.git > /dev/null \
|
||||||
|
&& cd libsodium || exit 1 \
|
||||||
|
&& test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \
|
||||||
|
&& ./autogen.sh \
|
||||||
|
&& ./configure --prefix=$BASE_DIR > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make check > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/libsodium
|
||||||
|
|
||||||
# Create wownero user
|
WORKDIR /data
|
||||||
RUN adduser --system --group --disabled-password wownero && \
|
ENV BASE_DIR /usr/local
|
||||||
mkdir -p /wallet /home/wownero/.wownero && \
|
|
||||||
chown -R wownero:wownero /home/wownero/.wownero && \
|
|
||||||
chown -R wownero:wownero /wallet
|
|
||||||
|
|
||||||
# Contains the blockchain
|
# Udev
|
||||||
VOLUME /home/wownero/.wownero
|
ARG UDEV_VERSION=v3.2.8
|
||||||
|
ARG UDEV_HASH=d69f3f28348123ab7fa0ebac63ec2fd16800c5e0
|
||||||
|
# Libusb
|
||||||
|
ARG USB_VERSION=v1.0.22
|
||||||
|
ARG USB_HASH=0034b2afdcdb1614e78edaa2a9e22d5936aeae5d
|
||||||
|
# Hidapi
|
||||||
|
ARG HIDAPI_VERSION=hidapi-0.8.0-rc1
|
||||||
|
ARG HIDAPI_HASH=40cf516139b5b61e30d9403a48db23d8f915f52c
|
||||||
|
# Protobuf
|
||||||
|
ARG PROTOBUF_VERSION=v3.7.1
|
||||||
|
ARG PROTOBUF_HASH=6973c3a5041636c1d8dc5f7f6c8c1f3c15bc63d6
|
||||||
|
|
||||||
# Generate your wallet via accessing the container and run:
|
ENV CFLAGS='-fPIC -O2 -g'
|
||||||
# cd /wallet
|
ENV CXXFLAGS='-fPIC -O2 -g'
|
||||||
# wownero-wallet-cli
|
ENV LDFLAGS='-static-libstdc++'
|
||||||
VOLUME /wallet
|
|
||||||
|
|
||||||
|
RUN echo "\e[32mbuilding: Udev\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& git clone --branch ${UDEV_VERSION} --single-branch --depth 1 https://github.com/gentoo/eudev > /dev/null \
|
||||||
|
&& cd eudev || exit 1 \
|
||||||
|
&& test `git rev-parse HEAD` = ${UDEV_HASH} || exit 1 \
|
||||||
|
&& ./autogen.sh \
|
||||||
|
&& ./configure --prefix=$BASE_DIR --disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/eudev \
|
||||||
|
&& echo "\e[32mbuilding: Libusb. Ahh, a dependency that shouldn't have been included in the codebase. Hardware wallets are way overrated.\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& git clone --branch ${USB_VERSION} --single-branch --depth 1 https://github.com/libusb/libusb.git > /dev/null \
|
||||||
|
&& cd libusb || exit 1 \
|
||||||
|
&& test `git rev-parse HEAD` = ${USB_HASH} || exit 1 \
|
||||||
|
&& ./autogen.sh > /dev/null \
|
||||||
|
&& ./configure --prefix=$BASE_DIR --disable-shared > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/libusb \
|
||||||
|
&& echo "\e[32mbuilding: Hidapi\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& git clone --branch ${HIDAPI_VERSION} --single-branch --depth 1 https://github.com/signal11/hidapi > /dev/null \
|
||||||
|
&& cd hidapi || exit 1 \
|
||||||
|
&& test `git rev-parse HEAD` = ${HIDAPI_HASH} || exit 1 \
|
||||||
|
&& ./bootstrap \
|
||||||
|
&& ./configure --prefix=$BASE_DIR --enable-static --disable-shared > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/hidapi \
|
||||||
|
&& echo "\e[32mbuilding: Protobuf <- fuck you protobuf, you worthless piece of shit!\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
|
&& git clone --branch ${PROTOBUF_VERSION} --single-branch --depth 1 https://github.com/protocolbuffers/protobuf > /dev/null \
|
||||||
|
&& cd protobuf || exit 1 \
|
||||||
|
&& test `git rev-parse HEAD` = ${PROTOBUF_HASH} || exit 1 \
|
||||||
|
&& git submodule update --init --recursive > /dev/null \
|
||||||
|
&& ./autogen.sh > /dev/null \
|
||||||
|
&& ./configure --prefix=$BASE_DIR --enable-static --disable-shared > /dev/null \
|
||||||
|
&& make > /dev/null \
|
||||||
|
&& make install > /dev/null \
|
||||||
|
&& ldconfig \
|
||||||
|
&& cd /data || exit 1 \
|
||||||
|
&& rm -rf /data/protobuf
|
||||||
|
|
||||||
|
WORKDIR /home
|
||||||
|
ENV USE_SINGLE_BUILDDIR=1
|
||||||
EXPOSE 34567
|
EXPOSE 34567
|
||||||
EXPOSE 34568
|
EXPOSE 34568
|
||||||
|
|
||||||
# switch to user wownero
|
# Wownero
|
||||||
USER wownero
|
RUN echo "\e[32mbuilding: Wownero\e[39m" \
|
||||||
|
&& set -ex \
|
||||||
ENTRYPOINT ["wownerod"]
|
&& git clone https://git.wownero.com/wownero/wownero \
|
||||||
CMD ["--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=34567", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=34568", "--non-interactive", "--confirm-external-bind"]
|
&& cd wownero \
|
||||||
|
&& make -j2 release-static-linux-x86_64 \
|
||||||
|
&& echo "\e[32mdone building Wownero, binaries located in: /home/wownero/build/release/bin\e[39m"
|
||||||
|
|||||||
10
Doxyfile
10
Doxyfile
@@ -68,7 +68,7 @@ OUTPUT_DIRECTORY = doc
|
|||||||
# performance problems for the file system.
|
# performance problems for the file system.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
CREATE_SUBDIRS = YES
|
CREATE_SUBDIRS = NO
|
||||||
|
|
||||||
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
|
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
|
||||||
# characters to appear in the names of generated files. If set to NO, non-ASCII
|
# characters to appear in the names of generated files. If set to NO, non-ASCII
|
||||||
@@ -452,7 +452,7 @@ EXTRACT_LOCAL_METHODS = NO
|
|||||||
# are hidden.
|
# are hidden.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
EXTRACT_ANON_NSPACES = NO
|
EXTRACT_ANON_NSPACES = YES
|
||||||
|
|
||||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||||
# undocumented members inside documented classes or files. If set to NO these
|
# undocumented members inside documented classes or files. If set to NO these
|
||||||
@@ -754,7 +754,7 @@ WARN_LOGFILE =
|
|||||||
# spaces.
|
# spaces.
|
||||||
# Note: If this tag is empty the current directory is searched.
|
# Note: If this tag is empty the current directory is searched.
|
||||||
|
|
||||||
INPUT = .
|
INPUT = src
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
@@ -805,7 +805,7 @@ EXCLUDE_SYMLINKS = NO
|
|||||||
# Note that the wildcards are matched against the file with absolute path, so to
|
# Note that the wildcards are matched against the file with absolute path, so to
|
||||||
# exclude all test directories for example use the pattern */test/*
|
# exclude all test directories for example use the pattern */test/*
|
||||||
|
|
||||||
EXCLUDE_PATTERNS = */build/* */contrib/depends/*
|
EXCLUDE_PATTERNS =
|
||||||
|
|
||||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||||
@@ -1552,7 +1552,7 @@ EXTRA_SEARCH_MAPPINGS =
|
|||||||
# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
|
# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
|
||||||
# The default value is: YES.
|
# The default value is: YES.
|
||||||
|
|
||||||
GENERATE_LATEX = NO
|
GENERATE_LATEX = YES
|
||||||
|
|
||||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
|
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
|
||||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Levin Protocol
|
# Levin Protocol
|
||||||
This is a document explaining the current design of the Levin protocol, as
|
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
|
used by Monero. The protocol is largely inherited from cryptonote, but has
|
||||||
undergone some changes.
|
undergone some changes.
|
||||||
|
|
||||||
@@ -9,8 +9,8 @@ extensibility.
|
|||||||
|
|
||||||
One of the goals of this document is to clearly indicate what is being sent
|
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.
|
"on the wire" to identify metadata that could de-anonymize users over I2P/Tor.
|
||||||
These issues will be addressed as they are found. See `ANONYMITY_NETWORKS.md` in
|
These issues will be addressed as they are found. See `ANONMITY_NETWORKS.md` in
|
||||||
the `docs` folder for any outstanding issues.
|
the top-level folder for any outstanding issues.
|
||||||
|
|
||||||
> This document does not currently list all data being sent by the monero
|
> 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
|
> protocol, that portion is a work-in-progress. Please take the time to do it
|
||||||
@@ -75,7 +75,7 @@ An unsigned 32-bit little endian integer representing the Monero specific
|
|||||||
command being invoked.
|
command being invoked.
|
||||||
|
|
||||||
### Return Code
|
### Return Code
|
||||||
A signed 32-bit little endian integer representing the response from the peer
|
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.
|
from the last command that was invoked. This is `0` for request messages.
|
||||||
|
|
||||||
### Flags
|
### Flags
|
||||||
@@ -131,7 +131,7 @@ be zero. The first fragment has the `B` bit set, neither `B` nor `E` is set for
|
|||||||
|
|
||||||
### Dummy
|
### Dummy
|
||||||
Dummy messages have the `B` and `E` bits set, the `Q` and `S` bits unset, and
|
Dummy messages have the `B` and `E` bits set, the `Q` and `S` bits unset, and
|
||||||
the `Expect Response` field zeroed. When a message of this type is received, the
|
the `Expect Reponse` field zeroed. When a message of this type is received, the
|
||||||
contents can be safely ignored.
|
contents can be safely ignored.
|
||||||
|
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ contents can be safely ignored.
|
|||||||
#### (`1005` Request) Network State
|
#### (`1005` Request) Network State
|
||||||
#### (`1005` Response) Network State
|
#### (`1005` Response) Network State
|
||||||
#### (`1006` Request) Peer ID
|
#### (`1006` Request) Peer ID
|
||||||
#### (`1006` Response) Peer ID
|
#### (`1006` Reponse) Peer ID
|
||||||
#### (`1007` Request) Support Flags
|
#### (`1007` Request) Support Flags
|
||||||
#### (`1007` Response) Support Flags
|
#### (`1007` Response) Support Flags
|
||||||
|
|
||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2014-2022, The Monero Project
|
Copyright (c) 2014-2020, The Monero Project
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|||||||
34
Makefile
34
Makefile
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
@@ -48,7 +48,7 @@ all: release-all
|
|||||||
|
|
||||||
depends:
|
depends:
|
||||||
cd contrib/depends && $(MAKE) HOST=$(target) && cd ../.. && mkdir -p build/$(target)/release
|
cd contrib/depends && $(MAKE) HOST=$(target) && cd ../.. && mkdir -p build/$(target)/release
|
||||||
cd build/$(target)/release && USE_DEVICE_TREZOR_MANDATORY=1 cmake -DCMAKE_TOOLCHAIN_FILE=$(CURDIR)/contrib/depends/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
cd build/$(target)/release && cmake -DCMAKE_TOOLCHAIN_FILE=$(CURDIR)/contrib/depends/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
||||||
|
|
||||||
cmake-debug:
|
cmake-debug:
|
||||||
mkdir -p $(builddir)/debug
|
mkdir -p $(builddir)/debug
|
||||||
@@ -73,7 +73,7 @@ debug-test-trezor:
|
|||||||
|
|
||||||
debug-all:
|
debug-all:
|
||||||
mkdir -p $(builddir)/debug
|
mkdir -p $(builddir)/debug
|
||||||
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
|
cd $(builddir)/debug && cmake -D BUILD_TESTS=OFF -D USE_DEVICE_TREZOR=OFF -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
|
||||||
|
|
||||||
debug-static-all:
|
debug-static-all:
|
||||||
mkdir -p $(builddir)/debug
|
mkdir -p $(builddir)/debug
|
||||||
@@ -89,22 +89,22 @@ debug-static-win32:
|
|||||||
|
|
||||||
cmake-release:
|
cmake-release:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D CMAKE_BUILD_TYPE=Release $(topdir)
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=Release $(topdir)
|
||||||
|
|
||||||
release: cmake-release
|
release: cmake-release
|
||||||
cd $(builddir)/release && $(MAKE)
|
cd $(builddir)/release && $(MAKE)
|
||||||
|
|
||||||
release-test:
|
release-test:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE) && $(MAKE) test
|
cd $(builddir)/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE) && $(MAKE) test
|
||||||
|
|
||||||
release-all:
|
release-all:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D USE_DEVICE_TREZOR=OFF -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D USE_DEVICE_TREZOR=OFF -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static:
|
release-static:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D USE_DEVICE_TREZOR=OFF -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D USE_DEVICE_TREZOR=OFF -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE)
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
mkdir -p $(builddir)/debug
|
mkdir -p $(builddir)/debug
|
||||||
@@ -114,45 +114,45 @@ coverage:
|
|||||||
|
|
||||||
release-static-linux-armv6:
|
release-static-linux-armv6:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv6zk" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv6" $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv6zk" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-armv6" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-linux-armv7:
|
release-static-linux-armv7:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv7" $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-armv7" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-android-armv7:
|
release-static-android-armv7:
|
||||||
mkdir -p $(builddir)/release/translations
|
mkdir -p $(builddir)/release/translations
|
||||||
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
|
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
|
||||||
cd $(builddir)/release && CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D ANDROID=true -D BUILD_TAG="android-armv7" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARM_MODE=ON -D CMAKE_ANDROID_ARCH_ABI="armeabi-v7a" ../.. && $(MAKE)
|
cd $(builddir)/release && CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG="android-armv7" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARM_MODE=ON -D CMAKE_ANDROID_ARCH_ABI="armeabi-v7a" ../.. && $(MAKE)
|
||||||
|
|
||||||
release-static-android-armv8:
|
release-static-android-armv8:
|
||||||
mkdir -p $(builddir)/release/translations
|
mkdir -p $(builddir)/release/translations
|
||||||
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
|
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
|
||||||
cd $(builddir)/release && CC=aarch64-linux-android-clang CXX=aarch64-linux-android-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D ANDROID=true -D BUILD_TAG="android-armv8" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" ../.. && $(MAKE)
|
cd $(builddir)/release && CC=aarch64-linux-android-clang CXX=aarch64-linux-android-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG="android-armv8" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" ../.. && $(MAKE)
|
||||||
|
|
||||||
release-static-linux-armv8:
|
release-static-linux-armv8:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-linux-x86_64:
|
release-static-linux-x86_64:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x64" $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D STATIC=ON -D USE_DEVICE_TREZOR=OFF -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-x64" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-freebsd-x86_64:
|
release-static-freebsd-x86_64:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="freebsd-x64" $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D STATIC=ON -D USE_DEVICE_TREZOR=OFF -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="freebsd-x64" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-mac-x86_64:
|
release-static-mac-x86_64:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D STATIC=ON -D USE_DEVICE_TREZOR=OFF -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-linux-i686:
|
release-static-linux-i686:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x86" $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-x86" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-win64:
|
release-static-win64:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) $(topdir) && $(MAKE)
|
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D USE_DEVICE_TREZOR=OFF -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-win32:
|
release-static-win32:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release
|
||||||
|
|||||||
64
PKGBUILD
Normal file
64
PKGBUILD
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# Maintainer: wowario <wowario[at]protonmail[dot]com>
|
||||||
|
|
||||||
|
pkgname=wownero-git
|
||||||
|
pkgver=0.8.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Wownero: a fairly launched privacy-centric meme coin with no premine and a finite supply"
|
||||||
|
license=('BSD')
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://wownero.org/"
|
||||||
|
depends=('boost-libs' 'libunwind' 'openssl' 'readline' 'zeromq' 'pcsclite' 'hidapi' 'protobuf')
|
||||||
|
makedepends=('git' 'cmake' 'boost')
|
||||||
|
source=(
|
||||||
|
"${pkgname}"::"git+https://github.com/wownero/wownero#tag=v${pkgver}"
|
||||||
|
"git+https://github.com/monero-project/unbound.git"
|
||||||
|
"git+https://github.com/monero-project/miniupnp.git"
|
||||||
|
"git+https://github.com/Tencent/rapidjson.git"
|
||||||
|
"git+https://github.com/trezor/trezor-common.git"
|
||||||
|
"git+https://github.com/wownero/RandomWOW.git"
|
||||||
|
"wownero.sysusers"
|
||||||
|
"wownero.tmpfiles")
|
||||||
|
sha512sums=('SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${pkgname}"
|
||||||
|
git submodule init
|
||||||
|
git config submodule.external/unbound.url "$srcdir/unbound"
|
||||||
|
git config submodule.external/miniupnp.url "$srcdir/miniupnp"
|
||||||
|
git config submodule.external/rapidjson.url "$srcdir/rapidjson"
|
||||||
|
git config submodule.external/RandomWOW.url "$srcdir/RandomWOW"
|
||||||
|
git submodule update
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${pkgname}"
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=release -D ARCH=default ../
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
backup=('etc/wownerod.conf')
|
||||||
|
|
||||||
|
cd "${pkgname}"
|
||||||
|
install -Dm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||||
|
|
||||||
|
install -Dm644 "utils/conf/wownerod.conf" "${pkgdir}/etc/wownerod.conf"
|
||||||
|
install -Dm644 "utils/systemd/wownerod.service" "${pkgdir}/usr/lib/systemd/system/wownerod.service"
|
||||||
|
install -Dm644 "../wownero.sysusers" "${pkgdir}/usr/lib/sysusers.d/wownero.conf"
|
||||||
|
install -Dm644 "../wownero.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/wownero.conf"
|
||||||
|
|
||||||
|
install -Dm755 "build/bin/wownero-wallet-cli" \
|
||||||
|
"build/bin/wownero-wallet-rpc" \
|
||||||
|
"build/bin/wownerod" \
|
||||||
|
-t "${pkgdir}/usr/bin"
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: ts=2 sw=2 et:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
Monero daemon internationalization
|
Monero daemon internationalization
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
The Monero command line tools can be translated in various languages. If you wish to contribute and need help/support, contact the [Monero Localization Workgroup on Taiga](https://taiga.getmonero.org/project/erciccione-monero-localization/) or come chat on `#monero-translations` (Libera/IRC, riot/matrix, MatterMost)
|
The Monero command line tools can be translated in various languages. If you wish to contribute and need help/support, contact the [Monero Localization Workgroup on Taiga](https://taiga.getmonero.org/project/erciccione-monero-localization/) or come chat on `#monero-translations` (Freenode/IRC, riot/matrix, MatterMost)
|
||||||
|
|
||||||
In order to use the same translation workflow as the [Monero Core GUI](https://github.com/monero-project/monero-gui), they use Qt Linguist translation files. However, to avoid the dependencies on Qt this normally implies, they use a custom loader to read those files at runtime.
|
In order to use the same translation workflow as the [Monero Core GUI](https://github.com/monero-project/monero-gui), they use Qt Linguist translation files. However, to avoid the dependencies on Qt this normally implies, they use a custom loader to read those files at runtime.
|
||||||
|
|
||||||
158
README.md
158
README.md
@@ -1,54 +1,57 @@
|
|||||||
# ~~Mo~~Wownero - Such privacy! Many coins! Wow!
|
[](https://ci.wownero.com/wownero/wownero)
|
||||||
|
# ~~Mo~~Wownero - Such privacy! Many coins! Wow! 🐕
|
||||||
|
|
||||||
[<img src="https://suchwow.xyz/data/suchwow/image/to23moqn.jpeg">](https://suchwow.xyz/s/oh-really-9eda16b2/item)
|
Copyright (c) 2014-2020 The Monero Project.
|
||||||
|
Portions Copyright (c) 2012-2013 The Cryptonote developers.
|
||||||
## Introduction
|
|
||||||
|
|
||||||
Wownero is a Doge-inspired, CPU-mineable, solo-mining only, privacy-respecting memecoin. It was fairly launched on April Fools' Day in 2018. It is a software fork of Monero, but with a lite version of RandomX, larger ring size, and a fixed supply of 184 million coins emitted over 50 years. Wownero has no trusted setup, premine, or dev tax. Besides betting on online snail racing, the main use case of Wownero is micro-tipping meme creators with sound magic internet money. As a 100% community-driven, free and open source software, Wownero does not depend on billionaire shills or lame ass "influencers."
|
|
||||||
|
|
||||||
Unlike Opposing Projects.
|
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- IRC: [OFTC #wownero](https://webchat.oftc.net/?channels=wownero)
|
- Web: [wownero.org](http://wownero.org)
|
||||||
- Web: [wownero.org](https://wownero.org)
|
|
||||||
- Twitter: [@w0wn3r0](https://twitter.com/w0wn3r0)
|
- Twitter: [@w0wn3r0](https://twitter.com/w0wn3r0)
|
||||||
- Reddit: [/r/wownero](https://www.reddit.com/r/wownero)
|
- Reddit: [/r/wownero](https://www.reddit.com/r/wownero)
|
||||||
- Mail: [wownero@wownero.org](mailto:wownero@wownero.org)
|
- Mail: [wownero@protonmail.com](mailto:wownero@protonmail.com)
|
||||||
- Git: [codeberg.org/wownero/wownero](https://codeberg.org/wownero/wownero)
|
- GitHub: [git.wownero.com/wownero/wownero](https://git.wownero.com/wownero/wownero)
|
||||||
- Discord: [discord.gg/ykZyAzJhDK](https://discord.com/invite/ykZyAzJhDK)
|
- IRC: [#wownero on Freenode](https://kiwiirc.com/client/irc.freenode.net/?nick=suchchatter|?#wownero)
|
||||||
|
- Bitmessage Chan: wownero (`BM-2cSzWtrj2pzLva9GF1Jp2TYsnLjrnJpvba`)
|
||||||
|
- Wownero Funding System: [funding.wownero.com](https://funding.wownero.com)
|
||||||
|
- Wownero Forum: [forum.wownero.com](https://forum.wownero.com)
|
||||||
|
- Discord: [discord.gg/DSC9TWx](https://discord.gg/DSC9TWx)
|
||||||
- Telegram: [t.me/wownero](https://t.me/wownero)
|
- Telegram: [t.me/wownero](https://t.me/wownero)
|
||||||
- Public Node Status: [monero.fail](https://monero.fail/?chain=wownero&network=mainnet)
|
- Feather-WOW Desktop Wallet: [featherwallet.org/wownero](https://featherwallet.org/wownero)
|
||||||
- Wownero Memes: [suchwow.xyz](https://suchwow.xyz/posts/top)
|
- WOW Stash Web Wallet: [wowstash.app](https://wowstash.app)
|
||||||
- Market Info: [coinmarketcap.com](https://coinmarketcap.com/currencies/wownero), [coingecko.com](https://www.coingecko.com/en/coins/wownero/usd)
|
- Public Node Status: [monero.fail](https://monero.fail/?crypto=wownero)
|
||||||
|
|
||||||
## Exchanges
|
### Blockchain Explorers
|
||||||
|
- https://explore.wownero.com
|
||||||
|
- http://wow5eqtzqvsg5jctqzg5g7uk3u62sfqiacj5x6lo4by7bvnj6jkvubyd.onion
|
||||||
|
- https://wownero.club
|
||||||
|
|
||||||
- [NonKYC](https://nonkyc.io/market/WOW_BTC)
|
### Free Public Nodes
|
||||||
- [AltQuick](https://altquick.com/market/Wownero)
|
- global.wownodes.com:34568 (Global)
|
||||||
- [Majestic Bank](https://majesticbank.sc)
|
- node.suchwow.xyz:34568 (US)
|
||||||
- [TradeOgre](https://tradeogre.com/exchange/BTC-WOW)
|
- wow.pwned.systems:34568 (NL)
|
||||||
|
- wowbux.org:34568 (CA)
|
||||||
|
- super.fast.node.xmr.pm:34568 (DE)
|
||||||
|
- wow.pwned.systems (NL)
|
||||||
|
- wowbuxx535x4exuexja2xfezpwcyznxkofui4ndjiectj4yuh2xheiid.onion:34568
|
||||||
|
|
||||||
## Wallets
|
### Tor Peers
|
||||||
|
- wowp2p5gelm6vhl2d5tvfqills63jilgy6hkvlrqljooov5ktaxgqdad.onion
|
||||||
|
- f3moshycuklu3mb3wnlfjwn26nsgzreqtfzfuyjjk46u7jqxlhf7d5id.onion
|
||||||
|
|
||||||
- Wonero CLI Wallet: [codeberg.org/wownero/wownero](https://codeberg.org/wownero/wownero/releases)
|
## Introduction
|
||||||
- Wowlet Desktop Wallet: [codeberg.org/wownero/wowlet](https://codeberg.org/wownero/wowlet/releases)
|
|
||||||
- Stack Wallet iOS & Android Mobile Wallet: [stackwallet.com](https://stackwallet.com)
|
|
||||||
- Cake Wallet [cakewallet.com](https://cakewallet.com)
|
|
||||||
|
|
||||||
## Blockchain Explorers
|
Wownero is a privacy-centric memecoin that was fairly launched on April 1, 2018 with no pre-mine, stealth-mine or ICO. Wownero has a maximum supply of around 184 million WOW with a slow and steady emission over 50 years. It is a fork of Monero, but with its own genesis block, so there is no degradation of privacy due to ring signatures using different participants for the same tx outputs on opposing forks.
|
||||||
|
|
||||||
- https://explorer.suchwow.xyz
|
|
||||||
|
|
||||||
## Supporting the project
|
## Supporting the project
|
||||||
|
|
||||||
Wownero is a 100% community-sponsored endeavor. Supporting services are also graciously provided by sponsors:
|
Wownero is a 100% community-sponsored endeavor. Supporting services are also graciously provided by sponsors:
|
||||||
|
|
||||||
[<img src="https://git.wownero.com/wownero/meta/raw/branch/master/images/macstadium.png"
|
[<img src="https://git.wownero.com/wownero/meta/raw/branch/master/images/macstadium.png"
|
||||||
alt="MacStadium"
|
alt="MacStadium"
|
||||||
height="100">](https://www.macstadium.com)
|
height="100">](https://www.macstadium.com)
|
||||||
|
|
||||||
Developers are volunteers doing this mostly for shits and giggles. If you would like to support our shenanigans and stimulant addictions, please consider donating to the dev slush fund.
|
Developers are volunteers doing this mostly for shits and giggles. If you would like to support our shenanigans and stimulant addictions, please consider donating to [WFS proposals](https://funding.wownero.com/proposals) or the dev slush fund.
|
||||||
|
|
||||||
### Donation Addresses
|
### Donation Addresses
|
||||||
|
|
||||||
@@ -64,37 +67,37 @@ BTC: `bc1qcw9zglp3fxyl25zswemw7jczlqryms2lsmu464`
|
|||||||
|
|
||||||
## Release staging and Contributing
|
## Release staging and Contributing
|
||||||
|
|
||||||
**Anyone is welcome to contribute to Wownero's codebase!**
|
**Anyone is welcome to contribute to Wownero's codebase!**
|
||||||
|
|
||||||
If you have a fix or code change, feel free to submit it as a pull request. Ahead of a scheduled software upgrade, a development branch will be created with the new release version tag. Pull requests that address bugs should be made to Master. Pull requests that require review and testing (generally, optimizations and new features) should be made to the development branch. All pull requests will be considered safe until the US dollar valuation of 1 Wownero equals $1000. After this valuation has been reached, more research will be needed to introduce experimental cryptography and/or code into the codebase.
|
If you have a fix or code change, feel free to submit it as a pull request. Ahead of a scheduled software upgrade, a development branch will be created with the new release version tag. Pull requests that address bugs should be made to Master. Pull requests that require review and testing (generally, optimizations and new features) should be made to the development branch. All pull requests will be considered safe until the US dollar valuation of 1 Wownero equals $1000. After this valuation has been reached, more research will be needed to introduce experimental cryptography and/or code into the codebase.
|
||||||
|
|
||||||
Things to Do, Work in Progress, and Help Wanted tasks are tracked in the [Meta](https://codeberg.org/wownero/meta/issues) repo.
|
Things to Do, Work in Progress, and Help Wanted tasks are tracked in the [Meta](https://git.wownero.com/wownero/meta/issues) repo.
|
||||||
|
|
||||||
Join `#wownero` on IRC OFTC to participate in development conversation.
|
Join `#wownero-dev` on IRC freenode to participate in development conversation.
|
||||||
|
|
||||||
## Scheduled software upgrades
|
## Scheduled software upgrades
|
||||||
|
|
||||||
Wownero uses a fixed-schedule software upgrade (hard fork) mechanism to implement new features. This means that users of Wownero (end users and service providers) should run current versions and upgrade their software on a regular schedule. The required software for these upgrades will be available prior to the scheduled date. Please check the repository prior to this date for the proper Wownero software version. Below is the historical schedule and the projected schedule for the next upgrade.
|
Wownero uses a fixed-schedule software upgrade (hard fork) mechanism to implement new features. This means that users of Wownero (end users and service providers) should run current versions and upgrade their software on a regular schedule. The required software for these upgrades will be available prior to the scheduled date. Please check the repository prior to this date for the proper Wownero software version. Below is the historical schedule and the projected schedule for the next upgrade.
|
||||||
Dates are provided in the format YYYY-MM-DD.
|
Dates are provided in the format YYYY-MM-DD.
|
||||||
|
|
||||||
| Software upgrade block height | Date | Release Name | Minimum Wownero version | Recommended Wownero version | Details |
|
| Software upgrade block height | Date | Release Name | Minimum Wownero version | Recommended Wownero version | Details |
|
||||||
|-------------------------------|------------| ----------------- |-------------------------|-----------------------------| ---------------------------------------------------------------------------------- |
|
| ------------------------------ | -----------| ----------------- | ---------------------- | -------------------------- | ---------------------------------------------------------------------------------- |
|
||||||
| 1 | 2018-04-01 | Awesome Akita | v0.1.0.0 | v0.1.0.0 | Cryptonight variant 1, ringsize >= 8, sorted inputs
|
| 1 | 2018-04-01 | Awesome Akita | v0.1.0.0 | v0.1.0.0 | Cryptonight variant 1, ringsize >= 8, sorted inputs
|
||||||
| 69,69 | 2018-04-24 | Busty Brazzers | v0.2.0.0 | v0.2.0.0 | Bulletproofs, LWMA difficulty algorithm, ringsize >= 10, reduce unlock to 4
|
| 69,69 | 2018-04-24 | Busty Brazzers | v0.2.0.0 | v0.2.0.0 | Bulletproofs, LWMA difficulty algorithm, ringsize >= 10, reduce unlock to 4
|
||||||
| 53,666 | 2018-10-06 | Cool Cage | v0.3.0.0 | v0.3.1.3 | Cryptonight variant 2, LWMA v2, ringsize = 22, MMS
|
| 53,666 | 2018-10-06 | Cool Cage | v0.3.0.0 | v0.3.1.3 | Cryptonight variant 2, LWMA v2, ringsize = 22, MMS
|
||||||
| 63,469 | 2018-11-11 | Dank Doge | v0.4.0.0 | v0.4.0.0 | LWMA v4
|
| 63,469 | 2018-11-11 | Dank Doge | v0.4.0.0 | v0.4.0.0 | LWMA v4
|
||||||
| 81,769 | 2019-02-19 | Erotic EggplantEmoji | v0.5.0.0 | v0.5.0.2 | Cryptonight/wow, LWMA v1 with N=144, Updated Bulletproofs, Fee Per Byte, Auto-churn
|
| 81,769 | 2019-02-19 | Erotic EggplantEmoji | v0.5.0.0 | v0.5.0.2 | Cryptonight/wow, LWMA v1 with N=144, Updated Bulletproofs, Fee Per Byte, Auto-churn
|
||||||
| 114,969 | 2019-06-14 | F For Fappening | v0.6.1.0 | v0.6.1.2 | RandomWOW, new block weight algorithm, slightly more efficient RingCT format
|
| 114,969 | 2019-06-14 | F For Fappening | v0.6.1.0 | v0.6.1.2 | RandomWOW, new block weight algorithm, slightly more efficient RingCT format
|
||||||
| 160,777 | 2019-11-20 | Gaping Goatse | v0.7.0.0 | v0.7.1.0 | Only allow >= 2 outputs, change to the block median used to calculate penalty, rct sigs in coinbase forbidden, 4 unlock time as protocol rule
|
| 160,777 | 2019-11-20 | Gaping Goatse | v0.7.0.0 | v0.7.1.0 | Only allow >= 2 outputs, change to the block median used to calculate penalty, rct sigs in coinbase forbidden, 4 unlock time as protocol rule
|
||||||
| - | 2020-06-28 | Hallucinogenic Hypnotoad | v0.8.0.0 | v0.8.0.2 | Dandelion++ support
|
| - | 2020-06-28 | Hallucinogenic Hypnotoad | v0.8.0.0 | v0.8.0.2 | Dandelion++ support
|
||||||
| 253,999 | 2020-10-09 | Illiterate Illuminati | v0.9.0.0 | v0.9.3.3 | Dynamic coinbase unlock (up to 1 mo.), Deterministic unlock times, Enforce maximum coinbase amount, show_qr_code wallet command, CLSAG
|
| 253,999 | 2020-10-09 | Illiterate Illuminati | v0.9.0.0 | v0.9.1.0 | Dynamic coinbase unlock (up to 1 mo.), Deterministic unlock times, Enforce maximum coinbase amount, show_qr_code wallet command, CLSAG
|
||||||
| 331,170 | 2021-07-04 | Junkie Jeff | v0.10.0.0 | v0.10.2.0 | Bulletproofs+, Miner Block Header Signing, Vote by Block, Change coinbase unlock time to 1 day, Reset difficulty and switch back to Monero's difficulty algorithm
|
|
||||||
| 514,000 | 2023-04-01 | Kunty Karen | v0.11.0.0 | v0.11.3.0 | View tags, fee changes, adjusted dynamic block weight algorithm, multisig security fixes, RPC broadcast node donation sub-address, Limit tx_extra max size to ~1kb, 12-hour difficulty adjustment window
|
|
||||||
|
|
||||||
X's indicate that these details have not been determined as of commit date.
|
X's indicate that these details have not been determined as of commit date.
|
||||||
|
|
||||||
\* indicates estimate as of commit date
|
\* indicates estimate as of commit date
|
||||||
|
|
||||||
|
## Installing from a package
|
||||||
|
|
||||||
Packages are available for
|
Packages are available for
|
||||||
|
|
||||||
* Arch Linux/Manjaro
|
* Arch Linux/Manjaro
|
||||||
@@ -113,6 +116,13 @@ Packages are available for
|
|||||||
|
|
||||||
nix-shell -p wownero
|
nix-shell -p wownero
|
||||||
|
|
||||||
|
* Ubuntu 18.04/Ubuntu 16.04/Debian 9/Debian 8 (amd64)
|
||||||
|
|
||||||
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8BC34ABB48E565F0
|
||||||
|
sudo add-apt-repository "deb http://ppa.wownero.com/ bionic main"
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install wownero
|
||||||
|
|
||||||
Packaging for your favorite distribution would be a welcome contribution!
|
Packaging for your favorite distribution would be a welcome contribution!
|
||||||
|
|
||||||
**DISCLAIMER: These packages are not part of this repository, and as such, do not go through the same review process to ensure their trustworthiness and security.**
|
**DISCLAIMER: These packages are not part of this repository, and as such, do not go through the same review process to ensure their trustworthiness and security.**
|
||||||
@@ -122,22 +132,21 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
|
|
||||||
* Docker
|
* Docker
|
||||||
|
|
||||||
git clone https://codeberg.org/wownero/wownero && cd wownero
|
git clone https://git.wownero.com/wownero/wownero && cd wownero
|
||||||
docker build -t git-wow:master -m 4g .
|
docker build -t git-wow:master -m 4g .
|
||||||
docker run -it -p 34567:34567 -p 34568:34568 -w /home/wownero/build/release/bin git-wow:master bash
|
docker run -it -p 34567:34567 -p 34568:34568 -w /home/wownero/build/release/bin git-wow:master bash
|
||||||
|
|
||||||
* Arch Linux/Manjaro
|
* Arch Linux/Manjaro
|
||||||
|
|
||||||
sudo pacman -Syu --needed base-devel cmake boost openssl zeromq libpgm unbound libsodium libunwind xz readline expat gtest python3 ccache doxygen graphviz qt5-tools hidapi libusb protobuf systemd gcc13
|
sudo pacman -Syu && sudo pacman -S base-devel cmake boost openssl zeromq libpgm unbound libsodium git libusb systemd
|
||||||
git clone https://codeberg.org/wownero/wownero && cd wownero
|
git clone https://git.wownero.com/wownero/wownero && cd wownero
|
||||||
export CC=gcc-13 CXX=g++-13
|
|
||||||
make -j2
|
make -j2
|
||||||
|
|
||||||
* Debian/Ubuntu
|
* Debian/Ubuntu
|
||||||
|
|
||||||
sudo apt update && sudo apt install build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz gcc-13 g++-13
|
sudo apt update && sudo apt install build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-dev libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev git -y
|
||||||
git clone https://codeberg.org/wownero/wownero && cd wownero
|
git clone https://git.wownero.com/wownero/wownero && cd wownero
|
||||||
CC="gcc-13" CXX="g++-13" make -j2
|
make -j2
|
||||||
|
|
||||||
|
|
||||||
## Running Binaries
|
## Running Binaries
|
||||||
@@ -160,10 +169,10 @@ To run in background:
|
|||||||
|
|
||||||
To run as a systemd service, copy
|
To run as a systemd service, copy
|
||||||
[wownerod.service](utils/systemd/wownerod.service) to `/etc/systemd/system/` and
|
[wownerod.service](utils/systemd/wownerod.service) to `/etc/systemd/system/` and
|
||||||
[wow.conf](utils/conf/wow.conf) to `/etc/`. The [example
|
[wownerod.conf](utils/conf/wownerod.conf) to `/etc/`. The [example
|
||||||
service](utils/systemd/wownerod.service) assumes that the user `wownero` exists
|
service](utils/systemd/wownerod.service) assumes that the user `wownero` exists
|
||||||
and its home is the data directory specified in the [example
|
and its home is the data directory specified in the [example
|
||||||
config](wow.conf).
|
config](utils/conf/wownerod.conf).
|
||||||
|
|
||||||
Once node is synced to network, run the CLI wallet by entering:
|
Once node is synced to network, run the CLI wallet by entering:
|
||||||
|
|
||||||
@@ -173,39 +182,26 @@ Type `help` in CLI wallet to see standard commands (for advanced options, type `
|
|||||||
|
|
||||||
## Tor Anonymity Network
|
## Tor Anonymity Network
|
||||||
|
|
||||||
### Ubuntu
|
* Install [Tor Browser](https://www.torproject.org/download/)
|
||||||
|
* Open `torrc` file in a text editor ([installation directory]/Browser/TorBrowser/Data/Tor/torrc) and add hidden service information as follows:
|
||||||
|
|
||||||
* `sudo apt-get update && sudo apt-get install tor -y`
|
|
||||||
* `sudo nano /etc/tor/torrc`
|
|
||||||
|
|
||||||
add the following:
|
|
||||||
```
|
```
|
||||||
HiddenServiceDir /var/lib/tor/wownero/
|
HiddenServiceDir [installation directory]/Browser/TorBrowser/Data/Tor/wow_node
|
||||||
HiddenServicePort 34569 127.0.0.1:34569
|
|
||||||
HiddenServicePort 34566 127.0.0.1:34566
|
|
||||||
HiddenServiceVersion 3
|
HiddenServiceVersion 3
|
||||||
|
HiddenServicePort 44568 127.0.0.1:44568
|
||||||
```
|
```
|
||||||
save and close nano
|
* Save `torrc` file and restart Tor Browser (keep open)
|
||||||
|
* Change directory to the `wow_node` folder, open `hostname` file, and copy your node's ".onion" address
|
||||||
* `sudo /etc/init.d/tor restart && sudo systemctl enable tor`
|
* Start wownerod with the following parameters:
|
||||||
* copy [wow.conf](utils/conf/wow.conf) file and save it in same directory as `wownerod`.
|
|
||||||
* start wownerod like this:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
./wownerod --config-file=wow.conf
|
./wownerod --tx-proxy tor,127.0.0.1:9150,10 --add-peer hdps3qwnusz64r7odvynmae6myc2uyvrsc2emap6636qeuzll72eouid.onion:44568 --anonymous-inbound YOUR_NODE_ADDRESS.onion:44568,127.0.0.1:44568,25
|
||||||
```
|
```
|
||||||
|
|
||||||
* `sudo cat /var/lib/tor/wownero/hostname`
|
|
||||||
|
|
||||||
Copy your onion address and share node with others [here](https://monero.fail/?crypto=wownero).
|
|
||||||
|
|
||||||
To share your node over p2p, uncomment first line of wownerod.conf and add your onion address.
|
|
||||||
|
|
||||||
### Access remote Tor node from CLI wallet
|
### Access remote Tor node from CLI wallet
|
||||||
|
|
||||||
```
|
```
|
||||||
./wownero-wallet-cli --proxy 127.0.0.1:9050 --daemon-address iy6ry6uudpzvbd72zsipepukp6nsazjdu72n52vg3isfnxqn342flzad.onion:34568
|
./wownero-wallet-cli --proxy 127.0.0.1:9150 --daemon-address wow7dhbgiljnkspkzpjyy66auegbrye2ptfv4gucgbhireg5rrjza5ad.onion:34568
|
||||||
```
|
```
|
||||||
|
|
||||||
Copyright (c) 2014-2024 The Monero Project.
|
Use port `9050` instead of `9150` if you installed Tor as a standalone daemon. For more information, check out [ANONYMITY_NETWORKS](https://git.wownero.com/wownero/wownero/src/branch/master/ANONYMITY_NETWORKS.md).
|
||||||
Portions Copyright (c) 2012-2013 The Cryptonote developers.
|
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ allows for filtering on: (1) format, (2) context, and (3) event.
|
|||||||
Includes previously unseen transactions in a block but _not_ the
|
Includes previously unseen transactions in a block but _not_ the
|
||||||
`miner_tx`. Does not "re-publish" after a reorg. Includes `do_not_relay`
|
`miner_tx`. Does not "re-publish" after a reorg. Includes `do_not_relay`
|
||||||
transactions.
|
transactions.
|
||||||
* `miner_data` - provides the necessary data to create a custom block template
|
|
||||||
Available only in the `full` context.
|
|
||||||
|
|
||||||
The subscription topics are formatted as `format-context-event`, with prefix
|
The subscription topics are formatted as `format-context-event`, with prefix
|
||||||
matching supported by both Monero and ZMQ. The `format`, `context` and `event`
|
matching supported by both Monero and ZMQ. The `format`, `context` and `event`
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ macro(CHECK_LINKER_FLAG flag VARIABLE)
|
|||||||
${_cle_source}
|
${_cle_source}
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${flag}
|
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${flag}
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
"-DCMAKE_EXE_LINKER_FLAGS=${flag}"
|
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
unset(_cle_source)
|
unset(_cle_source)
|
||||||
set(CMAKE_C_FLAGS ${saved_CMAKE_C_FLAGS})
|
set(CMAKE_C_FLAGS ${saved_CMAKE_C_FLAGS})
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ endif()
|
|||||||
|
|
||||||
# Protobuf compilation test
|
# Protobuf compilation test
|
||||||
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
|
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)
|
execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_SOURCE_DIR}/cmake" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_SOURCE_DIR}/cmake/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
|
||||||
if(RET)
|
if(RET)
|
||||||
message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}")
|
message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}")
|
||||||
endif()
|
endif()
|
||||||
@@ -100,7 +100,7 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
|
|||||||
"${CMAKE_BINARY_DIR}"
|
"${CMAKE_BINARY_DIR}"
|
||||||
SOURCES
|
SOURCES
|
||||||
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
|
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp"
|
"${CMAKE_SOURCE_DIR}/cmake/test-protobuf.cpp"
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
|
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
|
||||||
"-DCMAKE_CXX_STANDARD=11"
|
"-DCMAKE_CXX_STANDARD=11"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
@@ -42,19 +42,12 @@
|
|||||||
find_program(CCACHE_FOUND ccache)
|
find_program(CCACHE_FOUND ccache)
|
||||||
if (CCACHE_FOUND)
|
if (CCACHE_FOUND)
|
||||||
# Try to compile a test program with ccache, in order to verify if it really works. (needed on exotic setups)
|
# 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")
|
# Create a temporary file with a simple program.
|
||||||
file(WRITE "${TEST_PROJECT}/CMakeLists.txt" [=[
|
set(TEMP_CPP_FILE "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp/test-program.cpp")
|
||||||
cmake_minimum_required(VERSION 3.5)
|
file(WRITE "${TEMP_CPP_FILE}" "int main() { return 0; }")
|
||||||
project(test)
|
# And run the found ccache on it.
|
||||||
option (CCACHE "")
|
execute_process(COMMAND "${CCACHE_FOUND}" "${CMAKE_CXX_COMPILER}" "${TEMP_CPP_FILE}" RESULT_VARIABLE RET)
|
||||||
file(WRITE "${CMAKE_SOURCE_DIR}/test.cpp" "int main() { return 0; }")
|
if (${RET} EQUAL 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
|
# Success
|
||||||
message(STATUS "Found usable ccache: ${CCACHE_FOUND}")
|
message(STATUS "Found usable ccache: ${CCACHE_FOUND}")
|
||||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_FOUND}")
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_FOUND}")
|
||||||
|
|||||||
@@ -39,28 +39,19 @@ find_package_handle_standard_args(HIDAPI
|
|||||||
|
|
||||||
if(HIDAPI_FOUND)
|
if(HIDAPI_FOUND)
|
||||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
|
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
|
||||||
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
|
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
||||||
find_library(LIBUSB-1.0_LIBRARY usb-1.0)
|
find_library(LIBUSB-1.0_LIBRARY usb-1.0)
|
||||||
find_library(LIBUDEV_LIBRARY udev)
|
find_library(LIBUDEV_LIBRARY udev)
|
||||||
if(LIBUSB-1.0_LIBRARY)
|
if(LIBUSB-1.0_LIBRARY)
|
||||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}")
|
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}")
|
||||||
if(LIBUDEV_LIBRARY)
|
if(LIBUDEV_LIBRARY)
|
||||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
|
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
|
||||||
elseif(NOT ANDROID)
|
else()
|
||||||
message(WARNING "libudev library not found, binaries may fail to link.")
|
message(WARNING "libudev library not found, binaries may fail to link.")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(WARNING "libusb-1.0 library not found, binaries may fail to link.")
|
message(WARNING "libusb-1.0 library not found, binaries may fail to link.")
|
||||||
endif()
|
endif()
|
||||||
if(ANDROID)
|
|
||||||
# libusb uses android log library
|
|
||||||
find_library(ANDROID_LOG_LIBRARY log)
|
|
||||||
if(ANDROID_LOG_LIBRARY)
|
|
||||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${ANDROID_LOG_LIBRARY}")
|
|
||||||
else()
|
|
||||||
message(WARNING "Android log library not found, binaries may fail to link.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}")
|
set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}")
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ if ( LibUSB_FOUND )
|
|||||||
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
|
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 )
|
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") OR ANDROID)
|
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
||||||
find_library(LIBUDEV_LIBRARY udev)
|
find_library(LIBUDEV_LIBRARY udev)
|
||||||
if(LIBUDEV_LIBRARY)
|
if(LIBUDEV_LIBRARY)
|
||||||
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")
|
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")
|
||||||
@@ -113,7 +113,7 @@ if ( LibUSB_FOUND )
|
|||||||
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
|
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
if(DEPENDS)
|
if(DEPENDS)
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit -framework Security")
|
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
|
||||||
else()
|
else()
|
||||||
find_library(COREFOUNDATION CoreFoundation)
|
find_library(COREFOUNDATION CoreFoundation)
|
||||||
find_library(IOKIT IOKit)
|
find_library(IOKIT IOKit)
|
||||||
@@ -134,7 +134,7 @@ if ( LibUSB_FOUND )
|
|||||||
|
|
||||||
try_compile(LibUSB_COMPILE_TEST_PASSED
|
try_compile(LibUSB_COMPILE_TEST_PASSED
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/test-libusb-version.c"
|
"${CMAKE_SOURCE_DIR}/cmake/test-libusb-version.c"
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
"-DINCLUDE_DIRECTORIES=${LibUSB_INCLUDE_DIRS}"
|
"-DINCLUDE_DIRECTORIES=${LibUSB_INCLUDE_DIRS}"
|
||||||
"-DLINK_DIRECTORIES=${LibUSB_LIBRARIES}"
|
"-DLINK_DIRECTORIES=${LibUSB_LIBRARIES}"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
find_path(Readline_ROOT_DIR
|
find_path(Readline_ROOT_DIR
|
||||||
NAMES include/readline/readline.h
|
NAMES include/readline/readline.h
|
||||||
PATHS /usr/local/opt/readline/ /opt/homebrew/opt/readline/ /opt/local/ /usr/local/ /usr/
|
PATHS /usr/local/opt/readline/ /opt/local/ /usr/local/ /usr/
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are
|
# Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
function (get_version_tag_from_git GIT)
|
function (get_version_tag_from_git GIT)
|
||||||
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD
|
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
RESULT_VARIABLE RET
|
RESULT_VARIABLE RET
|
||||||
OUTPUT_VARIABLE COMMIT
|
OUTPUT_VARIABLE COMMIT
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
@@ -48,21 +48,29 @@ function (get_version_tag_from_git GIT)
|
|||||||
message(STATUS "You are currently on commit ${COMMIT}")
|
message(STATUS "You are currently on commit ${COMMIT}")
|
||||||
|
|
||||||
# Get all the tags
|
# Get all the tags
|
||||||
execute_process(COMMAND "${GIT}" tag -l --points-at HEAD
|
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
RESULT_VARIABLE RET
|
RESULT_VARIABLE RET
|
||||||
OUTPUT_VARIABLE TAG
|
OUTPUT_VARIABLE TAGGEDCOMMIT
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
# Check if we're building that tagged commit or a different one
|
if(NOT TAGGEDCOMMIT)
|
||||||
if(TAG)
|
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||||
message(STATUS "You are building a tagged release")
|
|
||||||
set(VERSIONTAG "release")
|
|
||||||
set(VERSION_IS_RELEASE "true")
|
|
||||||
else()
|
|
||||||
message(STATUS "You are ahead of or behind a tagged release")
|
|
||||||
set(VERSIONTAG "${COMMIT}")
|
set(VERSIONTAG "${COMMIT}")
|
||||||
set(VERSION_IS_RELEASE "false")
|
set(VERSION_IS_RELEASE "false")
|
||||||
|
else()
|
||||||
|
message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}")
|
||||||
|
|
||||||
|
# Check if we're building that tagged commit or a different one
|
||||||
|
if(COMMIT STREQUAL TAGGEDCOMMIT)
|
||||||
|
message(STATUS "You are building a tagged release")
|
||||||
|
set(VERSIONTAG "release")
|
||||||
|
set(VERSION_IS_RELEASE "true")
|
||||||
|
else()
|
||||||
|
message(STATUS "You are ahead of or behind a tagged release")
|
||||||
|
set(VERSIONTAG "${COMMIT}")
|
||||||
|
set(VERSION_IS_RELEASE "false")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
# Copyright (c) 2014-2022, 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.
|
|
||||||
|
|
||||||
# https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html
|
|
||||||
# This module sets the following variables:
|
|
||||||
# CMAKE_C_CLANG_TIDY
|
|
||||||
# CMAKE_CXX_CLANG_TIDY
|
|
||||||
# when clang-tidy is found in PATH. Afterwards, the code is being linted by the tool.
|
|
||||||
# The checks to be enabled can be manipulated with the variable MONERO_CLANG_TIDY_CHECKS
|
|
||||||
|
|
||||||
macro (monero_clang_tidy LANGUAGE)
|
|
||||||
set(TOOL_NAME "clang-tidy")
|
|
||||||
set(MONERO_CLANG_TIDY_MIN_VERSION "3.6")
|
|
||||||
if(${CMAKE_VERSION} VERSION_LESS "${MONERO_CLANG_TIDY_MIN_VERSION}")
|
|
||||||
message(FATAL_ERROR "Sorry, ${TOOL_NAME} is available for CMake from version ${MONERO_CLANG_TIDY_MIN_VERSION}")
|
|
||||||
else()
|
|
||||||
message(STATUS "Trying to enable ${TOOL_NAME}")
|
|
||||||
find_program(MONERO_CLANG_BIN ${TOOL_NAME})
|
|
||||||
if(NOT MONERO_CLANG_BIN)
|
|
||||||
message(FATAL_ERROR "${TOOL_NAME} not found! Try running: sudo apt install ${TOOL_NAME}")
|
|
||||||
else()
|
|
||||||
message(STATUS "Found ${MONERO_CLANG_BIN}")
|
|
||||||
set(MONERO_CLANG_TIDY_CHECKS
|
|
||||||
-header-filter=.; # By default the headers are excluded. This line enables them.
|
|
||||||
-checks=*; # Currently enabling all checks
|
|
||||||
# An example of selectively enabling checks:
|
|
||||||
#-checks=bugprone-*,cppcoreguidelines-avoid-goto # Have to be in one line :(
|
|
||||||
)
|
|
||||||
# Current list of checks is avaibale under:
|
|
||||||
# https://clang.llvm.org/extra/clang-tidy/
|
|
||||||
if (${LANGUAGE} STREQUAL "C")
|
|
||||||
set(CMAKE_C_CLANG_TIDY
|
|
||||||
${MONERO_CLANG_BIN}; # Mind the semicolon
|
|
||||||
${MONERO_CLANG_TIDY_CHECKS}
|
|
||||||
)
|
|
||||||
elseif (${LANGUAGE} STREQUAL "CXX")
|
|
||||||
set(CMAKE_CXX_CLANG_TIDY
|
|
||||||
${MONERO_CLANG_BIN}; # Mind the semicolon
|
|
||||||
${MONERO_CLANG_TIDY_CHECKS}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "${TOOL_NAME}: Unsupported language: ${LANGUAGE}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2014-2022, The Monero Project
|
// Copyright (c) 2014-2020, The Monero Project
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2014-2022, The Monero Project
|
// Copyright (c) 2014-2020, The Monero Project
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2014-2022, The Monero Project
|
// Copyright (c) 2014-2020, The Monero Project
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2014-2022, The Monero Project
|
// Copyright (c) 2014-2020, The Monero Project
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
@@ -26,6 +26,5 @@
|
|||||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
# 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.
|
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
monero_enable_coverage()
|
|
||||||
add_subdirectory(epee)
|
add_subdirectory(epee)
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ brew "unbound"
|
|||||||
brew "libsodium"
|
brew "libsodium"
|
||||||
brew "miniupnpc"
|
brew "miniupnpc"
|
||||||
brew "readline"
|
brew "readline"
|
||||||
|
brew "ldns"
|
||||||
brew "expat"
|
brew "expat"
|
||||||
brew "ccache"
|
|
||||||
brew "doxygen"
|
brew "doxygen"
|
||||||
brew "graphviz"
|
brew "graphviz"
|
||||||
brew "libunwind-headers"
|
brew "libunwind-headers"
|
||||||
|
|||||||
@@ -2,15 +2,16 @@
|
|||||||
|
|
||||||
SOURCES_PATH ?= $(BASEDIR)/sources
|
SOURCES_PATH ?= $(BASEDIR)/sources
|
||||||
BASE_CACHE ?= $(BASEDIR)/built
|
BASE_CACHE ?= $(BASEDIR)/built
|
||||||
FALLBACK_DOWNLOAD_PATH ?= https://downloads.getmonero.org/depends-sources
|
SDK_PATH ?= $(BASEDIR)/SDKs
|
||||||
|
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
|
||||||
|
|
||||||
BUILD = $(shell ./config.guess)
|
BUILD = $(shell ./config.guess)
|
||||||
HOST ?= $(BUILD)
|
HOST ?= $(BUILD)
|
||||||
PATCHES_PATH = $(BASEDIR)/patches
|
PATCHES_PATH = $(BASEDIR)/patches
|
||||||
BASEDIR = $(CURDIR)
|
BASEDIR = $(CURDIR)
|
||||||
HASH_LENGTH:=11
|
HASH_LENGTH:=11
|
||||||
DOWNLOAD_CONNECT_TIMEOUT:=30
|
DOWNLOAD_CONNECT_TIMEOUT:=10
|
||||||
DOWNLOAD_RETRIES:=5
|
DOWNLOAD_RETRIES:=3
|
||||||
HOST_ID_SALT ?= salt
|
HOST_ID_SALT ?= salt
|
||||||
BUILD_ID_SALT ?= salt
|
BUILD_ID_SALT ?= salt
|
||||||
|
|
||||||
@@ -110,7 +111,8 @@ $(host_arch)_$(host_os)_id_string+=$(shell $(host_CXX) --version 2>/dev/null)
|
|||||||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null)
|
$(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null)
|
||||||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)
|
$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)
|
||||||
|
|
||||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages)
|
qt_packages_$(NO_QT) = $(qt_packages)
|
||||||
|
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_)
|
||||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
||||||
|
|
||||||
all_packages = $(packages) $(native_packages)
|
all_packages = $(packages) $(native_packages)
|
||||||
@@ -183,6 +185,7 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_
|
|||||||
-e 's|@build_tests@|$(build_tests)|' \
|
-e 's|@build_tests@|$(build_tests)|' \
|
||||||
-e 's|@depends@|$(host_cmake)|' \
|
-e 's|@depends@|$(host_cmake)|' \
|
||||||
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
|
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
|
||||||
|
-e 's|@sdk@|$(SDK_PATH)|'\
|
||||||
-e 's|@arch@|$(host_arch)|'\
|
-e 's|@arch@|$(host_arch)|'\
|
||||||
$< > $@
|
$< > $@
|
||||||
$(AT)touch $@
|
$(AT)touch $@
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Common `host-platform-triplets` for cross compilation are:
|
|||||||
|
|
||||||
- `i686-w64-mingw32` for Win32
|
- `i686-w64-mingw32` for Win32
|
||||||
- `x86_64-w64-mingw32` for Win64
|
- `x86_64-w64-mingw32` for Win64
|
||||||
- `x86_64-apple-darwin11` for MacOSX x86_64
|
- `x86_64-apple-darwin11` for MacOSX
|
||||||
- `arm-linux-gnueabihf` for Linux ARM 32 bit
|
- `arm-linux-gnueabihf` for Linux ARM 32 bit
|
||||||
- `aarch64-linux-gnu` for Linux ARM 64 bit
|
- `aarch64-linux-gnu` for Linux ARM 64 bit
|
||||||
- `riscv64-linux-gnu` for Linux RISCV 64 bit
|
- `riscv64-linux-gnu` for Linux RISCV 64 bit
|
||||||
@@ -43,6 +43,7 @@ The following can be set when running make: make FOO=bar
|
|||||||
```
|
```
|
||||||
SOURCES_PATH: downloaded sources will be placed here
|
SOURCES_PATH: downloaded sources will be placed here
|
||||||
BASE_CACHE: built packages will be placed here
|
BASE_CACHE: built packages will be placed here
|
||||||
|
SDK_PATH: Path where sdk's can be found (used by OSX)
|
||||||
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
|
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
|
||||||
DEBUG: disable some optimizations and enable more runtime checking
|
DEBUG: disable some optimizations and enable more runtime checking
|
||||||
HOST_ID_SALT: Optional salt to use when generating host package ids
|
HOST_ID_SALT: Optional salt to use when generating host package ids
|
||||||
@@ -58,6 +59,14 @@ download-win: run 'make download-win' to fetch all sources needed for win builds
|
|||||||
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
|
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#Darwin (macos) builds:
|
||||||
|
|
||||||
|
To build with the x86_64-apple-darwin11 you require the mac os developer tools in MacOSX10.11.sdk.
|
||||||
|
Download it from apple, or search for it on github. Create a new directoty called SDKs in this
|
||||||
|
directory and place the entire MacOSX10.11.sdk folder in it. The depends build will then pick it up automatically
|
||||||
|
(without requiring SDK_PATH).
|
||||||
|
|
||||||
|
|
||||||
#Mingw builds
|
#Mingw builds
|
||||||
|
|
||||||
Building for 32/64bit mingw requires switching alternatives to a posix mode
|
Building for 32/64bit mingw requires switching alternatives to a posix mode
|
||||||
|
|||||||
@@ -7,12 +7,27 @@ ac_tool_prefix=${host_alias}-
|
|||||||
if test -z $with_boost; then
|
if test -z $with_boost; then
|
||||||
with_boost=$depends_prefix
|
with_boost=$depends_prefix
|
||||||
fi
|
fi
|
||||||
|
if test -z $with_qt_plugindir; then
|
||||||
|
with_qt_plugindir=$depends_prefix/plugins
|
||||||
|
fi
|
||||||
|
if test -z $with_qt_translationdir; then
|
||||||
|
with_qt_translationdir=$depends_prefix/translations
|
||||||
|
fi
|
||||||
|
|
||||||
if test x@host_os@ = xdarwin; then
|
if test x@host_os@ = xdarwin; then
|
||||||
BREW=no
|
BREW=no
|
||||||
PORT=no
|
PORT=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x@host_os@ = xmingw32; then
|
||||||
|
if test -z $with_qt_incdir; then
|
||||||
|
with_qt_incdir=$depends_prefix/include
|
||||||
|
fi
|
||||||
|
if test -z $with_qt_libdir; then
|
||||||
|
with_qt_libdir=$depends_prefix/lib
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
PATH=$depends_prefix/native/bin:$PATH
|
PATH=$depends_prefix/native/bin:$PATH
|
||||||
PKG_CONFIG="`which pkg-config` --static"
|
PKG_CONFIG="`which pkg-config` --static"
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ endef
|
|||||||
define fetch_file
|
define fetch_file
|
||||||
( test -f $$($(1)_source_dir)/$(4) || \
|
( test -f $$($(1)_source_dir)/$(4) || \
|
||||||
( $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5)) || \
|
( $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5)) || \
|
||||||
$(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(4),$(4),$(5))))
|
$(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5))))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define int_get_build_recipe_hash
|
define int_get_build_recipe_hash
|
||||||
@@ -133,21 +133,13 @@ $(1)_config_env+=$($(1)_config_env_$(host_arch)) $($(1)_config_env_$(host_arch)_
|
|||||||
$(1)_config_env+=$($(1)_config_env_$(host_os)) $($(1)_config_env_$(host_os)_$(release_type))
|
$(1)_config_env+=$($(1)_config_env_$(host_os)) $($(1)_config_env_$(host_os)_$(release_type))
|
||||||
$(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(host_arch)_$(host_os)_$(release_type))
|
$(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(host_arch)_$(host_os)_$(release_type))
|
||||||
|
|
||||||
$(1)_build_env+=$$($(1)_build_env_$(release_type))
|
|
||||||
$(1)_build_env+=$($(1)_build_env_$(host_arch)) $($(1)_build_env_$(host_arch)_$(release_type))
|
|
||||||
$(1)_build_env+=$($(1)_build_env_$(host_os)) $($(1)_build_env_$(host_os)_$(release_type))
|
|
||||||
$(1)_build_env+=$($(1)_build_env_$(host_arch)_$(host_os)) $($(1)_build_env_$(host_arch)_$(host_os)_$(release_type))
|
|
||||||
|
|
||||||
$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
|
$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
|
||||||
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
|
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
|
||||||
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
|
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
|
||||||
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
|
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
|
||||||
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
|
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
|
||||||
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
|
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --disable-dependency-tracking --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
|
||||||
|
|
||||||
ifeq ($(filter $(1),libusb unbound),)
|
|
||||||
$(1)_autoconf += --disable-dependency-tracking
|
|
||||||
endif
|
|
||||||
ifneq ($($(1)_nm),)
|
ifneq ($($(1)_nm),)
|
||||||
$(1)_autoconf += NM="$$($(1)_nm)"
|
$(1)_autoconf += NM="$$($(1)_nm)"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
OSX_MIN_VERSION=10.8
|
OSX_MIN_VERSION=10.8
|
||||||
LD64_VERSION=609
|
OSX_SDK_VERSION=10.11
|
||||||
ifeq (aarch64, $(host_arch))
|
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
|
||||||
CC_target=arm64-apple-$(host_os)
|
LD64_VERSION=253.9
|
||||||
else
|
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B $(host_prefix)/native/bin
|
||||||
CC_target=$(host)
|
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B $(host_prefix)/native/bin
|
||||||
endif
|
|
||||||
darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
|
|
||||||
darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
|
|
||||||
|
|
||||||
darwin_CFLAGS=-pipe
|
darwin_CFLAGS=-pipe
|
||||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||||
@@ -18,4 +15,4 @@ darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
|
|||||||
darwin_debug_CFLAGS=-O1
|
darwin_debug_CFLAGS=-O1
|
||||||
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
|
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
|
||||||
|
|
||||||
darwin_native_toolchain=native_cctools darwin_sdk
|
darwin_native_toolchain=native_cctools
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package=boost
|
package=boost
|
||||||
$(package)_version=1_64_0
|
$(package)_version=1_64_0
|
||||||
$(package)_download_path=https://downloads.sourceforge.net/project/boost/boost/1.64.0/
|
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.64.0/source/
|
||||||
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
|
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
|
||||||
$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
|
$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
|
||||||
$(package)_dependencies=libiconv
|
$(package)_dependencies=libiconv
|
||||||
$(package)_patches=fix_aroptions.patch fix_arm_arch.patch
|
$(package)_patches=fix_aroptions.patch
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts_release=variant=release
|
$(package)_config_opts_release=variant=release
|
||||||
@@ -13,7 +13,7 @@ $(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-
|
|||||||
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
|
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
|
||||||
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
|
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
|
||||||
$(package)_config_opts_android=threadapi=pthread runtime-link=static target-os=android
|
$(package)_config_opts_android=threadapi=pthread runtime-link=static target-os=android
|
||||||
$(package)_config_opts_darwin=--toolset=darwin runtime-link=shared
|
$(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared
|
||||||
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
|
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
|
||||||
$(package)_config_opts_x86_64_mingw32=address-model=64
|
$(package)_config_opts_x86_64_mingw32=address-model=64
|
||||||
$(package)_config_opts_i686_mingw32=address-model=32
|
$(package)_config_opts_i686_mingw32=address-model=32
|
||||||
@@ -30,7 +30,6 @@ endef
|
|||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
patch -p1 < $($(package)_patch_dir)/fix_aroptions.patch &&\
|
patch -p1 < $($(package)_patch_dir)/fix_aroptions.patch &&\
|
||||||
patch -p1 < $($(package)_patch_dir)/fix_arm_arch.patch &&\
|
|
||||||
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
|
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
package=darwin_sdk
|
|
||||||
$(package)_version=11.1
|
|
||||||
$(package)_download_path=https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/
|
|
||||||
$(package)_file_name=MacOSX$($(package)_version).sdk.tar.xz
|
|
||||||
$(package)_sha256_hash=68797baaacb52f56f713400de306a58a7ca00b05c3dc6d58f0a8283bcac721f8
|
|
||||||
|
|
||||||
define $(package)_stage_cmds
|
|
||||||
mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\
|
|
||||||
mv * $($(package)_staging_dir)/$(host_prefix)/native/SDK
|
|
||||||
endef
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
package=eudev
|
package=eudev
|
||||||
$(package)_version=v3.2.6
|
$(package)_version=v3.2.6
|
||||||
$(package)_download_path=https://github.com/gentoo/eudev/archive/
|
$(package)_download_path=https://github.com/gentoo/eudev/archive/
|
||||||
$(package)_download_file=$($(package)_version).tar.gz
|
$(package)_file_name=$($(package)_version).tar.gz
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
|
||||||
$(package)_sha256_hash=a96ecb8637667897b8bd4dee4c22c7c5f08b327be45186e912ce6bc768385852
|
$(package)_sha256_hash=a96ecb8637667897b8bd4dee4c22c7c5f08b327be45186e912ce6bc768385852
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
package=expat
|
package=expat
|
||||||
$(package)_version=2.6.0
|
$(package)_version=2.2.4
|
||||||
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/
|
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_4
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||||
$(package)_sha256_hash=ff60e6a6b6ce570ae012dc7b73169c7fdf4b6bf08c12ed0ec6f55736b78d85ba
|
$(package)_sha256_hash=03ad85db965f8ab2d27328abcf0bc5571af6ec0a414874b2066ee3fdd372019e
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples
|
$(package)_config_opts=--enable-static
|
||||||
$(package)_config_opts+=--enable-option-checking --without-xmlwf --with-pic
|
$(package)_config_opts=--disable-shared
|
||||||
$(package)_config_opts+=--prefix=$(host_prefix)
|
$(package)_config_opts+=--prefix=$(host_prefix)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
$($(package)_autoconf)
|
$($(package)_autoconf) $($(package)_config_opts)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
@@ -23,6 +23,6 @@ define $(package)_stage_cmds
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_postprocess_cmds
|
define $(package)_postprocess_cmds
|
||||||
rm -rf share lib/cmake lib/*.la
|
rm lib/*.la
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ endef
|
|||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
mkdir bin &&\
|
mkdir bin &&\
|
||||||
echo "#!/bin/sh\n\nexec /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 &&\
|
||||||
echo "#!/bin/sh\n\nexec /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/*
|
chmod 755 bin/*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package=gtest
|
package=gtest
|
||||||
$(package)_version=1.8.1
|
$(package)_version=1.8.1
|
||||||
$(package)_download_path=https://github.com/google/googletest/archive/
|
$(package)_download_path=https://github.com/google/googletest/archive/
|
||||||
$(package)_download_file=release-$($(package)_version).tar.gz
|
$(package)_file_name=release-$($(package)_version).tar.gz
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
|
||||||
$(package)_sha256_hash=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
|
$(package)_sha256_hash=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
|
||||||
$(package)_cxxflags=-std=c++11
|
$(package)_cxxflags=-std=c++11
|
||||||
$(package)_cxxflags_linux=-fPIC
|
$(package)_cxxflags_linux=-fPIC
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package=hidapi
|
package=hidapi
|
||||||
$(package)_version=0.13.1
|
$(package)_version=0.9.0
|
||||||
$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
|
$(package)_download_path=https://github.com/libusb/hidapi/archive
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=476a2c9a4dc7d1fc97dd223b84338dbea3809a84caea2dcd887d9778725490e3
|
$(package)_sha256_hash=630ee1834bdd5c5761ab079fd04f463a89585df8fcae51a7bfe4229b1e02a652
|
||||||
$(package)_linux_dependencies=libusb eudev
|
$(package)_linux_dependencies=libusb eudev
|
||||||
$(package)_patches=missing_win_include.patch
|
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--enable-static --disable-shared
|
$(package)_config_opts=--enable-static --disable-shared
|
||||||
$(package)_config_opts+=--prefix=$(host_prefix)
|
$(package)_config_opts+=--prefix=$(host_prefix)
|
||||||
|
$(package)_config_opts_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_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
|
$(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
|
||||||
$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include
|
$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include
|
||||||
$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
|
$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
|
||||||
@@ -16,12 +16,9 @@ $(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0
|
|||||||
$(package)_config_opts_linux+=--with-pic
|
$(package)_config_opts_linux+=--with-pic
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
|
||||||
patch -p1 < $($(package)_patch_dir)/missing_win_include.patch && ./bootstrap
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
|
./bootstrap &&\
|
||||||
|
$($(package)_autoconf) $($(package)_config_opts) AR_FLAGS=$($(package)_arflags)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
|
|||||||
34
contrib/depends/packages/ldns.mk
Normal file
34
contrib/depends/packages/ldns.mk
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
package=ldns
|
||||||
|
$(package)_version=1.6.17
|
||||||
|
$(package)_download_path=https://www.nlnetlabs.nl/downloads/ldns/
|
||||||
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||||
|
$(package)_sha256_hash=8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd
|
||||||
|
$(package)_dependencies=openssl
|
||||||
|
|
||||||
|
define $(package)_set_vars
|
||||||
|
$(package)_config_opts=--disable-shared --enable-static --with-drill
|
||||||
|
$(package)_config_opts+=--with-ssl=$(host_prefix)
|
||||||
|
$(package)_config_opts_release=--disable-debug-mode
|
||||||
|
$(package)_config_opts_linux=--with-pic
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_preprocess_cmds
|
||||||
|
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_config_cmds
|
||||||
|
$($(package)_autoconf)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_build_cmds
|
||||||
|
$(MAKE)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_stage_cmds
|
||||||
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install-h install-lib
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_postprocess_cmds
|
||||||
|
rm lib/*.la
|
||||||
|
endef
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package=libusb
|
package=libusb
|
||||||
$(package)_version=1.0.26
|
$(package)_version=1.0.22
|
||||||
$(package)_download_path=https://github.com/libusb/libusb/releases/download/v$($(package)_version)
|
$(package)_download_path=https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-$($(package)_version)/
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||||
$(package)_sha256_hash=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
|
$(package)_sha256_hash=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
|
|||||||
@@ -1,17 +1,49 @@
|
|||||||
package=native_cctools
|
package=native_cctools
|
||||||
$(package)_version=04663295d0425abfac90a42440a7ec02d7155fea
|
$(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6
|
||||||
$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
|
$(package)_download_path=https://github.com/theuni/cctools-port/archive
|
||||||
$(package)_download_file=$($(package)_version).tar.gz
|
$(package)_file_name=$($(package)_version).tar.gz
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
$(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a
|
||||||
$(package)_sha256_hash=70a7189418c2086d20c299c5d59250cf5940782c778892ccc899c66516ed240e
|
|
||||||
$(package)_build_subdir=cctools
|
$(package)_build_subdir=cctools
|
||||||
$(package)_dependencies=native_clang native_libtapi
|
$(package)_clang_version=3.7.1
|
||||||
|
$(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version)
|
||||||
|
$(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
|
||||||
|
$(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
|
||||||
|
$(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9
|
||||||
|
$(package)_extra_sources=$($(package)_clang_file_name)
|
||||||
|
$(package)_patches=skip_otool.patch
|
||||||
|
|
||||||
|
define $(package)_fetch_cmds
|
||||||
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
|
||||||
|
$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_extract_cmds
|
||||||
|
mkdir -p $($(package)_extract_dir) && \
|
||||||
|
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||||
|
echo "$($(package)_clang_sha256_hash) $($(package)_source_dir)/$($(package)_clang_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||||
|
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||||
|
mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \
|
||||||
|
tar --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \
|
||||||
|
rm -f toolchain/lib/libc++abi.so* && \
|
||||||
|
echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \
|
||||||
|
echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \
|
||||||
|
chmod +x toolchain/bin/$(host)-dsymutil && \
|
||||||
|
tar --strip-components=1 -xf $($(package)_source)
|
||||||
|
endef
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--target=$(host) --disable-lto-support --with-libtapi=$(host_prefix)
|
$(package)_config_opts=--target=$(host) --disable-lto-support
|
||||||
$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
|
$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
|
||||||
$(package)_cc=$(host_prefix)/native/bin/clang
|
$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang
|
||||||
$(package)_cxx=$(host_prefix)/native/bin/clang++
|
$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++
|
||||||
|
endef
|
||||||
|
|
||||||
|
# If clang gets updated to a version with a fix for https://reviews.llvm.org/D50559
|
||||||
|
# then the patch that skips otool can be removed.
|
||||||
|
define $(package)_preprocess_cmds
|
||||||
|
patch -p0 < $($(package)_patch_dir)/skip_otool.patch && \
|
||||||
|
cd $($(package)_build_subdir); ./autogen.sh && \
|
||||||
|
sed -i.old "/define HAVE_PTHREADS/d" ld64/src/ld/InputFiles.h
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
@@ -24,5 +56,15 @@ endef
|
|||||||
|
|
||||||
define $(package)_stage_cmds
|
define $(package)_stage_cmds
|
||||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install && \
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install && \
|
||||||
cp $($(package)_extract_dir)/cctools/misc/install_name_tool $($(package)_staging_prefix_dir)/bin/
|
cp $($(package)_extract_dir)/cctools/misc/install_name_tool $($(package)_staging_prefix_dir)/bin/ &&\
|
||||||
|
cd $($(package)_extract_dir)/toolchain && \
|
||||||
|
mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include && \
|
||||||
|
mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \
|
||||||
|
cp bin/clang $($(package)_staging_prefix_dir)/bin/ &&\
|
||||||
|
cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\
|
||||||
|
cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
|
||||||
|
cp -rf lib/clang/$($(package)_clang_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include/ && \
|
||||||
|
cp bin/llvm-dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
|
||||||
|
if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \
|
||||||
|
if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi
|
||||||
endef
|
endef
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
package=native_clang
|
|
||||||
$(package)_version=9.0.0
|
|
||||||
$(package)_download_path=https://releases.llvm.org/$($(package)_version)
|
|
||||||
$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz
|
|
||||||
$(package)_file_name=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz
|
|
||||||
$(package)_sha256_hash=a23b082b30c128c9831dbdd96edad26b43f56624d0ad0ea9edec506f5385038d
|
|
||||||
|
|
||||||
define $(package)_extract_cmds
|
|
||||||
echo $($(package)_sha256_hash) $($(package)_source) | sha256sum -c &&\
|
|
||||||
mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \
|
|
||||||
tar --strip-components=1 -C toolchain -xf $($(package)_source) && \
|
|
||||||
rm -f toolchain/lib/libc++abi.so* && \
|
|
||||||
echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \
|
|
||||||
echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \
|
|
||||||
chmod +x toolchain/bin/$(host)-dsymutil
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_stage_cmds
|
|
||||||
cd $($(package)_extract_dir)/toolchain && \
|
|
||||||
mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \
|
|
||||||
mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \
|
|
||||||
cp bin/clang $($(package)_staging_prefix_dir)/bin/ &&\
|
|
||||||
cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\
|
|
||||||
cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
|
|
||||||
cp -rf lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/ && \
|
|
||||||
cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
|
|
||||||
if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \
|
|
||||||
if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi
|
|
||||||
endef
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package=native_libtapi
|
|
||||||
$(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026
|
|
||||||
$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive
|
|
||||||
$(package)_download_file=$($(package)_version).tar.gz
|
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
|
||||||
$(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61
|
|
||||||
$(package)_build_subdir=build
|
|
||||||
$(package)_dependencies=native_clang
|
|
||||||
|
|
||||||
define $(package)_config_cmds
|
|
||||||
echo -n $(build_prefix) > INSTALLPREFIX; \
|
|
||||||
CC=$(host_prefix)/native/bin/clang CXX=$(host_prefix)/native/bin/clang++ \
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \
|
|
||||||
-DLLVM_INCLUDE_TESTS=OFF \
|
|
||||||
-DCMAKE_BUILD_TYPE=RELEASE \
|
|
||||||
-DTAPI_REPOSITORY_STRING="1100.0.11" \
|
|
||||||
-DTAPI_FULL_VERSION="11.0.0" \
|
|
||||||
-DCMAKE_CXX_FLAGS="-I $($(package)_extract_dir)/src/llvm/projects/clang/include -I $($(package)_build_dir)/projects/clang/include" \
|
|
||||||
$($(package)_extract_dir)/src/llvm
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_build_cmds
|
|
||||||
$(MAKE) clangBasic && $(MAKE) libtapi
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_stage_cmds
|
|
||||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install-libtapi install-tapi-headers
|
|
||||||
endef
|
|
||||||
@@ -7,7 +7,8 @@ $(package)_patches=fallback.c
|
|||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_build_opts=CC="$($(package)_cc)"
|
$(package)_build_opts=CC="$($(package)_cc)"
|
||||||
$(package)_config_env=cf_cv_ar_flags=""
|
$(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=--prefix=$(host_prefix)
|
||||||
$(package)_config_opts+=--disable-shared
|
$(package)_config_opts+=--disable-shared
|
||||||
$(package)_config_opts+=--with-build-cc=gcc
|
$(package)_config_opts+=--with-build-cc=gcc
|
||||||
@@ -50,7 +51,7 @@ define $(package)_preprocess_cmds
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
$($(package)_autoconf)
|
./configure $($(package)_config_opts)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
|
|||||||
@@ -1,28 +1,36 @@
|
|||||||
package=openssl
|
package=openssl
|
||||||
$(package)_version=3.0.13
|
$(package)_version=1.0.2r
|
||||||
$(package)_download_path=https://www.openssl.org/source
|
$(package)_download_path=https://ftp.openssl.org/source/old/1.0.2
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313
|
$(package)_sha256_hash=ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6
|
||||||
|
$(package)_patches=fix_arflags.patch
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_env=AR="$($(package)_ar)" ARFLAGS=$($(package)_arflags) RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
|
$(package)_config_env=AR="$($(package)_ar)" ARFLAGS=$($(package)_arflags) RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
|
||||||
$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
|
$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl
|
||||||
$(package)_build_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native"
|
|
||||||
$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl --libdir=$(host_prefix)/lib
|
|
||||||
$(package)_config_opts+=no-capieng
|
$(package)_config_opts+=no-capieng
|
||||||
$(package)_config_opts+=no-dso
|
$(package)_config_opts+=no-dso
|
||||||
$(package)_config_opts+=no-dtls1
|
$(package)_config_opts+=no-dtls1
|
||||||
$(package)_config_opts+=no-ec_nistp_64_gcc_128
|
$(package)_config_opts+=no-ec_nistp_64_gcc_128
|
||||||
$(package)_config_opts+=no-gost
|
$(package)_config_opts+=no-gost
|
||||||
|
$(package)_config_opts+=no-gmp
|
||||||
|
$(package)_config_opts+=no-heartbeats
|
||||||
|
$(package)_config_opts+=no-jpake
|
||||||
|
$(package)_config_opts+=no-krb5
|
||||||
|
$(package)_config_opts+=no-libunbound
|
||||||
$(package)_config_opts+=no-md2
|
$(package)_config_opts+=no-md2
|
||||||
$(package)_config_opts+=no-rc5
|
$(package)_config_opts+=no-rc5
|
||||||
$(package)_config_opts+=no-rdrand
|
$(package)_config_opts+=no-rdrand
|
||||||
$(package)_config_opts+=no-rfc3779
|
$(package)_config_opts+=no-rfc3779
|
||||||
|
$(package)_config_opts+=no-rsax
|
||||||
$(package)_config_opts+=no-sctp
|
$(package)_config_opts+=no-sctp
|
||||||
|
$(package)_config_opts+=no-sha0
|
||||||
$(package)_config_opts+=no-shared
|
$(package)_config_opts+=no-shared
|
||||||
$(package)_config_opts+=no-ssl-trace
|
$(package)_config_opts+=no-ssl-trace
|
||||||
|
$(package)_config_opts+=no-ssl2
|
||||||
$(package)_config_opts+=no-ssl3
|
$(package)_config_opts+=no-ssl3
|
||||||
$(package)_config_opts+=no-tests
|
$(package)_config_opts+=no-static_engine
|
||||||
|
$(package)_config_opts+=no-store
|
||||||
$(package)_config_opts+=no-unit-test
|
$(package)_config_opts+=no-unit-test
|
||||||
$(package)_config_opts+=no-weak-ssl-ciphers
|
$(package)_config_opts+=no-weak-ssl-ciphers
|
||||||
$(package)_config_opts+=no-zlib
|
$(package)_config_opts+=no-zlib
|
||||||
@@ -34,9 +42,8 @@ $(package)_config_opts_x86_64_linux=linux-x86_64
|
|||||||
$(package)_config_opts_i686_linux=linux-generic32
|
$(package)_config_opts_i686_linux=linux-generic32
|
||||||
$(package)_config_opts_arm_linux=linux-generic32
|
$(package)_config_opts_arm_linux=linux-generic32
|
||||||
$(package)_config_opts_aarch64_linux=linux-generic64
|
$(package)_config_opts_aarch64_linux=linux-generic64
|
||||||
$(package)_config_opts_arm_android=--static android-arm
|
$(package)_config_opts_arm_android=--static android-armv7 no-asm
|
||||||
$(package)_config_opts_aarch64_android=--static android-arm64
|
$(package)_config_opts_aarch64_android=--static android no-asm
|
||||||
$(package)_config_opts_aarch64_darwin=darwin64-arm64-cc
|
|
||||||
$(package)_config_opts_riscv64_linux=linux-generic64
|
$(package)_config_opts_riscv64_linux=linux-generic64
|
||||||
$(package)_config_opts_mipsel_linux=linux-generic32
|
$(package)_config_opts_mipsel_linux=linux-generic32
|
||||||
$(package)_config_opts_mips_linux=linux-generic32
|
$(package)_config_opts_mips_linux=linux-generic32
|
||||||
@@ -48,7 +55,10 @@ $(package)_config_opts_x86_64_freebsd=BSD-x86_64
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
sed -i.old 's|crypto ssl apps util tools fuzz providers doc|crypto ssl util tools providers|' build.info
|
sed -i.old "/define DATE/d" util/mkbuildinf.pl && \
|
||||||
|
sed -i.old "s|engines apps test|engines|" Makefile.org && \
|
||||||
|
sed -i -e "s/-mandroid //" Configure && \
|
||||||
|
patch < $($(package)_patch_dir)/fix_arflags.patch
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
@@ -56,11 +66,11 @@ define $(package)_config_cmds
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
$(MAKE) build_libs
|
$(MAKE) -j1 build_libs libcrypto.pc libssl.pc openssl.pc
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_stage_cmds
|
define $(package)_stage_cmds
|
||||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install_sw
|
$(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_postprocess_cmds
|
define $(package)_postprocess_cmds
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
packages:=boost openssl zeromq libiconv expat unbound
|
packages:=boost openssl zeromq libiconv
|
||||||
|
|
||||||
# ccache is useless in gitian builds
|
|
||||||
ifneq ($(GITIAN),1)
|
|
||||||
native_packages := native_ccache
|
native_packages := native_ccache
|
||||||
endif
|
|
||||||
|
|
||||||
hardware_packages := hidapi protobuf libusb
|
hardware_packages := hidapi protobuf libusb
|
||||||
hardware_native_packages := native_protobuf
|
hardware_native_packages := native_protobuf
|
||||||
@@ -11,8 +8,8 @@ hardware_native_packages := native_protobuf
|
|||||||
android_native_packages = android_ndk
|
android_native_packages = android_ndk
|
||||||
android_packages = ncurses readline sodium
|
android_packages = ncurses readline sodium
|
||||||
|
|
||||||
darwin_native_packages = $(hardware_native_packages)
|
darwin_native_packages = native_biplist native_ds_store native_mac_alias $(hardware_native_packages)
|
||||||
darwin_packages = ncurses readline sodium $(hardware_packages)
|
darwin_packages = sodium ncurses readline $(hardware_packages)
|
||||||
|
|
||||||
# not really native...
|
# not really native...
|
||||||
freebsd_native_packages = freebsd_base
|
freebsd_native_packages = freebsd_base
|
||||||
@@ -20,6 +17,7 @@ freebsd_packages = ncurses readline sodium
|
|||||||
|
|
||||||
linux_packages = eudev ncurses readline sodium $(hardware_packages)
|
linux_packages = eudev ncurses readline sodium $(hardware_packages)
|
||||||
linux_native_packages = $(hardware_native_packages)
|
linux_native_packages = $(hardware_native_packages)
|
||||||
|
qt_packages = qt
|
||||||
|
|
||||||
ifeq ($(build_tests),ON)
|
ifeq ($(build_tests),ON)
|
||||||
packages += gtest
|
packages += gtest
|
||||||
@@ -33,6 +31,6 @@ mingw32_packages = icu4c sodium $(hardware_packages)
|
|||||||
mingw32_native_packages = $(hardware_native_packages)
|
mingw32_native_packages = $(hardware_native_packages)
|
||||||
|
|
||||||
ifneq ($(build_os),darwin)
|
ifneq ($(build_os),darwin)
|
||||||
darwin_native_packages += darwin_sdk native_clang native_cctools native_libtapi
|
darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,12 @@ $(package)_file_name=$(native_$(package)_file_name)
|
|||||||
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
||||||
$(package)_dependencies=native_$(package)
|
$(package)_dependencies=native_$(package)
|
||||||
$(package)_cxxflags=-std=c++11
|
$(package)_cxxflags=-std=c++11
|
||||||
$(package)_patches=visibility.patch
|
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
|
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
|
||||||
$(package)_config_opts_linux=--with-pic
|
$(package)_config_opts_linux=--with-pic
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
|
||||||
patch -p0 < $($(package)_patch_dir)/visibility.patch
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
|
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
|
||||||
endef
|
endef
|
||||||
|
|||||||
175
contrib/depends/packages/qt.mk
Normal file
175
contrib/depends/packages/qt.mk
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
PACKAGE=qt
|
||||||
|
$(package)_version=5.15.1
|
||||||
|
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
|
||||||
|
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
|
||||||
|
$(package)_file_name=qtbase-$($(package)_suffix)
|
||||||
|
$(package)_sha256_hash=33960404d579675b7210de103ed06a72613bfc4305443e278e2d32a3eb1f3d8c
|
||||||
|
$(package)_build_subdir=qtbase
|
||||||
|
$(package)_qt_libs=corelib
|
||||||
|
$(package)_patches=fix_qt_pkgconfig.patch fix_no_printer.patch fix_rcc_determinism.patch no-xlib.patch
|
||||||
|
|
||||||
|
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
||||||
|
$(package)_qttranslations_sha256_hash=46e0c0e3a511fbcc803a4146204062e47f6ed43b34d98a3c27372a03b8746bd8
|
||||||
|
|
||||||
|
$(package)_qttools_file_name=qttools-$($(package)_suffix)
|
||||||
|
$(package)_qttools_sha256_hash=c98ee5f0f980bf68cbf0c94d62434816a92441733de50bd9adbe9b9055f03498
|
||||||
|
|
||||||
|
$(package)_extra_sources = $($(package)_qttranslations_file_name)
|
||||||
|
$(package)_extra_sources += $($(package)_qttools_file_name)
|
||||||
|
|
||||||
|
define $(package)_set_vars
|
||||||
|
$(package)_config_opts_release = -release
|
||||||
|
$(package)_config_opts_debug = -debug
|
||||||
|
$(package)_config_opts += -bindir $(build_prefix)/bin
|
||||||
|
$(package)_config_opts += -c++std c++11
|
||||||
|
$(package)_config_opts += -confirm-license
|
||||||
|
$(package)_config_opts += -dbus-runtime
|
||||||
|
$(package)_config_opts += -hostprefix $(build_prefix)
|
||||||
|
$(package)_config_opts += -no-compile-examples
|
||||||
|
$(package)_config_opts += -no-cups
|
||||||
|
$(package)_config_opts += -no-egl
|
||||||
|
$(package)_config_opts += -no-eglfs
|
||||||
|
$(package)_config_opts += -no-evdev
|
||||||
|
$(package)_config_opts += -no-gui
|
||||||
|
$(package)_config_opts += -no-freetype
|
||||||
|
$(package)_config_opts += -no-gif
|
||||||
|
$(package)_config_opts += -no-glib
|
||||||
|
$(package)_config_opts += -no-icu
|
||||||
|
$(package)_config_opts += -no-ico
|
||||||
|
$(package)_config_opts += -no-iconv
|
||||||
|
$(package)_config_opts += -no-kms
|
||||||
|
$(package)_config_opts += -no-linuxfb
|
||||||
|
$(package)_config_opts += -no-libjpeg
|
||||||
|
$(package)_config_opts += -no-libudev
|
||||||
|
$(package)_config_opts += -no-mtdev
|
||||||
|
$(package)_config_opts += -no-openvg
|
||||||
|
$(package)_config_opts += -no-reduce-relocations
|
||||||
|
$(package)_config_opts += -no-sql-db2
|
||||||
|
$(package)_config_opts += -no-sql-ibase
|
||||||
|
$(package)_config_opts += -no-sql-oci
|
||||||
|
$(package)_config_opts += -no-sql-tds
|
||||||
|
$(package)_config_opts += -no-sql-mysql
|
||||||
|
$(package)_config_opts += -no-sql-odbc
|
||||||
|
$(package)_config_opts += -no-sql-psql
|
||||||
|
$(package)_config_opts += -no-sql-sqlite
|
||||||
|
$(package)_config_opts += -no-sql-sqlite2
|
||||||
|
$(package)_config_opts += -no-use-gold-linker
|
||||||
|
$(package)_config_opts += -nomake examples
|
||||||
|
$(package)_config_opts += -nomake tests
|
||||||
|
$(package)_config_opts += -opensource
|
||||||
|
$(package)_config_opts += -no-openssl
|
||||||
|
$(package)_config_opts += -optimized-qmake
|
||||||
|
$(package)_config_opts += -pch
|
||||||
|
$(package)_config_opts += -pkg-config
|
||||||
|
$(package)_config_opts += -prefix $(host_prefix)
|
||||||
|
$(package)_config_opts += -no-libpng
|
||||||
|
$(package)_config_opts += -qt-pcre
|
||||||
|
$(package)_config_opts += -qt-harfbuzz
|
||||||
|
$(package)_config_opts += -no-zlib
|
||||||
|
$(package)_config_opts += -static
|
||||||
|
$(package)_config_opts += -silent
|
||||||
|
$(package)_config_opts += -v
|
||||||
|
$(package)_config_opts += -no-feature-bearermanagement
|
||||||
|
$(package)_config_opts += -no-feature-colordialog
|
||||||
|
$(package)_config_opts += -no-feature-dial
|
||||||
|
$(package)_config_opts += -no-feature-filesystemwatcher
|
||||||
|
$(package)_config_opts += -no-feature-fontcombobox
|
||||||
|
$(package)_config_opts += -no-feature-ftp
|
||||||
|
$(package)_config_opts += -no-feature-image_heuristic_mask
|
||||||
|
$(package)_config_opts += -no-feature-keysequenceedit
|
||||||
|
$(package)_config_opts += -no-feature-lcdnumber
|
||||||
|
$(package)_config_opts += -no-feature-pdf
|
||||||
|
$(package)_config_opts += -no-feature-printdialog
|
||||||
|
$(package)_config_opts += -no-feature-printer
|
||||||
|
$(package)_config_opts += -no-feature-printpreviewdialog
|
||||||
|
$(package)_config_opts += -no-feature-printpreviewwidget
|
||||||
|
$(package)_config_opts += -no-feature-sessionmanager
|
||||||
|
$(package)_config_opts += -no-feature-sql
|
||||||
|
$(package)_config_opts += -no-feature-statemachine
|
||||||
|
$(package)_config_opts += -no-feature-syntaxhighlighter
|
||||||
|
$(package)_config_opts += -no-feature-textbrowser
|
||||||
|
$(package)_config_opts += -no-feature-textodfwriter
|
||||||
|
$(package)_config_opts += -no-feature-topleveldomain
|
||||||
|
$(package)_config_opts += -no-feature-udpsocket
|
||||||
|
$(package)_config_opts += -no-feature-undocommand
|
||||||
|
$(package)_config_opts += -no-feature-undogroup
|
||||||
|
$(package)_config_opts += -no-feature-undostack
|
||||||
|
$(package)_config_opts += -no-feature-undoview
|
||||||
|
$(package)_config_opts += -no-feature-vnc
|
||||||
|
$(package)_config_opts += -no-feature-wizard
|
||||||
|
$(package)_config_opts_linux = -no-fontconfig
|
||||||
|
$(package)_config_opts_linux += -no-opengl
|
||||||
|
$(package)_config_opts_linux += -no-xcb
|
||||||
|
$(package)_config_opts_linux += -no-feature-xlib
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_fetch_cmds
|
||||||
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
|
||||||
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
|
||||||
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_extract_cmds
|
||||||
|
mkdir -p $($(package)_extract_dir) && \
|
||||||
|
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||||
|
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||||
|
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||||
|
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||||
|
mkdir qtbase && \
|
||||||
|
tar --strip-components=1 -xf $($(package)_source) -C qtbase && \
|
||||||
|
mkdir qttranslations && \
|
||||||
|
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
|
||||||
|
mkdir qttools && \
|
||||||
|
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define $(package)_preprocess_cmds
|
||||||
|
sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \
|
||||||
|
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
|
||||||
|
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
|
||||||
|
sed -i.old "s/src_plugins.depends = src_sql src_network/src_plugins.depends = src_network/" qtbase/src/src.pro && \
|
||||||
|
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
|
||||||
|
sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
||||||
|
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
|
||||||
|
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \
|
||||||
|
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
||||||
|
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
||||||
|
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
||||||
|
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
|
||||||
|
echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf && \
|
||||||
|
echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf && \
|
||||||
|
sed -i.old "s|QMAKE_CFLAGS += |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
|
||||||
|
sed -i.old "s|QMAKE_CXXFLAGS += |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
|
||||||
|
sed -i.old "0,/^QMAKE_LFLAGS_/s|^QMAKE_LFLAGS_|!host_build: QMAKE_LFLAGS = $($(package)_ldflags)\n&|" qtbase/mkspecs/win32-g++/qmake.conf && \
|
||||||
|
sed -i.old "s/LIBRARY_PATH/(CROSS_)?\0/g" qtbase/mkspecs/features/toolchain.prf
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_config_cmds
|
||||||
|
export PKG_CONFIG_SYSROOT_DIR=/ && \
|
||||||
|
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
|
||||||
|
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
|
||||||
|
./configure $($(package)_config_opts) && \
|
||||||
|
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
|
||||||
|
$(MAKE) sub-src-clean && \
|
||||||
|
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
|
||||||
|
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
|
||||||
|
cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_build_cmds
|
||||||
|
$(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
|
||||||
|
$(MAKE) -C ../qttools/src/linguist/lrelease && \
|
||||||
|
$(MAKE) -C ../qttranslations
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_stage_cmds
|
||||||
|
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. &&\
|
||||||
|
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
|
||||||
|
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets
|
||||||
|
endef
|
||||||
|
|
||||||
|
define $(package)_postprocess_cmds
|
||||||
|
rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \
|
||||||
|
rm -f lib/lib*.la lib/*.prl plugins/*/*.prl
|
||||||
|
endef
|
||||||
@@ -7,16 +7,19 @@ $(package)_dependencies=ncurses
|
|||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_build_opts=CC="$($(package)_cc)"
|
$(package)_build_opts=CC="$($(package)_cc)"
|
||||||
|
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" LDFLAGS="-L$(host_prefix)/lib" ARFLAGS=$($(package)_arflags)
|
||||||
|
$(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+=--prefix=$(host_prefix)
|
||||||
$(package)_config_opts+=--exec-prefix=$(host_prefix)
|
$(package)_config_opts+=--exec-prefix=$(host_prefix)
|
||||||
$(package)_config_opts+=--host=$(HOST)
|
$(package)_config_opts+=--host=$(HOST)
|
||||||
$(package)_config_opts+=--disable-shared --with-curses
|
$(package)_config_opts+=--disable-shared --with-curses
|
||||||
$(package)_config_opts_release=--disable-debug-mode
|
$(package)_config_opts_release=--disable-debug-mode
|
||||||
|
$(package)_config_opts_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)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
|
$(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
$($(package)_autoconf)
|
./configure $($(package)_config_opts)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
|
|||||||
@@ -8,16 +8,15 @@ $(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
|
|||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--enable-static --disable-shared
|
$(package)_config_opts=--enable-static --disable-shared
|
||||||
$(package)_config_opts+=--prefix=$(host_prefix)
|
$(package)_config_opts+=--prefix=$(host_prefix)
|
||||||
endef
|
$(package)_config_opts_android=RANLIB=$($(package)_ranlib) AR=$($(package)_ar) CC=$($(package)_cc)
|
||||||
|
$(package)_config_opts_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)"
|
||||||
define $(package)_preprocess_cmds
|
|
||||||
patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
|
|
||||||
autoconf &&\
|
|
||||||
patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
|
patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
|
||||||
|
./autogen.sh &&\
|
||||||
|
patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch &&\
|
||||||
|
$($(package)_autoconf) $($(package)_config_opts) AR_FLAGS=$($(package)_arflags)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
|
|||||||
@@ -1,30 +1,19 @@
|
|||||||
package=unbound
|
package=unbound
|
||||||
$(package)_version=1.19.1
|
$(package)_version=1.6.8
|
||||||
$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
|
$(package)_download_path=https://www.unbound.net/downloads/
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=bc1d576f3dd846a0739adc41ffaa702404c6767d2b6082deb9f2f97cbb24a3a9
|
$(package)_sha256_hash=e3b428e33f56a45417107448418865fe08d58e0e7fea199b855515f60884dd49
|
||||||
$(package)_dependencies=openssl expat
|
$(package)_dependencies=openssl expat ldns
|
||||||
$(package)_patches=disable-glibc-reallocarray.patch
|
|
||||||
|
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix)
|
$(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix) --with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads
|
||||||
$(package)_config_opts+=--with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no
|
|
||||||
$(package)_config_opts+=--without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only
|
|
||||||
$(package)_config_opts_linux=--with-pic
|
$(package)_config_opts_linux=--with-pic
|
||||||
$(package)_config_opts_w64=--enable-static-exe --sysconfdir=/etc --prefix=$(host_prefix) --target=$(host_prefix)
|
$(package)_config_opts_w64=--enable-static-exe --sysconfdir=/etc --prefix=$(host_prefix) --target=$(host_prefix)
|
||||||
$(package)_config_opts_x86_64_darwin=ac_cv_func_SHA384_Init=yes
|
|
||||||
$(package)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread"
|
$(package)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread"
|
||||||
$(package)_cflags_mingw32+="-D_WIN32_WINNT=0x600"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
|
||||||
patch -p1 < $($(package)_patch_dir)/disable-glibc-reallocarray.patch &&\
|
|
||||||
autoconf
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
$($(package)_autoconf) ac_cv_func_getentropy=no
|
$($(package)_autoconf) $($(package)_config_opts)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
@@ -34,3 +23,6 @@ endef
|
|||||||
define $(package)_stage_cmds
|
define $(package)_stage_cmds
|
||||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define $(package)_postprocess_cmds
|
||||||
|
endef
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package=unwind
|
package=unwind
|
||||||
$(package)_version=1.5.0
|
$(package)_version=1.2
|
||||||
$(package)_download_path=https://download.savannah.nongnu.org/releases/libunwind
|
$(package)_download_path=https://download.savannah.nongnu.org/releases/libunwind
|
||||||
$(package)_file_name=lib$(package)-$($(package)_version).tar.gz
|
$(package)_file_name=lib$(package)-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017
|
$(package)_sha256_hash=1de38ffbdc88bd694d10081865871cd2bfbb02ad8ef9e1606aee18d65532b992
|
||||||
$(package)_patches=fix_obj_order.patch
|
$(package)_patches=fix_obj_order.patch
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
@@ -12,7 +12,7 @@ endef
|
|||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
cp -f $(BASEDIR)/config.guess config/config.guess &&\
|
cp -f $(BASEDIR)/config.guess config/config.guess &&\
|
||||||
cp -f $(BASEDIR)/config.sub config/config.sub &&\
|
cp -f $(BASEDIR)/config.sub config/config.sub &&\
|
||||||
$($(package)_autoconf) --disable-shared --enable-static --disable-tests --disable-documentation AR_FLAGS=$($(package)_arflags)
|
$($(package)_autoconf) --disable-shared --enable-static AR_FLAGS=$($(package)_arflags)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package=zeromq
|
package=zeromq
|
||||||
$(package)_version=4.3.4
|
$(package)_version=4.1.7
|
||||||
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
|
$(package)_download_path=https://github.com/zeromq/zeromq4-1/releases/download/v$($(package)_version)/
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
|
$(package)_sha256_hash=31c383cfcd3be1dc8a66e448c403029e793687e70473b89c4cc0bd626e7da299
|
||||||
$(package)_patches=06aba27b04c5822cb88a69677382a0f053367143.patch
|
$(package)_patches=9114d3957725acd34aa8b8d011585812f3369411.patch 9e6745c12e0b100cd38acecc16ce7db02905e27c.patch ffe62d3398d5e0191f554f61049aa7ec9fc892ae.patch
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
|
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
|
||||||
@@ -13,7 +13,10 @@ define $(package)_set_vars
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
patch -p1 < $($(package)_patch_dir)/06aba27b04c5822cb88a69677382a0f053367143.patch
|
patch -p1 < $($(package)_patch_dir)/9114d3957725acd34aa8b8d011585812f3369411.patch && \
|
||||||
|
patch -p1 < $($(package)_patch_dir)/9e6745c12e0b100cd38acecc16ce7db02905e27c.patch && \
|
||||||
|
patch -p1 < $($(package)_patch_dir)/ffe62d3398d5e0191f554f61049aa7ec9fc892ae.patch && \
|
||||||
|
./autogen.sh
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
@@ -21,7 +24,7 @@ define $(package)_config_cmds
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_build_cmds
|
define $(package)_build_cmds
|
||||||
$(MAKE) src/libzmq.la
|
$(MAKE) libzmq.la
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_stage_cmds
|
define $(package)_stage_cmds
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
--- boost_1_64_0/tools/build/src/tools/darwin.jam.O 2017-04-17 03:22:26.000000000 +0100
|
|
||||||
+++ boost_1_64_0/tools/build/src/tools/darwin.jam 2022-05-04 17:26:29.984464447 +0000
|
|
||||||
@@ -505,7 +505,7 @@
|
|
||||||
if $(instruction-set) {
|
|
||||||
options = -arch$(_)$(instruction-set) ;
|
|
||||||
} else {
|
|
||||||
- options = -arch arm ;
|
|
||||||
+# options = -arch arm ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
From a77b066311da42ed7654e39c0356a3b951b2e296 Mon Sep 17 00:00:00 2001
|
|
||||||
From: selsta <selsta@sent.at>
|
|
||||||
Date: Wed, 10 Nov 2021 02:28:54 +0100
|
|
||||||
Subject: [PATCH] windows: add missing include for mingw32
|
|
||||||
|
|
||||||
---
|
|
||||||
windows/hid.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/windows/hid.c b/windows/hid.c
|
|
||||||
index 24756a4..6d8394c 100644
|
|
||||||
--- a/windows/hid.c
|
|
||||||
+++ b/windows/hid.c
|
|
||||||
@@ -33,6 +33,7 @@ typedef LONG NTSTATUS;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
+#include <devpropdef.h>
|
|
||||||
#include <ntdef.h>
|
|
||||||
#include <winbase.h>
|
|
||||||
#endif
|
|
||||||
12
contrib/depends/patches/native_cctools/skip_otool.patch
Normal file
12
contrib/depends/patches/native_cctools/skip_otool.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
--- 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
|
||||||
24
contrib/depends/patches/openssl/fix_arflags.patch
Normal file
24
contrib/depends/patches/openssl/fix_arflags.patch
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
--- Makefile.org.O 2019-02-26 14:20:20.000000000 +0000
|
||||||
|
+++ Makefile.org 2019-11-15 13:05:54.370086856 +0000
|
||||||
|
@@ -63,8 +63,8 @@
|
||||||
|
PEX_LIBS=
|
||||||
|
EX_LIBS=
|
||||||
|
EXE_EXT=
|
||||||
|
-ARFLAGS=
|
||||||
|
-AR=ar $(ARFLAGS) r
|
||||||
|
+ARFLAGS= r
|
||||||
|
+AR=ar $(ARFLAGS)
|
||||||
|
RANLIB= ranlib
|
||||||
|
RC= windres
|
||||||
|
NM= nm
|
||||||
|
--- Configure.O 2019-02-26 14:20:20.000000000 +0000
|
||||||
|
+++ Configure 2019-11-16 07:43:14.933990774 +0000
|
||||||
|
@@ -1251,7 +1251,7 @@
|
||||||
|
my $shared_extension = $fields[$idx_shared_extension];
|
||||||
|
my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib];
|
||||||
|
my $ar = $ENV{'AR'} || "ar";
|
||||||
|
-my $arflags = $fields[$idx_arflags];
|
||||||
|
+my $arflags = $ENV{'ARFLAGS'} || $fields[$idx_arflags];
|
||||||
|
my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres";
|
||||||
|
my $multilib = $fields[$idx_multilib];
|
||||||
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
--- src/google/protobuf/descriptor.cc.O 2018-07-30 22:16:10.000000000 +0000
|
|
||||||
+++ src/google/protobuf/descriptor.cc 2022-05-06 13:38:14.827309092 +0000
|
|
||||||
@@ -32,6 +32,9 @@
|
|
||||||
// Based on original Protocol Buffers design by
|
|
||||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
||||||
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
#include <algorithm>
|
|
||||||
#include <functional>
|
|
||||||
#include <google/protobuf/stubs/hash.h>
|
|
||||||
@@ -7274,3 +7277,6 @@
|
|
||||||
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
--- src/google/protobuf/extension_set.cc.O 2018-07-23 20:56:42.000000000 +0000
|
|
||||||
+++ src/google/protobuf/extension_set.cc 2022-05-06 14:48:55.369877050 +0000
|
|
||||||
@@ -32,6 +32,9 @@
|
|
||||||
// Based on original Protocol Buffers design by
|
|
||||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
||||||
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
#include <google/protobuf/stubs/hash.h>
|
|
||||||
#include <tuple>
|
|
||||||
#include <utility>
|
|
||||||
@@ -1914,3 +1917,6 @@
|
|
||||||
} // namespace internal
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
--- src/google/protobuf/extension_set_heavy.cc.O 2018-07-30 22:16:10.000000000 +0000
|
|
||||||
+++ src/google/protobuf/extension_set_heavy.cc 2022-05-06 14:14:27.847320946 +0000
|
|
||||||
@@ -35,6 +35,10 @@
|
|
||||||
// Contains methods defined in extension_set.h which cannot be part of the
|
|
||||||
// lite library because they use descriptors or reflection.
|
|
||||||
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <google/protobuf/stubs/casts.h>
|
|
||||||
#include <google/protobuf/descriptor.pb.h>
|
|
||||||
#include <google/protobuf/io/coded_stream.h>
|
|
||||||
@@ -814,3 +818,6 @@
|
|
||||||
} // namespace internal
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
--- src/google/protobuf/generated_message_reflection.cc.O 2018-07-23 20:56:42.000000000 +0000
|
|
||||||
+++ src/google/protobuf/generated_message_reflection.cc 2022-05-06 13:38:49.655540772 +0000
|
|
||||||
@@ -32,6 +32,9 @@
|
|
||||||
// Based on original Protocol Buffers design by
|
|
||||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
||||||
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
#include <algorithm>
|
|
||||||
#include <set>
|
|
||||||
|
|
||||||
@@ -2420,3 +2423,6 @@
|
|
||||||
} // namespace internal
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
--- src/google/protobuf/map_field.cc.O 2018-07-23 20:56:42.000000000 +0000
|
|
||||||
+++ src/google/protobuf/map_field.cc 2022-05-06 13:34:44.913905697 +0000
|
|
||||||
@@ -28,6 +28,10 @@
|
|
||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <google/protobuf/map_field.h>
|
|
||||||
#include <google/protobuf/map_field_inl.h>
|
|
||||||
|
|
||||||
@@ -462,3 +466,6 @@
|
|
||||||
} // namespace internal
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
--- src/google/protobuf/text_format.cc.O 2018-07-30 22:16:11.000000000 +0000
|
|
||||||
+++ src/google/protobuf/text_format.cc 2022-05-06 13:34:58.881999517 +0000
|
|
||||||
@@ -32,6 +32,10 @@
|
|
||||||
// Based on original Protocol Buffers design by
|
|
||||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
||||||
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <algorithm>
|
|
||||||
#include <float.h>
|
|
||||||
#include <math.h>
|
|
||||||
@@ -2258,3 +2262,6 @@
|
|
||||||
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
--- src/google/protobuf/wire_format.cc.O 2018-07-23 20:56:42.000000000 +0000
|
|
||||||
+++ src/google/protobuf/wire_format.cc 2022-05-06 13:06:23.294219228 +0000
|
|
||||||
@@ -32,6 +32,10 @@
|
|
||||||
// Based on original Protocol Buffers design by
|
|
||||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
||||||
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <stack>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
@@ -1445,3 +1449,7 @@
|
|
||||||
} // namespace internal
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
--- src/google/protobuf/stubs/status.cc.O 2018-07-23 20:56:42.000000000 +0000
|
|
||||||
+++ src/google/protobuf/stubs/status.cc 2022-05-06 15:18:53.393208814 +0000
|
|
||||||
@@ -27,6 +27,11 @@
|
|
||||||
// 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.
|
|
||||||
+
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility push(hidden)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <google/protobuf/stubs/status.h>
|
|
||||||
|
|
||||||
#include <ostream>
|
|
||||||
@@ -132,3 +137,6 @@
|
|
||||||
} // namespace util
|
|
||||||
} // namespace protobuf
|
|
||||||
} // namespace google
|
|
||||||
+#if defined(__APPLE__) && defined(__arm64__)
|
|
||||||
+#pragma GCC visibility pop
|
|
||||||
+#endif
|
|
||||||
19
contrib/depends/patches/qt/fix_no_printer.patch
Normal file
19
contrib/depends/patches/qt/fix_no_printer.patch
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
--- 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
|
||||||
11
contrib/depends/patches/qt/fix_qt_pkgconfig.patch
Normal file
11
contrib/depends/patches/qt/fix_qt_pkgconfig.patch
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
--- old/qtbase/mkspecs/features/qt_module.prf
|
||||||
|
+++ new/qtbase/mkspecs/features/qt_module.prf
|
||||||
|
@@ -269,7 +269,7 @@ load(qt_installs)
|
||||||
|
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)) {
|
||||||
|
CONFIG += create_pc
|
||||||
|
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||||
|
host_build: \
|
||||||
15
contrib/depends/patches/qt/fix_rcc_determinism.patch
Normal file
15
contrib/depends/patches/qt/fix_rcc_determinism.patch
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
--- 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');
|
||||||
|
}
|
||||||
69
contrib/depends/patches/qt/no-xlib.patch
Normal file
69
contrib/depends/patches/qt/no-xlib.patch
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
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
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 5c7da197..e2b25288 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1702,6 +1702,9 @@ AC_LINK_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT
|
|
||||||
#ifndef _OPENBSD_SOURCE
|
|
||||||
#define _OPENBSD_SOURCE 1
|
|
||||||
#endif
|
|
||||||
+#ifdef __linux__
|
|
||||||
+# error reallocarray() is currently disabled on Linux to support glibc < 2.26
|
|
||||||
+#endif
|
|
||||||
#include <stdlib.h>
|
|
||||||
int main(void) {
|
|
||||||
void* p = reallocarray(NULL, 10, 100);
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
--- config/ltmain.sh.0 2020-11-10 17:25:26.000000000 +0100
|
--- config/ltmain.sh.O 2017-01-13 16:00:54.000000000 +0000
|
||||||
+++ config/ltmain.sh 2021-09-11 19:39:36.000000000 +0200
|
+++ config/ltmain.sh 2019-11-17 06:46:51.994402494 +0000
|
||||||
@@ -10768,6 +10768,8 @@
|
@@ -7957,6 +7957,8 @@
|
||||||
|
esac
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
|
||||||
tool_oldlib=$func_to_tool_file_result
|
|
||||||
+ oldobjs=`for obj in $oldobjs; do echo $obj; done | sort`
|
+ oldobjs=`for obj in $oldobjs; do echo $obj; done | sort`
|
||||||
+ oldobjs=" `echo $oldobjs`"
|
+ oldobjs=" `echo $oldobjs`"
|
||||||
eval cmds=\"$old_archive_cmds\"
|
eval cmds=\"$old_archive_cmds\"
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
From 06aba27b04c5822cb88a69677382a0f053367143 Mon Sep 17 00:00:00 2001
|
|
||||||
From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com>
|
|
||||||
Date: Thu, 22 Jul 2021 21:53:19 -0700
|
|
||||||
Subject: [PATCH] fix: building libzmq fails with error src/clock.cpp:131:16:
|
|
||||||
error: unused variable 'nsecs_per_usec'
|
|
||||||
|
|
||||||
---
|
|
||||||
src/clock.cpp | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/clock.cpp b/src/clock.cpp
|
|
||||||
index 93da90a8e..63c0100a5 100644
|
|
||||||
--- a/src/clock.cpp
|
|
||||||
+++ b/src/clock.cpp
|
|
||||||
@@ -195,6 +195,7 @@ uint64_t zmq::clock_t::now_us ()
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
+ LIBZMQ_UNUSED (nsecs_per_usec);
|
|
||||||
// Use POSIX gettimeofday function to get precise time.
|
|
||||||
struct timeval tv;
|
|
||||||
int rc = gettimeofday (&tv, NULL);
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
From 9114d3957725acd34aa8b8d011585812f3369411 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeroen Ooms <jeroenooms@gmail.com>
|
||||||
|
Date: Tue, 20 Oct 2015 13:10:38 +0200
|
||||||
|
Subject: [PATCH] enable static libraries on mingw
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 393505b..e92131a 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -265,7 +265,7 @@ case "${host_os}" in
|
||||||
|
libzmq_dso_visibility="no"
|
||||||
|
|
||||||
|
if test "x$enable_static" = "xyes"; then
|
||||||
|
- AC_MSG_ERROR([Building static libraries is not supported under MinGW32])
|
||||||
|
+ CPPFLAGS="-DZMQ_STATIC"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set FD_SETSIZE to 1024
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
From 9e6745c12e0b100cd38acecc16ce7db02905e27c Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Millard <dmillard10@gmail.com>
|
||||||
|
Date: Tue, 10 May 2016 13:53:53 -0700
|
||||||
|
Subject: [PATCH] Fix autotools for static MinGW builds
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 5a0fa14..def6ea7 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -259,7 +259,7 @@ case "${host_os}" in
|
||||||
|
libzmq_dso_visibility="no"
|
||||||
|
|
||||||
|
if test "x$enable_static" = "xyes"; then
|
||||||
|
- CPPFLAGS="-DZMQ_STATIC"
|
||||||
|
+ CPPFLAGS="-DZMQ_STATIC $CPPFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set FD_SETSIZE to 1024
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
From ffe62d3398d5e0191f554f61049aa7ec9fc892ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gregory Lemercier <greglemercier@free.fr>
|
||||||
|
Date: Sun, 7 Oct 2018 18:06:54 +0200
|
||||||
|
Subject: [PATCH] Fix build on arm64 architectures with some strict compilers
|
||||||
|
|
||||||
|
This patch fixes an issue that occurs on 64-bit architetures under
|
||||||
|
strict compiler rules. The code initially checked that the received
|
||||||
|
size stored in 'uint64_t' was not bigger than the max value of a
|
||||||
|
'size_t' variable, which is legitimate on 32-bit architectures where
|
||||||
|
'size_t' variables are stored on 32 bits. On 64-bit architectures,
|
||||||
|
this test no longer makes sense since 'uint64_t' and 'size_t' types
|
||||||
|
have the same size. The issue is fixed by ignoring this portion
|
||||||
|
of code when built for arm64.
|
||||||
|
---
|
||||||
|
src/v1_decoder.cpp | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/v1_decoder.cpp b/src/v1_decoder.cpp
|
||||||
|
index b002dc9d..2c8c97a7 100644
|
||||||
|
--- a/src/v1_decoder.cpp
|
||||||
|
+++ b/src/v1_decoder.cpp
|
||||||
|
@@ -114,11 +114,13 @@ int zmq::v1_decoder_t::eight_byte_size_ready ()
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef __aarch64__
|
||||||
|
// Message size must fit within range of size_t data type.
|
||||||
|
if (payload_length - 1 > std::numeric_limits <size_t>::max ()) {
|
||||||
|
errno = EMSGSIZE;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
const size_t msg_size = static_cast <size_t> (payload_length - 1);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@@ -24,8 +24,7 @@ SET(Readline_INCLUDE_DIR @prefix@/include)
|
|||||||
SET(Readline_LIBRARY @prefix@/lib/libreadline.a)
|
SET(Readline_LIBRARY @prefix@/lib/libreadline.a)
|
||||||
SET(Terminfo_LIBRARY @prefix@/lib/libtinfo.a)
|
SET(Terminfo_LIBRARY @prefix@/lib/libtinfo.a)
|
||||||
|
|
||||||
SET(UNBOUND_INCLUDE_DIR @prefix@/include)
|
SET(LRELEASE_PATH @prefix@/native/bin CACHE FILEPATH "path to lrelease" FORCE)
|
||||||
SET(UNBOUND_LIBRARIES @prefix@/lib/libunbound.a)
|
|
||||||
|
|
||||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
|
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||||
SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
|
SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
|
||||||
@@ -67,35 +66,22 @@ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
|
|||||||
|
|
||||||
# specify the cross compiler to be used. Darwin uses clang provided by the SDK.
|
# specify the cross compiler to be used. Darwin uses clang provided by the SDK.
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
if(ARCHITECTURE STREQUAL "aarch64")
|
|
||||||
SET(CLANG_TARGET "arm64-apple-darwin11")
|
|
||||||
SET(CONF_TRIPLE "aarch64-apple-darwin11")
|
|
||||||
SET(BUILD_TAG "mac-armv8")
|
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "arm64")
|
|
||||||
set(ARM ON)
|
|
||||||
set(ARM_ID "armv8-a")
|
|
||||||
else()
|
|
||||||
SET(CLANG_TARGET "x86_64-apple-darwin11")
|
|
||||||
SET(CONF_TRIPLE "x86_64-apple-darwin11")
|
|
||||||
SET(BUILD_TAG "mac-x64")
|
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "x86_64")
|
|
||||||
endif()
|
|
||||||
SET(_CMAKE_TOOLCHAIN_PREFIX @prefix@/native/bin/${CONF_TRIPLE}-)
|
|
||||||
SET(CMAKE_C_COMPILER @prefix@/native/bin/clang)
|
SET(CMAKE_C_COMPILER @prefix@/native/bin/clang)
|
||||||
SET(CMAKE_C_COMPILER_TARGET ${CLANG_TARGET})
|
SET(CMAKE_C_COMPILER_TARGET x86_64-apple-darwin11)
|
||||||
SET(CMAKE_C_FLAGS_INIT -B${_CMAKE_TOOLCHAIN_PREFIX})
|
|
||||||
SET(CMAKE_CXX_COMPILER @prefix@/native/bin/clang++ -stdlib=libc++)
|
SET(CMAKE_CXX_COMPILER @prefix@/native/bin/clang++ -stdlib=libc++)
|
||||||
SET(CMAKE_CXX_COMPILER_TARGET ${CLANG_TARGET})
|
SET(CMAKE_CXX_COMPILER_TARGET x86_64-apple-darwin11)
|
||||||
SET(CMAKE_CXX_FLAGS_INIT -B${_CMAKE_TOOLCHAIN_PREFIX})
|
SET(CMAKE_ASM_COMPILER_TARGET x86_64-apple-darwin11)
|
||||||
SET(CMAKE_ASM_COMPILER_TARGET ${CLANG_TARGET})
|
SET(CMAKE_ASM-ATT_COMPILER_TARGET x86_64-apple-darwin11)
|
||||||
SET(CMAKE_ASM-ATT_COMPILER_TARGET ${CLANG_TARGET})
|
SET(_CMAKE_TOOLCHAIN_PREFIX x86_64-apple-darwin11-)
|
||||||
SET(APPLE True)
|
SET(APPLE True)
|
||||||
|
SET(BUILD_TAG "mac-x64")
|
||||||
SET(BUILD_64 ON)
|
SET(BUILD_64 ON)
|
||||||
SET(BREW OFF)
|
SET(BREW OFF)
|
||||||
SET(PORT OFF)
|
SET(PORT OFF)
|
||||||
SET(CMAKE_OSX_SYSROOT "@prefix@/native/SDK/")
|
SET(CMAKE_OSX_SYSROOT "@sdk@/MacOSX10.11.sdk/")
|
||||||
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
|
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
|
||||||
SET(CMAKE_CXX_STANDARD 14)
|
SET(CMAKE_CXX_STANDARD 11)
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||||
SET(LLVM_ENABLE_PIC OFF)
|
SET(LLVM_ENABLE_PIC OFF)
|
||||||
SET(LLVM_ENABLE_PIE OFF)
|
SET(LLVM_ENABLE_PIE OFF)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||||
@@ -137,18 +123,15 @@ elseif(ARCHITECTURE STREQUAL "aarch64")
|
|||||||
set(ARM_ID "armv8-a")
|
set(ARM_ID "armv8-a")
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
set(BUILD_TAG "android-armv8")
|
set(BUILD_TAG "android-armv8")
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
else()
|
||||||
set(BUILD_TAG "linux-armv8")
|
set(BUILD_TAG "linux-armv8")
|
||||||
endif()
|
endif()
|
||||||
set(BUILD_64 ON)
|
set(BUILD_64 ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARCHITECTURE STREQUAL "riscv64")
|
if(ARCHITECTURE STREQUAL "riscv64")
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
set(NO_AES ON)
|
||||||
set(BUILD_TAG "linux-riscv64")
|
set(ARCH "rv64imafdc")
|
||||||
endif()
|
|
||||||
set(ARCH_ID "riscv64")
|
|
||||||
set(ARCH "rv64gc")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARCHITECTURE STREQUAL "i686")
|
if(ARCHITECTURE STREQUAL "i686")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014-2022, The Monero Project
|
# Copyright (c) 2014-2020, The Monero Project
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|||||||
1
contrib/epee/demo/.gitignore
vendored
Normal file
1
contrib/epee/demo/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build/*
|
||||||
49
contrib/epee/demo/CMakeLists.txt
Normal file
49
contrib/epee/demo/CMakeLists.txt
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
set(Boost_USE_MULTITHREADED ON)
|
||||||
|
#set(Boost_DEBUG 1)
|
||||||
|
find_package(Boost COMPONENTS system filesystem thread date_time chrono regex )
|
||||||
|
|
||||||
|
include_directories( ${Boost_INCLUDE_DIRS} )
|
||||||
|
|
||||||
|
|
||||||
|
IF (MSVC)
|
||||||
|
add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /nologo /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /bigobj" )
|
||||||
|
ELSE()
|
||||||
|
# set stuff for other systems
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-reorder -D_GNU_SOURCE")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
include_directories(.)
|
||||||
|
include_directories(../include)
|
||||||
|
include_directories(iface)
|
||||||
|
|
||||||
|
|
||||||
|
# Add folders to filters
|
||||||
|
file(GLOB_RECURSE LEVIN_GENERAL_SECTION RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/demo_levin_server/*.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/demo_levin_server/*.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/demo_levin_server/*.cpp)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE HTTP_GENERAL_SECTION RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/demo_http_server/*.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/demo_http_server/*.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/demo_http_server/*.cpp)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
source_group(general FILES ${LEVIN_GENERAL_SECTION} FILES ${HTTP_GENERAL_SECTION})
|
||||||
|
#source_group(general FILES ${HTTP_GENERAL_SECTION})
|
||||||
|
|
||||||
|
add_executable(demo_http_server ${HTTP_GENERAL_SECTION} )
|
||||||
|
add_executable(demo_levin_server ${LEVIN_GENERAL_SECTION} )
|
||||||
|
|
||||||
|
target_link_libraries( demo_http_server ${Boost_LIBRARIES} )
|
||||||
|
target_link_libraries( demo_levin_server ${Boost_LIBRARIES} )
|
||||||
|
|
||||||
|
IF (NOT WIN32)
|
||||||
|
target_link_libraries (demo_http_server rt)
|
||||||
|
target_link_libraries (demo_levin_server rt)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
8
contrib/epee/demo/demo_http_server/stdafx.cpp
Normal file
8
contrib/epee/demo/demo_http_server/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// stdafx.cpp : source file that includes just the standard includes
|
||||||
|
// demo_http_server.pch will be the pre-compiled header
|
||||||
|
// stdafx.obj will contain the pre-compiled type information
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
// TODO: reference any additional headers you need in STDAFX.H
|
||||||
|
// and not in this file
|
||||||
40
contrib/epee/demo/demo_http_server/stdafx.h
Normal file
40
contrib/epee/demo/demo_http_server/stdafx.h
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
// Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are met:
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * 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.
|
||||||
|
// * Neither the name of the Andrey N. Sabelnikov 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 OWNER 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.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "targetver.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define BOOST_FILESYSTEM_VERSION 3
|
||||||
|
#define ENABLE_RELEASE_LOGGING
|
||||||
|
#include "misc_log_ex.h"
|
||||||
|
|
||||||
|
|
||||||
13
contrib/epee/demo/demo_http_server/targetver.h
Normal file
13
contrib/epee/demo/demo_http_server/targetver.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// The following macros define the minimum required platform. The minimum required platform
|
||||||
|
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
|
||||||
|
// your application. The macros work by enabling all features available on platform versions up to and
|
||||||
|
// including the version specified.
|
||||||
|
|
||||||
|
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||||
|
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||||
|
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
|
||||||
|
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||||
|
#endif
|
||||||
|
|
||||||
30
contrib/epee/demo/demo_levin_server/stdafx.cpp
Normal file
30
contrib/epee/demo/demo_levin_server/stdafx.cpp
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are met:
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * 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.
|
||||||
|
// * Neither the name of the Andrey N. Sabelnikov 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 OWNER 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 "stdafx.h"
|
||||||
|
|
||||||
41
contrib/epee/demo/demo_levin_server/stdafx.h
Normal file
41
contrib/epee/demo/demo_levin_server/stdafx.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are met:
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * 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.
|
||||||
|
// * Neither the name of the Andrey N. Sabelnikov 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 OWNER 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.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "targetver.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define BOOST_FILESYSTEM_VERSION 3
|
||||||
|
#define ENABLE_RELEASE_LOGGING
|
||||||
|
#include "log_opt_defs.h"
|
||||||
|
#include "misc_log_ex.h"
|
||||||
|
|
||||||
|
|
||||||
13
contrib/epee/demo/demo_levin_server/targetver.h
Normal file
13
contrib/epee/demo/demo_levin_server/targetver.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// The following macros define the minimum required platform. The minimum required platform
|
||||||
|
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
|
||||||
|
// your application. The macros work by enabling all features available on platform versions up to and
|
||||||
|
// including the version specified.
|
||||||
|
|
||||||
|
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||||
|
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||||
|
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
|
||||||
|
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||||
|
#endif
|
||||||
|
|
||||||
4
contrib/epee/demo/generate_gcc.sh
Normal file
4
contrib/epee/demo/generate_gcc.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
#cmake -DBOOST_ROOT=/usr/local/proj/boost_1_49_0 -DBOOST_LIBRARYDIR=/usr/local/proj/boost_1_49_0/stage/lib ..
|
||||||
7
contrib/epee/demo/generate_vc_proj.bat
Normal file
7
contrib/epee/demo/generate_vc_proj.bat
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
mkdir build
|
||||||
|
|
||||||
|
cd build
|
||||||
|
|
||||||
|
cmake "-DBoost_USE_STATIC_LIBS=TRUE" -G "Visual Studio 11 Win64" ..
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
225
contrib/epee/demo/iface/transport_defs.h
Normal file
225
contrib/epee/demo/iface/transport_defs.h
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "serialization/keyvalue_serialization.h"
|
||||||
|
#include "storages/portable_storage_base.h"
|
||||||
|
|
||||||
|
namespace demo
|
||||||
|
{
|
||||||
|
|
||||||
|
struct some_test_subdata
|
||||||
|
{
|
||||||
|
std::string m_str;
|
||||||
|
|
||||||
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
|
KV_SERIALIZE(m_str)
|
||||||
|
END_KV_SERIALIZE_MAP()
|
||||||
|
};
|
||||||
|
|
||||||
|
struct some_test_data
|
||||||
|
{
|
||||||
|
std::string m_str;
|
||||||
|
uint64_t m_uint64;
|
||||||
|
uint32_t m_uint32;
|
||||||
|
uint16_t m_uint16;
|
||||||
|
uint8_t m_uint8;
|
||||||
|
int64_t m_int64;
|
||||||
|
int32_t m_int32;
|
||||||
|
int16_t m_int16;
|
||||||
|
int8_t m_int8;
|
||||||
|
double m_double;
|
||||||
|
bool m_bool;
|
||||||
|
std::list<std::string> m_list_of_str;
|
||||||
|
std::list<uint64_t> m_list_of_uint64_t;
|
||||||
|
std::list<uint32_t> m_list_of_uint32_t;
|
||||||
|
std::list<uint16_t> m_list_of_uint16_t;
|
||||||
|
std::list<uint8_t> m_list_of_uint8_t;
|
||||||
|
std::list<int64_t> m_list_of_int64_t;
|
||||||
|
std::list<int32_t> m_list_of_int32_t;
|
||||||
|
std::list<int16_t> m_list_of_int16_t;
|
||||||
|
std::list<int8_t> m_list_of_int8_t;
|
||||||
|
std::list<double> m_list_of_double;
|
||||||
|
std::list<bool> m_list_of_bool;
|
||||||
|
some_test_subdata m_subobj;
|
||||||
|
std::list<some_test_data> m_list_of_self;
|
||||||
|
epee::serialization::storage_entry m_storage_entry_int;
|
||||||
|
epee::serialization::storage_entry m_storage_entry_string;
|
||||||
|
|
||||||
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
|
KV_SERIALIZE(m_str)
|
||||||
|
KV_SERIALIZE(m_uint64)
|
||||||
|
KV_SERIALIZE(m_uint32)
|
||||||
|
KV_SERIALIZE(m_uint16)
|
||||||
|
KV_SERIALIZE(m_uint8)
|
||||||
|
KV_SERIALIZE(m_int64)
|
||||||
|
KV_SERIALIZE(m_int32)
|
||||||
|
KV_SERIALIZE(m_int16)
|
||||||
|
KV_SERIALIZE(m_int8)
|
||||||
|
KV_SERIALIZE(m_double)
|
||||||
|
KV_SERIALIZE(m_bool)
|
||||||
|
KV_SERIALIZE(m_subobj)
|
||||||
|
KV_SERIALIZE(m_list_of_str)
|
||||||
|
KV_SERIALIZE(m_list_of_uint64_t)
|
||||||
|
KV_SERIALIZE(m_list_of_uint32_t)
|
||||||
|
KV_SERIALIZE(m_list_of_uint16_t)
|
||||||
|
KV_SERIALIZE(m_list_of_uint8_t)
|
||||||
|
KV_SERIALIZE(m_list_of_int64_t)
|
||||||
|
KV_SERIALIZE(m_list_of_int32_t)
|
||||||
|
KV_SERIALIZE(m_list_of_int16_t)
|
||||||
|
KV_SERIALIZE(m_list_of_int8_t)
|
||||||
|
KV_SERIALIZE(m_list_of_double)
|
||||||
|
KV_SERIALIZE(m_list_of_bool)
|
||||||
|
KV_SERIALIZE(m_list_of_self)
|
||||||
|
KV_SERIALIZE(m_storage_entry_int)
|
||||||
|
KV_SERIALIZE(m_storage_entry_string)
|
||||||
|
END_KV_SERIALIZE_MAP()
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************************/
|
||||||
|
/* */
|
||||||
|
/************************************************************************/
|
||||||
|
struct COMMAND_EXAMPLE_1
|
||||||
|
{
|
||||||
|
const static int ID = 1000;
|
||||||
|
|
||||||
|
struct request_t
|
||||||
|
{
|
||||||
|
std::string example_string_data;
|
||||||
|
some_test_data sub;
|
||||||
|
|
||||||
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
|
KV_SERIALIZE(example_string_data)
|
||||||
|
KV_SERIALIZE(sub)
|
||||||
|
END_KV_SERIALIZE_MAP()
|
||||||
|
};
|
||||||
|
typedef epee::misc_utils::struct_init<request_t> request;
|
||||||
|
|
||||||
|
|
||||||
|
struct response_t
|
||||||
|
{
|
||||||
|
bool m_success;
|
||||||
|
std::list<some_test_data> subs;
|
||||||
|
|
||||||
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
|
KV_SERIALIZE(m_success)
|
||||||
|
KV_SERIALIZE(subs)
|
||||||
|
END_KV_SERIALIZE_MAP()
|
||||||
|
};
|
||||||
|
};
|
||||||
|
typedef epee::misc_utils::struct_init<response_t> response;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct COMMAND_EXAMPLE_2
|
||||||
|
{
|
||||||
|
const static int ID = 1001;
|
||||||
|
|
||||||
|
struct request_t
|
||||||
|
{
|
||||||
|
std::string example_string_data2;
|
||||||
|
|
||||||
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
|
KV_SERIALIZE(example_string_data2)
|
||||||
|
END_KV_SERIALIZE_MAP()
|
||||||
|
};
|
||||||
|
typedef epee::misc_utils::struct_init<request_t> request;
|
||||||
|
|
||||||
|
struct response_t
|
||||||
|
{
|
||||||
|
bool m_success;
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
|
KV_SERIALIZE(m_success)
|
||||||
|
END_KV_SERIALIZE_MAP()
|
||||||
|
};
|
||||||
|
typedef epee::misc_utils::struct_init<response_t> response;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
//in debug purpose
|
||||||
|
bool operator != (const some_test_subdata& a, const some_test_subdata& b)
|
||||||
|
{
|
||||||
|
return b.m_str != a.m_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator == (const some_test_data& a, const some_test_data& b)
|
||||||
|
{
|
||||||
|
if( b.m_str != a.m_str
|
||||||
|
|| b.m_uint64 != a.m_uint64
|
||||||
|
|| b.m_uint32 != a.m_uint32
|
||||||
|
|| b.m_uint16 != a.m_uint16
|
||||||
|
|| b.m_uint8 != a.m_uint8
|
||||||
|
|| b.m_int64 != a.m_int64
|
||||||
|
|| b.m_int32 != a.m_int32
|
||||||
|
|| b.m_int16 != a.m_int16
|
||||||
|
|| b.m_int8 != a.m_int8
|
||||||
|
|| b.m_double != a.m_double
|
||||||
|
|| b.m_bool != a.m_bool
|
||||||
|
|| b.m_list_of_str != a.m_list_of_str
|
||||||
|
|| b.m_list_of_uint64_t != a.m_list_of_uint64_t
|
||||||
|
|| b.m_list_of_uint32_t != a.m_list_of_uint32_t
|
||||||
|
|| b.m_list_of_uint16_t != a.m_list_of_uint16_t
|
||||||
|
|| b.m_list_of_uint8_t != a.m_list_of_uint8_t
|
||||||
|
|| b.m_list_of_int64_t != a.m_list_of_int64_t
|
||||||
|
|| b.m_list_of_int32_t != a.m_list_of_int32_t
|
||||||
|
|| b.m_list_of_int16_t != a.m_list_of_int16_t
|
||||||
|
|| b.m_list_of_int8_t != a.m_list_of_int8_t
|
||||||
|
|| b.m_list_of_double != a.m_list_of_double
|
||||||
|
|| b.m_list_of_bool != a.m_list_of_bool
|
||||||
|
|| b.m_subobj != a.m_subobj
|
||||||
|
|| b.m_list_of_self != a.m_list_of_self
|
||||||
|
|| b.m_storage_entry_int.which() != a.m_storage_entry_int.which()
|
||||||
|
|| b.m_storage_entry_string.which() != a.m_storage_entry_string.which()
|
||||||
|
)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline some_test_data get_test_data()
|
||||||
|
{
|
||||||
|
some_test_data s;
|
||||||
|
s.m_str = "zuzuzuzuzuz";
|
||||||
|
s.m_uint64 = 111111111111111;
|
||||||
|
s.m_uint32 = 2222222;
|
||||||
|
s.m_uint16 = 2222;
|
||||||
|
s.m_uint8 = 22;
|
||||||
|
s.m_int64 = -111111111111111;
|
||||||
|
s.m_int32 = -2222222;
|
||||||
|
s.m_int16 = -2222;
|
||||||
|
s.m_int8 = -24;
|
||||||
|
s.m_double = 0.11111;
|
||||||
|
s.m_bool = true;
|
||||||
|
s.m_list_of_str.push_back("1112121");
|
||||||
|
s.m_list_of_uint64_t.push_back(1111111111);
|
||||||
|
s.m_list_of_uint64_t.push_back(2222222222);
|
||||||
|
s.m_list_of_uint32_t.push_back(1111111);
|
||||||
|
s.m_list_of_uint32_t.push_back(2222222);
|
||||||
|
s.m_list_of_uint16_t.push_back(1111);
|
||||||
|
s.m_list_of_uint16_t.push_back(2222);
|
||||||
|
s.m_list_of_uint8_t.push_back(11);
|
||||||
|
s.m_list_of_uint8_t.push_back(22);
|
||||||
|
|
||||||
|
|
||||||
|
s.m_list_of_int64_t.push_back(-1111111111);
|
||||||
|
s.m_list_of_int64_t.push_back(-222222222);
|
||||||
|
s.m_list_of_int32_t.push_back(-1111111);
|
||||||
|
s.m_list_of_int32_t.push_back(-2222222);
|
||||||
|
s.m_list_of_int16_t.push_back(-1111);
|
||||||
|
s.m_list_of_int16_t.push_back(-2222);
|
||||||
|
s.m_list_of_int8_t.push_back(-11);
|
||||||
|
s.m_list_of_int8_t.push_back(-22);
|
||||||
|
|
||||||
|
s.m_list_of_double.push_back(0.11111);
|
||||||
|
s.m_list_of_double.push_back(0.22222);
|
||||||
|
s.m_list_of_bool.push_back(true);
|
||||||
|
s.m_list_of_bool.push_back(false);
|
||||||
|
|
||||||
|
s.m_subobj.m_str = "subszzzzzzzz";
|
||||||
|
s.m_list_of_self.push_back(s);
|
||||||
|
s.m_storage_entry_int = epee::serialization::storage_entry(uint64_t(22222));
|
||||||
|
s.m_storage_entry_string = epee::serialization::storage_entry(std::string("sdsvsdvs"));
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
1095
contrib/epee/include/ado_db_helper.h
Normal file
1095
contrib/epee/include/ado_db_helper.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2019-2022, The Monero Project
|
// Copyright (c) 2019-2020, The Monero Project
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
@@ -112,7 +112,7 @@ namespace epee
|
|||||||
explicit byte_slice(std::string&& buffer);
|
explicit byte_slice(std::string&& buffer);
|
||||||
|
|
||||||
//! Convert `stream` into a slice with zero allocations.
|
//! Convert `stream` into a slice with zero allocations.
|
||||||
explicit byte_slice(byte_stream&& stream, bool shrink = true);
|
explicit byte_slice(byte_stream&& stream) noexcept;
|
||||||
|
|
||||||
byte_slice(byte_slice&& source) noexcept;
|
byte_slice(byte_slice&& source) noexcept;
|
||||||
~byte_slice() noexcept = default;
|
~byte_slice() noexcept = default;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// Copyright (c) 2020-2022, The Monero Project
|
// Copyright (c) 2020, The Monero Project
|
||||||
|
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
@@ -59,6 +58,7 @@ namespace epee
|
|||||||
byte_buffer buffer_; //! Beginning of buffer
|
byte_buffer buffer_; //! Beginning of buffer
|
||||||
std::uint8_t* next_write_; //! Current write position
|
std::uint8_t* next_write_; //! Current write position
|
||||||
const std::uint8_t* end_; //! End of buffer
|
const std::uint8_t* end_; //! End of buffer
|
||||||
|
std::size_t increase_size_; //! Minimum buffer size increase
|
||||||
|
|
||||||
//! \post `requested <= available()`
|
//! \post `requested <= available()`
|
||||||
void overflow(const std::size_t requested);
|
void overflow(const std::size_t requested);
|
||||||
@@ -74,20 +74,30 @@ namespace epee
|
|||||||
public:
|
public:
|
||||||
using char_type = std::uint8_t;
|
using char_type = std::uint8_t;
|
||||||
using Ch = char_type;
|
using Ch = char_type;
|
||||||
using value_type = char_type;
|
|
||||||
|
//! \return Default minimum size increase on buffer overflow
|
||||||
|
static constexpr std::size_t default_increase() noexcept { return 4096; }
|
||||||
|
|
||||||
//! Increase internal buffer by at least `byte_stream_increase` bytes.
|
//! Increase internal buffer by at least `byte_stream_increase` bytes.
|
||||||
byte_stream() noexcept
|
byte_stream() noexcept
|
||||||
|
: byte_stream(default_increase())
|
||||||
|
{}
|
||||||
|
|
||||||
|
//! Increase internal buffer by at least `increase` bytes.
|
||||||
|
explicit byte_stream(const std::size_t increase) noexcept
|
||||||
: buffer_(nullptr),
|
: buffer_(nullptr),
|
||||||
next_write_(nullptr),
|
next_write_(nullptr),
|
||||||
end_(nullptr)
|
end_(nullptr),
|
||||||
|
increase_size_(increase)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
byte_stream(byte_stream&& rhs) noexcept;
|
byte_stream(byte_stream&& rhs) noexcept;
|
||||||
~byte_stream() noexcept = default;
|
~byte_stream() noexcept = default;
|
||||||
byte_stream& operator=(byte_stream&& rhs) noexcept;
|
byte_stream& operator=(byte_stream&& rhs) noexcept;
|
||||||
|
|
||||||
std::uint8_t* data() noexcept { return buffer_.get(); }
|
//! \return The minimum increase size on buffer overflow
|
||||||
|
std::size_t increase_size() const noexcept { return increase_size_; }
|
||||||
|
|
||||||
const std::uint8_t* data() const noexcept { return buffer_.get(); }
|
const std::uint8_t* data() const noexcept { return buffer_.get(); }
|
||||||
std::uint8_t* tellp() const noexcept { return next_write_; }
|
std::uint8_t* tellp() const noexcept { return next_write_; }
|
||||||
std::size_t available() const noexcept { return end_ - next_write_; }
|
std::size_t available() const noexcept { return end_ - next_write_; }
|
||||||
@@ -178,7 +188,7 @@ namespace epee
|
|||||||
void put_n(const std::uint8_t ch, const std::size_t count)
|
void put_n(const std::uint8_t ch, const std::size_t count)
|
||||||
{
|
{
|
||||||
check(count);
|
check(count);
|
||||||
std::memset(tellp(), ch, count);
|
std::memset(tellp(), count, ch);
|
||||||
next_write_ += count;
|
next_write_ += count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ namespace epee
|
|||||||
if (m_read_status == state_cancelled)
|
if (m_read_status == state_cancelled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
DWORD retval = ::WaitForSingleObject(::GetStdHandle(STD_INPUT_HANDLE), 100);
|
int retval = ::WaitForSingleObject(::GetStdHandle(STD_INPUT_HANDLE), 100);
|
||||||
switch (retval)
|
switch (retval)
|
||||||
{
|
{
|
||||||
case WAIT_FAILED:
|
case WAIT_FAILED:
|
||||||
|
|||||||
56
contrib/epee/include/copyable_atomic.h
Normal file
56
contrib/epee/include/copyable_atomic.h
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
// Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are met:
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * 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.
|
||||||
|
// * Neither the name of the Andrey N. Sabelnikov 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 OWNER 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.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
|
namespace epee
|
||||||
|
{
|
||||||
|
class copyable_atomic: public std::atomic<uint32_t>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
copyable_atomic()
|
||||||
|
{};
|
||||||
|
copyable_atomic(uint32_t value)
|
||||||
|
{ store(value); }
|
||||||
|
copyable_atomic(const copyable_atomic& a):std::atomic<uint32_t>(a.load())
|
||||||
|
{}
|
||||||
|
copyable_atomic& operator= (const copyable_atomic& a)
|
||||||
|
{
|
||||||
|
store(a.load());
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
uint32_t operator++()
|
||||||
|
{
|
||||||
|
return std::atomic<uint32_t>::operator++();
|
||||||
|
}
|
||||||
|
uint32_t operator++(int fake)
|
||||||
|
{
|
||||||
|
return std::atomic<uint32_t>::operator++(fake);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user