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

wineditline: update to 2.208 #22237

Merged
merged 1 commit into from
Oct 20, 2024
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
58 changes: 0 additions & 58 deletions mingw-w64-wineditline/002-fix-exports.patch

This file was deleted.

2 changes: 1 addition & 1 deletion mingw-w64-wineditline/004-add-pkgconfig.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
67 changes: 35 additions & 32 deletions mingw-w64-wineditline/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
}