summaryrefslogtreecommitdiff
path: root/packages/x11
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-02-27 21:01:42 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-02-27 21:01:42 +0100
commitdf65fc00474cc5e0c63cb429b7623d832c971992 (patch)
tree1d84912f33c4b15520d857a54d86fa01741c39e4 /packages/x11
parente9663836506b91b9380b91f7eb9d770261e9e7eb (diff)
downloadembtoolkit-df65fc00474cc5e0c63cb429b7623d832c971992.tar.gz
embtoolkit-df65fc00474cc5e0c63cb429b7623d832c971992.tar.bz2
embtoolkit-df65fc00474cc5e0c63cb429b7623d832c971992.tar.xz
Packages: X11/xinput: convert to use generic macros
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages/x11')
-rw-r--r--packages/x11/xinput/xinput.kconfig9
-rw-r--r--packages/x11/xinput/xinput.mk69
2 files changed, 13 insertions, 65 deletions
diff --git a/packages/x11/xinput/xinput.kconfig b/packages/x11/xinput/xinput.kconfig
index e249778..6e888af 100644
--- a/packages/x11/xinput/xinput.kconfig
+++ b/packages/x11/xinput/xinput.kconfig
@@ -25,6 +25,7 @@
config EMBTK_HAVE_XINPUT
bool "Have xinput"
+ select EMBTK_XINPUT_PKG_IS_TARBZ2
select EMBTK_HAVE_XPROTO
select EMBTK_HAVE_INPUTPROTO
select EMBTK_HAVE_LIBX11
@@ -51,5 +52,9 @@ config EMBTK_XINPUT_VERSION_STRING
config EMBTK_XINPUT_NEED_PATCH
bool
-
-
+config EMBTK_XINPUT_NEED_AUTORECONF
+ bool
+config EMBTK_XINPUT_PKG_IS_TARGZ
+ bool
+config EMBTK_XINPUT_PKG_IS_TARBZ2
+ bool
diff --git a/packages/x11/xinput/xinput.mk b/packages/x11/xinput/xinput.mk
index cd7d5b4..8a0d835 100644
--- a/packages/x11/xinput/xinput.mk
+++ b/packages/x11/xinput/xinput.mk
@@ -23,10 +23,13 @@
# \date September 2010
################################################################################
+XINPUT_NAME := xinput
XINPUT_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_XINPUT_VERSION_STRING)))
XINPUT_SITE := http://xorg.freedesktop.org/archive/individual/app
+XINPUT_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
XINPUT_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/xinput/$(XINPUT_VERSION)
XINPUT_PACKAGE := xinput-$(XINPUT_VERSION).tar.bz2
+XINPUT_SRC_DIR := $(PACKAGES_BUILD)/xinput-$(XINPUT_VERSION)
XINPUT_BUILD_DIR := $(PACKAGES_BUILD)/xinput-$(XINPUT_VERSION)
XINPUT_BINS = xinput
@@ -39,70 +42,10 @@ XINPUT_DEPS := xproto_install inputproto_install libx11_install \
libxext_install libxi_install
xinput_install:
- @test -e $(XINPUT_BUILD_DIR)/.installed || \
- $(MAKE) $(XINPUT_BUILD_DIR)/.installed
-
-$(XINPUT_BUILD_DIR)/.installed: $(XINPUT_DEPS) download_xinput \
- $(XINPUT_BUILD_DIR)/.decompressed $(XINPUT_BUILD_DIR)/.configured
- $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
- xinput-$(XINPUT_VERSION) in your root filesystem...")
- $(call EMBTK_KILL_LT_RPATH,$(XINPUT_BUILD_DIR))
- $(Q)$(MAKE) -C $(XINPUT_BUILD_DIR) $(J)
- $(Q)$(MAKE) -C $(XINPUT_BUILD_DIR) DESTDIR=$(SYSROOT) install
- $(Q)$(MAKE) libtool_files_adapt
- $(Q)$(MAKE) pkgconfig_files_adapt
- @touch $@
+ $(call EMBTK_INSTALL_PKG,XINPUT)
download_xinput:
- $(call EMBTK_GENERIC_MESSAGE,"Downloading $(XINPUT_PACKAGE) \
- if necessary...")
- @test -e $(DOWNLOAD_DIR)/$(XINPUT_PACKAGE) || \
- wget -O $(DOWNLOAD_DIR)/$(XINPUT_PACKAGE) \
- $(XINPUT_SITE)/$(XINPUT_PACKAGE)
-ifeq ($(CONFIG_EMBTK_XINPUT_NEED_PATCH),y)
- @test -e $(DOWNLOAD_DIR)/xinput-$(XINPUT_VERSION).patch || \
- wget -O $(DOWNLOAD_DIR)/xinput-$(XINPUT_VERSION).patch \
- $(XINPUT_PATCH_SITE)/xinput-$(XINPUT_VERSION)-*.patch
-endif
-
-$(XINPUT_BUILD_DIR)/.decompressed:
- $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(XINPUT_PACKAGE) ...")
- @tar -C $(PACKAGES_BUILD) -xjf $(DOWNLOAD_DIR)/$(XINPUT_PACKAGE)
-ifeq ($(CONFIG_EMBTK_XINPUT_NEED_PATCH),y)
- @cd $(XINPUT_BUILD_DIR); \
- patch -p1 < $(DOWNLOAD_DIR)/xinput-$(XINPUT_VERSION).patch
-endif
- @touch $@
-
-$(XINPUT_BUILD_DIR)/.configured:
- $(Q)cd $(XINPUT_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 $@
+ $(call EMBTK_DOWNLOAD_PKG,XINPUT)
xinput_clean:
- $(call EMBTK_GENERIC_MESSAGE,"cleanup xinput...")
- $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(XINPUT_BINS)
- $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(XINPUT_SBINS)
- $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(XINPUT_INCLUDES)
- $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(XINPUT_LIBS)
- $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(XINPUT_PKGCONFIGS)
- $(Q)-rm -rf $(XINPUT_BUILD_DIR)*
-
+ $(call EMBTK_CLEANUP_PKG,XINPUT)