From 52afd89f887ec9b6e07eca468dced10523eaf74c Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 11 Sep 2024 19:02:47 +0200 Subject: [PATCH] Fixup --- ports/libdvdread/inttypes.diff | 11 ---------- ports/libdvdread/msvc.diff | 36 +++++++++++++++++++++++++++++++++ ports/libdvdread/portfile.cmake | 5 ++--- ports/libdvdread/ssize_t.diff | 13 ------------ versions/l-/libdvdread.json | 2 +- 5 files changed, 39 insertions(+), 28 deletions(-) delete mode 100644 ports/libdvdread/inttypes.diff create mode 100644 ports/libdvdread/msvc.diff delete mode 100644 ports/libdvdread/ssize_t.diff diff --git a/ports/libdvdread/inttypes.diff b/ports/libdvdread/inttypes.diff deleted file mode 100644 index b9d2e9c219ba8b..00000000000000 --- a/ports/libdvdread/inttypes.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/msvc/include/inttypes.h b/msvc/include/inttypes.h -index 4e1cbe1..5b7f18f 100644 ---- a/msvc/include/inttypes.h -+++ b/msvc/include/inttypes.h -@@ -28,5 +28,6 @@ - #define _SYS_INTTYPES_H_ - - #include -+#include - - #endif diff --git a/ports/libdvdread/msvc.diff b/ports/libdvdread/msvc.diff new file mode 100644 index 00000000000000..7b0d46fc1037e7 --- /dev/null +++ b/ports/libdvdread/msvc.diff @@ -0,0 +1,36 @@ +diff --git a/msvc/include/inttypes.h b/msvc/include/inttypes.h +index 4e1cbe1..5b7f18f 100644 +--- a/msvc/include/inttypes.h ++++ b/msvc/include/inttypes.h +@@ -28,5 +28,6 @@ + #define _SYS_INTTYPES_H_ + + #include ++#include + + #endif +diff --git a/src/dvd_reader.c b/src/dvd_reader.c +index c4d9641..b3b0158 100644 +--- a/src/dvd_reader.c ++++ b/src/dvd_reader.c +@@ -60,6 +60,7 @@ + + #if defined(_WIN32) + # include ++# include + # include "msvc/contrib/win32_cs.h" + #endif + +diff --git a/src/dvdread/dvd_reader.h b/src/dvdread/dvd_reader.h +index 5681e0e..d1495c2 100644 +--- a/src/dvdread/dvd_reader.h ++++ b/src/dvdread/dvd_reader.h +@@ -25,6 +25,8 @@ + + #ifdef _MSC_VER + #include ++#include ++typedef SSIZE_T ssize_t; + + #include + #include diff --git a/ports/libdvdread/portfile.cmake b/ports/libdvdread/portfile.cmake index 195719d7f82a0f..f0121f6af819d1 100644 --- a/ports/libdvdread/portfile.cmake +++ b/ports/libdvdread/portfile.cmake @@ -6,8 +6,7 @@ vcpkg_from_gitlab( SHA512 9eb6d551489ab1d214c56461eebafd6ecba7de8dcc60aecb7e22f82c019fd3d045fc09af66507c2e14bc53e099aec8e87620dfd988fe047a7bfa5e5d1d2c46bd HEAD_REF master PATCHES - inttypes.diff - ssize_t.diff + msvc.diff ) file(TOUCH "${SOURCE_PATH}/msvc/include/strings.h") file(WRITE "${SOURCE_PATH}/ChangeLog" "Cf. https://code.videolan.org/videolan/libdvdread/-/commits/${VERSION}/") # not in git @@ -22,7 +21,7 @@ if(VCPKG_TARGET_IS_WINDOWS) set(cppflags "CPPFLAGS=\$CPPFLAGS -DPATH_MAX=2048 -DWIN32_LEAN_AND_MEAN") if(NOT VCPKG_TARGET_IS_MINGW) cmake_path(RELATIVE_PATH SOURCE_PATH BASE_DIRECTORY "${CURRENT_BUILDTREES_DIR}" OUTPUT_VARIABLE sources) - string(APPEND cppflags " -I../${sources}/msvc/include") + string(APPEND cppflags " -I../${sources}/msvc/include -D_CRT_SECURE_NO_WARNINGS") endif() endif() diff --git a/ports/libdvdread/ssize_t.diff b/ports/libdvdread/ssize_t.diff deleted file mode 100644 index d600aeea464829..00000000000000 --- a/ports/libdvdread/ssize_t.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/dvdread/dvd_reader.h b/src/dvdread/dvd_reader.h -index 5681e0e..d1495c2 100644 ---- a/src/dvdread/dvd_reader.h -+++ b/src/dvdread/dvd_reader.h -@@ -25,6 +25,8 @@ - - #ifdef _MSC_VER - #include -+#include -+typedef SSIZE_T ssize_t; - - #include - #include diff --git a/versions/l-/libdvdread.json b/versions/l-/libdvdread.json index 28e9e1c4647843..f8d4415277eb74 100644 --- a/versions/l-/libdvdread.json +++ b/versions/l-/libdvdread.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c0cb7feec9f2c2034a963723d45a2d6a1f415f74", + "git-tree": "e8d6657807fd4a0e5a252fc963ae8787b7483b0e", "version-semver": "6.1.3", "port-version": 0 }