Skip to content

Commit

Permalink
serial-studio: update to 3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Dec 20, 2024
1 parent 1b44ecd commit 9b772dc
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 24 deletions.
57 changes: 57 additions & 0 deletions mingw-w64-serial-studio/001-fix-build-and-package.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,7 +111,6 @@
-O3 # Optimize for speed
-Wall # Enable most warning messages
-Wextra # Enable additional warning messages
- -fuse-linker-plugin # Use LTO plugin
-ftree-vectorize # Enable loop vectorization
-fno-fast-math # Standard-compliant floating point math
-fno-unsafe-math-optimizations # Use safe math only
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -244,7 +244,7 @@
#-------------------------------------------------------------------------------

if(WIN32)
- target_link_libraries(${PROJECT_EXECUTABLE} PRIVATE Dwmapi.lib)
+ target_link_libraries(${PROJECT_EXECUTABLE} PRIVATE dwmapi)
set_target_properties(
${PROJECT_EXECUTABLE} PROPERTIES
WIN32_EXECUTABLE TRUE
@@ -289,6 +289,7 @@
set(deploy_tool_options_arg --no-compiler-runtime -force-openssl --release)
endif()

+if(DEPLOY_APP)
qt_generate_deploy_qml_app_script(
TARGET ${PROJECT_EXECUTABLE}
OUTPUT_SCRIPT deploy_script
@@ -299,6 +300,7 @@
)

install(SCRIPT ${deploy_script})
+endif()

#-------------------------------------------------------------------------------
# Packaging
--- a/lib/OpenSSL/CMakeLists.txt
+++ b/lib/OpenSSL/CMakeLists.txt
@@ -23,7 +23,7 @@
cmake_minimum_required(VERSION 3.20)

function(target_link_openssl TARGET BASE_DIR)
- if(WIN32)
+ if(MSVC)
target_include_directories(${TARGET} PRIVATE ${BASE_DIR}/include)
target_link_libraries(${TARGET} PRIVATE
ws2_32
@@ -40,7 +40,7 @@
${BASE_DIR}/dll/macOS/libssl.a
${BASE_DIR}/dll/macOS/libcrypto.a
)
-elseif(UNIX)
+elseif(UNIX OR MINGW)
find_package(PkgConfig REQUIRED)
pkg_check_modules(OPENSSL REQUIRED openssl)
target_link_libraries(${TARGET} PRIVATE ${OPENSSL_LIBRARIES})
65 changes: 41 additions & 24 deletions mingw-w64-serial-studio/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,70 @@
_realname=serial-studio
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.1.7
pkgver=3.0.6
pkgrel=1
pkgdesc="Multi-purpose serial data visualization & processing program (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
url="https://serial-studio.github.io/"
msys2_repository_url="https://github.com/Serial-Studio/Serial-Studio"
license=('spdx:MIT')
groups=("${MINGW_PACKAGE_PREFIX}-eda")
depends=("${MINGW_PACKAGE_PREFIX}-qt5-declarative"
"${MINGW_PACKAGE_PREFIX}-qt5-svg"
"${MINGW_PACKAGE_PREFIX}-qt5-connectivity"
"${MINGW_PACKAGE_PREFIX}-qt5-base"
"${MINGW_PACKAGE_PREFIX}-qt5-charts"
"${MINGW_PACKAGE_PREFIX}-qt5-serialport"
"${MINGW_PACKAGE_PREFIX}-qt5-quickcontrols2"
"${MINGW_PACKAGE_PREFIX}-qt5-graphicaleffects")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-qt6-base"
"${MINGW_PACKAGE_PREFIX}-qt6-connectivity"
"${MINGW_PACKAGE_PREFIX}-qt6-declarative"
"${MINGW_PACKAGE_PREFIX}-qt6-graphs"
"${MINGW_PACKAGE_PREFIX}-qt6-serialport")
makedepends=(
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-qt5-tools"
'git'
"${MINGW_PACKAGE_PREFIX}-qt6-location"
"${MINGW_PACKAGE_PREFIX}-qt6-positioning"
"${MINGW_PACKAGE_PREFIX}-qt6-svg"
"${MINGW_PACKAGE_PREFIX}-qt6-tools"
)

source=("${_realname}::git+https://github.com/${_realname}/${_realname}#commit=v${pkgver}")
sha256sums=('SKIP')
source=("https://github.com/${_realname}/${_realname}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
001-fix-build-and-package.patch)
sha256sums=('3141605fae37869f4375349bbfa0242ae66b3914ead31ea11866ab3fac2f20e4'
'c5dc4ca6f5539aea8a88a1788b36743f4a477479996028b342477f6eb4b57874')

prepare() {
cd "${srcdir}/${_realname}"
git submodule update --init --recursive
cd "${srcdir}/${_realname}-${pkgver}"

patch -p1 -i "${srcdir}"/001-fix-build-and-package.patch
}

build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"

MSYS2_ARG_CONV_EXCL="PREFIX=" \
qmake PREFIX="${MINGW_PREFIX}" ../${_realname} QMAKE_CXXFLAGS-=-Wa,-mbig-obj
declare -a _extra_config
if check_option "debug" "n"; then
_extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake -Wno-dev \
-G"Ninja" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DPRODUCTION_OPTIMIZATION=ON \
${_extra_config[@]} \
../${_realname}-${pkgver}

MSYS2_ARG_CONV_EXCL="--resource-file-mapping=" \
make
${MINGW_PREFIX}/bin/cmake --build .
}

check() {
${srcdir}/build-${MSYSTEM}/release/SerialStudio.exe --help
${srcdir}/build-${MSYSTEM}/release/Serial-Studio.exe --help
}

package() {
cd ${srcdir}/build-${MSYSTEM}
make INSTALL_ROOT="${pkgdir}" install
cd "${srcdir}/build-${MSYSTEM}"

DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .

install -Dm644 "${srcdir}"/${_realname}-${pkgver}/LICENSE.md \
"${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.md
}

0 comments on commit 9b772dc

Please sign in to comment.