All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows
@ 2017-01-30  8:44 Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 10/19] glib-2.0: Handle packaging .dll and .exe files for mingw32 Nathan Rossi
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

This series enables a number of packages and dependencies to be built
for mingw32. The goal is to enable the building and packaging of QEMU
targeting mingw32 with support for SDL/VNC enabled as well as being able
to execute the qemu* machines of oe-core/meta.

The following series fixes a number of issues with compilation of
certain components that are required to build and distribute QEMU. This
series includes:

 * Enabling 'secure-api' for mingw-w64-headers
 * Fix/enable building of shared libraries for gettext
 * Work around to avoid dependency on bash for glib-2.0, clean up of
   some glib-2.0 appends which are resolved in oe-core meta
 * Better packaging of libgcc for easy use on Windows (deploy dll to
   bindir)
 * Updating FILES_* to support locations for mingw32 output (bindir
   contains .dll) for libgcc, expat, libpcre, gettext, glib-2.0, libsdl,
   libgpg-error and libgcrypt
 * Addition of PACKAGECONFIG options to libsdl, and configuring of
   PACKAGECONFIG for libsdl, glib-2.0 and libgcrypt to handle Windows
   only features and or ability to disable features that do not support
   mingw32/Windows
 * Enabling build of libfdt in the dtc recipe, but skipping dtc itself
 * Fixes for configuring libgpg-error and libgcrypt when targeting
   mingw32

The intended build execution is to allow for 'buildtools-tarball' (or
any populate_sdk target with 'nativesdk-qemu' in TOOLCHAIN_HOST_TASK) to
create an output that includes all dependent nativesdk binaries as well
as a nativesdk QEMU binaries. This series does not however address
fixing the environment setup script or self-extracting installer shell
script that is normally provided by buildtools-tarball.

This series with the multiple oe-core/meta series was tested on the
following target Windows platforms: Windows 10 (64-bit), Windows 8.1
(64-bit) and Windows 7 SP1 (64-bit).

The changes were also tested on the following Linux build hosts: Debian
8 (64-bit), Ubuntu 16.04 (64-bit), CentOS 7 (64-bit).

For convenience this series is also available in the git repository:

  https://github.com/nathanrossi/meta-mingw nrossi/mingw-qemu-v2

This series partly depends on a set of series for oe-core/meta. The
following series are required for building of QEMU (but not all parts of
this series specifically), including dll packaging detection and
libgcrypt support:

  https://patchwork.openembedded.org/series/5049/
  https://patchwork.openembedded.org/series/5050/
  https://patchwork.openembedded.org/series/5051/
  https://patchwork.openembedded.org/series/5052/
  https://patchwork.openembedded.org/series/5053/

A branch which has the series above merged has been published to allow
for easy testing, it is available at:

  https://github.com/nathanrossi/openembedded-core testing/mingw-support-2017-01-30

---

Changes v2:
 * Moved a number of patches from oe-core series to this series
 * Updated cover letter to reflect series additional inclusion
 * Bring cover letter info from oe-core/meta series
 * Updated commit messages

Nathan Rossi (19):
  mingw-w64-headers: Add 'secure-api' PACKAGECONFIG
  libgcc: Relocate and package dll's in bindir
  expat: Fix ${PN}-bin handling for .exe files
  libpcre: Handle shipping .exe and .dll files for mingw32
  gettext_0.19.%.bbappend: Fix/enable shared building of gettext
  gettext_0.19.%.bbappend: Handle packaging .dll's for mingw32
  gettext_0.19.%.bbappend: Handle gettext-libintl .dll packaging
  glib-2.0: Prevent a bash dependency via bash-completion
  glib-2.0: Disable libmount support for mingw32 targets
  glib-2.0: Handle packaging .dll and .exe files for mingw32
  glib-2.0: Clean up unnecessary appends that are resolved in oe-core
  dtc: Only build libfdt for mingw32
  libsdl: Windows specific PACKAGECONFIG
  libsdl: Fix ${PN}-bin handling for .exe files
  libgpg-error: Handle packaging .exe files
  libgpg-error_1.25.bbappend: Add patch to fix configure bug for mingw32
  libgcrypt: Handle packaging of .exe and .def files
  libgcrypt: Disable 'capabilities' for mingw32
  libgcrypt_1.7.3.bbappend: Add patch to fix configure bug for mingw32

 recipes-core/dtc/dtc_%.bbappend                    | 16 ++++++
 recipes-core/expat/expat_%.bbappend                |  3 +
 .../fix-gl_cv_prog_as_underscore-test.patch        | 67 ++++++++++++++++++++++
 recipes-core/gettext/gettext_0.19.%.bbappend       | 11 +++-
 recipes-core/glib-2.0/glib-2.0_%.bbappend          | 17 +++++-
 recipes-devtools/gcc/libgcc_%.bbappend             |  8 ++-
 .../mingw-w64/nativesdk-mingw-w64-headers_3.1.0.bb |  4 ++
 recipes-graphics/libsdl/libsdl_%.bbappend          |  9 +++
 ...c-Set-mym4_revision-to-0-if-not-a-git-rep.patch | 46 +++++++++++++++
 recipes-support/libgcrypt/libgcrypt_%.bbappend     | 11 ++++
 recipes-support/libgcrypt/libgcrypt_1.7.3.bbappend |  6 ++
 ...c-Set-mym4_revision-to-0-if-not-a-git-rep.patch | 46 +++++++++++++++
 .../libgpg-error/libgpg-error_%.bbappend           |  3 +
 .../libgpg-error/libgpg-error_1.25.bbappend        |  6 ++
 recipes-support/libpcre/libpcre_%.bbappend         |  6 ++
 15 files changed, 255 insertions(+), 4 deletions(-)
 create mode 100644 recipes-core/dtc/dtc_%.bbappend
 create mode 100644 recipes-core/expat/expat_%.bbappend
 create mode 100644 recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch
 create mode 100644 recipes-graphics/libsdl/libsdl_%.bbappend
 create mode 100644 recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
 create mode 100644 recipes-support/libgcrypt/libgcrypt_%.bbappend
 create mode 100644 recipes-support/libgcrypt/libgcrypt_1.7.3.bbappend
 create mode 100644 recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
 create mode 100644 recipes-support/libgpg-error/libgpg-error_%.bbappend
 create mode 100644 recipes-support/libgpg-error/libgpg-error_1.25.bbappend
 create mode 100644 recipes-support/libpcre/libpcre_%.bbappend

-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 1/19] mingw-w64-headers: Add 'secure-api' PACKAGECONFIG
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (12 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 17/19] libgcrypt: Handle packaging of .exe and .def files Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 7/19] gettext_0.19.%.bbappend: Handle gettext-libintl .dll packaging Nathan Rossi
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Add the 'secure-api' PACKAGECONFIG and enable it by default. The
'secure-api' feature enables the secure string functions that are
provided in the MS C Runtime e.g. "strerror_s".

These functions are needed for glib-2.0 compilation.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_3.1.0.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_3.1.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_3.1.0.bb
index 06312d604e..5cd4e34e09 100644
--- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_3.1.0.bb
+++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_3.1.0.bb
@@ -18,6 +18,10 @@ inherit autotools nativesdk
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS = ""
 
+PACKAGECONFIG ??= "secure-api"
+
+PACKAGECONFIG[secure-api] = "--enable-secure-api,--disable-secure-api"
+
 do_configure() {
 	oe_runconf
 }
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 2/19] libgcc: Relocate and package dll's in bindir
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (4 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 16/19] libgpg-error_1.25.bbappend: Add patch to fix configure bug for mingw32 Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 9/19] glib-2.0: Disable libmount support for mingw32 targets Nathan Rossi
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Relocate and package the dll's provided by libgcc in bindir. It is
convention that on mingw/windows dll files are installed into the
bindir, this is done to avoid issues with search paths and allows for
execution of binaries without the need to point at a libdir.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-devtools/gcc/libgcc_%.bbappend | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/recipes-devtools/gcc/libgcc_%.bbappend b/recipes-devtools/gcc/libgcc_%.bbappend
index dd95317618..2a95d02cad 100644
--- a/recipes-devtools/gcc/libgcc_%.bbappend
+++ b/recipes-devtools/gcc/libgcc_%.bbappend
@@ -1,2 +1,8 @@
-FILES_${PN}_append_mingw32 = " ${base_libdir}/libgcc*.dll"
+FILES_${PN}_append_mingw32 = " ${bindir}/libgcc*.dll"
 FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a"
+
+do_install_append_mingw32 () {
+	# move the .dll files into bindir
+	install -d ${D}${bindir}
+	mv ${D}${base_libdir}/libgcc*.dll ${D}${bindir}/
+}
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 3/19] expat: Fix ${PN}-bin handling for .exe files
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (10 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 5/19] gettext_0.19.%.bbappend: Fix/enable shared building of gettext Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 17/19] libgcrypt: Handle packaging of .exe and .def files Nathan Rossi
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

For mingw it is convention to have DLLs in bindir. To avoid grouping
anything other that .exe files into the ${PN}-bin package, override it
so that only '*.exe' files are shipped.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-core/expat/expat_%.bbappend | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 recipes-core/expat/expat_%.bbappend

diff --git a/recipes-core/expat/expat_%.bbappend b/recipes-core/expat/expat_%.bbappend
new file mode 100644
index 0000000000..626ea5b938
--- /dev/null
+++ b/recipes-core/expat/expat_%.bbappend
@@ -0,0 +1,3 @@
+
+FILES_${PN}-bin_mingw32 = "${bindir}/*.exe ${sbindir}/*.exe"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 4/19] libpcre: Handle shipping .exe and .dll files for mingw32
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (15 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 14/19] libsdl: Fix ${PN}-bin handling for .exe files Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 6/19] gettext_0.19.%.bbappend: Handle packaging .dll's " Nathan Rossi
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Package the .dll and .exe files into their expected packages.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-support/libpcre/libpcre_%.bbappend | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 recipes-support/libpcre/libpcre_%.bbappend

