ntd / aur-fedora-mingw

ArchLinux PKGBUILDs based on Fedora for cross-buildinging GTK+2 and GTK+3 applications (win32 and win64)
MIT License
6 stars 3 forks source link
archlinux cross-compiler-toolchain gobject-introspection gtk gtk3 lua mingw

Collection of PKGBUILDs for cross-building GTK+2 and GTK+3 applications on ArchLinux using a mingw-w64 system. Think of it as a spur of AUR.

The repository is available for cloning on github.

This is how the project is structured:

How to use

These are common PKGBUILD files so you can build them in the way you like, e.g. by using makepkg. Some helper scripts are provided though, just for convenience. They are based on yaourt but you are free to adapt them to other solutions (patches welcome).

If you want you can customise afm-mingw-w64-makedepends/makepkg.common.conf to fit your environment and update afm-mingw-w64-makedepends/PKGBUILD accordingly.

The following commands should build and install both the 32 and 64 bits toolchains:

cd path/to/aur-fedora-mingw/aur
rm */*.pkg.tar.xz # Just to be sure to rebuild everything
env - TERM=$TERM PATH=/usr/bin ./build-all i686
env - TERM=$TERM PATH=/usr/bin ./build-all x86_64

Alternatively you can leverage docker for running the building inside an isolated container. This will only create the packages without installing them. Here is how to do it:

cd path/to/aur-fedora-mingw
docker build -t afm .
docker run -v $(pwd)/src:/home/user/src -v $(pwd)/pkg:/home/user/pkg afm

In both cases, and if everything goes smoothly, at the end you will have pkg/ populated with the binary packages.

Helper scripts

History

I badly needed a MinGW environment for cross-compiling my GTK+ applications on Windows platforms but the PKGBUILDs found in AUR at that time were a mess, i.e. the toolchain was not working out of the box and required a lot of manual work to be put on the road. It was clear nobody was really using it.

Submitting patches and waiting them to be accepted was feasible but really slow and time consuming, so I decided to develop my own PKGBUILDs basing the code on the Fedora MinGW environment as it seems to be the best maintained MinGW toolchain available. As far as I know, also OpenSUSE based its toolchain on the Fedora one.

I am trying to keep these packages in sync with Fedora and, although not mapped exactly 1:1, they are quite close.

Features and limits

Here is the list of (potential) packages provided by this project:

Some additional package are not based on the Fedora ones. They are developed internally and prefixed with afm (AUR Fedora MinGW) to differentiate them from the others:

The build-all helper script can be used as a one-line solution to build all from scratch. It uses yaourt for pulling it the required dependencies either from Archlinux community or from AUR.

If you intend to build the toolchain in your own way, refer to build-all to know the exact order of build, so check it out to see the most up to date list and order of packages.

To keep the dependecies as low as possible, this toolchain does not contain some image format I do not use, most notably SVG and tiff.

External dependencies

Check the source of build-all for knowing the exact dependencies needed. They are pulled in from core, extra, multilib and community. One dependency (mingw-w64-tools) must be compiled from AUR.

License

The code provided by this project is free software released under the MIT license. See COPYING for details.

This license is not extended to the sources of the packages. Every package fetched by this project is free software but you need to hunt inside the source tree to know the exact license.