1 |
commit: 835ffbd54ca1bad9088c9f1960b7a5339937c5d6 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 6 20:05:49 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 6 20:05:56 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=835ffbd5 |
7 |
|
8 |
dev-embedded/powersoftplus-libftdi: port to EAPI 7 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/339701 |
11 |
Closes: https://bugs.gentoo.org/742203 |
12 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
.../powersoftplus-libftdi-0.1.8-LDFLAGS.patch | 23 ++++++++++++++++++++++ |
16 |
.../powersoftplus-libftdi-0.1.8-r1.ebuild | 23 +++++++++++++--------- |
17 |
2 files changed, 37 insertions(+), 9 deletions(-) |
18 |
|
19 |
diff --git a/dev-embedded/powersoftplus-libftdi/files/powersoftplus-libftdi-0.1.8-LDFLAGS.patch b/dev-embedded/powersoftplus-libftdi/files/powersoftplus-libftdi-0.1.8-LDFLAGS.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..642209ea0ea |
22 |
--- /dev/null |
23 |
+++ b/dev-embedded/powersoftplus-libftdi/files/powersoftplus-libftdi-0.1.8-LDFLAGS.patch |
24 |
@@ -0,0 +1,23 @@ |
25 |
+diff --git a/libftdi/lib_table/Makefile b/libftdi/lib_table/Makefile |
26 |
+index cf4316b..dd393b8 100644 |
27 |
+--- a/libftdi/lib_table/Makefile |
28 |
++++ b/libftdi/lib_table/Makefile |
29 |
+@@ -1,15 +1,15 @@ |
30 |
+ # which compiler |
31 |
+-CC = gcc |
32 |
++CC ?= gcc |
33 |
+ |
34 |
+ VERSION = _RELEASE |
35 |
+ |
36 |
+ LIBNAME = libd2xx_table.so |
37 |
+ |
38 |
+-CFLAGS = -DLINUX -D$(VERSION) |
39 |
++CFLAGS += -DLINUX -D$(VERSION) |
40 |
+ |
41 |
+ $(LIBNAME): ftdi_table.o |
42 |
+ |
43 |
+- $(CC) -Wall -shared -fPIC -o $(LIBNAME) ftdi_table.o |
44 |
++ $(CC) -Wall -shared -fPIC ${LDFLAGS} -o $(LIBNAME) ftdi_table.o |
45 |
+ |
46 |
+ ftdi_table.o: ftdi_table.c |
47 |
+ $(CC) -I. $(CFLAGS) -c -fPIC ftdi_table.c |
48 |
|
49 |
diff --git a/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild b/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild |
50 |
index 13da6435290..6a6b23ad072 100644 |
51 |
--- a/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild |
52 |
+++ b/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild |
53 |
@@ -1,8 +1,9 @@ |
54 |
-# Copyright 1999-2012 Gentoo Foundation |
55 |
+# Copyright 1999-2020 Gentoo Authors |
56 |
# Distributed under the terms of the GNU General Public License v2 |
57 |
|
58 |
-EAPI=4 |
59 |
-inherit multilib toolchain-funcs |
60 |
+EAPI=7 |
61 |
+ |
62 |
+inherit autotools toolchain-funcs |
63 |
|
64 |
MY_PN="${PN/-libftdi/}" |
65 |
MY_P="${MY_PN}-${PV}" |
66 |
@@ -13,23 +14,27 @@ TABFILEDIR="libftdi/lib_table" |
67 |
DESCRIPTION="Library which includes a table of VIDs and PIDs of Ever UPS devices" |
68 |
HOMEPAGE="http://www.ever.com.pl" |
69 |
SRC_URI="http://www.ever.com.pl/pl/pliki/${MY_P}-x86.tar.gz" |
70 |
+S="${WORKDIR}/${MY_P}" |
71 |
|
72 |
LICENSE="LGPL-2" |
73 |
SLOT="0" |
74 |
KEYWORDS="~x86" |
75 |
-IUSE="" |
76 |
|
77 |
-DEPEND="" |
78 |
-RDEPEND="${DEPEND}" |
79 |
+PATCHES=( |
80 |
+ "${FILESDIR}/${PN}-0.1.8-LDFLAGS.patch" |
81 |
+) |
82 |
|
83 |
-S="${WORKDIR}/${MY_P}" |
84 |
+src_prepare() { |
85 |
+ default |
86 |
+ eautoreconf |
87 |
+} |
88 |
|
89 |
src_compile() { |
90 |
- cd "${TABFILEDIR}" |
91 |
+ cd "${TABFILEDIR}" || die |
92 |
|
93 |
# Wipe out precompiled binary |
94 |
emake clean |
95 |
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
96 |
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" |
97 |
} |
98 |
|
99 |
src_install() { |