From 550d0f1f5c4a3afa5e1bfaa1ac8a32f9079b3896 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Thu, 6 May 2021 08:36:13 +0200
Subject: [PATCH] main/vim: add workaround for bug in vim's LDFLAGS
 modification

Starting with abuild-3.8.0_rc1 vim no longer builds with the default
LDFLAGS value provided in /etc/abuild.conf. This is due to LDFLAGS
modifications performed by vim's build system.

See https://github.com/vim/vim/issues/8181

With this commit --as-needed is no longer the last linker option. Not
sure if this is relevant or not.
---
 main/vim/APKBUILD | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/main/vim/APKBUILD b/main/vim/APKBUILD
index 26ec91891073..fd28a7e9d46a 100644
--- a/main/vim/APKBUILD
+++ b/main/vim/APKBUILD
@@ -4,7 +4,7 @@
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=vim
 pkgver=8.2.2822
-pkgrel=2
+pkgrel=1
 pkgdesc="Improved vi-style text editor"
 url="https://www.vim.org/"
 arch="all"
@@ -49,7 +49,8 @@ build() {
 		--enable-gui=no \
 		--with-lua-prefix=/usr/lua5.3 \
 		--with-compiledby="Alpine Linux"
-	make
+	# workaround for https://github.com/vim/vim/issues/8181
+	make LDFLAGS="$LDFLAGS"
 	cd "$builddir"-gvim
 	./configure \
 		--build=$CBUILD \
@@ -62,8 +63,8 @@ build() {
 		--enable-multibyte \
 		--enable-gui=gtk3 \
 		--with-lua-prefix=/usr/lua5.3 \
-		--with-compiledby="Alpine Linux"
-	make
+	# workaround for https://github.com/vim/vim/issues/8181
+	make LDFLAGS="$LDFLAGS"
 }
 
 check() {
-- 
GitLab