From f8ed0435911386a99176204c60cf36ca94e51ecb Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Wed, 24 Nov 2021 09:53:54 +0100 Subject: dev-embedded/lpc21isp: use sed to patch the Makefile DOS line endings, patch files and git do not always mix. Closes: https://bugs.gentoo.org/827018 Signed-off-by: Marek Szuba --- .../lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch | 11 ----------- dev-embedded/lpc21isp/lpc21isp-1.97.ebuild | 12 ++++++++---- 2 files changed, 8 insertions(+), 15 deletions(-) delete mode 100644 dev-embedded/lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch (limited to 'dev-embedded') diff --git a/dev-embedded/lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch b/dev-embedded/lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch deleted file mode 100644 index 18e6d21fe19c..000000000000 --- a/dev-embedded/lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -1,7 +1,7 @@ - all: lpc21isp - - GLOBAL_DEP = adprog.h lpc21isp.h lpcprog.h lpcterm.h --CC = gcc -+CC ?= gcc - - ifneq ($(findstring(freebsd, $(OSTYPE))),) - CFLAGS+=-D__FREEBSD__ diff --git a/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild b/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild index 5c201608ac52..081ebfcad4fe 100644 --- a/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild +++ b/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild @@ -13,12 +13,16 @@ LICENSE="LGPL-3+" SLOT="0" KEYWORDS="~amd64 ~x86" -PATCHES=( - "${FILESDIR}"/${PN}-1.97-makefile-tc-vars.patch -) - S="${WORKDIR}"/${MY_P} +src_prepare() { + default + + # Upstream makefile has got DOS line endings so using patches there is fragile, + # see Bug #827018. + sed -i -e 's#^\(CC \?\)=#\1?=#' Makefile || die +} + src_install() { dobin lpc21isp } -- cgit v1.2.3-65-gdbad