diff --git a/mingw-w64-wineditline/002-fix-exports.patch b/mingw-w64-wineditline/002-fix-exports.patch deleted file mode 100644 index 0bfd130fc5285..0000000000000 --- a/mingw-w64-wineditline/002-fix-exports.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- a/src/libedit.def 2014-10-02 11:58:12.906800000 +0400 -+++ b/src/libedit.def 2014-10-02 13:15:54.108600000 +0400 -@@ -1,29 +1,34 @@ --; WinEditLine library -+; -+; Definition file of edit.dll -+; Automatic generated by gendef -+; written by Kai Tietz 2008 -+; -+LIBRARY "edit.dll" - EXPORTS --source_editrc --readline --rl_free --rl_completion_matches --rl_filename_completion_function --rl_attempted_completion_function --rl_user_completion_entry_free_function --rl_attempted_completion_over --rl_line_buffer --rl_point --using_history --free_history --free_history_entry --clear_history - add_history --remove_history --replace_history_entry --history_list --where_history --history_length -+clear_history - current_history -+free_history -+free_history_entry - history_get -+history_length -+history_list - history_set_pos --previous_history - next_history -+previous_history - read_history -+readline -+remove_history -+replace_history_entry -+rl_attempted_completion_function DATA -+rl_attempted_completion_over DATA -+rl_completion_matches -+rl_filename_completion_function -+rl_free -+rl_line_buffer DATA -+rl_point DATA -+rl_user_completion_entry_free_function DATA -+source_editrc -+using_history -+where_history - write_history diff --git a/mingw-w64-wineditline/004-add-pkgconfig.patch b/mingw-w64-wineditline/004-add-pkgconfig.patch index cd5d6f47b7ae8..febc0384a973a 100644 --- a/mingw-w64-wineditline/004-add-pkgconfig.patch +++ b/mingw-w64-wineditline/004-add-pkgconfig.patch @@ -9,6 +9,6 @@ diff -uNr wineditline-2.205.orig/wineditline.pc wineditline-2.205/wineditline.pc + +Name: wineditline +Description: EditLine API implementation for the native Windows Console -+Version: 2.205 ++Version: ${version} +Cflags: -I${includedir}/editline +Libs: -L${libdir} -ledit diff --git a/mingw-w64-wineditline/PKGBUILD b/mingw-w64-wineditline/PKGBUILD index 681c33a71fc52..23f939e93c2d6 100644 --- a/mingw-w64-wineditline/PKGBUILD +++ b/mingw-w64-wineditline/PKGBUILD @@ -3,62 +3,65 @@ _realname=wineditline pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.206 +pkgver=2.208 pkgrel=1 -pkgdesc="port of the NetBSD Editline library (mingw-w64)" +pkgdesc="An EditLine API implementation for the native Windows Console (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') msys2_references=( 'aur: mingw-w64-wineditline' ) -license=('BSD') +msys2_repository_url='https://github.com/ptosco/wineditline/' +license=('spdx:BSD-3-Clause') url="https://mingweditline.sourceforge.io/" -makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" "dos2unix") -options=('staticlibs') -source=("https://sourceforge.net/projects/mingweditline/files/${_realname}-${pkgver}.tar.bz2" +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-ninja") +source=("https://github.com/ptosco/wineditline/archive/refs/tags/${_realname}-${pkgver}.tar.gz" '001-fix-installing.patch' - '002-fix-exports.patch' '003-dont-link-with-def.patch' '004-add-pkgconfig.patch') -sha256sums=('3733f51443dbde3a6bbe7d0c6c763e6de4c605c95f04bd569ee3f4473cb21b71' +sha256sums=('2df14abed2fadebf6e20bc0853b8b9b01f736ea3a5402420e0192029c6a23d80' '821d0a36115832a76497dc6d7ea4b6e45e4ce73621030a59865f851309f8db34' - '38e779fbdebf2f29038b598920e733a4a51638834013c3cc73fb85a7d50cffd2' '19077726758de7780cd68f3f47d8353516fd864ede1903d55280a1fb3dbe408d' - '0350d2d027ae665fb39bbdf847da3c9e0bbd5f55ee0f90b377b1891e933dd28c') + '7586c2bfeed3f4ff0998c2958b2613671fbca731768d2d2ac39f91ca28bfca2a') + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying ${_patch}" + patch -p1 -i "${srcdir}/${_patch}" + done +} prepare() { - cd ${srcdir}/${_realname}-${pkgver} - - # Get rid of crlf endings - find . -type f -exec dos2unix {} \; + cd ${_realname}-${_realname}-${pkgver} - patch -Np1 -i ${srcdir}/001-fix-installing.patch - patch -Np1 -i ${srcdir}/002-fix-exports.patch - patch -Np1 -i ${srcdir}/003-dont-link-with-def.patch - patch -Np1 -i ${srcdir}/004-add-pkgconfig.patch - - rm -rf bin32 bin64 lib32 lib64 + apply_patch_with_msg \ + 001-fix-installing.patch \ + 003-dont-link-with-def.patch \ + 004-add-pkgconfig.patch } build() { - mkdir -p build-${MINGW_CHOST} - cd build-${MINGW_CHOST} - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ + cmake \ + -GNinja \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - ../${_realname}-${pkgver} + -S ${_realname}-${_realname}-${pkgver} \ + -B build-${MSYSTEM} - make + cmake --build build-${MSYSTEM} } package() { - cd ${srcdir}/build-${MINGW_CHOST} - make DESTDIR=${pkgdir} install + DESTDIR=${pkgdir} cmake --install build-${MSYSTEM} + + # Rename the static library + mv ${pkgdir}${MINGW_PREFIX}/lib/libedit_static.a ${pkgdir}${MINGW_PREFIX}/lib/libedit.a - install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + sed -i ${_realname}-${_realname}-${pkgver}/${_realname}.pc -e "s,^prefix=\${prefix},prefix=${MINGW_PREFIX}," -e "s,Version: \${version},Version: ${pkgver}," + install -Dm644 ${_realname}-${_realname}-${pkgver}/${_realname}.pc ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/${_realname}.pc - sed -i ${srcdir}/${_realname}-${pkgver}/${_realname}.pc -e "s,prefix=\${prefix},prefix=${MINGW_PREFIX}," - install -Dm644 ${srcdir}/${_realname}-${pkgver}/${_realname}.pc ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/${_realname}.pc + install -Dm644 ${_realname}-${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE }