Skip to contentSkip to conversation

Pull request for branch for-2011.02/remove-config-scripts

GIT PULL New Thomas Petazzoni 2 participants 13 messages Dec 22, 2010 – Dec 23, 2010

lore
Share & tools
lore
#0 lore raw

The following changes since commit 11ab05f53a16f635a27139b33170a9dadba9f3c5:
Peter Korsgaard (1):
qt: svg and multimedia modules depends on gui module as well

are available in the git repository at:

git://git.busybox.net/~tpetazzoni/git/buildroot for-2011.02/remove-config-scripts

Thomas Petazzoni (7):
imagemagick: add patch to fix libxml2 issue and remove useless patch
imagemagick: remove *-config scripts from TARGET_DIR
neon: remove neon-config script from TARGET_DIR
libdnet: remove dnet-config script from TARGET_DIR
libpng: remove libpng*-config scripts from TARGET_DIR
libxml2: remove xml2-config script from TARGET_DIR
libxslt: remove xslt-config script from TARGET_DIR

 .../imagemagick-6.6.4-8-use-xml2-config.patch      |   31 ++++++++++++++++++++
 ....6.4-add-errno-h-if-argz-h-does-not-exist.patch |   11 -------
 package/imagemagick/imagemagick.mk                 |   10 ++++++
 package/libdnet/libdnet.mk                         |    6 ++++
 package/libpng/libpng.mk                           |    7 ++++
 package/libxml2/libxml2.mk                         |    6 ++++
 package/libxslt/libxslt.mk                         |    6 ++++
 package/neon/neon.mk                               |    6 ++++
 8 files changed, 72 insertions(+), 11 deletions(-)
 create mode 100644 package/imagemagick/imagemagick-6.6.4-8-use-xml2-config.patch
 delete mode 100644 package/imagemagick/imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/7 imagemagick: add patch to fix libxml2 issue and remove useless patch

The patch imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch was not applied anymore due to a difference in the version number, and it didn't prevent imagemagick to be built. It was introduced several years ago together with the ImageMagick package itself, so presumably it is no longer needed.

The new patch allows ImageMagick to use the correct xml2-config script to get the proper location for XML2 headers and libraries. Otherwise, -I/usr/include/libxml2 is found in the compile flags.

---
 .../imagemagick-6.6.4-8-use-xml2-config.patch      |   31 ++++++++++++++++++++
 ....6.4-add-errno-h-if-argz-h-does-not-exist.patch |   11 -------
 package/imagemagick/imagemagick.mk                 |    2 +
 3 files changed, 33 insertions(+), 11 deletions(-)
 create mode 100644 package/imagemagick/imagemagick-6.6.4-8-use-xml2-config.patch
 delete mode 100644 package/imagemagick/imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch
package/imagemagick/imagemagick-6.6.4-8-use-xml2-config.patch new file +31 -0
new file mode 100644
index 0000000..bff4c73
@@ -0,0 +1,31 @@
+Use the detected xml2-config script
+
+The AC_CHECK_PROG() macro allows to find the location of a particular
+program. In ImageMagick, it is used to find the location of
+xml2-config, and fills it into the xml2_config
+variable. Unfortunately, the check just below hardcodes `xml2-config
+--prefix`, without using the variable, which defeats the whole purpose
+of having AC_CHECK_PROG().
+
+So, let's use the ${xml2_config} variable instead. This allows to fix
+cross-compilation issues when a non-standard xml2-config location
+needs to be specified.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ configure.ac |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: imagemagick-6.6.4-8/configure.ac
+===================================================================
+--- imagemagick-6.6.4-8.orig/configure.ac
++++ imagemagick-6.6.4-8/configure.ac
+@@ -2549,7 +2549,7 @@
+         # Debian installs libxml headers under /usr/include/libxml2/libxml with
+         # the shared library installed under /usr/lib, whereas the package
+         # installs itself under $prefix/libxml and $prefix/lib.
+-        xml2_prefix=`xml2-config --prefix`
++        xml2_prefix=`${xml2_config} --prefix`
+         if test -d "${xml2_prefix}/include/libxml2"; then
+             CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
+         fi
package/imagemagick/imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch deleted +0 -11
deleted file mode 100644
index 66a6747..0000000
@@ -1,11 +0,0 @@
---- a/configure	2010-09-26 17:05:45.000000000 -0700
-+++ b/configure	2010-09-30 23:47:09.000000000 -0700
-@@ -20354,6 +20354,8 @@ done
- 
- ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if defined(HAVE_ARGZ_H)
- #  include <argz.h>
-+#else
-+#  include <errno.h>
- #endif
- "
- if test "x$ac_cv_type_error_t" = xyes; then :
package/imagemagick/imagemagick.mk +2 -0
index 30158e0..aecf7ae 100644
@@ -9,6 +9,7 @@ IMAGEMAGICK_SOURCE = ImageMagick-$(IMAGEMAGICK_VERSION).tar.bz2
 IMAGEMAGICK_SITE = ftp://ftp.imagemagick.org/pub/ImageMagick
 IMAGEMAGICK_LIBTOOL_PATCH = NO
 IMAGEMAGICK_INSTALL_STAGING = YES
