Browse Source

Merge pull request #9878 from zhaojh329/libuhttpd

libuhttpd: Update to 3.0.1
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
e12862ed2e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 94 deletions
  1. +33
    -57
      libs/libuhttpd/Makefile
  2. +0
    -37
      libs/libuhttpd/patches/001-fix-find-lua.patch

+ 33
- 57
libs/libuhttpd/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2014-2017 OpenWrt.org
# Copyright (C) 2018 Jianhui Zhao
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -8,79 +8,55 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libuhttpd
PKG_VERSION:=2.2.2
PKG_RELEASE:=2
PKG_VERSION:=3.0.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd.git
PKG_MIRROR_HASH:=98f217238160489468fafe8c643b7f96f168c80000ee07d3ca808d54f4c6a608
CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd/releases/download/v$(PKG_VERSION)
PKG_HASH:=07cc357a94e29c5a04eea46331352c869beed01d7fd6cc23972e878a5c4b023c
PKG_LICENSE:=LGPL-2.1
PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libuhttpd/default
define Package/libuhttpd/Default
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Networking
TITLE:=libuhttpd
DEPENDS:=+libubox +liblua
endef
define Package/libuhttpd-nossl
$(Package/libuhttpd/default)
TITLE += (NO SSL)
VARIANT:=nossl
CONFLICTS:=libuhttpd-openssl libuhttpd-wolfssl libuhttpd-mbedtls
endef
define Package/libuhttpd-openssl
$(Package/libuhttpd/default)
TITLE += (openssl)
DEPENDS += +libustream-openssl
VARIANT:=openssl
CONFLICTS:=libuhttpd-wolfssl libuhttpd-mbedtls
TITLE:=A lightweight HTTP server library based on libev
URL:=https://github.com/zhaojh329/libuhttpd
DEPENDS:=+libev $(2)
VARIANT:=$(1)
PROVIDES:=libuhttpd
endef
define Package/libuhttpd-wolfssl
$(Package/libuhttpd/default)
TITLE += (wolfssl)
DEPENDS += +libustream-wolfssl
VARIANT:=wolfssl
CONFLICTS:=libuhttpd-mbedtls
endef
define Package/libuhttpd-mbedtls
$(Package/libuhttpd/default)
TITLE += (mbedtls)
DEPENDS += +libustream-mbedtls
VARIANT:=mbedtls
endef
ifeq ($(BUILD_VARIANT),nossl)
CMAKE_OPTIONS += -DUHTTPD_SSL_SUPPORT=off
Package/libuhttpd-openssl=$(call Package/libuhttpd/Default,openssl,+PACKAGE_libuhttpd-openssl:libopenssl)
Package/libuhttpd-wolfssl=$(call Package/libuhttpd/Default,wolfssl,+PACKAGE_libuhttpd-wolfssl:libwolfssl)
Package/libuhttpd-mbedtls=$(call Package/libuhttpd/Default,mbedtls,+PACKAGE_libuhttpd-mbedtls:libmbedtls)
Package/libuhttpd-nossl=$(call Package/libuhttpd/Default,nossl)
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DUHTTPD_USE_OPENSSL=ON
else ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DUHTTPD_USE_WOLFSSL=ON
else ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DUHTTPD_USE_MBEDTLS=ON
else
CMAKE_OPTIONS += -DUHTTPD_SSL_SUPPORT=OFF
endif
define Package/libuhttpd/default/install
$(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/lib/lua/
define Package/libuhttpd-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/
endef
Package/libuhttpd-nossl/install = $(Package/libuhttpd/default/install)
Package/libuhttpd-openssl/install = $(Package/libuhttpd/default/install)
Package/libuhttpd-wolfssl/install = $(Package/libuhttpd/default/install)
Package/libuhttpd-mbedtls/install = $(Package/libuhttpd/default/install)
$(eval $(call BuildPackage,libuhttpd-nossl))
$(eval $(call BuildPackage,libuhttpd-openssl))
$(eval $(call BuildPackage,libuhttpd-mbedtls))
$(eval $(call BuildPackage,libuhttpd-wolfssl))
$(eval $(call BuildPackage,libuhttpd-openssl))
$(eval $(call BuildPackage,libuhttpd-nossl))

+ 0
- 37
libs/libuhttpd/patches/001-fix-find-lua.patch View File

@ -1,37 +0,0 @@
Index: libuhttpd-2.1.0/src/CMakeLists.txt
===================================================================
--- libuhttpd-2.1.0.orig/src/CMakeLists.txt
+++ libuhttpd-2.1.0/src/CMakeLists.txt
@@ -8,7 +8,7 @@ set(UHTTPD_VERSION_PATCH 0)
# Check the third party Libraries
find_package(Libubox REQUIRED)
-find_package(Lua)
+find_package(Lua51)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${LIBUBOX_INCLUDE_DIR})
@@ -20,9 +20,9 @@ option(UHTTPD_SSL_SUPPORT "SSL support"
set(LUA_SUPPORT_DEFAULT "ON")
-if (NOT LUA_FOUND)
+if (NOT LUA51_FOUND)
set(LUA_SUPPORT_DEFAULT "OFF")
-endif (NOT LUA_FOUND)
+endif (NOT LUA51_FOUND)
set(UHTTPD_LUA_SUPPORT_CONFIG 1)
option(UHTTPD_LUA_SUPPORT "LUA support" ${LUA_SUPPORT_DEFAULT})
@@ -34,9 +34,9 @@ else ()
endif ()
if (UHTTPD_LUA_SUPPORT)
- if (NOT LUA_FOUND)
+ if (NOT LUA51_FOUND)
message(FATAL_ERROR "Lua was not found on your system")
- endif (NOT LUA_FOUND)
+ endif (NOT LUA51_FOUND)
include_directories(${LUA_INCLUDE_DIR})
list(APPEND EXTRA_LIBS ${LUA_LIBRARY})

Loading…
Cancel
Save