Hi,

please add this to the patch. This will avoid patching for host-glib and
therefore avoid the problem I mentioned before.

mol

----------------8<----------------------------------
diff --git a/rules/host-glib.make b/rules/host-glib.make
index 268473f..aa9a296 100644
--- a/rules/host-glib.make
+++ b/rules/host-glib.make
@@ -18,6 +18,14 @@ HOST_PACKAGES-$(PTXCONF_HOST_GLIB) += host-glib
 #
 HOST_GLIB_DIR  = $(HOST_BUILDDIR)/$(GLIB)
 
+#
+# well, well, what can I say: HACK-warning
+#
+# this way we fool the patching not to patch us
+# and the autogen_dep script, not to run autogen on us
+#
+HOST_GLIB      = host-$(GLIB)
+
 ifdef PTXCONF_HOST_GLIB
 $(STATEDIR)/autogen-tools: $(STATEDIR)/host-glib.install.post
 endif
----------------8<----------------------------------

On Tue, Jun 01, 2010 at 10:14:02PM +0200, Robert Schwebel wrote:
> Add glib-2.25.x rules to ptxdist. While being there, remove the now
> obsolete __ marks in the .in file.
> 
> Signed-off-by: Robert Schwebel <r.schwe...@pengutronix.de>
> ---
>  patches/glib-2.25.7/autogen.sh                     |    1 +
>  .../overwrite-glib-compile-schemas.diff            |   63 
> ++++++++++++++++++++
>  patches/glib-2.25.7/series                         |    1 +
>  rules/glib.in                                      |   18 ++++--
>  rules/glib.make                                    |   50 +++++++++++-----
>  5 files changed, 111 insertions(+), 22 deletions(-)
>  create mode 120000 patches/glib-2.25.7/autogen.sh
>  create mode 100644 patches/glib-2.25.7/overwrite-glib-compile-schemas.diff
>  create mode 100644 patches/glib-2.25.7/series
> 
> diff --git a/patches/glib-2.25.7/autogen.sh b/patches/glib-2.25.7/autogen.sh
> new file mode 120000
> index 0000000..9f8a4cb
> --- /dev/null
> +++ b/patches/glib-2.25.7/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/patches/glib-2.25.7/overwrite-glib-compile-schemas.diff 
> b/patches/glib-2.25.7/overwrite-glib-compile-schemas.diff
> new file mode 100644
> index 0000000..b5976f2
> --- /dev/null
> +++ b/patches/glib-2.25.7/overwrite-glib-compile-schemas.diff
> @@ -0,0 +1,63 @@
> +From: Robert Schwebel <r.schwe...@pengutronix.de>
> +Subject: [patch] fix cross compilation in glib-2.25.7
> +
> +When we try to cross compile, the build system compiles
> +glib-compile-schemas for the "host" system, but tries to run it later on
> +the "build" machine.
> +
> +We make it possible to overwrite the call to the binary during
> +configure, similar to what GLIB_GENMARSHAL does.
> +
> +Signed-of-by: Robert Schwebel <r.schwe...@pengutronix.de>
> +
> +---
> +# rsc: https://bugzilla.gnome.org/show_bug.cgi?id=620174
> +
> + configure.in          |   13 ++++++++++---
> + gio/tests/Makefile.am |    2 +-
> + 2 files changed, 11 insertions(+), 4 deletions(-)
> +
> +Index: glib-2.25.7/configure.in
> +===================================================================
> +--- glib-2.25.7.orig/configure.in
> ++++ glib-2.25.7/configure.in
> +@@ -2731,9 +2731,10 @@ int error = EILSEQ;
> + ], have_eilseq=yes, have_eilseq=no);
> + AC_MSG_RESULT($have_eilseq)
> + 
> +-dnl ******************************************************************
> +-dnl *** Look for glib-genmarshal in PATH if we are cross-compiling ***
> +-dnl ******************************************************************
> ++dnl ****************************************************************
> ++dnl *** Look for glib-genmarshal and glib-compile-schemas in PATH **
> ++dnl *** if we are cross-compiling                                 **
> ++dnl ****************************************************************
> + 
> + AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
> + 
> +@@ -2742,6 +2743,12 @@ if test $cross_compiling = yes; then
> +   if test x$GLIB_GENMARSHAL = xno; then
> +     AC_MSG_ERROR(Could not find a glib-genmarshal in your PATH)
> +   fi
> ++  AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas, no)
> ++  if test x$GLIB_COMPILE_SCHEMAS = xno; then
> ++    AC_MSG_ERROR(Could not find a glib-compile-schemas in your PATH)
> ++  fi
> ++else
> ++  AC_SUBST(GLIB_COMPILE_SCHEMAS,"\$(top_builddir)/gio/glib-compile-schemas")
> + fi
> + 
> + dnl **************************
> +Index: glib-2.25.7/gio/tests/Makefile.am
> +===================================================================
> +--- glib-2.25.7.orig/gio/tests/Makefile.am
> ++++ glib-2.25.7/gio/tests/Makefile.am
> +@@ -288,7 +288,7 @@ test.mo: de.po
> +     cp -f test.mo de/LC_MESSAGES
> + 
> + gschemas.compiled:
> +-    $(top_builddir)/gio/glib-compile-schemas --targetdir=$(abs_builddir) 
> $(srcdir)
> ++    $(GLIB_COMPILE_SCHEMAS) --targetdir=$(abs_builddir) $(srcdir)
> + 
> + DISTCLEANFILES =                                        \
> +     applications/mimeinfo.cache                     \
> diff --git a/patches/glib-2.25.7/series b/patches/glib-2.25.7/series
> new file mode 100644
> index 0000000..abda33b
> --- /dev/null
> +++ b/patches/glib-2.25.7/series
> @@ -0,0 +1 @@
> +overwrite-glib-compile-schemas.diff
> diff --git a/rules/glib.in b/rules/glib.in
> index 91dc7dd..60264b6 100644
> --- a/rules/glib.in
> +++ b/rules/glib.in
> @@ -3,10 +3,11 @@
>  menuconfig GLIB
>       tristate
>       prompt "glib                          "
> -     select GETTEXT          if GLIB__GETTEXT_GETTEXT
> -     select GETTEXT_DUMMY    if GLIB__GETTEXT_DUMMY
> +     select GETTEXT          if GLIB_GETTEXT_GETTEXT
> +     select GETTEXT_DUMMY    if GLIB_GETTEXT_DUMMY
>       select HOST_GLIB
>       select ICONV
> +     select ZLIB if GLIB_EXPERIMENTAL
>       help
>         GLib is a library containing many useful C routines for things
>         such as trees, hashes, lists, and strings. It is a useful
> @@ -15,19 +16,24 @@ menuconfig GLIB
>  
>  if GLIB
>  
> +config GLIB_EXPERIMENTAL
> +     bool
> +     prompt "experimental version"
> +
>  choice
> +
>       prompt "gettext variant"
> -     default GLIB__GETTEXT_NONE
> +     default GLIB_GETTEXT_NONE
>  
> -     config GLIB__GETTEXT_NONE
> +     config GLIB_GETTEXT_NONE
>               bool
>               prompt "not needed    "
>  
> -     config GLIB__GETTEXT_GETTEXT
> +     config GLIB_GETTEXT_GETTEXT
>               bool
>               prompt "gnu (gettext) "
>  
> -     config GLIB__GETTEXT_DUMMY
> +     config GLIB_GETTEXT_DUMMY
>               bool
>               prompt "dummy         "
>  
> diff --git a/rules/glib.make b/rules/glib.make
> index 203fe9f..724bb34 100644
> --- a/rules/glib.make
> +++ b/rules/glib.make
> @@ -17,14 +17,22 @@ PACKAGES-$(PTXCONF_GLIB) += glib
>  #
>  # Paths and names
>  #
> +ifdef PTXCONF_GLIB_EXPERIMENTAL
> +GLIB_VERSION := 2.25.7
> +else
>  GLIB_VERSION := 2.22.2
> +endif
>  
>  GLIB         := glib-$(GLIB_VERSION)
>  GLIB_SUFFIX  := tar.bz2
>  GLIB_SOURCE  := $(SRCDIR)/$(GLIB).$(GLIB_SUFFIX)
>  GLIB_DIR     := $(BUILDDIR)/$(GLIB)
>  
> +ifdef PTXCONF_GLIB_EXPERIMENTAL
> +GLIB_URL     := 
> http://ftp.gtk.org/pub/glib/2.25/glib-$(GLIB_VERSION).$(GLIB_SUFFIX)
> +else
>  GLIB_URL     := 
> http://ftp.gtk.org/pub/glib/2.22/glib-$(GLIB_VERSION).$(GLIB_SUFFIX)
> +endif
>  
>  # 
> ----------------------------------------------------------------------------
>  # Get
> @@ -52,6 +60,27 @@ GLIB_ENV   := \
>  # is the right choice for no locales and locales-via-libc
>  #
>  
> +ifdef PTXCONF_GLIB_EXPERIMENTAL
> +GLIB_AUTOCONF := \
> +     $(CROSS_AUTOCONF_USR) \
> +     --enable-silent-rules \
> +     --enable-debug=minimum \
> +     --disable-gc-friendly \
> +     --enable-mem-pools \
> +     --enable-threads \
> +     --with-threads=posix \
> +     --disable-rebuilds \
> +     --disable-included-printf \
> +     --disable-selinux \
> +     --disable-fam \
> +     --disable-xattr \
> +     --disable-gtk-doc \
> +     --disable-man \
> +     --with-pcre=internal \
> +     --enable-static \
> +     --enable-shared \
> +     --with-libiconv=no
> +else
>  GLIB_AUTOCONF := \
>       $(CROSS_AUTOCONF_USR) \
>       --enable-threads \
> @@ -70,28 +99,17 @@ GLIB_AUTOCONF := \
>       --with-gnu-ld \
>       --with-pcre=internal \
>       --with-libiconv=no
> -
> -#  --enable-debug=[no/minimum/yes]
> -#                          turn on debugging [default=minimum]
> -#  --disable-mem-pools     disable all glib memory pools
> -#  --disable-rebuilds      disable all source autogeneration rules
> -#  --disable-visibility    don't use ELF visibility attributes
> -#  --disable-largefile     omit support for large files
> -#  --enable-iconv-cache=[yes/no/auto]
> -#                          cache iconv descriptors [default=auto]
> -#  --disable-regex         disable the compilation of GRegex
> -#
> -#  --with-pic              try to use only PIC/non-PIC objects [default=use
> -#                          both]
> -#  --with-gio-module-dir=PATH
> -#                          Load gio modules from this directory
> -#                          [LIBDIR/gio/modules]
> +endif
>  
>  # 
> ----------------------------------------------------------------------------
>  # Target-Install
>  # 
> ----------------------------------------------------------------------------
>  
> +ifdef PTXCONF_GLIB_EXPERIMENTAL
> +GLIB_LIB_VERSION := 0.2507.0
> +else
>  GLIB_LIB_VERSION := 0.2200.2
> +endif
>  
>  $(STATEDIR)/glib.targetinstall:
>       @$(call targetinfo)
> -- 
> 1.7.1
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to