commit:     61cff161fa98ab1bbca7a7537099105ce510be2d
Author:     Virgil Dupras <hsoft <AT> hardcoded <DOT> net>
AuthorDate: Mon Feb 12 20:27:05 2018 +0000
Commit:     Amy Liffey <amynka <AT> gentoo <DOT> org>
CommitDate: Tue Mar  6 19:58:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61cff161

dev-embedded/arduino-listserialportsc: add package

Needed for bumping dev-embedded/arduino to 1.8.5.

Mostly snatched from maurerpe's fine work at
https://github.com/maurerpe/arduino-overlay/blob/master/dev-embedded/listserialportsc

Bug: https://bugs.gentoo.org/525882
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-embedded/arduino-listserialportsc/Manifest     |  1 +
 .../arduino-listserialportsc-1.4.0.ebuild          | 41 ++++++++++++++++++++++
 dev-embedded/arduino-listserialportsc/metadata.xml | 11 ++++++
 3 files changed, 53 insertions(+)

diff --git a/dev-embedded/arduino-listserialportsc/Manifest 
b/dev-embedded/arduino-listserialportsc/Manifest
new file mode 100644
index 00000000000..e143d2e9890
--- /dev/null
+++ b/dev-embedded/arduino-listserialportsc/Manifest
@@ -0,0 +1 @@
+DIST arduino-listserialportsc-1.4.0.tar.gz 5448 BLAKE2B 
a1b5256c9e9ece7ec4de8b1481b6e20769fe07fd94b73d099922074ff20d251896d992aba1e3680dc7e667ff2897fec05812a07273efe097cf5387a5f0207554
 SHA512 
0e8bbf1e49fa8705a6d3c28b44043f8d13589b7ebdac245db79ed3826bf56028778fdf721af3cf756cc8ea19e7a2f7e5f19421a105211cf0cd35041ec718c2bb

diff --git 
a/dev-embedded/arduino-listserialportsc/arduino-listserialportsc-1.4.0.ebuild 
b/dev-embedded/arduino-listserialportsc/arduino-listserialportsc-1.4.0.ebuild
new file mode 100644
index 00000000000..940f1123312
--- /dev/null
+++ 
b/dev-embedded/arduino-listserialportsc/arduino-listserialportsc-1.4.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-pkg-2 toolchain-funcs
+
+DESCRIPTION="Arduino helper library to list serial ports"
+HOMEPAGE="https://github.com/arduino/listSerialPortsC";
+SRC_URI="https://github.com/arduino/listSerialPortsC/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=dev-libs/libserialport-0.1.1"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/listSerialPortsC-${PV}"
+
+src_compile() {
+       CC=$(tc-getCC)
+       ${CC} -Wall -O2 ${CPPFLAGS} ${CFLAGS} -c -o main.o main.c
+       ${CC} ${CFLAGS} ${LDFLAGS} main.o -lserialport -o listSerialC
+
+       ${CC} \
+               -Wall -O2 ${CPPFLAGS} ${CFLAGS} -fPIC \
+               -I$(java-config-2 -o)/include \
+               -I$(java-config-2 -o)/include/linux \
+               -o jnilib.o -c jnilib.c
+
+       ${CC} \
+               ${CFLAGS} ${LDFLAGS} \
+               -shared -Wl,-soname,liblistSerialsj.so \
+               jnilib.o -lserialport -o liblistSerialsj.so.${PV}
+}
+
+src_install() {
+       dobin listSerialC
+       dolib liblistSerialsj.so.${PV}
+       dosym liblistSerialsj.so.${PV} /usr/$(get_libdir)/liblistSerialsj.so
+}

diff --git a/dev-embedded/arduino-listserialportsc/metadata.xml 
b/dev-embedded/arduino-listserialportsc/metadata.xml
new file mode 100644
index 00000000000..f94c4150ebc
--- /dev/null
+++ b/dev-embedded/arduino-listserialportsc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>embed...@gentoo.org</email>
+               <name>Embedded Gentoo</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">arduino/listSerialPortsC</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to