summaryrefslogtreecommitdiff
path: root/packages/development
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-01-30 12:13:29 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-01-30 12:13:29 +0100
commit50af16dfca66ec250c584dc946f7c4d213421cf2 (patch)
tree57e91f4e84edfe9d5302f0431ecdb0f7e24ba0fa /packages/development
parentf2a341b6b70086a807aa7f62c540d5ab8d0d7a72 (diff)
downloadembtoolkit-50af16dfca66ec250c584dc946f7c4d213421cf2.tar.gz
embtoolkit-50af16dfca66ec250c584dc946f7c4d213421cf2.tar.bz2
embtoolkit-50af16dfca66ec250c584dc946f7c4d213421cf2.tar.xz
Packages: libevent: convert to use generic macros
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages/development')
-rw-r--r--packages/development/libevent/libevent.kconfig11
-rw-r--r--packages/development/libevent/libevent.mk56
2 files changed, 16 insertions, 51 deletions
diff --git a/packages/development/libevent/libevent.kconfig b/packages/development/libevent/libevent.kconfig
index 2c7e8f8..e28d3cb 100644
--- a/packages/development/libevent/libevent.kconfig
+++ b/packages/development/libevent/libevent.kconfig
@@ -25,6 +25,7 @@
config EMBTK_HAVE_LIBEVENT
bool "Have libevent"
+ select EMBTK_LIBEVENT_PKG_IS_TARGZ
help
The libevent API provides a mechanism to execute a callback
function when a specific event occurs on a file descriptor or
@@ -35,7 +36,7 @@ choice
prompt "libevent version you wish"
depends on EMBTK_HAVE_LIBEVENT
help
- Here you can choose which version of libevent you want to use.
+ 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"
@@ -47,5 +48,9 @@ config EMBTK_LIBEVENT_VERSION_STRING
config EMBTK_LIBEVENT_NEED_PATCH
bool
-
-
+config EMBTK_LIBEVENT_NEED_AUTORECONF
+ bool
+config EMBTK_LIBEVENT_PKG_IS_TARGZ
+ bool
+config EMBTK_LIBEVENT_PKG_IS_TARBZ2
+ bool
diff --git a/packages/development/libevent/libevent.mk b/packages/development/libevent/libevent.mk
index 9de94eb..7cd9f95 100644
--- a/packages/development/libevent/libevent.mk
+++ b/packages/development/libevent/libevent.mk
@@ -23,10 +23,13 @@
# \date December 2009
################################################################################
-LIBEVENT_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_LIBEVENT_VERSION_STRING)))
+LIBEVENT_NAME := libevent
+LIBEVENT_VERSION := $(call EMBTK_GET_PKG_VERSION,LIBEVENT)
LIBEVENT_SITE := http://www.monkey.org/~provos
+LIBEVENT_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
LIBEVENT_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/libevent/$(LIBEVENT_VERSION)
LIBEVENT_PACKAGE := libevent-$(LIBEVENT_VERSION).tar.gz
+LIBEVENT_SRC_DIR := $(PACKAGES_BUILD)/libevent-$(LIBEVENT_VERSION)
LIBEVENT_BUILD_DIR := $(PACKAGES_BUILD)/libevent-$(LIBEVENT_VERSION)
LIBEVENT_BINS = event_rpcgen.py
@@ -45,7 +48,6 @@ $(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
@@ -53,55 +55,13 @@ $(LIBEVENT_BUILD_DIR)/.installed: $(LIBEVENT_DEPS) download_libevent \
@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
+ $(call EMBTK_DOWNLOAD_PKG,LIBEVENT)
$(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 $@
+ $(call EMBTK_DECOMPRESS_PKG,LIBEVENT)
$(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)" \
- CPPFLAGS="-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 $@
+ $(call EMBTK_CONFIGURE_PKG,LIBEVENT)
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)*
-
+ $(call EMBTK_CLEANUP_PKG,LIBEVENT)