diff --git a/srcpkgs/monero-gui/files b/srcpkgs/monero-gui/files new file mode 120000 index 00000000000..0dc85055cb8 --- /dev/null +++ b/srcpkgs/monero-gui/files @@ -0,0 +1 @@ +../monero/patches \ No newline at end of file diff --git a/srcpkgs/monero-gui/template b/srcpkgs/monero-gui/template index 39fe1e42bc2..b94d23ef1d7 100644 --- a/srcpkgs/monero-gui/template +++ b/srcpkgs/monero-gui/template @@ -1,34 +1,79 @@ # Template file for 'monero-gui' pkgname=monero-gui -version=0.16.0.3 -_monero_version=0.16.0.3 +version=0.17.0.1 revision=1 -build_style=qmake +_monero_version=0.17.0.1 +_randomx_version="1.1.8" +# the revision monero uses as a submodule for the specific version +_rapidjson_gitrev="129d19ba7f496df5e33658527a7158c79b99c21c" +_supercop_gitrev="633500ad8c8759995049ccd022107d1fa8a1bbc9" +build_style=cmake +configure_args="-DVERSION_IS_RELEASE=true -DQt5_LRELEASE_EXECUTABLE=/usr/bin/lrelease" hostmakedepends="pkg-config qt5-tools qt5-qmake qt5-quickcontrols qt5-declarative-devel qt5-svg-devel" -makedepends="boost-devel libatomic-devel libunwind-devel miniupnpc-devel monero-devel +makedepends="boost-devel libatomic-devel libunwind-devel miniupnpc-devel qt5-declarative-devel readline-devel unbound-devel libsodium-devel hidapi-devel - qt5-svg-devel RandomX libgcrypt-devel" + qt5-svg-devel libgcrypt-devel zeromq-devel" depends="qt5-graphicaleffects qt5-quickcontrols qt5-quickcontrols2 qt5-xmlpatterns" short_desc="GUI for the core Monero implementation" maintainer="Helmut Pozimski " license="BSD-3-Clause" homepage="https://getmonero.org" distfiles="https://github.com/monero-project/monero-gui/archive/v${version}.tar.gz - https://github.com/monero-project/monero/archive/v${_monero_version}.tar.gz>monero-${_monero_version}.tar.gz" -checksum="23061761d15728e2dc081c799515d010a28914bac2b27d6bbd01d65ac09e89ef - df15660f877b75d340214847be1648cac47b2fcdb4011cf8f5aa4517f3af48cb" -skip_extraction="monero-${version}.tar.gz" + https://github.com/monero-project/monero/archive/v${_monero_version}.tar.gz>monero-${_monero_version}.tar.gz + https://github.com/tevador/RandomX/archive/v${_randomx_version}.tar.gz + https://github.com/Tencent/rapidjson/archive/${_rapidjson_gitrev}.tar.gz + https://github.com/monero-project/supercop/archive/${_supercop_gitrev}.tar.gz" +checksum="98324e610d04426dbac80c83ae8f5c642101d0e175d71123f42513cc45361d31 + 490f59c669992fc9bc74103dc2c82c968d07fecb6e2831d2d356575dc78862fb + f982a12d18b1d260bef2a1d3c46ae4902975fbf63abb38ca6413c96d1778db3a + 44b007d419ac21b6affec58991e865ee572346ead19b73cf1c3e4e11c7a81273 + b973b9d8269ec4d97c3c3443f0dad96d09f72b1b30e616e0947557adbdbb03f7" +skip_extraction="monero-${version}.tar.gz ${_rapidjson_gitrev}.tar.gz ${_supercop_gitrev}.tar.gz v${_randomx_version}.tar.gz" + +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + makedepends+=" libatomic-devel" + CFLAGS+=" -latomic" +fi + +case "$XBPS_TARGET_MACHINE" in + *-musl) configure_args+=" -DSTACK_TRACE=OFF" +esac + +case "$XBPS_TARGET_MACHINE" in + armv7*) configure_args+=" -DARCH=armv7" ;; + armv6*) configure_args+=" -DARCH=armv6" ;; + armv5*) configure_args+=" -DARCH=armv5" ;; + aarch64*) configure_args+=" -DARCH=aarch64" ;; + mips*) configure_args+=" -DARCH=mipsr32 -DNO_AES=ON" ;; + ppc64le*) configure_args+=" -DARCH=ppc64le" ;; + ppc64*) configure_args+=" -DARCH=ppc64" ;; + ppc*) configure_arch+=" -DARCH=ppc" ;; + *) configure_args+=" -DARCH=default" ;; +esac + + post_extract() { bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/monero-${_monero_version}.tar.gz --strip-components 1 -C monero + bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_rapidjson_gitrev}.tar.gz --strip-components 1 -C monero/external/rapidjson + bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_supercop_gitrev}.tar.gz --strip-components 1 -C monero/external/supercop + bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${_randomx_version}.tar.gz --strip-components 1 -C monero/external/randomx +} + +post_patch() { + cd monero + for f in "${FILESDIR}"/*.patch; do + echo "Applying $f" + patch -Np0 -i "$f" + done } pre_configure() { echo "var GUI_VERSION = \"${version}\"" > version.js echo "var GUI_MONERO_VERSION = \"${version}\"" >> version.js if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then - sed -i *.pro -e "s;-leasylogging;-leasylogging -latomic;" + vsed -i monero/CMakeLists.txt -e '/include(version.cmake)/i list(APPEND EXTRA_LIBRARIES libatomic.a)' fi } @@ -39,13 +84,18 @@ pre_build() { # built for the host CXX=${CXX_host} CXXFLAGS="${XBPS_CXXFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" \ make ${makejobs} -C src/zxcvbn-c dictgen + # The generate_translations_header binary is executed during the build + # but is not included in the binary package. It thus needs to be + # built for the host + CC=${CC_host} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" \ + make -C build/monero ${makejobs} generate_translations_header fi make ${makejobs} -C src/zxcvbn-c } do_install() { - vbin release/bin/monero-wallet-gui + vbin build/bin/monero-wallet-gui vlicense LICENSE }