jpeg: convert to autotools infrastructure
PATCH 1/1 jpeg: convert to autotools infrastructure
--- package/jpeg/jpeg.mk | 73 ++++++------------------------------------------- 1 files changed, 9 insertions(+), 64 deletions(-)
package/jpeg/jpeg.mk +3 -8
@@ -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))
Signature · 4 lines
1.6.5.7 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091229/f937b159/attachment.htm>
PATCH 1/1 jpeg: convert to autotools infrastructure
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Lionel" == Lionel Landwerlin <[email protected]> writes:
Hi,
Lionel> Signed-off-by: Lionel Landwerlin <[email protected]>
Lionel> ---
Lionel> ?package/jpeg/jpeg.mk |?? 73 ++++++------------------------------------------- Lionel> ?1 files changed, 9 insertions(+), 64 deletions(-)
Thanks, but the patch is corrupt (some odd unicode character for space):
Applying: jpeg: convert to autotools infrastructure
fatal: corrupt patch at line 10
Patch failed at 0001 jpeg: convert to autotools infrastructure
How are you sending these patches? Could you use plain git send-email instead, that normally does the right thing.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 jpeg: convert to autotools infrastructure
Le mardi 29 d?cembre 2009 ? 21:51 +0100, Peter Korsgaard a ?crit :
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Lionel" == Lionel Landwerlin <[email protected]> writes:
Hi,
Lionel> Signed-off-by: Lionel Landwerlin <[email protected]> Lionel> ---
Lionel> package/jpeg/jpeg.mk | 73 ++++++-------------------------------------------Lionel> 1 files changed, 9 insertions(+), 64 deletions(-)
Quoted 9 lines
Thanks, but the patch is corrupt (some odd unicode character for space):
Applying: jpeg: convert to autotools infrastructure
fatal: corrupt patch at line 10
Patch failed at 0001 jpeg: convert to autotools infrastructureHow are you sending these patches? Could you use plain git send-email instead, that normally does the right thing.
Sent through gmail because of proxy...
Let's retry without !
PATCH 1/1 jpeg: convert to autotools infrastructure
In reply to Peter Korsgaard--- package/jpeg/jpeg.mk | 73 ++++++------------------------------------------- 1 files changed, 9 insertions(+), 64 deletions(-)
package/jpeg/jpeg.mk +9 -64
@@ -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))
Signature · 1 line
1.6.5.7
PATCH 1/1 jpeg: convert to autotools infrastructure
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Lionel" == Lionel Landwerlin <[email protected]> writes:
Lionel> Signed-off-by: Lionel Landwerlin <[email protected]>
Thanks, this time it came through ok.
Committed with some changes, see below.
Lionel> ---
Lionel> package/jpeg/jpeg.mk | 73 ++++++-------------------------------------------
Lionel> 1 files changed, 9 insertions(+), 64 deletions(-)
Lionel> diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk Lionel> index 2688084..b4afc24 100644
Lionel> --- a/package/jpeg/jpeg.mk
Lionel> +++ b/package/jpeg/jpeg.mk
Lionel> @@ -21,77 +21,22 @@
Lionel> # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 Lionel> # USA Lionel> JPEG_VERSION:=6b
Lionel> -JPEG_DIR=$(BUILD_DIR)/jpeg-$(JPEG_VERSION) Lionel> JPEG_SITE:=ftp://ftp.uu.net/graphics/jpeg/ Lionel> JPEG_SOURCE=jpegsrc.v$(JPEG_VERSION).tar.gz Lionel> -JPEG_CAT:=$(ZCAT)
Lionel> +JPEG_INSTALL_STAGING = YES
Lionel> +JPEG_INSTALL_TARGET = YES
Jpeg has it's own libtool patch, so we need JPEG_LIBTOOL_PATCH = NO. You didn't see that as the automatic libtool patching recently got broken.
Lionel> -$(DL_DIR)/$(JPEG_SOURCE):
Lionel> - $(call DOWNLOAD,$(JPEG_SITE),$(JPEG_SOURCE))
Lionel> +JPEG_CONF_OPT = --without-x --enable-shared --enable-static
Lionel> -jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
Lionel> -
Lionel> -$(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
Lionel> - $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
Lionel> - toolchain/patch-kernel.sh $(JPEG_DIR) package/jpeg/ jpeg\*.patch
Lionel> - $(CONFIG_UPDATE) $(JPEG_DIR)
Lionel> - touch $@
Lionel> -
Lionel> -$(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
Lionel> - (cd $(JPEG_DIR); rm -rf config.cache; \
Lionel> - $(TARGET_CONFIGURE_OPTS) \
Lionel> - $(TARGET_CONFIGURE_ARGS) \
Lionel> - ./configure $(QUIET) \
Lionel> - --target=$(GNU_TARGET_NAME) \
Lionel> - --host=$(GNU_TARGET_NAME) \
Lionel> - --build=$(GNU_HOST_NAME) \
Lionel> - --prefix=/usr \
Lionel> - --exec-prefix=/usr \
Lionel> - --bindir=/usr/bin \
Lionel> - --sbindir=/usr/sbin \
Lionel> - --libdir=/usr/lib \
Lionel> - --libexecdir=/usr/lib \
Lionel> - --sysconfdir=/etc \
Lionel> - --datadir=/usr/share \
Lionel> - --localstatedir=/var \
Lionel> - --includedir=/usr/include \
Lionel> - --mandir=/usr/share/man \
Lionel> - --infodir=/usr/share/info \
Lionel> - --enable-shared \
Lionel> - --enable-static \
Lionel> - --without-x \
Lionel> - )
Lionel> - touch $@
Lionel> -
Lionel> -$(JPEG_DIR)/.libs/libjpeg.a: $(JPEG_DIR)/.configured
Lionel> - $(MAKE) -C $(JPEG_DIR) all
Lionel> - touch -c $@
Lionel> -
Lionel> -$(STAGING_DIR)/usr/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
Lionel> - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(JPEG_DIR) install
Lionel> - cp -f $(JPEG_DIR)/libjpeg.la $(STAGING_DIR)/usr/lib
Lionel> +define JPEG_INSTALL_STAGING_CMDS
Lionel> + $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
Lionel> $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libjpeg.la
Lionel> - touch -c $@
Lionel> +endef
The standard staging install handling does this as well, so there's no need for this.
Lionel> -$(TARGET_DIR)/usr/lib/libjpeg.so: $(STAGING_DIR)/usr/lib/libjpeg.a Lionel> +define JPEG_INSTALL_TARGET_CMDS
Lionel> mkdir -p $(TARGET_DIR)/usr/lib Lionel> cp -dpf $(STAGING_DIR)/usr/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/ Lionel> -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libjpeg.so*
It's better to use the existing make install, as that also installs headers/manpages/.. for the people having that enabled and then just use a post-install hook to clean up anything else (in this case the binaries).
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 jpeg: convert to autotools infrastructure
Quoted 19 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Lionel" == Lionel Landwerlin <[email protected]> writes:
Lionel> Signed-off-by: Lionel Landwerlin <[email protected]>
Thanks, this time it came through ok.
Committed with some changes, see below.
Lionel> -$(STAGING_DIR)/usr/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
Lionel> - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(JPEG_DIR) install
Lionel> - cp -f $(JPEG_DIR)/libjpeg.la $(STAGING_DIR)/usr/lib
Lionel> +defineJPEG_INSTALL_STAGING_CMDS
Lionel> + $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
Lionel> $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g"
$(STAGING_DIR)/usr/lib/libjpeg.la
Lionel> - touch -c $@
Lionel> +endef
Quoted 3 lines
The standard staging install handling does this as well, so there's no need for this.
Are you sure it does sed on libjpeg.la ?
I tried without specifying JPEG_INSTALL_STAGING_CMDS and didn't see a libjpeg.la containing the staging directory.
Quoted 10 lines
Lionel> -$(TARGET_DIR)/usr/lib/libjpeg.so:
$(STAGING_DIR)/usr/lib/libjpeg.a
Lionel> +defineJPEG_INSTALL_TARGET_CMDS
Lionel> mkdir -p $(TARGET_DIR)/usr/lib
Lionel> cp -dpf $(STAGING_DIR)/usr/lib/libjpeg.so*
$(TARGET_DIR)/usr/lib/
Lionel> -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)
$(TARGET_DIR)/usr/lib/libjpeg.so*
Quoted 5 lines
It's better to use the existing make install, as that also installs headers/manpages/.. for the people having that enabled and then just use a post-install hook to clean up anything else (in this case the binaries).
I will remember that for next patches, thx.
--
Lionel Landwerlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091230/4c4480f9/attachment.htm>
PATCH 1/1 jpeg: convert to autotools infrastructure
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Lionel" == Lionel Landwerlin <[email protected]> writes:
Hi,
Lionel> The standard staging install handling does this as well, so
Lionel> there's no need for this.
Lionel> Are you sure it does sed on libjpeg.la ?
Lionel> I tried without specifying JPEG_INSTALL_STAGING_CMDS and didn't see a Lionel> libjpeg.la containing the staging directory.
Lionel> ?
Yes - From Makefile.autotools.in:
define $(2)_INSTALL_STAGING_CMDS
$$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C
$$($$(PKG)_SRCDIR)
for i in $$$$(find $(STAGING_DIR)/usr/lib/ -name "*.la"); do \
cp $$$$i $$$$i~; \
$$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \
doneendef
grep staging /tmp/br/staging/usr/lib/libjpeg.la
libdir='/tmp/br/staging/usr/lib'
Signature · 1 line
Bye, Peter Korsgaard