Mercurial > mxe-octave
annotate src/openal-1-libtype-static.patch @ 1449:a28d4559075c
replace the ugly hacks with clean patches for package openal
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sun, 28 Nov 2010 22:28:35 +0100 |
parents | |
children |
rev | line source |
---|---|
1449
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
1 This file is part of mingw-cross-env. |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
2 See doc/index.html for further information. |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
3 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
4 This patch has been taken from: |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 http://opensource.creative.com/pipermail/openal-devel/2010-November/005759.html |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
7 diff -r 37cec05f2c93 CMakeLists.txt |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 --- a/CMakeLists.txt Sun Nov 28 20:53:45 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 +++ b/CMakeLists.txt Sun Nov 28 22:12:22 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 @@ -428,6 +428,14 @@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 SET(includedir "\${prefix}/include") |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 SET(PACKAGE_VERSION "${LIB_VERSION}") |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 +# Library type (static/shared) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
15 +IF(NOT LIBTYPE) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 + SET(LIBTYPE SHARED) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 +ENDIF() |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 +IF(LIBTYPE STREQUAL "STATIC") |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 + SET(PKG_CONFIG_CFLAGS -DAL_LIBTYPE_STATIC ${PKG_CONFIG_CFLAGS}) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 +ENDIF() |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 + |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
22 # End configuration |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
23 CONFIGURE_FILE( |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
24 "${OpenAL_SOURCE_DIR}/config.h.in" |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
25 @@ -438,9 +446,6 @@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
26 @ONLY) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
27 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
28 # Build a library |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
29 -IF(NOT LIBTYPE) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
30 - SET(LIBTYPE SHARED) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
31 -ENDIF() |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
32 ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS}) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
33 SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES DEFINE_SYMBOL AL_BUILD_LIBRARY |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
34 COMPILE_FLAGS -DAL_ALEXT_PROTOTYPES |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
35 @@ -477,6 +482,7 @@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
36 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
37 IF(EXAMPLES) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
38 ADD_EXECUTABLE(openal-info examples/openal-info.c) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
39 + ADD_DEFINITIONS(${PKG_CONFIG_CFLAGS}) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
40 TARGET_LINK_LIBRARIES(openal-info ${LIBNAME}) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
41 INSTALL(TARGETS openal-info |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
42 RUNTIME DESTINATION bin |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
43 diff -r 37cec05f2c93 include/AL/al.h |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
44 --- a/include/AL/al.h Sun Nov 28 20:53:45 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
45 +++ b/include/AL/al.h Sun Nov 28 22:12:22 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
46 @@ -5,7 +5,7 @@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
47 extern "C" { |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
48 #endif |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
49 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
50 -#if defined(_WIN32) && !defined(_XBOX) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
51 +#if defined(_WIN32) && !defined(_XBOX) && !defined(AL_LIBTYPE_STATIC) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
52 #if defined(AL_BUILD_LIBRARY) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
53 #define AL_API __declspec(dllexport) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
54 #else |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
55 diff -r 37cec05f2c93 include/AL/alc.h |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
56 --- a/include/AL/alc.h Sun Nov 28 20:53:45 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
57 +++ b/include/AL/alc.h Sun Nov 28 22:12:22 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
58 @@ -5,7 +5,7 @@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
59 extern "C" { |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
60 #endif |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
61 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
62 -#if defined(_WIN32) && !defined(_XBOX) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
63 +#if defined(_WIN32) && !defined(_XBOX) && !defined(AL_LIBTYPE_STATIC) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
64 #if defined(AL_BUILD_LIBRARY) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
65 #define ALC_API __declspec(dllexport) |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
66 #else |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
67 diff -r 37cec05f2c93 openal.pc.in |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
68 --- a/openal.pc.in Sun Nov 28 20:53:45 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
69 +++ b/openal.pc.in Sun Nov 28 22:12:22 2010 +0100 |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
70 @@ -8,4 +8,4 @@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
71 Requires: @PKG_CONFIG_REQUIRES@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
72 Version: @PACKAGE_VERSION@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
73 Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@ |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
74 -Cflags: -I${includedir} |
a28d4559075c
replace the ugly hacks with clean patches for package openal
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
75 +Cflags: -I${includedir} @PKG_CONFIG_CFLAGS@ |