From e8da6d929451acbdcd94ae1fc747c876a84df8bc Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 21 Sep 2019 13:24:13 -0700 Subject: [PATCH 1/3] protobuf: Fix host build rpath is needed as the host directory instead of hostpkg is used for some reason. Signed-off-by: Rosen Penev --- libs/protobuf/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile index fb2d84fdd..a4310b4f5 100644 --- a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=protobuf PKG_VERSION:=3.8.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION) @@ -68,7 +68,10 @@ endef CMAKE_HOST_OPTIONS += \ -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ - -Dprotobuf_BUILD_TESTS=OFF + -Dprotobuf_BUILD_TESTS=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" CMAKE_OPTIONS += \ -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ From 53b9d894fb4f12acfc72e6993523727f2080facd Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 21 Sep 2019 13:25:21 -0700 Subject: [PATCH 2/3] libprotobuf-c: Switch to CMake Simplifies the Makefile. Signed-off-by: Rosen Penev --- libs/protobuf-c/Makefile | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/libs/protobuf-c/Makefile b/libs/protobuf-c/Makefile index e882253c7..d019b4cdc 100644 --- a/libs/protobuf-c/Makefile +++ b/libs/protobuf-c/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libprotobuf-c PKG_VERSION:=1.3.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION) @@ -21,11 +21,12 @@ PKG_MAINTAINER:=Rosen Penev PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DEPENDS:=protobuf-c/host HOST_BUILD_DEPENDS:=protobuf/host +PKG_BUILD_DEPENDS:=protobuf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +CMAKE_SOURCE_SUBDIR:=build-cmake include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -44,23 +45,12 @@ define Package/libprotobuf-c/description internal RPC protocols and file formats. endef -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --disable-protoc - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ -endef +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON define Package/libprotobuf-c/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libprotobuf-c)) From 546ea3475a905b2c792b2b11cde1ce88177a56fc Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 23 Sep 2019 15:23:41 -0700 Subject: [PATCH 3/3] ola: Fix HOSTPKG linking Before the CMake update, either protobuf was being installed to HOST instead of HOSTPKG by mistake or some other problem. This adds a linker flag to look in the proper location. Signed-off-by: Rosen Penev --- net/ola/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/net/ola/Makefile b/net/ola/Makefile index e6a701ebc..7081f3c47 100644 --- a/net/ola/Makefile +++ b/net/ola/Makefile @@ -10,16 +10,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ola PKG_VERSION:=0.10.7 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)? PKG_HASH:=95b5e99775f700a9cdf6e2219eccfc8c037fa8841f87cb00344359c4b8c7bf26 +PKG_MAINTAINER:=Christian Beier PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=libtool - +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 @@ -35,7 +36,6 @@ define Package/ola CATEGORY:=Network TITLE:=Open Lighting Architecture Daemon URL:=https://www.openlighting.org/ - MAINTAINER:=Christian Beier DEPENDS:=+protobuf +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd endef @@ -51,7 +51,7 @@ CONFIGURE_ARGS += \ --disable-fatal-warnings \ --disable-unittests \ --without-dns-sd \ - --with-ola-protoc-plugin=$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin + --with-ola-protoc-plugin="$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin" HOST_CONFIGURE_ARGS += \ --disable-all-plugins \ @@ -65,6 +65,8 @@ HOST_CONFIGURE_ARGS += \ --disable-doxygen-html \ --disable-doxygen-doc +HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib" + # only build the ola_protoc thingy define Host/Compile cd $(HOST_BUILD_DIR); \