Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libmad] Fix libmad header for non-x86 MSVC targets #8959

Merged
merged 1 commit into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ports/libmad/0001-Fix-MSVC-ARM.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/mad.h b/mad.h
index 9ef6cc8..5e3f7aa 100644
--- a/mad.h
+++ b/mad.h
@@ -24,7 +24,11 @@
extern "C" {
# endif

+#ifdef _WIN64
+# define FPM_64BIT
+#else
# define FPM_INTEL
+#endif



@@ -184,7 +188,7 @@ typedef mad_fixed_t mad_sample_t;

# elif defined(FPM_INTEL)

-# if defined(_MSC_VER)
+# if defined(_MSC_VER) && defined(_M_IX86)
# pragma warning(push)
# pragma warning(disable: 4035) /* no return value */
static __forceinline
6 changes: 3 additions & 3 deletions ports/libmad/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: libmad
Version: 0.15.1-4
Description: high-quality MPEG audio decoder
Source: libmad
Version: 0.15.1-5
Description: high-quality MPEG audio decoder
5 changes: 3 additions & 2 deletions ports/libmad/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive_ex(
ARCHIVE ${ARCHIVE}
OUT_SOURCE_PATH SOURCE_PATH
PATCHES
0001-Fix-MSVC-ARM.patch
)

#The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

#Use the msvc++ config.h and mad.h header
#Use the msvc++ config.h header
file(COPY ${SOURCE_PATH}/msvc++/config.h DESTINATION ${SOURCE_PATH})
file(COPY ${SOURCE_PATH}/msvc++/mad.h DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
Expand Down