summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kenzelmann <daniel@pc-daniel-desktop.fritz.box>2019-08-11 10:47:17 +0200
committerJoonas Niilola <juippis@gentoo.org>2019-08-13 07:54:17 +0300
commit7ab8f5559849fa4eac973b582d03e2734cdd488f (patch)
tree5f46e5912c1e2485a03f9d08dd963d2094e00064 /dev-libs/pigpio/files
parentdev-libs/pigpio: fix libdir variable (diff)
downloadgentoo-7ab8f5559849fa4eac973b582d03e2734cdd488f.tar.gz
gentoo-7ab8f5559849fa4eac973b582d03e2734cdd488f.tar.bz2
gentoo-7ab8f5559849fa4eac973b582d03e2734cdd488f.zip
dev-libs/pigpio-70: new ebuild
New ebuild, now with .so versioning from upstream, new Makefile patch required Signed-off-by: Daniel Kenzelmann <gentoo@k8n.de> Closes: https://github.com/gentoo/gentoo/pull/12677 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/pigpio/files')
-rw-r--r--dev-libs/pigpio/files/pigpio-70-makefile.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/dev-libs/pigpio/files/pigpio-70-makefile.patch b/dev-libs/pigpio/files/pigpio-70-makefile.patch
new file mode 100644
index 000000000000..10df7e872c6c
--- /dev/null
+++ b/dev-libs/pigpio/files/pigpio-70-makefile.patch
@@ -0,0 +1,98 @@
+--- a/Makefile 2019-08-10 10:10:22.834043361 +0200
++++ b/Makefile 2019-08-10 10:43:15.797503591 +0200
+@@ -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)
+
+ SOVERSION = 1
+
+@@ -25,7 +28,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
+
+@@ -66,28 +69,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) *.so.$(SOVERSION)
+
+-ifeq ($(DESTDIR),)
+- PYINSTALLARGS =
+-else
+- PYINSTALLARGS = --root=$(DESTDIR)
+-endif
+-
+ 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)
+@@ -103,15 +99,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 $(PYINSTALLARGS); fi
+- if which python3; then python3 setup.py install $(PYINSTALLARGS); fi
++ $(PYTHON2) setup.py install
++ $(PYTHON3) setup.py install
+ install -m 0755 -d $(DESTDIR)$(mandir)/man1
+- install -m 0644 p*.1 $(DESTDIR)$(mandir)/man1
++ install -m 0644 *.1 $(DESTDIR)$(mandir)/man1
+ install -m 0755 -d $(DESTDIR)$(mandir)/man3
+- install -m 0644 p*.3 $(DESTDIR)$(mandir)/man3
+-ifeq ($(DESTDIR),)
+- ldconfig
+-endif
++ install -m 0644 *.3 $(DESTDIR)$(mandir)/man3
++ $(LDCONFIG)
+
+ uninstall:
+ rm -f $(DESTDIR)$(includedir)/pigpio.h
+@@ -136,19 +130,19 @@
+ endif
+
+ $(LIB1): $(OBJ1)
+- $(SHLIB) -pthread -Wl,-soname,$(LIB1).$(SOVERSION) -o $(LIB1).$(SOVERSION) $(OBJ1)
++ $(SHLIB) -o $(LIB1).$(SOVERSION) $(OBJ1)
+ ln -fs $(LIB1).$(SOVERSION) $(LIB1)
+ $(STRIPLIB) $(LIB1)
+ $(SIZE) $(LIB1)
+
+ $(LIB2): $(OBJ2)
+- $(SHLIB) -pthread -Wl,-soname,$(LIB2).$(SOVERSION) -o $(LIB2).$(SOVERSION) $(OBJ2)
++ $(SHLIB) -o $(LIB2).$(SOVERSION) $(OBJ2)
+ ln -fs $(LIB2).$(SOVERSION) $(LIB2)
+ $(STRIPLIB) $(LIB2)
+ $(SIZE) $(LIB2)
+
+ $(LIB3): $(OBJ3)
+- $(SHLIB) -pthread -Wl,-soname,$(LIB3).$(SOVERSION) -o $(LIB3).$(SOVERSION) $(OBJ3)
++ $(SHLIB) -o $(LIB3).$(SOVERSION) $(OBJ3)
+ ln -fs $(LIB3).$(SOVERSION) $(LIB3)
+ $(STRIPLIB) $(LIB3)
+ $(SIZE) $(LIB3)
+