* [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* [Buildroot] [PATCH] jpeg: convert to autotools infrastructure
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
0 siblings, 2 replies; 7+ messages in thread
From: Peter Korsgaard @ 2009-12-29 20:51 UTC (permalink / raw)
To: buildroot
>>>>> "Lionel" == Lionel Landwerlin <llandwerlin@gmail.com> writes:
Hi,
Lionel> Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
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.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] jpeg: convert to autotools infrastructure
2009-12-29 20:51 ` Peter Korsgaard
@ 2009-12-29 21:44 ` Lionel Landwerlin
2009-12-29 21:45 ` Lionel Landwerlin
1 sibling, 0 replies; 7+ messages in thread
From: Lionel Landwerlin @ 2009-12-29 21:44 UTC (permalink / raw)
To: buildroot
Le mardi 29 d?cembre 2009 ? 21:51 +0100, Peter Korsgaard a ?crit :
> >>>>> "Lionel" == Lionel Landwerlin <llandwerlin@gmail.com> writes:
>
> Hi,
>
> Lionel> Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
> 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.
>
Sent through gmail because of proxy...
Let's retry without !
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] jpeg: convert to autotools infrastructure
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
1 sibling, 1 reply; 7+ messages in thread
From: Lionel Landwerlin @ 2009-12-29 21:45 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] jpeg: convert to autotools infrastructure
2009-12-29 21:45 ` Lionel Landwerlin
@ 2009-12-30 12:54 ` Peter Korsgaard
2009-12-30 13:07 ` Lionel Landwerlin
0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2009-12-30 12:54 UTC (permalink / raw)
To: buildroot
>>>>> "Lionel" == Lionel Landwerlin <llandwerlin@gmail.com> writes:
Lionel> Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
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).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] jpeg: convert to autotools infrastructure
2009-12-30 12:54 ` Peter Korsgaard
@ 2009-12-30 13:07 ` Lionel Landwerlin
2009-12-30 16:41 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Lionel Landwerlin @ 2009-12-30 13:07 UTC (permalink / raw)
To: buildroot
On Wed, Dec 30, 2009 at 1:54 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
> >>>>> "Lionel" == Lionel Landwerlin <llandwerlin@gmail.com> writes:
>
> Lionel> Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
>
> 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> +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.
>
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.
>
> 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).
>
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] jpeg: convert to autotools infrastructure
2009-12-30 13:07 ` Lionel Landwerlin
@ 2009-12-30 16:41 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2009-12-30 16:41 UTC (permalink / raw)
To: buildroot
>>>>> "Lionel" == Lionel Landwerlin <llandwerlin@gmail.com> 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; \
done
endef
grep staging /tmp/br/staging/usr/lib/libjpeg.la
libdir='/tmp/br/staging/usr/lib'
--
Bye, Peter Korsgaard
^ permalink raw reply [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