commit: df7ff293df717e3ac3ea7cfe97af4e9b623d0f52 Author: Michael Weber <michael <AT> xmw <DOT> de> AuthorDate: Wed Feb 10 23:07:09 2016 +0000 Commit: Michael Weber <xmw <AT> gentoo <DOT> org> CommitDate: Wed Feb 10 23:07:09 2016 +0000 URL: https://gitweb.gentoo.org/dev/xmw.git/commit/?id=df7ff293
dev-libs/pigpio: Initial import Package-Manager: portage-2.2.26 Manifest-Sign-Key: 0x71D573A82F434065 dev-libs/pigpio/Manifest | 21 +++++++ dev-libs/pigpio/files/pigpio-44-MakeRemote.patch | 29 ++++++++++ dev-libs/pigpio/files/pigpio-44-Makefile.patch | 42 ++++++++++++++ .../pigpio/files/pigpio-44-format-security.patch | 20 +++++++ dev-libs/pigpio/metadata.xml | 11 ++++ dev-libs/pigpio/pigpio-44.ebuild | 66 +++++++++++++++++++++ dev-libs/pigpio/pigpio-9999.ebuild | 67 ++++++++++++++++++++++ 7 files changed, 256 insertions(+) diff --git a/dev-libs/pigpio/Manifest b/dev-libs/pigpio/Manifest new file mode 100644 index 0000000..1521c4d --- /dev/null +++ b/dev-libs/pigpio/Manifest @@ -0,0 +1,21 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST pigpio-44.tar.gz 309316 SHA256 1cd416e676cf284c0057ae9e87e2accc69f6882c5c3a8bb3e13b4ba81363825f SHA512 9c34018fac938b24ba7645a73e17368a94751ed338a275b55e8411a2631c07ff641f87706a53d75522430c2a44e50c1d102b870e269b69eec8e2e5e75ba09917 WHIRLPOOL a648877e3364cdf6eefb15d839485326991c37be02f9ee590c43491a24fdd42a5cef0a8365af8e85c4fcea447d0fb72c61664428f1f8c035cf02b697d0103877 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAEBCAAGBQJWu8KYAAoJEHHVc6gvQ0BlDGYP/0RxUwfv17bzU/hyIJmGnv/S +gxCATX5+ZsJ+l5vQGRspaERjHfNZ+CcEn43D529m6kHYd3+KtqPB6lQXSpKUrvpV +8MJ/u16T3aEjl7Y9OkpFj3RMUtCbIV9f4P0jMCscrxiwcxvU0Dqy/ARH34zItv76 +q+0inyaqyO9YAnLpIU28E+KpzqsqJn7t5iNlmAailcDG0r833sOAiuUEMGox4EsW +VJ1sKjoKz/RrYwzkSKuqvVCBorfUdGNlyRxWbSEsLB0MbBmmZzfhfHxExxUa1kRU +qNXIFdiBOi4PWw2rU0KNR0OtjNLBjSCaNwIoiVOROxh5wrKb7mWr8/invxh1GnVn +9Ov2HV28aCHJIcJaZfPVNWOm7uy9rNx8d+i88t12ab9nhQEvQ+PcZD+vtA4E8ZDt +mfZaYBEdrmFd3qwDiKJ01e3BGmpx0wY3t9vAGEAp9pO+ujmdGmKCHqmED0koQvPV +fbHQTZIkT0v1YgiRR9ZyLk2Fqpus+jHDAVCUqPvkx6yy6fseBxLkoZtMA93E864F +lP+UjCGGQdLWyack8H3ozbGTZa+GMl8bmzhUBh4aab8ZP8CS0PdLJveqdGDHOOMW +SXC/VPZ68rnL0AltcwE3FcrwXxEi0n0fdyjXy8OlEQCLAuCWmh/frW2neBYgmSK6 +XfICLeVq+ACjK4PkoNa4 +=SmCq +-----END PGP SIGNATURE----- diff --git a/dev-libs/pigpio/files/pigpio-44-MakeRemote.patch b/dev-libs/pigpio/files/pigpio-44-MakeRemote.patch new file mode 100644 index 0000000..b019045 --- /dev/null +++ b/dev-libs/pigpio/files/pigpio-44-MakeRemote.patch @@ -0,0 +1,29 @@ +--- pigpio-9999/MakeRemote ++++ pigpio-9999/MakeRemote +@@ -1,8 +1,4 @@ + # +-CC = gcc +-SIZE = size +-SHLIB = gcc -shared +-STRIPLIB = strip --strip-unneeded + + CFLAGS += -O3 -Wall -pthread + +@@ -9,7 +9,7 @@ + bindir = $(exec_prefix)/bin + includedir = $(prefix)/include + libdir = $(prefix)/lib +-mandir = $(prefix)/man ++mandir = $(prefix)/share/man + + all: $(ALL) pigpio.py setup.py + +@@ -48,8 +44,6 @@ + install -m 0644 libpigpiod_if2.so $(DESTDIR)$(libdir) + install -m 0755 -d $(DESTDIR)$(bindir) + install -m 0755 pigs $(DESTDIR)$(bindir) +- 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 diff --git a/dev-libs/pigpio/files/pigpio-44-Makefile.patch b/dev-libs/pigpio/files/pigpio-44-Makefile.patch new file mode 100644 index 0000000..2bc2949 --- /dev/null +++ b/dev-libs/pigpio/files/pigpio-44-Makefile.patch @@ -0,0 +1,42 @@ +--- pigpio-44/Makefile ++++ pigpio-44/Makefile +@@ -1,10 +1,4 @@ + # +-CC = gcc +-AR = ar +-RANLIB = ranlib +-SIZE = size +-SHLIB = gcc -shared +-STRIPLIB = strip --strip-unneeded + + CFLAGS += -O3 -Wall -pthread + +@@ -32,7 +26,7 @@ + bindir = $(exec_prefix)/bin + includedir = $(prefix)/include + libdir = $(prefix)/lib +-mandir = $(prefix)/man ++mandir = $(prefix)/share/man + + all: $(ALL) + +@@ -80,16 +74,13 @@ + install -m 0755 libpigpiod_if.so $(DESTDIR)$(libdir) + install -m 0755 libpigpiod_if2.so $(DESTDIR)$(libdir) + install -m 0755 -d $(DESTDIR)$(bindir) +- install -m 0755 -s pig2vcd $(DESTDIR)$(bindir) +- install -m 0755 -s pigpiod $(DESTDIR)$(bindir) +- install -m 0755 -s pigs $(DESTDIR)$(bindir) +- if which python2; then python2 setup.py install; fi +- if which python3; then python3 setup.py install; fi ++ install -m 0755 pig2vcd $(DESTDIR)$(bindir) ++ install -m 0755 pigpiod $(DESTDIR)$(bindir) ++ install -m 0755 pigs $(DESTDIR)$(bindir) + 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 + + uninstall: + rm -f $(DESTDIR)$(includedir)/pigpio.h diff --git a/dev-libs/pigpio/files/pigpio-44-format-security.patch b/dev-libs/pigpio/files/pigpio-44-format-security.patch new file mode 100644 index 0000000..ae5dab6 --- /dev/null +++ b/dev-libs/pigpio/files/pigpio-44-format-security.patch @@ -0,0 +1,20 @@ +--- pigpio-44/pigpio.c ++++ pigpio-44/pigpio.c +@@ -6269,7 +6269,7 @@ + tp->id, + (unsigned)tp->nextTick.tv_sec, + (unsigned)tp->nextTick.tv_nsec); +- fprintf(stderr, buf); ++ fprintf(stderr, "%s", buf); + } + } + +@@ -6360,7 +6360,7 @@ + break; + + case 5: +- fprintf(outFifo, cmdUsage); ++ fprintf(outFifo, "%s", cmdUsage); + break; + + case 6: diff --git a/dev-libs/pigpio/metadata.xml b/dev-libs/pigpio/metadata.xml new file mode 100644 index 0000000..0cfdb0c --- /dev/null +++ b/dev-libs/pigpio/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> +<email>[email protected]</email> +<name>Michael Weber</name> +</maintainer> +<use> + <flag name="remote">Only build remote access support</flag> +</use> +</pkgmetadata> diff --git a/dev-libs/pigpio/pigpio-44.ebuild b/dev-libs/pigpio/pigpio-44.ebuild new file mode 100644 index 0000000..4c3785b --- /dev/null +++ b/dev-libs/pigpio/pigpio-44.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_3 python3_4 ) +DISTUTILS_OPTIONAL=1 +inherit eutils toolchain-funcs distutils-r1 vcs-snapshot + +DESCRIPTION="C library for the Raspberry which allows control of the general purpose input outputs" +HOMEPAGE="http://abyz.co.uk/rpi/pigpio" +SRC_URI="https://github.com/joan2937/pigpio/tarball/ab3725839fc7cf589eb0cf67934643b21481d161 -> ${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="examples python remote" + +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +src_prepare() { + epatch "${FILESDIR}"/${P}-format-security.patch \ + "${FILESDIR}"/${P}-Makefile.patch \ + "${FILESDIR}"/${P}-MakeRemote.patch + + tc-export CC AR RANLIB + export SIZE="$(tc-getAR)" + export SIZE="${SIZE/-ar/-size}" + export SHLIB="$(tc-getCC) -shared" + export STRIPLIB="true" + + use python && distutils-r1_src_prepare +} + +src_configure() { + use python && distutils-r1_src_configure +} + +src_compile() { + if use remote ; then + emake -f MakeRemote libpigpiod_if.so + emake -f MakeRemote libpigpiod_if2.so + emake -f MakeRemote + else + emake + fi + + use python && distutils-r1_src_compile +} + +src_install() { + if use remote ; then + emake -f MakeRemote install prefix="${EROOT}"usr DESTDIR="${D}" + else + emake install prefix="${EROOT}"usr DESTDIR="${D}" + fi + + use python && distutils-r1_src_install + + if use examples ; then + dodoc -r EXAMPLES + fi +} diff --git a/dev-libs/pigpio/pigpio-9999.ebuild b/dev-libs/pigpio/pigpio-9999.ebuild new file mode 100644 index 0000000..7745fde --- /dev/null +++ b/dev-libs/pigpio/pigpio-9999.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_3 python3_4 ) +DISTUTILS_OPTIONAL=1 +#DISTUTILS_IN_SOURCE_BUILD=1 +inherit eutils git-r3 toolchain-funcs distutils-r1 + +DESCRIPTION="C library for the Raspberry which allows control of the general purpose input outputs" +HOMEPAGE="http://abyz.co.uk/rpi/pigpio" +EGIT_REPO_URI="https://github.com/joan2937/${PN}" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="" +IUSE="examples python remote" + +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-44-format-security.patch \ + "${FILESDIR}"/${PN}-44-Makefile.patch \ + "${FILESDIR}"/${PN}-44-MakeRemote.patch + + tc-export CC AR RANLIB + export SIZE="$(tc-getAR)" + export SIZE="${SIZE/-ar/-size}" + export SHLIB="$(tc-getCC) -shared" + export STRIPLIB="true" + + use python && distutils-r1_src_prepare +} + +src_configure() { + use python && distutils-r1_src_configure +} + +src_compile() { + if use remote ; then + emake -f MakeRemote libpigpiod_if.so + emake -f MakeRemote libpigpiod_if2.so + emake -f MakeRemote + else + emake + fi + + use python && distutils-r1_src_compile +} + +src_install() { + if use remote ; then + emake -f MakeRemote install prefix="${EROOT}"usr DESTDIR="${D}" + else + emake install prefix="${EROOT}"usr DESTDIR="${D}" + fi + + use python && distutils-r1_src_install + + if use examples ; then + dodoc -r EXAMPLES + fi +}