diff --git a/recipes-support/libpcre/libpcre_%.bbappend b/recipes-support/libpcre/libpcre_%.bbappend
new file mode 100644
index 0000000000..b154f8d3b6
--- /dev/null
+++ b/recipes-support/libpcre/libpcre_%.bbappend
@@ -0,0 +1,6 @@
+
+FILES_libpcrecpp_mingw32 = "${bindir}/libpcrecpp*.dll"
+FILES_libpcreposix_mingw32 = "${bindir}/libpcreposix*.dll"
+FILES_pcregrep_mingw32 = "${bindir}/pcregrep.exe"
+FILES_pcretest_mingw32 = "${bindir}/pcretest.exe"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 5/19] gettext_0.19.%.bbappend: Fix/enable shared building of gettext
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (9 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 18/19] libgcrypt: Disable 'capabilities' " Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 3/19] expat: Fix ${PN}-bin handling for .exe files Nathan Rossi
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Fix building of shared gettext for i686/32-bit mingw32. This adds a
patch which fixes an issue with gnulib that is included in gettext.

This patch does not need to be submitted upstream as it is fixing an
issue with the included version of gnulib. Upstream gnulib has already
fixed this issue and upstream gettext has already updated the included
gnulib, however gettext has not yet made a release that includes this
fix.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 .../fix-gl_cv_prog_as_underscore-test.patch        | 67 ++++++++++++++++++++++
 recipes-core/gettext/gettext_0.19.%.bbappend       |  7 ++-
 2 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch

diff --git a/recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch b/recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch
new file mode 100644
index 0000000000..636789f31d
--- /dev/null
+++ b/recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch
@@ -0,0 +1,67 @@
+Backport gnulib fix for mingw into gettext's included version of gnulib
+
+http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=68b6adebef05670a312fb92b05e7bd089d2ed43a
+
+Upstream-Status: Backport
+Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
+
+--- a/gettext-runtime/gnulib-m4/asm-underscore.m4
++++ b/gettext-runtime/gnulib-m4/asm-underscore.m4
+@@ -27,11 +27,11 @@
+ #endif
+ int foo(void) { return 0; }
+ EOF
+      # Look for the assembly language name in the .s file.
+      AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
+--- a/gettext-runtime/configure
++++ b/gettext-runtime/configure
+@@ -24601,11 +24601,11 @@
+   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; } >/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|^a-zA-Z0-9_)_foo(^a-zA-Z0-9_|$)' conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
+--- a/gettext-tools/gnulib-m4/asm-underscore.m4
++++ b/gettext-tools/gnulib-m4/asm-underscore.m4
+@@ -27,11 +27,11 @@
+ #endif
+ int foo(void) { return 0; }
+ EOF
+      # Look for the assembly language name in the .s file.
+      AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
+--- a/gettext-tools/configure
++++ b/gettext-tools/configure
+@@ -32284,11 +32284,11 @@
+   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; } >/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|^a-zA-Z0-9_)_foo(^a-zA-Z0-9_|$)' conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
index efd10d6bb6..1cf0188ea5 100644
--- a/recipes-core/gettext/gettext_0.19.%.bbappend
+++ b/recipes-core/gettext/gettext_0.19.%.bbappend
@@ -2,5 +2,10 @@ DEPENDS_append_mingw32 = " pthreads-win32"
 LDFLAGS_prepend_mingw32 = " -lpthread "
 
 CFLAGS_append_mingw32 = " -DLIBXML_STATIC"
-EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static --disable-shared "
+EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+SRC_URI_append = " \
+		file://fix-gl_cv_prog_as_underscore-test.patch \
+		"
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 6/19] gettext_0.19.%.bbappend: Handle packaging .dll's for mingw32
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (16 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 4/19] libpcre: Handle shipping .exe and .dll files for mingw32 Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 8/19] glib-2.0: Prevent a bash dependency via bash-completion Nathan Rossi
  2017-03-09 15:58 ` [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Package the libgettext*.dll files in their respective packages.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-core/gettext/gettext_0.19.%.bbappend | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
index 1cf0188ea5..d485cdc70e 100644
--- a/recipes-core/gettext/gettext_0.19.%.bbappend
+++ b/recipes-core/gettext/gettext_0.19.%.bbappend
@@ -9,3 +9,6 @@ SRC_URI_append = " \
 		file://fix-gl_cv_prog_as_underscore-test.patch \
 		"
 
+FILES_libgettextlib_mingw32 = "${bindir}/libgettextlib-*.dll"
+FILES_libgettextsrc_mingw32 = "${bindir}/libgettextsrc-*.dll"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 7/19] gettext_0.19.%.bbappend: Handle gettext-libintl .dll packaging
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (13 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 1/19] mingw-w64-headers: Add 'secure-api' PACKAGECONFIG Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 14/19] libsdl: Fix ${PN}-bin handling for .exe files Nathan Rossi
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

For mingw32 handle packaging of gettext-libintl in bindir.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
Note this patch is separated from the preceding due to being dependent
on a change in oe-core/meta being applied to add the 'gettext-libintl'
package.
---
 recipes-core/gettext/gettext_0.19.%.bbappend | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
index d485cdc70e..6238b3871a 100644
--- a/recipes-core/gettext/gettext_0.19.%.bbappend
+++ b/recipes-core/gettext/gettext_0.19.%.bbappend
@@ -11,4 +11,5 @@ SRC_URI_append = " \
 
 FILES_libgettextlib_mingw32 = "${bindir}/libgettextlib-*.dll"
 FILES_libgettextsrc_mingw32 = "${bindir}/libgettextsrc-*.dll"
+FILES_gettext-libintl_mingw32 = "${bindir}/libintl*.dll"
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 9/19] glib-2.0: Disable libmount support for mingw32 targets
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (5 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 2/19] libgcc: Relocate and package dll's in bindir Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 12/19] dtc: Only build libfdt for mingw32 Nathan Rossi
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

MinGW/Windows does not have support for libmount, so disable it when
targeting mingw32.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-core/glib-2.0/glib-2.0_%.bbappend | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-core/glib-2.0/glib-2.0_%.bbappend b/recipes-core/glib-2.0/glib-2.0_%.bbappend
index 2b9ec53182..5683364c37 100644
--- a/recipes-core/glib-2.0/glib-2.0_%.bbappend
+++ b/recipes-core/glib-2.0/glib-2.0_%.bbappend
@@ -4,3 +4,7 @@ FILES_${PN}_append_mingw32 = " ${libdir}/charset.alias ${libdir}/gthread-2.0.def
 # glib always provides bash-completion output, package the output but prevent
 # the dependency chain on bash (via bash-completion) for mingw32 targets only.
 RDEPENDS_${PN}-bash-completion_remove_mingw32 = "bash-completion"
+
+# libmount is not buildable for mingw/windows
+PACKAGECONFIG_remove_mingw32 = "libmount"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 8/19] glib-2.0: Prevent a bash dependency via bash-completion
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (17 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 6/19] gettext_0.19.%.bbappend: Handle packaging .dll's " Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-03-09 15:58 ` [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Prevent glib-2.0 depending on bash indirectly due to the RDEPEND on
bash-completion. The bash dependency is undesirable due to bash
depending on POSIX compatibility (fork, etc) which is not provided by
MinGW but instead MSYS or CYGWIN.

The glib-2.0 configure does not allow for disabling of bash-completion
output, so instead of disabling the bash-completion bbclass entirely
allow the output to be packaged but remove the
RDEPENDS_${PN}-bash-completion on bash-completion.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-core/glib-2.0/glib-2.0_%.bbappend | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-core/glib-2.0/glib-2.0_%.bbappend b/recipes-core/glib-2.0/glib-2.0_%.bbappend
index d0531d6f4c..2b9ec53182 100644
--- a/recipes-core/glib-2.0/glib-2.0_%.bbappend
+++ b/recipes-core/glib-2.0/glib-2.0_%.bbappend
@@ -1,2 +1,6 @@
 EXTRA_OECONF_mingw32 = "--enable-included-printf=yes ${CORECONF}"
 FILES_${PN}_append_mingw32 = " ${libdir}/charset.alias ${libdir}/gthread-2.0.def"
+
+# glib always provides bash-completion output, package the output but prevent
+# the dependency chain on bash (via bash-completion) for mingw32 targets only.
+RDEPENDS_${PN}-bash-completion_remove_mingw32 = "bash-completion"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 10/19] glib-2.0: Handle packaging .dll and .exe files for mingw32
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 11/19] glib-2.0: Clean up unnecessary appends that are resolved in oe-core Nathan Rossi
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Handle the packaging of .dll files into the ${PN} package, also package
only certain .exe files into the ${PN} and others into the ${PN}-utils
packages. This is required due to the mingw/windows convention where
.dll's are shipped in the bindir.

Move the packaging of *.def into the ${PN}-dev package, it is only used
during development/compilation.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-core/glib-2.0/glib-2.0_%.bbappend | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/recipes-core/glib-2.0/glib-2.0_%.bbappend b/recipes-core/glib-2.0/glib-2.0_%.bbappend
index 5683364c37..2accd7aa83 100644
--- a/recipes-core/glib-2.0/glib-2.0_%.bbappend
+++ b/recipes-core/glib-2.0/glib-2.0_%.bbappend
@@ -1,5 +1,5 @@
 EXTRA_OECONF_mingw32 = "--enable-included-printf=yes ${CORECONF}"
-FILES_${PN}_append_mingw32 = " ${libdir}/charset.alias ${libdir}/gthread-2.0.def"
+FILES_${PN}_append_mingw32 = " ${libdir}/charset.alias"
 
 # glib always provides bash-completion output, package the output but prevent
 # the dependency chain on bash (via bash-completion) for mingw32 targets only.
@@ -8,3 +8,10 @@ RDEPENDS_${PN}-bash-completion_remove_mingw32 = "bash-completion"
 # libmount is not buildable for mingw/windows
 PACKAGECONFIG_remove_mingw32 = "libmount"
 
+FILES_${PN}_append_mingw32 = " \
+		${bindir}/lib*.dll \
+		${libexecdir}/*gio-querymodules.exe \
+		"
+FILES_${PN}-dev_append_mingw32 = " ${libdir}/*.def"
+FILES_${PN}-utils_mingw32 = "${bindir}/*.exe"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 11/19] glib-2.0: Clean up unnecessary appends that are resolved in oe-core
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 10/19] glib-2.0: Handle packaging .dll and .exe files for mingw32 Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 15/19] libgpg-error: Handle packaging .exe files Nathan Rossi
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

The changes that are appended for '--enable-include=printf=yes' and
removal of charset.alias are handled in oe-core.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-core/glib-2.0/glib-2.0_%.bbappend | 2 --
 1 file changed, 2 deletions(-)

diff --git a/recipes-core/glib-2.0/glib-2.0_%.bbappend b/recipes-core/glib-2.0/glib-2.0_%.bbappend
index 2accd7aa83..08f726192f 100644
--- a/recipes-core/glib-2.0/glib-2.0_%.bbappend
+++ b/recipes-core/glib-2.0/glib-2.0_%.bbappend
@@ -1,5 +1,3 @@
-EXTRA_OECONF_mingw32 = "--enable-included-printf=yes ${CORECONF}"
-FILES_${PN}_append_mingw32 = " ${libdir}/charset.alias"
 
 # glib always provides bash-completion output, package the output but prevent
 # the dependency chain on bash (via bash-completion) for mingw32 targets only.
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 12/19] dtc: Only build libfdt for mingw32
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (6 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 9/19] glib-2.0: Disable libmount support for mingw32 targets Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 19/19] libgcrypt_1.7.3.bbappend: Add patch to fix configure bug " Nathan Rossi
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Whilst building libfdt on mingw32 is functional, building dtc for mingw32
is not. This is due to dtc relying on certain POSIX functions as well as
not handling the MSVCRT printf formatting.

This change enables building and installing libfdt only for mingw32,
disabling the build of device-tree-compiler itself.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-core/dtc/dtc_%.bbappend | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 recipes-core/dtc/dtc_%.bbappend

diff --git a/recipes-core/dtc/dtc_%.bbappend b/recipes-core/dtc/dtc_%.bbappend
new file mode 100644
index 0000000000..140693778a
--- /dev/null
+++ b/recipes-core/dtc/dtc_%.bbappend
@@ -0,0 +1,16 @@
+
+do_configure_append_mingw32 () {
+		# don't try to build the other dtc components when installing libs
+		sed -i 's/install-lib: all/install-lib: libfdt/g' ${S}/Makefile
+}
+
+do_compile_mingw32 () {
+		oe_runmake libfdt
+}
+
+do_install_mingw32 () {
+		oe_runmake install-lib install-includes
+}
+
+RDEPENDS_${PN}-misc_remove_mingw32 = "bash"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 13/19] libsdl: Windows specific PACKAGECONFIG
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (2 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 15/19] libgpg-error: Handle packaging .exe files Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 16/19] libgpg-error_1.25.bbappend: Add patch to fix configure bug for mingw32 Nathan Rossi
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Add a PACKAGECONFIG for 'stdio-redirect'. This configure option
enables/disables the Windows only option for redirecting the
stdout/stderr to files instead of to the console.

Add the 'directx' PACKAGECONFIG to configure whether to build with
DirectX support. By default this is enabled (when targeting
mingw32/windows) however this requires the DirectX libraries in order to
include and link against.

Disable X11 support when building for the nativesdk mingw32.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-graphics/libsdl/libsdl_%.bbappend | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 recipes-graphics/libsdl/libsdl_%.bbappend

diff --git a/recipes-graphics/libsdl/libsdl_%.bbappend b/recipes-graphics/libsdl/libsdl_%.bbappend
new file mode 100644
index 0000000000..5f5787d318
--- /dev/null
+++ b/recipes-graphics/libsdl/libsdl_%.bbappend
@@ -0,0 +1,7 @@
+# Disable default x11 support
+PACKAGECONFIG_class-nativesdk_mingw32 = ""
+
+# Configs that only apply to Windows/MinGW
+PACKAGECONFIG[stdio-redirect] = "--enable-stdio-redirect,--disable-stdio-redirect"
+PACKAGECONFIG[directx] = "--enable-directx,--disable-directx"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 14/19] libsdl: Fix ${PN}-bin handling for .exe files
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (14 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 7/19] gettext_0.19.%.bbappend: Handle gettext-libintl .dll packaging Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 4/19] libpcre: Handle shipping .exe and .dll files for mingw32 Nathan Rossi
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

For mingw it is convention to have DLLs in bindir. To avoid grouping
anything other that .exe files into the ${PN}-bin package, override it
so that only '*.exe' files are shipped.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-graphics/libsdl/libsdl_%.bbappend | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/recipes-graphics/libsdl/libsdl_%.bbappend b/recipes-graphics/libsdl/libsdl_%.bbappend
index 5f5787d318..bb65f03d89 100644
--- a/recipes-graphics/libsdl/libsdl_%.bbappend
+++ b/recipes-graphics/libsdl/libsdl_%.bbappend
@@ -5,3 +5,5 @@ PACKAGECONFIG_class-nativesdk_mingw32 = ""
 PACKAGECONFIG[stdio-redirect] = "--enable-stdio-redirect,--disable-stdio-redirect"
 PACKAGECONFIG[directx] = "--enable-directx,--disable-directx"
 