+IMAGEMAGICK_AUTORECONF = YES
 
 ifeq ($(BR2_LARGEFILE),y)
 IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64
@@ -66,6 +67,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBXML2),y)
 IMAGEMAGICK_CONF_OPT += --with-xml
+IMAGEMAGICK_CONF_ENV += ac_cv_prog_xml2_config=$(STAGING_DIR)/usr/bin/xml2-config
 IMAGEMAGICK_DEPENDENCIES += libxml2
 else
 IMAGEMAGICK_CONF_OPT += --without-xml
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 1/7 imagemagick: add patch to fix libxml2 issue and remove useless patch

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> The patch imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch Thomas> was not applied anymore due to a difference in the version number, and Thomas> it didn't prevent imagemagick to be built. It was introduced several Thomas> years ago together with the ImageMagick package itself, so presumably Thomas> it is no longer needed.

Committed, thanks - Please send the xml2-config patch upstream.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/7 imagemagick: add patch to fix libxml2 issue and remove useless patch

Quoted 7 lines · On Wed, 22 Dec 2010 22:15:03 +0100 Peter Korsgaard <[email protected]> wrote:

Thomas> The patch imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch Thomas> was not applied anymore due to a difference in the version number, and Thomas> it didn't prevent imagemagick to be built. It was introduced several Thomas> years ago together with the ImageMagick package itself, so presumably Thomas> it is no longer needed.

Committed, thanks - Please send the xml2-config patch upstream.

Tried yesterday, but their list is not-open to non-subscribers. Will have to subscribe.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 2/7 imagemagick: remove *-config scripts from TARGET_DIR

In reply to Thomas Petazzoni
---
 package/imagemagick/imagemagick.mk |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
package/imagemagick/imagemagick.mk +8 -0
index aecf7ae..035ab7a 100644
@@ -80,4 +80,12 @@ else
 IMAGEMAGICK_CONF_OPT += --without-tiff
 endif
 
+define IMAGEMAGICK_REMOVE_CONFIG_SCRIPTS
+	$(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,	\
+		   $(addsuffix -config,			\
+		     Magick MagickCore MagickWand Wand))
+endef
+
+IMAGEMAGICK_POST_INSTALL_TARGET_HOOKS += IMAGEMAGICK_REMOVE_CONFIG_SCRIPTS
+
 $(eval $(call AUTOTARGETS,package,imagemagick))
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 2/7 imagemagick: remove *-config scripts from TARGET_DIR

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Signed-off-by: Thomas Petazzoni <[email protected]> Thomas> ---

 Thomas>  package/imagemagick/imagemagick.mk |    8 ++++++++

Thomas> 1 files changed, 8 insertions(+), 0 deletions(-)

Thomas> diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk Thomas> index aecf7ae..035ab7a 100644
Thomas> --- a/package/imagemagick/imagemagick.mk
Thomas> +++ b/package/imagemagick/imagemagick.mk
Thomas> @@ -80,4 +80,12 @@ else
Thomas> IMAGEMAGICK_CONF_OPT += --without-tiff
Thomas> endif

Thomas> +define IMAGEMAGICK_REMOVE_CONFIG_SCRIPTS
Thomas> + $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/, \
Thomas> + $(addsuffix -config, \
Thomas> + Magick MagickCore MagickWand Wand))
Thomas> +endef
Thomas> +
Thomas> +IMAGEMAGICK_POST_INSTALL_TARGET_HOOKS += IMAGEMAGICK_REMOVE_CONFIG_SCRIPTS

This (and the rest of the series) should presumably only be done if !BR2_HAVE_DEVFILES?

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

[Buildroot] On the semantic of BR2_HAVE_DEVFILES

Quoted 2 lines · On Wed, 22 Dec 2010 22:18:43 +0100 Peter Korsgaard <[email protected]> wrote:

This (and the rest of the series) should presumably only be done if !BR2_HAVE_DEVFILES?

Well, BR2_HAVE_DEVFILES is quite a mess, and it'd be good to clarify what packages should do or do not regarding BR2_HAVE_DEVFILES. I volunteer to summarize the outcome of the discussion and put that summary into the documentation.

What I find odd is that :

* On one side, when BR2_HAVE_DEVFILES is defined, in target-finalize, we don't remove .a, .la, header files, etc.

* On the other side, when BR2_HAVE_DEVFILES is defined, in the same target-finalize, we also copy the .a, .la and headers files from the $(STAGING_DIR) to the $(TARGET_DIR).

So it really isn't clear what packages should do :

* Should they install everything in $(TARGET_DIR), including development files (.a, .la and headers), and let target-finalize clean-up the unnecessary bits

* Should they not install development files in $(TARGET_DIR), and rely on target-finalize to copy them back from $(STAGING_DIR)

Let's try to make one proposal as a starting point for the discussion:

* All packages should install everything in $(TARGET_DIR), including development files

* All packages should add to a <pkg>_EXTRA_DEVFILES variables the development files that are non-standard (i.e not headers or .a, .la files), so things like *-config scripts.

* In target-finalize, when BR2_HAVE_DEVFILES is not selected, we remove all development files (as we do, but also the list of files in all <pkg>_EXTRA_DEVFILES). Note that with Lionel's work on packages, this clean-up phase will happen directly after the package installation, but that doesn't make much of a difference.

And we get rid of the copy thing that happens in target-finalize when BR2_HAVE_DEVFILES is selected.

Obviously, with this scheme, switching from !BR2_HAVE_DEVFILES to BR2_HAVE_DEVFILES involved a complete rebuild. But that does not seem unreasonable.

Thoughts ?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

[Buildroot] On the semantic of BR2_HAVE_DEVFILES

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Thomas> On Wed, 22 Dec 2010 22:18:43 +0100

Quoted 2 lines · Thomas> Peter Korsgaard <[email protected]> wrote:
Quoted 2 lines

This (and the rest of the series) should presumably only be done if !BR2_HAVE_DEVFILES?

Thomas> Well, BR2_HAVE_DEVFILES is quite a mess, and it'd be good to clarify Thomas> what packages should do or do not regarding BR2_HAVE_DEVFILES. I Thomas> volunteer to summarize the outcome of the discussion and put that Thomas> summary into the documentation.

I've never had a need for HAVE_DEVFILES (It was added by John Voltz in 2008 - bc67ca29d36), but I'll try.

Thomas> What I find odd is that :

Thomas> * On one side, when BR2_HAVE_DEVFILES is defined, in target-finalize,
Thomas> we don't remove .a, .la, header files, etc.

Thomas> * On the other side, when BR2_HAVE_DEVFILES is defined, in the same
Thomas> target-finalize, we also copy the .a, .la and headers files from the
Thomas> $(STAGING_DIR) to the $(TARGET_DIR).

This 2nd step was afaik for old packages that didn't just do make DESTDIR=$(TARGET_DIR) install.

Thomas> So it really isn't clear what packages should do :

Thomas> * Should they install everything in $(TARGET_DIR), including
Thomas> development files (.a, .la and headers), and let target-finalize
Thomas> clean-up the unnecessary bits

That's what I would prefer. It's the simplest option.

Thomas> Let's try to make one proposal as a starting point for the discussion:

Thomas> * All packages should install everything in $(TARGET_DIR), including
Thomas> development files

Check.

Thomas> * All packages should add to a <pkg>_EXTRA_DEVFILES variables the
Thomas> development files that are non-standard (i.e not headers or .a, .la
Thomas> files), so things like *-config scripts.

For generic cleanup support? I guess we could do that, if it doesn't complicate stuff too much.

Thomas> * In target-finalize, when BR2_HAVE_DEVFILES is not selected, we

 Thomas>    remove all development files (as we do, but also the list of files
 Thomas>    in all <pkg>_EXTRA_DEVFILES). Note that with Lionel's work on
 Thomas>    packages, this clean-up phase will happen directly after the package
 Thomas>    installation, but that doesn't make much of a difference.

Thomas> And we get rid of the copy thing that happens in target-finalize when Thomas> BR2_HAVE_DEVFILES is selected.

Yes, once all packages are converted.

Thomas> Obviously, with this scheme, switching from !BR2_HAVE_DEVFILES to Thomas> BR2_HAVE_DEVFILES involved a complete rebuild. But that does not seem Thomas> unreasonable.

