summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2009-12-29 21:45:41 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2009-12-30 12:48:02 (GMT)
commit21bab8862f3c2906af347e5a993ce4cd36c1b063 (patch)
tree0d1e9ec15f66c61088c12cb791ec7cdf0b01cdc1
parent073af428efc21d7717c003e93a098d0767de3b0c (diff)
downloadbuildroot-21bab8862f3c2906af347e5a993ce4cd36c1b063.tar.gz
buildroot-21bab8862f3c2906af347e5a993ce4cd36c1b063.tar.bz2
jpeg: convert to autotools infrastructure
[Peter: has own libtool patch, use std staging install, fix target install] Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/jpeg/jpeg.mk77
1 files changed, 8 insertions, 69 deletions
diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk
index 2688084..c3754d4 100644
--- a/package/jpeg/jpeg.mk
+++ b/package/jpeg/jpeg.mk
@@ -21,77 +21,16 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
JPEG_VERSION:=6b
-JPEG_DIR=$(BUILD_DIR)/jpeg-$(JPEG_VERSION)
JPEG_SITE:=ftp://ftp.uu.net/graphics/jpeg/
JPEG_SOURCE=jpegsrc.v$(JPEG_VERSION).tar.gz
-JPEG_CAT:=$(ZCAT)
+JPEG_INSTALL_STAGING = YES
+JPEG_INSTALL_TARGET = YES
+JPEG_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
+JPEG_LIBTOOL_PATCH = NO
+JPEG_CONF_OPT = --without-x --enable-shared --enable-static
-$(DL_DIR)/$(JPEG_SOURCE):
- $(call DOWNLOAD,$(JPEG_SITE),$(JPEG_SOURCE))
+$(eval $(call AUTOTARGETS,package,jpeg))
-jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
-
-$(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
- $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(JPEG_DIR) package/jpeg/ jpeg\*.patch
- $(CONFIG_UPDATE) $(JPEG_DIR)
- touch $@
-
-$(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
- (cd $(JPEG_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure $(QUIET) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libdir=/usr/lib \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --includedir=/usr/include \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --enable-shared \
- --enable-static \
- --without-x \
- )
+$(JPEG_HOOK_POST_INSTALL):
+ rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtrans rdjpgcom wrjpgcom)
touch $@
-
-$(JPEG_DIR)/.libs/libjpeg.a: $(JPEG_DIR)/.configured
- $(MAKE) -C $(JPEG_DIR) all
- touch -c $@
-
-$(STAGING_DIR)/usr/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
- $(MAKE) DESTDIR=$(STAGING_DIR) -C $(JPEG_DIR) install
- cp -f $(JPEG_DIR)/libjpeg.la $(STAGING_DIR)/usr/lib
- $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libjpeg.la
- touch -c $@
-
-$(TARGET_DIR)/usr/lib/libjpeg.so: $(STAGING_DIR)/usr/lib/libjpeg.a
- mkdir -p $(TARGET_DIR)/usr/lib
- cp -dpf $(STAGING_DIR)/usr/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libjpeg.so*
- touch -c $@
-
-jpeg: $(TARGET_DIR)/usr/lib/libjpeg.so
-
-jpeg-clean:
- -$(MAKE) -C $(JPEG_DIR) clean
-
-jpeg-dirclean:
- rm -rf $(JPEG_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_JPEG),y)
-TARGETS+=jpeg
-endif