From 582b2e3011c1189e5a342719eba91e9519af5105 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 7 Aug 2012 16:09:16 +0000 Subject: [PATCH] [package] add gatling web server (#6914) git-svn-id: svn://svn.openwrt.org/openwrt/packages@33044 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/gatling/Makefile | 41 +++++++++++++++++++++ net/gatling/patches/001-fix_ld_libs.patch | 11 ++++++ net/gatling/patches/002-fix_flags.patch | 14 +++++++ net/gatling/patches/010-add_semicolon.patch | 11 ++++++ 4 files changed, 77 insertions(+) create mode 100644 net/gatling/Makefile create mode 100644 net/gatling/patches/001-fix_ld_libs.patch create mode 100644 net/gatling/patches/002-fix_flags.patch create mode 100644 net/gatling/patches/010-add_semicolon.patch diff --git a/net/gatling/Makefile b/net/gatling/Makefile new file mode 100644 index 000000000..0ac9d3a72 --- /dev/null +++ b/net/gatling/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gatling +PKG_VERSION:=0.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://dl.fefe.de +PKG_MD5SUM:=a0fb49ccb6b910bdbd7e76a9960394e3 + +include $(INCLUDE_DIR)/nls.mk +include $(INCLUDE_DIR)/package.mk + +define Package/gatling + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web + TITLE:=gatling - a high performance web server + VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) + URL:=http://www.fefe.de/gatling/ + DEPENDS:=$(ICONV_DEPENDS) +zlib +libowfat +libopenssl +endef + +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libowfat \ + -I$(ICONV_PREFIX)/include +TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib \ + -L$(ICONV_PREFIX)/lib + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/gatling $(1)/bin +endef + +$(eval $(call BuildPackage,gatling)) diff --git a/net/gatling/patches/001-fix_ld_libs.patch b/net/gatling/patches/001-fix_ld_libs.patch new file mode 100644 index 000000000..3112f9f27 --- /dev/null +++ b/net/gatling/patches/001-fix_ld_libs.patch @@ -0,0 +1,11 @@ +--- gatling-0.11/GNUmakefile 2010-02-09 21:49:18.448989774 +0000 ++++ gatling-0.11_new/GNUmakefile 2010-02-09 21:52:44.821469886 +0000 +@@ -151,7 +151,7 @@ + ar q $@ dummy.o + -ranlib $@ + +-LDLIBS+=`cat libsocket libiconv libcrypt` ++LDLIBS+=-lcrypto -liconv -lcrypt + + $(TARGETS): libsocketkludge.a libsocket libiconv libcrypt md5lib + diff --git a/net/gatling/patches/002-fix_flags.patch b/net/gatling/patches/002-fix_flags.patch new file mode 100644 index 000000000..b95666412 --- /dev/null +++ b/net/gatling/patches/002-fix_flags.patch @@ -0,0 +1,14 @@ +diff -ruN gatling-0.11/GNUmakefile gatling-0.11_new/GNUmakefile +--- gatling-0.11/GNUmakefile 2008-12-05 12:31:01.000000000 +0000 ++++ gatling-0.11_new/GNUmakefile 2010-02-05 23:33:08.242872096 +0000 +@@ -16,8 +16,8 @@ + CROSS= + #CROSS=i686-mingw32- + CC=$(CROSS)gcc +-CFLAGS=-pipe -Wall +-LDFLAGS= ++CFLAGS+=-pipe -Wall ++LDFLAGS+= + + path = $(subst :, ,$(PATH)) + diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet)) diff --git a/net/gatling/patches/010-add_semicolon.patch b/net/gatling/patches/010-add_semicolon.patch new file mode 100644 index 000000000..cbc943cbf --- /dev/null +++ b/net/gatling/patches/010-add_semicolon.patch @@ -0,0 +1,11 @@ +--- gatling-0.11/acc.c 2010-02-05 23:47:29.252861541 +0000 ++++ gatling-0.11_new/acc.c 2010-02-05 23:47:54.025348536 +0000 +@@ -47,7 +47,7 @@ + #if defined(__i386__) || defined(__x86_64__) + return a[0]==b[0] && a[1]==b[1] && a[2]==b[2]; + #else +- return ((*(uint32_t*)a ^ *(uint32_t*)b) & 0xffffff) == 0 ++ return ((*(uint32_t*)a ^ *(uint32_t*)b) & 0xffffff) == 0; + #endif + } +