summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Gerhardy <martin.gerhardy@gmail.com>2010-09-30 15:56:08 (GMT)
committerMartin Gerhardy <martin.gerhardy@gmail.com>2010-09-30 15:56:08 (GMT)
commit2022f74486442d0d65bf611244364be6cbb78d63 (patch)
tree277e0823573c2c0ecd9a95d16e784aea3fddabac
parented5d06f60efc98089f7277aace13925c2b088535 (diff)
downloadmxe-2022f74486442d0d65bf611244364be6cbb78d63.zip
mxe-2022f74486442d0d65bf611244364be6cbb78d63.tar.gz
mxe-2022f74486442d0d65bf611244364be6cbb78d63.tar.bz2
new package: OpenAL
-rw-r--r--src/openal-1-static.patch21
-rw-r--r--src/openal-2-static.patch21
-rw-r--r--src/openal.mk41
3 files changed, 83 insertions, 0 deletions
diff --git a/src/openal-1-static.patch b/src/openal-1-static.patch
new file mode 100644
index 0000000..d18d4dc
--- /dev/null
+++ b/src/openal-1-static.patch
@@ -0,0 +1,21 @@
+--- a/include/AL/al.h 2010-03-29 08:23:32.000000000 +0200
++++ b/include/AL/al.h 2010-09-30 15:45:27.845778136 +0200
+@@ -5,6 +5,10 @@
+ extern "C" {
+ #endif
+
++#if 1
++ #define AL_API
++ #define AL_APIENTRY
++#else
+ #if defined(_WIN32) && !defined(_XBOX)
+ #if defined(AL_BUILD_LIBRARY)
+ #define AL_API __declspec(dllexport)
+@@ -18,6 +22,7 @@
+ #define AL_API extern
+ #endif
+ #endif
++#endif
+
+ #if defined(_WIN32)
+ #define AL_APIENTRY __cdecl
diff --git a/src/openal-2-static.patch b/src/openal-2-static.patch
new file mode 100644
index 0000000..05b2023
--- /dev/null
+++ b/src/openal-2-static.patch
@@ -0,0 +1,21 @@
+--- a/include/AL/alc.h 2010-03-29 08:23:52.000000000 +0200
++++ b/include/AL/alc.h 2010-09-30 15:45:54.681777409 +0200
+@@ -5,6 +5,10 @@
+ extern "C" {
+ #endif
+
++#if 1
++ #define ALC_API
++ #define ALC_APIENTRY
++#else
+ #if defined(_WIN32) && !defined(_XBOX)
+ #if defined(AL_BUILD_LIBRARY)
+ #define ALC_API __declspec(dllexport)
+@@ -18,6 +22,7 @@
+ #define ALC_API extern
+ #endif
+ #endif
++#endif
+
+ #if defined(_WIN32)
+ #define ALC_APIENTRY __cdecl
diff --git a/src/openal.mk b/src/openal.mk
new file mode 100644
index 0000000..8998484
--- /dev/null
+++ b/src/openal.mk
@@ -0,0 +1,41 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# openal
+PKG := openal
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 1.12.854
+$(PKG)_CHECKSUM := 537dc5fad32d227bb5e861506018b46a21e47f26
+$(PKG)_SUBDIR := openal-soft-$($(PKG)_VERSION)
+$(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2
+$(PKG)_WEBSITE := http://kcat.strangesoft.net/openal.html
+$(PKG)_URL := http://kcat.strangesoft.net/openal-releases/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc
+
+define $(PKG)_UPDATE
+ wget -q -O- 'http://kcat.strangesoft.net/openal-releases/' | \
+ $(SED) -n 's,.*openal-soft-\([0-9][^<]*\)\.tar.*,\1,p' | \
+ tail -1
+endef
+
+define $(PKG)_BUILD
+ cd '$(1)/build' && cmake .. \
+ -DCMAKE_SYSTEM_NAME=Windows \
+ -DCMAKE_FIND_ROOT_PATH='$(PREFIX)/$(TARGET)' \
+ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
+ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
+ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
+ -DCMAKE_C_COMPILER='$(PREFIX)/bin/$(TARGET)-gcc' \
+ -DCMAKE_CXX_COMPILER='$(PREFIX)/bin/$(TARGET)-gcc' \
+ -DCMAKE_INCLUDE_PATH='$(PREFIX)/$(TARGET)/include' \
+ -DCMAKE_LIB_PATH='$(PREFIX)/$(TARGET)/lib' \
+ -DPKG_CONFIG_EXECUTABLE=$(TARGET)-pkg-config \
+ -DCMAKE_INSTALL_PREFIX='$(PREFIX)/$(TARGET)' \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLIBTYPE=STATIC
+ cd '$(1)/build' && $(MAKE) -j '$(JOBS)'
+ cd '$(1)/build' && cp -fv OpenAL32.a $(PREFIX)/$(TARGET)/lib/libOpenAL32.a
+ cd '$(1)/build' && cp -rfv openal.pc $(PREFIX)/$(TARGET)/lib/pkgconfig
+ $(SED) -i 's,^\(Libs:.*\),\1 -lwinmm,' $(PREFIX)/$(TARGET)/lib/pkgconfig/openal.pc
+ cd '$(1)' && cp -rfv include/* $(PREFIX)/$(TARGET)/include
+endef