+FILES_${PN}-bin_mingw32 = "${bindir}/*.exe ${sbindir}/*.exe"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 15/19] libgpg-error: Handle packaging .exe files
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 10/19] glib-2.0: Handle packaging .dll and .exe files for mingw32 Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 11/19] glib-2.0: Clean up unnecessary appends that are resolved in oe-core Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 13/19] libsdl: Windows specific PACKAGECONFIG Nathan Rossi
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Handle packaging gpg-error.exe in the -dev package.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-support/libgpg-error/libgpg-error_%.bbappend | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 recipes-support/libgpg-error/libgpg-error_%.bbappend

diff --git a/recipes-support/libgpg-error/libgpg-error_%.bbappend b/recipes-support/libgpg-error/libgpg-error_%.bbappend
new file mode 100644
index 0000000000..8fcfa78225
--- /dev/null
+++ b/recipes-support/libgpg-error/libgpg-error_%.bbappend
@@ -0,0 +1,3 @@
+
+FILES_${PN}-dev_append_mingw32 = " ${bindir}/gpg-error.exe"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 16/19] libgpg-error_1.25.bbappend: Add patch to fix configure bug for mingw32
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (3 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 13/19] libsdl: Windows specific PACKAGECONFIG Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 2/19] libgcc: Relocate and package dll's in bindir Nathan Rossi
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Resolve bug with the generation of the versioninfo.rc file which depends
on the BUILD_REVISION being set during configure. The BUILD_REVISION is
unset when building against tarball source due to no git repository
information. This patch sets the BUILD_REVISION to 0 when no information
is available.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 ...c-Set-mym4_revision-to-0-if-not-a-git-rep.patch | 46 ++++++++++++++++++++++
 .../libgpg-error/libgpg-error_1.25.bbappend        |  6 +++
 2 files changed, 52 insertions(+)
 create mode 100644 recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
 create mode 100644 recipes-support/libgpg-error/libgpg-error_1.25.bbappend

diff --git a/recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch b/recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
new file mode 100644
index 0000000000..ea5a10261c
--- /dev/null
+++ b/recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
@@ -0,0 +1,46 @@
+From 274bb6fc22f8e0bfe521305d5e67eee268cabf7f Mon Sep 17 00:00:00 2001
+From: Nathan Rossi <nathan@nathanrossi.com>
+Date: Fri, 30 Dec 2016 18:02:26 +1000
+Subject: [PATCH] configure.ac: Set 'mym4_revision' to 0 if not a git repo
+
+---
+It is possible for the source to not be located in a git repository
+(e.g. source is from a tarball). In which case the git repository
+information is not available. This results in the mym4_revision being an
+empty string however this value is used in BUILD_FILEVERSION where it is
+assumed to be 4 decimal values. Additionally BUILD_REVISION uses this
+value and is also assumed to be non-empty.
+
+In the case of BUILD_FILEVERSION it is used in versioninfo.rc.in, where
+it must be populated as 4 decimal values due to the expected syntax. In
+cases where it is not (e.g. when BUILD_FILEVERSION = '1,26,0,' a syntax
+error is raised.
+
+    windres: versioninfo.rc.in:21: syntax error
+
+This patch changes mym4_revision so that if the 'git rev-parse' returns
+non-zero (e.g. not in a git repository) the value falls back to '0'.
+This propagates as '0' to both BUILD_FILEVERSION and BUILD_REVISION.
+
+Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
+Upstream-Status: Submitted
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6d4f173d1b..149ac02b5f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,7 +35,7 @@ m4_define([mym4_version_minor], [27])
+ # processing is done by autoconf and not during the configure run.
+ m4_define([mym4_version], [mym4_version_major.mym4_version_minor])
+ m4_define([mym4_revision],
+-          m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
++          m4_esyscmd([(git rev-parse --short HEAD || printf '0') | tr -d '\n\r']))
+ m4_define([mym4_revision_dec],
+           m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
+ m4_define([mym4_betastring],
+-- 
+2.11.0
+
diff --git a/recipes-support/libgpg-error/libgpg-error_1.25.bbappend b/recipes-support/libgpg-error/libgpg-error_1.25.bbappend
new file mode 100644
index 0000000000..e30e37688e
--- /dev/null
+++ b/recipes-support/libgpg-error/libgpg-error_1.25.bbappend
@@ -0,0 +1,6 @@
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = " \
+		file://configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch \
+		"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 17/19] libgcrypt: Handle packaging of .exe and .def files
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (11 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 3/19] expat: Fix ${PN}-bin handling for .exe files Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 1/19] mingw-w64-headers: Add 'secure-api' PACKAGECONFIG Nathan Rossi
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Handle packaging of .exe for the hmac/dumpexp packages. Also add the
packaging of mpicalc.exe to the -dev package.

Also handle the packaging of the .def files into the -dev package.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-support/libgcrypt/libgcrypt_%.bbappend | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 recipes-support/libgcrypt/libgcrypt_%.bbappend

diff --git a/recipes-support/libgcrypt/libgcrypt_%.bbappend b/recipes-support/libgcrypt/libgcrypt_%.bbappend
new file mode 100644
index 0000000000..631cbabb3e
--- /dev/null
+++ b/recipes-support/libgcrypt/libgcrypt_%.bbappend
@@ -0,0 +1,8 @@
+
+FILES_${PN}-dev_append_mingw32 = " \
+		${libdir}/*.def \
+		${bindir}/hmac256.exe \
+		${bindir}/mpicalc.exe \
+		"
+FILES_dumpsexp-dev_append_mingw32 = " ${bindir}/dumpsexp.exe"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 18/19] libgcrypt: Disable 'capabilities' for mingw32
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (8 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 19/19] libgcrypt_1.7.3.bbappend: Add patch to fix configure bug " Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 5/19] gettext_0.19.%.bbappend: Fix/enable shared building of gettext Nathan Rossi
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

