Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-08-04 Thread Emil Velikov
On 04/08/14 08:34, Chad Versace wrote:
> On 07/31/2014 11:25 AM, Emil Velikov wrote:
>> On 31/07/14 17:37, Chad Versace wrote:
>>> On 07/31/2014 08:15 AM, Chad Versace wrote:
 On 07/31/2014 06:38 AM, Emil Velikov wrote:
> 
>> Do you have any additional comments on the
>> series or shall I resend it addressing the current comments only ?
> 
> I think I've now commented on every patch. If I missed one, please let me 
> know.
> Please resubmit after addressing all the comments so me and Jose can review 
> any
> fixes.
> 
> I haven't yet given the stamp of approval for the two
> patches that break ABI, but please don't wait on that to resubmit.
> 
Huge thanks for the review Chad. Afaics you're covered the whole series.

I've send individual updates for patches - 2, 3, 6, 15 and 16. Also I've added
an additional patch 19 which reworks/cleans the cmocka build, otherwise will
loose it (again) :'(

The whole series can be found in branch 'for-upstream-WGL-1.2', which includes
the earlier Android build fix.

-Emil


___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-08-04 Thread Chad Versace
On 07/31/2014 11:25 AM, Emil Velikov wrote:
> On 31/07/14 17:37, Chad Versace wrote:
>> On 07/31/2014 08:15 AM, Chad Versace wrote:
>>> On 07/31/2014 06:38 AM, Emil Velikov wrote:

> Do you have any additional comments on the
> series or shall I resend it addressing the current comments only ?

I think I've now commented on every patch. If I missed one, please let me know.
Please resubmit after addressing all the comments so me and Jose can review any
fixes.

I haven't yet given the stamp of approval for the two
patches that break ABI, but please don't wait on that to resubmit.

___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-31 Thread Jose Fonseca
No, I only peruse the excellent Archlinux's wiki sometimes, but I'm not 
familiar with the actual distro, so I can't help.

Jose

From: Chad Versace 
Sent: 31 July 2014 04:06
To: Emil Velikov; waffle@lists.freedesktop.org; Jose Fonseca
Subject: Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

Emil, I can't get this PKGBUILD to build. What am I doing wrong?
I'm probably doing a lot wrong, because I've never used mingw before.

I installed all the dependencies listed in the PKGBUILD. Below
is a bash log that shows the build failures.

Jose, do you use Archlinux? Did you have any luck with this PKGBUILD?

