summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-10-06 23:28:03 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-10-06 23:28:03 +0200
commit4972d88255f1b4323bafb53145259c3b2f5ac5eb (patch)
tree9d48c9739a6431f5deaca49da1a969e076536025 /packages
parente1e50475b3853d50d71926d582e1b47729b8e74c (diff)
downloadembtoolkit-4972d88255f1b4323bafb53145259c3b2f5ac5eb.tar.gz
embtoolkit-4972d88255f1b4323bafb53145259c3b2f5ac5eb.tar.bz2
embtoolkit-4972d88255f1b4323bafb53145259c3b2f5ac5eb.tar.xz
Packages: libevent: add NEW development library libevent-1.4.13-stable
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/development/development.kconfig26
-rw-r--r--packages/development/development.mk28
-rw-r--r--packages/development/libevent/libevent.kconfig51
-rw-r--r--packages/development/libevent/libevent.mk107
4 files changed, 212 insertions, 0 deletions
diff --git a/packages/development/development.kconfig b/packages/development/development.kconfig
new file mode 100644
index 0000000..cdfc88d
--- /dev/null
+++ b/packages/development/development.kconfig
@@ -0,0 +1,26 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file development.kconfig
+# \brief development.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+source packages/development/libevent/libevent.kconfig
diff --git a/packages/development/development.mk b/packages/development/development.mk
new file mode 100644
index 0000000..0744639
--- /dev/null
+++ b/packages/development/development.mk
@@ -0,0 +1,28 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file misc.mk
+# \brief misc.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date February 2010
+################################################################################
+
+#libevent
+include $(EMBTK_ROOT)/packages/development/libevent/libevent.mk
+ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_LIBEVENT) += libevent_install
diff --git a/packages/development/libevent/libevent.kconfig b/packages/development/libevent/libevent.kconfig
new file mode 100644
index 0000000..91be9e0
--- /dev/null
+++ b/packages/development/libevent/libevent.kconfig
@@ -0,0 +1,51 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file libevent.kconfig
+# \brief libevent.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+config EMBTK_HAVE_LIBEVENT
+ bool "Have libevent"
+ help
+ The libevent API provides a mechanism to execute a callback
+ function when a specific event occurs on a file descriptor or
+ after a timeout has been reached. Furthermore, libevent also
+ support callbacks due to signals or regular timeouts.
+
+choice
+ prompt "libevent version you wish"
+ depends on EMBTK_HAVE_LIBEVENT
+ help
+ Here you can choose which version of libevent you want to use.
+
+ config EMBTK_LIBEVENT_VERSION_1_4_13_STABLE
+ bool "libevent-1.4.13-stable"
+endchoice
+
+config EMBTK_LIBEVENT_VERSION_STRING
+ string
+ default "1.4.13-stable" if EMBTK_LIBEVENT_VERSION_1_4_13_STABLE
+
+config EMBTK_LIBEVENT_NEED_PATCH
+ bool
+
+
diff --git a/packages/development/libevent/libevent.mk b/packages/development/libevent/libevent.mk
new file mode 100644
index 0000000..825f0c5
--- /dev/null
+++ b/packages/development/libevent/libevent.mk
@@ -0,0 +1,107 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file libevent.mk
+# \brief libevent.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date December 2009
+################################################################################
+
+LIBEVENT_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_LIBEVENT_VERSION_STRING)))
+LIBEVENT_SITE := http://www.monkey.org/~provos
+LIBEVENT_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/libevent/$(LIBEVENT_VERSION)
+LIBEVENT_PACKAGE := libevent-$(LIBEVENT_VERSION).tar.gz
+LIBEVENT_BUILD_DIR := $(PACKAGES_BUILD)/libevent-$(LIBEVENT_VERSION)
+
+LIBEVENT_BINS = event_rpcgen.py
+LIBEVENT_SBINS =
+LIBEVENT_INCLUDES = evdns.h event-config.h event.h evhttp.h evrpc.h evutil.h
+LIBEVENT_LIBS = libevent*
+LIBEVENT_PKGCONFIGS =
+
+LIBEVENT_DEPS :=
+
+libevent_install:
+ @test -e $(LIBEVENT_BUILD_DIR)/.installed || \
+ $(MAKE) $(LIBEVENT_BUILD_DIR)/.installed
+
+$(LIBEVENT_BUILD_DIR)/.installed: $(LIBEVENT_DEPS) download_libevent \
+ $(LIBEVENT_BUILD_DIR)/.decompressed $(LIBEVENT_BUILD_DIR)/.configured
+ $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
+ libevent-$(LIBEVENT_VERSION) in your root filesystem...")
+ $(call EMBTK_KILL_LT_RPATH,$(LIBEVENT_BUILD_DIR))
+ $(Q)$(MAKE) -C $(LIBEVENT_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(LIBEVENT_BUILD_DIR) DESTDIR=$(SYSROOT) install
+ $(Q)$(MAKE) libtool_files_adapt
+ $(Q)$(MAKE) pkgconfig_files_adapt
+ @touch $@
+
+download_libevent:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(LIBEVENT_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(LIBEVENT_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(LIBEVENT_PACKAGE) \
+ $(LIBEVENT_SITE)/$(LIBEVENT_PACKAGE)
+ifeq ($(CONFIG_EMBTK_LIBEVENT_NEED_PATCH),y)
+ @test -e $(DOWNLOAD_DIR)/libevent-$(LIBEVENT_VERSION).patch || \
+ wget -O $(DOWNLOAD_DIR)/libevent-$(LIBEVENT_VERSION).patch \
+ $(LIBEVENT_PATCH_SITE)/libevent-$(LIBEVENT_VERSION)-*.patch
+endif
+
+$(LIBEVENT_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(LIBEVENT_PACKAGE) ...")
+ @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(LIBEVENT_PACKAGE)
+ifeq ($(CONFIG_EMBTK_LIBEVENT_NEED_PATCH),y)
+ @cd $(LIBEVENT_BUILD_DIR); \
+ patch -p1 < $(DOWNLOAD_DIR)/libevent-$(LIBEVENT_VERSION).patch
+endif
+ @touch $@
+
+$(LIBEVENT_BUILD_DIR)/.configured:
+ $(Q)cd $(LIBEVENT_BUILD_DIR); \
+ CC=$(TARGETCC_CACHED) \
+ CXX=$(TARGETCXX_CACHED) \
+ AR=$(TARGETAR) \
+ RANLIB=$(TARGETRANLIB) \
+ AS=$(CROSS_COMPILE)as \
+ LD=$(TARGETLD) \
+ NM=$(TARGETNM) \
+ STRIP=$(TARGETSTRIP) \
+ OBJDUMP=$(TARGETOBJDUMP) \
+ OBJCOPY=$(TARGETOBJCOPY) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CXXFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="-L$(SYSROOT)/$(LIBDIR) -L$(SYSROOT)/usr/$(LIBDIR)" \
+ CPPFLGAS="-I$(SYSROOT)/usr/include" \
+ PKG_CONFIG=$(PKGCONFIG_BIN) \
+ PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
+ ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \
+ --target=$(STRICT_GNU_TARGET) --libdir=/usr/$(LIBDIR) \
+ --prefix=/usr
+ @touch $@
+
+libevent_clean:
+ $(call EMBTK_GENERIC_MESSAGE,"cleanup libevent...")
+ $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(LIBEVENT_BINS)
+ $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(LIBEVENT_SBINS)
+ $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(LIBEVENT_INCLUDES)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(LIBEVENT_LIBS)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(LIBEVENT_PKGCONFIGS)
+ $(Q)-rm -rf $(LIBEVENT_BUILD_DIR)*
+