mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-29 04:08:43 +01:00
Compare commits
112
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c50a341527 | ||
|
|
a68ebf3564 | ||
|
|
98b1982157 | ||
|
|
c86228a404 | ||
|
|
a389589fbb | ||
|
|
392e9b99cf | ||
|
|
51c7422f6e | ||
|
|
7c8d070ab5 | ||
|
|
aa89690788 | ||
|
|
c82cad87fa | ||
|
|
a5f3b915e5 | ||
|
|
395cbcd9db | ||
|
|
ee247cba8a | ||
|
|
bcc0aeeaa9 | ||
|
|
de5bea9cdf | ||
|
|
d846790905 | ||
|
|
13331ee5e7 | ||
|
|
5bb95053fb | ||
|
|
bd38e5e1d8 | ||
|
|
8b1250030b | ||
|
|
c0cb90bf79 | ||
|
|
c3723ac58a | ||
|
|
aad58b1c83 | ||
|
|
96034902d1 | ||
|
|
e918955210 | ||
|
|
5f746999c2 | ||
|
|
1c51407109 | ||
|
|
5f402464ad | ||
|
|
7a14d53ba0 | ||
|
|
ca72462125 | ||
|
|
11048f96fa | ||
|
|
144c19fab1 | ||
|
|
32bb391c2e | ||
|
|
d23ffd1972 | ||
|
|
9a75c5a986 | ||
|
|
82ac1c2daf | ||
|
|
6a256bb1a0 | ||
|
|
fafc8e4d7d | ||
|
|
fdc7e348f0 | ||
|
|
2bdef17e18 | ||
|
|
718741b036 | ||
|
|
8dc0a5bfaf | ||
|
|
6b0ea884cb | ||
|
|
a488a24514 | ||
|
|
fb3fc3bd8d | ||
|
|
8968a8cbce | ||
|
|
a7d2c67e67 | ||
|
|
40a575a5d6 | ||
|
|
f5b23c2e7e | ||
|
|
7993442a34 | ||
|
|
8f4acf3b60 | ||
|
|
c59627b661 | ||
|
|
705426d489 | ||
|
|
81ad7bdb46 | ||
|
|
f110cad24b | ||
|
|
f989d2ae83 | ||
|
|
686b37e630 | ||
|
|
1265307bd0 | ||
|
|
955167d37f | ||
|
|
1f83c35103 | ||
|
|
a517fedd96 | ||
|
|
732f34b595 | ||
|
|
eb2f004d45 | ||
|
|
8b6eff5fb8 | ||
|
|
af743fc62f | ||
|
|
2c33333000 | ||
|
|
2548134302 | ||
|
|
7a995706b7 | ||
|
|
47aca44551 | ||
|
|
08e069b3d9 | ||
|
|
6b7b4badcd | ||
|
|
a6cec46ecc | ||
|
|
5ae3d42d1f | ||
|
|
fedeaa5c0d | ||
|
|
ecca86a1ce | ||
|
|
ea08119fa3 | ||
|
|
c3b7ae3ab1 | ||
|
|
6bb1f00082 | ||
|
|
d6eea75b6a | ||
|
|
341f83f71f | ||
|
|
10be6d49cb | ||
|
|
09c0e488a8 | ||
|
|
57736b1fee | ||
|
|
e284c2e349 | ||
|
|
675fe02cb1 | ||
|
|
5fe631037c | ||
|
|
736f10eb8a | ||
|
|
c7c4237d10 | ||
|
|
5e6bd0b9bb | ||
|
|
c1699c2c79 | ||
|
|
d7364e1d80 | ||
|
|
d248aaf8b3 | ||
|
|
67dff741dd | ||
|
|
21fe180a84 | ||
|
|
3f83d74bac | ||
|
|
ec142556d8 | ||
|
|
fc426abfc0 | ||
|
|
6241c2e1de | ||
|
|
ba940d6df4 | ||
|
|
29f4d627d2 | ||
|
|
774fa969a3 | ||
|
|
f7d76eef98 | ||
|
|
63dc0179c1 | ||
|
|
0131476a5d | ||
|
|
1b89370c1c | ||
|
|
c8606126f0 | ||
|
|
52850ccf23 | ||
|
|
60540b87d0 | ||
|
|
db5ba12190 | ||
|
|
7cf050ff8e | ||
|
|
b9d8128880 | ||
|
|
3e10b25068 |
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!contrib/Qt5.15_LinuxPatch.json
|
||||
!utils/pubkeys/*
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: linux-build
|
||||
|
||||
steps:
|
||||
- name: linux-build
|
||||
image: wowlet/wowlet-linux:v0.1
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /drone/src/monero
|
||||
- name: files
|
||||
path: /tmp/wowlet_linux
|
||||
commands:
|
||||
- make release-static -j3
|
||||
- export WOW="wowlet-`echo $DRONE_COMMIT_AFTER | cut -c 1-10`"
|
||||
- cp build/bin/wowlet /tmp/wowlet_linux/$WOW
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /home/wow/wowlet_wownero
|
||||
- name: files
|
||||
host:
|
||||
path: /home/wow/wowlet_linux
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: windows-deploy
|
||||
steps:
|
||||
- name: windows-deploy
|
||||
image: wowlet/wowlet-win:v0.1
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /drone/src/monero
|
||||
- name: files
|
||||
path: /tmp/wowlet_windows
|
||||
commands:
|
||||
- make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3
|
||||
- export WOW="wowlet-`echo $DRONE_COMMIT_AFTER | cut -c 1-10`.exe"
|
||||
- cp build/x86_64-w64-mingw32/release/bin/wowlet.exe /tmp/wowlet_windows/$WOW
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /home/wow/wowlet_wownero
|
||||
- name: files
|
||||
host:
|
||||
path: /home/wow/wowlet_windows
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- tag
|
||||
...
|
||||
@@ -1,139 +0,0 @@
|
||||
name: macos build (gitea self-hosted)
|
||||
|
||||
# Runs ONLY on the Gitea mac runner (GitHub ignores .gitea/workflows).
|
||||
# Dispatch-only: the mac runner has capacity 1 and also serves the Hash Bags
|
||||
# iOS lane, so macOS wowlet builds are an explicit button, not a push hook.
|
||||
# All build state lands under the runner's work dir, which lives on
|
||||
# /Volumes/DataSSD (never backed up: the fleet backup pulls an allowlist of
|
||||
# gitea data only).
|
||||
#
|
||||
# Signing/notarization uses the SAME seven secrets as the smirk-monorepo
|
||||
# desktop lane, set by ~/keys/suchsoftware/set-gitea-desktop-secrets.sh:
|
||||
# APPLE_CERTIFICATE (b64 Developer ID Application .p12),
|
||||
# APPLE_CERTIFICATE_PASSWORD, APPLE_SIGNING_IDENTITY, APPLE_TEAM_ID,
|
||||
# APPLE_API_ISSUER, APPLE_API_KEY, APPLE_API_KEY_P8_BASE64 (notarytool).
|
||||
# If APPLE_CERTIFICATE is unset the build ships unsigned instead of failing.
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
name: "macOS (brew, native)"
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
|
||||
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
|
||||
APPLE_API_KEY_P8_BASE64: ${{ secrets.APPLE_API_KEY_P8_BASE64 }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: install dependencies (brew)
|
||||
run: |
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
export NONINTERACTIVE=1 HOMEBREW_NO_ENV_HINTS=1
|
||||
brew install --quiet qt libsodium libzip qrencode unbound cmake boost hidapi openssl expat protobuf pkgconfig zxing-cpp
|
||||
|
||||
- name: fetch wownerod to embed
|
||||
run: |
|
||||
set -e
|
||||
ARCH=$(uname -m)
|
||||
case "$ARCH" in
|
||||
arm64) WOWTAR=wownero-aarch64-apple-darwin11-v0.11.4.0.tar.bz2 ;;
|
||||
*) WOWTAR=wownero-x86_64-apple-darwin11-v0.11.4.0.tar.bz2 ;;
|
||||
esac
|
||||
mkdir -p /tmp/wownerod-embed
|
||||
curl -L -o /tmp/wownero.tar.bz2 \
|
||||
"https://github.com/wownero/wownero-codeberg-mirror/releases/download/v0.11.4.0/$WOWTAR"
|
||||
tar xjf /tmp/wownero.tar.bz2 -C /tmp
|
||||
find /tmp -name wownerod -type f -exec cp {} /tmp/wownerod-embed/ \;
|
||||
chmod +x /tmp/wownerod-embed/wownerod
|
||||
ls -la /tmp/wownerod-embed
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
mkdir -p build && cd build
|
||||
cmake -DWITH_SCANNER=OFF -DWOWNEROD_DIR=/tmp/wownerod-embed ..
|
||||
cmake --build . -j "$(sysctl -n hw.ncpu)"
|
||||
|
||||
- name: package app bundle
|
||||
run: |
|
||||
set -e
|
||||
cd build
|
||||
APP=$(find . -maxdepth 3 -name "*.app" -type d | head -1)
|
||||
[ -n "$APP" ] || { echo "no .app bundle produced"; ls -la bin/; exit 1; }
|
||||
mkdir -p dist
|
||||
cp -R "$APP" dist/Wowlet.app
|
||||
# cmake never places the icon in the bundle (upstream only copies it
|
||||
# for the dormant `installed/` layout)
|
||||
mkdir -p dist/Wowlet.app/Contents/Resources
|
||||
cp ../src/assets/images/appicons/appicon.icns dist/Wowlet.app/Contents/Resources/
|
||||
# bundle Qt frameworks/plugins so the app runs off-machine
|
||||
/opt/homebrew/opt/qt/bin/macdeployqt dist/Wowlet.app
|
||||
ls -la dist/
|
||||
|
||||
- name: sign and notarize (skipped when secrets absent)
|
||||
run: |
|
||||
set -e
|
||||
cd build
|
||||
if [ -z "$APPLE_CERTIFICATE" ]; then
|
||||
echo "APPLE_CERTIFICATE not set — shipping UNSIGNED build"
|
||||
exit 0
|
||||
fi
|
||||
KC=/tmp/wowlet-ci.keychain-db
|
||||
KCPW=$(/usr/bin/uuidgen)
|
||||
echo "$KCPW" > /tmp/wowlet-ci-kcpw # for the cleanup step only
|
||||
security create-keychain -p "$KCPW" "$KC"
|
||||
security set-keychain-settings -lut 3600 "$KC"
|
||||
security unlock-keychain -p "$KCPW" "$KC"
|
||||
printf '%s' "$APPLE_CERTIFICATE" | base64 -d > /tmp/dev_id.p12
|
||||
security import /tmp/dev_id.p12 -k "$KC" -P "$APPLE_CERTIFICATE_PASSWORD" \
|
||||
-T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple: -s -k "$KCPW" "$KC" >/dev/null
|
||||
security list-keychains -d user -s "$KC" login.keychain-db
|
||||
|
||||
# sign nested Mach-O executables first (embedded wownerod etc.),
|
||||
# then frameworks, then the bundle — all hardened-runtime + timestamp
|
||||
SIGN() { codesign --force --options runtime --timestamp --keychain "$KC" \
|
||||
--sign "$APPLE_SIGNING_IDENTITY" "$@"; }
|
||||
find dist/Wowlet.app -type f -perm +111 ! -path "*/Frameworks/*" \
|
||||
| while read -r f; do file "$f" | grep -q Mach-O && SIGN "$f" || true; done
|
||||
find dist/Wowlet.app/Contents/Frameworks -maxdepth 1 \( -name "*.framework" -o -name "*.dylib" \) 2>/dev/null \
|
||||
| while read -r fw; do SIGN "$fw"; done
|
||||
SIGN dist/Wowlet.app
|
||||
codesign --verify --deep --strict dist/Wowlet.app
|
||||
|
||||
printf '%s' "$APPLE_API_KEY_P8_BASE64" | base64 -d > /tmp/notary.p8
|
||||
ditto -c -k --keepParent dist/Wowlet.app /tmp/wowlet-notarize.zip
|
||||
xcrun notarytool submit /tmp/wowlet-notarize.zip \
|
||||
--key /tmp/notary.p8 --key-id "$APPLE_API_KEY" --issuer "$APPLE_API_ISSUER" \
|
||||
--wait --timeout 30m
|
||||
xcrun stapler staple dist/Wowlet.app
|
||||
echo "signed + notarized + stapled"
|
||||
|
||||
- name: zip artifact
|
||||
run: |
|
||||
set -e
|
||||
cd build/dist
|
||||
ditto -c -k --keepParent Wowlet.app ../wowlet-macos-$(uname -m).zip
|
||||
ls -la ../wowlet-macos-*.zip
|
||||
|
||||
- name: cleanup signing material
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f /tmp/wowlet-ci-kcpw ]; then
|
||||
security delete-keychain /tmp/wowlet-ci.keychain-db || true
|
||||
fi
|
||||
rm -f /tmp/dev_id.p12 /tmp/notary.p8 /tmp/wowlet-ci-kcpw /tmp/wowlet-notarize.zip
|
||||
|
||||
- name: upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: wowlet-macos
|
||||
path: build/wowlet-macos-*.zip
|
||||
retention-days: 14
|
||||
@@ -1,348 +0,0 @@
|
||||
name: ci/gh-actions/build
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
# NOTE (wownero-rebase branch): the Arch + macOS jobs from upstream Feather's build.yml are
|
||||
# temporarily disabled to get a fast, cheap iteration loop while bringing up the build against the
|
||||
# wownero monero submodule (gui branch). Restore the full matrix from upstream once Ubuntu is green.
|
||||
|
||||
jobs:
|
||||
build-ubuntu-without-scanner:
|
||||
name: "Ubuntu 24.04 (no scanner)"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:24.04
|
||||
steps:
|
||||
- name: update apt
|
||||
run: apt update
|
||||
- name: install dependencies
|
||||
run: apt -y install curl bzip2 git cmake build-essential ccache libssl-dev libunbound-dev libboost-all-dev libzmq3-dev
|
||||
libqrencode-dev qt6-base-dev qt6-svg-dev qt6-websockets-dev qt6-multimedia-dev
|
||||
qt6-wayland-dev qt6-declarative-dev libzip-dev libsodium-dev libgcrypt20-dev libx11-xcb-dev
|
||||
qml6-module-qtquick qml6-module-qtquick-layouts qml6-module-qtquick-window qml6-module-qtqml-workerscript qml6-module-qtqml-models
|
||||
protobuf-compiler libprotobuf-dev libhidapi-dev libzxing-dev libusb-dev
|
||||
libusb-1.0-0-dev patchelf
|
||||
- name: configure git
|
||||
run: git config --global --add safe.directory '*'
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: fetch wownerod to embed (single-file build)
|
||||
run: |
|
||||
mkdir -p /tmp/wownerod-embed
|
||||
curl -L -o /tmp/wownero.tar.bz2 \
|
||||
https://github.com/wownero/wownero-codeberg-mirror/releases/download/v0.11.4.0/wownero-x86_64-linux-gnu-v0.11.4.0.tar.bz2
|
||||
tar xjf /tmp/wownero.tar.bz2 -C /tmp
|
||||
find /tmp -name wownerod -type f -exec cp {} /tmp/wownerod-embed/ \;
|
||||
chmod +x /tmp/wownerod-embed/wownerod
|
||||
ls -la /tmp/wownerod-embed
|
||||
- name: fetch tor to embed
|
||||
run: |
|
||||
mkdir -p /tmp/tor-embed
|
||||
curl -L -o /tmp/teb.tgz \
|
||||
https://archive.torproject.org/tor-package-archive/torbrowser/15.0/tor-expert-bundle-linux-x86_64-15.0.tar.gz
|
||||
mkdir -p /tmp/teb && tar xzf /tmp/teb.tgz -C /tmp/teb
|
||||
cp /tmp/teb/tor/tor /tmp/teb/tor/libssl.so.3 /tmp/teb/tor/libevent-2.1.so.7 /tmp/teb/tor/libcrypto.so.3 /tmp/tor-embed/
|
||||
# expert-bundle tor has no rpath; point it (+ its libs) at $ORIGIN so the embedded copy finds
|
||||
# its libs in the extract dir on any distro
|
||||
for f in tor libssl.so.3 libevent-2.1.so.7 libcrypto.so.3; do patchelf --set-rpath '$ORIGIN' /tmp/tor-embed/$f; done
|
||||
chmod +x /tmp/tor-embed/tor
|
||||
ls -la /tmp/tor-embed
|
||||
- name: build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
# ARCH=x86-64: portable generic baseline. NEVER 'native' for a release — the CI runner's
|
||||
# CPU (often newer than users') would bake in unsupported instructions → SIGILL on launch.
|
||||
# wowlet: TOR_VERSION must EXACTLY match `tor --version` of the embedded binary, else
|
||||
# TorManager::unpackBins() sees embedded > the unpacked copy and rewrites Tor every launch.
|
||||
# The tor-expert-bundle's RELEASE number (15.0) is NOT its tor version (0.4.8.x) — derive it.
|
||||
TORVER=$(/tmp/tor-embed/tor --version | grep -oE '[0-9]+(\.[0-9]+){3}' | head -1)
|
||||
echo "embedded tor version: $TORVER"
|
||||
cmake -DWITH_SCANNER=OFF -DARCH=x86-64 -DWOWNEROD_DIR=/tmp/wownerod-embed -DTOR_DIR=/tmp/tor-embed -DTOR_VERSION="$TORVER" ..
|
||||
cmake --build . -j $(nproc)
|
||||
- name: package AppImage
|
||||
run: |
|
||||
mkdir -p AppDir/usr/bin AppDir/usr/share/applications AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
cp build/bin/feather AppDir/usr/bin/wowlet
|
||||
chmod +x AppDir/usr/bin/wowlet
|
||||
cp src/assets/wowlet.desktop AppDir/usr/share/applications/wowlet.desktop
|
||||
cp src/assets/images/appicons/256x256.png AppDir/usr/share/icons/hicolor/256x256/apps/wowlet.png
|
||||
curl -sL -o linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
curl -sL -o linuxdeploy-plugin-qt https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
chmod +x linuxdeploy linuxdeploy-plugin-qt
|
||||
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||
export QMAKE="$(command -v qmake6 || echo /usr/bin/qmake6)"
|
||||
export EXTRA_QT_PLUGINS="svg;multimedia;tls"
|
||||
export QML_SOURCES_PATHS="$PWD/src/assets/qml"
|
||||
export PATH="$PWD:$PATH"
|
||||
# Populate AppDir (libs + Qt plugins + QML modules) — no --output yet, so we can patch QML first.
|
||||
./linuxdeploy --appdir AppDir --plugin qt \
|
||||
-d AppDir/usr/share/applications/wowlet.desktop \
|
||||
-i AppDir/usr/share/icons/hicolor/256x256/apps/wowlet.png
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Make the QML bundle COMPLETE and deterministic (no whack-a-mole).
|
||||
#
|
||||
# qmlimportscanner only reads `import` lines in our source QML; it does NOT follow the
|
||||
# `depends`/`default import`/singleton chains inside a Qt module's own qmldir. So transitive
|
||||
# modules (QtQuick -> QtQml.WorkerScript/Models, etc.) get silently skipped. Rather than
|
||||
# enumerate them one by one, blanket-copy the whole QtQuick + QtQml module TREES, then
|
||||
# resolve each copied plugin .so's linked Qt libs into usr/lib ourselves (linuxdeploy only
|
||||
# does that for modules IT deployed, not for ones we copy manually).
|
||||
# ---------------------------------------------------------------------------------------
|
||||
QMLDIR=$(qmake6 -query QT_INSTALL_QML)
|
||||
mkdir -p AppDir/usr/qml AppDir/usr/lib
|
||||
# Blanket-copy the full module trees we depend on (QtQuick incl. Layouts/Window, QtQml incl.
|
||||
# WorkerScript/Models). -n = don't clobber what linuxdeploy already (correctly) deployed.
|
||||
for m in QtQuick QtQml; do
|
||||
cp -rn "$QMLDIR/$m" AppDir/usr/qml/ 2>/dev/null || true
|
||||
done
|
||||
# Resolve the DT_NEEDED Qt6 libs of EVERY bundled QML plugin .so into usr/lib. This closes
|
||||
# the dlopen gap for the trees we copied by hand (libQt6Quick, libQt6Qml, libQt6QmlModels,
|
||||
# libQt6QmlWorkerScript, libQt6QuickLayouts, etc.). -L follows symlinks, -n won't clobber.
|
||||
find AppDir/usr/qml -name '*.so' -print0 | while IFS= read -r -d '' so; do
|
||||
ldd "$so" 2>/dev/null | awk '/=> \//{print $3}' \
|
||||
| grep -E '/(libQt6|libicu|libpcre2|libdouble-conversion|libzstd|libb2|libpng|libharfbuzz|libmd4c|libglib|libgraphite)' \
|
||||
| while read -r lib; do cp -L -n "$lib" AppDir/usr/lib/ 2>/dev/null || true; done
|
||||
done
|
||||
# Sanity: linuxdeploy-plugin-qt writes AppDir/usr/bin/qt.conf with `Imports=qml`/`Qml2Imports=qml`
|
||||
# (Prefix=../), which makes usr/qml the relocatable runtime import path. Confirm it's there.
|
||||
echo "=== qt.conf ===" && cat AppDir/usr/bin/qt.conf 2>/dev/null || echo "WARNING: no qt.conf written by linuxdeploy-plugin-qt"
|
||||
echo "=== bundled QtQuick/QtQml submodules ===" && (ls AppDir/usr/qml/QtQuick AppDir/usr/qml/QtQml 2>/dev/null | sed 's/^/ /')
|
||||
# Guard: mining.qml must NOT pull in QtQuick.Controls/Templates (we removed that import).
|
||||
# If a future edit re-adds a Controls type, this fails loudly instead of shipping a white tab.
|
||||
if grep -q 'import QtQuick.Controls' src/assets/qml/mining.qml; then
|
||||
echo "ERROR: mining.qml imports QtQuick.Controls again — bundle QtQuick/Templates+Controls trees or remove the import." >&2
|
||||
exit 1
|
||||
fi
|
||||
# Package (linuxdeploy already wrote AppRun + .desktop + .DirIcon into AppDir root).
|
||||
curl -sL -o appimagetool https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x appimagetool
|
||||
ARCH=x86_64 ./appimagetool AppDir wowlet-x86_64.AppImage
|
||||
ls -la wowlet-x86_64.AppImage
|
||||
- name: upload wowlet AppImage
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wowlet-x86_64-linux-AppImage
|
||||
path: wowlet-x86_64.AppImage
|
||||
if-no-files-found: error
|
||||
|
||||
build-windows-mingw:
|
||||
name: "Windows x86_64 (mingw cross, depends)"
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HOST: x86_64-w64-mingw32
|
||||
steps:
|
||||
- name: free disk space + add swap
|
||||
# depends unpacks + builds Qt6/boost/openssl from source. Free / of GitHub bloat
|
||||
# (dotnet/android/ghc/CodeQL) AND add swap — 16G RAM alone OOMs the parallel Qt6 compile.
|
||||
run: |
|
||||
echo "disk before:"; df -h / | tail -1
|
||||
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/.ghcup /usr/local/lib/android \
|
||||
/opt/hostedtoolcache/CodeQL /usr/share/swift 2>/dev/null || true
|
||||
sudo apt-get clean
|
||||
echo "disk after:"; df -h / | tail -1
|
||||
sudo fallocate -l 10G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
|
||||
echo "mem:"; free -h
|
||||
- name: update apt
|
||||
run: sudo apt-get update
|
||||
- name: install dependencies
|
||||
# depends cross-build deps: the mingw posix cross-compiler + native build tools depends needs.
|
||||
# NO host Qt6 here (unlike the AppImage job) — depends builds a STATIC Qt6 for mingw itself.
|
||||
run: |
|
||||
sudo apt-get -y install curl ca-certificates bzip2 xz-utils unzip zip git cmake build-essential ccache \
|
||||
python3 perl pkg-config g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix \
|
||||
autoconf automake libtool gettext bison
|
||||
- name: select posix mingw alternatives
|
||||
# mingw32.mk wants the -posix threading variant (std::thread/mutex/cv need it).
|
||||
run: |
|
||||
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
||||
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
||||
- name: configure git
|
||||
run: git config --global --add safe.directory '*'
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
# depends is the slow part (static Qt6/boost/openssl/tor from source). Cache the source tarballs
|
||||
# and the compiled-package cache so only the first run pays the ~1h cost; warm runs are minutes.
|
||||
- name: restore depends sources cache
|
||||
id: cache-sources
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: contrib/depends/sources
|
||||
key: depends-sources-${{ hashFiles('contrib/depends/packages/*') }}
|
||||
restore-keys: |
|
||||
depends-sources-
|
||||
- name: restore depends built cache (mingw)
|
||||
id: cache-built
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: contrib/depends/built
|
||||
key: depends-built-mingw32-${{ hashFiles('contrib/depends/packages/*', 'contrib/depends/hosts/*', 'contrib/depends/toolchain.cmake.in') }}
|
||||
restore-keys: |
|
||||
depends-built-mingw32-
|
||||
- name: build depends (static Qt6 + tor + boost + openssl for mingw)
|
||||
# -j2 not -j(nproc): the parallel static Qt6 compile OOMs the 16G runner at -j4. Slower but safe.
|
||||
run: make -C contrib/depends HOST="$HOST" -j2
|
||||
# Save depends with if:always() so the expensive toolchain banks even when the LATER wowlet.exe
|
||||
# build fails — actions/cache's auto post-save is skipped on job failure, which kept re-paying ~2.5h.
|
||||
- name: save depends sources cache
|
||||
if: always() && steps.cache-sources.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: contrib/depends/sources
|
||||
key: depends-sources-${{ hashFiles('contrib/depends/packages/*') }}
|
||||
- name: save depends built cache (mingw)
|
||||
if: always() && steps.cache-built.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: contrib/depends/built
|
||||
key: depends-built-mingw32-${{ hashFiles('contrib/depends/packages/*', 'contrib/depends/hosts/*', 'contrib/depends/toolchain.cmake.in') }}
|
||||
- name: fetch wownerod.exe to embed
|
||||
run: |
|
||||
mkdir -p /tmp/wownerod-embed
|
||||
curl -L -o /tmp/wownero-win.zip \
|
||||
https://github.com/wownero/wownero-codeberg-mirror/releases/download/v0.11.4.0/wownero-x86_64-w64-mingw32-v0.11.4.0.zip
|
||||
# -j flattens the versioned subdir so wownerod.exe is a DIRECT child (WownerodQrcGenerator
|
||||
# globs ${WOWNEROD_DIR}/* non-recursively).
|
||||
unzip -j /tmp/wownero-win.zip 'wownero-x86_64-w64-mingw32-v0.11.4.0/wownerod.exe' -d /tmp/wownerod-embed
|
||||
ls -la /tmp/wownerod-embed
|
||||
- name: build wowlet.exe
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
# ARCH=x86-64: portable baseline. wownero's CMake defaults ARCH=native, which under a cross
|
||||
# compiler bakes the CI runner's instructions into the Windows binary -> SIGILL on older CPUs.
|
||||
cmake --toolchain "$GITHUB_WORKSPACE/contrib/depends/$HOST/share/toolchain.cmake" \
|
||||
-DARCH=x86-64 \
|
||||
-DWITH_SCANNER=OFF \
|
||||
-DCHECK_UPDATES=OFF \
|
||||
-DTOR_INSTALLED=On \
|
||||
-DFEATHER_TARGET_TRIPLET="$HOST" \
|
||||
-DWOWNEROD_DIR=/tmp/wownerod-embed \
|
||||
..
|
||||
cmake --build . -j2
|
||||
ls -la bin/
|
||||
- name: package zip
|
||||
# Fully static build: just wowlet.exe + the depends-built tor.exe + license. No Qt/runtime DLLs.
|
||||
run: |
|
||||
DISTDIR=wowlet-x86_64-w64-mingw32
|
||||
mkdir -p "$DISTDIR/tor"
|
||||
cp build/bin/feather.exe "$DISTDIR/wowlet.exe"
|
||||
cp "contrib/depends/$HOST/Tor/tor.exe" "$DISTDIR/tor/tor.exe"
|
||||
(cp LICENSE "$DISTDIR/LICENSE.txt" 2>/dev/null || cp COPYING "$DISTDIR/LICENSE.txt" 2>/dev/null) || true
|
||||
(cd "$DISTDIR" && find . -type f | sort | zip -X "../wowlet-x86_64-windows.zip" -@)
|
||||
unzip -l wowlet-x86_64-windows.zip
|
||||
- name: upload wowlet Windows zip
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wowlet-x86_64-windows
|
||||
path: wowlet-x86_64-windows.zip
|
||||
if-no-files-found: error
|
||||
|
||||
build-linux-cross:
|
||||
name: "Linux ${{ matrix.arch }} (depends AppImage)"
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true # arm64/riscv64 deferred to v5.0.1; must not fail the release run
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: arm64
|
||||
host: aarch64-linux-gnu
|
||||
xcompiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
|
||||
cmake_arch: armv8-a
|
||||
wownerod: wownero-aarch64-linux-gnu-v0.11.4.0.tar.bz2
|
||||
- arch: riscv64
|
||||
host: riscv64-linux-gnu
|
||||
xcompiler: g++-riscv64-linux-gnu gcc-riscv64-linux-gnu
|
||||
cmake_arch: rv64gc
|
||||
wownerod: wownero-riscv64-linux-gnu-v0.11.4.0.tar.bz2
|
||||
env:
|
||||
HOST: ${{ matrix.host }}
|
||||
steps:
|
||||
- name: free disk space + add swap
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/.ghcup /usr/local/lib/android \
|
||||
/opt/hostedtoolcache/CodeQL /usr/share/swift 2>/dev/null || true
|
||||
sudo apt-get clean
|
||||
sudo fallocate -l 10G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
|
||||
df -h / | tail -1; free -h | head -2
|
||||
- name: install dependencies
|
||||
# depends builds static Qt6/tor/boost/openssl for the target; we supply the linux cross-compiler
|
||||
# ($(host)-gcc) + squashfs-tools (mksquashfs) for the AppImage.
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install curl ca-certificates bzip2 xz-utils unzip git cmake build-essential ccache \
|
||||
python3 perl pkg-config gperf squashfs-tools meson ninja-build ${{ matrix.xcompiler }} \
|
||||
autoconf automake libtool gettext bison
|
||||
- name: configure git
|
||||
run: git config --global --add safe.directory '*'
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: restore depends sources cache
|
||||
id: cache-sources
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: contrib/depends/sources
|
||||
key: depends-sources-${{ hashFiles('contrib/depends/packages/*') }}
|
||||
restore-keys: |
|
||||
depends-sources-
|
||||
- name: restore depends built cache
|
||||
id: cache-built
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: contrib/depends/built
|
||||
key: depends-built-${{ matrix.host }}-${{ hashFiles('contrib/depends/packages/*', 'contrib/depends/hosts/*', 'contrib/depends/toolchain.cmake.in') }}
|
||||
restore-keys: |
|
||||
depends-built-${{ matrix.host }}-
|
||||
- name: build depends (static Qt6 + tor + boost + openssl)
|
||||
run: make -C contrib/depends HOST="$HOST" -j2
|
||||
- name: save depends sources cache
|
||||
if: always() && steps.cache-sources.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: contrib/depends/sources
|
||||
key: depends-sources-${{ hashFiles('contrib/depends/packages/*') }}
|
||||
- name: save depends built cache
|
||||
if: always() && steps.cache-built.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: contrib/depends/built
|
||||
key: depends-built-${{ matrix.host }}-${{ hashFiles('contrib/depends/packages/*', 'contrib/depends/hosts/*', 'contrib/depends/toolchain.cmake.in') }}
|
||||
- name: fetch wownerod to embed
|
||||
run: |
|
||||
mkdir -p /tmp/wownerod-embed
|
||||
curl -L -o /tmp/wownero.tar.bz2 \
|
||||
https://github.com/wownero/wownero-codeberg-mirror/releases/download/v0.11.4.0/${{ matrix.wownerod }}
|
||||
tar xjf /tmp/wownero.tar.bz2 -C /tmp
|
||||
find /tmp -name wownerod -type f -exec cp {} /tmp/wownerod-embed/ \;
|
||||
chmod +x /tmp/wownerod-embed/wownerod
|
||||
ls -la /tmp/wownerod-embed
|
||||
- name: build wowlet
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
# ARCH pinned (NOT wownero's native default — a cross compiler would bake the wrong ISA -> SIGILL).
|
||||
cmake --toolchain "$GITHUB_WORKSPACE/contrib/depends/$HOST/share/toolchain.cmake" \
|
||||
-DARCH=${{ matrix.cmake_arch }} \
|
||||
-DWITH_SCANNER=OFF \
|
||||
-DCHECK_UPDATES=OFF \
|
||||
-DFEATHER_TARGET_TRIPLET="$HOST" \
|
||||
-DTOR_DIR="$GITHUB_WORKSPACE/contrib/depends/$HOST/Tor" \
|
||||
-DTOR_VERSION=0.4.9.6 \
|
||||
-DWOWNEROD_DIR=/tmp/wownerod-embed \
|
||||
..
|
||||
cmake --build . -j2
|
||||
ls -la bin/
|
||||
- name: package AppImage
|
||||
# build-appimage.sh wraps build/bin/feather with the depends-built ${HOST}/runtime (cross-arch).
|
||||
run: |
|
||||
bash contrib/AppImage/build-appimage.sh
|
||||
mv feather.AppImage "wowlet-${{ matrix.arch }}.AppImage"
|
||||
ls -la "wowlet-${{ matrix.arch }}.AppImage"
|
||||
- name: upload wowlet AppImage
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wowlet-${{ matrix.arch }}-linux-AppImage
|
||||
path: wowlet-${{ matrix.arch }}.AppImage
|
||||
if-no-files-found: error
|
||||
@@ -1,157 +0,0 @@
|
||||
name: ci/gh-actions/guix
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
cache-sources:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: depends sources cache
|
||||
id: cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: contrib/depends/sources
|
||||
key: sources-${{ hashFiles('contrib/depends/packages/*') }}
|
||||
- name: download depends sources
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: make -C contrib/depends download
|
||||
|
||||
build-guix:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [cache-sources]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolchain:
|
||||
- target: "x86_64-linux-gnu"
|
||||
- target: "x86_64-linux-gnu.no-tor-bundle"
|
||||
- target: "x86_64-linux-gnu.pack"
|
||||
- target: "aarch64-linux-gnu"
|
||||
- target: "riscv64-linux-gnu"
|
||||
- target: "x86_64-w64-mingw32"
|
||||
- target: "x86_64-w64-mingw32.installer"
|
||||
- target: "x86_64-apple-darwin"
|
||||
- target: "arm64-apple-darwin"
|
||||
|
||||
outputs:
|
||||
WIN_INSTALLER_ARTIFACT_ID: ${{ steps.win-installer.outputs.WIN_INSTALLER_ARTIFACT_ID }}
|
||||
WIN_EXECUTABLE_ARTIFACT_ID: ${{ steps.win-executable.outputs.WIN_EXECUTABLE_ARTIFACT_ID }}
|
||||
name: ${{ matrix.toolchain.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.ref }}
|
||||
submodules: recursive
|
||||
# https://github.com/actions/checkout/issues/1467
|
||||
- name: git fetch tags
|
||||
run: git fetch --tags
|
||||
- name: remove bundled packages
|
||||
run: sudo rm -rf /usr/local
|
||||
- name: depends sources cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: contrib/depends/sources
|
||||
key: sources-${{ hashFiles('contrib/depends/packages/*') }}
|
||||
- name: install dependencies
|
||||
run: sudo apt update; sudo apt -y install guix git ca-certificates apparmor-utils osslsigncode
|
||||
- name: apparmor workaround
|
||||
# https://bugs.launchpad.net/ubuntu/+source/guix/+bug/2064115
|
||||
run: |
|
||||
sudo tee /etc/apparmor.d/guix << EOF
|
||||
abi <abi/4.0>,
|
||||
include <tunables/global>
|
||||
profile guix /usr/bin/guix flags=(unconfined) {
|
||||
userns,
|
||||
include if exists <local/guix>
|
||||
}
|
||||
EOF
|
||||
sudo /etc/init.d/apparmor reload
|
||||
sudo aa-enforce guix || true
|
||||
sudo apt purge apparmor
|
||||
- name: build
|
||||
run: ADDITIONAL_GUIX_TIMEMACHINE_FLAGS="--disable-authentication" SUBSTITUTE_URLS='http://bordeaux.guix.gnu.org' HOSTS="${{ matrix.toolchain.target }}" ./contrib/guix/guix-build
|
||||
- name: virustotal scan
|
||||
env:
|
||||
VT_API_KEY: ${{ secrets.VT_API_KEY }}
|
||||
if: ${{ matrix.toolchain.target == 'x86_64-w64-mingw32' && env.VT_API_KEY != '' }}
|
||||
uses: crazy-max/ghaction-virustotal@v4
|
||||
with:
|
||||
vt_api_key: ${{ secrets.VT_API_KEY }}
|
||||
files: |
|
||||
guix/guix-build-*/build/distsrc-*/build/bin/feather.exe
|
||||
- uses: actions/upload-artifact@v4
|
||||
id: upload-artifact
|
||||
with:
|
||||
name: ${{ matrix.toolchain.target }}
|
||||
path: |
|
||||
guix/guix-build-*/output/${{ matrix.toolchain.target }}/*
|
||||
guix/guix-build-*/logs/${{ matrix.toolchain.target }}/*
|
||||
- if: ${{ matrix.toolchain.target == 'x86_64-w64-mingw32.installer' }}
|
||||
id: win-installer
|
||||
run: echo "WIN_INSTALLER_ARTIFACT_ID=${{ steps.upload-artifact.outputs.artifact-id }}" >> "$GITHUB_OUTPUT"
|
||||
- if: ${{ matrix.toolchain.target == 'x86_64-w64-mingw32' }}
|
||||
id: win-executable
|
||||
run: echo "WIN_EXECUTABLE_ARTIFACT_ID=${{ steps.upload-artifact.outputs.artifact-id }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
bundle-logs:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [build-guix]
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
merge-multiple: true
|
||||
- name: print hashes
|
||||
run: |
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
uname --machine && find **/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "logs"
|
||||
path: '**/logs/**'
|
||||
|
||||
codesigning:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [build-guix, bundle-logs]
|
||||
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-rc')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolchain:
|
||||
- target: "x86_64-w64-mingw32"
|
||||
- target: "x86_64-w64-mingw32.installer"
|
||||
steps:
|
||||
- name: install dependencies
|
||||
run: sudo apt update; sudo apt -y install osslsigncode
|
||||
- name: "set artifact id"
|
||||
run: |
|
||||
if [ "${{ matrix.toolchain.target }}" == "x86_64-w64-mingw32" ]; then
|
||||
echo "ARTIFACT_ID=${{ needs.build-guix.outputs.WIN_EXECUTABLE_ARTIFACT_ID }}" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_SLUG=executable" >> $GITHUB_ENV
|
||||
elif [ "${{ matrix.toolchain.target }}" == "x86_64-w64-mingw32.installer" ]; then
|
||||
echo "ARTIFACT_ID=${{ needs.build-guix.outputs.WIN_INSTALLER_ARTIFACT_ID }}" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_SLUG=installer" >> $GITHUB_ENV
|
||||
fi
|
||||
- uses: signpath/github-action-submit-signing-request@v1
|
||||
name: "request signature"
|
||||
with:
|
||||
api-token: '${{ secrets.SIGNPATH_API_KEY }}'
|
||||
organization-id: 'd3e94749-9c69-44e9-82de-c65cb3832869'
|
||||
project-slug: 'feather'
|
||||
signing-policy-slug: 'release-signing'
|
||||
artifact-configuration-slug: ${{ env.ARTIFACT_SLUG }}
|
||||
github-artifact-id: ${{ env.ARTIFACT_ID }}
|
||||
wait-for-completion: true
|
||||
output-artifact-directory: codesigning/
|
||||
- name: "extract signature"
|
||||
run: osslsigncode extract-signature -in codesigning/guix-build-*/output/${{ matrix.toolchain.target }}/*.exe -out codesigning/${{ matrix.toolchain.target }}.pem
|
||||
- uses: actions/upload-artifact@v4
|
||||
name: "upload signature"
|
||||
with:
|
||||
name: ${{ matrix.toolchain.target }}.pem
|
||||
path: |
|
||||
codesigning/${{ matrix.toolchain.target }}.pem
|
||||
+5
-14
@@ -1,24 +1,15 @@
|
||||
.DS_Store
|
||||
lib/*
|
||||
cmake-build-debug/*
|
||||
cmake-build-release/*
|
||||
.idea
|
||||
*.user
|
||||
*.stash
|
||||
build/*
|
||||
guix-build-*
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
cmake_install.cmake
|
||||
feather_autogen/
|
||||
feather.cbp
|
||||
src/assets_tor.qrc
|
||||
src/assets_docs.qrc
|
||||
feather.AppDir/*
|
||||
src/assets/tor/*
|
||||
src/assets/docs/*
|
||||
!src/assets/tor/.gitkeep
|
||||
!src/assets/docs/.gitkeep
|
||||
contrib/installers/windows/setup.nsi
|
||||
githash.txt
|
||||
guix/guix-build-*
|
||||
wowlet_autogen/
|
||||
wowlet.cbp
|
||||
src/tor/*
|
||||
!src/tor/.gitkeep
|
||||
src/config-wowlet.h
|
||||
|
||||
+8
-14
@@ -1,16 +1,10 @@
|
||||
[submodule "contrib/KDMacTouchBar"]
|
||||
path = contrib/KDMacTouchBar
|
||||
url = https://github.com/KDAB/KDMacTouchBar.git
|
||||
[submodule "monero"]
|
||||
path = monero
|
||||
url = https://codeberg.org/wownero/wownero.git
|
||||
branch = gui
|
||||
[submodule "src/third-party/polyseed"]
|
||||
path = src/third-party/polyseed
|
||||
url = https://github.com/tevador/polyseed.git
|
||||
[submodule "external/feather-docs"]
|
||||
path = external/feather-docs
|
||||
url = https://github.com/feather-wallet/feather-docs.git
|
||||
[submodule "external/feather-sigs"]
|
||||
path = external/feather-sigs
|
||||
url = https://github.com/feather-wallet/feather-sigs.git
|
||||
[submodule "external/feather-codesigning"]
|
||||
path = external/feather-codesigning
|
||||
url = https://github.com/feather-wallet/feather-codesigning.git
|
||||
url = https://git.wownero.com/wownero/wownero
|
||||
branch = wowlet
|
||||
[submodule "contrib/quirc"]
|
||||
path = contrib/quirc
|
||||
url = https://github.com/dlbeer/quirc.git
|
||||
|
||||
+249
-165
@@ -1,115 +1,155 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(wowlet)
|
||||
|
||||
project(feather
|
||||
VERSION "5.0.3"
|
||||
DESCRIPTION "A free Monero desktop wallet"
|
||||
LANGUAGES CXX C ASM
|
||||
)
|
||||
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(PACKAGE_NAME ${PROJECT_NAME})
|
||||
set(PACKAGE_BUGREPORT "https://github.com/feather-wallet/feather/issues")
|
||||
set(PACKAGE_URL "https://featherwallet.org/")
|
||||
set(COPYRIGHT_YEAR "2025")
|
||||
set(COPYRIGHT_HOLDERS "The Monero Project")
|
||||
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
|
||||
# Configurable options
|
||||
option(STATIC "Link libraries statically, requires static Qt" OFF)
|
||||
option(SELF_CONTAINED "Disable when building Feather for packages" OFF)
|
||||
option(TOR_DIR "Directory containing Tor binaries to embed inside Feather" OFF)
|
||||
option(WOWNEROD_DIR "Directory containing the wownerod binary to embed inside wowlet" OFF)
|
||||
option(CHECK_UPDATES "Enable checking for application updates" OFF)
|
||||
option(PLATFORM_INSTALLER "Built-in updater fetches installer (windows-only)" OFF)
|
||||
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
|
||||
option(WITH_SCANNER "Enable webcam QR scanner" ON)
|
||||
option(STACK_TRACE "Dump stack trace on crash (Linux only)" OFF)
|
||||
|
||||
# internal configuration options
|
||||
option(TOR_INSTALLED "Is Tor installed on the filesystem?" OFF)
|
||||
|
||||
# Plugins
|
||||
option(WITH_PLUGIN_HOME "Include Home tab plugin" ON)
|
||||
option(WITH_PLUGIN_TICKERS "Include Tickers Home plugin" ON)
|
||||
option(WITH_PLUGIN_CROWDFUNDING "Include Crowdfunding Home plugin" ON)
|
||||
option(WITH_PLUGIN_REVUO "Include Revuo Home plugin" ON)
|
||||
option(WITH_PLUGIN_CALC "Include Calc tab plugin" ON)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
set(VERSION_MAJOR "0")
|
||||
set(VERSION_MINOR "2")
|
||||
set(VERSION_REVISION "0")
|
||||
set(VERSION "beta-2")
|
||||
|
||||
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
||||
option(XMRIG "Include XMRig module" ON)
|
||||
option(OPENVR "Include OpenVR support" OFF)
|
||||
option(QML "Include QtQuick (QML)" OFF)
|
||||
option(TOR_BIN "Path to Tor binary to embed inside WOWlet" OFF)
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
option(USE_DEVICE_TREZOR "Trezor support compilation" OFF)
|
||||
option(DONATE_BEG "Prompt donation window every once in a while" ON)
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckLinkerFlag)
|
||||
include(FetchContent)
|
||||
include(FindCcache)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckSymbolExists)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
if(DEBUG)
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
set(WOWNERO_HEAD "f611d5c9e32bc62f1735f6571b0bdb95cc020531")
|
||||
set(BUILD_GUI_DEPS ON)
|
||||
set(ARCH "x86-64")
|
||||
set(BUILD_64 ON)
|
||||
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
||||
set(USE_SINGLE_BUILDDIR ON)
|
||||
if(OPENVR)
|
||||
set(QML ON)
|
||||
endif()
|
||||
|
||||
# Monero configuration
|
||||
set(BUILD_GUI_DEPS ON)
|
||||
set(BUILD_64 ON)
|
||||
set(USE_SINGLE_BUILDDIR ON)
|
||||
# Are we in debug mode?
|
||||
set(_CMAKE_BUILD_TYPE "")
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE)
|
||||
if("${_CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
||||
set(DEBUG ON)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
message(STATUS "OPENVR: ${OPENVR}")
|
||||
message(STATUS "QML: ${QML}")
|
||||
endif()
|
||||
|
||||
check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H)
|
||||
check_symbol_exists(prctl "sys/prctl.h" HAVE_PRCTL)
|
||||
|
||||
if(STATIC)
|
||||
message(STATUS "Initiating static build, turning on manual submodules")
|
||||
set(MANUAL_SUBMODULES 1)
|
||||
|
||||
# monero-project/unbound:monero has a fix for static builds, however, it's not merged in Monero yet, because
|
||||
# it breaks their buildbot, since that still uses openssl 1.1.0 and we use openssl 1.1.1g. We need to
|
||||
# manually set the unbound submodule the right commit that has the fix.
|
||||
# This only works with -DMANUAL_SUBMODULES=1
|
||||
message(STATUS "applying unbound static build fix contrib/unbound_static.patch")
|
||||
execute_process(COMMAND bash -c "git -C ${CMAKE_SOURCE_DIR}/monero/external/unbound apply ${CMAKE_SOURCE_DIR}/contrib/unbound_static.patch")
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
SET(Boost_USE_STATIC_RUNTIME ON)
|
||||
set(Boost_USE_STATIC_RUNTIME ON)
|
||||
add_definitions(-DMONERO_GUI_STATIC)
|
||||
endif()
|
||||
|
||||
function (add_c_flag_if_supported flag var)
|
||||
string(REPLACE "-" "_" supported ${flag}_c)
|
||||
check_c_compiler_flag(${flag} ${supported})
|
||||
if(${${supported}})
|
||||
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function (add_cxx_flag_if_supported flag var)
|
||||
string(REPLACE "-" "_" supported ${flag}_cxx)
|
||||
check_cxx_compiler_flag(${flag} ${supported})
|
||||
if(${${supported}})
|
||||
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function (add_linker_flag_if_supported flag var)
|
||||
string(REPLACE "-" "_" supported ${flag}_ld)
|
||||
string(REPLACE "," "_" supported ${flag}_ld)
|
||||
check_linker_flag(${flag} ${supported})
|
||||
if(${${supported}})
|
||||
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "Initializing submodules")
|
||||
execute_process(COMMAND git "submodule" "update" "--init" "--recursive")
|
||||
execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero OUTPUT_VARIABLE _WOWNERO_HEAD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT _WOWNERO_HEAD STREQUAL WOWNERO_HEAD)
|
||||
message(FATAL_ERROR "[submodule] Monero HEAD was at ${_WOWNERO_HEAD} but should be at ${WOWNERO_HEAD}")
|
||||
else()
|
||||
message(STATUS "[submodule] Wownero HEAD @ ${WOWNERO_HEAD}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
#### Dependencies ####
|
||||
# Monero
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/monero/CMakeLists.txt")
|
||||
message(FATAL_ERROR "'monero/CMakeLists.txt' does not exist, did you forget to:\ngit submodule update --init --recursive --progress")
|
||||
endif()
|
||||
add_subdirectory(monero EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(monero)
|
||||
set_property(TARGET wallet_merged PROPERTY FOLDER "monero")
|
||||
get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH)
|
||||
get_directory_property(DEVICE_TREZOR_READY DIRECTORY "monero" DEFINITION DEVICE_TREZOR_READY)
|
||||
get_directory_property(TREZOR_DEP_LIBS DIRECTORY "monero" DEFINITION TREZOR_DEP_LIBS)
|
||||
get_directory_property(OPENBSD DIRECTORY "monero" DEFINITION OPENBSD)
|
||||
get_directory_property(FREEBSD DIRECTORY "monero" DEFINITION FREEBSD)
|
||||
get_directory_property(DRAGONFLY DIRECTORY "monero" DEFINITION DRAGONFLY)
|
||||
get_directory_property(UNBOUND_LIBRARY DIRECTORY "monero" DEFINITION UNBOUND_LIBRARY)
|
||||
|
||||
# pthread
|
||||
find_package(Threads REQUIRED)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(VersionMonero)
|
||||
include(VersionWowlet)
|
||||
|
||||
include_directories(${EASYLOGGING_INCLUDE})
|
||||
link_directories(${EASYLOGGING_LIBRARY_DIRS})
|
||||
|
||||
# OpenSSL
|
||||
if(APPLE AND NOT OPENSSL_ROOT_DIR)
|
||||
execute_process(COMMAND brew --prefix openssl OUTPUT_VARIABLE OPENSSL_ROOT_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
find_package(OpenSSL REQUIRED)
|
||||
message(STATUS "OpenSSL: Version ${OPENSSL_VERSION}")
|
||||
message(STATUS "OpenSSL: include dir at ${OPENSSL_INCLUDE_DIR}")
|
||||
message(STATUS "OpenSSL: libraries at ${OPENSSL_LIBRARIES} ${OPENSSL_SSL_LIBRARIES}")
|
||||
|
||||
# Sodium
|
||||
find_library(SODIUM_LIBRARY sodium)
|
||||
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
|
||||
|
||||
# HIDApi
|
||||
set(HIDAPI_FOUND OFF)
|
||||
|
||||
# QrEncode
|
||||
find_package(QREncode REQUIRED)
|
||||
|
||||
# bc-ur
|
||||
if(WITH_SCANNER)
|
||||
find_package(BCUR REQUIRED)
|
||||
if(BCUR_VENDORED)
|
||||
add_subdirectory(src/third-party/bcur EXCLUDE_FROM_ALL)
|
||||
# Tevador 14 word Monero seed
|
||||
find_package(monero-seed CONFIG)
|
||||
if(NOT monero-seed_FOUND)
|
||||
if(FETCH_DEPS)
|
||||
FetchContent_Declare(monero-seed
|
||||
GIT_REPOSITORY https://git.wownero.com/wowlet/monero-seed.git)
|
||||
FetchContent_GetProperties(monero-seed)
|
||||
if(NOT monero-seed_POPULATED)
|
||||
message(STATUS "Fetching monero-seed")
|
||||
FetchContent_Populate(monero-seed)
|
||||
add_subdirectory(${monero-seed_SOURCE_DIR} ${monero-seed_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Polyseed
|
||||
find_package(Polyseed REQUIRED)
|
||||
if(Polyseed_SUBMODULE)
|
||||
add_subdirectory(src/third-party/polyseed EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
# ZXing
|
||||
if(WITH_SCANNER)
|
||||
find_package(ZXing REQUIRED)
|
||||
endif()
|
||||
|
||||
# libzip
|
||||
if(CHECK_UPDATES)
|
||||
set(ZLIB_USE_STATIC_LIBS "ON")
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_path(LIBZIP_INCLUDE_DIRS zip.h)
|
||||
find_library(LIBZIP_LIBRARIES zip)
|
||||
add_library(monero-seed::monero-seed ALIAS monero-seed)
|
||||
else()
|
||||
message(FATAL_ERROR "monero-seed was not installed and fetching deps is disabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Boost
|
||||
@@ -120,69 +160,85 @@ if(APPLE AND NOT BOOST_ROOT)
|
||||
execute_process(COMMAND brew --prefix boost OUTPUT_VARIABLE BOOST_ROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(MINGW)
|
||||
set(MINGW_FLAG "${MINGW_FLAG} -DWIN32_LEAN_AND_MEAN")
|
||||
set(Boost_THREADAPI win32)
|
||||
endif()
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
|
||||
if(STACK_TRACE AND UNIX AND NOT APPLE)
|
||||
find_package(Boost 1.58 REQUIRED COMPONENTS stacktrace_basic)
|
||||
endif()
|
||||
find_package(Boost 1.58 REQUIRED COMPONENTS
|
||||
system
|
||||
filesystem
|
||||
thread
|
||||
date_time
|
||||
chrono
|
||||
regex
|
||||
serialization
|
||||
program_options
|
||||
locale)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
# https://github.com/monero-project/monero-gui/issues/3142#issuecomment-705940446
|
||||
set(CMAKE_SKIP_RPATH ON)
|
||||
endif()
|
||||
|
||||
find_package(X11 REQUIRED)
|
||||
message(STATUS "X11_FOUND = ${X11_FOUND}")
|
||||
message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
|
||||
message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
link_directories(${X11_LIBRARIES})
|
||||
if(STATIC)
|
||||
find_library(XCB_LIBRARY xcb)
|
||||
message(STATUS "Found xcb library: ${XCB_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(GenerateDocs)
|
||||
include(TorQrcGenerator)
|
||||
include(WownerodQrcGenerator)
|
||||
if("$ENV{DRONE}" STREQUAL "true")
|
||||
message(STATUS "We are inside a static compile with Drone CI")
|
||||
endif()
|
||||
|
||||
# To build Feather with embedded (and static) Tor, pass CMake -DTOR_DIR=/path/to/tor/
|
||||
if(TOR_DIR)
|
||||
if (NOT TOR_VERSION)
|
||||
message(FATAL_ERROR "TOR_DIR is specified but TOR_VERSION is not set")
|
||||
# To build WOWlet with embedded (and static) Tor, pass CMake -DTOR_BIN=/path/to/tor
|
||||
if(TOR_BIN)
|
||||
if(APPLE)
|
||||
execute_process(COMMAND bash -c "touch ${CMAKE_CURRENT_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib")
|
||||
endif()
|
||||
|
||||
message(STATUS "Embedded Tor version: ${TOR_VERSION}")
|
||||
execute_process(COMMAND bash -c "${TOR_BIN} --version --quiet" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE out RESULT_VARIABLE ret)
|
||||
if (ret EQUAL "0")
|
||||
set(TOR_VERSION "${out}")
|
||||
endif()
|
||||
message(STATUS "${TOR_VERSION}")
|
||||
configure_file("cmake/config-wowlet.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-wowlet.h")
|
||||
|
||||
# Always copy Tor when doing a reproducible build to prevent old versions from getting included
|
||||
if (REPRODUCIBLE)
|
||||
set(TOR_COPY_CMD "cp -a ${TOR_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/tor")
|
||||
# on the buildbot Tor is baked into the image
|
||||
# - linux: See `Dockerfile`
|
||||
# - windows: See `Dockerfile.windows`
|
||||
# - macos: taken from Tor Browser official release
|
||||
if(REPRODUCIBLE) # Always copy Tor when doing a reproducible build to prevent old versions from getting included
|
||||
set(TOR_COPY_CMD "cp ${TOR_BIN} ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/tor")
|
||||
else()
|
||||
set(TOR_COPY_CMD "cp -au ${TOR_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/tor")
|
||||
set(TOR_COPY_CMD "cp -u ${TOR_BIN} ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/tor")
|
||||
endif()
|
||||
|
||||
message(STATUS "${TOR_COPY_CMD}")
|
||||
execute_process(COMMAND bash -c "${TOR_COPY_CMD}" RESULT_VARIABLE ret)
|
||||
if(ret EQUAL "1")
|
||||
message(FATAL_ERROR "Tor copy failure: ${TOR_COPY_CMD}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Embedding Tor binaries at ${TOR_DIR}")
|
||||
message(STATUS "Embedding Tor binary at ${TOR_BIN}")
|
||||
else()
|
||||
message(STATUS "Skipping Tor inclusion because -DTOR_DIR=Off")
|
||||
message(STATUS "Skipping Tor inclusion because -DTOR_BIN=Off")
|
||||
endif()
|
||||
|
||||
# wowlet: copy the wownerod binary into src/assets/wownerod so it gets embedded — single self-contained
|
||||
# file with the node inside. WOWNEROD_DIR points at a dir containing a `wownerod` (or wownerod.exe).
|
||||
if(WOWNEROD_DIR)
|
||||
execute_process(COMMAND bash -c "mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/wownerod")
|
||||
if (REPRODUCIBLE)
|
||||
set(WOWNEROD_COPY_CMD "cp -a ${WOWNEROD_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/wownerod")
|
||||
else()
|
||||
set(WOWNEROD_COPY_CMD "cp -au ${WOWNEROD_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/wownerod")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND bash -c "${WOWNEROD_COPY_CMD}" RESULT_VARIABLE ret)
|
||||
if(ret EQUAL "1")
|
||||
message(FATAL_ERROR "wownerod copy failure: ${WOWNEROD_COPY_CMD}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Embedding wownerod binary from ${WOWNEROD_DIR}")
|
||||
else()
|
||||
message(STATUS "Skipping wownerod inclusion because -DWOWNEROD_DIR=Off")
|
||||
if(MINGW)
|
||||
string(REGEX MATCH "^[^/]:/[^/]*" msys2_install_path "${CMAKE_C_COMPILER}")
|
||||
message(STATUS "MSYS location: ${msys2_install_path}")
|
||||
set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw${ARCH_WIDTH}/include")
|
||||
# This is necessary because otherwise CMake will make Boost libraries -lfoo
|
||||
# rather than a full path. Unfortunately, this makes the shared libraries get
|
||||
# linked due to a bug in CMake which misses putting -static flags around the
|
||||
# -lfoo arguments.
|
||||
set(DEFLIB ${msys2_install_path}/mingw${ARCH_WIDTH}/lib)
|
||||
list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
|
||||
list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
|
||||
endif()
|
||||
|
||||
message(STATUS "Using Boost include dir at ${Boost_INCLUDE_DIRS}")
|
||||
@@ -192,6 +248,11 @@ include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
if(MINGW)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
||||
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
||||
if(DEPENDS)
|
||||
set(ICU_LIBRARIES iconv)
|
||||
else()
|
||||
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(EXTRA_LIBRARIES "-framework AppKit")
|
||||
elseif(OPENBSD)
|
||||
@@ -208,43 +269,61 @@ elseif(NOT MSVC AND NOT DEPENDS)
|
||||
set(EXTRA_LIBRARIES ${RT})
|
||||
endif()
|
||||
|
||||
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
|
||||
if(APPLE)
|
||||
include_directories(SYSTEM /usr/include/malloc)
|
||||
if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
|
||||
endif()
|
||||
|
||||
if (APPLE AND NOT IOS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -std=c++17")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
|
||||
endif()
|
||||
|
||||
#### Security Flags ####
|
||||
# warnings
|
||||
# @TODO: enable these 2 for migration to Qt 6
|
||||
#add_c_flag_if_supported(-Werror C_SECURITY_FLAGS)
|
||||
#add_cxx_flag_if_supported(-Werror CXX_SECURITY_FLAGS)
|
||||
add_c_flag_if_supported(-Wformat C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-Wformat CXX_SECURITY_FLAGS)
|
||||
add_c_flag_if_supported(-Wformat-security C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-Wformat-security CXX_SECURITY_FLAGS)
|
||||
|
||||
# -fstack-protector
|
||||
if (NOT OPENBSD)
|
||||
if (NOT OPENBSD AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)))
|
||||
add_c_flag_if_supported(-fstack-protector C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fstack-protector CXX_SECURITY_FLAGS)
|
||||
add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
# -fcf-protection=full
|
||||
# new in GCC 8.2
|
||||
# New in GCC 8.2
|
||||
if (NOT OPENBSD AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)))
|
||||
add_c_flag_if_supported(-fcf-protection=full C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fcf-protection=full CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
# -fstack-clash-protection
|
||||
if (NOT WIN32 AND NOT OPENBSD AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
if (NOT WIN32 AND NOT OPENBSD)
|
||||
add_c_flag_if_supported(-fstack-clash-protection C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
# Removed in GCC 9.1 (or before ?), but still accepted, so spams the output
|
||||
if (NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1))
|
||||
add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
# linker
|
||||
if (APPLE)
|
||||
add_linker_flag_if_supported(-Wl,-fixup_chains LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-bind_at_load LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-dead_strip LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-dead_strip_dylibs LD_SECURITY_FLAGS)
|
||||
endif()
|
||||
@@ -271,47 +350,52 @@ if (WIN32)
|
||||
endif()
|
||||
|
||||
if(STATIC)
|
||||
add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS)
|
||||
add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS)
|
||||
if(MINGW)
|
||||
add_linker_flag_if_supported(-static STATIC_FLAGS)
|
||||
elseif (NOT (APPLE OR FREEBSD OR OPENBSD OR DRAGONFLY))
|
||||
if(NOT "${ARCH}" STREQUAL "armv7-a")
|
||||
add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS)
|
||||
add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# 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.
|
||||
add_c_flag_if_supported(-fno-strict-aliasing C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fno-strict-aliasing CXX_SECURITY_FLAGS)
|
||||
|
||||
add_c_flag_if_supported(-fPIC C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fPIC CXX_SECURITY_FLAGS)
|
||||
|
||||
set(ANTI_AV_FLAGS "-Dcryptonote=MWYSUTPAXIBT")
|
||||
message(STATUS "Using C security hardening flags: ${C_SECURITY_FLAGS}")
|
||||
message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
|
||||
message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MINGW_FLAG} -std=c11 ${C_SECURITY_FLAGS} ${ANTI_AV_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MINGW_FLAG} ${CXX_SECURITY_FLAGS} ${ANTI_AV_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
configure_file("${CMAKE_SOURCE_DIR}/contrib/installers/windows/setup.nsi.in" "${CMAKE_SOURCE_DIR}/contrib/installers/windows/setup.nsi" @ONLY)
|
||||
|
||||
#### Summary ####
|
||||
|
||||
message("\n")
|
||||
message("Configure summary")
|
||||
message("=================")
|
||||
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
set(cross_status "TRUE, for ${CMAKE_SYSTEM_NAME}, ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
else()
|
||||
set(cross_status "FALSE")
|
||||
if(APPLE)
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/KDMacTouchBar")
|
||||
endif()
|
||||
|
||||
message("Cross compiling ....................... ${cross_status}")
|
||||
get_target_property(definitions feather COMPILE_DEFINITIONS)
|
||||
message("Preprocessor defined macros ........... ${definitions}")
|
||||
message("C compiler ............................ ${CMAKE_C_COMPILER}")
|
||||
message("CFLAGS ................................ ${CMAKE_C_FLAGS}")
|
||||
message("C++ compiler .......................... ${CMAKE_CXX_COMPILER}")
|
||||
message("CXXFLAGS .............................. ${CMAKE_CXX_FLAGS}")
|
||||
message("LDFLAGS for executables ............... ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
message("\n")
|
||||
if(OPENVR)
|
||||
# Add contrib/openvr as library
|
||||
add_definitions(-DVR_API_PUBLIC)
|
||||
add_definitions(-DOPENVR_BUILD_STATIC) # is this needed?
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/openvr")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/KDMacTouchBar")
|
||||
endif()
|
||||
|
||||
if(WITH_SCANNER)
|
||||
add_library(quirc STATIC
|
||||
contrib/quirc/lib/decode.c
|
||||
contrib/quirc/lib/identify.c
|
||||
contrib/quirc/lib/quirc.c
|
||||
contrib/quirc/lib/version_db.c
|
||||
)
|
||||
target_include_directories(quirc PUBLIC contrib/quirc/lib)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
+416
@@ -0,0 +1,416 @@
|
||||
FROM ubuntu:18.04 AS tor
|
||||
|
||||
ENV CFLAGS="-fPIC"
|
||||
ENV CPPFLAGS="-fPIC"
|
||||
ENV CXXFLAGS="-fPIC"
|
||||
ENV SOURCE_DATE_EPOCH=1397818193
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y build-essential wget git automake pkg-config python python3 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz && \
|
||||
echo "e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242 openssl-1.1.1i.tar.gz" | sha256sum -c && \
|
||||
tar -xzf openssl-1.1.1i.tar.gz && \
|
||||
rm openssl-1.1.1i.tar.gz && \
|
||||
cd openssl-1.1.1i && \
|
||||
./config no-shared no-dso --prefix=/usr/local/openssl && \
|
||||
make -j$THREADS && \
|
||||
make test && \
|
||||
make -j$THREADS install_sw && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz && \
|
||||
echo "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb libevent-2.1.12-stable.tar.gz" | sha256sum -c && \
|
||||
tar -zxvf libevent-2.1.12-stable.tar.gz && \
|
||||
cd libevent-2.1.12-stable && \
|
||||
PKG_CONFIG_PATH=/usr/local/openssl/lib/pkgconfig/ \
|
||||
./configure --prefix=/usr/local/libevent \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--with-pic && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
||||
cd zlib && \
|
||||
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
|
||||
./configure --static --prefix=/usr/local/zlib && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b tor-0.4.5.5-rc --depth 1 https://git.torproject.org/tor.git && \
|
||||
cd tor && \
|
||||
git reset --hard b36a00e9a9d3eb4b2949951afaa72e45fb7e68cd && \
|
||||
./autogen.sh && \
|
||||
./configure \
|
||||
--disable-asciidoc \
|
||||
--disable-manpage \
|
||||
--disable-html-manual \
|
||||
--disable-system-torrc \
|
||||
--disable-module-relay \
|
||||
--disable-lzma \
|
||||
--disable-zstd \
|
||||
--enable-static-tor \
|
||||
--with-libevent-dir=/usr/local/libevent \
|
||||
--with-openssl-dir=/usr/local/openssl \
|
||||
--with-zlib-dir=/usr/local/zlib \
|
||||
--disable-tool-name-check \
|
||||
--enable-fatal-warnings \
|
||||
--prefix=/usr/local/tor && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd) && \
|
||||
strip -s -D /usr/local/tor/bin/tor
|
||||
|
||||
FROM ubuntu:16.04
|
||||
|
||||
ARG THREADS=1
|
||||
ARG QT_VERSION=5.15.2
|
||||
|
||||
ENV CFLAGS="-fPIC"
|
||||
ENV CPPFLAGS="-fPIC"
|
||||
ENV CXXFLAGS="-fPIC"
|
||||
ENV SOURCE_DATE_EPOCH=1397818193
|
||||
|
||||
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
|
||||
ENV TOR_BIN=/usr/local/tor/bin/tor
|
||||
|
||||
COPY --from=tor ${TOR_BIN} /usr/local/tor/bin/tor
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
# dev tools
|
||||
nano vim ccache \
|
||||
# build tools
|
||||
software-properties-common automake pkg-config python \
|
||||
libtool-bin wget zip \
|
||||
# dependencies
|
||||
libusb-1.0-0-dev \
|
||||
# Qt
|
||||
libgl1-mesa-dev libglib2.0-dev mesa-common-dev \
|
||||
# libusb
|
||||
libudev-dev \
|
||||
# fontconfig
|
||||
autopoint gettext gperf libpng12-dev \
|
||||
# libxcb
|
||||
libpthread-stubs0-dev \
|
||||
# xorgproto
|
||||
xutils-dev \
|
||||
# libxkbcommon
|
||||
bison \
|
||||
# zeromq
|
||||
libsodium-dev \
|
||||
# AppImage tools
|
||||
file squashfs-tools desktop-file-utils patchelf
|
||||
|
||||
RUN add-apt-repository ppa:git-core/ppa && \
|
||||
apt-get update && \
|
||||
apt-get install -y git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir appimagetool && \
|
||||
cd appimagetool && \
|
||||
wget https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage && \
|
||||
echo "d918b4df547b388ef253f3c9e7f6529ca81a885395c31f619d9aaf7030499a13 appimagetool-x86_64.AppImage" | sha256sum -c && \
|
||||
chmod +x appimagetool-x86_64.AppImage && \
|
||||
./appimagetool-x86_64.AppImage --appimage-extract && \
|
||||
rm appimagetool-x86_64.AppImage
|
||||
|
||||
RUN git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
|
||||
cd xorgproto && \
|
||||
git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \
|
||||
./autogen.sh && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xcbproto && \
|
||||
cd xcbproto && \
|
||||
git reset --hard 6398e42131eedddde0d98759067dde933191f049 && \
|
||||
./autogen.sh && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libXau-1.0.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxau && \
|
||||
cd libxau && \
|
||||
git reset --hard d9443b2c57b512cfb250b35707378654d86c7dea && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
||||
cd libxcb && \
|
||||
git reset --hard d34785a34f28fa6a00f8ce00d87e3132ff0f6467 && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
make -j$THREADS clean && \
|
||||
rm /usr/local/lib/libxcb-xinerama.so && \
|
||||
./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
cp src/.libs/libxcb-xinerama.a /usr/local/lib/ && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-util && \
|
||||
cd libxcb-util && \
|
||||
git reset --hard acf790d7752f36e450d476ad79807d4012ec863b && \
|
||||
git submodule init && \
|
||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-image && \
|
||||
cd libxcb-image && \
|
||||
git reset --hard d882052fb2ce439c6483fce944ba8f16f7294639 && \
|
||||
git submodule init && \
|
||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms && \
|
||||
cd libxcb-keysyms && \
|
||||
git reset --hard 0e51ee5570a6a80bdf98770b975dfe8a57f4eeb1 && \
|
||||
git submodule init && \
|
||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 0.3.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-render-util && \
|
||||
cd libxcb-render-util && \
|
||||
git reset --hard 0317caf63de532fd7a0493ed6afa871a67253747 && \
|
||||
git submodule init && \
|
||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 0.4.1 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-wm && \
|
||||
cd libxcb-wm && \
|
||||
git reset --hard 24eb17df2e1245885e72c9d4bbb0a0f69f0700f2 && \
|
||||
git submodule init && \
|
||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b xkbcommon-0.5.0 --depth 1 https://github.com/xkbcommon/libxkbcommon && \
|
||||
cd libxkbcommon && \
|
||||
git reset --hard c43c3c866eb9d52cd8f61e75cbef1c30d07f3a28 && \
|
||||
./autogen.sh --prefix=/usr --enable-shared --disable-static --enable-x11 --disable-docs && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
||||
cd zlib && \
|
||||
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
|
||||
./configure --static --prefix=/usr/local/zlib && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b VER-2-10-2 --depth 1 https://git.savannah.gnu.org/git/freetype/freetype2.git && \
|
||||
cd freetype2 && \
|
||||
git reset --hard 132f19b779828b194b3fede187cee719785db4d8 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --with-zlib=no && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b R_2_2_9 --depth 1 https://github.com/libexpat/libexpat && \
|
||||
cd libexpat/expat && \
|
||||
git reset --hard a7bc26b69768f7fb24f0c7976fae24b157b85b13 && \
|
||||
./buildconf.sh && \
|
||||
./configure --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig && \
|
||||
cd fontconfig && \
|
||||
git reset --hard b1df1101a643ae16cdfa1d83b939de2497b1bf27 && \
|
||||
./autogen.sh --disable-shared --enable-static --sysconfdir=/etc --localstatedir=/var && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \
|
||||
cd icu/icu4c/source && \
|
||||
git reset --hard e2d85306162d3a0691b070b4f0a73e4012433444 && \
|
||||
./configure --disable-shared --enable-static --disable-tests --disable-samples && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz && \
|
||||
echo "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf boost_1_73_0.tar.gz" | sha256sum -c && \
|
||||
tar -xzf boost_1_73_0.tar.gz && \
|
||||
rm boost_1_73_0.tar.gz && \
|
||||
cd boost_1_73_0 && \
|
||||
./bootstrap.sh && \
|
||||
./b2 --with-atomic --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options --with-locale variant=release link=static runtime-link=static cflags="${CFLAGS}" cxxflags="${CXXFLAGS}" install -a --prefix=/usr && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz && \
|
||||
echo "e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242 openssl-1.1.1i.tar.gz" | sha256sum -c && \
|
||||
tar -xzf openssl-1.1.1i.tar.gz && \
|
||||
rm openssl-1.1.1i.tar.gz && \
|
||||
cd openssl-1.1.1i && \
|
||||
./config no-shared no-dso --prefix=/usr/local/openssl && \
|
||||
make -j$THREADS && \
|
||||
make test && \
|
||||
make -j$THREADS install_sw && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
|
||||
rm /usr/lib/x86_64-linux-gnu/libXext.a && \
|
||||
rm /usr/lib/x86_64-linux-gnu/libX11-xcb.a && \
|
||||
git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
|
||||
cd qt5 && \
|
||||
git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtimageformats.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtmultimedia.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtsvg.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qttools.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtx11extras.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lXau/ /usr/local/lib/pkgconfig/xcb.pc && \
|
||||
sed -i s/\\/usr\\/X11R6\\/lib64/\\/usr\\/local\\/lib/ qtbase/mkspecs/linux-g++-64/qmake.conf && \
|
||||
OPENSSL_LIBS="-lssl -lcrypto -lpthread -ldl" \
|
||||
./configure --prefix=/usr -platform linux-g++-64 -opensource -confirm-license -release -static -no-avx \
|
||||
-no-opengl -qpa xcb --xcb -xcb-xlib -feature-xlib -openssl-linked -I /usr/local/openssl/include \
|
||||
-L /usr/local/openssl/lib -system-freetype -fontconfig -glib \
|
||||
-no-dbus -no-sql-sqlite -no-use-gold-linker -no-kms \
|
||||
-qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
|
||||
-skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
|
||||
-skip qtdoc -skip qtquickcontrols -skip qtquickcontrols2 -skip qtspeech -skip qtgamepad \
|
||||
-skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -optimize-size \
|
||||
-skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools \
|
||||
-skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebview \
|
||||
-skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine \
|
||||
-skip qtdeclarative \
|
||||
-no-feature-cups -no-feature-ftp -no-feature-pdf -no-feature-animation \
|
||||
-nomake examples -nomake tests -nomake tools && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd qttools/src/linguist/lrelease && \
|
||||
../../../../qtbase/bin/qmake && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd ../../../.. && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb && \
|
||||
cd libusb && \
|
||||
git reset --hard e782eeb2514266f6738e242cdcb18e3ae1ed06fa && \
|
||||
./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b hidapi-0.9.0 --depth 1 https://github.com/libusb/hidapi && \
|
||||
cd hidapi && \
|
||||
git reset --hard 7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f && \
|
||||
./bootstrap && \
|
||||
./configure --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v4.3.2 --depth 1 https://github.com/zeromq/libzmq && \
|
||||
cd libzmq && \
|
||||
git reset --hard a84ffa12b2eb3569ced199660bac5ad128bff1f0 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-libunwind --with-libsodium && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \
|
||||
cd libgpg-error && \
|
||||
git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc --disable-tests && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \
|
||||
cd libgcrypt && \
|
||||
git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v3.10.0 --depth 1 https://github.com/protocolbuffers/protobuf && \
|
||||
cd protobuf && \
|
||||
git reset --hard 6d4e7fd7966c989e38024a8ea693db83758944f1 && \
|
||||
./autogen.sh && \
|
||||
./configure --enable-static --disable-shared && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v3.18.4 --depth 1 https://github.com/Kitware/CMake && \
|
||||
cd CMake && \
|
||||
git reset --hard 3cc3d42aba879fff5e85b363ae8f21386a3f9f9b && \
|
||||
./bootstrap && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v4.0.2 --depth 1 https://github.com/fukuchi/libqrencode.git && \
|
||||
cd libqrencode && \
|
||||
git reset --hard 59ee597f913fcfda7a010a6e106fbee2595f68e4 && \
|
||||
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr . && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \
|
||||
cd monero-seed && \
|
||||
git reset --hard 4674ef09b6faa6fe602ab5ae0b9ca8e1fd7d5e1b && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && \
|
||||
make -Cbuild -j$THREADS && \
|
||||
make -Cbuild install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone https://github.com/plougher/squashfs-tools.git && \
|
||||
cd squashfs-tools/squashfs-tools && \
|
||||
git reset --hard 38fa0720526222827da44b3b6c3f7eb63e8f5c2f && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN mkdir linuxdeployqt && \
|
||||
cd linuxdeployqt && \
|
||||
wget https://github.com/probonopd/linuxdeployqt/releases/download/7/linuxdeployqt-7-x86_64.AppImage && \
|
||||
echo "645276306a801d7154d59e5b4b3c2fac3d34e09be57ec31f6d9a09814c6c162a linuxdeployqt-7-x86_64.AppImage" | sha256sum -c && \
|
||||
chmod +x linuxdeployqt-7-x86_64.AppImage && \
|
||||
./linuxdeployqt-7-x86_64.AppImage --appimage-extract && \
|
||||
rm linuxdeployqt-7-x86_64.AppImage
|
||||
@@ -0,0 +1,186 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG THREADS=1
|
||||
ARG QT_VERSION=5.15.2
|
||||
ENV SOURCE_DATE_EPOCH=1397818193
|
||||
|
||||
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
|
||||
ENV TOR_BIN=/usr/local/tor/bin/tor.exe
|
||||
|
||||
RUN apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y curl nano wget zip automake build-essential cmake gcc-mingw-w64 g++-mingw-w64 gettext git libtool pkg-config \
|
||||
python && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
||||
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
||||
|
||||
RUN git clone -b v0.17.1.9 --depth 1 https://github.com/monero-project/monero && \
|
||||
cd monero && \
|
||||
git reset --hard 8fef32e45c80aec41f25be9d1d8fb75adc883c64 && \
|
||||
cp -a contrib/depends / && \
|
||||
cd .. && \
|
||||
rm -rf monero
|
||||
|
||||
RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1
|
||||
|
||||
RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
|
||||
cd qt5 && \
|
||||
git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtdeclarative.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtgraphicaleffects.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtimageformats.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtmultimedia.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtquickcontrols.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtquickcontrols2.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtsvg.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qttools.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtxmlpatterns.git -b ${QT_VERSION} --depth 1 && \
|
||||
git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \
|
||||
OPENSSL_LIBS="-lssl -lcrypto -lpthread -ldl" \
|
||||
./configure --prefix=/depends/x86_64-w64-mingw32 -xplatform win32-g++ \
|
||||
-device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \
|
||||
-I $(pwd)/qtbase/src/3rdparty/angle/include \
|
||||
-opensource -confirm-license -release -static -static-runtime -opengl dynamic -no-angle \
|
||||
-no-feature-qml-worker-script -no-avx -openssl -I /depends/x86_64-w64-mingw32/include -L /depends/x86_64-w64-mingw32/lib \
|
||||
-qt-freetype -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
|
||||
-skip gamepad -skip location -skip qt3d -skip qtactiveqt -skip qtandroidextras \
|
||||
-skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc \
|
||||
-skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing \
|
||||
-skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport \
|
||||
-skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel \
|
||||
-skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtx11extras \
|
||||
-skip serialbus -skip webengine \
|
||||
-nomake examples -nomake tests -nomake tools && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd qttools/src/linguist/lrelease && \
|
||||
../../../../qtbase/bin/qmake && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd ../../../.. && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \
|
||||
cd libgpg-error && \
|
||||
git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc --disable-tests \
|
||||
--host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd .. && \
|
||||
rm -rf libgpg-error
|
||||
|
||||
RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \
|
||||
cd libgcrypt && \
|
||||
git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc \
|
||||
--host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 \
|
||||
--with-gpg-error-prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd .. && \
|
||||
rm -rf libgcrypt
|
||||
|
||||
# zlib -> libpng, Tor
|
||||
RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
||||
cd zlib && \
|
||||
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
|
||||
CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar ./configure --static --prefix=/usr/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
# libpng -> libqrencode
|
||||
RUN git clone -b libpng16 --depth 1 https://github.com/glennrp/libpng.git && \
|
||||
cd libpng && \
|
||||
git reset --hard a37d4836519517bdce6cb9d956092321eca3e73b && \
|
||||
CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
|
||||
./configure --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v4.0.2 --depth 1 https://github.com/fukuchi/libqrencode.git && \
|
||||
cd libqrencode && \
|
||||
git reset --hard 59ee597f913fcfda7a010a6e106fbee2595f68e4 && \
|
||||
./autogen.sh && \
|
||||
CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
|
||||
./configure --disable-shared --enable-static --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz && \
|
||||
echo "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 libiconv-1.16.tar.gz" | sha256sum -c && \
|
||||
tar -xzf libiconv-1.16.tar.gz && \
|
||||
rm libiconv-1.16.tar.gz && \
|
||||
cd libiconv-1.16 && \
|
||||
./configure --enable-static --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
# OpenSSL -> Tor
|
||||
RUN wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz && \
|
||||
echo "892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5 openssl-1.1.1k.tar.gz" | sha256sum -c && \
|
||||
tar -xzf openssl-1.1.1k.tar.gz && \
|
||||
rm openssl-1.1.1k.tar.gz && \
|
||||
cd openssl-1.1.1k && \
|
||||
./Configure mingw64 no-shared no-dso --cross-compile-prefix=x86_64-w64-mingw32- --prefix=/usr/local/openssl && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install_sw && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
# libevent -> Tor
|
||||
RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz && \
|
||||
echo "a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d libevent-2.1.11-stable.tar.gz" | sha256sum -c && \
|
||||
tar -zxvf libevent-2.1.11-stable.tar.gz && \
|
||||
cd libevent-2.1.11-stable && \
|
||||
./configure --prefix=/usr/local/libevent \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--with-pic \
|
||||
--host=x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b tor-0.4.5.7 --depth 1 https://git.torproject.org/tor.git && \
|
||||
cd tor && \
|
||||
git reset --hard 83f895c015de55201e5f226f84a866f30f5ee14b && \
|
||||
./autogen.sh && \
|
||||
./configure --host=x86_64-w64-mingw32 \
|
||||
--disable-asciidoc \
|
||||
--disable-zstd \
|
||||
--disable-lzma \
|
||||
--disable-manpage \
|
||||
--disable-html-manual \
|
||||
--disable-system-torrc \
|
||||
--disable-module-relay \
|
||||
--enable-static-tor \
|
||||
--with-libevent-dir=/usr/local/libevent \
|
||||
--with-openssl-dir=/usr/local/openssl \
|
||||
--with-zlib-dir=/usr/x86_64-w64-mingw32 \
|
||||
--disable-tool-name-check \
|
||||
--enable-fatal-warnings \
|
||||
--prefix=/usr/local/tor \
|
||||
LIBS=-lcrypt32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd) && \
|
||||
strip -s -D /usr/local/tor/bin/tor.exe
|
||||
|
||||
RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \
|
||||
cd monero-seed && \
|
||||
git reset --hard 4674ef09b6faa6fe602ab5ae0b9ca8e1fd7d5e1b && \
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/depends/x86_64-w64-mingw32 \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/depends/x86_64-w64-mingw32/share/toolchain.cmake -Bbuild && \
|
||||
make -Cbuild -j$THREADS && \
|
||||
make -Cbuild install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ARG THREADS=1
|
||||
|
||||
RUN apt clean && apt update
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe/Amsterdam
|
||||
|
||||
RUN apt install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
autopoint \
|
||||
aptitude \
|
||||
bash \
|
||||
build-essential \
|
||||
bison \
|
||||
bzip2 \
|
||||
ccache \
|
||||
flex \
|
||||
g++ \
|
||||
g++-multilib \
|
||||
gettext \
|
||||
git \
|
||||
gperf \
|
||||
intltool \
|
||||
libc6-dev-i386 \
|
||||
libgdk-pixbuf2.0-dev \
|
||||
libltdl-dev \
|
||||
libssl-dev \
|
||||
libtool-bin \
|
||||
libxml-parser-perl \
|
||||
lzip \
|
||||
nano \
|
||||
make \
|
||||
openssl \
|
||||
p7zip-full \
|
||||
patch \
|
||||
perl \
|
||||
python \
|
||||
python-mako \
|
||||
ruby \
|
||||
sed \
|
||||
scons \
|
||||
software-properties-common \
|
||||
unzip \
|
||||
tzdata \
|
||||
vim \
|
||||
wget \
|
||||
xz-utils
|
||||
|
||||
RUN git clone -b wowlet-patch --depth 1 https://git.wownero.com/wowlet/mxe.git && \
|
||||
cd mxe && \
|
||||
make -j$THREADS MXE_TARGETS='x86_64-w64-mingw32.static' gcc libqrencode pkgconf libgpg_error libgcrypt cmake libsodium lzma readline libzmq boost qtbase qtsvg qtwebsockets qtimageformats qtmultimedia
|
||||
|
||||
# plugins
|
||||
RUN cd mxe && make -j$THREADS MXE_PLUGIN_DIRS='/mxe/plugins/apps/' MXE_TARGETS='x86_64-w64-mingw32.static' tor
|
||||
|
||||
# fix env.
|
||||
RUN echo "export PATH=\"/mxe/usr/bin/:\$PATH\"" >> "/root/.bashrc"
|
||||
RUN ln -s /mxe/usr/bin/x86_64-w64-mingw32.static-cmake /usr/local/bin/cmake
|
||||
RUN ln -s /mxe/usr/bin/x86_64-w64-mingw32.static-windres /usr/local/bin/windres
|
||||
RUN ln -s /mxe/usr/x86_64-w64-mingw32.static/lib/libsicudt.a /mxe/usr/x86_64-w64-mingw32.static/lib/libicudt.a
|
||||
RUN ln -s /mxe/usr/x86_64-w64-mingw32.static/lib/libsicuio.a /mxe/usr/x86_64-w64-mingw32.static/lib/libicuio.a
|
||||
RUN ln -s /mxe/usr/x86_64-w64-mingw32.static/lib/libsicutu.a /mxe/usr/x86_64-w64-mingw32.static/lib/libicutu.a
|
||||
RUN ln -s /mxe/usr/x86_64-w64-mingw32.static/lib/libsicuuc.a /mxe/usr/x86_64-w64-mingw32.static/lib/libicuuc.a
|
||||
RUN ln -s /mxe/usr/x86_64-w64-mingw32.static/lib/libsicuin.a /mxe/usr/x86_64-w64-mingw32.static/lib/libicuin.a
|
||||
|
||||
ENV PATH="/mxe/usr/bin/:$PATH"
|
||||
|
||||
RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \
|
||||
cd monero-seed && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && \
|
||||
make -Cbuild -j$THREADS && \
|
||||
make -Cbuild install
|
||||
@@ -0,0 +1,13 @@
|
||||
# this image is used internally for the buildbot
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt clean && apt update
|
||||
RUN apt install -y git build-essential wget curl ngrep unzip file ssh zip
|
||||
|
||||
RUN cat /dev/zero | ssh-keygen -q -N ""
|
||||
|
||||
RUN cat ~/.ssh/id_rsa.pub
|
||||
|
||||
RUN printf "Host *\n StrictHostKeyChecking no" > ~/.ssh/config
|
||||
-136
@@ -1,136 +0,0 @@
|
||||
# Documentation for developers
|
||||
|
||||
Feather is developed primarily on Linux, but can also be built on macOS. Development on Windows is not currently supported.
|
||||
|
||||
We support development on rolling release distributions and the latest version of Ubuntu. Building on older stable distributions is not guaranteed to work.
|
||||
|
||||
## Setting up a development environment
|
||||
|
||||
### Dependencies
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```bash
|
||||
pacman -S git cmake base-devel ccache unbound boost qrencode qt6-base qt6-svg qt6-websockets qt6-wayland qt6-multimedia libzip hidapi protobuf zxing-cpp
|
||||
```
|
||||
|
||||
#### Ubuntu 24.04
|
||||
|
||||
```bash
|
||||
apt update
|
||||
apt install git cmake build-essential ccache libssl-dev libunbound-dev libboost-all-dev \
|
||||
libqrencode-dev qt6-base-dev qt6-svg-dev qt6-websockets-dev qt6-multimedia-dev \
|
||||
qt6-wayland-dev libzip-dev libsodium-dev libgcrypt20-dev libx11-xcb-dev \
|
||||
libprotobuf-dev libhidapi-dev libzxing-dev libusb-1.0-0-dev
|
||||
```
|
||||
|
||||
#### Rhel 9 / Alma / Rocky
|
||||
|
||||
```bash
|
||||
sudo dnf install epel-release -y
|
||||
sudo dnf groupinstall "Development Tools" -y
|
||||
sudo dnf install unbound-devel boost-devel qrencode-devel zxing-cpp-devel qt6-qtbase-devel qt6-qtsvg-devel qt6-qtwebsockets-devel qt6-qtmultimedia-devel qt6-qtwayland-devel libsodium-devel
|
||||
```
|
||||
|
||||
#### Void Linux
|
||||
|
||||
```bash
|
||||
xbps-install -S base-devel cmake boost-devel openssl-devel unbound-devel libsodium-devel zlib-devel qt6-base-devel \
|
||||
qt6-svg-devel qt6-websockets-devel qt6-multimedia-devel qt6-wayland-devel libgcrypt-devel libzip-devel \
|
||||
hidapi-devel protobuf protobuf-devel qrencode-devel zxing-cpp-devel
|
||||
```
|
||||
|
||||
#### macOS
|
||||
|
||||
For macOS it's easiest to leverage [brew](https://brew.sh) to install the required dependencies.
|
||||
|
||||
```bash
|
||||
brew install qt libsodium libzip qrencode unbound cmake boost hidapi openssl expat libunwind-headers protobuf pkgconfig
|
||||
```
|
||||
|
||||
Build [zxing-cpp](https://github.com/zxing-cpp/zxing-cpp) from source or compile Feather with `-DWITH_SCANNER=Off`.
|
||||
|
||||
### Tor daemon
|
||||
|
||||
A Tor daemon is required to connect to .onion nodes and the websocket server. Development builds do not include
|
||||
the Tor binary by default, this can be enabled with `-DTOR_DIR=/path/to/tor`. We recommend running a local Tor daemon
|
||||
as this prevents Feather from spawning a child process and saves time.
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```bash
|
||||
pacman -S tor
|
||||
systemctl enable --now tor
|
||||
```
|
||||
|
||||
#### Ubuntu Debian
|
||||
|
||||
```bash
|
||||
apt update && apt install tor
|
||||
systemctl enable --now tor
|
||||
```
|
||||
|
||||
#### Void Linux
|
||||
|
||||
```bash
|
||||
xbps-install tor
|
||||
ln -s /etc/sv/tor /var/service/.
|
||||
sv start tor
|
||||
```
|
||||
|
||||
#### macOS
|
||||
|
||||
```bash
|
||||
brew install tor
|
||||
brew services restart tor
|
||||
```
|
||||
|
||||
### Clone Feather
|
||||
|
||||
```bash
|
||||
git clone http://github.com/feather-wallet/feather.git
|
||||
cd feather
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
### Jetbrains Clion (IDE)
|
||||
|
||||
We recommend using Jetbrains Clion for Feather development. It integrates nicely with CMake and comes with a built-in
|
||||
debugger.
|
||||
|
||||
To pass CMake flags to CLion, go to `File -> Settings -> Build -> CMake`, set Build Type to `Debug` and set your
|
||||
preferred CMake options. More CMake options are documented below.
|
||||
|
||||
Run CMake (`View -> Tool Windows -> CMake`). Click on the 🔃 (`Reload CMake Project`) button.
|
||||
|
||||
Go to `Run -> Edit configurations` and make sure the `feather` target is selected.
|
||||
You can add any environment variables and program arguments here:
|
||||
|
||||
- For more verbose logging add `MONERO_LOG_LEVEL=1` to environment variables.
|
||||
- To start Feather in stagenet mode, add `--stagenet` to program arguments.
|
||||
|
||||
After the target is configured, `Run -> Run 'feather'` or press Shift + F10 to build Feather.
|
||||
|
||||
### Building without IDE
|
||||
|
||||
To build Feather without an IDE:
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . -j $(nproc)
|
||||
```
|
||||
|
||||
On platforms without `execinfo.h` use `cmake -DSTACK_TRACE:BOOL=OFF ..` instead of `cmake ..`
|
||||
|
||||
### CMake
|
||||
|
||||
There are some CMake options that you may pass to control how Feather is built:
|
||||
|
||||
- `-DCHECK_UPDATES=ON` - enable checking for updates, only for standalone binaries
|
||||
- `-DDONATE_BEG=OFF` - disable the dreaded donate requests
|
||||
- `-DUSE_DEVICE_TREZOR=OFF` - disable Trezor hardware wallet support
|
||||
- `-DWITH_SCANNER=ON` - enable the webcam QR code scanner
|
||||
- `-DTOR_DIR=/path/to/tor/` - embed a Tor binary in Feather, argument should be a directory containing the binary
|
||||
- `-DWITH_PLUGIN_<NAME>=OFF` - disable a plugin
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2020-2025, The Monero Project
|
||||
Copyright (c) 2020-2021, The Monero Project
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
||||
-136
@@ -1,136 +0,0 @@
|
||||
## Maintenance priority
|
||||
|
||||
This document is written for developers and users interested in learning how Feather is developed.
|
||||
|
||||
### 1. Security
|
||||
|
||||
- Fix security issues and privacy leaks affecting Feather
|
||||
- Note: If you believe to have found a vulnerability, please refer to [SECURITY.md](SECURITY.md)
|
||||
- Rebase the Monero submodule on top of the latest `monero-project/monero` tag
|
||||
- Monero releases may contain undisclosed security fixes
|
||||
- Update or patch statically linked dependencies that have known vulnerabilities
|
||||
- Run `feather-utils/depends/vulns.py` to check
|
||||
- Review the diff of any altered package to mitigate the risk of supply chain attacks
|
||||
- Update compilers and security flags for better binary security
|
||||
- Reduce the number of third-party dependencies
|
||||
- Keep the [website](https://github.com/feather-wallet/feather-site/blob/master/mirrors.txt) VPS up-to-date and secure
|
||||
- Contact relevant authorities to take [phishing sites](https://gist.github.com/tobtoht/4039fa3cf922d4fe8bca2f8e3ddac63b) offline
|
||||
- Make improvements to the [release process](RELEASE.md)
|
||||
|
||||
Goals:
|
||||
|
||||
- Set up a bug bounty program for issues that affect privacy or security
|
||||
- Set up a status page with information about project health
|
||||
- Set up a feed for security bulletins
|
||||
- Sandbox components that handle untrusted input (e.g. QR code scanner)
|
||||
- Create a package manager for secure distribution of portable binaries
|
||||
- `-static-pie` release binaries for Linux targets
|
||||
|
||||
Security issues that affect Feather always warrant a new release as soon as possible.
|
||||
|
||||
### 2. Continuity
|
||||
|
||||
- Keep the website and services online
|
||||
- Keep source repositories accessible
|
||||
- Make sure that running release builds is easy to set up and reproducible in time
|
||||
|
||||
Goals:
|
||||
|
||||
- Make sure the project is transmissible
|
||||
- Make sure that setting up release infrastructure, release engineering, and maintenance are extensively documented
|
||||
- Make the websocket server repository public
|
||||
|
||||
### 3. Reproducibility
|
||||
|
||||
- Improve and maintain tools to check for non-determinism
|
||||
- Ensure releases are reproducible and stay that way
|
||||
- Upload source archives to the fallback mirror
|
||||
|
||||
To learn more about Feather's build system, see: [`contrib/guix/README.md`](https://github.com/feather-wallet/feather/blob/master/contrib/guix/README.md)
|
||||
|
||||
[Bootstrappable builds](https://bootstrappable.org/) are a requirement for all release builds since version 2.2.2.
|
||||
Our Guix time-machine is currently pinned at a commit which implements the
|
||||
[Full-Source Bootstrap](https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-building-from-source-all-the-way-down/).
|
||||
|
||||
### 4. Bugs
|
||||
|
||||
- Fix bugs and crashes
|
||||
|
||||
To report a bug, please see: https://docs.featherwallet.org/guides/report-an-issue
|
||||
|
||||
### 5. Tests
|
||||
|
||||
- Improve test coverage
|
||||
- Write more test cases
|
||||
|
||||
Feather does not currently have a test suite (apart from the tests in the Monero submodule), this is a WIP.
|
||||
|
||||
### 6. Documentation
|
||||
|
||||
- Make sure the documentation accurately reflects the latest release
|
||||
- Add troubleshooting guides for common problems
|
||||
|
||||
Goals:
|
||||
- Most support questions can be answered with a link to the documentation
|
||||
- Reconsider and document default settings
|
||||
- Write a document on threat modeling
|
||||
|
||||
Documentation is available at https://docs.featherwallet.org
|
||||
|
||||
### 7. Improvements
|
||||
|
||||
- Improve existing features
|
||||
- Improve UI/UX
|
||||
|
||||
Feather should first and foremost be a good __wallet__.
|
||||
Improving features that are closer to this end should have priority.
|
||||
|
||||
### 8. Platform Support
|
||||
|
||||
- Add support for more architectures and operating systems
|
||||
- Drop support for End-of-Life distributions
|
||||
- Add support for new hardware wallets
|
||||
|
||||
See: https://docs.featherwallet.org/guides/supported-operating-systems
|
||||
|
||||
### 9. Optimization
|
||||
|
||||
Miscellaneous maintenance tasks.
|
||||
|
||||
- Remove dead code
|
||||
- Fix compiler warnings
|
||||
- Optimize release binary size
|
||||
- Speed up the [release process](RELEASE.md)
|
||||
- Automate recurrent maintenance tasks
|
||||
- Refactor code that is in need of refactoring
|
||||
- Add comments to the code where necessary
|
||||
- Reduce complexity in the codebase where possible
|
||||
- Improve documentation for developers and maintainers
|
||||
- Keep the build system, toolchain and dependencies modern
|
||||
- Remove features if their maintenance burden outweighs their usefulness
|
||||
|
||||
Goals:
|
||||
|
||||
- Make sure Feather is ready for the migration to [FCMP++](https://www.getmonero.org/2024/04/27/fcmps.html)
|
||||
|
||||
### 10. Features
|
||||
|
||||
- Implement new features
|
||||
- Allow Feather to be used or configured for higher, esoteric or new threat models
|
||||
- Add experimental features that may later be adopted in the reference wallets
|
||||
- Add features that are generally useful and relevant
|
||||
|
||||
Every added feature increases the amount of work needed to maintain Feather. Consider the usefulness of a feature
|
||||
compared to its expected maintenance and support burden.
|
||||
|
||||
For a non-exhaustive list of potentially new features, see: https://featherwallet.org/ideas
|
||||
|
||||
### 11. Upstreaming
|
||||
|
||||
- Upstream tried and tested features, bugfixes and useful patches
|
||||
- Bugfixes should be upstreamed without delay
|
||||
|
||||
Goals:
|
||||
|
||||
- Upstream polyseed
|
||||
- Upstream bootstrappable builds using Guix as a replacement for the now deprecated Gitian build system
|
||||
@@ -1,16 +1,85 @@
|
||||
build:
|
||||
@./contrib/guix/guix-build
|
||||
# Copyright (c) 2014-2021, 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
|
||||
|
||||
attest:
|
||||
@./contrib/guix/guix-attest
|
||||
CMAKEFLAGS = \
|
||||
-DARCH=x86_64 \
|
||||
-DBUILD_64=On \
|
||||
-DBUILD_TESTS=Off \
|
||||
-DOPENVR=Off \
|
||||
-DQML=Off \
|
||||
-DXMRIG=Off \
|
||||
-DTOR_BIN=Off \
|
||||
-DCMAKE_CXX_STANDARD=11 \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=On \
|
||||
-DINSTALL_VENDORED_LIBUNBOUND=Off \
|
||||
-DMANUAL_SUBMODULES=1 \
|
||||
-DSTATIC=On \
|
||||
-DUSE_DEVICE_TREZOR=Off \
|
||||
$(CMAKEFLAGS_EXTRA)
|
||||
|
||||
verify:
|
||||
@./contrib/guix/guix-verify
|
||||
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
|
||||
release-static: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
||||
release-static: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
||||
release-static: CMAKEFLAGS += -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF)
|
||||
release-static:
|
||||
cmake -Bbuild $(CMAKEFLAGS)
|
||||
$(MAKE) -Cbuild
|
||||
|
||||
clean:
|
||||
@./contrib/guix/guix-clean
|
||||
depends:
|
||||
mkdir -p build/$(target)/release
|
||||
cd build/$(target)/release && cmake -D STATIC=ON -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF) -DTOR_VERSION=$(or ${TOR_VERSION}, OFF) -DTOR_BIN=$(or ${TOR_BIN},OFF) -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
||||
|
||||
DEFAULT_GOAL := default
|
||||
default: build
|
||||
windows:
|
||||
mkdir -p build/$(target)/release
|
||||
cd build/$(target)/release && cmake -D STATIC=ON -DZLIB_ROOT=/usr/x86_64-w64-mingw32/ -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF) -DTOR_VERSION=$(or ${TOR_VERSION}, OFF) -DOPENVR=ON -DQML=ON -DWITH_SCANNER=ON -DTOR_BIN=$(or ${TOR_BIN},OFF) -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Debug -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
||||
|
||||
.PHONY: default build attest verify clean
|
||||
|
||||
windows-mxe-release: CMAKEFLAGS += -DBUILD_TAG="win-x64"
|
||||
windows-mxe-release: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
||||
windows-mxe-debug: CMAKEFLAGS += -DOPENVR=On
|
||||
windows-mxe-release: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
||||
windows-mxe-release:
|
||||
cmake -Bbuild $(CMAKEFLAGS)
|
||||
$(MAKE) -Cbuild
|
||||
|
||||
windows-mxe-debug: CMAKEFLAGS += -DBUILD_TAG="win-x64"
|
||||
windows-mxe-debug: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
||||
windows-mxe-debug: CMAKEFLAGS += -DOPENVR=On
|
||||
windows-mxe-debug: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Debug
|
||||
windows-mxe-debug:
|
||||
cmake -Bbuild $(CMAKEFLAGS)
|
||||
$(MAKE) -Cbuild
|
||||
|
||||
mac-release: CMAKEFLAGS += -DSTATIC=Off
|
||||
mac-release: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
||||
mac-release: CMAKEFLAGS += -DBUILD_TAG="mac-x64"
|
||||
mac-release: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
||||
mac-release:
|
||||
cmake -Bbuild $(CMAKEFLAGS)
|
||||
$(MAKE) -Cbuild
|
||||
$(MAKE) -Cbuild deploy
|
||||
|
||||
@@ -1,60 +1,12 @@
|
||||
# Feather Wallet
|
||||
[](https://ci.wownero.com/wowlet/wowlet)
|
||||
|
||||
Feather is a free Monero desktop wallet for Linux, Tails, macOS and Windows. It is written in C++ with the Qt framework.
|
||||
# WOWlet- a free Wownero desktop wallet
|
||||
|
||||
- **easy-to-use**, **small** and **fast** - Feather runs well on any modern hardware, including virtual machines and live operating systems.
|
||||
- **beginner friendly**, but also caters to advanced Monero users by providing a [feature set](https://docs.featherwallet.org/guides/features) that is on par with the official CLI.
|
||||
- ships with **sane defaults** that suit most users, but can also be configured for high or uncommon threat models.
|
||||
- serves as a testing grounds for **experimental features** that may later be adopted in the reference wallets.
|
||||
|
||||
## Download
|
||||
WOWlet is a free, open-source Wownero client for Linux with ports for Mac OS and Windows.
|
||||
|
||||
You can download Feather from **[featherwallet.org](https://featherwallet.org/download/)** or **[GitHub](https://github.com/feather-wallet/feather/releases)**.
|
||||
## Development resources
|
||||
* Git: [git.wownero.com/wowlet/wowlet](https://git.wownero.com/wowlet/wowlet)
|
||||
* IRC: `#wownero` on Freenode
|
||||
|
||||
If you need help installing Feather, check the [installation documentation](https://docs.featherwallet.org/).
|
||||
|
||||
We recommend that you verify downloads with GPG. Releases are signed with our [release signing key](https://docs.featherwallet.org/guides/release-signing-key). The fingerprint is:
|
||||
|
||||
```
|
||||
8185 E158 A333 30C7 FD61 BC0D 1F76 E155 CEFB A71C
|
||||
```
|
||||
|
||||
Windows releases are code-signed for free by [SignPath.io](https://about.signpath.io/), certificate by [SignPath Foundation](https://signpath.org/).
|
||||
|
||||
## Resources
|
||||
|
||||
* [Official Site](https://featherwallet.org)
|
||||
* [Documentation](https://docs.featherwallet.org)
|
||||
* [Git Repository](https://github.com/feather-wallet/feather)
|
||||
* [Matrix](https://matrix.to/#/#feather:monero.social)
|
||||
* IRC: `#feather` on [OFTC](https://www.oftc.net/)
|
||||
* Mail: dev@featherwallet.org
|
||||
|
||||
If you need help with your wallet, please contact us via Matrix or IRC.
|
||||
If you don't have an IRC client, you can join the room via [webchat](https://webchat.oftc.net/?randomnick=1&channels=feather).
|
||||
If you don’t receive a response immediately please idle in the room.
|
||||
|
||||
## Release Builds
|
||||
|
||||
To learn how to run a bootstrappable release build, see: [contrib/guix/README.md](https://github.com/feather-wallet/feather/blob/master/contrib/guix/README.md)
|
||||
|
||||
For release attestations, see the [feather-sigs](http://github.com/feather-wallet/feather-sigs) repo.
|
||||
|
||||
For release policy, see: [RELEASE.md](https://github.com/feather-wallet/feather/blob/master/RELEASE.md)
|
||||
|
||||
## Development
|
||||
|
||||
If you are looking to set up a development environment for Feather, see [HACKING.md](https://github.com/feather-wallet/feather/blob/master/HACKING.md).
|
||||
|
||||
It is highly recommended that you join our Matrix or IRC channel if you are hacking on Feather.
|
||||
Idling in this channel is the best way to stay updated on best practices and new developments.
|
||||
|
||||
For information on how Feather is maintained, see: [MAINTENANCE.md](https://github.com/feather-wallet/feather/blob/master/MAINTENANCE.md)
|
||||
|
||||
To report a security vulnerability, see: [SECURITY.md](https://github.com/feather-wallet/feather/blob/master/SECURITY.md)
|
||||
|
||||
## License
|
||||
|
||||
Feather is free and open-source software, [licensed under BSD-3](https://raw.githubusercontent.com/feather-wallet/feather/master/LICENSE).
|
||||
|
||||
Copyright (c) 2020-2025, The Monero Project
|
||||
Copyright (c) 2020-2021 The Monero Project.
|
||||
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
# Release process
|
||||
|
||||
- Before a minor release:
|
||||
- Update `src/assets/restore_heights_monero_{mainnet,stagenet}.txt`
|
||||
- To obtain values, run `contrib/generate-restore-heights/heights.py`
|
||||
- Update default node lists in `src/assets/nodes.json`
|
||||
- Bump `openssl`, `qt`, `tor_*` packages in `contrib/depends/packages`
|
||||
- Update or patch any statically linked dependencies that have known vulnerabilities
|
||||
- Run `feather-utils/depends/vulns.py` to check
|
||||
- Rebase on top of latest Monero version
|
||||
- Update `src/assets/ack.txt`
|
||||
- Update documentation (`feather-wallet/feather-docs`) and `external/feather-docs` submodule
|
||||
- Update the version number in `CMakeLists.txt`
|
||||
- A hardfork-ready release must bump major version
|
||||
- Create an annotated tag (`git tag x.x.x -a`)
|
||||
- Tag must match version in `CMakeLists.txt`
|
||||
- Only commits that update the version number in `CMakeLists.txt` may be tagged
|
||||
- Push the master branch and tags
|
||||
- `git push --tags origin master`
|
||||
- Run `guix` builds in a clean repo:
|
||||
- ```bash
|
||||
git clone https://github.com/feather-wallet/feather.git
|
||||
cd feather
|
||||
git checkout <TAG>
|
||||
git submodule update --init --recursive
|
||||
./contrib/guix/guix-build
|
||||
```
|
||||
- Alternatively, run `feather-utils/guix/run-build.sh`
|
||||
- Attest the builds (`contrib/guix/guix-attest`) and PR to `feather/feather-sigs`.
|
||||
- Wait until at least one other person has independently verified reproducibility
|
||||
- If builds are not reproducible: fix any reproducibility defects and bump patch version. Do not sign or release non-reproducible builds.
|
||||
- Sign release artifacts and hashlists.
|
||||
- Transfer files in `guix-build-x.x.x/output` to release signing machine
|
||||
- Run `feather-utils/release/make-release.sh`
|
||||
- Update the site (`feather-wallet/feather-site`)
|
||||
- Run the `feather-utils/site/bump-version.py` script to create a template commit.
|
||||
- Edit the changelog in `content/changelog`
|
||||
- If a release includes security fixes add "(includes security fixes)" to the title.
|
||||
- Update the version number, file sizes and paths in `data/release.json`
|
||||
- Upload releases, signatures and signed hashlists.
|
||||
- Follow the directory structure defined in `MainWindow::onShowUpdateCheck`.
|
||||
- Make `depends` source files [available](https://featherwallet.org/files/sources/):
|
||||
- `make -C contrib/depends download`
|
||||
- Announce release on irc/Matrix
|
||||
- Update websocket servers to notify clients of new release
|
||||
- Wait up to 7 days to allow for bug reports before major rollout
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please do not open an issue to report security issues.
|
||||
|
||||
To report a vulnerability email to dev@featherwallet.org
|
||||
|
||||
The following keys may be used to communicate sensitive information to developers:
|
||||
|
||||
| Name | Fingerprint |
|
||||
|---------|---------------------------------------------------|
|
||||
| tobtoht | E87B D921 CDD8 85C9 D78A 38C5 E45B 10DD 027D 2472 |
|
||||
|
||||
Public keys can be found in [`utils/pubkeys`](utils/pubkeys).
|
||||
|
||||
## Bug Bounty Program
|
||||
|
||||
A bounty may be rewarded to a vulnerability report **if and only if** the issue can result in **a loss of funds**.
|
||||
|
||||
You must describe a **plausible scenario** in which a loss of funds can occur (or has occurred) that **isn't solely attributable to user error**.
|
||||
|
||||
Only **the code** of the **latest tagged release** of **[this repository](https://github.com/feather-wallet/feather/)** is in scope.
|
||||
|
||||
**The bounty can only be rewarded in XMR**. The bounty amount for your report is determined by the maintainers and ranges from USD 150 to USD 3000 (in terms of XMR) and depends on the severity of the issue and other factors.
|
||||
|
||||
Clarifications on scope:
|
||||
|
||||
- The issue **must be present in a [signed](https://docs.featherwallet.org/guides/release-signing-key) [release build](https://github.com/feather-wallet/feather/blob/master/contrib/guix/README.md)**. Custom builds, including distribution packages, are out of scope.
|
||||
- The developers **must be able to reproduce and fix the issue**. If the issue cannot be fixed **in our code** for any reason, it is out of scope.
|
||||
- The live [websites](https://github.com/feather-wallet/feather-site/blob/master/mirrors.txt) and their repositories are out of scope.
|
||||
- Loss of funds due to malware on the user's machine is out of scope.
|
||||
- Memory imaging, including cold boot attacks, is out of scope.
|
||||
- Social engineering against users is out of scope. This includes messages received from the [websocket server](https://docs.featherwallet.org/guides/websocket).
|
||||
- Any form of coercion, physical or psychological, is out of scope.
|
||||
- Vulnerabilities that are attributable to hardware are out of scope.
|
||||
- If the issue was fixed in the `master` branch before we receive your report, it is invalid and not eligible for a bounty from this program.
|
||||
- If the vulnerability involves binary exploitation, we may ask you to provide a proof of concept of secret key exfiltration.
|
||||
- Vulnerabilities that are present in the monero submodule but were not introduced in patches made by the Feather developers must
|
||||
be reported [upstream](https://github.com/monero-project/meta/blob/master/VULNERABILITY_RESPONSE_PROCESS.md) and are not eligible for a bounty from this program.
|
||||
- Vulnerabilities that are present in any of our third-party dependencies must be reported upstream and are not eligible for a bounty from this program.
|
||||
- Vulnerabilities that are present in [supported hardware wallets](https://docs.featherwallet.org/guides/hardware-wallet-support) must be reported upstream and are not eligible for a bounty from this program.
|
||||
- A bounty will not be awarded if the reported vulnerability was already known. We may make an exception if you demonstrate that the severity of the issue was underestimated and no immediate fix was planned.
|
||||
- If, during your research, you disrupt Feather's release infrastructure or services, or attempt to coerce its developers, you will not be awarded a bounty.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Copyright (c) 2014-2019, 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.
|
||||
|
||||
if (NOT CMAKE_HOST_WIN32)
|
||||
set (CMAKE_SYSTEM_NAME Windows)
|
||||
endif()
|
||||
|
||||
set (GCC_PREFIX i686-w64-mingw32)
|
||||
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
|
||||
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
|
||||
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE)
|
||||
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_RC_COMPILER windres)
|
||||
|
||||
set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw32")
|
||||
|
||||
# Ensure cmake doesn't find things in the wrong places
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
|
||||
|
||||
set (MINGW_FLAG "-m32")
|
||||
set (USE_LTO_DEFAULT false)
|
||||
@@ -0,0 +1,50 @@
|
||||
# Copyright (c) 2014-2019, 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.
|
||||
|
||||
if (NOT CMAKE_HOST_WIN32)
|
||||
set (CMAKE_SYSTEM_NAME Windows)
|
||||
endif()
|
||||
|
||||
set (GCC_PREFIX x86_64-w64-mingw32)
|
||||
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
|
||||
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
|
||||
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE)
|
||||
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_RC_COMPILER windres)
|
||||
|
||||
set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw64")
|
||||
|
||||
# Ensure cmake doesn't find things in the wrong places
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
|
||||
|
||||
set (MINGW_FLAG "-m64")
|
||||
set (USE_LTO_DEFAULT false)
|
||||
@@ -0,0 +1,47 @@
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
macro(CHECK_LINKER_FLAG flag VARIABLE)
|
||||
if(NOT DEFINED "${VARIABLE}")
|
||||
if(NOT CMAKE_REQUIRED_QUIET)
|
||||
message(STATUS "Looking for ${flag} linker flag")
|
||||
endif()
|
||||
|
||||
set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
|
||||
|
||||
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
set(CMAKE_C_FLAGS "${flag}")
|
||||
try_compile(${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${_cle_source}
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${flag}
|
||||
CMAKE_FLAGS
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
unset(_cle_source)
|
||||
set(CMAKE_C_FLAGS ${saved_CMAKE_C_FLAGS})
|
||||
unset(saved_CMAKE_C_FLAGS)
|
||||
|
||||
if ("${OUTPUT}" MATCHES "warning.*ignored")
|
||||
set(${VARIABLE} 0)
|
||||
endif()
|
||||
|
||||
if(${VARIABLE})
|
||||
if(NOT CMAKE_REQUIRED_QUIET)
|
||||
message(STATUS "Looking for ${flag} linker flag - found")
|
||||
endif()
|
||||
set(${VARIABLE} 1 CACHE INTERNAL "Have linker flag ${flag}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining if the ${flag} linker flag is supported "
|
||||
"passed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
else()
|
||||
if(NOT CMAKE_REQUIRED_QUIET)
|
||||
message(STATUS "Looking for ${flag} linker flag - not found")
|
||||
endif()
|
||||
set(${VARIABLE} "" CACHE INTERNAL "Have linker flag ${flag}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if the ${flag} linker flag is supported "
|
||||
"failed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -0,0 +1,5 @@
|
||||
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" OFF)
|
||||
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" OFF)
|
||||
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" OFF)
|
||||
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" OFF)
|
||||
OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
|
||||
@@ -0,0 +1,28 @@
|
||||
if(APPLE OR (WIN32 AND NOT STATIC))
|
||||
add_custom_target(deploy)
|
||||
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
|
||||
|
||||
if(APPLE AND NOT IOS)
|
||||
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:wowlet>/../.." -always-overwrite
|
||||
COMMENT "Running macdeployqt..."
|
||||
)
|
||||
|
||||
# workaround for a Qt bug that requires manually adding libqsvg.dylib to bundle
|
||||
find_file(_qt_svg_dylib "libqsvg.dylib" PATHS "${CMAKE_PREFIX_PATH}/plugins/imageformats" NO_DEFAULT_PATH)
|
||||
if(_qt_svg_dylib)
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtGui.framework/Versions/5/QtGui" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtSvg.framework/Versions/5/QtSvg" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtCore.framework/Versions/5/QtCore" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMENT "Copying libqsvg.dylib, running install_name_tool"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
+1803
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
/* increase vertical space */
|
||||
#titlearea, #nav-path {
|
||||
display: none;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
|
||||
/* uncomment these lines for some extra vertical space */
|
||||
|
||||
/*
|
||||
.tablist li {
|
||||
line-height: 26px;
|
||||
}
|
||||
*/
|
||||
@@ -1,12 +0,0 @@
|
||||
find_path(BCUR_INCLUDE_DIR "bcur/bc-ur.hpp")
|
||||
find_library(BCUR_LIBRARY bcur)
|
||||
|
||||
if (NOT BCUR_INCLUDE_DIR OR NOT BCUR_LIBRARY)
|
||||
MESSAGE(STATUS "Could not find installed BCUR, using vendored library instead")
|
||||
set(BCUR_VENDORED "ON")
|
||||
set(BCUR_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/third-party)
|
||||
set(BCUR_LIBRARY bcur_static)
|
||||
endif()
|
||||
|
||||
message(STATUS "BCUR PATH ${BCUR_INCLUDE_DIR}")
|
||||
message(STATUS "BCUR LIBRARY ${BCUR_LIBRARY}")
|
||||
@@ -0,0 +1,98 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindBacktrace
|
||||
# -------------
|
||||
#
|
||||
# Find provider for backtrace(3).
|
||||
#
|
||||
# Checks if OS supports backtrace(3) via either libc or custom library.
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ``Backtrace_HEADER``
|
||||
# The header file needed for backtrace(3). Cached.
|
||||
# Could be forcibly set by user.
|
||||
# ``Backtrace_INCLUDE_DIRS``
|
||||
# The include directories needed to use backtrace(3) header.
|
||||
# ``Backtrace_LIBRARIES``
|
||||
# The libraries (linker flags) needed to use backtrace(3), if any.
|
||||
# ``Backtrace_FOUND``
|
||||
# Is set if and only if backtrace(3) support detected.
|
||||
#
|
||||
# The following cache variables are also available to set or use:
|
||||
#
|
||||
# ``Backtrace_LIBRARY``
|
||||
# The external library providing backtrace, if any.
|
||||
# ``Backtrace_INCLUDE_DIR``
|
||||
# The directory holding the backtrace(3) header.
|
||||
#
|
||||
# Typical usage is to generate of header file using configure_file() with the
|
||||
# contents like the following::
|
||||
#
|
||||
# #cmakedefine01 Backtrace_FOUND
|
||||
# #if Backtrace_FOUND
|
||||
# # include <${Backtrace_HEADER}>
|
||||
# #endif
|
||||
#
|
||||
# And then reference that generated header file in actual source.
|
||||
|
||||
include(CMakePushCheckState)
|
||||
include(CheckSymbolExists)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# List of variables to be provided to find_package_handle_standard_args()
|
||||
set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
|
||||
|
||||
if(Backtrace_HEADER)
|
||||
set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}")
|
||||
else(Backtrace_HEADER)
|
||||
set(_Backtrace_HEADER_TRY "execinfo.h")
|
||||
endif(Backtrace_HEADER)
|
||||
|
||||
find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}")
|
||||
set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
||||
|
||||
if (NOT DEFINED Backtrace_LIBRARY)
|
||||
# First, check if we already have backtrace(), e.g., in libc
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_QUIET ${Backtrace_FIND_QUIETLY})
|
||||
check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND)
|
||||
cmake_pop_check_state()
|
||||
endif()
|
||||
|
||||
if(_Backtrace_SYM_FOUND)
|
||||
# Avoid repeating the message() call below each time CMake is run.
|
||||
if(NOT Backtrace_FIND_QUIETLY AND NOT DEFINED Backtrace_LIBRARY)
|
||||
message(STATUS "backtrace facility detected in default set of libraries")
|
||||
endif()
|
||||
set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries")
|
||||
else()
|
||||
# Check for external library, for non-glibc systems
|
||||
if(Backtrace_INCLUDE_DIR)
|
||||
# OpenBSD has libbacktrace renamed to libexecinfo
|
||||
find_library(Backtrace_LIBRARY "execinfo")
|
||||
elseif() # respect user wishes
|
||||
set(_Backtrace_HEADER_TRY "backtrace.h")
|
||||
find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
|
||||
find_library(Backtrace_LIBRARY "backtrace")
|
||||
endif()
|
||||
|
||||
# Prepend list with library path as it's more common practice
|
||||
set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS})
|
||||
endif()
|
||||
|
||||
message(STATUS "Backtrace_LIBRARY: ${Backtrace_LIBRARY}")
|
||||
if(Backtrace_LIBRARY STREQUAL "NOTFOUND")
|
||||
set(Backtrace_LIBRARY "")
|
||||
endif()
|
||||
if(Backtrace_LIBRARY STREQUAL "Backtrace_LIBRARY-NOTFOUND")
|
||||
set(Backtrace_LIBRARY "")
|
||||
endif()
|
||||
|
||||
set(Backtrace_LIBRARIES ${Backtrace_LIBRARY})
|
||||
set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility")
|
||||
|
||||
find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS})
|
||||
mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY)
|
||||
@@ -0,0 +1,25 @@
|
||||
# - Try to find Berkeley DB
|
||||
# Once done this will define
|
||||
#
|
||||
# BERKELEY_DB_FOUND - system has Berkeley DB
|
||||
# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory
|
||||
# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB
|
||||
# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB
|
||||
|
||||
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
find_path(BERKELEY_DB_INCLUDE_DIR db_cxx.h
|
||||
/usr/include/db4
|
||||
/usr/local/include/db4
|
||||
)
|
||||
|
||||
find_library(BERKELEY_DB_LIBRARIES NAMES db_cxx )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES)
|
||||
# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES )
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# Copyright (c) 2014-2020, The Monero Project
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# - Try to find readline include dirs and libraries
|
||||
#
|
||||
# Automatically finds ccache build accelerator, if it's found in PATH.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# project(monero)
|
||||
# include(FindCcache) # Include AFTER the project() macro to be able to reach the CMAKE_CXX_COMPILER variable
|
||||
#
|
||||
# Properties modified by this module:
|
||||
#
|
||||
# GLOBAL PROPERTY RULE_LAUNCH_COMPILE set to ccache, when ccache found
|
||||
# GLOBAL PROPERTY RULE_LAUNCH_LINK set to ccache, when ccache found
|
||||
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if (CCACHE_FOUND)
|
||||
set(TEMP_CPP_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test-program.cpp")
|
||||
file(WRITE "${TEMP_CPP_FILE}" "int main() { return 0; }")
|
||||
execute_process(COMMAND "${CCACHE_FOUND}" "${CMAKE_CXX_COMPILER}" "${TEMP_CPP_FILE}" RESULT_VARIABLE RET)
|
||||
if (${RET} EQUAL 0)
|
||||
message("found usable ccache: ${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_FOUND}")
|
||||
else()
|
||||
message("found ccache ${CCACHE_FOUND}, but is UNUSABLE! Return code: ${RET}")
|
||||
endif()
|
||||
else()
|
||||
message("ccache NOT found!")
|
||||
endif()
|
||||
@@ -0,0 +1,41 @@
|
||||
# - Try to find libunwind
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBUNWIND_FOUND - system has libunwind
|
||||
# LIBUNWIND_INCLUDE_DIR - the libunwind include directory
|
||||
# LIBUNWIND_LIBRARIES - Link these to use libunwind
|
||||
# LIBUNWIND_DEFINITIONS - Compiler switches required for using libunwind
|
||||
|
||||
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
find_path(LIBUNWIND_INCLUDE_DIR libunwind.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(LIBUNWIND_LIBRARIES NAMES unwind )
|
||||
if(NOT LIBUNWIND_LIBRARIES STREQUAL "LIBUNWIND_LIBRARIES-NOTFOUND")
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
set(LIBUNWIND_LIBRARIES "gcc_eh;${LIBUNWIND_LIBRARIES}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# some versions of libunwind need liblzma, and we don't use pkg-config
|
||||
# so we just look whether liblzma is installed, and add it if it is.
|
||||
# It might not be actually needed, but doesn't hurt if it is not.
|
||||
# We don't need any headers, just the lib, as it's privately needed.
|
||||
message(STATUS "looking for liblzma")
|
||||
find_library(LIBLZMA_LIBRARIES lzma )
|
||||
if(NOT LIBLZMA_LIBRARIES STREQUAL "LIBLZMA_LIBRARIES-NOTFOUND")
|
||||
message(STATUS "liblzma found")
|
||||
set(LIBUNWIND_LIBRARIES "${LIBUNWIND_LIBRARIES};${LIBLZMA_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libunwind "Could not find libunwind" LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES)
|
||||
# show the LIBUNWIND_INCLUDE_DIR and LIBUNWIND_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES )
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# --------------------------------- FindMiniupnpc Start ---------------------------------
|
||||
# Locate miniupnp library
|
||||
# This module defines
|
||||
# MINIUPNP_FOUND, if false, do not try to link to miniupnp
|
||||
# MINIUPNP_LIBRARY, the miniupnp variant
|
||||
# MINIUPNP_INCLUDE_DIR, where to find miniupnpc.h and family)
|
||||
# MINIUPNPC_VERSION_1_7_OR_HIGHER, set if we detect the version of miniupnpc is 1.7 or higher
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "miniupnpc.h"
|
||||
# and not
|
||||
# #include <miniupnpc/miniupnpc.h>
|
||||
# This is because, the miniupnpc location is not standardized and may exist
|
||||
# in locations other than miniupnpc/
|
||||
|
||||
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
set(MINIUPNP_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h
|
||||
HINTS $ENV{MINIUPNP_INCLUDE_DIR}
|
||||
PATH_SUFFIXES miniupnpc
|
||||
)
|
||||
|
||||
find_library(MINIUPNP_LIBRARY miniupnpc
|
||||
HINTS $ENV{MINIUPNP_LIBRARY}
|
||||
)
|
||||
|
||||
find_library(MINIUPNP_STATIC_LIBRARY libminiupnpc.a
|
||||
HINTS $ENV{MINIUPNP_STATIC_LIBRARY}
|
||||
)
|
||||
|
||||
set(MINIUPNP_INCLUDE_DIRS ${MINIUPNP_INCLUDE_DIR})
|
||||
set(MINIUPNP_LIBRARIES ${MINIUPNP_LIBRARY})
|
||||
set(MINIUPNP_STATIC_LIBRARIES ${MINIUPNP_STATIC_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
MiniUPnPc DEFAULT_MSG
|
||||
MINIUPNP_INCLUDE_DIR
|
||||
MINIUPNP_LIBRARY
|
||||
)
|
||||
|
||||
IF(MINIUPNPC_FOUND)
|
||||
file(STRINGS "${MINIUPNP_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
|
||||
if(MINIUPNPC_API_VERSION_STR MATCHES "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)")
|
||||
set(MINIUPNPC_API_VERSION "${CMAKE_MATCH_1}")
|
||||
if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10")
|
||||
message(STATUS "Found miniupnpc API version " ${MINIUPNPC_API_VERSION})
|
||||
set(MINIUPNP_FOUND true)
|
||||
set(MINIUPNPC_VERSION_1_7_OR_HIGHER true)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ENDIF()
|
||||
|
||||
mark_as_advanced(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY MINIUPNP_STATIC_LIBRARY)
|
||||
# --------------------------------- FindMiniupnpc End ---------------------------------
|
||||
@@ -1,10 +0,0 @@
|
||||
find_path(POLYSEED_INCLUDE_DIR polyseed.h)
|
||||
find_library(POLYSEED_LIBRARY NAMES libpolyseed.a polyseed)
|
||||
if (NOT POLYSEED_INCLUDE_DIR OR NOT POLYSEED_LIBRARY)
|
||||
MESSAGE(STATUS "Could not find installed Polyseed, using submodule instead")
|
||||
set(Polyseed_SUBMODULE "ON")
|
||||
set(POLYSEED_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/third-party/polyseed/include)
|
||||
set(POLYSEED_LIBRARY polyseed_static)
|
||||
endif()
|
||||
message(STATUS "POLYSEED PATH ${POLYSEED_INCLUDE_DIR}")
|
||||
message(STATUS "POLYSEED LIBRARY ${POLYSEED_LIBRARY}")
|
||||
@@ -2,7 +2,7 @@ find_path(QRENCODE_INCLUDE_DIR qrencode.h)
|
||||
message(STATUS "QRENCODE PATH ${QRENCODE_INCLUDE_DIR}")
|
||||
|
||||
find_library(QRENCODE_LIBRARY qrencode)
|
||||
message(STATUS "QRENCODE LIBRARY ${QRENCODE_LIBRARY}")
|
||||
message(STATUS "QRENCODE LIBARY ${QRENCODE_LIBRARY}")
|
||||
|
||||
mark_as_advanced(QRENCODE_LIBRARY QRENCODE_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# - Try to find readline include dirs and libraries
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# find_package(Readline)
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# Readline_ROOT_DIR Set this variable to the root installation of
|
||||
# readline if the module has problems finding the
|
||||
# proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# READLINE_FOUND System has readline, include and lib dirs found
|
||||
# GNU_READLINE_FOUND Version of readline found is GNU readline, not libedit!
|
||||
# LIBEDIT_FOUND Version of readline found is libedit, not GNU readline!
|
||||
# Readline_INCLUDE_DIR The readline include directories.
|
||||
# Readline_LIBRARY The readline library.
|
||||
# GNU_READLINE_LIBRARY The GNU readline library or empty string.
|
||||
# LIBEDIT_LIBRARY The libedit library or empty string.
|
||||
|
||||
find_path(Readline_ROOT_DIR
|
||||
NAMES include/readline/readline.h
|
||||
PATHS /usr/local/opt/readline/ /opt/local/ /usr/local/ /usr/
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_path(Readline_INCLUDE_DIR
|
||||
NAMES readline/readline.h
|
||||
PATHS ${Readline_ROOT_DIR}/include
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(Readline_LIBRARY
|
||||
NAMES readline
|
||||
PATHS ${Readline_ROOT_DIR}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(Termcap_LIBRARY
|
||||
NAMES tinfo termcap ncursesw ncurses cursesw curses
|
||||
)
|
||||
|
||||
if(Readline_INCLUDE_DIR AND Readline_LIBRARY)
|
||||
set(READLINE_FOUND TRUE)
|
||||
else(Readline_INCLUDE_DIR AND Readline_LIBRARY)
|
||||
FIND_LIBRARY(Readline_LIBRARY NAMES readline PATHS Readline_ROOT_DIR)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG Readline_INCLUDE_DIR Readline_LIBRARY )
|
||||
MARK_AS_ADVANCED(Readline_INCLUDE_DIR Readline_LIBRARY)
|
||||
endif(Readline_INCLUDE_DIR AND Readline_LIBRARY)
|
||||
|
||||
mark_as_advanced(
|
||||
Readline_ROOT_DIR
|
||||
Readline_INCLUDE_DIR
|
||||
Readline_LIBRARY
|
||||
)
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${Readline_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY})
|
||||
|
||||
include(CheckFunctionExists)
|
||||
check_function_exists(rl_copy_text HAVE_COPY_TEXT)
|
||||
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION)
|
||||
|
||||
if(NOT HAVE_COMPLETION_FUNCTION)
|
||||
if (Readline_LIBRARY)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY} ${Termcap_LIBRARY})
|
||||
endif(Readline_LIBRARY)
|
||||
check_function_exists(rl_copy_text HAVE_COPY_TEXT_TC)
|
||||
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION_TC)
|
||||
set(HAVE_COMPLETION_FUNCTION ${HAVE_COMPLETION_FUNCTION_TC})
|
||||
set(HAVE_COPY_TEXT ${HAVE_COPY_TEXT_TC})
|
||||
if(HAVE_COMPLETION_FUNCTION)
|
||||
set(Readline_LIBRARY ${Readline_LIBRARY} ${Termcap_LIBRARY})
|
||||
endif(HAVE_COMPLETION_FUNCTION)
|
||||
endif(NOT HAVE_COMPLETION_FUNCTION)
|
||||
|
||||
set(LIBEDIT_LIBRARY "")
|
||||
set(GNU_READLINE_LIBRARY "")
|
||||
|
||||
if(HAVE_COMPLETION_FUNCTION AND HAVE_COPY_TEXT)
|
||||
set(GNU_READLINE_FOUND TRUE)
|
||||
set(GNU_READLINE_LIBRARY ${Readline_LIBRARY})
|
||||
elseif(READLINE_FOUND AND NOT HAVE_COPY_TEXT)
|
||||
set(LIBEDIT_FOUND TRUE)
|
||||
set(LIBEDIT_LIBRARY ${Readline_LIBRARY})
|
||||
endif(HAVE_COMPLETION_FUNCTION AND HAVE_COPY_TEXT)
|
||||
|
||||
@@ -0,0 +1,291 @@
|
||||
# Written in 2016 by Henrik Steffen Gaßmann <henrik@gassmann.onl>
|
||||
#
|
||||
# To the extent possible under law, the author(s) have dedicated all copyright
|
||||
# and related and neighboring rights to this software to the public domain
|
||||
# worldwide. This software is distributed without any warranty.
|
||||
#
|
||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
# this software. If not, see
|
||||
#
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
#
|
||||
# ##############################################################################
|
||||
# Tries to find the local libsodium installation.
|
||||
#
|
||||
# On Windows the sodium_DIR environment variable is used as a default hint which
|
||||
# can be overridden by setting the corresponding cmake variable.
|
||||
#
|
||||
# Once done the following variables will be defined:
|
||||
#
|
||||
# sodium_FOUND sodium_INCLUDE_DIR sodium_LIBRARY_DEBUG sodium_LIBRARY_RELEASE
|
||||
# sodium_VERSION_STRING
|
||||
#
|
||||
# Furthermore an imported "sodium" target is created.
|
||||
#
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(_GCC_COMPATIBLE 1)
|
||||
endif()
|
||||
|
||||
# static library option
|
||||
if(NOT DEFINED sodium_USE_STATIC_LIBS)
|
||||
option(sodium_USE_STATIC_LIBS "enable to statically link against sodium" OFF)
|
||||
endif()
|
||||
if(NOT (sodium_USE_STATIC_LIBS EQUAL sodium_USE_STATIC_LIBS_LAST))
|
||||
unset(sodium_LIBRARY CACHE)
|
||||
unset(sodium_LIBRARY_DEBUG CACHE)
|
||||
unset(sodium_LIBRARY_RELEASE CACHE)
|
||||
unset(sodium_DLL_DEBUG CACHE)
|
||||
unset(sodium_DLL_RELEASE CACHE)
|
||||
set(sodium_USE_STATIC_LIBS_LAST
|
||||
${sodium_USE_STATIC_LIBS}
|
||||
CACHE INTERNAL "internal change tracking variable")
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
# UNIX
|
||||
if(UNIX)
|
||||
# import pkg-config
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(sodium_PKG QUIET libsodium)
|
||||
endif()
|
||||
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
if(sodium_PKG_STATIC_LIBRARIES)
|
||||
foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
|
||||
if(NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending
|
||||
# with .a
|
||||
list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
|
||||
endif()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
|
||||
else()
|
||||
# if pkgconfig for libsodium doesn't provide static lib info, then
|
||||
# override PKG_STATIC here..
|
||||
set(sodium_PKG_STATIC_LIBRARIES libsodium.a)
|
||||
endif()
|
||||
|
||||
set(XPREFIX sodium_PKG_STATIC)
|
||||
else()
|
||||
if(sodium_PKG_LIBRARIES STREQUAL "")
|
||||
set(sodium_PKG_LIBRARIES sodium)
|
||||
endif()
|
||||
|
||||
set(XPREFIX sodium_PKG)
|
||||
endif()
|
||||
|
||||
find_path(sodium_INCLUDE_DIR sodium.h HINTS ${${XPREFIX}_INCLUDE_DIRS})
|
||||
find_library(sodium_LIBRARY_DEBUG
|
||||
NAMES ${${XPREFIX}_LIBRARIES}
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS})
|
||||
find_library(sodium_LIBRARY_RELEASE
|
||||
NAMES ${${XPREFIX}_LIBRARIES}
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS})
|
||||
|
||||
# ############################################################################
|
||||
# Windows
|
||||
elseif(WIN32)
|
||||
set(sodium_DIR "$ENV{sodium_DIR}" CACHE FILEPATH "sodium install directory")
|
||||
mark_as_advanced(sodium_DIR)
|
||||
|
||||
find_path(sodium_INCLUDE_DIR sodium.h
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES include)
|
||||
|
||||
if(MSVC)
|
||||
# detect target architecture
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.c" [=[
|
||||
#if defined _M_IX86
|
||||
#error ARCH_VALUE x86_32
|
||||
#elif defined _M_X64
|
||||
#error ARCH_VALUE x86_64
|
||||
#endif
|
||||
#error ARCH_VALUE unknown
|
||||
]=])
|
||||
try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/arch.c"
|
||||
OUTPUT_VARIABLE _COMPILATION_LOG)
|
||||
string(REGEX
|
||||
REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*"
|
||||
"\\1"
|
||||
_TARGET_ARCH
|
||||
"${_COMPILATION_LOG}")
|
||||
|
||||
# construct library path
|
||||
if(_TARGET_ARCH STREQUAL "x86_32")
|
||||
string(APPEND _PLATFORM_PATH "Win32")
|
||||
elseif(_TARGET_ARCH STREQUAL "x86_64")
|
||||
string(APPEND _PLATFORM_PATH "x64")
|
||||
else()
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake."
|
||||
)
|
||||
endif()
|
||||
string(APPEND _PLATFORM_PATH "/$$CONFIG$$")
|
||||
|
||||
if(MSVC_VERSION LESS 1900)
|
||||
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
|
||||
else()
|
||||
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
|
||||
endif()
|
||||
string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")
|
||||
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
string(APPEND _PLATFORM_PATH "/static")
|
||||
else()
|
||||
string(APPEND _PLATFORM_PATH "/dynamic")
|
||||
endif()
|
||||
|
||||
string(REPLACE "$$CONFIG$$"
|
||||
"Debug"
|
||||
_DEBUG_PATH_SUFFIX
|
||||
"${_PLATFORM_PATH}")
|
||||
string(REPLACE "$$CONFIG$$"
|
||||
"Release"
|
||||
_RELEASE_PATH_SUFFIX
|
||||
"${_PLATFORM_PATH}")
|
||||
|
||||
find_library(sodium_LIBRARY_DEBUG libsodium.lib
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX})
|
||||
find_library(sodium_LIBRARY_RELEASE libsodium.lib
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX})
|
||||
if(NOT sodium_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
|
||||
find_library(sodium_DLL_DEBUG libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX})
|
||||
find_library(sodium_DLL_RELEASE libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
|
||||
endif()
|
||||
|
||||
elseif(_GCC_COMPATIBLE)
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
find_library(sodium_LIBRARY_DEBUG libsodium.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
find_library(sodium_LIBRARY_RELEASE libsodium.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
else()
|
||||
find_library(sodium_LIBRARY_DEBUG libsodium.dll.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
find_library(sodium_LIBRARY_RELEASE libsodium.dll.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
|
||||
file(GLOB _DLL
|
||||
LIST_DIRECTORIES false
|
||||
RELATIVE "${sodium_DIR}/bin"
|
||||
"${sodium_DIR}/bin/libsodium*.dll")
|
||||
find_library(sodium_DLL_DEBUG ${_DLL} libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES bin)
|
||||
find_library(sodium_DLL_RELEASE ${_DLL} libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES bin)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
|
||||
endif()
|
||||
|
||||
# ############################################################################
|
||||
# unsupported
|
||||
else()
|
||||
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
# common stuff
|
||||
|
||||
# extract sodium version
|
||||
if(sodium_INCLUDE_DIR)
|
||||
set(_VERSION_HEADER "${sodium_INCLUDE_DIR}/sodium/version.h")
|
||||
if(EXISTS "${_VERSION_HEADER}")
|
||||
file(READ "${_VERSION_HEADER}" _VERSION_HEADER_CONTENT)
|
||||
string(REGEX
|
||||
REPLACE ".*define[ \t]+SODIUM_VERSION_STRING[^\"]+\"([^\"]+)\".*"
|
||||
"\\1"
|
||||
sodium_VERSION_STRING
|
||||
"${_VERSION_HEADER_CONTENT}")
|
||||
set(sodium_VERSION_STRING "${sodium_VERSION_STRING}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# communicate results
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(sodium
|
||||
REQUIRED_VARS
|
||||
sodium_LIBRARY_RELEASE
|
||||
sodium_LIBRARY_DEBUG
|
||||
sodium_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
sodium_VERSION_STRING)
|
||||
|
||||
# mark file paths as advanced
|
||||
mark_as_advanced(sodium_INCLUDE_DIR)
|
||||
mark_as_advanced(sodium_LIBRARY_DEBUG)
|
||||
mark_as_advanced(sodium_LIBRARY_RELEASE)
|
||||
if(WIN32)
|
||||
mark_as_advanced(sodium_DLL_DEBUG)
|
||||
mark_as_advanced(sodium_DLL_RELEASE)
|
||||
endif()
|
||||
|
||||
# create imported target
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
set(_LIB_TYPE STATIC)
|
||||
else()
|
||||
set(_LIB_TYPE SHARED)
|
||||
endif()
|
||||
add_library(sodium ${_LIB_TYPE} IMPORTED)
|
||||
|
||||
set_target_properties(sodium
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${sodium_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES
|
||||
"C")
|
||||
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
set_target_properties(sodium
|
||||
PROPERTIES INTERFACE_COMPILE_DEFINITIONS
|
||||
"SODIUM_STATIC"
|
||||
IMPORTED_LOCATION
|
||||
"${sodium_LIBRARY_RELEASE}"
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
"${sodium_LIBRARY_DEBUG}")
|
||||
else()
|
||||
if(UNIX)
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_LOCATION
|
||||
"${sodium_LIBRARY_RELEASE}"
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
"${sodium_LIBRARY_DEBUG}")
|
||||
elseif(WIN32)
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_IMPLIB
|
||||
"${sodium_LIBRARY_RELEASE}"
|
||||
IMPORTED_IMPLIB_DEBUG
|
||||
"${sodium_LIBRARY_DEBUG}")
|
||||
if(NOT (sodium_DLL_DEBUG MATCHES ".*-NOTFOUND"))
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_LOCATION_DEBUG
|
||||
"${sodium_DLL_DEBUG}")
|
||||
endif()
|
||||
if(NOT (sodium_DLL_RELEASE MATCHES ".*-NOTFOUND"))
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_LOCATION_RELWITHDEBINFO
|
||||
"${sodium_DLL_RELEASE}"
|
||||
IMPORTED_LOCATION_MINSIZEREL
|
||||
"${sodium_DLL_RELEASE}"
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
"${sodium_DLL_RELEASE}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,40 @@
|
||||
# Copyright (c) 2014-2019, 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.
|
||||
|
||||
MESSAGE(STATUS "Looking for libunbound")
|
||||
|
||||
FIND_PATH(UNBOUND_INCLUDE_DIR
|
||||
NAMES unbound.h
|
||||
PATH_SUFFIXES include/ include/unbound/
|
||||
PATHS "${PROJECT_SOURCE_DIR}"
|
||||
${UNBOUND_ROOT}
|
||||
$ENV{UNBOUND_ROOT}
|
||||
/usr/local/
|
||||
/usr/
|
||||
)
|
||||
|
||||
find_library(UNBOUND_LIBRARIES unbound)
|
||||
@@ -0,0 +1,22 @@
|
||||
# from http://code.google.com/p/low-cost-vision-2012/source/browse/CMakeModules/FindZBar0.cmake?name=2-helium-1&r=d61f248bd5565b3c086bf4769a04bfd98f7079df
|
||||
# - Try to find ZBar
|
||||
# This will define
|
||||
#
|
||||
# ZBAR_FOUND -
|
||||
# ZBAR_LIBRARY_DIR -
|
||||
# ZBAR_INCLUDE_DIR -
|
||||
# ZBAR_LIBRARIES -
|
||||
#
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_ZBAR QUIET zbar)
|
||||
set(ZBAR_DEFINITIONS ${PC_ZBAR_CFLAGS_OTHER})
|
||||
find_library(ZBAR_LIBRARIES NAMES zbar
|
||||
HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS} )
|
||||
find_path(ZBAR_INCLUDE_DIR Decoder.h
|
||||
HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES zbar )
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ZBAR DEFAULT_MSG ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
|
||||
message(STATUS "Found zbar libraries ${ZBAR_LIBRARIES}")
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindZLIB
|
||||
--------
|
||||
|
||||
Find the native ZLIB includes and library.
|
||||
|
||||
IMPORTED Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionadded:: 3.1
|
||||
|
||||
This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if
|
||||
ZLIB has been found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following variables:
|
||||
|
||||
::
|
||||
|
||||
ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
ZLIB_FOUND - True if zlib found.
|
||||
|
||||
::
|
||||
|
||||
ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
|
||||
ZLIB_VERSION_MAJOR - The major version of zlib
|
||||
ZLIB_VERSION_MINOR - The minor version of zlib
|
||||
ZLIB_VERSION_PATCH - The patch version of zlib
|
||||
ZLIB_VERSION_TWEAK - The tweak version of zlib
|
||||
|
||||
.. versionadded:: 3.4
|
||||
Debug and Release variants are found separately.
|
||||
|
||||
Backward Compatibility
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The following variable are provided for backward compatibility
|
||||
|
||||
::
|
||||
|
||||
ZLIB_MAJOR_VERSION - The major version of zlib
|
||||
ZLIB_MINOR_VERSION - The minor version of zlib
|
||||
ZLIB_PATCH_VERSION - The patch version of zlib
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this
|
||||
module where to look.
|
||||
#]=======================================================================]
|
||||
|
||||
set(_ZLIB_SEARCHES)
|
||||
|
||||
# Search ZLIB_ROOT first if it is set.
|
||||
if(ZLIB_ROOT)
|
||||
set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
|
||||
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
|
||||
endif()
|
||||
|
||||
# Normal search.
|
||||
set(_ZLIB_x86 "(x86)")
|
||||
set(_ZLIB_SEARCH_NORMAL
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
|
||||
"$ENV{ProgramFiles}/zlib"
|
||||
"$ENV{ProgramFiles${_ZLIB_x86}}/zlib")
|
||||
unset(_ZLIB_x86)
|
||||
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
|
||||
|
||||
set(ZLIB_NAMES z zlib zdll zlib1 zlibstatic)
|
||||
set(ZLIB_NAMES_DEBUG zd zlibd zdlld zlibd1 zlib1d zlibstaticd)
|
||||
|
||||
# Try each search configuration.
|
||||
foreach(search ${_ZLIB_SEARCHES})
|
||||
find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
||||
endforeach()
|
||||
|
||||
# Allow ZLIB_LIBRARY to be set manually, as the location of the zlib library
|
||||
if(NOT ZLIB_LIBRARY)
|
||||
foreach(search ${_ZLIB_SEARCHES})
|
||||
find_library(ZLIB_LIBRARY_RELEASE NAMES ${ZLIB_NAMES} NAMES_PER_DIR ${${search}} PATH_SUFFIXES lib)
|
||||
find_library(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} NAMES_PER_DIR ${${search}} PATH_SUFFIXES lib)
|
||||
endforeach()
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(ZLIB)
|
||||
endif()
|
||||
|
||||
unset(ZLIB_NAMES)
|
||||
unset(ZLIB_NAMES_DEBUG)
|
||||
|
||||
mark_as_advanced(ZLIB_INCLUDE_DIR)
|
||||
|
||||
if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
|
||||
file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
|
||||
|
||||
string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
|
||||
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
|
||||
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
|
||||
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
|
||||
|
||||
# only append a TWEAK version if it exists:
|
||||
set(ZLIB_VERSION_TWEAK "")
|
||||
if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
|
||||
set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
string(APPEND ZLIB_VERSION_STRING ".${ZLIB_VERSION_TWEAK}")
|
||||
endif()
|
||||
|
||||
set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
|
||||
set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
|
||||
set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
|
||||
VERSION_VAR ZLIB_VERSION_STRING)
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
if(NOT ZLIB_LIBRARIES)
|
||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(NOT TARGET ZLIB::ZLIB)
|
||||
add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}")
|
||||
|
||||
if(ZLIB_LIBRARY_RELEASE)
|
||||
set_property(TARGET ZLIB::ZLIB APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${ZLIB_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
|
||||
if(ZLIB_LIBRARY_DEBUG)
|
||||
set_property(TARGET ZLIB::ZLIB APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${ZLIB_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_LIBRARY_RELEASE AND NOT ZLIB_LIBRARY_DEBUG)
|
||||
set_property(TARGET ZLIB::ZLIB APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${ZLIB_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Found zlib libraries ${ZLIB_LIBRARIES}")
|
||||
endif()
|
||||
@@ -1,55 +0,0 @@
|
||||
############################################################################
|
||||
# FindZxing.txt
|
||||
# Copyright (C) 2018 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the zxing include file and library
|
||||
#
|
||||
# ZXING_FOUND - system has zxing
|
||||
# ZXING_INCLUDE_DIRS - the zxing include directory
|
||||
# ZXING_LIBRARIES - The libraries needed to use zxing
|
||||
|
||||
find_path(ZXING_INCLUDE_DIRS
|
||||
NAMES
|
||||
ZXing/BarcodeFormat.h
|
||||
ZXing/BitHacks.h
|
||||
ZXing/ByteArray.h
|
||||
ZXing/CharacterSet.h
|
||||
ZXing/Flags.h
|
||||
ZXing/GTIN.h
|
||||
ZXing/TextUtfEncoding.h
|
||||
ZXing/ZXAlgorithms.h
|
||||
ZXing/ZXConfig.h
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
find_library(ZXING_LIBRARIES
|
||||
NAMES ZXing libZXing
|
||||
PATH_SUFFIXES Frameworks bin lib lib64
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ZXing
|
||||
DEFAULT_MSG
|
||||
ZXING_INCLUDE_DIRS ZXING_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(ZXING_INCLUDE_DIRS ZXING_LIBRARIES)
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
# Copyright (c) 2014-2019, 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.
|
||||
#
|
||||
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
# Check what commit we're on
|
||||
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(RET)
|
||||
# Something went wrong, set the version tag to -unknown
|
||||
|
||||
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(VERSIONTAG "unknown")
|
||||
set(VERSION_IS_RELEASE "false")
|
||||
configure_file("monero/src/version.cpp.in" "${TO}")
|
||||
else()
|
||||
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
|
||||
message(STATUS "You are currently on commit ${COMMIT}")
|
||||
|
||||
# Get all the tags
|
||||
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT TAGGEDCOMMIT)
|
||||
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(VERSIONTAG "${COMMIT}")
|
||||
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()
|
||||
configure_file("monero/src/version.cpp.in" "${TO}")
|
||||
endif()
|
||||
@@ -1,27 +0,0 @@
|
||||
message(STATUS "Generating docs")
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
|
||||
if(Python3_Interpreter_FOUND)
|
||||
execute_process(COMMAND python3 contrib/docs/generate.py
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
|
||||
FILE(GLOB DOCS LIST_DIRECTORIES false "src/assets/docs/*")
|
||||
|
||||
foreach(FILE ${DOCS})
|
||||
cmake_path(GET FILE FILENAME FILE_REL)
|
||||
list(APPEND QRC_LIST " <file alias=\"${FILE_REL}\">${FILE}</file>")
|
||||
endforeach()
|
||||
|
||||
FILE(GLOB IMAGES LIST_DIRECTORIES false "external/feather-docs/static/files/compressed/*.png")
|
||||
|
||||
foreach(FILE ${IMAGES})
|
||||
cmake_path(GET FILE FILENAME FILE_REL)
|
||||
list(APPEND QRC_LIST " <file alias=\"/static/files/${FILE_REL}\">${FILE}</file>")
|
||||
endforeach()
|
||||
|
||||
list(JOIN QRC_LIST "\n" QRC_DATA)
|
||||
configure_file("cmake/assets_docs.qrc" "${CMAKE_CURRENT_SOURCE_DIR}/src/assets_docs.qrc")
|
||||
else()
|
||||
message(WARNING "No Python3 interpreter, skipping docs.")
|
||||
endif()
|
||||
@@ -1,21 +0,0 @@
|
||||
set(QRC_LIST)
|
||||
|
||||
if (TOR_DIR)
|
||||
FILE(GLOB TOR_FILES LIST_DIRECTORIES false ${TOR_DIR}/*)
|
||||
|
||||
foreach(FILE ${TOR_FILES})
|
||||
cmake_path(GET FILE FILENAME FILE_REL)
|
||||
list(APPEND QRC_LIST " <file>assets/tor/${FILE_REL}</file>")
|
||||
|
||||
if (FILE_REL STREQUAL "tor" OR FILE_REL STREQUAL "tor.exe")
|
||||
set(TOR_BIN_FOUND 1)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT TOR_BIN_FOUND)
|
||||
message(FATAL_ERROR "TOR_DIR was specified but the Tor binary could not be found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(JOIN QRC_LIST "\n" QRC_DATA)
|
||||
configure_file("cmake/assets_tor.qrc" "${CMAKE_CURRENT_SOURCE_DIR}/src/assets_tor.qrc")
|
||||
@@ -0,0 +1,53 @@
|
||||
# Copyright (c) 2014-2017, 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.
|
||||
|
||||
function (write_static_version_header hash)
|
||||
set(VERSIONTAG "${hash}")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/monero/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
|
||||
endfunction ()
|
||||
|
||||
find_package(Git QUIET)
|
||||
if ("$Format:$" STREQUAL "")
|
||||
# We're in a tarball; use hard-coded variables.
|
||||
write_static_version_header("release")
|
||||
elseif (GIT_FOUND OR Git_FOUND)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_BINARY_DIR}/version.cpp"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-D" "GIT=${GIT_EXECUTABLE}"
|
||||
"-D" "TO=${CMAKE_BINARY_DIR}/version.cpp"
|
||||
"-P" "cmake/GenVersion.cmake"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
else()
|
||||
message(STATUS "WARNING: Git was not found!")
|
||||
write_static_version_header("unknown")
|
||||
endif ()
|
||||
add_custom_target(genversion ALL
|
||||
DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright (c) 2020, The Monero Project.
|
||||
|
||||
find_package(Git QUIET)
|
||||
# Check what commit we're on
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero)
|
||||
|
||||
if(RET)
|
||||
# Something went wrong, set the version tag to -unknown
|
||||
|
||||
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(MONERO_BRANCH "unknown")
|
||||
else()
|
||||
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
|
||||
message(STATUS "You are currently on commit ${COMMIT}")
|
||||
|
||||
# Get all the tags
|
||||
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT TAGGEDCOMMIT)
|
||||
message(STATUS "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(MONERO_BRANCH "${COMMIT}")
|
||||
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(MONERO_BRANCH "release")
|
||||
else()
|
||||
message(STATUS "You are ahead of or behind a tagged release")
|
||||
set(MONERO_BRANCH "${COMMIT}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check latest tagged release
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --abbrev=0 RESULT_VARIABLE RET OUTPUT_VARIABLE TAG OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero)
|
||||
|
||||
if(RET)
|
||||
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(MONERO_VERSION "unknown")
|
||||
else ()
|
||||
set(MONERO_VERSION "${TAG}")
|
||||
endif()
|
||||
|
||||
configure_file("cmake/config-wowlet.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-wowlet.h")
|
||||
@@ -0,0 +1,39 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright (c) 2020, The Monero Project.
|
||||
|
||||
find_package(Git QUIET)
|
||||
|
||||
# Check what commit we're on
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(RET)
|
||||
# Something went wrong, set the version tag to -unknown
|
||||
|
||||
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(WOWLET_BRANCH "unknown")
|
||||
configure_file("cmake/config-wowlet.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-wowlet.h")
|
||||
else()
|
||||
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
|
||||
message(STATUS "You are currently on commit ${COMMIT}")
|
||||
|
||||
# Get all the tags
|
||||
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT TAGGEDCOMMIT)
|
||||
message(STATUS "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(WOWLET_BRANCH "${COMMIT}")
|
||||
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(WOWLET_BRANCH "release")
|
||||
else()
|
||||
message(STATUS "You are ahead of or behind a tagged release")
|
||||
set(WOWLET_BRANCH "${COMMIT}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_file("cmake/config-wowlet.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-wowlet.h")
|
||||
endif()
|
||||
@@ -1,24 +0,0 @@
|
||||
# Generates src/assets_wownerod.qrc embedding the wownerod binary from WOWNEROD_DIR, so wowlet ships
|
||||
# as a single self-contained file with its node inside. Mirror of TorQrcGenerator.cmake. When
|
||||
# WOWNEROD_DIR is OFF the generated qrc is empty (no embedded daemon) and HAS_WOWNEROD_BIN is unset.
|
||||
set(QRC_LIST)
|
||||
|
||||
if (WOWNEROD_DIR)
|
||||
FILE(GLOB WOWNEROD_FILES LIST_DIRECTORIES false ${WOWNEROD_DIR}/*)
|
||||
|
||||
foreach(FILE ${WOWNEROD_FILES})
|
||||
cmake_path(GET FILE FILENAME FILE_REL)
|
||||
list(APPEND QRC_LIST " <file>assets/wownerod/${FILE_REL}</file>")
|
||||
|
||||
if (FILE_REL STREQUAL "wownerod" OR FILE_REL STREQUAL "wownerod.exe")
|
||||
set(WOWNEROD_BIN_FOUND 1)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT WOWNEROD_BIN_FOUND)
|
||||
message(FATAL_ERROR "WOWNEROD_DIR was specified but the wownerod binary could not be found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(JOIN QRC_LIST "\n" QRC_DATA)
|
||||
configure_file("cmake/assets_wownerod.qrc" "${CMAKE_CURRENT_SOURCE_DIR}/src/assets_wownerod.qrc")
|
||||
@@ -1,5 +0,0 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/docs">
|
||||
@QRC_DATA@
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,5 +0,0 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/">
|
||||
@QRC_DATA@
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef WOWLET_VERSION_H
|
||||
#define WOWLET_VERSION_H
|
||||
|
||||
#define WOWLET_VERSION "@VERSION@"
|
||||
#define WOWLET_BRANCH "@WOWLET_BRANCH@"
|
||||
|
||||
#define MONERO_VERSION "@MONERO_VERSION@"
|
||||
#define MONERO_BRANCH "@MONERO_BRANCH@"
|
||||
|
||||
#define TOR_VERSION "@TOR_VERSION@"
|
||||
|
||||
#endif //WOWLET_VERSION_H
|
||||
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2014-2019, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
#include "test-protobuf.pb.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
google::protobuf::UnknownFieldSet ufs;
|
||||
ufs.ClearAndFreeMemory();
|
||||
|
||||
Success sc;
|
||||
sc.set_message("test");
|
||||
sc.SerializeToOstream(&std::cerr);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
syntax = "proto2";
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
message Success {
|
||||
optional string message = 1;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2014-2019, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
static_assert(1, "FAIL");
|
||||
int main(int argc, char *argv[]) {
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2014-2019, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
static_assert(1, "FAIL");
|
||||
int main(int argc, char *argv[]) {
|
||||
return 0;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
HERE="$(dirname "$(readlink -f "${0}")")"
|
||||
echo $HERE
|
||||
|
||||
# Tails 5.8 sets QT_QPA_PLATFORM to wayland which breaks our app
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
${APPDIR}/usr/bin/feather $*
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
unset SOURCE_DATE_EPOCH
|
||||
|
||||
# Manually create the AppImage (reproducibly) since linuxdeployqt is not able to create cross-compiled AppImages
|
||||
|
||||
APPDIR="$PWD/feather.AppDir"
|
||||
|
||||
mkdir -p "$APPDIR"
|
||||
mkdir -p "$APPDIR/usr/share/applications/"
|
||||
mkdir -p "$APPDIR/usr/bin"
|
||||
|
||||
cp "src/assets/feather.desktop" "$APPDIR/usr/share/applications/feather.desktop"
|
||||
cp "src/assets/feather.desktop" "$APPDIR/feather.desktop"
|
||||
cp "src/assets/images/appicons/64x64.png" "$APPDIR/feather.png"
|
||||
cp "build/bin/feather" "$APPDIR/usr/bin/feather"
|
||||
chmod +x "$APPDIR/usr/bin/feather"
|
||||
|
||||
cp "contrib/AppImage/AppRun" "$APPDIR/"
|
||||
chmod +x "$APPDIR/AppRun"
|
||||
|
||||
find feather.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
|
||||
|
||||
mksquashfs feather.AppDir feather.squashfs -comp zstd -info -root-owned -no-xattrs -noappend -fstime 0
|
||||
# mksquashfs writes a timestamp to the header
|
||||
printf '\x00\x00\x00\x00' | dd conv=notrunc of=feather.squashfs bs=1 seek=$((0x8))
|
||||
|
||||
rm -f feather.AppImage
|
||||
|
||||
cat "${GITHUB_WORKSPACE:-/feather}/contrib/depends/${HOST}/runtime" >> feather.AppImage
|
||||
cat feather.squashfs >> feather.AppImage
|
||||
chmod a+x feather.AppImage
|
||||
Submodule
+1
Submodule contrib/KDMacTouchBar added at 470c431646
@@ -0,0 +1,35 @@
|
||||
# Maintainer: wowario <wowario[at]protonmail[dot]com>
|
||||
# Contributor: wowario <wowario[at]protonmail[dot]com>
|
||||
|
||||
pkgname='monero-feather-git'
|
||||
pkgver=0.1.0.925ef5683
|
||||
pkgrel=1
|
||||
pkgdesc='a free Monero desktop wallet'
|
||||
license=('BSD')
|
||||
arch=('x86_64')
|
||||
url="https://wownero.org"
|
||||
depends=('boost-libs' 'libunwind' 'openssl' 'readline' 'pcsclite' 'hidapi' 'protobuf' 'miniupnpc' 'libgcrypt' 'qrencode' 'libsodium' 'libpgm' 'expat' 'qt5-base' 'qt5-websockets' 'tor')
|
||||
makedepends=('git' 'cmake' 'boost')
|
||||
|
||||
source=("${pkgname}"::"git+https://git.wownero.com/feather/feather")
|
||||
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/${pkgname}"
|
||||
printf "%s.%s" "$(git describe --tags --abbrev=0)" "$(git rev-parse --short=9 HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}"
|
||||
git submodule update --init --recursive
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
}
|
||||
|
||||
package_monero-feather-git() {
|
||||
install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
install -Dm755 "${srcdir}/${pkgname}/build/bin/feather" "${pkgdir}/usr/bin/feather"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
unset SOURCE_DATE_EPOCH
|
||||
|
||||
APPDIR="$PWD/wowlet.AppDir"
|
||||
|
||||
mkdir -p "$APPDIR"
|
||||
mkdir -p "$APPDIR/usr/share/applications/"
|
||||
mkdir -p "$APPDIR/usr/bin"
|
||||
|
||||
cp "$PWD/src/assets/org.wowlet.wowlet.desktop" "$APPDIR/usr/share/applications/org.wowlet.wowlet.desktop"
|
||||
cp "$PWD/src/assets/images/appicons/64x64.png" "$APPDIR/wowlet.png"
|
||||
cp "$PWD/build/bin/wowlet" "$APPDIR/usr/bin/wowlet"
|
||||
|
||||
LD_LIBRARY_PATH=/usr/local/lib /linuxdeployqt/squashfs-root/AppRun wowlet.AppDir/usr/share/applications/org.wowlet.wowlet.desktop -bundle-non-qt-libs
|
||||
|
||||
find wowlet.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
|
||||
|
||||
# Manually create AppImage (reproducibly)
|
||||
|
||||
# download runtime
|
||||
wget -nc https://github.com/AppImage/AppImageKit/releases/download/12/runtime-x86_64
|
||||
echo "24da8e0e149b7211cbfb00a545189a1101cb18d1f27d4cfc1895837d2c30bc30 runtime-x86_64" | sha256sum -c
|
||||
|
||||
mksquashfs wowlet.AppDir wowlet.squashfs -info -root-owned -no-xattrs -noappend -fstime 0
|
||||
# mksquashfs writes a timestamp to the header
|
||||
printf '\x00\x00\x00\x00' | dd conv=notrunc of=wowlet.squashfs bs=1 seek=$((0x8))
|
||||
|
||||
rm -f wowlet.AppImage
|
||||
cat runtime-x86_64 >> wowlet.AppImage
|
||||
cat wowlet.squashfs >> wowlet.AppImage
|
||||
chmod a+x wowlet.AppImage
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Make directories
|
||||
|
||||
DEBDIR="$PWD/wowlet.DebDir"
|
||||
mkdir -p "$DEBDIR"
|
||||
mkdir -p "$DEBDIR/DEBIAN/"
|
||||
mkdir -p "$DEBDIR/debian/"
|
||||
mkdir -p "$DEBDIR/usr/bin/"
|
||||
mkdir -p "$DEBDIR/usr/share/doc/wowlet/"
|
||||
mkdir -p "$DEBDIR/usr/share/metainfo/"
|
||||
mkdir -p "$DEBDIR/usr/share/applications/"
|
||||
mkdir -p "$DEBDIR/usr/share/man/man1/"
|
||||
mkdir -p "$DEBDIR/usr/share/icons/hicolor/scalable/apps/"
|
||||
mkdir -p "$DEBDIR/usr/share/icons/hicolor/48x48/apps/"
|
||||
mkdir -p "$DEBDIR/usr/share/icons/hicolor/64x64/apps/"
|
||||
mkdir -p "$DEBDIR/usr/share/icons/hicolor/96x96/apps/"
|
||||
mkdir -p "$DEBDIR/usr/share/icons/hicolor/128x128/apps/"
|
||||
mkdir -p "$DEBDIR/usr/share/icons/hicolor/192x192/apps/"
|
||||
mkdir -p "$DEBDIR/usr/share/icons/hicolor/256x256/apps/"
|
||||
|
||||
# Copy over assets
|
||||
|
||||
cp "$PWD/src/assets/control" "$DEBDIR/DEBIAN/control"
|
||||
cp "$PWD/src/assets/copyright" "$DEBDIR/debian/copyright"
|
||||
cp "$PWD/src/assets/copyright" "$DEBDIR/usr/share/doc/wowlet/copyright"
|
||||
cp "$PWD/src/assets/changelog.gz" "$DEBDIR/usr/share/doc/wowlet/changelog.gz"
|
||||
cp "$PWD/src/assets/org.wowlet.wowlet.metainfo.xml" "$DEBDIR/usr/share/metainfo/org.wowlet.wowlet.metainfo.xml"
|
||||
cp "$PWD/README.md" "$DEBDIR/usr/share/doc/wowlet/README"
|
||||
cp "$PWD/SECURITY.md" "$DEBDIR/usr/share/doc/wowlet/SECURITY"
|
||||
cp "$PWD/build/bin/wowlet" "$DEBDIR/usr/bin/wowlet"
|
||||
cp "$PWD/src/assets/org.wowlet.wowlet.desktop" "$DEBDIR/usr/share/applications/org.wowlet.wowlet.desktop"
|
||||
cp "$PWD/src/assets/wowlet.1.gz" "$DEBDIR/usr/share/man/man1/wowlet.1.gz"
|
||||
cp "$PWD/src/assets/images/appicons/wowlet.svg" "$DEBDIR/usr/share/icons/hicolor/scalable/apps/wowlet.svg"
|
||||
cp "$PWD/src/assets/images/appicons/48x48.png" "$DEBDIR/usr/share/icons/hicolor/48x48/apps/wowlet.png"
|
||||
cp "$PWD/src/assets/images/appicons/64x64.png" "$DEBDIR/usr/share/icons/hicolor/64x64/apps/wowlet.png"
|
||||
cp "$PWD/src/assets/images/appicons/96x96.png" "$DEBDIR/usr/share/icons/hicolor/96x96/apps/wowlet.png"
|
||||
cp "$PWD/src/assets/images/appicons/128x128.png" "$DEBDIR/usr/share/icons/hicolor/128x128/apps/wowlet.png"
|
||||
cp "$PWD/src/assets/images/appicons/192x192.png" "$DEBDIR/usr/share/icons/hicolor/192x192/apps/wowlet.png"
|
||||
cp "$PWD/src/assets/images/appicons/256x256.png" "$DEBDIR/usr/share/icons/hicolor/256x256/apps/wowlet.png"
|
||||
|
||||
# Build deb package
|
||||
|
||||
dpkg-deb --build $DEBDIR
|
||||
mv wowlet.DebDir.deb wowlet_1.0_amd64.deb
|
||||
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
Package: wowlet
|
||||
Version: 1.0
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Essential: no
|
||||
Installed-Size: 76800
|
||||
Maintainer: wowario <wowario@protonmail.com>
|
||||
Description: WOWlet is a free, open-source Wownero client for Linux with ports for Mac OS and Windows.
|
||||
Tag: office::finance
|
||||
Homepage: https://git.wownero.com/wowlet/wowlet
|
||||
Depends: libxcb-icccm4, libxcb-image0, libxcb-keysyms1, libxcb-render-util0, libxcb-xkb1, libxkbcommon-x11-0
|
||||
@@ -0,0 +1,31 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: wowlet
|
||||
Source: https://git.wownero.com/wowlet/wowlet
|
||||
|
||||
Files: *
|
||||
Copyright: (c) 2020-2021 The Monero Project
|
||||
License: BSD-3-clause
|
||||
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 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.
|
||||
@@ -1,15 +0,0 @@
|
||||
SDKs/
|
||||
work/
|
||||
built/
|
||||
sources/
|
||||
config.site
|
||||
x86_64-*/
|
||||
i686-*/
|
||||
mips-*/
|
||||
arm-*/
|
||||
aarch64-*/
|
||||
powerpc-*/
|
||||
riscv32-*/
|
||||
riscv64-*/
|
||||
s390x-*/
|
||||
arm64-*/
|
||||
@@ -1,268 +0,0 @@
|
||||
.NOTPARALLEL :
|
||||
|
||||
# Pattern rule to print variables, e.g. make print-top_srcdir
|
||||
print-%: FORCE
|
||||
@echo '$($*)'
|
||||
|
||||
# When invoking a sub-make, keep only the command line variable definitions
|
||||
# matching the pattern in the filter function.
|
||||
#
|
||||
# e.g. invoking:
|
||||
# $ make A=1 C=1 print-MAKEOVERRIDES print-MAKEFLAGS
|
||||
#
|
||||
# with the following in the Makefile:
|
||||
# MAKEOVERRIDES := $(filter A=% B=%,$(MAKEOVERRIDES))
|
||||
#
|
||||
# will print:
|
||||
# MAKEOVERRIDES = A=1
|
||||
# MAKEFLAGS = -- A=1
|
||||
#
|
||||
# this is because as the GNU make manual says:
|
||||
# The command line variable definitions really appear in the variable
|
||||
# MAKEOVERRIDES, and MAKEFLAGS contains a reference to this variable.
|
||||
#
|
||||
# and since the GNU make manual also says:
|
||||
# variables defined on the command line are passed to the sub-make through
|
||||
# MAKEFLAGS
|
||||
#
|
||||
# this means that sub-makes will be invoked as if:
|
||||
# $(MAKE) A=1 blah blah
|
||||
MAKEOVERRIDES := $(filter V=%,$(MAKEOVERRIDES))
|
||||
SOURCES_PATH ?= $(BASEDIR)/sources
|
||||
WORK_PATH = $(BASEDIR)/work
|
||||
BASE_CACHE ?= $(BASEDIR)/built
|
||||
FALLBACK_DOWNLOAD_PATH ?= https://featherwallet.org/files/sources
|
||||
|
||||
CXX_STANDARD ?= c++17
|
||||
|
||||
BUILD = $(shell ./config.guess)
|
||||
HOST ?= $(BUILD)
|
||||
PATCHES_PATH = $(BASEDIR)/patches
|
||||
BASEDIR = $(CURDIR)
|
||||
HASH_LENGTH:=11
|
||||
DOWNLOAD_CONNECT_TIMEOUT:=30
|
||||
DOWNLOAD_RETRIES:=3
|
||||
HOST_ID_SALT ?= salt
|
||||
BUILD_ID_SALT ?= salt
|
||||
|
||||
host:=$(BUILD)
|
||||
ifneq ($(HOST),)
|
||||
host:=$(HOST)
|
||||
endif
|
||||
|
||||
ifneq ($(DEBUG),)
|
||||
release_type=Debug
|
||||
else
|
||||
release_type=Release
|
||||
endif
|
||||
|
||||
ifneq ($(TESTS),)
|
||||
build_tests=ON
|
||||
release_type=Debug
|
||||
else
|
||||
build_tests=OFF
|
||||
endif
|
||||
|
||||
base_build_dir=$(WORK_PATH)/build
|
||||
base_staging_dir=$(WORK_PATH)/staging
|
||||
base_download_dir=$(WORK_PATH)/download
|
||||
canonical_host:=$(shell ./config.sub $(HOST))
|
||||
build:=$(shell ./config.sub $(BUILD))
|
||||
|
||||
build_arch =$(firstword $(subst -, ,$(build)))
|
||||
build_vendor=$(word 2,$(subst -, ,$(build)))
|
||||
full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build))
|
||||
build_os:=$(findstring linux,$(full_build_os))
|
||||
build_os+=$(findstring darwin,$(full_build_os))
|
||||
build_os:=$(strip $(build_os))
|
||||
ifeq ($(build_os),)
|
||||
build_os=$(full_build_os)
|
||||
endif
|
||||
|
||||
host_arch=$(firstword $(subst -, ,$(canonical_host)))
|
||||
host_vendor=$(word 2,$(subst -, ,$(canonical_host)))
|
||||
full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
|
||||
host_os:=$(findstring android,$(full_host_os))
|
||||
ifeq ($(host_os),)
|
||||
host_os:=$(findstring linux,$(full_host_os))
|
||||
endif
|
||||
host_os+=$(findstring darwin,$(full_host_os))
|
||||
host_os+=$(findstring freebsd,$(full_host_os))
|
||||
host_os+=$(findstring mingw32,$(full_host_os))
|
||||
host_os:=$(strip $(host_os))
|
||||
ifeq ($(host_os),)
|
||||
host_os=$(full_host_os)
|
||||
endif
|
||||
|
||||
$(host_arch)_$(host_os)_prefix=$(BASEDIR)/$(host)
|
||||
$(host_arch)_$(host_os)_host=$(host)
|
||||
host_prefix=$($(host_arch)_$(host_os)_prefix)
|
||||
build_prefix=$(host_prefix)/native
|
||||
ifeq ($(host_os),mingw32)
|
||||
host_cmake=Windows
|
||||
endif
|
||||
ifeq ($(host_os),linux)
|
||||
host_cmake=Linux
|
||||
endif
|
||||
ifeq ($(host_os),freebsd)
|
||||
host_cmake=FreeBSD
|
||||
endif
|
||||
ifeq ($(host_os),darwin)
|
||||
host_cmake=Darwin
|
||||
endif
|
||||
ifeq ($(host_os),android)
|
||||
host_cmake=Android
|
||||
endif
|
||||
|
||||
AT_$(V):=
|
||||
AT_:=@
|
||||
AT:=$(AT_$(V))
|
||||
build_host=$(build)
|
||||
|
||||
all: install
|
||||
|
||||
include hosts/$(host_os).mk
|
||||
include hosts/default.mk
|
||||
include builders/$(build_os).mk
|
||||
include builders/default.mk
|
||||
include packages/packages.mk
|
||||
|
||||
build_id_string:=$(realpath $(GUIX_ENVIRONMENT))
|
||||
$(host_arch)_$(host_os)_id_string:=$(realpath $(GUIX_ENVIRONMENT))
|
||||
|
||||
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_)
|
||||
tor_packages_$(NO_TOR) = $(tor_packages) $(tor_$(host_os)_packages)
|
||||
|
||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(tor_packages_)
|
||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
||||
|
||||
all_packages = $(packages) $(native_packages)
|
||||
|
||||
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
|
||||
|
||||
$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils)
|
||||
$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
|
||||
|
||||
include funcs.mk
|
||||
|
||||
CONF_PKGS := cmake-conf mxe-conf
|
||||
|
||||
build-only-$(1)_$(3): CMAKE_RUNRESULT_FILE = $(PREFIX)/share/cmake/modules/TryRunResults.cmake
|
||||
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_FILE = $(PREFIX)/$(3)/share/cmake/mxe-conf.cmake
|
||||
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_DIR = $(PREFIX)/$(3)/share/cmake/mxe-conf.d
|
||||
build-only-$(1)_$(3): CMAKE_STATIC_BOOL = $(if $(findstring shared,$(3)),OFF,ON)
|
||||
build-only-$(1)_$(3): CMAKE_SHARED_BOOL = $(if $(findstring shared,$(3)),ON,OFF)
|
||||
|
||||
|
||||
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
|
||||
final_build_id_long+=:[sha256sum]:$(shell $(build_SHA256SUM) toolchain.cmake.in)
|
||||
final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
|
||||
$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
|
||||
rm -rf $(@D)
|
||||
mkdir -p $(@D)
|
||||
echo copying packages: $^
|
||||
echo to: $(@D)
|
||||
cd $(@D); $(foreach package,$^, $(build_TAR) xf $($(package)_cached); )
|
||||
touch $@
|
||||
|
||||
# $PATH is not preserved between ./configure and make by convention. Its
|
||||
# modification and overriding at ./configure time is (as I understand it)
|
||||
# supposed to be captured by the AC_{PROG_{,OBJ}CXX,PATH_{PROG,TOOL}} macros,
|
||||
# which will expand the program names to their full absolute paths. The notable
|
||||
# exception is command line overriding: ./configure CC=clang, which skips the
|
||||
# program name expansion step, and works because the user implicitly indicates
|
||||
# with CC=clang that clang will be available in $PATH at all times, and is most
|
||||
# likely part of the user's system.
|
||||
#
|
||||
# Therefore, when we "seed the autoconf cache"/"override well-known program
|
||||
# vars" by setting AR=<blah> in our config.site, either one of two things needs
|
||||
# to be true for the build system to work correctly:
|
||||
#
|
||||
# 1. If we refer to the program by name (e.g. AR=riscv64-gnu-linux-ar), the
|
||||
# tool needs to be available in $PATH at all times.
|
||||
#
|
||||
# 2. If the tool is _**not**_ expected to be available in $PATH at all times
|
||||
# (such as is the case for our native_cctools binutils tools), it needs to
|
||||
# be referred to by its absolute path, such as would be output by the
|
||||
# AC_PATH_{PROG,TOOL} macros.
|
||||
#
|
||||
# Minor note: it is also okay to refer to tools by their absolute path even if
|
||||
# we expect them to be available in $PATH at all times, more specificity does
|
||||
# not hurt.
|
||||
$(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
|
||||
@mkdir -p $(@D)
|
||||
sed -e 's|@HOST@|$(host)|' \
|
||||
-e 's|@CC@|$(host_CC)|' \
|
||||
-e 's|@CXX@|$(host_CXX)|' \
|
||||
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \
|
||||
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
|
||||
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \
|
||||
-e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
|
||||
-e 's|@CMAKE_INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
|
||||
-e 's|@OTOOL@|$(host_OTOOL)|' \
|
||||
-e 's|@build_os@|$(build_os)|' \
|
||||
-e 's|@host_os@|$(host_os)|' \
|
||||
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
|
||||
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
|
||||
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
|
||||
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
|
||||
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
|
||||
-e 's|@debug@|$(DEBUG)|' \
|
||||
-e 's|@release_type@|$(release_type)|' \
|
||||
-e 's|@build_tests@|$(build_tests)|' \
|
||||
-e 's|@depends@|$(host_cmake)|' \
|
||||
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
|
||||
-e 's|@arch@|$(host_arch)|'\
|
||||
-e 's|@guix_ldflags@|$(guix_ldflags)|'\
|
||||
-e 's|@tor_version@|$(tor_$(host_os)_version)|'\
|
||||
$< > $@
|
||||
touch $@
|
||||
|
||||
define check_or_remove_cached
|
||||
mkdir -p $(BASE_CACHE)/$(host)/$(package) && cd $(BASE_CACHE)/$(host)/$(package); \
|
||||
$(build_SHA256SUM) -c $($(package)_cached_checksum) >/dev/null 2>/dev/null || \
|
||||
( rm -f $($(package)_cached_checksum); \
|
||||
if test -f "$($(package)_cached)"; then echo "Checksum mismatch for $(package). Forcing rebuild.."; rm -f $($(package)_cached_checksum) $($(package)_cached); fi )
|
||||
endef
|
||||
|
||||
define check_or_remove_sources
|
||||
mkdir -p $($(package)_source_dir); cd $($(package)_source_dir); \
|
||||
test -f $($(package)_fetched) && ( $(build_SHA256SUM) -c $($(package)_fetched) >/dev/null 2>/dev/null || \
|
||||
( echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; \
|
||||
rm -f $($(package)_all_sources) $($(1)_fetched))) || true
|
||||
endef
|
||||
|
||||
check-packages:
|
||||
@$(foreach package,$(all_packages),$(call check_or_remove_cached,$(package));)
|
||||
check-sources:
|
||||
@$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));)
|
||||
|
||||
$(host_prefix)/share/config.site: check-packages
|
||||
$(host_prefix)/share/toolchain.cmake: check-packages
|
||||
|
||||
check-packages: check-sources
|
||||
|
||||
clean-all: clean
|
||||
@rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64*
|
||||
|
||||
clean:
|
||||
@rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) *.log
|
||||
|
||||
install: check-packages $(host_prefix)/share/config.site
|
||||
install: check-packages $(host_prefix)/share/toolchain.cmake
|
||||
|
||||
download-one: check-sources $(all_sources)
|
||||
|
||||
download-osx:
|
||||
@$(MAKE) -s HOST=x86_64-apple-darwin download-one
|
||||
download-linux:
|
||||
@$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one
|
||||
download-win:
|
||||
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
|
||||
download: download-osx download-linux download-win
|
||||
|
||||
$(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
|
||||
|
||||
.PHONY: install cached clean clean-all download-one download-osx download-linux download-win download check-packages check-sources
|
||||
.PHONY: FORCE
|
||||
$(V).SILENT:
|
||||
@@ -1,21 +0,0 @@
|
||||
default_build_CC = gcc
|
||||
default_build_CXX = g++
|
||||
default_build_AR = ar
|
||||
default_build_TAR = tar
|
||||
default_build_RANLIB = ranlib
|
||||
default_build_STRIP = strip
|
||||
default_build_NM = nm
|
||||
default_build_OTOOL = otool
|
||||
default_build_INSTALL_NAME_TOOL = install_name_tool
|
||||
|
||||
define add_build_tool_func
|
||||
build_$(build_os)_$1 ?= $$(default_build_$1)
|
||||
build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
|
||||
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
|
||||
endef
|
||||
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_build_tool_func,$(var))))
|
||||
define add_build_flags_func
|
||||
build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
|
||||
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
|
||||
endef
|
||||
$(foreach flags, CFLAGS CXXFLAGS ARFLAGS LDFLAGS, $(eval $(call add_build_flags_func,$(flags))))
|
||||
@@ -1,2 +0,0 @@
|
||||
build_linux_SHA256SUM = sha256sum
|
||||
build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
|
||||
Vendored
-1702
File diff suppressed because it is too large
Load Diff
Vendored
-1864
File diff suppressed because it is too large
Load Diff
@@ -1,312 +0,0 @@
|
||||
define int_vars
|
||||
#Set defaults for vars which may be overridden per-package
|
||||
$(1)_cc=$$($$($(1)_type)_CC)
|
||||
$(1)_cxx=$$($$($(1)_type)_CXX)
|
||||
$(1)_objc=$$($$($(1)_type)_OBJC)
|
||||
$(1)_objcxx=$$($$($(1)_type)_OBJCXX)
|
||||
$(1)_ar=$$($$($(1)_type)_AR)
|
||||
$(1)_ranlib=$$($$($(1)_type)_RANLIB)
|
||||
$(1)_libtool=$$($$($(1)_type)_LIBTOOL)
|
||||
$(1)_nm=$$($$($(1)_type)_NM)
|
||||
$(1)_cflags=$$($$($(1)_type)_CFLAGS) \
|
||||
$$($$($(1)_type)_$$(release_type)_CFLAGS)
|
||||
$(1)_cxxflags=$$($$($(1)_type)_CXXFLAGS) \
|
||||
$$($$($(1)_type)_$$(release_type)_CXXFLAGS)
|
||||
$(1)_arflags=$($($(1)_type)_ARFLAGS) $($($(1)_type)_$(release_type)_ARFLAGS)
|
||||
$(1)_ldflags=$$($$($(1)_type)_LDFLAGS) \
|
||||
$$($$($(1)_type)_$$(release_type)_LDFLAGS) \
|
||||
-L$$($($(1)_type)_prefix)/lib
|
||||
$(1)_cppflags=$$($$($(1)_type)_CPPFLAGS) \
|
||||
$$($$($(1)_type)_$$(release_type)_CPPFLAGS) \
|
||||
-I$$($$($(1)_type)_prefix)/include
|
||||
$(1)_recipe_hash:=
|
||||
endef
|
||||
|
||||
define int_get_all_dependencies
|
||||
$(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dependencies))))
|
||||
endef
|
||||
|
||||
define fetch_file_inner
|
||||
( mkdir -p $$($(1)_download_dir) && echo Fetching $(3) from $(2) && \
|
||||
$(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(2)/$(3)" && \
|
||||
echo "$(5) $$($(1)_download_dir)/$(4).temp" > $$($(1)_download_dir)/.$(4).hash && \
|
||||
$(build_SHA256SUM) -c $$($(1)_download_dir)/.$(4).hash && \
|
||||
mv $$($(1)_download_dir)/$(4).temp $$($(1)_source_dir)/$(4) && \
|
||||
rm -rf $$($(1)_download_dir) )
|
||||
endef
|
||||
|
||||
define fetch_file
|
||||
( test -f $$($(1)_source_dir)/$(4) || \
|
||||
( $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5)) || \
|
||||
$(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5))))
|
||||
endef
|
||||
|
||||
define int_get_build_recipe_hash
|
||||
$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
|
||||
final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
|
||||
$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
|
||||
endef
|
||||
|
||||
define int_get_build_id
|
||||
$(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
|
||||
$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies)))
|
||||
$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
|
||||
$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string))
|
||||
$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
|
||||
final_build_id_long+=:[recipe]:$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type):[deps]$(foreach dep,$($(1)_build_id_deps),$(shell echo ":$(dep)")):[$($(1)_type)_id]:$($($(1)_type)_id_string):
|
||||
|
||||
#compute package-specific paths
|
||||
$(1)_build_subdir?=.
|
||||
$(1)_download_file?=$($(1)_file_name)
|
||||
$(1)_source_dir:=$(SOURCES_PATH)
|
||||
$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name)
|
||||
$(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
|
||||
$(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix)
|
||||
$(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
|
||||
$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version)
|
||||
$(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir)
|
||||
$(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash
|
||||
$(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
|
||||
$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
|
||||
$(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
|
||||
$(1)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log
|
||||
$(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources)
|
||||
|
||||
#stamps
|
||||
$(1)_fetched=$(SOURCES_PATH)/download-stamps/.stamp_fetched-$(1)-$($(1)_file_name).hash
|
||||
$(1)_extracted=$$($(1)_extract_dir)/.stamp_extracted
|
||||
$(1)_preprocessed=$$($(1)_extract_dir)/.stamp_preprocessed
|
||||
$(1)_cleaned=$$($(1)_extract_dir)/.stamp_cleaned
|
||||
$(1)_built=$$($(1)_build_dir)/.stamp_built
|
||||
$(1)_configured=$$($(1)_build_dir)/.stamp_configured
|
||||
$(1)_staged=$$($(1)_staging_dir)/.stamp_staged
|
||||
$(1)_postprocessed=$$($(1)_staging_prefix_dir)/.stamp_postprocessed
|
||||
$(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
|
||||
|
||||
|
||||
#default commands
|
||||
# The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior
|
||||
$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash))
|
||||
$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_TAR) --no-same-owner --strip-components=1 -xf $$($(1)_source)
|
||||
$(1)_preprocess_cmds ?= true
|
||||
$(1)_build_cmds ?=
|
||||
$(1)_config_cmds ?=
|
||||
$(1)_stage_cmds ?=
|
||||
$(1)_set_vars ?=
|
||||
|
||||
|
||||
all_sources+=$$($(1)_fetched)
|
||||
endef
|
||||
#$(foreach dep_target,$($(1)_all_dependencies),$(eval $(1)_dependency_targets=$($(dep_target)_cached)))
|
||||
|
||||
|
||||
define int_config_attach_build_config
|
||||
$(eval $(call $(1)_set_vars,$(1)))
|
||||
$(1)_cflags+=$($(1)_cflags_$(release_type))
|
||||
$(1)_cflags+=$($(1)_cflags_$(host_arch)) $($(1)_cflags_$(host_arch)_$(release_type))
|
||||
$(1)_cflags+=$($(1)_cflags_$(host_os)) $($(1)_cflags_$(host_os)_$(release_type))
|
||||
$(1)_cflags+=$($(1)_cflags_$(host_arch)_$(host_os)) $($(1)_cflags_$(host_arch)_$(host_os)_$(release_type))
|
||||
|
||||
$(1)_cxxflags+=$($(1)_cxxflags_$(release_type))
|
||||
$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)) $($(1)_cxxflags_$(host_arch)_$(release_type))
|
||||
$(1)_cxxflags+=$($(1)_cxxflags_$(host_os)) $($(1)_cxxflags_$(host_os)_$(release_type))
|
||||
$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)_$(host_os)) $($(1)_cxxflags_$(host_arch)_$(host_os)_$(release_type))
|
||||
|
||||
$(1)_arflags+=$($(1)_arflags_$(release_type))
|
||||
$(1)_arflags+=$($(1)_arflags_$(host_arch)) $($(1)_arflags_$(host_arch)_$(release_type))
|
||||
$(1)_arflags+=$($(1)_arflags_$(host_os)) $($(1)_arflags_$(host_os)_$(release_type))
|
||||
$(1)_arflags+=$($(1)_arflags_$(host_arch)_$(host_os)) $($(1)_arflags_$(host_arch)_$(host_os)_$(release_type))
|
||||
|
||||
$(1)_cppflags+=$($(1)_cppflags_$(release_type))
|
||||
$(1)_cppflags+=$($(1)_cppflags_$(host_arch)) $($(1)_cppflags_$(host_arch)_$(release_type))
|
||||
$(1)_cppflags+=$($(1)_cppflags_$(host_os)) $($(1)_cppflags_$(host_os)_$(release_type))
|
||||
$(1)_cppflags+=$($(1)_cppflags_$(host_arch)_$(host_os)) $($(1)_cppflags_$(host_arch)_$(host_os)_$(release_type))
|
||||
|
||||
$(1)_ldflags+=$($(1)_ldflags_$(release_type))
|
||||
$(1)_ldflags+=$($(1)_ldflags_$(host_arch)) $($(1)_ldflags_$(host_arch)_$(release_type))
|
||||
$(1)_ldflags+=$($(1)_ldflags_$(host_os)) $($(1)_ldflags_$(host_os)_$(release_type))
|
||||
$(1)_ldflags+=$($(1)_ldflags_$(host_arch)_$(host_os)) $($(1)_ldflags_$(host_arch)_$(host_os)_$(release_type))
|
||||
|
||||
$(1)_build_opts+=$$($(1)_build_opts_$(release_type))
|
||||
$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)) $$($(1)_build_opts_$(host_arch)_$(release_type))
|
||||
$(1)_build_opts+=$$($(1)_build_opts_$(host_os)) $$($(1)_build_opts_$(host_os)_$(release_type))
|
||||
$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)_$(host_os)) $$($(1)_build_opts_$(host_arch)_$(host_os)_$(release_type))
|
||||
|
||||
$(1)_config_opts+=$$($(1)_config_opts_$(release_type))
|
||||
$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)) $$($(1)_config_opts_$(host_arch)_$(release_type))
|
||||
$(1)_config_opts+=$$($(1)_config_opts_$(host_os)) $$($(1)_config_opts_$(host_os)_$(release_type))
|
||||
$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)_$(host_os)) $$($(1)_config_opts_$(host_arch)_$(host_os)_$(release_type))
|
||||
|
||||
$(1)_config_env+=$$($(1)_config_env_$(release_type))
|
||||
$(1)_config_env+=$($(1)_config_env_$(host_arch)) $($(1)_config_env_$(host_arch)_$(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)_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_PATH=$($($(1)_type)_prefix)/share/pkgconfig
|
||||
$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
|
||||
$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
|
||||
$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
|
||||
$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
|
||||
|
||||
# Setting a --build type that differs from --host will explicitly enable
|
||||
# cross-compilation mode. Note that --build defaults to the output of
|
||||
# config.guess, which is what we set it too here. This also quells autoconf
|
||||
# warnings, "If you wanted to set the --build type, don't use --host.",
|
||||
# when using versions older than 2.70.
|
||||
$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
|
||||
ifneq ($($(1)_nm),)
|
||||
$(1)_autoconf += NM="$$($(1)_nm)"
|
||||
endif
|
||||
ifneq ($($(1)_ranlib),)
|
||||
$(1)_autoconf += RANLIB="$$($(1)_ranlib)"
|
||||
endif
|
||||
ifneq ($($(1)_ar),)
|
||||
$(1)_autoconf += AR="$$($(1)_ar)"
|
||||
endif
|
||||
ifneq ($($(1)_arflags),)
|
||||
$(1)_autoconf += ARFLAGS="$$($(1)_arflags)"
|
||||
endif
|
||||
ifneq ($($(1)_cflags),)
|
||||
$(1)_autoconf += CFLAGS="$$($(1)_cflags)"
|
||||
endif
|
||||
ifneq ($($(1)_cxxflags),)
|
||||
$(1)_autoconf += CXXFLAGS="$$($(1)_cxxflags)"
|
||||
endif
|
||||
ifneq ($($(1)_cppflags),)
|
||||
$(1)_autoconf += CPPFLAGS="$$($(1)_cppflags)"
|
||||
endif
|
||||
ifneq ($($(1)_ldflags),)
|
||||
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
|
||||
endif
|
||||
|
||||
$(1)_cmake=env CC="$$($(1)_cc)" \
|
||||
CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \
|
||||
CXX="$$($(1)_cxx)" \
|
||||
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
|
||||
LDFLAGS="$$($(1)_ldflags)" \
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts)
|
||||
ifeq ($($(1)_type),build)
|
||||
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
|
||||
else
|
||||
ifneq ($(host),$(build))
|
||||
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system)
|
||||
$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host)
|
||||
$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host)
|
||||
# wowlet: confine find_package to the depends sysroot so cross cmake builds don't grab host
|
||||
# /usr -dev packages (libzip's find_package(ZLIB) was picking up host zlib1g-dev). Mirrors
|
||||
# toolchain.cmake.in; no-op on clean CI, needed on dev boxes with -dev libs. Upstreamable.
|
||||
$(1)_cmake += -DCMAKE_FIND_ROOT_PATH=$(host_prefix)
|
||||
$(1)_cmake += -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
|
||||
$(1)_cmake += -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
|
||||
$(1)_cmake += -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
|
||||
$(1)_cmake += -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define int_add_cmds
|
||||
ifneq ($(LOG),)
|
||||
$(1)_logging = >>$$($(1)_build_log) 2>&1 || { if test -f $$($(1)_build_log); then cat $$($(1)_build_log); fi; exit 1; }
|
||||
endif
|
||||
|
||||
$($(1)_fetched):
|
||||
mkdir -p $$(@D) $(SOURCES_PATH)
|
||||
rm -f $$@
|
||||
touch $$@
|
||||
cd $$(@D); $($(1)_fetch_cmds)
|
||||
cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);)
|
||||
touch $$@
|
||||
$($(1)_extracted): | $($(1)_fetched)
|
||||
echo Extracting $(1)...
|
||||
mkdir -p $$(@D)
|
||||
cd $$(@D); $($(1)_extract_cmds)
|
||||
touch $$@
|
||||
$($(1)_preprocessed): | $($(1)_extracted)
|
||||
echo Preprocessing $(1)...
|
||||
mkdir -p $$(@D) $($(1)_patch_dir)
|
||||
$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
|
||||
cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
|
||||
touch $$@
|
||||
$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)
|
||||
echo Configuring $(1)...
|
||||
rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), $(build_TAR) --no-same-owner -xf $($(package)_cached); )
|
||||
mkdir -p $$(@D)
|
||||
$(AT)+cd $$(@D); export $($(1)_config_env); $(call $(1)_config_cmds, $(1))
|
||||
touch $$@
|
||||
$($(1)_built): | $($(1)_configured)
|
||||
echo Building $(1)...
|
||||
mkdir -p $$(@D)
|
||||
$(AT)+cd $$(@D); export $($(1)_build_env); $(call $(1)_build_cmds, $(1))
|
||||
touch $$@
|
||||
$($(1)_staged): | $($(1)_built)
|
||||
echo Staging $(1)...
|
||||
mkdir -p $($(1)_staging_dir)/$(host_prefix)
|
||||
$(AT)cd $($(1)_build_dir); export $($(1)_stage_env); $(call $(1)_stage_cmds, $(1))
|
||||
rm -rf $($(1)_extract_dir)
|
||||
touch $$@
|
||||
$($(1)_postprocessed): | $($(1)_staged)
|
||||
echo Postprocessing $(1)...
|
||||
cd $($(1)_staging_prefix_dir); $($(1)_postprocess_cmds)
|
||||
touch $$@
|
||||
$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
|
||||
echo Caching $(1)...
|
||||
cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | $(build_TAR) --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
|
||||
mkdir -p $$(@D)
|
||||
rm -rf $$(@D) && mkdir -p $$(@D)
|
||||
mv $$($(1)_staging_dir)/$$(@F) $$(@)
|
||||
rm -rf $($(1)_staging_dir)
|
||||
if test -f $($(1)_build_log); then mv $($(1)_build_log) $$(@D); fi
|
||||
$($(1)_cached_checksum): $($(1)_cached)
|
||||
cd $$(@D); $(build_SHA256SUM) $$(<F) > $$(@)
|
||||
|
||||
.PHONY: $(1)
|
||||
$(1): | $($(1)_cached_checksum)
|
||||
.SECONDARY: $($(1)_cached) $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched)
|
||||
|
||||
endef
|
||||
|
||||
stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum
|
||||
|
||||
define ext_add_stages
|
||||
$(foreach stage,$(stages),
|
||||
$(1)_$(stage): $($(1)_$(stage))
|
||||
.PHONY: $(1)_$(stage))
|
||||
endef
|
||||
|
||||
# These functions create the build targets for each package. They must be
|
||||
# broken down into small steps so that each part is done for all packages
|
||||
# before moving on to the next step. Otherwise, a package's info
|
||||
# (build-id for example) would only be available to another package if it
|
||||
# happened to be computed already.
|
||||
|
||||
#set the type for host/build packages.
|
||||
$(foreach native_package,$(native_packages),$(eval $(native_package)_type=build))
|
||||
$(foreach package,$(packages),$(eval $(package)_type=$(host_arch)_$(host_os)))
|
||||
|
||||
#set overridable defaults
|
||||
$(foreach package,$(all_packages),$(eval $(call int_vars,$(package))))
|
||||
|
||||
#include package files
|
||||
$(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk))
|
||||
$(foreach package,$(packages),$(eval include packages/$(package).mk))
|
||||
|
||||
#compute a hash of all files that comprise this package's build recipe
|
||||
$(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package))))
|
||||
|
||||
#generate a unique id for this package, incorporating its dependencies as well
|
||||
$(foreach package,$(all_packages),$(eval $(call int_get_build_id,$(package))))
|
||||
|
||||
#compute final vars after reading package vars
|
||||
$(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$(package))))
|
||||
|
||||
#create build targets
|
||||
$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
|
||||
|
||||
#special exception: if a toolchain package exists, all non-native packages depend on it
|
||||
$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) ))
|
||||
@@ -1,79 +0,0 @@
|
||||
OSX_MIN_VERSION=14.0
|
||||
OSX_SDK_VERSION=14.0
|
||||
XCODE_VERSION=15.0
|
||||
XCODE_BUILD_ID=15A240d
|
||||
LLD_VERSION=711
|
||||
|
||||
OSX_SDK=$(host_prefix)/native/SDK
|
||||
|
||||
darwin_native_toolchain=darwin_sdk
|
||||
|
||||
|
||||
clang_prog=clang
|
||||
clangxx_prog=clang++
|
||||
llvm_config_prog=llvm-config
|
||||
|
||||
llvm_lib_dir=$(shell $(llvm_config_prog) --libdir)
|
||||
|
||||
darwin_AR=llvm-ar
|
||||
darwin_DSYMUTIL=dsymutil
|
||||
darwin_NM=llvm-nm
|
||||
darwin_OBJDUMP=llvm-objdump
|
||||
darwin_RANLIB=llvm-ranlib
|
||||
darwin_STRIP=llvm-strip
|
||||
darwin_LIBTOOL=llvm-libtool-darwin
|
||||
|
||||
# Flag explanations:
|
||||
#
|
||||
# -mlinker-version
|
||||
#
|
||||
# Ensures that modern linker features are enabled. See here for more
|
||||
# details: https://github.com/bitcoin/bitcoin/pull/19407.
|
||||
#
|
||||
# -B$(build_prefix)/bin
|
||||
#
|
||||
# Explicitly point to our binaries (e.g. cctools) so that they are
|
||||
# ensured to be found and preferred over other possibilities.
|
||||
#
|
||||
# -isysroot$(OSX_SDK) -nostdlibinc
|
||||
#
|
||||
# Disable default include paths built into the compiler as well as
|
||||
# those normally included for libc and libc++. The only path that
|
||||
# remains implicitly is the clang resource dir.
|
||||
#
|
||||
# -iwithsysroot / -iframeworkwithsysroot
|
||||
#
|
||||
# Adds the desired paths from the SDK
|
||||
#
|
||||
|
||||
darwin_CC_=--target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
||||
-mlinker-version=$(LLD_VERSION) \
|
||||
-isysroot$(OSX_SDK) -nostdlibinc \
|
||||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
||||
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
||||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
||||
-u LIBRARY_PATH \
|
||||
$(clang_prog) $(darwin_CC_)
|
||||
|
||||
darwin_CXX_=--target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
||||
-mlinker-version=$(LLD_VERSION) \
|
||||
-isysroot$(OSX_SDK) -nostdlibinc \
|
||||
-iwithsysroot/usr/include/c++/v1 \
|
||||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
||||
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
||||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
||||
-u LIBRARY_PATH \
|
||||
$(clangxx_prog) $(darwin_CXX_)
|
||||
|
||||
darwin_CFLAGS=-pipe
|
||||
darwin_CXXFLAGS=-pipe
|
||||
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -fuse-ld=lld
|
||||
darwin_ARFLAGS=cr
|
||||
|
||||
darwin_release_CFLAGS=-O2
|
||||
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
|
||||
|
||||
darwin_debug_CFLAGS=-O1
|
||||
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
|
||||
|
||||
darwin_cmake_system=Darwin
|
||||
@@ -1,40 +0,0 @@
|
||||
ifneq ($(host),$(build))
|
||||
host_toolchain:=$(host)-
|
||||
endif
|
||||
|
||||
default_host_CC = $(host_toolchain)gcc
|
||||
default_host_CXX = $(host_toolchain)g++
|
||||
default_host_AR = $(host_toolchain)ar
|
||||
default_host_RANLIB = $(host_toolchain)ranlib
|
||||
default_host_STRIP = $(host_toolchain)strip
|
||||
default_host_LIBTOOL = $(host_toolchain)libtool
|
||||
default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
|
||||
default_host_OTOOL = $(host_toolchain)otool
|
||||
default_host_NM = $(host_toolchain)nm
|
||||
default_host_OBJCOPY = $(host_toolchain)objcopy
|
||||
|
||||
define add_host_tool_func
|
||||
ifneq ($(filter $(origin $1),undefined default),)
|
||||
# Do not consider the well-known var $1 if it is undefined or is taking a value
|
||||
# that is predefined by "make" (e.g. the make variable "CC" has a predefined
|
||||
# value of "cc")
|
||||
$(host_os)_$1?=$$(default_host_$1)
|
||||
$(host_arch)_$(host_os)_$1?=$$($(host_os)_$1)
|
||||
$(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1)
|
||||
else
|
||||
$(host_os)_$1=$(or $($1),$($(host_os)_$1),$(default_host_$1))
|
||||
$(host_arch)_$(host_os)_$1=$(or $($1),$($(host_arch)_$(host_os)_$1),$$($(host_os)_$1))
|
||||
$(host_arch)_$(host_os)_$(release_type)_$1=$(or $($1),$($(host_arch)_$(host_os)_$(release_type)_$1),$$($(host_os)_$1))
|
||||
endif
|
||||
host_$1=$$($(host_arch)_$(host_os)_$1)
|
||||
endef
|
||||
|
||||
define add_host_flags_func
|
||||
$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
|
||||
$(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1)
|
||||
host_$1 = $$($(host_arch)_$(host_os)_$1)
|
||||
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
|
||||
endef
|
||||
|
||||
$(foreach tool,CC CXX AR RANLIB STRIP LIBTOOL NM OBJCOPY OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
|
||||
$(foreach flags,CFLAGS CXXFLAGS ARFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
|
||||
@@ -1,24 +0,0 @@
|
||||
linux_CFLAGS=-pipe
|
||||
linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
linux_ARFLAGS=cr
|
||||
|
||||
linux_release_CFLAGS=-O2
|
||||
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
|
||||
|
||||
linux_debug_CFLAGS=-O1
|
||||
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
|
||||
|
||||
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1
|
||||
|
||||
ifeq (86,$(findstring 86,$(build_arch)))
|
||||
x86_64_linux_CC=gcc -m64
|
||||
x86_64_linux_CXX=g++ -m64
|
||||
x86_64_linux_AR=ar
|
||||
x86_64_linux_RANLIB=ranlib
|
||||
x86_64_linux_NM=nm
|
||||
x86_64_linux_STRIP=strip
|
||||
else
|
||||
x86_64_linux_CC=$(default_host_CC) -m64
|
||||
x86_64_linux_CXX=$(default_host_CXX) -m64
|
||||
endif
|
||||
linux_cmake_system=Linux
|
||||
@@ -1,17 +0,0 @@
|
||||
ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),)
|
||||
mingw32_CXX := $(host)-g++-posix
|
||||
endif
|
||||
|
||||
mingw32_CFLAGS=-pipe
|
||||
mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
mingw32_ARFLAGS=cr
|
||||
|
||||
mingw32_release_CFLAGS=-O2
|
||||
mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
|
||||
|
||||
mingw32_debug_CFLAGS=-O1
|
||||
mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
|
||||
|
||||
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
|
||||
|
||||
mingw32_cmake_system=Windows
|
||||
@@ -1,28 +0,0 @@
|
||||
package=abseil
|
||||
$(package)_version=$(native_$(package)_version)
|
||||
$(package)_download_path=$(native_$(package)_download_path)
|
||||
$(package)_download_file=$(native_$(package)_download_file)
|
||||
$(package)_file_name=$(native_$(package)_file_name)
|
||||
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
||||
$(package)_patches=no_librt.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_cxxflags+=-std=c++17
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 -i $($(package)_patch_dir)/no_librt.patch && \
|
||||
rm -rf absl/time/internal/cctz/testdata
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_cmake)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
@@ -1,23 +0,0 @@
|
||||
package=appimage_runtime
|
||||
$(package)_version=f6c0b18d42eb4aa629cc6a18d08c20cc67c80af8
|
||||
$(package)_download_path=https://github.com/AppImage/type2-runtime/archive/
|
||||
$(package)_file_name=$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=746c2110049c4092dab9d8b788e2a9e98ec77ff9b8b09be844fce1dcdeb4c328
|
||||
$(package)_dependencies=libsquashfuse zstd
|
||||
$(package)_patches=depends-fix.patch
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/depends-fix.patch
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
cd src/runtime && \
|
||||
export host_prefix="$(host_prefix)" && \
|
||||
$(MAKE) runtime -e CC=$($(package)_cc) LDLAGS="$($(package)_ldflags)" && \
|
||||
"${HOST}-strip" runtime
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
cd src/runtime && \
|
||||
cp -a runtime $($(package)_staging_prefix_dir)/runtime
|
||||
endef
|
||||
@@ -1,43 +0,0 @@
|
||||
package=boost
|
||||
$(package)_version=1.90.0
|
||||
$(package)_download_path=https://github.com/boostorg/boost/releases/download/boost-$($(package)_version)
|
||||
$(package)_file_name=boost-$($(package)_version)-b2-nodocs.tar.gz
|
||||
$(package)_sha256_hash=e848446c6fec62d8a96b44ed7352238b3de040b8b9facd4d6963b32f541e00f5
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=variant=release
|
||||
$(package)_config_opts+=--layout=system --user-config=user-config.jam
|
||||
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 -sICONV_PATH=$(host_prefix)
|
||||
$(package)_config_opts_linux=threadapi=pthread runtime-link=static
|
||||
$(package)_config_opts_android=threadapi=pthread runtime-link=static target-os=android
|
||||
$(package)_config_opts_darwin=--toolset=darwin runtime-link=shared target-os=darwin
|
||||
$(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_i686_mingw32=address-model=32
|
||||
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
|
||||
$(package)_toolset_$(host_os)=gcc
|
||||
$(package)_archiver_$(host_os)=$($(package)_ar)
|
||||
$(package)_toolset_darwin=darwin
|
||||
$(package)_archiver_darwin=$($(package)_libtool)
|
||||
$(package)_config_libraries_$(host_os)="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,stacktrace"
|
||||
$(package)_config_libraries_mingw32="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,stacktrace,locale"
|
||||
$(package)_cxxflags=-std=c++17
|
||||
$(package)_cxxflags_linux=-fPIC
|
||||
$(package)_cxxflags_freebsd=-fPIC
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
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
|
||||
|
||||
define $(package)_config_cmds
|
||||
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries_$(host_os))
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
|
||||
endef
|
||||
@@ -1,10 +0,0 @@
|
||||
package=darwin_sdk
|
||||
$(package)_version=15.0
|
||||
$(package)_download_path=https://bitcoincore.org/depends-sources/sdks
|
||||
$(package)_file_name=Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers.tar.gz
|
||||
$(package)_sha256_hash=c0c2e7bb92c1fee0c4e9f3a485e4530786732d6c6dd9e9f418c282aa6892f55d
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\
|
||||
mv * $($(package)_staging_dir)/$(host_prefix)/native/SDK
|
||||
endef
|
||||
@@ -1,32 +0,0 @@
|
||||
package=dbus
|
||||
$(package)_version=1.14.10
|
||||
$(package)_download_path=https://dbus.freedesktop.org/releases/dbus
|
||||
$(package)_file_name=dbus-$($(package)_version).tar.xz
|
||||
$(package)_sha256_hash=ba1f21d2bd9d339da2d4aa8780c09df32fea87998b73da24f49ab9df1e36a50f
|
||||
$(package)_dependencies=expat
|
||||
$(package)_patches=remove-DDBUS_STATIC_BUILD.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --disable-maintainer-mode --disable-xml-docs --disable-doxygen-docs
|
||||
$(package)_config_opts+=--disable-ducktype-docs
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/remove-DDBUS_STATIC_BUILD.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm lib/*.la
|
||||
endef
|
||||
@@ -1,30 +0,0 @@
|
||||
package=expat
|
||||
$(package)_version=2.7.5
|
||||
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/
|
||||
$(package)_file_name=expat-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=9931f9860d18e6cf72d183eb8f309bfb96196c00e1d40caa978e95bc9aa978b6
|
||||
$(package)_build_subdir=build
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts := -DEXPAT_BUILD_TOOLS=OFF
|
||||
$(package)_config_opts += -DEXPAT_BUILD_EXAMPLES=OFF
|
||||
$(package)_config_opts += -DEXPAT_BUILD_TESTS=OFF
|
||||
$(package)_config_opts += -DBUILD_SHARED_LIBS=OFF
|
||||
$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_cmake) -S .. -B .
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share lib/cmake
|
||||
endef
|
||||
@@ -1,19 +0,0 @@
|
||||
package=flatstart
|
||||
$(package)_version=a148fb86c30968eeb30dc6ac3384ad2a16690520
|
||||
$(package)_download_path=https://github.com/tobtoht/ln-guix-store/archive/
|
||||
$(package)_file_name=$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=e9694fcda4f9fcb00374da7a439b881296c0ce67ea98ca44bf2830d1a364365b
|
||||
$(package)_patches=main.c main.S
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
cp -f $($(package)_patch_dir)/main.c $($(package)_patch_dir)/main.S .
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$($(package)_cc) -nostdlib -fno-unwind-tables -fno-asynchronous-unwind-tables -fdata-sections -Wl,--gc-sections -Wa,--noexecstack -fno-builtin -fno-stack-protector -static -o startup main.c main.S
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir -p $($(package)_staging_prefix_dir)/bin && \
|
||||
cp startup $($(package)_staging_prefix_dir)/bin/
|
||||
endef
|
||||
@@ -1,32 +0,0 @@
|
||||
package=fontconfig
|
||||
$(package)_version=2.12.6
|
||||
$(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/
|
||||
$(package)_file_name=fontconfig-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=064b9ebf060c9e77011733ac9dc0e2ce92870b574cca2405e11f5353a683c334
|
||||
$(package)_dependencies=freetype expat
|
||||
$(package)_patches=gperf_header_regen.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-docs --disable-static --disable-libxml2 --disable-iconv
|
||||
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/gperf_header_regen.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf var lib/*.la
|
||||
endef
|
||||
@@ -1,31 +0,0 @@
|
||||
package=freetype
|
||||
$(package)_version=2.14.1
|
||||
$(package)_download_path=https://sourceforge.net/projects/freetype/files/freetype2/$($(package)_version)/
|
||||
$(package)_file_name=freetype-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=174d9e53402e1bf9ec7277e22ec199ba3e55a6be2c0740cb18c0ee9850fc8c34
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts := --without-zlib --without-png --without-harfbuzz --without-bzip2 --enable-static --disable-shared
|
||||
$(package)_config_opts += --enable-option-checking --without-brotli
|
||||
$(package)_config_opts += --with-pic
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
rm -rf docs
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share/man lib/*.la
|
||||
endef
|
||||
@@ -1,28 +0,0 @@
|
||||
package=hidapi
|
||||
$(package)_version=0.15.0
|
||||
$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=5d84dec684c27b97b921d2f3b73218cb773cf4ea915caee317ac8fc73cef8136
|
||||
$(package)_linux_dependencies=libusb
|
||||
$(package)_patches=cmake-fix-libusb.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts := -DBUILD_SHARED_LIBS=OFF
|
||||
$(package)_config_opts += -DHIDAPI_WITH_HIDRAW=OFF
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/cmake-fix-libusb.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_cmake) .
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
@@ -1,37 +0,0 @@
|
||||
package=libXau
|
||||
$(package)_version=1.0.12
|
||||
$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
|
||||
$(package)_file_name=libXau-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=2402dd938da4d0a332349ab3d3586606175e19cb32cb9fe013c19f1dc922dcee
|
||||
$(package)_dependencies=xorgproto
|
||||
$(package)_patches=toolchain.txt
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
rm Makefile.in aclocal.m4 compile config.guess config.h.in config.sub configure depcomp \
|
||||
install-sh ltmain.sh missing test-driver man/Makefile.in && \
|
||||
rm -rf m4 && \
|
||||
cp $($(package)_patch_dir)/toolchain.txt toolchain.txt && \
|
||||
sed -i -e 's|@host_prefix@|$(host_prefix)|' \
|
||||
-e 's|@cc@|$($(package)_cc)|' \
|
||||
-e 's|@cxx@|$($(package)_cxx)|' \
|
||||
-e 's|@ar@|$($(package)_ar)|' \
|
||||
-e 's|@strip@|$(host_STRIP)|' \
|
||||
-e 's|@arch@|$(host_arch)|' \
|
||||
toolchain.txt
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
meson setup --cross-file toolchain.txt build
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
ninja -C build
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
DESTDIR=$($(package)_staging_dir) ninja -C build install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
sed -i 's/Requires: xproto//g' lib/pkgconfig/xau.pc
|
||||
endef
|
||||
@@ -1,22 +0,0 @@
|
||||
package=libevent
|
||||
$(package)_version=2.1.12
|
||||
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/
|
||||
$(package)_file_name=libevent-$($(package)_version)-stable.tar.gz
|
||||
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
|
||||
$(package)_dependencies=openssl
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --enable-static --with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
@@ -1,27 +0,0 @@
|
||||
package=libffi
|
||||
$(package)_version=$(native_$(package)_version)
|
||||
$(package)_download_path := $(native_$(package)_download_path)
|
||||
$(package)_file_name := $(native_$(package)_file_name)
|
||||
$(package)_sha256_hash := $(native_$(package)_sha256_hash)
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts := --enable-option-checking --disable-dependency-tracking
|
||||
$(package)_config_opts += --disable-shared --enable-static --disable-docs
|
||||
$(package)_config_opts += --disable-multi-os-directory
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share
|
||||
endef
|
||||
@@ -1,32 +0,0 @@
|
||||
package=libfuse
|
||||
$(package)_version=3.16.2
|
||||
$(package)_download_path=https://github.com/libfuse/libfuse/releases/download/fuse-$($(package)_version)
|
||||
$(package)_file_name=fuse-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=f797055d9296b275e981f5f62d4e32e089614fc253d1ef2985851025b8a0ce87
|
||||
$(package)_patches=toolchain.txt mount.c.diff no-dlopen.patch set_fusermount_path.patch
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/set_fusermount_path.patch && \
|
||||
patch -p1 < $($(package)_patch_dir)/no-dlopen.patch && \
|
||||
patch -p1 < $($(package)_patch_dir)/mount.c.diff && \
|
||||
cp $($(package)_patch_dir)/toolchain.txt toolchain.txt && \
|
||||
sed -i -e 's|@host_prefix@|$(host_prefix)|' \
|
||||
-e 's|@cc@|$($(package)_cc)|' \
|
||||
-e 's|@cxx@|$($(package)_cxx)|' \
|
||||
-e 's|@ar@|$($(package)_ar)|' \
|
||||
-e 's|@strip@|$(host_STRIP)|' \
|
||||
-e 's|@arch@|$(host_arch)|' \
|
||||
toolchain.txt
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
meson setup --cross-file toolchain.txt build
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
ninja -C build
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
DESTDIR=$($(package)_staging_dir) ninja -C build install
|
||||
endef
|
||||
@@ -1,28 +0,0 @@
|
||||
package=libgcrypt
|
||||
$(package)_version=1.11.1
|
||||
$(package)_download_path=https://www.gnupg.org/ftp/gcrypt/libgcrypt/
|
||||
$(package)_file_name=libgcrypt-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=a9691689e5e2f3be03c90738c9ab1d194245d82e365fb3797f3b0fd04de45d7b
|
||||
$(package)_dependencies=libgpg-error
|
||||
$(package)_patches=no-programs.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_build_opts=CFLAGS="-fPIE"
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/no-programs.patch && \
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf) --disable-shared --enable-static --disable-tests --disable-doc --disable-asm --with-libgpg-error-prefix=$(host_prefix)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) $($(package)_build_opts)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
@@ -1,30 +0,0 @@
|
||||
package=libgpg-error
|
||||
$(package)_version=1.59
|
||||
$(package)_download_path=https://www.gnupg.org/ftp/gcrypt/libgpg-error/
|
||||
$(package)_file_name=libgpg-error-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=e14e36687fb2d63991007504ba228e94268be67b8445807e7d9fd2510daaf723
|
||||
$(package)_patches=no-programs.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts := --enable-static --disable-shared
|
||||
$(package)_config_opts += --disable-doc --disable-tests
|
||||
$(package)_config_opts += --enable-install-gpg-error-config
|
||||
$(package)_build_opts := CFLAGS="-fPIE"
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/no-programs.patch && \
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) $($(package)_build_opts)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
@@ -1,33 +0,0 @@
|
||||
package=libsodium
|
||||
$(package)_version=1.0.22
|
||||
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
|
||||
$(package)_file_name=libsodium-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=adbdd8f16149e81ac6078a03aca6fc03b592b89ef7b5ed83841c086191be3349
|
||||
$(package)_patches=fix-blake2b-symbol-naming.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--enable-static --disable-shared
|
||||
$(package)_config_opts+=--prefix=$(host_prefix)
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
rm -rf builds/msvc &&\
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix-blake2b-symbol-naming.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm lib/*.la
|
||||
endef
|
||||
@@ -1,24 +0,0 @@
|
||||
package=libsquashfuse
|
||||
$(package)_version=0.5.2
|
||||
$(package)_download_path=https://github.com/vasi/squashfuse/releases/download/$($(package)_version)
|
||||
$(package)_file_name=squashfuse-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=54e4baaa20796e86a214a1f62bab07c7c361fb7a598375576d585712691178f5
|
||||
$(package)_dependencies=libfuse zstd
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf) --with-zstd=$(host_prefix) --without-zlib CFLAGS=-no-pie LDFLAGS=-static
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install && \
|
||||
mkdir -p $($(package)_staging_prefix_dir)/lib && \
|
||||
mkdir -p $($(package)_staging_prefix_dir)/include/squashfuse && \
|
||||
cp .libs/libfuseprivate.a $($(package)_staging_prefix_dir)/lib/ && \
|
||||
cp .libs/libsquashfuse.a $($(package)_staging_prefix_dir)/lib/ && \
|
||||
cp .libs/libsquashfuse_ll.a $($(package)_staging_prefix_dir)/lib/ && \
|
||||
find . -name "*.h" -exec cp --parents '{}' $($(package)_staging_prefix_dir)/include/squashfuse \;
|
||||
endef
|
||||
@@ -1,29 +0,0 @@
|
||||
package=libusb
|
||||
$(package)_version=1.0.29
|
||||
$(package)_download_path=https://github.com/libusb/libusb/archive/refs/tags
|
||||
$(package)_download_file=v$($(package)_version).tar.gz
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=7c2dd39c0b2589236e48c93247c986ae272e27570942b4163cb00a060fcf1b74
|
||||
$(package)_patches=CMakeLists.txt config.h.in
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
cp -f $($(package)_patch_dir)/CMakeLists.txt . && \
|
||||
cp -f $($(package)_patch_dir)/config.h.in .
|
||||
endef
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts := -DBUILD_SHARED_LIBS=OFF
|
||||
$(package)_config_opts_linux += -DLIBUSB_ENABLE_UDEV=OFF
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_cmake) .
|
||||
endef
|
||||
|
||||
define $(package)_build_cmd
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
@@ -1,41 +0,0 @@
|
||||
package=libxcb
|
||||
$(package)_version=1.17.0
|
||||
$(package)_download_path=https://xcb.freedesktop.org/dist
|
||||
$(package)_file_name=libxcb-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=2c69287424c9e2128cb47ffe92171e10417041ec2963bceafb65cb3fcf8f0b85
|
||||
$(package)_dependencies=xcb_proto libXau
|
||||
$(package)_patches = remove_pthread_stubs.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --disable-devel-docs --without-doxygen --without-launchd
|
||||
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
|
||||
# Disable unneeded extensions.
|
||||
# More info is available from: https://doc.qt.io/qt-6.5/linux-requirements.html
|
||||
$(package)_config_opts += --disable-composite --disable-damage --disable-dpms
|
||||
$(package)_config_opts += --disable-dri2 --disable-dri3 --disable-glx
|
||||
$(package)_config_opts += --disable-present --disable-record --disable-resource
|
||||
$(package)_config_opts += --disable-screensaver --disable-xevie --disable-xfree86-dri
|
||||
$(package)_config_opts += --disable-xinput --disable-xprint --disable-selinux
|
||||
$(package)_config_opts += --disable-xtest --disable-xv --disable-xvmc
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \
|
||||
patch -p1 -i $($(package)_patch_dir)/remove_pthread_stubs.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share lib/*.la
|
||||
endef
|
||||
@@ -1,32 +0,0 @@
|
||||
package=libxcb_util
|
||||
$(package)_version=0.4.1
|
||||
$(package)_download_path=https://xcb.freedesktop.org/dist
|
||||
$(package)_file_name=xcb-util-$($(package)_version).tar.xz
|
||||
$(package)_sha256_hash=5abe3bbbd8e54f0fa3ec945291b7e8fa8cfd3cccc43718f8758430f94126e512
|
||||
$(package)_dependencies=libxcb
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen
|
||||
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
|
||||
$(package)_config_opts += --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
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share/man share/doc lib/*.la
|
||||
endef
|
||||
@@ -1,33 +0,0 @@
|
||||
package=libxcb_util_cursor
|
||||
$(package)_version=0.1.6
|
||||
$(package)_download_path=https://xcb.freedesktop.org/dist
|
||||
$(package)_file_name=xcb-util-cursor-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=eae38b2dfc5c529a886e507ef576b12d2a20aa1f149608e4853af760f31be60b
|
||||
$(package)_dependencies=libxcb libxcb_util_render libxcb_util_image
|
||||
$(package)_patches=flatpak.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts := --disable-shared --disable-devel-docs --without-doxygen
|
||||
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 -i $($(package)_patch_dir)/flatpak.patch && \
|
||||
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
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share/man share/doc lib/*.la
|
||||
endef
|
||||
@@ -1,31 +0,0 @@
|
||||
package=libxcb_util_image
|
||||
$(package)_version=0.4.1
|
||||
$(package)_download_path=https://xcb.freedesktop.org/dist
|
||||
$(package)_file_name=xcb-util-image-$($(package)_version).tar.xz
|
||||
$(package)_sha256_hash=ccad8ee5dadb1271fd4727ad14d9bd77a64e505608766c4e98267d9aede40d3d
|
||||
$(package)_dependencies=libxcb libxcb_util
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --disable-devel-docs --without-doxygen
|
||||
$(package)_config_opts+= --disable-dependency-tracking --enable-option-checking
|
||||
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) -C image
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) -C image install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share/man share/doc lib/*.la
|
||||
endef
|
||||
@@ -1,31 +0,0 @@
|
||||
package=libxcb_util_keysyms
|
||||
$(package)_version=0.4.1
|
||||
$(package)_download_path=https://xcb.freedesktop.org/dist
|
||||
$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.xz
|
||||
$(package)_sha256_hash=7c260a5294412aed429df1da2f8afd3bd07b7cba3fec772fba15a613a6d5c638
|
||||
$(package)_dependencies=libxcb xorgproto
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --disable-devel-docs --without-doxygen
|
||||
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
|
||||
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
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share/man share/doc lib/*.la
|
||||
endef
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user