On 07/22/2014 08:31 PM, Emil Velikov wrote:
>  - Remove explicit build options (waffle has autodetection).
>  - Correct the destination directories.
>  - Bump mingw64-crt requirement 3.1.0-3 (fixes the strerror_s issue).
>  - Build twice - once for cross-builds and second time for win32 usage.
>
> TODO:
>  - Get CPack to amend the install prefix - fix the "build twice" issue.
>  - Strip some/all of the binaries ?
>  - Current package works of a local git repo. Rename to -git or
> convert to a release one ?
>
> Signed-off-by: Emil Velikov 
> ---
>  pkg/archlinux/mingw-w64-waffle/PKGBUILD | 80 
> +
>  1 file changed, 80 insertions(+)
>  create mode 100644 pkg/archlinux/mingw-w64-waffle/PKGBUILD
>
> diff --git a/pkg/archlinux/mingw-w64-waffle/PKGBUILD 
> b/pkg/archlinux/mingw-w64-waffle/PKGBUILD
> new file mode 100644
> index 000..a2ebde5
> --- /dev/null
> +++ b/pkg/archlinux/mingw-w64-waffle/PKGBUILD
> @@ -0,0 +1,80 @@
> +# Maintainer: Chad Versace 
> +
> +pkgname='mingw-w64-waffle'
> +pkgver='1.3.0'
> +pkgrel=1
> +pkgdesc='a library for choosing window system and OpenGL API at runtime 
> (mingw-w64)'
> +arch=('any')
> +url='https://urldefense.proofpoint.com/v1/url?u=http://waffle-gl.github.io/&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=szKb4hF2Ik5O%2FxpnFqwbR6XKOzdStURP37Ybmzik3Ng%3D%0A&s=a4d4d029b55bb3233c81f3316508d61c0ae85f648aa22b842aeeb07b0a6c580f'
> +license=('BSD')
> +
> +depends=(
> +  'mingw-w64-crt>=3.1.0-3'
> +  )
> +makedepends=(
> +  'mingw-w64-cmake'
> +
> +  # For building the docs.
> +# XXX: Add as soon as we enable docs/manpages
> +#  'libxslt'
> +#  'docbook-xsl'
> +
> +  )
> +
> +options=('!strip' '!buildflags' 'staticlibs')
> +_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
> +
> +srcroot=${HOME}/development/waffle
> +build() {
> +  unset LDFLAGS
> +  cd "${srcroot}"
> +  msg "Building mingw-w64-waffle for cross-building"
> +  for _arch in ${_architectures}; do
> +mkdir -p build-${_arch} && pushd build-${_arch}
> +${_arch}-cmake .. \
> +  -DCMAKE_INSTALL_PREFIX=/usr/${_arch} \
> +  -DCMAKE_INSTALL_LIBDIR=/usr/${_arch}/lib \
> +  -DCMAKE_BUILD_TYPE=Release \
> +  \
> +  -Dwaffle_build_tests=0 \
> +  -Dwaffle_build_manpages=0 \
> +  -Dwaffle_build_htmldocs=0 \
> +  -Dwaffle_build_examples=1
> +make
> +popd
> +  done
> +
> +  # There should be a better way to do this
> +  msg "Building mingw-w64-waffle for native builds"
> +  for _arch in ${_architectures}; do
> +mkdir -p "build-${_arch}-win" && pushd "build-${_arch}-win"
> +${_arch}-cmake .. \
> +  -DCMAKE_INSTALL_PREFIX="" \
> +  -DCMAKE_INSTALL_LIBDIR="lib" \
> +  -DCMAKE_BUILD_TYPE=Release \
> +  \
> +  -Dwaffle_build_tests=0 \
> +  -Dwaffle_build_manpages=0 \
> +  -Dwaffle_build_htmldocs=0 \
> +  -Dwaffle_build_examples=1
> +make
> +popd
> +  done
> +}
> +
> +package() {
> +  for _arch in ${_architectures}; do
> +cd "${srcroot}/build-${_arch}"
> +make DESTDIR="${pkgdir}" install
> +#${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
> +#${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
> +  done
> +
> +  for _arch in ${_architectures}; do
> +cd "${srcroot}/build-${_arch}-win"
> +# Create Windows zip archives
> +make package
> +  done
> +}
> +
> +# vim:set ts=2 sw=2 et:


 Chad's build errors

$ git checkout evelikov/for-upstream-WGL
$ git log -1 --format=%H
ed2164dfb4ae6d957ef853c054357202ba60f883
$ cd pkg/archlinux/mingw-w64-waffle
$
$ # Do a mingw sanity test. It fails :(
$ cat sanity.c
int
main()

Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-31 Thread Emil Velikov
On 31/07/14 17:37, Chad Versace wrote:
> On 07/31/2014 08:15 AM, Chad Versace wrote:
>> On 07/31/2014 06:38 AM, Emil Velikov wrote:
>>> On 31/07/14 04:06, Chad Versace wrote:
>>
> +srcroot=${HOME}/development/waffle
>>
>>> I'm guessing that you've correctly amended the above line to point to the
>>> waffle top folder.
>>
>> Yes, I patched srcroot.
> 
> Before merging this patch, the hard-coded srcroot needs fixing.
> 
> Fix #1: Rename 'srcroot' -> '_srcroot'. From the PKGBUILD manpage:
> 
>  If you need to create any custom variables for use in your build process, it 
> is recommended to prefix
>  their name with an _ (underscore). This will prevent any possible name 
> clashes with internal makepkg
>  variables. For example, to store the base kernel version in a variable, use 
> something similar to
>  $_basekernver.
> 
> Fix #2: Auto-set _srcroot to the *right* thing (the top of the git worktree), 
> unless the user
> overrides it. This is the code-snippet I used when testing the PKGBUILD. The 
> code works for me:
> 
> if [[ ! -v _srcroot ]]; then   
>   msg "Environment variable _srcroot is unset" 
>   msg "Fall back to using git worktree for _srcroot ..."   
>   _srcroot="$(git rev-parse --show-toplevel)" || exit  
>   msg "Using _srcroot=$_srcroot"   
> fi 
> 
Thanks for the underscore notice. Do you have any additional comments on the
series or shall I resend it addressing the current comments only ?

