From 19965525c90c4cbd48fba558cc232e2cf9473adc Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Mon, 14 Dec 2015 20:59:22 +0100 Subject: [PATCH 1/2] libmicrohttpd: implement build variants -ssl and -no-ssl Signed-off-by: Alexander Couzens --- libs/libmicrohttpd/Makefile | 51 ++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/libs/libmicrohttpd/Makefile b/libs/libmicrohttpd/Makefile index 9f9436467..60b6553f2 100644 --- a/libs/libmicrohttpd/Makefile +++ b/libs/libmicrohttpd/Makefile @@ -20,30 +20,58 @@ PKG_MAINTAINER:=Martijn Zilverschoon PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +define Package/libmicrohttpd/Default + SECTION:=libs + CATEGORY:=Libraries + TITLE:=GNU libmicrohttpd is a library that runs an HTTP server. + URL:=http://www.gnu.org/software/libmicrohttpd/ +endef + define Package/libmicrohttpd - SECTION:=libs - CATEGORY:=Libraries - TITLE:=GNU libmicrohttpd is a library that runs an HTTP server. - URL:=http://www.gnu.org/software/libmicrohttpd/ - DEPENDS:=+libpthread +libgcrypt +libgnutls +libgpg-error +$(call Package/libmicrohttpd/Default) + TITLE+=(with-ssl) + DEPENDS:=+libpthread +libgcrypt +libgnutls +libgpg-error +endef + +define Package/libmicrohttpd-no-ssl +$(call Package/libmicrohttpd/Default) + TITLE+=(no-ssl) + DEPENDS:=+libpthread + VARIANT:=no-ssl + PROVIDES:=libmicrohttpd + CONFLICTS:=libmicrohttpd endef -define Package/libmicrohttpd/description +define Package/libmicrohttpd/description/Default GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application. endef -CONFIGURE_ARGS += \ - --enable-https \ - --with-gnutls \ +define Package/libmicrohttpd-no-ssl/description +$(call Package/libmicrohttp/description/Default) +endef + +CONFIGURE_ARGS+= \ --disable-curl \ --disable-spdy \ --without-openssl +ifeq ($(BUILD_VARIANT),no-ssl) +CONFIGURE_ARGS += \ + --disable-https \ + --without-gnutls +else +CONFIGURE_ARGS += \ + --enable-https \ + --with-gnutls +endif + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ @@ -58,4 +86,9 @@ define Package/libmicrohttpd/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ endef +define Package/libmicrohttpd-no-ssl/install +$(call Package/libmicrohttpd/install,$1) +endef + $(eval $(call BuildPackage,libmicrohttpd)) +$(eval $(call BuildPackage,libmicrohttpd-no-ssl)) From a99aa1ff48dd18086039a325ad5bcc77a7eadaac Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Mon, 14 Dec 2015 20:59:36 +0100 Subject: [PATCH 2/2] libmicrohttpd: build parallel Signed-off-by: Alexander Couzens --- libs/libmicrohttpd/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/libmicrohttpd/Makefile b/libs/libmicrohttpd/Makefile index 60b6553f2..e71755f9f 100644 --- a/libs/libmicrohttpd/Makefile +++ b/libs/libmicrohttpd/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1