summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/wiringPi/Makefile17
-rw-r--r--package/wiringPi/patches/patch-devLib_Makefile16
-rw-r--r--package/wiringPi/patches/patch-gpio_Makefile31
-rw-r--r--package/wiringPi/patches/patch-gpio_gpio_c13
-rw-r--r--package/wiringPi/patches/patch-wiringPi_Makefile13
-rw-r--r--package/wiringPi/patches/patch-wiringPi_wiringPi_c10
6 files changed, 81 insertions, 19 deletions
diff --git a/package/wiringPi/Makefile b/package/wiringPi/Makefile
index 810b42dbd..8d7dd2db2 100644
--- a/package/wiringPi/Makefile
+++ b/package/wiringPi/Makefile
@@ -4,19 +4,21 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= wiringPi
-PKG_VERSION:= 0a9fdeb29d31609ef834f050bdb8a7a65cd35e2b
+PKG_VERSION:= 72b2af231be337d45a557ce6ca3ed1eeb6675ffd
PKG_RELEASE:= 1
PKG_DESCR:= gpio access library for the raspberry pi
PKG_SECTION:= libs/misc
PKG_HASH:= ddc71b86f71e7e5104a89f88a68bea20122b6ea9f8c535219d180bf89502a69d
+PKG_DEPENDS:= libpthread
PKG_URL:= http://wiringpi.com/
PKG_SITES:= git://git.drogon.net/wiringPi
+PKG_LIBNAME:= wiringpi
PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2
include $(ADK_TOPDIR)/mk/package.mk
-$(eval $(call PKG_template,WIRINGPI,wiringPi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,WIRINGPI,wiringpi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
CONFIG_STYLE:= manual
BUILD_STYLE:= manual
@@ -28,13 +30,18 @@ TARGET_CPPFLAGS+= -D_GNU_SOURCE
do-build:
(cd $(WRKBUILD); $(MAKE) -C wiringPi)
(cd $(WRKBUILD); $(MAKE) -C devLib)
+ (cd $(WRKBUILD); $(MAKE) -C gpio)
-wiringPi-install:
+wiringpi-install:
$(INSTALL_DIR) $(IDIR_WIRINGPI)/usr/lib
$(CP) $(WRKBUILD)/wiringPi/libwiringPi.so* $(IDIR_WIRINGPI)/usr/lib
$(CP) $(WRKBUILD)/devLib/libwiringPiDev.so* $(IDIR_WIRINGPI)/usr/lib
- (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPi.so.2.0 libwiringPi.so)
- (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPiDev.so.2.0 libwiringPiDev.so)
+ (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPi.so.2.25 libwiringPi.so)
+ (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPi.so.2.25 libwiringPi.so.2)
+ (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPiDev.so.2.25 libwiringPiDev.so)
+ (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPiDev.so.2.25 libwiringPiDev.so.2)
$(CP) $(WRKBUILD)/wiringPi/*.h $(STAGING_TARGET_DIR)/usr/include
+ $(INSTALL_DIR) $(IDIR_WIRINGPI)/usr/bin
+ $(INSTALL_BIN) $(WRKBUILD)/gpio/gpio $(IDIR_WIRINGPI)/usr/bin
include ${ADK_TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/wiringPi/patches/patch-devLib_Makefile b/package/wiringPi/patches/patch-devLib_Makefile
index 8fa24bcc1..fa53b1601 100644
--- a/package/wiringPi/patches/patch-devLib_Makefile
+++ b/package/wiringPi/patches/patch-devLib_Makefile
@@ -1,25 +1,25 @@
- fix upstream Makefile
-
---- wiringPi-0.1.orig/devLib/Makefile 2014-12-05 14:48:57.000000000 +0100
-+++ wiringPi-0.1/devLib/Makefile 2014-12-05 15:35:35.470864970 +0100
-@@ -32,9 +32,9 @@ DYNAMIC=libwiringPiDev.so.$(VERSION)
+--- wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd.orig/devLib/Makefile 2015-02-11 09:58:24.000000000 +0100
++++ wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd/devLib/Makefile 2015-02-11 10:20:01.648739557 +0100
+@@ -30,10 +30,10 @@ DYNAMIC=libwiringPiDev.so.$(VERSION)
#DEBUG = -g -O0
DEBUG = -O2
-CC = gcc
+CC ?= gcc
INCLUDE = -I.
--CFLAGS = $(DEBUG) -Wformat=2 -Wall $(INCLUDE) -Winline -pipe -fPIC
-+CFLAGS ?= -Wformat=2 -Wall $(INCLUDE) -Winline -pipe -fPIC
+ DEFS = -D_GNU_SOURCE
+-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
++CFLAGS ?= $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -fPIC
LIBS =
-@@ -59,11 +59,11 @@ $(STATIC): $(OBJ)
+@@ -60,11 +60,12 @@ $(STATIC): $(OBJ)
$(DYNAMIC): $(OBJ)
@echo "[Link (Dynamic)]"
- @$(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
+ $(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
++ ln -sf libwiringPiDev.so.$(VERSION) libwiringPiDev.so
.c.o:
@echo [Compile] $<
diff --git a/package/wiringPi/patches/patch-gpio_Makefile b/package/wiringPi/patches/patch-gpio_Makefile
new file mode 100644
index 000000000..01848cf67
--- /dev/null
+++ b/package/wiringPi/patches/patch-gpio_Makefile
@@ -0,0 +1,31 @@
+--- wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd.orig/gpio/Makefile 2015-02-11 09:58:24.000000000 +0100
++++ wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd/gpio/Makefile 2015-02-11 10:18:57.776739248 +0100
+@@ -28,11 +28,11 @@ PREFIX=/local
+
+ #DEBUG = -g -O0
+ DEBUG = -O2
+-CC = gcc
++CC ?= gcc
+ INCLUDE = -I$(DESTDIR)$(PREFIX)/include
+-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
++CFLAGS ?= -Wall $(INCLUDE) -Winline
+
+-LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
++LDFLAGS = -L../wiringPi -L../devLib
+ LIBS = -lwiringPi -lwiringPiDev -lpthread -lm
+
+ # May not need to alter anything below this line
+@@ -49,11 +49,11 @@ version.h: ../VERSION
+
+ gpio: $(OBJ)
+ @echo [Link]
+- @$(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
++ $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
+
+ .c.o:
+ @echo [Compile] $<
+- @$(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
+
+ .PHONY: clean
+ clean:
diff --git a/package/wiringPi/patches/patch-gpio_gpio_c b/package/wiringPi/patches/patch-gpio_gpio_c
new file mode 100644
index 000000000..e6699c911
--- /dev/null
+++ b/package/wiringPi/patches/patch-gpio_gpio_c
@@ -0,0 +1,13 @@
+--- wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd.orig/gpio/gpio.c 2015-02-11 09:58:24.000000000 +0100
++++ wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd/gpio/gpio.c 2015-02-11 10:17:12.656738740 +0100
+@@ -37,8 +37,8 @@
+ #include <wiringPi.h>
+ #include <wpiExtensions.h>
+
+-#include <gertboard.h>
+-#include <piFace.h>
++//#include <gertboard.h>
++//#include <piFace.h>
+
+ #include "version.h"
+
diff --git a/package/wiringPi/patches/patch-wiringPi_Makefile b/package/wiringPi/patches/patch-wiringPi_Makefile
index 68053af79..4695031e6 100644
--- a/package/wiringPi/patches/patch-wiringPi_Makefile
+++ b/package/wiringPi/patches/patch-wiringPi_Makefile
@@ -1,6 +1,6 @@
---- wiringPi-0.1.orig/wiringPi/Makefile 2014-12-05 14:48:57.000000000 +0100
-+++ wiringPi-0.1/wiringPi/Makefile 2014-12-05 15:38:39.214862303 +0100
-@@ -33,10 +33,10 @@ DYNAMIC=libwiringPi.so.$(VERSION)
+--- wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd.orig/wiringPi/Makefile 2015-02-11 09:58:24.000000000 +0100
++++ wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd/wiringPi/Makefile 2015-02-11 10:20:20.360739647 +0100
+@@ -30,10 +30,10 @@ DYNAMIC=libwiringPi.so.$(VERSION)
#DEBUG = -g -O0
DEBUG = -O2
@@ -9,21 +9,22 @@
INCLUDE = -I.
DEFS = -D_GNU_SOURCE
-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
-+CFLAGS ?= $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
++CFLAGS ?= $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -fPIC
LIBS =
-@@ -71,11 +71,11 @@ $(STATIC): $(OBJ)
+@@ -83,11 +83,12 @@ $(STATIC): $(OBJ)
$(DYNAMIC): $(OBJ)
@echo "[Link (Dynamic)]"
- @$(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
+ $(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
++ ln -sf libwiringPi.so.$(VERSION) libwiringPi.so
.c.o:
@echo [Compile] $<
- @$(CC) -c $(CFLAGS) $< -o $@
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
+
.PHONY: clean
- clean:
diff --git a/package/wiringPi/patches/patch-wiringPi_wiringPi_c b/package/wiringPi/patches/patch-wiringPi_wiringPi_c
new file mode 100644
index 000000000..966b5dcfc
--- /dev/null
+++ b/package/wiringPi/patches/patch-wiringPi_wiringPi_c
@@ -0,0 +1,10 @@
+--- wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd.orig/wiringPi/wiringPi.c 2015-02-10 17:08:20.000000000 +0100
++++ wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd/wiringPi/wiringPi.c 2015-02-11 09:29:50.028725001 +0100
+@@ -51,6 +51,7 @@
+ // Added in the 2 UART pins
+ // Change maxPins to numPins to more accurately reflect purpose
+
++#define _GNU_SOURCE
+
+ #include <stdio.h>
+ #include <stdarg.h>