> 
>> I'll update my system today when I have some downtime available for the
>> potential sysadmin breakage, and then try the PKGBUILD again.
> 
> Success!
> 
> $ file pkg/mingw-w64-waffle/usr/x86_64-w64-mingw32/bin/wflinfo.exe 
> pkg/mingw-w64-waffle/usr/x86_64-w64-mingw32/bin/wflinfo.exe: PE32+ executable 
> (console) x86-64, for MS Windows
> 
> I just built a Windows executable on my Linux box ?!?!?!?! This feels... 
> unnatural.
> 
Now try running it to complete the circle :)

-Emil
___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-31 Thread Chad Versace
On 07/31/2014 08:15 AM, Chad Versace wrote:
> On 07/31/2014 06:38 AM, Emil Velikov wrote:
>> On 31/07/14 04:06, Chad Versace wrote:
> 
 +srcroot=${HOME}/development/waffle
> 
>> I'm guessing that you've correctly amended the above line to point to the
>> waffle top folder.
> 
> Yes, I patched srcroot.

Before merging this patch, the hard-coded srcroot needs fixing.

Fix #1: Rename 'srcroot' -> '_srcroot'. From the PKGBUILD manpage:

 If you need to create any custom variables for use in your build process, it 
is recommended to prefix
 their name with an _ (underscore). This will prevent any possible name clashes 
with internal makepkg
 variables. For example, to store the base kernel version in a variable, use 
something similar to
 $_basekernver.

Fix #2: Auto-set _srcroot to the *right* thing (the top of the git worktree), 
unless the user
overrides it. This is the code-snippet I used when testing the PKGBUILD. The 
code works for me:

if [[ ! -v _srcroot ]]; then   
  msg "Environment variable _srcroot is unset" 
  msg "Fall back to using git worktree for _srcroot ..."   
  _srcroot="$(git rev-parse --show-toplevel)" || exit  
  msg "Using _srcroot=$_srcroot"   
fi 


> I'll update my system today when I have some downtime available for the
> potential sysadmin breakage, and then try the PKGBUILD again.

Success!

$ file pkg/mingw-w64-waffle/usr/x86_64-w64-mingw32/bin/wflinfo.exe 
pkg/mingw-w64-waffle/usr/x86_64-w64-mingw32/bin/wflinfo.exe: PE32+ executable 
(console) x86-64, for MS Windows

I just built a Windows executable on my Linux box ?!?!?!?! This feels... 
unnatural.
___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-31 Thread Chad Versace
On 07/31/2014 06:38 AM, Emil Velikov wrote:
> On 31/07/14 04:06, Chad Versace wrote:

>>> +srcroot=${HOME}/development/waffle

> I'm guessing that you've correctly amended the above line to point to the
> waffle top folder.

Yes, I patched srcroot.

> 
> [snip]
>>
>>  Chad's build errors
>>
>> $ git checkout evelikov/for-upstream-WGL
>> $ git log -1 --format=%H
>> ed2164dfb4ae6d957ef853c054357202ba60f883
>> $ cd pkg/archlinux/mingw-w64-waffle
>> $
>> $ # Do a mingw sanity test. It fails :(
>> $ cat sanity.c
>> int
>> main() {
>> return 0;
>> }
>> $ /usr/bin/i686-w64-mingw32-gcc sanity.c
>> $ /usr/lib/gcc/i686-w64-mingw32/4.9.1/cc1: error while loading shared 
>> libraries: libisl.so.13: cannot open shared object file: No such file or 
>> directory
>> $
> The above line is a givaway that something is rather stuffed in your setup.
> 
> Most likely you synced the pacman database then installed only mingw-w64*

That's true. I synced the pacman database without doing a system update.

> Updating the whole system should resolve it:
> $ pacman -Syyu

I'll update my system today when I have some downtime available for the
potential sysadmin breakage, and then try the PKGBUILD again.

___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-31 Thread Emil Velikov
On 31/07/14 04:06, Chad Versace wrote:
> Emil, I can't get this PKGBUILD to build. What am I doing wrong?
> I'm probably doing a lot wrong, because I've never used mingw before.
> 
Hi Chad,

> I installed all the dependencies listed in the PKGBUILD. Below
> is a bash log that shows the build failures.
> 
> Jose, do you use Archlinux? Did you have any luck with this PKGBUILD?
> 
[snip]
>> +srcroot=${HOME}/development/waffle
I'm guessing that you've correctly amended the above line to point to the
waffle top folder.

[snip]
> 
>  Chad's build errors
> 
> $ git checkout evelikov/for-upstream-WGL
> $ git log -1 --format=%H
> ed2164dfb4ae6d957ef853c054357202ba60f883
> $ cd pkg/archlinux/mingw-w64-waffle
> $
> $ # Do a mingw sanity test. It fails :(
> $ cat sanity.c
> int
> main() {
> return 0;
> }
> $ /usr/bin/i686-w64-mingw32-gcc sanity.c
> $ /usr/lib/gcc/i686-w64-mingw32/4.9.1/cc1: error while loading shared 
> libraries: libisl.so.13: cannot open shared object file: No such file or 
> directory
> $
The above line is a givaway that something is rather stuffed in your setup.

Most likely you synced the pacman database then installed only mingw-w64*
which caused some new+old library issues - the mingw*/cloog packages are build
with isl v0.13 while your system has v0.12.

Quick dependency check shows
mingw-w64-crt > mingw-w64-gcc > cloog > isl

Updating the whole system should resolve it:
$ pacman -Syyu

Cheers,
Emil

___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-30 Thread Chad Versace
Emil, I can't get this PKGBUILD to build. What am I doing wrong?
I'm probably doing a lot wrong, because I've never used mingw before.

I installed all the dependencies listed in the PKGBUILD. Below
is a bash log that shows the build failures.

Jose, do you use Archlinux? Did you have any luck with this PKGBUILD?

