Browse Source

Merge pull request #1368 from kissg1988/libevhtp-1.1

libevhtp-1.1: package added
Steven Barth 9 years ago
parent
commit
63adc2175a
2 changed files with 76 additions and 0 deletions
  1. 47
    0
      libs/libevhtp-1.1/Makefile
  2. 29
    0
      libs/libevhtp-1.1/patches/010-CMakeLists-fixes.patch

+ 47
- 0
libs/libevhtp-1.1/Makefile View File

@@ -0,0 +1,47 @@
1
+#
2
+# Copyright (C) 2007-2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libevhtp-1.1
11
+PKG_VERSION:=1.1.7
12
+PKG_RELEASE:=1
13
+PKG_LICENSE:=BSD-3-Clause
14
+
15
+PKG_SOURCE_PROTO:=git
16
+PKG_SOURCE_URL:=https://github.com/ellzey/libevhtp.git
17
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18
+PKG_SOURCE_VERSION:=f70c920d4d8d4146ff662867f47c4b5854045b3c
19
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/libevhtp-1.1
24
+    SECTION:=libs
25
+    CATEGORY:=Libraries
26
+    TITLE:=A more flexible replacement for libevent's httpd API - compatibility package
27
+    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
28
+    URL:=https://github.com/ellzey/libevhtp
29
+    DEPENDS:=+libevent2 +libevent2-pthreads +libpthread
30
+endef
31
+
32
+define Package/libevhtp-1.1/description
33
+   Libevhtp was created as a replacement API for Libevent's current HTTP API.
34
+
35
+   NOTE: This is an older version required for compatibility reasons. The latest version has its own package named "libevhtp".
36
+endef
37
+
38
+include $(INCLUDE_DIR)/cmake.mk
39
+
40
+define Build/InstallDev
41
+	$(INSTALL_DIR) $(1)/usr/include/libevhtp-1.1/
42
+	$(INSTALL_DIR) $(1)/usr/lib/libevhtp-1.1/
43
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
44
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
45
+endef
46
+
47
+$(eval $(call BuildPackage,libevhtp-1.1))

+ 29
- 0
libs/libevhtp-1.1/patches/010-CMakeLists-fixes.patch View File

@@ -0,0 +1,29 @@
1
+diff -rupN libevhtp-1.1-1.1.7-orig/CMakeLists.txt libevhtp-1.1-1.1.7/CMakeLists.txt
2
+--- libevhtp-1.1-1.1.7-orig/CMakeLists.txt	2015-06-14 00:15:28.000000000 +0200
3
++++ libevhtp-1.1-1.1.7/CMakeLists.txt	2015-06-14 00:21:17.441299942 +0200
4
+@@ -54,7 +54,7 @@ if (NOT HAVE_SYS_UN)
5
+ 	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_SYS_UN")
6
+ endif(NOT HAVE_SYS_UN)
7
+ 
8
+-OPTION(EVHTP_DISABLE_SSL       "Disable ssl support"      OFF)
9
++OPTION(EVHTP_DISABLE_SSL       "Disable ssl support"      ON)
10
+ OPTION(EVHTP_DISABLE_EVTHR     "Disable evthread support" OFF)
11
+ OPTION(EVHTP_DIABLE_REGEX      "Disable regex support"    OFF)
12
+ 
13
+@@ -182,11 +182,11 @@ endif()
14
+ add_library(libevhtp STATIC ${LIBEVHTP_SOURCES} ${ONIG_SOURCES})
15
+ set_target_properties(libevhtp PROPERTIES OUTPUT_NAME "evhtp")
16
+ 
17
+-install (TARGETS libevhtp DESTINATION lib)
18
+-install (FILES evhtp.h DESTINATION include)
19
+-install (FILES htparse/htparse.h DESTINATION include)
20
+-install (FILES evthr/evthr.h DESTINATION include)
21
+-install (FILES oniguruma/onigposix.h DESTINATION include)
22
++install (TARGETS libevhtp DESTINATION lib/libevhtp-1.1)
23
++install (FILES evhtp.h DESTINATION include/libevhtp-1.1)
24
++install (FILES htparse/htparse.h DESTINATION include/libevhtp-1.1)
25
++install (FILES evthr/evthr.h DESTINATION include/libevhtp-1.1)
26
++install (FILES oniguruma/onigposix.h DESTINATION include/libevhtp-1.1)
27
+ 
28
+ find_library (LIB_DL dl)
29
+ set (SYS_LIBS ${LIB_DL})