libcap does not support mingw32, so disable 'capabilities' support for
the mingw32 targets.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 recipes-support/libgcrypt/libgcrypt_%.bbappend | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-support/libgcrypt/libgcrypt_%.bbappend b/recipes-support/libgcrypt/libgcrypt_%.bbappend
index 631cbabb3e..50dca097fb 100644
--- a/recipes-support/libgcrypt/libgcrypt_%.bbappend
+++ b/recipes-support/libgcrypt/libgcrypt_%.bbappend
@@ -1,4 +1,7 @@
 
+# libcap does not support mingw32
+PACKAGECONFIG_remove_mingw32 = "capabilities"
+
 FILES_${PN}-dev_append_mingw32 = " \
 		${libdir}/*.def \
 		${bindir}/hmac256.exe \
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [meta-mingw][PATCH v2 19/19] libgcrypt_1.7.3.bbappend: Add patch to fix configure bug for mingw32
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (7 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 12/19] dtc: Only build libfdt for mingw32 Nathan Rossi
@ 2017-01-30  8:44 ` Nathan Rossi
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 18/19] libgcrypt: Disable 'capabilities' " Nathan Rossi
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-01-30  8:44 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

Resolve bug with the generation of the versioninfo.rc file which depends
on the BUILD_REVISION being set during configure. The BUILD_REVISION is
unset when building against tarball source due to no git repository
information. This patch sets the BUILD_REVISION to 0 when no information
is available.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 ...c-Set-mym4_revision-to-0-if-not-a-git-rep.patch | 46 ++++++++++++++++++++++
 recipes-support/libgcrypt/libgcrypt_1.7.3.bbappend |  6 +++
 2 files changed, 52 insertions(+)
 create mode 100644 recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
 create mode 100644 recipes-support/libgcrypt/libgcrypt_1.7.3.bbappend

diff --git a/recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch b/recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
new file mode 100644
index 0000000000..b7b407ab4b
--- /dev/null
+++ b/recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
@@ -0,0 +1,46 @@
+From bb6f9e18b5ccef26978f3f3ed2fe7bf3d4d498e7 Mon Sep 17 00:00:00 2001
+From: Nathan Rossi <nathan@nathanrossi.com>
+Date: Fri, 30 Dec 2016 18:02:26 +1000
+Subject: [PATCH] configure.ac: Set 'mym4_revision' to 0 if not a git repo
+
+---
+It is possible for the source to not be located in a git repository
+(e.g. source is from a tarball). In which case the git repository
+information is not available. This results in the mym4_revision being an
+empty string however this value is used in BUILD_FILEVERSION where it is
+assumed to be 4 decimal values. Additionally BUILD_REVISION uses this
+value and is also assumed to be non-empty.
+
+In the case of BUILD_FILEVERSION it is used in versioninfo.rc.in, where
+it must be populated as 4 decimal values due to the expected syntax. In
+cases where it is not (e.g. when BUILD_FILEVERSION = '1,7,5,' a syntax
+error is raised.
+
+    windres: versioninfo.rc.in:21: syntax error
+
+This patch changes mym4_revision so that if the 'git rev-parse' returns
+non-zero (e.g. not in a git repository) the value falls back to '0'.
+This propagates as '0' to both BUILD_FILEVERSION and BUILD_REVISION.
+
+Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
+Upstream-Status: Submitted
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 31c0d553fa..a3deffa6e9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,7 +39,7 @@ m4_define(mym4_version_micro, [0])
+ m4_define(mym4_version,
+           [mym4_version_major.mym4_version_minor.mym4_version_micro])
+ m4_define([mym4_revision],
+-          m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
++          m4_esyscmd([(git rev-parse --short HEAD || printf '0') | tr -d '\n\r']))
+ m4_define([mym4_revision_dec],
+           m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
+ m4_define([mym4_betastring],
+-- 
+2.11.0
+
diff --git a/recipes-support/libgcrypt/libgcrypt_1.7.3.bbappend b/recipes-support/libgcrypt/libgcrypt_1.7.3.bbappend
new file mode 100644
index 0000000000..e30e37688e
--- /dev/null
+++ b/recipes-support/libgcrypt/libgcrypt_1.7.3.bbappend
@@ -0,0 +1,6 @@
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = " \
+		file://configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch \
+		"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows
  2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
                   ` (18 preceding siblings ...)
  2017-01-30  8:44 ` [meta-mingw][PATCH v2 8/19] glib-2.0: Prevent a bash dependency via bash-completion Nathan Rossi
@ 2017-03-09 15:58 ` Nathan Rossi
  19 siblings, 0 replies; 21+ messages in thread
From: Nathan Rossi @ 2017-03-09 15:58 UTC (permalink / raw)
  To: yocto; +Cc: Alistair Francis

On 30 January 2017 at 18:44, Nathan Rossi <nathan@nathanrossi.com> wrote:
> This series enables a number of packages and dependencies to be built
> for mingw32. The goal is to enable the building and packaging of QEMU
> targeting mingw32 with support for SDL/VNC enabled as well as being able
> to execute the qemu* machines of oe-core/meta.
>
> The following series fixes a number of issues with compilation of
> certain components that are required to build and distribute QEMU. This
> series includes:
>
>  * Enabling 'secure-api' for mingw-w64-headers
>  * Fix/enable building of shared libraries for gettext
>  * Work around to avoid dependency on bash for glib-2.0, clean up of
>    some glib-2.0 appends which are resolved in oe-core meta
>  * Better packaging of libgcc for easy use on Windows (deploy dll to
>    bindir)
>  * Updating FILES_* to support locations for mingw32 output (bindir
>    contains .dll) for libgcc, expat, libpcre, gettext, glib-2.0, libsdl,
>    libgpg-error and libgcrypt
>  * Addition of PACKAGECONFIG options to libsdl, and configuring of
>    PACKAGECONFIG for libsdl, glib-2.0 and libgcrypt to handle Windows
>    only features and or ability to disable features that do not support
>    mingw32/Windows
>  * Enabling build of libfdt in the dtc recipe, but skipping dtc itself
>  * Fixes for configuring libgpg-error and libgcrypt when targeting
>    mingw32
>
> The intended build execution is to allow for 'buildtools-tarball' (or
> any populate_sdk target with 'nativesdk-qemu' in TOOLCHAIN_HOST_TASK) to
> create an output that includes all dependent nativesdk binaries as well
> as a nativesdk QEMU binaries. This series does not however address
> fixing the environment setup script or self-extracting installer shell
> script that is normally provided by buildtools-tarball.
>
> This series with the multiple oe-core/meta series was tested on the
> following target Windows platforms: Windows 10 (64-bit), Windows 8.1
> (64-bit) and Windows 7 SP1 (64-bit).
>
> The changes were also tested on the following Linux build hosts: Debian
> 8 (64-bit), Ubuntu 16.04 (64-bit), CentOS 7 (64-bit).
>
> For convenience this series is also available in the git repository:
>
>   https://github.com/nathanrossi/meta-mingw nrossi/mingw-qemu-v2
>
> This series partly depends on a set of series for oe-core/meta. The
> following series are required for building of QEMU (but not all parts of
> this series specifically), including dll packaging detection and
> libgcrypt support:
>
>   https://patchwork.openembedded.org/series/5049/
>   https://patchwork.openembedded.org/series/5050/
>   https://patchwork.openembedded.org/series/5051/
>   https://patchwork.openembedded.org/series/5052/
>   https://patchwork.openembedded.org/series/5053/

These patch series have been merged into oe-core. However the
gettext-libintl packaging patch was moved to a change in meta-mingw
layer as of v3 (see below).

I have updated and pushed a v3 branch of this meta-mingw series to the
meta-mingw-contrib repo here:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-mingw-contrib/log/?h=nrossi/mingw-qemu-v3

    Changes v3:
     * Updated changes to layer on current master of oe/meta
     * Squished the gettext libintl packaging and dll packaging patches
     * Moved the adding of the libintl packaging to meta-mingw

To avoid patch spam, I have skipped sending the v3 patches
individually to the list. Please let me know if patch emails are
desired.

Thanks,
Nathan


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-03-09 15:58 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30  8:44 [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 10/19] glib-2.0: Handle packaging .dll and .exe files for mingw32 Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 11/19] glib-2.0: Clean up unnecessary appends that are resolved in oe-core Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 15/19] libgpg-error: Handle packaging .exe files Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 13/19] libsdl: Windows specific PACKAGECONFIG Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 16/19] libgpg-error_1.25.bbappend: Add patch to fix configure bug for mingw32 Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 2/19] libgcc: Relocate and package dll's in bindir Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 9/19] glib-2.0: Disable libmount support for mingw32 targets Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 12/19] dtc: Only build libfdt for mingw32 Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 19/19] libgcrypt_1.7.3.bbappend: Add patch to fix configure bug " Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 18/19] libgcrypt: Disable 'capabilities' " Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 5/19] gettext_0.19.%.bbappend: Fix/enable shared building of gettext Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 3/19] expat: Fix ${PN}-bin handling for .exe files Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 17/19] libgcrypt: Handle packaging of .exe and .def files Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 1/19] mingw-w64-headers: Add 'secure-api' PACKAGECONFIG Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 7/19] gettext_0.19.%.bbappend: Handle gettext-libintl .dll packaging Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 14/19] libsdl: Fix ${PN}-bin handling for .exe files Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 4/19] libpcre: Handle shipping .exe and .dll files for mingw32 Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 6/19] gettext_0.19.%.bbappend: Handle packaging .dll's " Nathan Rossi
2017-01-30  8:44 ` [meta-mingw][PATCH v2 8/19] glib-2.0: Prevent a bash dependency via bash-completion Nathan Rossi
2017-03-09 15:58 ` [meta-mingw][PATCH v2 0/19] Adding support for building QEMU for Windows Nathan Rossi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.