On 07/22/2014 08:31 PM, Emil Velikov wrote:
>  - Remove explicit build options (waffle has autodetection).
>  - Correct the destination directories.
>  - Bump mingw64-crt requirement 3.1.0-3 (fixes the strerror_s issue).
>  - Build twice - once for cross-builds and second time for win32 usage.
> 
> TODO:
>  - Get CPack to amend the install prefix - fix the "build twice" issue.
>  - Strip some/all of the binaries ?
>  - Current package works of a local git repo. Rename to -git or
> convert to a release one ?
> 
> Signed-off-by: Emil Velikov 
> ---
>  pkg/archlinux/mingw-w64-waffle/PKGBUILD | 80 
> +
>  1 file changed, 80 insertions(+)
>  create mode 100644 pkg/archlinux/mingw-w64-waffle/PKGBUILD
> 
> diff --git a/pkg/archlinux/mingw-w64-waffle/PKGBUILD 
> b/pkg/archlinux/mingw-w64-waffle/PKGBUILD
> new file mode 100644
> index 000..a2ebde5
> --- /dev/null
> +++ b/pkg/archlinux/mingw-w64-waffle/PKGBUILD
> @@ -0,0 +1,80 @@
> +# Maintainer: Chad Versace 
> +
> +pkgname='mingw-w64-waffle'
> +pkgver='1.3.0'
> +pkgrel=1
> +pkgdesc='a library for choosing window system and OpenGL API at runtime 
> (mingw-w64)'
> +arch=('any')
> +url='http://waffle-gl.github.io'
> +license=('BSD')
> +
> +depends=(
> +  'mingw-w64-crt>=3.1.0-3'
> +  )
> +makedepends=(
> +  'mingw-w64-cmake'
> +
> +  # For building the docs.
> +# XXX: Add as soon as we enable docs/manpages
> +#  'libxslt'
> +#  'docbook-xsl'
> +
> +  )
> +
> +options=('!strip' '!buildflags' 'staticlibs')
> +_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
> +
> +srcroot=${HOME}/development/waffle
> +build() {
> +  unset LDFLAGS
> +  cd "${srcroot}"
> +  msg "Building mingw-w64-waffle for cross-building"
> +  for _arch in ${_architectures}; do
> +mkdir -p build-${_arch} && pushd build-${_arch}
> +${_arch}-cmake .. \
> +  -DCMAKE_INSTALL_PREFIX=/usr/${_arch} \
> +  -DCMAKE_INSTALL_LIBDIR=/usr/${_arch}/lib \
> +  -DCMAKE_BUILD_TYPE=Release \
> +  \
> +  -Dwaffle_build_tests=0 \
> +  -Dwaffle_build_manpages=0 \
> +  -Dwaffle_build_htmldocs=0 \
> +  -Dwaffle_build_examples=1
> +make
> +popd
> +  done
> +
> +  # There should be a better way to do this
> +  msg "Building mingw-w64-waffle for native builds"
> +  for _arch in ${_architectures}; do
> +mkdir -p "build-${_arch}-win" && pushd "build-${_arch}-win"
> +${_arch}-cmake .. \
> +  -DCMAKE_INSTALL_PREFIX="" \
> +  -DCMAKE_INSTALL_LIBDIR="lib" \
> +  -DCMAKE_BUILD_TYPE=Release \
> +  \
> +  -Dwaffle_build_tests=0 \
> +  -Dwaffle_build_manpages=0 \
> +  -Dwaffle_build_htmldocs=0 \
> +  -Dwaffle_build_examples=1
> +make
> +popd
> +  done
> +}
> +
> +package() {
> +  for _arch in ${_architectures}; do
> +cd "${srcroot}/build-${_arch}"
> +make DESTDIR="${pkgdir}" install
> +#${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
> +#${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
> +  done
> +
> +  for _arch in ${_architectures}; do
> +cd "${srcroot}/build-${_arch}-win"
> +# Create Windows zip archives
> +make package
> +  done
> +}
> +
> +# vim:set ts=2 sw=2 et:


 Chad's build errors

$ git checkout evelikov/for-upstream-WGL
$ git log -1 --format=%H
ed2164dfb4ae6d957ef853c054357202ba60f883
$ cd pkg/archlinux/mingw-w64-waffle
$
$ # Do a mingw sanity test. It fails :(
$ cat sanity.c
int
main() {
return 0;
}
$ /usr/bin/i686-w64-mingw32-gcc sanity.c
$ /usr/lib/gcc/i686-w64-mingw32/4.9.1/cc1: error while loading shared 
libraries: libisl.so.13: cannot open shared object file: No such file or 
directory
$
$ # Now build Emil's PKGBUILD
$ makepkg
==> Making package: mingw-w64-waffle 1.3.0-1 (Wed Jul 30 19:57:04 PDT 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Starting build()...
==> Building mingw-w64-waffle for cross-building
~/proj/hh/default/src/waffle/build-i686-w64-mingw32 ~/proj/hh/default/src/waffle
-- The C compiler identification is unknown
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- broken
CMake Error at /usr/share/cmake-3.0/Modules/CMakeTestCCompiler.cmake:61 
(message):
  The C compiler "/usr/bin/i686-w64-mingw32-gcc" is not able to compile a
  simple test program.

  It fails with the following output:

   Change Dir: 
/home/chadv/proj/hh/default/src/waffle/build-i686-w64-mingw32/CMakeFiles/CMakeTmp

  

  Run Build Command:"/usr/bin/make" "cmTryCompileExec2618447734/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec2618447734.dir/build.make
  CMakeFil

[waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-22 Thread Emil Velikov
 - Remove explicit build options (waffle has autodetection).
 - Correct the destination directories.
 - Bump mingw64-crt requirement 3.1.0-3 (fixes the strerror_s issue).
 - Build twice - once for cross-builds and second time for win32 usage.

TODO:
 - Get CPack to amend the install prefix - fix the "build twice" issue.
 - Strip some/all of the binaries ?
 - Current package works of a local git repo. Rename to -git or
convert to a release one ?

Signed-off-by: Emil Velikov 
---
 pkg/archlinux/mingw-w64-waffle/PKGBUILD | 80 +
 1 file changed, 80 insertions(+)
 create mode 100644 pkg/archlinux/mingw-w64-waffle/PKGBUILD

diff --git a/pkg/archlinux/mingw-w64-waffle/PKGBUILD 
b/pkg/archlinux/mingw-w64-waffle/PKGBUILD
new file mode 100644
index 000..a2ebde5
--- /dev/null
+++ b/pkg/archlinux/mingw-w64-waffle/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Chad Versace 
+
+pkgname='mingw-w64-waffle'
+pkgver='1.3.0'
+pkgrel=1
+pkgdesc='a library for choosing window system and OpenGL API at runtime 
(mingw-w64)'
+arch=('any')
+url='http://waffle-gl.github.io'
+license=('BSD')
+
+depends=(
+  'mingw-w64-crt>=3.1.0-3'
+  )
+makedepends=(
+  'mingw-w64-cmake'
+
+  # For building the docs.
+# XXX: Add as soon as we enable docs/manpages
+#  'libxslt'
+#  'docbook-xsl'
+
+  )
+
+options=('!strip' '!buildflags' 'staticlibs')
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+srcroot=${HOME}/development/waffle
+build() {
+  unset LDFLAGS
+  cd "${srcroot}"
+  msg "Building mingw-w64-waffle for cross-building"
+  for _arch in ${_architectures}; do
+mkdir -p build-${_arch} && pushd build-${_arch}
+${_arch}-cmake .. \
+  -DCMAKE_INSTALL_PREFIX=/usr/${_arch} \
+  -DCMAKE_INSTALL_LIBDIR=/usr/${_arch}/lib \
+  -DCMAKE_BUILD_TYPE=Release \
+  \
+  -Dwaffle_build_tests=0 \
+  -Dwaffle_build_manpages=0 \
+  -Dwaffle_build_htmldocs=0 \
+  -Dwaffle_build_examples=1
+make
+popd
+  done
+
+  # There should be a better way to do this
+  msg "Building mingw-w64-waffle for native builds"
+  for _arch in ${_architectures}; do
+mkdir -p "build-${_arch}-win" && pushd "build-${_arch}-win"
+${_arch}-cmake .. \
+  -DCMAKE_INSTALL_PREFIX="" \
+  -DCMAKE_INSTALL_LIBDIR="lib" \
+  -DCMAKE_BUILD_TYPE=Release \
+  \
+  -Dwaffle_build_tests=0 \
+  -Dwaffle_build_manpages=0 \
+  -Dwaffle_build_htmldocs=0 \
+  -Dwaffle_build_examples=1
+make
+popd
+  done
+}
+
+package() {
+  for _arch in ${_architectures}; do
+cd "${srcroot}/build-${_arch}"
+make DESTDIR="${pkgdir}" install
+#${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+#${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+  done
+
+  for _arch in ${_architectures}; do
+cd "${srcroot}/build-${_arch}-win"
+# Create Windows zip archives
+make package
+  done
+}
+
+# vim:set ts=2 sw=2 et:
-- 
2.0.2

___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle