summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kenzelmann <gentoo@k8n.de>2020-06-05 21:02:59 +0200
committerJoonas Niilola <juippis@gentoo.org>2020-06-25 11:07:42 +0300
commitd11d295f38c134e0cc7f75e1c1017dc759b2a2a0 (patch)
treef6683fe209c2ed42bef1e8739ab7906ef62ab4f7 /dev-libs/pigpio
parentmedia-gfx/gimp: update babl, gegl dependencies in 9999.ebuild (diff)
downloadgentoo-d11d295f38c134e0cc7f75e1c1017dc759b2a2a0.tar.gz
gentoo-d11d295f38c134e0cc7f75e1c1017dc759b2a2a0.tar.bz2
gentoo-d11d295f38c134e0cc7f75e1c1017dc759b2a2a0.zip
dev-libs/pigpio: fix SONAME and pre-stripped files, add LDFLAGS
Bring back SONAME/SOVERSION, fix lib links, disable stripping, respect LDFLAGS Closes: https://bugs.gentoo.org/727044 Closes: https://bugs.gentoo.org/727074 Closes: https://bugs.gentoo.org/723042 Signed-off-by: Daniel Kenzelmann <gentoo@k8n.de> Closes: https://github.com/gentoo/gentoo/pull/16080 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/pigpio')
-rw-r--r--dev-libs/pigpio/files/pigpio-70-makefile.patch68
1 files changed, 45 insertions, 23 deletions
diff --git a/dev-libs/pigpio/files/pigpio-70-makefile.patch b/dev-libs/pigpio/files/pigpio-70-makefile.patch
index 10df7e872c6c..1102fa5b6253 100644
--- a/dev-libs/pigpio/files/pigpio-70-makefile.patch
+++ b/dev-libs/pigpio/files/pigpio-70-makefile.patch
@@ -1,6 +1,6 @@
---- a/Makefile 2019-08-10 10:10:22.834043361 +0200
-+++ b/Makefile 2019-08-10 10:43:15.797503591 +0200
-@@ -9,6 +9,9 @@
+--- a/Makefile 2020-06-05 20:28:12.691759233 +0200
++++ b/Makefile 2020-06-05 21:23:46.334235268 +0200
+@@ -9,8 +9,12 @@
STRIP = $(CROSS_PREFIX)strip
SHLIB = $(CC) -shared
STRIPLIB = $(STRIP) --strip-unneeded
@@ -9,8 +9,11 @@
+PYTHON3 = $(shell type -P python3 || echo ':' 2> /dev/null)
SOVERSION = 1
++LIBVERSION = 1.0
-@@ -25,7 +28,7 @@
+ CFLAGS += -O3 -Wall -pthread
+
+@@ -25,7 +29,7 @@
LIB = $(LIB1) $(LIB2) $(LIB3)
@@ -19,23 +22,23 @@
LL1 = -L. -lpigpio -pthread -lrt
-@@ -66,28 +69,21 @@
+@@ -66,52 +70,43 @@
$(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL3)
pigpiod: pigpiod.o $(LIB1)
- $(CC) -o pigpiod pigpiod.o $(LL1)
+- $(STRIP) pigpiod
+ $(CC) $(CFLAGS) $(LDFLAGS) -o pigpiod pigpiod.o $(LL1)
- $(STRIP) pigpiod
pigs: pigs.o command.o
- $(CC) -o pigs pigs.o command.o
+- $(STRIP) pigs
+ $(CC) $(CFLAGS) $(LDFLAGS) -o pigs pigs.o command.o
- $(STRIP) pigs
pig2vcd: pig2vcd.o
- $(CC) -o pig2vcd pig2vcd.o
+- $(STRIP) pig2vcd
+ $(CC) $(CFLAGS) $(LDFLAGS) -o pig2vcd pig2vcd.o
- $(STRIP) pig2vcd
clean:
rm -f *.o *.i *.s *~ $(ALL) *.so.$(SOVERSION)
@@ -51,7 +54,24 @@
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 0644 pigpiod_if2.h $(DESTDIR)$(includedir)
+ install -m 0755 -d $(DESTDIR)$(libdir)
+- install -m 0755 libpigpio.so.$(SOVERSION) $(DESTDIR)$(libdir)
+- install -m 0755 libpigpiod_if.so.$(SOVERSION) $(DESTDIR)$(libdir)
+- install -m 0755 libpigpiod_if2.so.$(SOVERSION) $(DESTDIR)$(libdir)
+- cd $(DESTDIR)$(libdir) && ln -fs libpigpio.so.$(SOVERSION) libpigpio.so
+- cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if.so.$(SOVERSION) libpigpiod_if.so
+- cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if2.so.$(SOVERSION) libpigpiod_if2.so
++ install -m 0755 libpigpio.so.$(LIBVERSION) $(DESTDIR)$(libdir)
++ install -m 0755 libpigpiod_if.so.$(LIBVERSION) $(DESTDIR)$(libdir)
++ install -m 0755 libpigpiod_if2.so.$(LIBVERSION) $(DESTDIR)$(libdir)
++ cd $(DESTDIR)$(libdir) && ln -fs libpigpio.so.$(LIBVERSION) libpigpio.so
++ cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if.so.$(LIBVERSION) libpigpiod_if.so
++ cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if2.so.$(LIBVERSION) libpigpiod_if2.so
++ cd $(DESTDIR)$(libdir) && ln -fs libpigpio.so.$(LIBVERSION) libpigpio.so.$(SOVERSION)
++ cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if.so.$(LIBVERSION) libpigpiod_if.so.$(SOVERSION)
++ cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if2.so.$(LIBVERSION) libpigpiod_if2.so.$(SOVERSION)
+ install -m 0755 -d $(DESTDIR)$(bindir)
install -m 0755 pig2vcd $(DESTDIR)$(bindir)
install -m 0755 pigpiod $(DESTDIR)$(bindir)
install -m 0755 pigs $(DESTDIR)$(bindir)
@@ -72,27 +92,29 @@
uninstall:
rm -f $(DESTDIR)$(includedir)/pigpio.h
-@@ -136,19 +130,19 @@
+@@ -136,22 +131,13 @@
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)
+- ln -fs $(LIB1).$(SOVERSION) $(LIB1)
+- $(STRIPLIB) $(LIB1)
+- $(SIZE) $(LIB1)
++ $(SHLIB) $(LDFLAGS) -Wl,-soname,$(LIB1).$(SOVERSION) -o $(LIB1).$(LIBVERSION) $(OBJ1)
$(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)
+- ln -fs $(LIB2).$(SOVERSION) $(LIB2)
+- $(STRIPLIB) $(LIB2)
+- $(SIZE) $(LIB2)
++ $(SHLIB) $(LDFLAGS) -Wl,-soname,$(LIB2).$(SOVERSION) -o $(LIB2).$(LIBVERSION) $(OBJ2)
$(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)
-
+- ln -fs $(LIB3).$(SOVERSION) $(LIB3)
+- $(STRIPLIB) $(LIB3)
+- $(SIZE) $(LIB3)
++ $(SHLIB) $(LDFLAGS) -Wl,-soname,$(LIB2).$(SOVERSION) -o $(LIB3).$(LIBVERSION) $(OBJ3)
+
+ # generated using gcc -MM *.c
+