Patchwork [12/16] glib: rework for osx and mingw32

login
register
mail settings
Submitter Yann Diorcet
Date Oct. 21, 2012, 3:37 p.m.
Message ID <1350833876-9499-12-git-send-email-diorcet.yann@gmail.com>
Download mbox | patch
Permalink /patch/193034/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

Yann Diorcet - Oct. 21, 2012, 3:37 p.m.
From: Yann Diorcet <yann.diorcet@belledonne-communications.com>

---
 recipes/glib/glib-common.inc  |   26 ++++++++++++++++++--------
 recipes/glib/glib-initial.inc |    4 +++-
 2 files changed, 21 insertions(+), 9 deletions(-)
Esben Haabendal - March 2, 2013, 4:41 p.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> ---
>  recipes/glib/glib-common.inc  |   26 ++++++++++++++++++--------
>  recipes/glib/glib-initial.inc |    4 +++-
>  2 files changed, 21 insertions(+), 9 deletions(-)
>
> diff --git a/recipes/glib/glib-common.inc b/recipes/glib/glib-common.inc
> index 8cbb635..f6ac481 100644
> --- a/recipes/glib/glib-common.inc
> +++ b/recipes/glib/glib-common.inc
> @@ -6,12 +6,21 @@ DESCRIPTION = "GLib is a general-purpose utility library, which provides many \
>  
>  inherit c++ autotools
>  
> -DEPENDS = "host-cross:gtk-doc libz libffi ${DEPENDS_NATIVE} ${DEPENDS_HOST_OS}"
> -DEPENDS_NATIVE = "native:libglib native:libgmodule native:glib-utils"
> +DEPENDS = "host-cross:gtk-doc libz libffi ${DEPENDS_NATIVE} ${DEPENDS_LIBINTL} ${DEPENDS_LIBDL} ${DEPENDS_LIBRESOLV}"
> +DEPENDS_NATIVE = "native:libglib native:libgthread native:libgmodule native:glib-utils"
>  DEPENDS_NATIVE:native = ""
> -DEPENDS_HOST_OS = "libdl libpthread libresolv"
> -DEPENDS_HOST_OS:HOST_OS_mingw32 = "libintl"
> -DEPENDS_HOST_OS:native = ""
> +
> +DEPENDS_LIBDL = "libdl"
> +DEPENDS_LIBDL:TARGET_OS_mingw32 = ""
> +DEPENDS_LIBDL:native = ""
> +
> +DEPENDS_LIBRESOLV = "libresolv"
> +DEPENDS_LIBRESOLV:TARGET_OS_mingw32 = ""
> +DEPENDS_LIBRESOLV:native = ""
> +
> +DEPENDS_LIBINTL = ""
> +DEPENDS_LIBINTL:TARGET_OS_mingw32 = "libintl"
> +DEPENDS_LIBINTL:TARGET_OS_darwin = "libintl"
>  
>  require conf/fetch/gnome.conf
>  SRC_URI_SUBDIR = "${@'.'.join(d.getVar('PV', True).split('.')[:2])}"
> @@ -51,12 +60,13 @@ DEPENDS_THREADS = ""
>  DEPENDS_FAM = ""
>  DEPENDS_PCRE = ""
>  
> +DEPENDS_${PN}-utils += "${PN}-libgio"
>  DEPENDS_${PN} += "libffi"
> -DEPENDS_${PN}-libglib += "libc libgcc ${DEPENDS_PCRE} ${DEPENDS_HOST_OS}"
> +DEPENDS_${PN}-libglib += "libc libgcc ${DEPENDS_PCRE} ${DEPENDS_LIBDL} ${DEPENDS_LIBINTL} ${DEPENDS_LIBRESOLV}"
>  DEPENDS_${PN}-libgthread += "libc libglib ${DEPENDS_THREADS} ${DEPENDS_PCRE}"
>  DEPENDS_${PN}-libgobject += "libc libffi libglib libgthread ${DEPENDS_THREADS} ${DEPENDS_PCRE}"
> -DEPENDS_${PN}-libgmodule += "libc libdl libglib ${DEPENDS_PCRE}"
> -DEPENDS_${PN}-libgio     += "libc libgcc libdl libresolv libz libffi libglib libgmodule libgobject libgthread ${DEPENDS_PCRE} ${DEPENDS_THREADS}"
> +DEPENDS_${PN}-libgmodule += "libc ${DEPENDS_LIBDL} libglib ${DEPENDS_PCRE}"
> +DEPENDS_${PN}-libgio     += "libc libgcc ${DEPENDS_LIBDL} ${DEPENDS_LIBRESOLV} libz libffi libglib libgmodule libgobject libgthread ${DEPENDS_PCRE} ${DEPENDS_THREADS}"
>  
>  FILES_${PN}-libgio-dev = "${libdir}/pkgconfig/gio-*-2.0.pc"
>  FILES_${PN}-libgmodule-dev = "${libdir}/pkgconfig/gmodule-*-2.0.pc"
> diff --git a/recipes/glib/glib-initial.inc b/recipes/glib/glib-initial.inc
> index 8ce27c5..520ca0a 100644
> --- a/recipes/glib/glib-initial.inc
> +++ b/recipes/glib/glib-initial.inc
> @@ -17,7 +17,9 @@ EXTRA_OECONF += 'DBUS1_CFLAGS=""'
>  EXTRA_OECONF += 'DBUS1_LIBS=""'
>  
>  # Minimize external dependencies for native glib
> -EXTRA_OECONF += "--with-libiconv=no"
> +EXTRA_OECONF += "${EXTRA_OECONF_ICONV}"
> +EXTRA_OECONF_ICONV = "--with-libiconv=no"
> +EXTRA_OECONF_ICONV:HOST_OS_darwin = "--with-libiconv=native"
>  EXTRA_OECONF += "--with-pcre=internal"
>  
>  do_patch[postfuncs] += "do_patch_glib_gettextize_native"

