gcc-cross-wrapper: Allow to pass US X min version.

This allows to pass a new attribute osxMinVersion to crossSystem, which
specifies the minimum Mac OS X version you want to be compatible to.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
openssl: Use Darwin patch for cross-builds too.

Might be better to have something like stdenv.isDarwinTarget, which can
be used to test for native Darwin _and_ cross-built Darwin as a target.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
audiofile: Use alsaLib for native Linux only.

Using ALSA for non-Linux systems really doesn't make much sense, so
using buildNativeInputs to ensure it won't be used for cross-builds.

Of course, if you're cross-building to Linux, the dependency won't be
used, but right now we don't have a good way to easily check whether the
cross target is Linux.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
libpng12/cross: Don't add zlib for Darwin builds.

Cross builds for Darwin already include the CoreFoundation and the
libraries from XCode, so zlib already exists on that platform.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
SDL: Refactor package and fix Darwin cross-builds.

First of all, this needs two upstream patches for supporting OS X 10.9,
also the cross-gcc doesn't accept -fpascal-strings, so drop the flag.

And except putting all configure flags into a multiline string, we're
now using a list, which is easier when it comes to handling optional
components.

As X isn't used on recent Mac OS X versions and Windows, I'm temporarily
using --without-x for cross-builds until we have a better way to check
for those things.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
cmake: Add patch for fixing Darwin cross-builds.

This is an upstream patch and will eventually get into the next release.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
xcode: Drop use of weak_import on enumerators.

GCC doesn't support attributes on enumerators, which could pose a
problem but fortunately not in this case. Here a
__attribute__((weak_import)) is used, which doesn't make much sense for
enumerators anyway (noone will die because the corresponding enumerator
won't be referenced either in older OS X versions).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>