From: Felix Fietkau Date: Sat, 15 Nov 2008 13:20:47 +0000 (+0000) Subject: add luaprofiler X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=e003fbb3b5ad0446c2420dbe71e3a90dbbfb7015 add luaprofiler SVN-Revision: 13219 --- diff --git a/lang/luaprofiler/Makefile b/lang/luaprofiler/Makefile new file mode 100644 index 0000000000..b79a9fcb43 --- /dev/null +++ b/lang/luaprofiler/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luaprofiler +PKG_VERSION:=2.0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/3400 +PKG_MD5SUM:=611435c8e61e1a330ee0aa8ddc9c124a + +include $(INCLUDE_DIR)/package.mk + +define Package/luaprofiler + SUBMENU:=LUA + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua Profiler + URL:=http://luaprofiler.luaforge.net +endef + +define Package/luaprofiler/description + Profile any Lua application +endef + +define Build/Configure + +endef + +TARGET_CFLAGS += $(FPIC) \ + -I$(STAGING_DIR)/usr/include + +TARGET_LDFLAGS += -llua + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + -f Makefile.linux +endef + +define Package/luaprofiler/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_BUILD_DIR)/bin/profiler.so $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,luaprofiler)) diff --git a/lang/luaprofiler/patches/100-link.patch b/lang/luaprofiler/patches/100-link.patch new file mode 100644 index 0000000000..804e39c468 --- /dev/null +++ b/lang/luaprofiler/patches/100-link.patch @@ -0,0 +1,11 @@ +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -4,7 +4,7 @@ OBJS= src/clocks.o src/core_profiler.o s + + + profiler: $(OBJS) +- mkdir -p bin && $(LD) -Bshareable -o $(PROFILER_OUTPUT) $(OBJS) ++ mkdir -p bin && $(LD) -Bshareable -o $(PROFILER_OUTPUT) $(OBJS) $(LDFLAGS) + + clean: + rm -f $(PROFILER_OUTPUT) src/*.o