From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1011915-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CC42A1382C5 for <garchives@archives.gentoo.org>; Fri, 23 Mar 2018 22:11:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3AE8E0954; Fri, 23 Mar 2018 22:11:39 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B971BE0954 for <gentoo-commits@lists.gentoo.org>; Fri, 23 Mar 2018 22:11:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 74A4D335C07 for <gentoo-commits@lists.gentoo.org>; Fri, 23 Mar 2018 22:11:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E3106239 for <gentoo-commits@lists.gentoo.org>; Fri, 23 Mar 2018 22:11:36 +0000 (UTC) From: "Michał Górny" <mgorny@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org> Message-ID: <1521843004.cd447c2a8620458f170d749eaebc5f02f05c2fbc.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/pigpio/files/, dev-libs/pigpio/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/pigpio/Manifest dev-libs/pigpio/files/pigpio-67-makefile.patch dev-libs/pigpio/files/pigpiod.confd dev-libs/pigpio/files/pigpiod.initd dev-libs/pigpio/files/pigpiod.systemd dev-libs/pigpio/metadata.xml dev-libs/pigpio/pigpio-67.ebuild X-VCS-Directories: dev-libs/pigpio/ dev-libs/pigpio/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: cd447c2a8620458f170d749eaebc5f02f05c2fbc X-VCS-Branch: master Date: Fri, 23 Mar 2018 22:11:36 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7da4dc73-3f8d-4df8-b3e3-8ffd7b93275e X-Archives-Hash: fe01cf4bb098082d464b16a5bea78e8b commit: cd447c2a8620458f170d749eaebc5f02f05c2fbc Author: Daniel Kenzelmann <gentoo <AT> k8n <DOT> de> AuthorDate: Sat Mar 17 13:00:48 2018 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Fri Mar 23 22:10:04 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd447c2a dev-libs/pigpio: initial pull request (v67) This is a new ebuild for the pigpio library ( http://abyz.me.uk/rpi/pigpio/ ) Supports systemd and openrc start files and also optional python support currently needed Makefile patches will be reported/requested upstream Closes: https://bugs.gentoo.org/646570 Closes: https://github.com/gentoo/gentoo/pull/7484 dev-libs/pigpio/Manifest | 1 + dev-libs/pigpio/files/pigpio-67-makefile.patch | 64 ++++++++++++++++++++++++++ dev-libs/pigpio/files/pigpiod.confd | 4 ++ dev-libs/pigpio/files/pigpiod.initd | 7 +++ dev-libs/pigpio/files/pigpiod.systemd | 9 ++++ dev-libs/pigpio/metadata.xml | 12 +++++ dev-libs/pigpio/pigpio-67.ebuild | 40 ++++++++++++++++ 7 files changed, 137 insertions(+) diff --git a/dev-libs/pigpio/Manifest b/dev-libs/pigpio/Manifest new file mode 100644 index 00000000000..ed15ca2500f --- /dev/null +++ b/dev-libs/pigpio/Manifest @@ -0,0 +1 @@ +DIST pigpio-67.tar.gz 369268 BLAKE2B a9d59369f5eed4b733e0e5c0e85013a132e55ff63a2393d79a3fb52d1fcb2513559d4dfeea84c4842d6281936b6e116bd81cd63e4542bbcffaf813ee356ee0d1 SHA512 9792f8402ee0dd204f4a975ab0513099a1fe3d398a28b766f412c08d7908e8e307de4cc92b2a2519b6484f15a043bd40008b7707486015c08bda5f97b1e7e00b diff --git a/dev-libs/pigpio/files/pigpio-67-makefile.patch b/dev-libs/pigpio/files/pigpio-67-makefile.patch new file mode 100644 index 00000000000..1df4475eb0a --- /dev/null +++ b/dev-libs/pigpio/files/pigpio-67-makefile.patch @@ -0,0 +1,64 @@ +--- a/Makefile 2018-03-21 19:51:11.711880972 +0100 ++++ b/Makefile 2018-03-21 20:51:46.341684595 +0100 +@@ -9,6 +9,9 @@ + STRIP = $(CROSS_PREFIX)strip + SHLIB = $(CC) -shared + STRIPLIB = $(STRIP) --strip-unneeded ++LDCONFIG = ldconfig ++PYTHON2 = $(shell type -P python2 || echo ':' 2> /dev/null) ++PYTHON3 = $(shell type -P python3 || echo ':' 2> /dev/null) + + CFLAGS += -O3 -Wall -pthread + +@@ -23,7 +26,7 @@ + + LIB = $(LIB1) $(LIB2) $(LIB3) + +-ALL = $(LIB) x_pigpio x_pigpiod_if x_pigpiod_if2 pig2vcd pigpiod pigs ++ALL = $(LIB) pig2vcd pigpiod pigs + + LL1 = -L. -lpigpio -pthread -lrt + +@@ -64,22 +67,21 @@ + $(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL3) + + pigpiod: pigpiod.o $(LIB1) +- $(CC) -o pigpiod pigpiod.o $(LL1) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o pigpiod pigpiod.o $(LL1) + $(STRIP) pigpiod + + pigs: pigs.o command.o +- $(CC) -o pigs pigs.o command.o ++ $(CC) $(CFLAGS) $(LDFLAGS) -o pigs pigs.o command.o + $(STRIP) pigs + + pig2vcd: pig2vcd.o +- $(CC) -o pig2vcd pig2vcd.o ++ $(CC) $(CFLAGS) $(LDFLAGS) -o pig2vcd pig2vcd.o + $(STRIP) pig2vcd + + clean: + rm -f *.o *.i *.s *~ $(ALL) + + install: $(ALL) +- install -m 0755 -d $(DESTDIR)/opt/pigpio/cgi + install -m 0755 -d $(DESTDIR)$(includedir) + install -m 0644 pigpio.h $(DESTDIR)$(includedir) + install -m 0644 pigpiod_if.h $(DESTDIR)$(includedir) +@@ -92,13 +94,13 @@ + install -m 0755 pig2vcd $(DESTDIR)$(bindir) + install -m 0755 pigpiod $(DESTDIR)$(bindir) + install -m 0755 pigs $(DESTDIR)$(bindir) +- if which python2; then python2 setup.py install; fi +- if which python3; then python3 setup.py install; fi ++ $(PYTHON2) setup.py install ++ $(PYTHON3) setup.py install + install -m 0755 -d $(DESTDIR)$(mandir)/man1 + install -m 0644 *.1 $(DESTDIR)$(mandir)/man1 + install -m 0755 -d $(DESTDIR)$(mandir)/man3 + install -m 0644 *.3 $(DESTDIR)$(mandir)/man3 +- ldconfig ++ $(LDCONFIG) + + uninstall: + rm -f $(DESTDIR)$(includedir)/pigpio.h diff --git a/dev-libs/pigpio/files/pigpiod.confd b/dev-libs/pigpio/files/pigpiod.confd new file mode 100644 index 00000000000..dbcf8a4c3ef --- /dev/null +++ b/dev-libs/pigpio/files/pigpiod.confd @@ -0,0 +1,4 @@ +# Only listen on local interface by default +# use evironment variables PIGPIO_PORT="8888" and PIGPIO_ADDR="::1" for pigs with local interface +# PIGPIOD_OPTS="-l -p 8888" +PIGPIOD_OPTS="-l" diff --git a/dev-libs/pigpio/files/pigpiod.initd b/dev-libs/pigpio/files/pigpiod.initd new file mode 100644 index 00000000000..2b3f339dbdc --- /dev/null +++ b/dev-libs/pigpio/files/pigpiod.initd @@ -0,0 +1,7 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/var/run/pigpio.pid" +command="/usr/bin/pigpiod" +command_args="${PIGPIOD_OPTS}" diff --git a/dev-libs/pigpio/files/pigpiod.systemd b/dev-libs/pigpio/files/pigpiod.systemd new file mode 100644 index 00000000000..b1d28a66f82 --- /dev/null +++ b/dev-libs/pigpio/files/pigpiod.systemd @@ -0,0 +1,9 @@ +[Unit] +Description=Pigpio daemon + +[Service] +Type=simple +ExecStart=/usr/bin/pigpiod + +[Install] +WantedBy=multi-user.target diff --git a/dev-libs/pigpio/metadata.xml b/dev-libs/pigpio/metadata.xml new file mode 100644 index 00000000000..9344dda7b30 --- /dev/null +++ b/dev-libs/pigpio/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@k8n.de</email> + <name>Daniel Kenzelmann</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Gentoo Proxy Maintainers Project</name> + </maintainer> +</pkgmetadata> diff --git a/dev-libs/pigpio/pigpio-67.ebuild b/dev-libs/pigpio/pigpio-67.ebuild new file mode 100644 index 00000000000..1975d0a2cf3 --- /dev/null +++ b/dev-libs/pigpio/pigpio-67.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) + +inherit distutils-r1 systemd toolchain-funcs + +DESCRIPTION="A library for the Raspberry which allows control of the GPIOs" +HOMEPAGE="http://abyz.me.uk/rpi/pigpio/index.html" +SRC_URI="https://github.com/joan2937/pigpio/archive/V${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Unlicense" +SLOT="0" +KEYWORDS="~arm" +IUSE="python" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_prepare() { + eapply "${FILESDIR}/${P}-makefile.patch" + eapply_user +} + +src_compile() { + emake CC="$(tc-getCC)" STRIP=: STRIPLIB=: SIZE=: + use python && distutils-r1_src_compile +} + +src_install() { + emake DESTDIR="${D}" LDCONFIG=: PYTHON2=: PYTHON3=: libdir="$(get_libdir)" prefix="/usr" mandir="/usr/share/man" install + einstalldocs + newinitd "${FILESDIR}"/pigpiod.initd pigpiod + newconfd "${FILESDIR}"/pigpiod.confd pigpiod + systemd_newunit "${FILESDIR}"/pigpiod.systemd pigpiod.service + use python && distutils-r1_src_install +}