That's imho OK.

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

PATCH 3/7 neon: remove neon-config script from TARGET_DIR

In reply to Thomas Petazzoni
---
 package/neon/neon.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
package/neon/neon.mk +6 -0
index c570fc1..41d8fa1 100644
@@ -45,4 +45,10 @@ else
 NEON_CONF_OPT+=--without-ssl
 endif
 
+define NEON_REMOVE_CONFIG_SCRIPTS
+	$(RM) -f $(TARGET_DIR)/usr/bin/neon-config
+endef
+
+NEON_POST_INSTALL_TARGET_HOOKS += NEON_REMOVE_CONFIG_SCRIPTS
+
 $(eval $(call AUTOTARGETS,package,neon))
Signature · 1 line
1.7.0.4
#9 lore raw

PATCH 4/7 libdnet: remove dnet-config script from TARGET_DIR

In reply to Thomas Petazzoni
---
 package/libdnet/libdnet.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
package/libdnet/libdnet.mk +6 -0
index eb67b05..d3d58e5 100644
@@ -31,4 +31,10 @@ endef
 
 LIBDNET_POST_EXTRACT_HOOKS += LIBDNET_FIXUP_ACINCLUDE_M4
 
+define LIBDNET_REMOVE_CONFIG_SCRIPT
+	$(RM) -f $(TARGET_DIR)/usr/bin/dnet-config
+endef
+
+LIBDNET_POST_INSTALL_TARGET_HOOKS += LIBDNET_REMOVE_CONFIG_SCRIPT
+
 $(eval $(call AUTOTARGETS,package,libdnet))
Signature · 1 line
1.7.0.4
#10 lore raw

PATCH 5/7 libpng: remove libpng*-config scripts from TARGET_DIR

In reply to Thomas Petazzoni
---
 package/libpng/libpng.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
package/libpng/libpng.mk +7 -0
index 82b88da..d655199 100644
@@ -23,5 +23,12 @@ endef
 
 LIBPNG_POST_INSTALL_STAGING_HOOKS += LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP
 
+define LIBPNG_REMOVE_CONFIG_SCRIPTS
+	$(RM) -f $(TARGET_DIR)/usr/bin/libpng$(LIBPNG_SERIES)-config \
+		 $(TARGET_DIR)/usr/bin/libpng-config
+endef
+
+LIBPNG_POST_INSTALL_TARGET_HOOKS += LIBPNG_REMOVE_CONFIG_SCRIPTS
+
 $(eval $(call AUTOTARGETS,package,libpng))
 $(eval $(call AUTOTARGETS,package,libpng,host))
Signature · 1 line
1.7.0.4
#11 lore raw

PATCH 6/7 libxml2: remove xml2-config script from TARGET_DIR

In reply to Thomas Petazzoni
---
 package/libxml2/libxml2.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
package/libxml2/libxml2.mk +6 -0
index 387dce3..b9d036d 100644
@@ -33,6 +33,12 @@ HOST_LIBXML2_CONF_OPT = \
 		--enable-shared --without-debugging --without-python \
 		--without-threads
 
+define LIBXML2_REMOVE_CONFIG_SCRIPTS
+	$(RM) -f $(TARGET_DIR)/usr/bin/xml2-config
+endef
+
+LIBXML2_POST_INSTALL_TARGET_HOOKS += LIBXML2_REMOVE_CONFIG_SCRIPTS
+
 $(eval $(call AUTOTARGETS,package,libxml2))
 $(eval $(call AUTOTARGETS,package,libxml2,host))
 
Signature · 1 line
1.7.0.4
#12 lore raw

PATCH 7/7 libxslt: remove xslt-config script from TARGET_DIR

In reply to Thomas Petazzoni
---
 package/libxslt/libxslt.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
package/libxslt/libxslt.mk +6 -0
index 5437e29..fd64b9a 100644
@@ -40,5 +40,11 @@ endef
 
 LIBXSLT_POST_INSTALL_STAGING_HOOKS += LIBXSLT_XSLT_CONFIG_FIXUP
 
+define LIBXSLT_REMOVE_CONFIG_SCRIPTS
+	$(RM) -f $(TARGET_DIR)/usr/bin/xslt-config
+endef
+
+LIBXSLT_POST_INSTALL_TARGET_HOOKS += LIBXSLT_REMOVE_CONFIG_SCRIPTS
+
 $(eval $(call AUTOTARGETS,package,libxslt))
 $(eval $(call AUTOTARGETS,package,libxslt,host))
Signature · 1 line
1.7.0.4