Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] jpeg: convert to autotools infrastructure
@ 2009-12-29 10:14 Lionel Landwerlin
  2009-12-29 20:51 ` Peter Korsgaard
  0 siblings, 1 reply; 7+ messages in thread
From: Lionel Landwerlin @ 2009-12-29 10:14 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
---
 package/jpeg/jpeg.mk |   73
++++++-------------------------------------------
 1 files changed, 9 insertions(+), 64 deletions(-)

diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk
index 2688084..b4afc24 100644
--- a/package/jpeg/jpeg.mk
+++ b/package/jpeg/jpeg.mk
@@ -21,77 +21,22 @@
 # 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

-$(DL_DIR)/$(JPEG_SOURCE):
-     $(call DOWNLOAD,$(JPEG_SITE),$(JPEG_SOURCE))
+JPEG_CONF_OPT = --without-x --enable-shared --enable-static

-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 \
-    )
-    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
+define JPEG_INSTALL_STAGING_CMDS
+    $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
     $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g"
$(STAGING_DIR)/usr/lib/libjpeg.la
-    touch -c $@
+endef

-$(TARGET_DIR)/usr/lib/libjpeg.so: $(STAGING_DIR)/usr/lib/libjpeg.a
+define JPEG_INSTALL_TARGET_CMDS
     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
+endef

-jpeg-dirclean:
-    rm -rf $(JPEG_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_JPEG),y)
-TARGETS+=jpeg
-endif
+$(eval $(call AUTOTARGETS,package,jpeg))
-- 
1.6.5.7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091229/f937b159/attachment.htm>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-30 16:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-29 10:14 [Buildroot] [PATCH] jpeg: convert to autotools infrastructure Lionel Landwerlin
2009-12-29 20:51 ` Peter Korsgaard
2009-12-29 21:44   ` Lionel Landwerlin
2009-12-29 21:45   ` Lionel Landwerlin
2009-12-30 12:54     ` Peter Korsgaard
2009-12-30 13:07       ` Lionel Landwerlin
2009-12-30 16:41         ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox