# See /LICENSE for more information.
#
+# NOTE: please DO NOT update this package without the maintainer's consent.
+# See https://github.com/haiwen/seafile/issues/1119
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libevhtp
-PKG_VERSION:=1.2.10
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.6
+PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ellzey/libevhtp.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=ba4c44eed1fb7a5cf8e4deb236af4f7675cc72d5
+PKG_SOURCE_VERSION:=91071e2f20749cd469b87ac2ef1c158dc2a6806f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_INSTALL:=1
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/{include,lib}
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevhtp.so* $(1)/usr/lib/
-endef
-
-define Package/libevhtp/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevhtp.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libevhtp))
+++ /dev/null
-diff -rupN libevhtp-1.2.9.orig/CMakeLists.txt libevhtp-1.2.9/CMakeLists.txt
---- libevhtp-1.2.9.orig/CMakeLists.txt 2014-03-23 12:50:50.000000000 +0100
-+++ libevhtp-1.2.9/CMakeLists.txt 2014-11-21 11:46:58.644575813 +0100
-@@ -64,7 +64,7 @@ OPTION(EVHTP_DISABLE_EVTHR "Disable
- OPTION(EVHTP_DISABLE_REGEX "Disable regex support" OFF)
-
- # -DEVHTP_BUILD_SHARED:STRING=ON
--OPTION(EVHTP_BUILD_SHARED "Build shared library too" OFF)
-+OPTION(EVHTP_BUILD_SHARED "Build shared library too" ON)
-
- # -DEVHTP_USE_DEFER_ACCEPT:STRING=ON
- OPTION(EVHTP_USE_DEFER_ACCEPT "Enable TCP_DEFER_ACCEPT" OFF)
--- /dev/null
+diff -rupN libevhtp-1.2.9.orig/htparse/htparse.c libevhtp-1.2.9/htparse/htparse.c
+--- libevhtp-1.2.9.orig/htparse/htparse.c 2014-03-23 12:50:50.000000000 +0100
++++ libevhtp-1.2.9/htparse/htparse.c 2014-12-09 01:12:22.242001241 +0100
+@@ -197,6 +197,7 @@ static const char * method_strmap[] = {
+
+ #define _MIN_READ(a, b) ((a) < (b) ? (a) : (b))
+
++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ #define _str3_cmp(m, c0, c1, c2, c3) \
+ *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0)
+
+@@ -226,6 +227,37 @@ static const char * method_strmap[] = {
+ *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \
+ && ((uint32_t *)m)[1] == ((c7 << 24) | (c6 << 16) | (c5 << 8) | c4) \
+ && m[8] == c8
++#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++#define _str3_cmp(m, c0, c1, c2, c3) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3)
++
++#define _str3Ocmp(m, c0, c1, c2, c3) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3)
++
++#define _str4cmp(m, c0, c1, c2, c3) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3)
++
++#define _str5cmp(m, c0, c1, c2, c3, c4) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
++ && m[4] == c4
++
++#define _str6cmp(m, c0, c1, c2, c3, c4, c5) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
++ && (((uint32_t *)m)[1] & 0xffff0000) == ((c4 << 24) | c5 << 16)
++
++#define _str7_cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
++ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7)
++
++#define _str8cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
++ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7)
++
++#define _str9cmp(m, c0, c1, c2, c3, c4, c5, c6, c7, c8) \
++ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \
++ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) \
++ && m[8] == c8
++#endif
+
+ #define __HTPARSE_GENHOOK(__n) \
+ static inline int hook_ ## __n ## _run(htparser * p, htparse_hooks * hooks) { \
PKG_NAME:=seafile-server
PKG_VERSION:=5.1.1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)-3
+PKG_RELEASE=$(PKG_SOURCE_VERSION)-4
PKG_LICENSE:=GPL-3.0
PKG_SOURCE_PROTO:=git
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=http://seafile.com/
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql \
- +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient +libevhtp \
+ +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
+libpthread +libuuid +bash +procps-ng +procps-ng-pkill $(ICONV_DEPENDS)
- EXTRA_DEPENDS:=seafile-ccnet (=5.1.1-6d94fdc4296d542a5552039dc13a67c3448e8b13-1), seafile-seahub (=5.1.1-95f762f396c81f840fe658ab983df53784083bb1-1), libevhtp (>=1.2.10)
+ EXTRA_DEPENDS:=seafile-ccnet (=5.1.1-6d94fdc4296d542a5552039dc13a67c3448e8b13-1), seafile-seahub (=5.1.1-95f762f396c81f840fe658ab983df53784083bb1-1)
endef
define Package/seafile-server/description
--disable-server-pkg \
--disable-console
-PKG_BUILD_DEPENDS:=vala/host
+PKG_BUILD_DEPENDS:=vala/host libevhtp
+TARGET_CFLAGS += -minterlink-mips16
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \
- -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz
+ -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz -levent_openssl -levent
define Package/seafile-server/conffiles
/etc/config/seafile