Skip to content

Commit

Permalink
dev-embedded/powersoftplus-libftdi: port to EAPI 7
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/339701
Closes: https://bugs.gentoo.org/742203
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Oct 6, 2020
1 parent 328e8a1 commit 835ffbd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/libftdi/lib_table/Makefile b/libftdi/lib_table/Makefile
index cf4316b..dd393b8 100644
--- a/libftdi/lib_table/Makefile
+++ b/libftdi/lib_table/Makefile
@@ -1,15 +1,15 @@
# which compiler
-CC = gcc
+CC ?= gcc

VERSION = _RELEASE

LIBNAME = libd2xx_table.so

-CFLAGS = -DLINUX -D$(VERSION)
+CFLAGS += -DLINUX -D$(VERSION)

$(LIBNAME): ftdi_table.o

- $(CC) -Wall -shared -fPIC -o $(LIBNAME) ftdi_table.o
+ $(CC) -Wall -shared -fPIC ${LDFLAGS} -o $(LIBNAME) ftdi_table.o

ftdi_table.o: ftdi_table.c
$(CC) -I. $(CFLAGS) -c -fPIC ftdi_table.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=4
inherit multilib toolchain-funcs
EAPI=7

inherit autotools toolchain-funcs

MY_PN="${PN/-libftdi/}"
MY_P="${MY_PN}-${PV}"
Expand All @@ -13,23 +14,27 @@ TABFILEDIR="libftdi/lib_table"
DESCRIPTION="Library which includes a table of VIDs and PIDs of Ever UPS devices"
HOMEPAGE="http://www.ever.com.pl"
SRC_URI="http://www.ever.com.pl/pl/pliki/${MY_P}-x86.tar.gz"
S="${WORKDIR}/${MY_P}"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-0.1.8-LDFLAGS.patch"
)

S="${WORKDIR}/${MY_P}"
src_prepare() {
default
eautoreconf
}

src_compile() {
cd "${TABFILEDIR}"
cd "${TABFILEDIR}" || die

# Wipe out precompiled binary
emake clean
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
}

src_install() {
Expand Down

0 comments on commit 835ffbd

Please sign in to comment.