Skip to contentSkip to conversation

package/wiringpi: re-add and bump version to 3.4

PATCH New Peter Seiderer via buildroot 1 participant 1 message May 13, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/wiringpi: re-add and bump version to 3.4

- revert commit 90dd780391 ("package/wiringpi: remove")
- bump version to 3.4
- change download URL to github
- change home page URL to github
- rebased 0001-Adjust-for-buildroot-build.patch
- add optional libxcrypt dependency, fix build failure since bump of glibc to version 2.39
- needs kernel headers >= 5.5 for GPIOLINE_FLAG_BIAS_PULL_UP, GPIOLINE_FLAG_BIAS_PULL_DOWN and GPIOLINE_FLAG_BIAS_DISABLE usage

---
 Config.in.legacy                              |   9 --
 DEVELOPERS                                    |   1 +
 package/Config.in                             |   1 +
 package/squeezelite/squeezelite.mk            |   5 +
 .../0001-Adjust-for-buildroot-build.patch     | 126 ++++++++++++++++++
 ...erial-fix-compile-for-missing-baud-d.patch |  47 +++++++
 package/wiringpi/Config.in                    |  16 +++
 package/wiringpi/wiringpi.hash                |   3 +
 package/wiringpi/wiringpi.mk                  |  36 +++++
 9 files changed, 235 insertions(+), 9 deletions(-)
 create mode 100644 package/wiringpi/0001-Adjust-for-buildroot-build.patch
 create mode 100644 package/wiringpi/0002-wiringPi-wiringSerial-fix-compile-for-missing-baud-d.patch
 create mode 100644 package/wiringpi/Config.in
 create mode 100644 package/wiringpi/wiringpi.hash
 create mode 100644 package/wiringpi/wiringpi.mk
Config.in.legacy +0 -9
index 46f7a304cb..8d4f488dbd 100644
@@ -1938,15 +1938,6 @@ config BR2_PACKAGE_KODI_PERIPHERAL_STEAMCONTROLLER
 
 comment "Legacy options removed in 2020.05"
 
-config BR2_PACKAGE_WIRINGPI
-	bool "wiringpi package removed"
-	select BR2_LEGACY
-	help
-	  The author of wiringpi has deprecated the package, and
-	  completely removed the git tree that was serving the
-	  sources, with this message:
-	  Please look for alternatives for wiringPi
-
 config BR2_PACKAGE_PYTHON_PYCRYPTO
 	bool "python-pycrypto package removed"
 	select BR2_LEGACY
DEVELOPERS +1 -0
index d653648718..9f7bade097 100644
@@ -2546,6 +2546,7 @@ F:	package/fft-eval/
 F:	package/python-blinker/
 F:	package/qt5/qt5speech/
 F:	package/speechd/
+F:	package/wiringpi/
 
 N:	Peter Thompson <[email protected]>
 F:	package/sdl2_gfx/
package/Config.in +1 -0
index c29b4a5101..ffb6c69562 100644
@@ -1805,6 +1805,7 @@ menu "Hardware handling"
 	source "package/tslib/Config.in"
 	source "package/uhd/Config.in"
 	source "package/urg/Config.in"
+	source "package/wiringpi/Config.in"
 endmenu
 
 menu "Javascript"
package/squeezelite/squeezelite.mk +5 -0
index b0347c4df9..2ed3d8b769 100644
@@ -40,6 +40,11 @@ ifeq ($(BR2_PACKAGE_SQUEEZELITE_VISEXPORT),y)
 SQUEEZELITE_MAKE_OPTS += -DVISEXPORT
 endif
 
+ifeq ($(BR2_PACKAGE_WIRINGPI),y)
+SQUEEZELITE_DEPENDENCIES += wiringpi
+SQUEEZELITE_MAKE_OPTS += -DRPI
+endif
+
 define SQUEEZELITE_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
 		OPTS="$(SQUEEZELITE_MAKE_OPTS)" -C $(@D) all
package/wiringpi/0001-Adjust-for-buildroot-build.patch new file +126 -0

126 lines not on this page · raw message

package/wiringpi/0002-wiringPi-wiringSerial-fix-compile-for-missing-baud-d.patch new file +47 -0

47 lines not on this page · raw message

package/wiringpi/Config.in new file +16 -0
new file mode 100644
index 0000000000..11ef9825a1
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_WIRINGPI
+	bool "wiringpi"
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
+	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  wiringPi libraries (and gpio command)
+
+	  https://github.com/WiringPi/WiringPi
+
+comment "wiringpi needs a toolchain w/ threads, dynamic library, kernel headers >= 5.5"
+	depends on BR2_USE_MMU
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
package/wiringpi/wiringpi.hash new file +3 -0
new file mode 100644
index 0000000000..590d03946c
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  a81219e9ea0ce08295d2fc0457c69c4df0c6d2e846cb5817ba3247f673480d55  wiringpi-3.4.tar.gz
+sha256  da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768  COPYING.LESSER
package/wiringpi/wiringpi.mk new file +36 -0
new file mode 100644
index 0000000000..3515634d6d
@@ -0,0 +1,36 @@
+################################################################################
+#
+# wiringpi
+#
+################################################################################
+
+WIRINGPI_VERSION = 3.4
+WIRINGPI_SITE = $(call github,WiringPi,WiringPi,$(WIRINGPI_VERSION))
+
+WIRINGPI_LICENSE = LGPL-3.0+
+WIRINGPI_LICENSE_FILES = COPYING.LESSER
+WIRINGPI_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+WIRINGPI_DEPENDENCIES += libxcrypt
+endif
+
+define WIRINGPI_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/wiringPi all
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/devLib all
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/gpio all
+endef
+
+define WIRINGPI_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi install DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib install DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
+endef
+
+define WIRINGPI_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi install DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib install DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
+	$(INSTALL) -D -m 0755 $(@D)/gpio/gpio $(TARGET_DIR)/usr/bin/gpio
+	$(INSTALL) -D -m 0755 $(@D)/gpio/pintest $(TARGET_DIR)/usr/bin/pintest
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.45.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot