Merge pull request #2126 from lynxis/libmicrohttpd

Libmicrohttpd: add build variant for ssl + no-ssl + build parallel
This commit is contained in:
champtar 2016-05-04 19:23:09 +02:00
commit 33843c23f1

View file

@ -20,30 +20,59 @@ PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
PKG_LICENSE:=LGPL-2.1 PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1 PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/libmicrohttpd define Package/libmicrohttpd/Default
SECTION:=libs SECTION:=libs
CATEGORY:=Libraries CATEGORY:=Libraries
TITLE:=GNU libmicrohttpd is a library that runs an HTTP server. TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
URL:=http://www.gnu.org/software/libmicrohttpd/ URL:=http://www.gnu.org/software/libmicrohttpd/
DEPENDS:=+libpthread +libgcrypt +libgnutls +libgpg-error
endef endef
define Package/libmicrohttpd/description define Package/libmicrohttpd
$(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/Default
GNU libmicrohttpd is a small C library that is supposed to make it easy GNU libmicrohttpd is a small C library that is supposed to make it easy
to run an HTTP server as part of another application. to run an HTTP server as part of another application.
endef endef
CONFIGURE_ARGS += \ define Package/libmicrohttpd-no-ssl/description
--enable-https \ $(call Package/libmicrohttp/description/Default)
--with-gnutls \ endef
CONFIGURE_ARGS+= \
--disable-curl \ --disable-curl \
--disable-spdy \ --disable-spdy \
--without-openssl --without-openssl
ifeq ($(BUILD_VARIANT),no-ssl)
CONFIGURE_ARGS += \
--disable-https \
--without-gnutls
else
CONFIGURE_ARGS += \
--enable-https \
--with-gnutls
endif
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/include/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
@ -58,4 +87,9 @@ define Package/libmicrohttpd/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
endef endef
define Package/libmicrohttpd-no-ssl/install
$(call Package/libmicrohttpd/install,$1)
endef
$(eval $(call BuildPackage,libmicrohttpd)) $(eval $(call BuildPackage,libmicrohttpd))
$(eval $(call BuildPackage,libmicrohttpd-no-ssl))