summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-08-06 17:07:35 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-08-06 17:07:35 +0200
commit0453b6ecc414d3e36e6f124554f52b4dc30fbf1b (patch)
treed2174a762a08750ff2d16d7495e38b2083ba3c66
parent572fad93502ab833bf1ddd59cc8c241b40932eab (diff)
downloadembtoolkit-0453b6ecc414d3e36e6f124554f52b4dc30fbf1b.tar.gz
embtoolkit-0453b6ecc414d3e36e6f124554f52b4dc30fbf1b.tar.bz2
embtoolkit-0453b6ecc414d3e36e6f124554f52b4dc30fbf1b.tar.xz
Packages: libjpeg: give ability to choose versions and add libjpeg-v8
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--packages/graphics/libjpeg/libjpeg.kconfig49
-rw-r--r--packages/graphics/libjpeg/libjpeg.mk56
2 files changed, 67 insertions, 38 deletions
diff --git a/packages/graphics/libjpeg/libjpeg.kconfig b/packages/graphics/libjpeg/libjpeg.kconfig
index fc902a3..33d2557 100644
--- a/packages/graphics/libjpeg/libjpeg.kconfig
+++ b/packages/graphics/libjpeg/libjpeg.kconfig
@@ -1,31 +1,48 @@
################################################################################
-# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
-# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved.
+# Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved.
#
-# This program is free software; you can distribute it and/or modify it
-# under the terms of the GNU General Public License
-# (Version 2 or later) published by the Free Software Foundation.
+# 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 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.
+# 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/>.
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
################################################################################
#
# \file libjpeg.kconfig
# \brief libjpeg.kconfig of Embtoolkit
-# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date October 2009
################################################################################
config EMBTK_HAVE_LIBJPEG
bool "Have libjpeg"
help
- JPEG (pronounced "jay-peg") is a standardized image compression
- mechanism. JPEG stands for Joint Photographic Experts Group, the
- original name of the committee that wrote the standard.
+ JPEG (pronounced "jay-peg") is a standardized image compression
+ mechanism. JPEG stands for Joint Photographic Experts Group, the
+ original name of the committee that wrote the standard.
+
+choice
+ prompt "libjpeg version you wish"
+ depends on EMBTK_HAVE_LIBJPEG
+ help
+ Here you can choose which version of libjpeg you want to use.
+
+ config EMBTK_LIBJPEG_VERSION_V8
+ bool "libjpeg-8"
+ config EMBTK_LIBJPEG_VERSION_V7
+ bool "libjpeg-7"
+endchoice
+config EMBTK_LIBJPEG_VERSION_STRING
+ string
+ default "8" if EMBTK_LIBJPEG_VERSION_V8
+ default "7" if EMBTK_LIBJPEG_VERSION_V7
diff --git a/packages/graphics/libjpeg/libjpeg.mk b/packages/graphics/libjpeg/libjpeg.mk
index a25f490..0175539 100644
--- a/packages/graphics/libjpeg/libjpeg.mk
+++ b/packages/graphics/libjpeg/libjpeg.mk
@@ -1,31 +1,32 @@
################################################################################
-# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
-# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved.
+# Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# Copyright(C) 2009-2010 Abdoulaye Walsimou GAYE. All rights reserved.
#
-# This program is free software; you can distribute it and/or modify it
-# under the terms of the GNU General Public License
-# (Version 2 or later) published by the Free Software Foundation.
+# 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 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.
+# 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/>.
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
################################################################################
#
# \file libjpeg.mk
# \brief libjpeg.mk of Embtoolkit
-# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date October 2009
################################################################################
-LIBJPEG_VERSION := v7
+LIBJPEG_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_LIBJPEG_VERSION_STRING)))
LIBJPEG_SITE := http://www.ijg.org/files
-LIBJPEG_PACKAGE := jpegsrc.$(LIBJPEG_VERSION).tar.gz
-LIBJPEG_BUILD_DIR := $(PACKAGES_BUILD)/jpeg-7
+LIBJPEG_PACKAGE := jpegsrc.v$(LIBJPEG_VERSION).tar.gz
+LIBJPEG_BUILD_DIR := $(PACKAGES_BUILD)/jpeg-$(LIBJPEG_VERSION)
LIBJPEG_BINS := cjpeg djpeg jpegtran rdjpgcom wrjpgcom
LIBJPEG_SBINS :=
@@ -58,7 +59,22 @@ $(LIBJPEG_BUILD_DIR)/.decompressed:
$(LIBJPEG_BUILD_DIR)/.configured:
cd $(LIBJPEG_BUILD_DIR); \
- CC=$(TARGETCC_CACHED) CFLAGS="$(TARGET_CFLAGS)" \
+ 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 --enable-static=no --program-suffix=""
@@ -69,9 +85,5 @@ libjpeg_clean:
$(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(LIBJPEG_BINS)
$(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(LIBJPEG_SBINS)
$(Q)-cd $(SYSROOT)/usr/include; rm -rf $(LIBJPEG_INCLUDES)
- $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(LIBJPEG_LIBS)
-ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y)
- $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(LIBJPEG_LIBS)
-endif
-
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(LIBJPEG_LIBS)