Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/pigpio/files/, dev-libs/pigpio/
Date: Tue, 13 Aug 2019 04:54:44
Message-Id: 1565672057.7ab8f5559849fa4eac973b582d03e2734cdd488f.juippis@gentoo
1 commit: 7ab8f5559849fa4eac973b582d03e2734cdd488f
2 Author: Daniel Kenzelmann <daniel <AT> pc-daniel-desktop <DOT> fritz <DOT> box>
3 AuthorDate: Sun Aug 11 08:47:17 2019 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 13 04:54:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ab8f555
7
8 dev-libs/pigpio-70: new ebuild
9
10 New ebuild, now with .so versioning from upstream, new Makefile patch required
11
12 Signed-off-by: Daniel Kenzelmann <gentoo <AT> k8n.de>
13 Closes: https://github.com/gentoo/gentoo/pull/12677
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 dev-libs/pigpio/Manifest | 1 +
17 dev-libs/pigpio/files/pigpio-70-makefile.patch | 98 ++++++++++++++++++++++++++
18 dev-libs/pigpio/pigpio-70.ebuild | 39 ++++++++++
19 3 files changed, 138 insertions(+)
20
21 diff --git a/dev-libs/pigpio/Manifest b/dev-libs/pigpio/Manifest
22 index 9928f29679a..0f01a744f39 100644
23 --- a/dev-libs/pigpio/Manifest
24 +++ b/dev-libs/pigpio/Manifest
25 @@ -1,2 +1,3 @@
26 DIST pigpio-67.tar.gz 369268 BLAKE2B a9d59369f5eed4b733e0e5c0e85013a132e55ff63a2393d79a3fb52d1fcb2513559d4dfeea84c4842d6281936b6e116bd81cd63e4542bbcffaf813ee356ee0d1 SHA512 9792f8402ee0dd204f4a975ab0513099a1fe3d398a28b766f412c08d7908e8e307de4cc92b2a2519b6484f15a043bd40008b7707486015c08bda5f97b1e7e00b
27 DIST pigpio-68.tar.gz 371251 BLAKE2B c0118854d18ce158a3d5c96380289cc8bc68f35f72ce28f207dfbb827f97f538acd82cec2af11590e59985b77ef08834d55b3ac7578e1f6b6d1a0b5d5d594632 SHA512 125364eab9dd33c39fda148c6018679ac91b099914d7f0c6362f61566a9c957065189ace03ad4668b29f25d4d542b81d42c0befe0712867b48977b755dc03edc
28 +DIST pigpio-70.tar.gz 374569 BLAKE2B a2caadf0e1307c8c3ce936d5fd4d31e18185aa53900f6b2cf8b92a31f423b9a82bf4d2b7212fa8cd5b2d26773598a138ef8331884410f3f418542f43ca1fe2d4 SHA512 00db37b9c0f9751e6179b19e7018583abd9e11d78d01ff9f99b713004cf4e6a224e93644206599378a34dd46fd75c08557021b706015b0bc2bd8b34e363691db
29
30 diff --git a/dev-libs/pigpio/files/pigpio-70-makefile.patch b/dev-libs/pigpio/files/pigpio-70-makefile.patch
31 new file mode 100644
32 index 00000000000..10df7e872c6
33 --- /dev/null
34 +++ b/dev-libs/pigpio/files/pigpio-70-makefile.patch
35 @@ -0,0 +1,98 @@
36 +--- a/Makefile 2019-08-10 10:10:22.834043361 +0200
37 ++++ b/Makefile 2019-08-10 10:43:15.797503591 +0200
38 +@@ -9,6 +9,9 @@
39 + STRIP = $(CROSS_PREFIX)strip
40 + SHLIB = $(CC) -shared
41 + STRIPLIB = $(STRIP) --strip-unneeded
42 ++LDCONFIG = ldconfig
43 ++PYTHON2 = $(shell type -P python2 || echo ':' 2> /dev/null)
44 ++PYTHON3 = $(shell type -P python3 || echo ':' 2> /dev/null)
45 +
46 + SOVERSION = 1
47 +
48 +@@ -25,7 +28,7 @@
49 +
50 + LIB = $(LIB1) $(LIB2) $(LIB3)
51 +
52 +-ALL = $(LIB) x_pigpio x_pigpiod_if x_pigpiod_if2 pig2vcd pigpiod pigs
53 ++ALL = $(LIB) pig2vcd pigpiod pigs
54 +
55 + LL1 = -L. -lpigpio -pthread -lrt
56 +
57 +@@ -66,28 +69,21 @@
58 + $(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL3)
59 +
60 + pigpiod: pigpiod.o $(LIB1)
61 +- $(CC) -o pigpiod pigpiod.o $(LL1)
62 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o pigpiod pigpiod.o $(LL1)
63 + $(STRIP) pigpiod
64 +
65 + pigs: pigs.o command.o
66 +- $(CC) -o pigs pigs.o command.o
67 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o pigs pigs.o command.o
68 + $(STRIP) pigs
69 +
70 + pig2vcd: pig2vcd.o
71 +- $(CC) -o pig2vcd pig2vcd.o
72 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o pig2vcd pig2vcd.o
73 + $(STRIP) pig2vcd
74 +
75 + clean:
76 + rm -f *.o *.i *.s *~ $(ALL) *.so.$(SOVERSION)
77 +
78 +-ifeq ($(DESTDIR),)
79 +- PYINSTALLARGS =
80 +-else
81 +- PYINSTALLARGS = --root=$(DESTDIR)
82 +-endif
83 +-
84 + install: $(ALL)
85 +- install -m 0755 -d $(DESTDIR)/opt/pigpio/cgi
86 + install -m 0755 -d $(DESTDIR)$(includedir)
87 + install -m 0644 pigpio.h $(DESTDIR)$(includedir)
88 + install -m 0644 pigpiod_if.h $(DESTDIR)$(includedir)
89 +@@ -103,15 +99,13 @@
90 + install -m 0755 pig2vcd $(DESTDIR)$(bindir)
91 + install -m 0755 pigpiod $(DESTDIR)$(bindir)
92 + install -m 0755 pigs $(DESTDIR)$(bindir)
93 +- if which python2; then python2 setup.py install $(PYINSTALLARGS); fi
94 +- if which python3; then python3 setup.py install $(PYINSTALLARGS); fi
95 ++ $(PYTHON2) setup.py install
96 ++ $(PYTHON3) setup.py install
97 + install -m 0755 -d $(DESTDIR)$(mandir)/man1
98 +- install -m 0644 p*.1 $(DESTDIR)$(mandir)/man1
99 ++ install -m 0644 *.1 $(DESTDIR)$(mandir)/man1
100 + install -m 0755 -d $(DESTDIR)$(mandir)/man3
101 +- install -m 0644 p*.3 $(DESTDIR)$(mandir)/man3
102 +-ifeq ($(DESTDIR),)
103 +- ldconfig
104 +-endif
105 ++ install -m 0644 *.3 $(DESTDIR)$(mandir)/man3
106 ++ $(LDCONFIG)
107 +
108 + uninstall:
109 + rm -f $(DESTDIR)$(includedir)/pigpio.h
110 +@@ -136,19 +130,19 @@
111 + endif
112 +
113 + $(LIB1): $(OBJ1)
114 +- $(SHLIB) -pthread -Wl,-soname,$(LIB1).$(SOVERSION) -o $(LIB1).$(SOVERSION) $(OBJ1)
115 ++ $(SHLIB) -o $(LIB1).$(SOVERSION) $(OBJ1)
116 + ln -fs $(LIB1).$(SOVERSION) $(LIB1)
117 + $(STRIPLIB) $(LIB1)
118 + $(SIZE) $(LIB1)
119 +
120 + $(LIB2): $(OBJ2)
121 +- $(SHLIB) -pthread -Wl,-soname,$(LIB2).$(SOVERSION) -o $(LIB2).$(SOVERSION) $(OBJ2)
122 ++ $(SHLIB) -o $(LIB2).$(SOVERSION) $(OBJ2)
123 + ln -fs $(LIB2).$(SOVERSION) $(LIB2)
124 + $(STRIPLIB) $(LIB2)
125 + $(SIZE) $(LIB2)
126 +
127 + $(LIB3): $(OBJ3)
128 +- $(SHLIB) -pthread -Wl,-soname,$(LIB3).$(SOVERSION) -o $(LIB3).$(SOVERSION) $(OBJ3)
129 ++ $(SHLIB) -o $(LIB3).$(SOVERSION) $(OBJ3)
130 + ln -fs $(LIB3).$(SOVERSION) $(LIB3)
131 + $(STRIPLIB) $(LIB3)
132 + $(SIZE) $(LIB3)
133 +
134
135 diff --git a/dev-libs/pigpio/pigpio-70.ebuild b/dev-libs/pigpio/pigpio-70.ebuild
136 new file mode 100644
137 index 00000000000..f4a86cfd1b1
138 --- /dev/null
139 +++ b/dev-libs/pigpio/pigpio-70.ebuild
140 @@ -0,0 +1,39 @@
141 +# Copyright 1999-2019 Gentoo Authors
142 +# Distributed under the terms of the GNU General Public License v2
143 +
144 +EAPI=7
145 +
146 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
147 +
148 +inherit distutils-r1 systemd toolchain-funcs
149 +
150 +DESCRIPTION="A library for the Raspberry which allows control of the GPIOs"
151 +HOMEPAGE="http://abyz.me.uk/rpi/pigpio/index.html"
152 +SRC_URI="https://github.com/joan2937/pigpio/archive/V${PV}.tar.gz -> ${P}.tar.gz"
153 +
154 +LICENSE="Unlicense"
155 +SLOT="0"
156 +KEYWORDS="~arm"
157 +IUSE="python"
158 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
159 +
160 +src_prepare() {
161 + eapply "${FILESDIR}/${PN}-70-makefile.patch"
162 + eapply_user
163 +}
164 +
165 +src_compile() {
166 + emake CC="$(tc-getCC)" STRIP=: STRIPLIB=: SIZE=:
167 + use python && distutils-r1_src_compile
168 +}
169 +
170 +src_install() {
171 + emake DESTDIR="${D}" LDCONFIG=: PYTHON2=: PYTHON3=: \
172 + libdir="${EPREFIX}/usr/$(get_libdir)" prefix="${EPREFIX}/usr" \
173 + mandir="${EPREFIX}/usr/share/man" install
174 + einstalldocs
175 + newinitd "${FILESDIR}"/pigpiod.initd pigpiod
176 + newconfd "${FILESDIR}"/pigpiod.confd pigpiod
177 + systemd_newunit "${FILESDIR}"/pigpiod.systemd pigpiod.service
178 + use python && distutils-r1_src_install
179 +}