From f8431770407fd3498da27d907cf1660864bed8a7 Mon Sep 17 00:00:00 2001 From: lod Date: Tue, 11 Mar 2025 15:17:08 +0100 Subject: [PATCH 1/3] upstream release 2.11.0 --- .SRCINFO | 7 +++++-- PKGBUILD | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 11fb0ff..6789ab1 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = edgetx-companion pkgdesc = EEPROM Editor and Simulator for EdgeTX RC radio transmitter firmwares - pkgver = 2.10.6 + pkgver = 2.11.0 pkgrel = 1 url = https://edgetx.org/ arch = x86_64 @@ -32,12 +32,13 @@ pkgbase = edgetx-companion depends = hicolor-icon-theme depends = qt5-base depends = qt5-multimedia + depends = qt5-serialport depends = sdl2 optdepends = dfu-util: tool for flashing stm32 based radios provides = companion conflicts = companion options = !debug - source = git+https://github.com/EdgeTX/edgetx.git#tag=v2.10.6 + source = git+https://github.com/EdgeTX/edgetx.git#tag=v2.11.0 source = git+https://github.com/raphaelcoeffic/AccessDenied.git source = git+https://github.com/FreeRTOS/FreeRTOS-Kernel.git source = git+https://github.com/adfernandes/segger-rtt.git @@ -45,6 +46,8 @@ pkgbase = edgetx-companion source = git+https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports.git source = git+https://github.com/EdgeTX/lvgl.git source = git+https://github.com/nothings/stb.git + source = git+https://github.com/microsoft/uf2 + source = git+https://github.com/signal11/hidapi source = install.patch b2sums = df729e121cb29e2bc0976a57b8071172a978aef0f0b44d2d4a58967fccf920a076ae03b6a552a777e3a8e3c517d21148cb12445a60003c29cde334d7345ffce6 b2sums = SKIP diff --git a/PKGBUILD b/PKGBUILD index 116ed86..a2a3cf8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,13 +4,13 @@ # Contributer: Arnaud pkgname=edgetx-companion -pkgver=2.10.6 +pkgver=2.11.0 pkgrel=1 pkgdesc="EEPROM Editor and Simulator for EdgeTX RC radio transmitter firmwares" arch=('x86_64') url='https://edgetx.org/' license=('GPL-2.0-only') -depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'qt5-base' 'qt5-multimedia' 'sdl2') +depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'qt5-base' 'qt5-multimedia' 'qt5-serialport' 'sdl2') optdepends=('dfu-util: tool for flashing stm32 based radios') makedepends=('arm-none-eabi-binutils' 'arm-none-eabi-gcc' 'arm-none-eabi-newlib' 'avr-gcc' 'avr-libc' 'bc' 'clang' 'cmake' 'fox' 'gcc' 'git' 'icu' 'python' @@ -27,6 +27,8 @@ source=("git+https://github.com/EdgeTX/edgetx.git#tag=v$pkgver" "git+https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports.git" "git+https://github.com/EdgeTX/lvgl.git" "git+https://github.com/nothings/stb.git" + "git+https://github.com/microsoft/uf2" + "git+https://github.com/signal11/hidapi" install.patch) b2sums=('df729e121cb29e2bc0976a57b8071172a978aef0f0b44d2d4a58967fccf920a076ae03b6a552a777e3a8e3c517d21148cb12445a60003c29cde334d7345ffce6' 'SKIP' @@ -55,19 +57,21 @@ prepare() { git config submodule.AccessDenied.url $srcdir/AccessDenied git config submodule.FreeRTOS-Kernel.url $srcdir/FreeRTOS-Kernel git config submodule.Segger_RTT.url $srcdir/Segger_RTT + git config submodule.lvgl.url $srcdir/lvgl + git config submodule.stb.url $srcdir/stb + git config submodule.uf2.url $srcdir/uf2 git submodule update --init cd "$_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/" git submodule init - git config submodule.FreeRTOS-Kernel-Community-Supported-Ports.url $srcdir/FreeRTOS-Kernel-Community-Supported-Ports - git config submodule.FreeRTOS-Kernel-Partner-Supported-Ports.url $srcdir/FreeRTOS-Kernel-Partner-Supported-Ports + git config submodule.FreeRTOS-Kernel-Community-Supported-Ports.url $srcdir/Community-Supported-Ports + git config submodule.FreeRTOS-Kernel-Partner-Supported-Ports.url $srcdir/Partner-Supported-Ports git submodule update --init - cd "$_pkgbase/radio/src/thirdparty/libopenui/thirdparty/" + cd "$_pkgbase/radio/src/thirdparty/uf2/" git submodule init - git config submodule.lvgl.url $srcdir/lvgl - git config submodule.stb.url $srcdir/stb - git submodule update --init + git config submodule.hidapi.url $srcdir/hidapi + git -c protocol.file.allow=always submodule update --init } build() { @@ -78,4 +82,5 @@ build() { package() { cd $srcdir/build/native make DESTDIR=$pkgdir/ install + install -Dm644 "$srcdir/edgetx/LICENSE" "$pkgdir/usr/share/licenses/edgetx-companion/LICENSE" } From 6f9d40e1cb0cc4c618941a81d23f842d810f3046 Mon Sep 17 00:00:00 2001 From: lod Date: Tue, 11 Mar 2025 16:25:55 +0100 Subject: [PATCH 2/3] move build script into PKGBUILD --- .SRCINFO | 6 +++--- PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 6789ab1..1d1898b 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -48,8 +48,9 @@ pkgbase = edgetx-companion source = git+https://github.com/nothings/stb.git source = git+https://github.com/microsoft/uf2 source = git+https://github.com/signal11/hidapi - source = install.patch - b2sums = df729e121cb29e2bc0976a57b8071172a978aef0f0b44d2d4a58967fccf920a076ae03b6a552a777e3a8e3c517d21148cb12445a60003c29cde334d7345ffce6 + b2sums = 024826402eaf156b36d300d162a0e90a70f82902901e3a78a669d0c6f63dc12b7cbebec089110d38b2965cfeb59759ccb5761fbcf4c1712483d03be50d5416c9 + b2sums = SKIP + b2sums = SKIP b2sums = SKIP b2sums = SKIP b2sums = SKIP @@ -57,6 +58,5 @@ pkgbase = edgetx-companion b2sums = SKIP b2sums = SKIP b2sums = SKIP - b2sums = 97badff74d64db444a780f48a3003e4a7232e7c0ab1ef43f9adbf20044c988f41dd455dc5aad548e5d3501ccc7a1ad9967a69bf43cbd2bb133eb6d00d50f210c pkgname = edgetx-companion diff --git a/PKGBUILD b/PKGBUILD index a2a3cf8..ec2ad93 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,4 @@ # Maintainer: lod -# Contributer: Ysblokje -# Contributer: Jeff Youdontneedtoknow -# Contributer: Arnaud pkgname=edgetx-companion pkgver=2.11.0 @@ -28,9 +25,8 @@ source=("git+https://github.com/EdgeTX/edgetx.git#tag=v$pkgver" "git+https://github.com/EdgeTX/lvgl.git" "git+https://github.com/nothings/stb.git" "git+https://github.com/microsoft/uf2" - "git+https://github.com/signal11/hidapi" - install.patch) -b2sums=('df729e121cb29e2bc0976a57b8071172a978aef0f0b44d2d4a58967fccf920a076ae03b6a552a777e3a8e3c517d21148cb12445a60003c29cde334d7345ffce6' + "git+https://github.com/signal11/hidapi") +b2sums=('024826402eaf156b36d300d162a0e90a70f82902901e3a78a669d0c6f63dc12b7cbebec089110d38b2965cfeb59759ccb5761fbcf4c1712483d03be50d5416c9' 'SKIP' 'SKIP' 'SKIP' @@ -38,20 +34,18 @@ b2sums=('df729e121cb29e2bc0976a57b8071172a978aef0f0b44d2d4a58967fccf920a076ae03b 'SKIP' 'SKIP' 'SKIP' - '97badff74d64db444a780f48a3003e4a7232e7c0ab1ef43f9adbf20044c988f41dd455dc5aad548e5d3501ccc7a1ad9967a69bf43cbd2bb133eb6d00d50f210c') + 'SKIP' + 'SKIP') prepare() { - export EDGETX_VERSION_TAG=$pkgver _pkgbase=$srcdir/${pkgname%%-*} cd $_pkgbase - - patch ./tools/build-companion.sh < $srcdir/install.patch - # Deactivate these functions; they bundle the libs for AppImage. + # Deactivate these statements; they bundle the libs for AppImage. for pattern in "LIBSSL1" "LIBUSB1" "DFU_UTIL"; do sed -i "s/if(${pattern}_FOUND)/if(false)/g" ./companion/src/CMakeLists.txt done - + cd "$_pkgbase/radio/src/thirdparty/" git submodule init git config submodule.AccessDenied.url $srcdir/AccessDenied @@ -76,11 +70,47 @@ prepare() { build() { cd $srcdir/edgetx - ./tools/build-companion.sh $MAKEFLAGS $srcdir/edgetx $srcdir/build + export EDGETX_VERSION_TAG=$pkgver + COMMON_OPTIONS="-DCMAKE_INSTALL_PREFIX=/usr -DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release" + source tools/build-common.sh # Provides get_target_build_options() for retrieving individual build options per simulated radio. + + rm -rf build + mkdir build + cd build + + declare -a simulator_plugins=(x9lite x9lites + x7 x7access + t8 t12 t12max tx12 tx12mk2 + zorro commando8 boxer pocket mt12 gx12 + tlite tpro tprov2 tpros bumblebee lr3pro t14 + x9d x9dp x9dp2019 x9e + xlite xlites + nv14 el18 pl18 pl18ev + x10 x10express x12s + t15 t16 t18 t20 t20v2 tx16s f16 v16) + + for plugin in "${simulator_plugins[@]}" + do + BUILD_OPTIONS="${COMMON_OPTIONS} " + + echo "Building ${plugin}" + + if !get_target_build_options "$plugin"; then + echo "Error: Failed to find a match for target '$plugin'" + exit 1 + fi + + rm -f CMakeCache.txt native/CMakeCache.txt + cmake ${BUILD_OPTIONS} "$srcdir/edgetx" + cmake --build . --target native-configure + cmake --build native --target libsimulator + done + + cmake ${BUILD_OPTIONS} "$srcdir/edgetx/build/native" } package() { - cd $srcdir/build/native + cd $srcdir/edgetx/build/native make DESTDIR=$pkgdir/ install install -Dm644 "$srcdir/edgetx/LICENSE" "$pkgdir/usr/share/licenses/edgetx-companion/LICENSE" } From 6f68ebd7382830efa4322775e586f796c5e3dbc5 Mon Sep 17 00:00:00 2001 From: lod Date: Wed, 12 Mar 2025 14:21:36 +0100 Subject: [PATCH 3/3] add missing space between ! and get_target_build_options and put all the path variables in quotes --- PKGBUILD | 30 +++++++++++++++--------------- install.patch | 38 -------------------------------------- 2 files changed, 15 insertions(+), 53 deletions(-) delete mode 100644 install.patch diff --git a/PKGBUILD b/PKGBUILD index ec2ad93..e1b671d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -38,8 +38,8 @@ b2sums=('024826402eaf156b36d300d162a0e90a70f82902901e3a78a669d0c6f63dc12b7cbebec 'SKIP') prepare() { - _pkgbase=$srcdir/${pkgname%%-*} - cd $_pkgbase + _pkgbase="$srcdir/${pkgname%%-*}" + cd "$_pkgbase" # Deactivate these statements; they bundle the libs for AppImage. for pattern in "LIBSSL1" "LIBUSB1" "DFU_UTIL"; do @@ -48,28 +48,28 @@ prepare() { cd "$_pkgbase/radio/src/thirdparty/" git submodule init - git config submodule.AccessDenied.url $srcdir/AccessDenied - git config submodule.FreeRTOS-Kernel.url $srcdir/FreeRTOS-Kernel - git config submodule.Segger_RTT.url $srcdir/Segger_RTT - git config submodule.lvgl.url $srcdir/lvgl - git config submodule.stb.url $srcdir/stb - git config submodule.uf2.url $srcdir/uf2 + git config submodule.AccessDenied.url "$srcdir/AccessDenied" + git config submodule.FreeRTOS-Kernel.url "$srcdir/FreeRTOS-Kernel" + git config submodule.Segger_RTT.url "$srcdir/Segger_RTT" + git config submodule.lvgl.url "$srcdir/lvgl" + git config submodule.stb.url "$srcdir/stb" + git config submodule.uf2.url "$srcdir/uf2" git submodule update --init cd "$_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/" git submodule init - git config submodule.FreeRTOS-Kernel-Community-Supported-Ports.url $srcdir/Community-Supported-Ports - git config submodule.FreeRTOS-Kernel-Partner-Supported-Ports.url $srcdir/Partner-Supported-Ports + git config submodule.FreeRTOS-Kernel-Community-Supported-Ports.url "$srcdir/Community-Supported-Ports" + git config submodule.FreeRTOS-Kernel-Partner-Supported-Ports.url "$srcdir/Partner-Supported-Ports" git submodule update --init cd "$_pkgbase/radio/src/thirdparty/uf2/" git submodule init - git config submodule.hidapi.url $srcdir/hidapi + git config submodule.hidapi.url "$srcdir/hidapi" git -c protocol.file.allow=always submodule update --init } build() { - cd $srcdir/edgetx + cd edgetx export EDGETX_VERSION_TAG=$pkgver COMMON_OPTIONS="-DCMAKE_INSTALL_PREFIX=/usr -DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release" source tools/build-common.sh # Provides get_target_build_options() for retrieving individual build options per simulated radio. @@ -95,7 +95,7 @@ build() { echo "Building ${plugin}" - if !get_target_build_options "$plugin"; then + if ! get_target_build_options "$plugin"; then echo "Error: Failed to find a match for target '$plugin'" exit 1 fi @@ -110,7 +110,7 @@ build() { } package() { - cd $srcdir/edgetx/build/native - make DESTDIR=$pkgdir/ install + cd edgetx/build/native + make DESTDIR="$pkgdir/" install install -Dm644 "$srcdir/edgetx/LICENSE" "$pkgdir/usr/share/licenses/edgetx-companion/LICENSE" } diff --git a/install.patch b/install.patch deleted file mode 100644 index e73f262..0000000 --- a/install.patch +++ /dev/null @@ -1,38 +0,0 @@ -@@ -30,7 +30,7 @@ - SRCDIR=$1 - OUTDIR=$2 - --COMMON_OPTIONS="-DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release" -+COMMON_OPTIONS="-DCMAKE_INSTALL_PREFIX=/usr -DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release" - if [ "$(uname)" = "Darwin" ]; then - COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'" - elif [ "$(uname)" != "Linux" ]; then # Assume Windows and MSYS2 -@@ -59,9 +59,9 @@ - fi - fi - --rm -rf build --mkdir build --cd build -+rm -rf ${OUTDIR} -+mkdir ${OUTDIR} -+cd ${OUTDIR} - - declare -a simulator_plugins=(x9lite x9lites - x7 x7-access -@@ -176,14 +176,4 @@ - cmake --build native -j"${JOBS}" --target libsimulator - done - --cmake --build . --target native-configure --if [ "$(uname)" = "Darwin" ]; then -- cmake --build native -j"${JOBS}" --target package -- cp native/*.dmg "${OUTDIR}" --elif [ "$(uname)" = "Linux" ]; then -- cmake --build native -j"${JOBS}" --target package -- cp native/*.AppImage "${OUTDIR}" --else -- cmake --build native --target installer -- cp native/companion/*.exe "${OUTDIR}" --fi -+cmake ${BUILD_OPTIONS} "${OUTDIR}/native"