Merged to master, with a bit of rework.

/Esben

Patch

diff --git a/recipes/glib/glib-common.inc b/recipes/glib/glib-common.inc
index 8cbb635..f6ac481 100644
--- a/recipes/glib/glib-common.inc
+++ b/recipes/glib/glib-common.inc
@@ -6,12 +6,21 @@  DESCRIPTION = "GLib is a general-purpose utility library, which provides many \
 
 inherit c++ autotools
 
-DEPENDS = "host-cross:gtk-doc libz libffi ${DEPENDS_NATIVE} ${DEPENDS_HOST_OS}"
-DEPENDS_NATIVE = "native:libglib native:libgmodule native:glib-utils"
+DEPENDS = "host-cross:gtk-doc libz libffi ${DEPENDS_NATIVE} ${DEPENDS_LIBINTL} ${DEPENDS_LIBDL} ${DEPENDS_LIBRESOLV}"
+DEPENDS_NATIVE = "native:libglib native:libgthread native:libgmodule native:glib-utils"
 DEPENDS_NATIVE:native = ""
-DEPENDS_HOST_OS = "libdl libpthread libresolv"
-DEPENDS_HOST_OS:HOST_OS_mingw32 = "libintl"
-DEPENDS_HOST_OS:native = ""
+
+DEPENDS_LIBDL = "libdl"
+DEPENDS_LIBDL:TARGET_OS_mingw32 = ""
+DEPENDS_LIBDL:native = ""
+
+DEPENDS_LIBRESOLV = "libresolv"
+DEPENDS_LIBRESOLV:TARGET_OS_mingw32 = ""
+DEPENDS_LIBRESOLV:native = ""
+
+DEPENDS_LIBINTL = ""
+DEPENDS_LIBINTL:TARGET_OS_mingw32 = "libintl"
+DEPENDS_LIBINTL:TARGET_OS_darwin = "libintl"
 
 require conf/fetch/gnome.conf
 SRC_URI_SUBDIR = "${@'.'.join(d.getVar('PV', True).split('.')[:2])}"
@@ -51,12 +60,13 @@  DEPENDS_THREADS = ""
 DEPENDS_FAM = ""
 DEPENDS_PCRE = ""
 
+DEPENDS_${PN}-utils += "${PN}-libgio"
 DEPENDS_${PN} += "libffi"
-DEPENDS_${PN}-libglib += "libc libgcc ${DEPENDS_PCRE} ${DEPENDS_HOST_OS}"
+DEPENDS_${PN}-libglib += "libc libgcc ${DEPENDS_PCRE} ${DEPENDS_LIBDL} ${DEPENDS_LIBINTL} ${DEPENDS_LIBRESOLV}"
 DEPENDS_${PN}-libgthread += "libc libglib ${DEPENDS_THREADS} ${DEPENDS_PCRE}"
 DEPENDS_${PN}-libgobject += "libc libffi libglib libgthread ${DEPENDS_THREADS} ${DEPENDS_PCRE}"
-DEPENDS_${PN}-libgmodule += "libc libdl libglib ${DEPENDS_PCRE}"
-DEPENDS_${PN}-libgio     += "libc libgcc libdl libresolv libz libffi libglib libgmodule libgobject libgthread ${DEPENDS_PCRE} ${DEPENDS_THREADS}"
+DEPENDS_${PN}-libgmodule += "libc ${DEPENDS_LIBDL} libglib ${DEPENDS_PCRE}"
+DEPENDS_${PN}-libgio     += "libc libgcc ${DEPENDS_LIBDL} ${DEPENDS_LIBRESOLV} libz libffi libglib libgmodule libgobject libgthread ${DEPENDS_PCRE} ${DEPENDS_THREADS}"
 
 FILES_${PN}-libgio-dev = "${libdir}/pkgconfig/gio-*-2.0.pc"
 FILES_${PN}-libgmodule-dev = "${libdir}/pkgconfig/gmodule-*-2.0.pc"
diff --git a/recipes/glib/glib-initial.inc b/recipes/glib/glib-initial.inc
index 8ce27c5..520ca0a 100644
--- a/recipes/glib/glib-initial.inc
+++ b/recipes/glib/glib-initial.inc
@@ -17,7 +17,9 @@  EXTRA_OECONF += 'DBUS1_CFLAGS=""'
 EXTRA_OECONF += 'DBUS1_LIBS=""'
 
 # Minimize external dependencies for native glib
-EXTRA_OECONF += "--with-libiconv=no"
+EXTRA_OECONF += "${EXTRA_OECONF_ICONV}"
+EXTRA_OECONF_ICONV = "--with-libiconv=no"
+EXTRA_OECONF_ICONV:HOST_OS_darwin = "--with-libiconv=native"
 EXTRA_OECONF += "--with-pcre=internal"
 
 do_patch[postfuncs] += "do_patch_glib_gettextize_native"