[package] add gatling web server (#6914)
authorFlorian Fainelli <florian@openwrt.org>
Tue, 7 Aug 2012 16:09:16 +0000 (16:09 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 7 Aug 2012 16:09:16 +0000 (16:09 +0000)
SVN-Revision: 33044

net/gatling/Makefile [new file with mode: 0644]
net/gatling/patches/001-fix_ld_libs.patch [new file with mode: 0644]
net/gatling/patches/002-fix_flags.patch [new file with mode: 0644]
net/gatling/patches/010-add_semicolon.patch [new file with mode: 0644]

diff --git a/net/gatling/Makefile b/net/gatling/Makefile
new file mode 100644 (file)
index 0000000..0ac9d3a
--- /dev/null
@@ -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 (file)
index 0000000..3112f9f
--- /dev/null
@@ -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 (file)
index 0000000..b956664
--- /dev/null
@@ -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 (file)
index 0000000..cbc943c
--- /dev/null
@@ -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
+ }