[vlc-commits] contrib: libarchive: don't force the Windows version to target

Steve Lhomme git at videolan.org
Mon May 18 16:19:10 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr  2 15:37:54 2020 +0200| [497622119be27f2972ae7d0541a9f11ea56c1e01] | committer: Steve Lhomme

contrib: libarchive: don't force the Windows version to target

We may want to build for Win10/UWP via the command-line.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=497622119be27f2972ae7d0541a9f11ea56c1e01
---

 ...-windows-versions-if-they-are-set-in-the-.patch | 44 ++++++++++++++++++++++
 contrib/src/libarchive/rules.mak                   |  1 +
 2 files changed, 45 insertions(+)

diff --git a/contrib/src/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch b/contrib/src/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch
new file mode 100644
index 0000000000..37af69a79a
--- /dev/null
+++ b/contrib/src/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch
@@ -0,0 +1,44 @@
+From a4fa6bef8bdb141d629d79d8d1f3e67448bd67e1 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 2 Apr 2020 15:33:40 +0200
+Subject: [PATCH 5/5] don't force windows versions if they are set in the
+ environment
+
+---
+ configure.ac | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7312c4d5..05ca4955 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -244,9 +244,23 @@ AM_CONDITIONAL([STATIC_BSDCPIO], [ test "$static_bsdcpio" = yes ])
+ # Set up defines needed before including any headers
+ case $host in
+   *mingw* | *cygwin* | *msys*  )
+-  AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
+-  AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
+-  AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.])
++  AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
++    [[#ifdef _WIN32_WINNT
++     # error _WIN32_WINNT already defined
++     #endif
++    ]],[[;]])
++  ],[
++    AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
++    AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.])
++  ])
++  AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
++    [[#ifdef WINVER
++     # error WINVER already defined
++     #endif
++    ]],[[;]])
++  ],[
++    AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
++  ])
+   ;;
+ esac
+ 
+-- 
+2.26.0.windows.1
+
diff --git a/contrib/src/libarchive/rules.mak b/contrib/src/libarchive/rules.mak
index 34f9fc2ba0..1677987721 100644
--- a/contrib/src/libarchive/rules.mak
+++ b/contrib/src/libarchive/rules.mak
@@ -35,6 +35,7 @@ ifdef HAVE_WINSTORE
 	$(APPLY) $(SRC)/libarchive/winrt.patch
 endif
 	$(APPLY) $(SRC)/libarchive/fix-types.patch
+	$(APPLY) $(SRC)/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch
 	$(call pkg_static,"build/pkgconfig/libarchive.pc.in")
 	$(MOVE)
 



More information about the vlc-commits mailing list