diff --git a/dev-libs/libpifacedigital/Manifest b/dev-libs/libpifacedigital/Manifest new file mode 100644 index 0000000..aae837b --- /dev/null +++ b/dev-libs/libpifacedigital/Manifest @@ -0,0 +1,20 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST libpifacedigital-0.3.0.tar.gz 41079 BLAKE2B 1b49a45c0ac9039f99ce5998948d2208aeb7c3541a3cc4c69bcfc9be79c566d9b0802324125612b1ab715ad1e8a6c9b4dbda36e16e472542a4413d7d991b239e SHA512 11dfc16f8335bce7f47eecfd1dbb8b5f35f93acc686dfd146d7894c9e8393bff6447a8a35b35eea584b292ca39e5567a0b5d0def777e9ea98e806ec780342750 +-----BEGIN PGP SIGNATURE----- + +iQIzBAEBCAAdFiEEuys8HR2OLKbSzUtJHR6eQo71h0YFAlqnsxAACgkQHR6eQo71 +h0Yq4A//dqj9Ie7QoFN6WKKzb2ZupYutMeSdafxkmsCijnZKAtPdt+f+Ka8hBv4y +oSglKk3mkYmZ0Ju9YJCTLRh2XCY/dzDNltRCsIEfitt/Z13jw5wLTdP+wb00kS1j +0QUbEJXIEYArquE34ICEXi83fDdswWx7wi3UyRjJvibKXsgdYcJOj4m+mSyW4k+0 +5kpKyQgNChcNSjNe/rTpWNRaN+JTPHfcvJpHi2sHm1638mcVWjLoxnGO9Cb/qu6m +BFYP5byGuvhov0ZxG9vOnFQHr8OmT8vyIxspCzKk2oTQ5uK0lI/2mZiOGjpuhL3d +y5UjpteuJZdsi9bEL3Mv/sQJ44XHdyky+OtkVqOcbmfw8ychCmNXnzY/rsYg3dAb +i4FrKzkFPei7CJB0ooAGjUaPkxuOcIJNHGokSHjq/Vd/6i2Pnd/yMgaks0kruJ6v +7nNnW3D39Ar8DjzUwz6lLg4cdr2DvX/eAJxZH1yYNtNFJIoWZvBMfG6grnf2H1fH +Bj4Uo3dlvB0Vj7xGom55cavETOBw6DvS1d3nsVOTOKCIwXVeWRJVY+Q6+533yLOU +I2Gtx90uaux8VYpbNUJiECE38fDmO2FM3hMzS/RP/xvXpH0nYEY+lp30yZiRVx0V +wKdEyBzUAIr92VozjypXmapXtHiTuCradXiZEgHLmO+Ohsi5LR8= +=jDHN +-----END PGP SIGNATURE----- diff --git a/dev-libs/libpifacedigital/files/libpifacedigital-fix-build-system.patch b/dev-libs/libpifacedigital/files/libpifacedigital-fix-build-system.patch new file mode 100644 index 0000000..54e8c0b --- /dev/null +++ b/dev-libs/libpifacedigital/files/libpifacedigital-fix-build-system.patch @@ -0,0 +1,36 @@ +--- a/Makefile 2017-10-31 09:39:12.416812633 +0100 ++++ b/Makefile 2017-10-31 09:38:11.357482904 +0100 +@@ -1,11 +1,11 @@ + PROJECT=pifacedigital +-SOURCES=src/pifacedigital.c +-LIBRARY=static +-INCPATHS=../libmcp23s17/src/ +-LIBPATHS=../libmcp23s17/ +-LDFLAGS= +-CFLAGS=-c -Wall +-CC=gcc ++SOURCES = src/pifacedigital.c ++LIBRARY = shared ++INCPATHS = /usr/src/ ++LIBPATHS = /usr/lib/ ++LDFLAGS += ++CFLAGS += -Wall -lmcp23s17 ++CC ?= gcc + + # ------------ MAGIC BEGINS HERE ------------- + +@@ -31,11 +31,11 @@ + ifeq "$(LIBRARY)" "static" + ar rcs $(BINARY) $(OBJECTS) + else +- $(CC) $(LIBFLAGS) $(OBJECTS) $(LDFLAGS) -o $@ ++ $(CC) $(CFLAGS) $(LIBFLAGS) $(OBJECTS) $(LDFLAGS) -o $@ + endif + + .c.o: +- $(CC) $(INCFLAGS) $(CFLAGS) -fPIC $< -o $@ ++ $(CC) $(INCFLAGS) $(CFLAGS) $(LDFLAGS) $< -o $@ + + distclean: clean + rm -f $(BINARY) + diff --git a/dev-libs/libpifacedigital/libpifacedigital-0.3.0.ebuild b/dev-libs/libpifacedigital/libpifacedigital-0.3.0.ebuild new file mode 100644 index 0000000..bfb412e --- /dev/null +++ b/dev-libs/libpifacedigital/libpifacedigital-0.3.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit toolchain-funcs + +DESCRIPTION="C library for controlling (RaspberryPi) PiFace Digital" +HOMEPAGE="https://github.com/piface/libpifacedigital" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/piface/libpifacedigital.git" +else + SRC_URI="https://github.com/piface/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~arm" +fi + +LICENSE="GPL-3" +SLOT="0" +#IUSE="python java javascript lua" +IUSE="" + +DEPEND="dev-libs/libmcp23s17" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-fix-build-system.patch ) + +src_prepare(){ + # Holy supercow, they managed to drop the trailing newline :-/ + echo >> ${S}/Makefile + + default +} + +src_configure(){ + default + + tc-export CC +} + +src_install() { + dolib ${PN}.so + doheader src/pifacedigital.h + einstalldocs +} diff --git a/dev-libs/libpifacedigital/metadata.xml b/dev-libs/libpifacedigital/metadata.xml new file mode 100644 index 0000000..14d02b2 --- /dev/null +++ b/dev-libs/libpifacedigital/metadata.xml @@ -0,0 +1,8 @@ + + + + + holgersson@posteo.de + Nils Freydank + +