Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avrdude: update to 8.0 #23057

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions mingw-w64-avrdude/0001-Remove-static-flag.patch

This file was deleted.

13 changes: 13 additions & 0 deletions mingw-w64-avrdude/0001-shared-build-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git avrdude-8.0-orig/src/CMakeLists.txt avrdude-8.0/src/CMakeLists.txt
index e358e4b..d934363 100644
--- avrdude-8.0-orig/src/CMakeLists.txt
+++ avrdude-8.0/src/CMakeLists.txt
@@ -351,7 +351,7 @@ add_executable(avrdude

target_link_libraries(avrdude PUBLIC libavrdude)

-if(MINGW)
+if(FALSE)
target_link_options(avrdude PRIVATE -static)
endif()

67 changes: 36 additions & 31 deletions mingw-w64-avrdude/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,72 @@
_realname=avrdude
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=7.3
pkgver=8.0
pkgrel=1
pkgdesc='Software for programming Atmel AVR Microcontrollers (mingw-w64)'
pkgdesc='Download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://www.nongnu.org/avrdude/"
url="https://github.com/avrdudes/avrdude"
license=('spdx:GPL-2.0-or-later')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake")
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-libelf"
"${MINGW_PACKAGE_PREFIX}-ninja")
depends=("${MINGW_PACKAGE_PREFIX}-hidapi"
"${MINGW_PACKAGE_PREFIX}-libelf"
"${MINGW_PACKAGE_PREFIX}-libftdi"
"${MINGW_PACKAGE_PREFIX}-libserialport"
"${MINGW_PACKAGE_PREFIX}-libusb-compat"
"${MINGW_PACKAGE_PREFIX}-libusb"
"${MINGW_PACKAGE_PREFIX}-libusb-compat-git"
"${MINGW_PACKAGE_PREFIX}-ncurses"
"${MINGW_PACKAGE_PREFIX}-readline")
source=("https://github.com/avrdudes/avrdude/archive/refs/tags/v${pkgver}.zip"
'0001-Remove-static-flag.patch')
sha256sums=('1a0ad78f3aa0935cf411952d92357fc67a43a780c07a6a2d22b620ca0f60e7ab'
'917dd4e89863b3db42a00b1ebbbe14527a80eba7712baf9eb7cae230bea8a74a')
validpgpkeys=('EF497ABE47ED91B3FC3D7EA54D902FF7723BDEE9'
'5E84F980C3CAFD4BB5841070F48CA81B69A85873'
'56628323218C669FF578705C7E9EADC3030D34EB')
# "${MINGW_PACKAGE_PREFIX}-python"
# "${MINGW_PACKAGE_PREFIX}-swig"
# "${MINGW_PACKAGE_PREFIX}-termcap"
options=('strip')
source=("https://github.com/avrdudes/avrdude/releases/download/v${pkgver}/avrdude-${pkgver}.tar.gz"
"0001-shared-build-fix.patch")
sha256sums=('a689d70a826e2aa91538342c46c77be1987ba5feb9f7dab2606b8dae5d2a52d5'
'bcd9fd678c619d0792e6b9346609461a880ae659fd4b5439c465837275243158')
validpgpkeys=('EF497ABE47ED91B3FC3D7EA54D902FF7723BDEE9' # Brian Dean <[email protected]>
'5E84F980C3CAFD4BB5841070F48CA81B69A85873' # Joerg Wunsch <[email protected]>
'56628323218C669FF578705C7E9EADC3030D34EB' # Joerg Wunsch <[email protected]>
'8FBDC99556F7C22A77DC3E1145684AB70D286F63') # Stefan Rueger <[email protected]>

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
for _patch in "$@"; do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
# =========================================== #

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
cd "${_realname}-${pkgver}"

apply_patch_with_msg 0001-Remove-static-flag.patch
apply_patch_with_msg 0001-shared-build-fix.patch
}

build() {
declare -a _extra_config
declare -a extra_config
if check_option "debug" "n"; then
_extra_config+=("-DCMAKE_BUILD_TYPE=Release")
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi

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

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_C_FLAGS_INIT="-I${MINGW_PREFIX}/include/libusb-compat" \
-DUSE_STATIC_LIBS=OFF \
"${_extra_config[@]}" \
../${_realname}-${pkgver}
cmake -B "build-${MSYSTEM}" -S "${_realname}-${pkgver}" -G "Ninja" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_C_FLAGS_INIT="-I${MINGW_PREFIX}/include/libusb-compat" \
-DUSE_STATIC_LIBS=OFF \
"${extra_config[@]}"

${MINGW_PREFIX}/bin/cmake --build .
cmake --build "build-${MSYSTEM}"
}

package() {
cd "${srcdir}/build-${MSYSTEM}"
DESTDIR=${pkgdir} ${MINGW_PREFIX}/bin/cmake --install .
DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}"

install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}"
}
Loading