Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-embedded/lpc21isp/, dev-embedded/lpc21isp/files/
Date: Wed, 24 Nov 2021 08:57:57
Message-Id: 1637744264.f8ed0435911386a99176204c60cf36ca94e51ecb.marecki@gentoo
1 commit: f8ed0435911386a99176204c60cf36ca94e51ecb
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 24 08:53:54 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 24 08:57:44 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8ed0435
7
8 dev-embedded/lpc21isp: use sed to patch the Makefile
9
10 DOS line endings, patch files and git do not always mix.
11
12 Closes: https://bugs.gentoo.org/827018
13 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
14
15 .../lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch | 11 -----------
16 dev-embedded/lpc21isp/lpc21isp-1.97.ebuild | 12 ++++++++----
17 2 files changed, 8 insertions(+), 15 deletions(-)
18
19 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
20 deleted file mode 100644
21 index 18e6d21fe19c..000000000000
22 --- a/dev-embedded/lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch
23 +++ /dev/null
24 @@ -1,11 +0,0 @@
25 ---- a/Makefile
26 -+++ b/Makefile
27 -@@ -1,7 +1,7 @@
28 - all: lpc21isp
29 -
30 - GLOBAL_DEP = adprog.h lpc21isp.h lpcprog.h lpcterm.h
31 --CC = gcc
32 -+CC ?= gcc
33 -
34 - ifneq ($(findstring(freebsd, $(OSTYPE))),)
35 - CFLAGS+=-D__FREEBSD__
36
37 diff --git a/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild b/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild
38 index 5c201608ac52..081ebfcad4fe 100644
39 --- a/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild
40 +++ b/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild
41 @@ -13,12 +13,16 @@ LICENSE="LGPL-3+"
42 SLOT="0"
43 KEYWORDS="~amd64 ~x86"
44
45 -PATCHES=(
46 - "${FILESDIR}"/${PN}-1.97-makefile-tc-vars.patch
47 -)
48 -
49 S="${WORKDIR}"/${MY_P}
50
51 +src_prepare() {
52 + default
53 +
54 + # Upstream makefile has got DOS line endings so using patches there is fragile,
55 + # see Bug #827018.
56 + sed -i -e 's#^\(CC \?\)=#\1?=#' Makefile || die
57 +}
58 +
59 src_install() {
60 dobin lpc21isp
61 }