Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/openal/, media-libs/openal/files/
Date: Sun, 27 May 2018 16:04:20
Message-Id: 1527437032.8f64e41d8e6798e5c3d5b6c8ceb4bdb71f93c00b.bman@gentoo
1 commit: 8f64e41d8e6798e5c3d5b6c8ceb4bdb71f93c00b
2 Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com>
3 AuthorDate: Thu Apr 12 12:04:09 2018 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sun May 27 16:03:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f64e41d
7
8 media-libs/openal: fix mingw-w64 build
9
10 Added an upstream patch which fixes an issue when using crossdev to
11 build for mingw-w64:
12
13 CMake Error at /usr/share/cmake/Modules/CheckIncludeFiles.cmake:63 (message):
14 Unknown arguments:
15
16 -D_WIN32_WINNT=0x0502
17
18 Call Stack (most recent call first):
19 CMakeLists.txt:968 (CHECK_INCLUDE_FILES)
20
21 Package-Manager: Portage-2.3.28, Repoman-2.3.9
22 Closes: https://github.com/gentoo/gentoo/pull/7952
23
24 ...l-1.18.2-dont-specify-macros-as-arguments.patch | 50 ++++++++++++++++++++++
25 media-libs/openal/openal-1.18.2-r1.ebuild | 4 ++
26 2 files changed, 54 insertions(+)
27
28 diff --git a/media-libs/openal/files/openal-1.18.2-dont-specify-macros-as-arguments.patch b/media-libs/openal/files/openal-1.18.2-dont-specify-macros-as-arguments.patch
29 new file mode 100644
30 index 00000000000..83fc33d0a33
31 --- /dev/null
32 +++ b/media-libs/openal/files/openal-1.18.2-dont-specify-macros-as-arguments.patch
33 @@ -0,0 +1,50 @@
34 +From cae4b1a062b53dd25eba7caa41622be730106749 Mon Sep 17 00:00:00 2001
35 +From: Chris Robinson <chris.kcat@×××××.com>
36 +Date: Wed, 28 Mar 2018 14:34:58 -0700
37 +Subject: [PATCH] Don't specify macros as arguments to CHECK_INCLUDE_FILE(S)
38 +
39 +---
40 + CMakeLists.txt | 15 +++++++++++++--
41 + 1 file changed, 13 insertions(+), 2 deletions(-)
42 +
43 +diff --git a/CMakeLists.txt b/CMakeLists.txt
44 +index df1dfe63..07454f15 100644
45 +--- a/CMakeLists.txt
46 ++++ b/CMakeLists.txt
47 +@@ -577,7 +577,12 @@ ENDIF()
48 +
49 +
50 + # Check if we have Windows headers
51 +-CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H -D_WIN32_WINNT=0x0502)
52 ++SET(OLD_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
53 ++SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0502)
54 ++CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
55 ++SET(CMAKE_REQUIRED_DEFINITIONS ${OLD_REQUIRED_DEFINITIONS})
56 ++UNSET(OLD_REQUIRED_DEFINITIONS)
57 ++
58 + IF(NOT HAVE_WINDOWS_H)
59 + CHECK_SYMBOL_EXISTS(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
60 + IF(NOT HAVE_GETTIMEOFDAY)
61 +@@ -975,8 +980,11 @@ OPTION(ALSOFT_REQUIRE_WINMM "Require Windows Multimedia backend" OFF)
62 + OPTION(ALSOFT_REQUIRE_DSOUND "Require DirectSound backend" OFF)
63 + OPTION(ALSOFT_REQUIRE_WASAPI "Require WASAPI backend" OFF)
64 + IF(HAVE_WINDOWS_H)
65 ++ SET(OLD_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
66 ++ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0502)
67 ++
68 + # Check MMSystem backend
69 +- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
70 ++ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
71 + IF(HAVE_MMSYSTEM_H)
72 + CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
73 + IF(HAVE_LIBWINMM)
74 +@@ -1013,6 +1021,9 @@ IF(HAVE_WINDOWS_H)
75 + SET(ALC_OBJS ${ALC_OBJS} Alc/backends/wasapi.c)
76 + ENDIF()
77 + ENDIF()
78 ++
79 ++ SET(CMAKE_REQUIRED_DEFINITIONS ${OLD_REQUIRED_DEFINITIONS})
80 ++ UNSET(OLD_REQUIRED_DEFINITIONS)
81 + ENDIF()
82 + IF(ALSOFT_REQUIRE_WINMM AND NOT HAVE_WINMM)
83 + MESSAGE(FATAL_ERROR "Failed to enabled required WinMM backend")
84
85 diff --git a/media-libs/openal/openal-1.18.2-r1.ebuild b/media-libs/openal/openal-1.18.2-r1.ebuild
86 index ffa1242cc0c..f9fc8923f87 100644
87 --- a/media-libs/openal/openal-1.18.2-r1.ebuild
88 +++ b/media-libs/openal/openal-1.18.2-r1.ebuild
89 @@ -38,6 +38,10 @@ S="${WORKDIR}/${MY_P}"
90
91 DOCS=( alsoftrc.sample docs/env-vars.txt docs/hrtf.txt ChangeLog README )
92
93 +PATCHES=(
94 + "${FILESDIR}"/${PN}-1.18.2-dont-specify-macros-as-arguments.patch
95 +)
96 +
97 src_configure() {
98 # -DEXAMPLES=OFF to avoid FFmpeg dependency wrt #481670
99 my_configure() {