summaryrefslogtreecommitdiff
path: root/packages/misc/tslib
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2010-03-29 20:57:16 +0200
committerAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2010-03-29 20:59:32 +0200
commit56fc63c29640a48547f093e503bc2bfe33b1cd3a (patch)
treeac483bcdcee4800be722d53a59a58fc14c1488f5 /packages/misc/tslib
parent7904e261f0d599f8f4ee64dc2ee000779c266ecf (diff)
downloadembtoolkit-56fc63c29640a48547f093e503bc2bfe33b1cd3a.tar.gz
embtoolkit-56fc63c29640a48547f093e503bc2bfe33b1cd3a.tar.bz2
embtoolkit-56fc63c29640a48547f093e503bc2bfe33b1cd3a.tar.xz
Packages: New: Add TSLIB as buildable package
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
Diffstat (limited to 'packages/misc/tslib')
-rw-r--r--packages/misc/tslib/tslib.kconfig47
-rw-r--r--packages/misc/tslib/tslib.mk105
2 files changed, 152 insertions, 0 deletions
diff --git a/packages/misc/tslib/tslib.kconfig b/packages/misc/tslib/tslib.kconfig
new file mode 100644
index 0000000..20b7f62
--- /dev/null
+++ b/packages/misc/tslib/tslib.kconfig
@@ -0,0 +1,47 @@
+################################################################################
+# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# Copyright(C) 2010 GAYE Abdoulaye Walsimou. 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 tslib.kconfig
+# \brief tslib.kconfig of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date March 2010
+################################################################################
+
+config EMBTK_HAVE_TSLIB
+ bool "Have tslib"
+ help
+ tslib description
+choice
+ prompt "tslib version you wish"
+ depends on EMBTK_HAVE_TSLIB
+ help
+ Here you can choose which version of tslib you want to use.
+
+ config EMBTK_TSLIB_VERSION_1_0
+ bool "tslib-1.0"
+ select EMBTK_TSLIB_NEED_PATCH
+endchoice
+
+config EMBTK_TSLIB_VERSION_STRING
+ string
+ default "1.0" if EMBTK_TSLIB_VERSION_1_0
+
+config EMBTK_TSLIB_NEED_PATCH
+ bool
+
diff --git a/packages/misc/tslib/tslib.mk b/packages/misc/tslib/tslib.mk
new file mode 100644
index 0000000..a14884e
--- /dev/null
+++ b/packages/misc/tslib/tslib.mk
@@ -0,0 +1,105 @@
+################################################################################
+# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# Copyright(C) 2010 GAYE Abdoulaye Walsimou. 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 tslib.mk
+# \brief tslib.mk of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date March 2010
+################################################################################
+
+TSLIB_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_TSLIB_VERSION_STRING)))
+TSLIB_SITE := http://download.berlios.de/tslib
+TSLIB_PACKAGE := tslib-$(TSLIB_VERSION).tar.bz2
+TSLIB_BUILD_DIR := $(PACKAGES_BUILD)/tslib-$(TSLIB_VERSION)
+
+TSLIB_BINS = ts_calibrate ts_harvest ts_print ts_print_raw ts_test
+TSLIB_SBINS =
+TSLIB_INCLUDES = tslib.h
+TSLIB_LIBS = libts* ts
+TSLIB_PKGCONFIGS = tslib-*.pc
+
+TSLIB_DEPS =
+
+tslib_install: $(TSLIB_BUILD_DIR)/.installed
+
+$(TSLIB_BUILD_DIR)/.installed: $(TSLIB_DEPS) download_tslib \
+ $(TSLIB_BUILD_DIR)/.decompressed $(TSLIB_BUILD_DIR)/.configured
+ $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
+ tslib-$(TSLIB_VERSION) in your root filesystem...")
+ $(Q)$(MAKE) -C $(TSLIB_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(TSLIB_BUILD_DIR) DESTDIR=$(SYSROOT) install
+ $(Q)$(MAKE) libtool_files_adapt
+ $(Q)$(MAKE) pkgconfig_files_adapt
+ $(Q)-cp -R $(SYSROOT)/usr/$(LIBDIR)/ts $(ROOTFS)/usr/$(LIBDIR)/
+ @touch $@
+
+download_tslib:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(TSLIB_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(TSLIB_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(TSLIB_PACKAGE) \
+ $(TSLIB_SITE)/$(TSLIB_PACKAGE)
+ifeq ($(CONFIG_EMBTK_TSLIB_NEED_PATCH),y)
+ @test -e $(DOWNLOAD_DIR)/tslib-$(TSLIB_VERSION).patch || \
+ wget -O $(DOWNLOAD_DIR)/tslib-$(TSLIB_VERSION).patch \
+ $(TSLIB_PATCH_SITE)/tslib-$(TSLIB_VERSION)-*.patch
+endif
+
+$(TSLIB_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(TSLIB_PACKAGE) ...")
+ @tar -C $(PACKAGES_BUILD) -xjf $(DOWNLOAD_DIR)/$(TSLIB_PACKAGE)
+ifeq ($(CONFIG_EMBTK_TSLIB_NEED_PATCH),y)
+ @cd $(PACKAGES_BUILD)/tslib-$(TSLIB_VERSION); \
+ patch -p1 < $(DOWNLOAD_DIR)/tslib-$(TSLIB_VERSION).patch
+endif
+ @touch $@
+
+$(TSLIB_BUILD_DIR)/.configured:
+ $(Q)cd $(TSLIB_BUILD_DIR); \
+ chmod a+x configure; \
+ 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) \
+ ac_cv_func_malloc_0_nonnull=yes \
+ ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \
+ --target=$(STRICT_GNU_TARGET) --libdir=/usr/$(LIBDIR) \
+ --prefix=/usr
+ @touch $@
+
+tslib_clean:
+ $(call EMBTK_GENERIC_MESSAGE,"cleanup tslib-$(TSLIB_VERSION)...")
+ $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(TSLIB_BINS)
+ $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(TSLIB_SBINS)
+ $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(TSLIB_INCLUDES)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(TSLIB_LIBS)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(TSLIB_PKGCONFIGS)
+