Merge pull request #2565 from crackedmind/fix_x86_mpg123

[mpg123] Fix x86 build
This commit is contained in:
Alexander Karatarakis 2018-01-16 14:53:09 -08:00 committed by GitHub
commit b0bb4144cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,24 @@
diff --git a/src/libmpg123/mangle.h b/src/libmpg123/mangle.h
index 6012ccc..bf37cd7 100644
--- a/src/libmpg123/mangle.h
+++ b/src/libmpg123/mangle.h
@@ -85,6 +85,10 @@
#define ASM_VALUE(a) MANGLE_MACROCAT($,a)
#endif
+#if defined(_WIN32) && !defined(_WIN64)
+#define OPT_X86
+#endif
+
/* Enable position-independent code for certain platforms. */
#if defined(OPT_X86)
@@ -130,7 +134,7 @@ Lpic_base: \
/* Dummies for everyone else. */
#define LOCAL_VAR(a) a
#define GLOBAL_VAR ASM_NAME
-#define GLOBAL_VAR_PTR(a) #error Cannot use indirect addressing in non-PIC object.
+#define GLOBAL_VAR_PTR(a) // #error Cannot use indirect addressing in non-PIC object.
#define FUNC ASM_NAME
#define EXTERNAL_FUNC ASM_NAME
#define GET_GOT

View File

@ -1,3 +1,3 @@
Source: mpg123
Version: 1.25.8
Version: 1.25.8-1
Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).

View File

@ -31,7 +31,9 @@ set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch")
PATCHES
"${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch"
"${CURRENT_PORT_DIR}/0002-fix-x86-build.patch")
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj