mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 13:25:19 +08:00
[jxrlib] Fix mingw build (#27042)
* Fix mingw build * Minor portfile changes * Revise guiddef.h selection * Update versions * CI [skip actions]
This commit is contained in:
parent
10f65a8f08
commit
4f83a5642e
@ -18,9 +18,11 @@ macro(JXR_MAKE_OBJ SET_NAME)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
if(NOT MSVC)
|
||||
if(NOT WIN32)
|
||||
add_definitions(-D__ANSI__)
|
||||
add_compile_options(-Wno-error=implicit-function-declaration)
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
add_compile_options(-Wno-error=implicit-function-declaration -Wno-endif-labels)
|
||||
endif()
|
||||
|
||||
include(TestBigEndian)
|
||||
|
51
ports/jxrlib/fix-mingw.patch
Normal file
51
ports/jxrlib/fix-mingw.patch
Normal file
@ -0,0 +1,51 @@
|
||||
diff --git a/common/include/wmspecstrings_adt.h b/common/include/wmspecstrings_adt.h
|
||||
index ca7f25f..d5eb028 100644
|
||||
--- a/common/include/wmspecstrings_adt.h
|
||||
+++ b/common/include/wmspecstrings_adt.h
|
||||
@@ -36,6 +36,10 @@
|
||||
__type_has_adt_prop(compname,valid_schars) \
|
||||
__type_has_adt_prop(compname,correct_len) \
|
||||
__nullterminated
|
||||
+#ifdef __MINGW32__
|
||||
+#undef __$compname_props
|
||||
+#define __$compname_props
|
||||
+#endif
|
||||
#if defined(UNICODE) || defined(_UNICODE)
|
||||
#define __$TCHAR unsigned short
|
||||
#else
|
||||
diff --git a/image/sys/strcodec.h b/image/sys/strcodec.h
|
||||
index 695a454..9fad5b6 100644
|
||||
--- a/image/sys/strcodec.h
|
||||
+++ b/image/sys/strcodec.h
|
||||
@@ -59,7 +59,7 @@
|
||||
//#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform
|
||||
#define PLATFORM_X86
|
||||
-#include "..\x86\x86.h"
|
||||
+#include "../x86/x86.h"
|
||||
#endif
|
||||
|
||||
#ifndef UNREFERENCED_PARAMETER
|
||||
diff --git a/jxrgluelib/JXRMeta.h b/jxrgluelib/JXRMeta.h
|
||||
index b7b5880..7c9d653 100644
|
||||
--- a/jxrgluelib/JXRMeta.h
|
||||
+++ b/jxrgluelib/JXRMeta.h
|
||||
@@ -111,6 +111,18 @@
|
||||
#define __out_win __out
|
||||
#endif
|
||||
|
||||
+#ifndef __in
|
||||
+#define __in
|
||||
+#endif
|
||||
+#ifndef __out
|
||||
+#define __out
|
||||
+#endif
|
||||
+#ifndef __in_ecount
|
||||
+#define __in_ecount(x)
|
||||
+#endif
|
||||
+#ifndef __out_ecount
|
||||
+#define __out_ecount(x)
|
||||
+#endif
|
||||
|
||||
//================================================================
|
||||
|
20
ports/jxrlib/guiddef.patch
Normal file
20
ports/jxrlib/guiddef.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/common/include/guiddef.h b/common/include/jxrguiddef.h
|
||||
similarity index 100%
|
||||
rename from common/include/guiddef.h
|
||||
rename to common/include/jxrguiddef.h
|
||||
diff --git a/jxrgluelib/JXRGlue.h b/jxrgluelib/JXRGlue.h
|
||||
index d0b219c..c3e5d2b 100644
|
||||
--- a/jxrgluelib/JXRGlue.h
|
||||
+++ b/jxrgluelib/JXRGlue.h
|
||||
@@ -32,7 +32,11 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <JXRMeta.h>
|
||||
+#ifdef _WIN32
|
||||
#include <guiddef.h>
|
||||
+#else
|
||||
+#include <jxrguiddef.h>
|
||||
+#endif
|
||||
|
||||
//================================================================
|
||||
#define WMP_SDK_VERSION 0x0101
|
@ -6,29 +6,24 @@ vcpkg_from_github(
|
||||
REF f7521879862b9085318e814c6157490dd9dbbdb4
|
||||
SHA512 f5617cbe73b6b905cc6bba181e6a3efedd59584f7a8c90e0f34db580cfdad4239a2ab753df4e221f26a5c0db51475b021052e3b9e3ab3673573573b1d57f3fdb
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
guiddef.patch
|
||||
fix-mingw.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION ${SOURCE_PATH})
|
||||
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Darwin AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Linux AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES iOS)
|
||||
# The file guiddef.h is part of the Windows SDK,
|
||||
# we then remove the local copy shipped with jxrlib
|
||||
file(REMOVE "${SOURCE_PATH}/common/include/guiddef.h")
|
||||
endif()
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
#install FindJXR.cmake file
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/jxr")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/jxr")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/jxr")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/jxr")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jxrlib",
|
||||
"version": "2019.10.9",
|
||||
"port-version": 4,
|
||||
"port-version": 5,
|
||||
"description": "Open source implementation of the jpegxr image format standard.",
|
||||
"homepage": "https://github.com/4creators/jxrlib",
|
||||
"license": "BSD-2-Clause",
|
||||
|
@ -3206,7 +3206,7 @@
|
||||
},
|
||||
"jxrlib": {
|
||||
"baseline": "2019.10.9",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"kangaru": {
|
||||
"baseline": "4.3.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5e303b910797ec21313839eac286cf6baaf31c5a",
|
||||
"version": "2019.10.9",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "faadd72c2d406fce9c076c025285aa692995a8b5",
|
||||
"version": "2019.10.9",
|
||||
|
Loading…
x
Reference in New Issue
Block a user