[vlc-commits] [Git][videolan/vlc][master] 4 commits: Contribs: update dav1d to 0.9.2

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jan 31 13:51:02 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d59532b0 by Jean-Baptiste Kempf at 2022-01-31T12:41:35+00:00
Contribs: update dav1d to 0.9.2

- - - - -
61094448 by Jean-Baptiste Kempf at 2022-01-31T12:41:35+00:00
Contribs: update fribidi to 1.0.11

- - - - -
b3e9723f by Jean-Baptiste Kempf at 2022-01-31T12:41:35+00:00
Contribs: update freetype to 2.11.1

- - - - -
82739402 by Jean-Baptiste Kempf at 2022-01-31T12:41:35+00:00
Contribs: update libass to 0.15.2

- - - - -


15 changed files:

- + contrib/src/ass/0001-configure-add-Core-Text-and-DirectWrite-to-Libs.priv.patch
- contrib/src/ass/SHA512SUMS
- − contrib/src/ass/coretext-errorhandling.patch
- − contrib/src/ass/dwrite.patch
- contrib/src/ass/libass-no-tchar.patch
- contrib/src/ass/rules.mak
- contrib/src/ass/use-topendir.patch
- contrib/src/dav1d/SHA512SUMS
- contrib/src/dav1d/rules.mak
- contrib/src/freetype2/SHA512SUMS
- contrib/src/freetype2/rules.mak
- + contrib/src/freetype2/uwpfixes.patch
- contrib/src/fribidi/SHA512SUMS
- − contrib/src/fribidi/fix_static_linking.patch
- contrib/src/fribidi/rules.mak


Changes:

=====================================
contrib/src/ass/0001-configure-add-Core-Text-and-DirectWrite-to-Libs.priv.patch
=====================================
@@ -0,0 +1,48 @@
+From 643829edd8408ec37182a04040fe5a7bf54dccc3 Mon Sep 17 00:00:00 2001
+From: Oleg Oshmyan <chortos at inbox.lv>
+Date: Sat, 18 Sep 2021 03:04:15 +0300
+Subject: [PATCH] configure: add Core Text and DirectWrite to Libs.private
+
+Fixes https://github.com/libass/libass/issues/211.
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 89d5eb0..6ae78a1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -126,6 +126,7 @@ AS_IF([test "x$enable_coretext" != xno], [
+             [[CTFontDescriptorCopyAttribute(NULL, kCTFontURLAttribute);]]
+         )
+     ], [
++        pkg_libs="$pkg_libs -framework ApplicationServices -framework CoreFoundation"
+         LIBS="$LIBS -framework ApplicationServices -framework CoreFoundation"
+         AC_DEFINE(CONFIG_CORETEXT, 1, [found CoreText in ApplicationServices framework])
+         coretext=true
+@@ -137,6 +138,7 @@ AS_IF([test "x$enable_coretext" != xno], [
+                 [[CTFontDescriptorCopyAttribute(NULL, kCTFontURLAttribute);]]
+             )
+         ], [
++            pkg_libs="$pkg_libs -framework CoreText -framework CoreFoundation"
+             LIBS="$LIBS -framework CoreText -framework CoreFoundation"
+             AC_DEFINE(CONFIG_CORETEXT, 1, [found CoreText framework])
+             coretext=true
+@@ -171,12 +173,14 @@ AS_IF([test "x$enable_directwrite" != xno], [
+         ], [
+             # WinRT/UWP/app build: GDI and LoadLibrary are
+             # unavailable, but DirectWrite is always present
++            pkg_libs="$pkg_libs -ldwrite"
+             LIBS="$LIBS -ldwrite"
+             AC_DEFINE(CONFIG_DIRECTWRITE, 1, [found DirectWrite (WinRT/UWP)])
+             AC_MSG_RESULT([no])
+         ], [
+             # Win32/desktop build: GDI is always present;
+             # DirectWrite is optional but can be loaded via LoadLibrary
++            pkg_libs="$pkg_libs -lgdi32"
+             LIBS="$LIBS -lgdi32"
+             AC_DEFINE(CONFIG_DIRECTWRITE, 1, [found DirectWrite and GDI (Win32)])
+             AC_MSG_RESULT([yes])
+-- 
+2.34.1
+


=====================================
contrib/src/ass/SHA512SUMS
=====================================
@@ -1 +1 @@
-ed1824c4195ef08e6314ee2184b20e6898be6bb922e0fa26ab64bc03b065d16e68ef92c012ab09d2103dbbd9a1348e3722aa0812ea2533cd14ad1ad467f58b0f  libass-0.14.0.tar.gz
+3b8022ca500d4a9e19e9b7106e29d23d4bca20012619c829bc3e77437bcb3c7bd8364800f7daeb3f2d8400afc7bbcaab487c7b30c429d9aed70e37ce4cb265a2  libass-0.15.2.tar.gz


=====================================
contrib/src/ass/coretext-errorhandling.patch deleted
=====================================
@@ -1,27 +0,0 @@
-diff --git a/libass/ass_coretext.c b/libass/ass_coretext.c
-index 59a8a2d..7371f7c 100644
---- a/libass/ass_coretext.c
-+++ b/libass/ass_coretext.c
-@@ -96,7 +96,13 @@ static bool check_glyph(void *priv, uint32_t code)
- static char *get_font_file(CTFontDescriptorRef fontd)
- {
-     CFURLRef url = CTFontDescriptorCopyAttribute(fontd, kCTFontURLAttribute);
-+    if (!url)
-+        return NULL;
-     CFStringRef path = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
-+    if (!path) {
-+        SAFE_CFRelease(url);
-+        return NULL;
-+    }
-     char *buffer = cfstr2buf(path);
-     SAFE_CFRelease(path);
-     SAFE_CFRelease(url);
-@@ -133,7 +139,7 @@ static void process_descriptors(ASS_Library *lib, ASS_FontProvider *provider,
-         int index = -1;
- 
-         char *path = get_font_file(fontd);
--        if (strcmp("", path) == 0) {
-+        if (!path || strcmp("", path) == 0) {
-             // skip the font if the URL field in the font descriptor is empty
-             free(path);
-             continue;


=====================================
contrib/src/ass/dwrite.patch deleted
=====================================
@@ -1,48 +0,0 @@
---- libass/libass/ass_directwrite.c.orig	2016-12-14 12:09:24.569899227 +0100
-+++ libass/libass/ass_directwrite.c	2016-12-14 12:21:28.429203219 +0100
-@@ -23,6 +23,7 @@
- #include <initguid.h>
- #include <ole2.h>
- #include <shobjidl.h>
-+#include <winapifamily.h>
- 
- #include "dwrite_c.h"
- 
-@@ -742,8 +743,9 @@
-     ASS_FontProvider *provider = NULL;
-     DWriteCreateFactoryFn DWriteCreateFactoryPtr = NULL;
-     ProviderPrivate *priv = NULL;
--
--    HMODULE directwrite_lib = LoadLibraryW(L"Dwrite.dll");
-+    HMODULE directwrite_lib = NULL;
-+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
-+    directwrite_lib = LoadLibraryW(L"Dwrite.dll");
-     if (!directwrite_lib)
-         goto cleanup;
- 
-@@ -751,6 +753,9 @@
-                                                                    "DWriteCreateFactory");
-     if (!DWriteCreateFactoryPtr)
-         goto cleanup;
-+#else
-+    DWriteCreateFactoryPtr = DWriteCreateFactory;
-+#endif
- 
-     hr = DWriteCreateFactoryPtr(DWRITE_FACTORY_TYPE_SHARED,
-                                 &IID_IDWriteFactory,
---- libass/libass/dwrite_c.h.orig	2016-12-14 12:36:59.215968100 +0100
-+++ libass/libass/dwrite_c.h	2016-12-14 12:38:42.359500667 +0100
-@@ -142,6 +142,13 @@
- typedef struct DWRITE_TRIMMING DWRITE_TRIMMING;
- typedef struct DWRITE_UNDERLINE DWRITE_UNDERLINE;
- 
-+DWRITEAPI HRESULT WINAPI DWriteCreateFactory(
-+  DWRITE_FACTORY_TYPE factoryType,
-+  REFIID iid,
-+  IUnknown **factory
-+);
-+
-+
- #ifndef __MINGW_DEF_ARG_VAL
- #ifdef __cplusplus
- #define __MINGW_DEF_ARG_VAL(x) = x


=====================================
contrib/src/ass/libass-no-tchar.patch
=====================================
@@ -1,5 +1,5 @@
---- libass/libass/ass_fontselect.c.tchar	2019-03-19 12:07:15.464633200 +0100
-+++ libass/libass/ass_fontselect.c	2019-03-19 12:06:48.404627300 +0100
+--- libass-0.15.2/libass/ass_fontselect.c.orig	2021-12-29 16:11:04.588615131 +0100
++++ libass-0.15.2/libass/ass_fontselect.c	2021-12-29 16:13:00.276849748 +0100
 @@ -48,7 +48,6 @@
  #include "ass_string.h"
  
@@ -8,25 +8,28 @@
  
  #define ABS(x) ((x) < 0 ? -(x) : (x))
  #define MAX_FULLNAME 100
-@@ -195,12 +194,12 @@ static inline wchar_t *ToWide (const cha
- static void load_fonts_from_dir(ASS_Library *library, const char *dir)
+@@ -201,7 +200,7 @@
  {
+     DIR *d = opendir(dir);
      wchar_t *dirw = ToWide(dir);
 -    _TDIR *d = _topendir(dirw);
 +    _WDIR *d = _wopendir(dirw);
      free(dirw);
      if (!d)
          return;
+@@ -209,7 +208,7 @@
+     size_t namemax = 0;
+     char *namebuf = NULL;
      while (1) {
 -        struct _tdirent *entry = _treaddir(d);
 +        struct _wdirent *entry = _wreaddir(d);
          if (!entry)
              break;
          char* d_name = FromWide(entry->d_name);
-@@ -220,7 +219,7 @@ static void load_fonts_from_dir(ASS_Libr
-         }
+@@ -239,7 +238,7 @@
          free(d_name);
      }
+     free(namebuf);
 -    _tclosedir(d);
 +    _wclosedir(d);
  }


=====================================
contrib/src/ass/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # ASS
-ASS_VERSION := 0.14.0
+ASS_VERSION := 0.15.2
 ASS_URL := https://github.com/libass/libass/releases/download/$(ASS_VERSION)/libass-$(ASS_VERSION).tar.gz
 
 PKGS += ass
@@ -9,7 +9,7 @@ endif
 
 ifdef HAVE_ANDROID
 WITH_FONTCONFIG = 0
-WITH_HARFBUZZ = 0
+WITH_HARFBUZZ = 1
 ifeq ($(ANDROID_ABI), x86)
 WITH_ASS_ASM = 0
 endif
@@ -37,13 +37,10 @@ $(TARBALLS)/libass-$(ASS_VERSION).tar.gz:
 libass: libass-$(ASS_VERSION).tar.gz .sum-ass
 	$(UNPACK)
 	$(APPLY) $(SRC)/ass/ass-macosx.patch
-	$(APPLY) $(SRC)/ass/coretext-errorhandling.patch
+	$(APPLY) $(SRC)/ass/0001-configure-add-Core-Text-and-DirectWrite-to-Libs.priv.patch
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/ass/use-topendir.patch
-	$(APPLY) $(SRC)/ass/libass-no-tchar.patch
-ifdef HAVE_WINSTORE
-	$(APPLY) $(SRC)/ass/dwrite.patch
-endif
+#	$(APPLY) $(SRC)/ass/libass-no-tchar.patch
 endif
 	$(UPDATE_AUTOCONFIG)
 	$(MOVE)
@@ -79,5 +76,7 @@ endif
 .ass: libass
 	$(RECONF)
 	cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) $(ASS_CFLAGS)" ./configure $(HOSTCONF) $(ASS_CONF)
+	cd $< && $(MAKE)
+	$(call pkg_static,"libass.pc")
 	cd $< && $(MAKE) install
 	touch $@


=====================================
contrib/src/ass/use-topendir.patch
=====================================
@@ -1,5 +1,5 @@
---- libass-0.13.4/libass/ass_fontselect.c.orig	2016-07-11 23:29:00.000000000 +0200
-+++ libass-0.13.4/libass/ass_fontselect.c	2016-10-11 11:14:24.387661958 +0200
+--- a/libass/ass_fontselect.c.orig	2021-09-11 23:27:04.000000000 +0200
++++ b/libass/ass_fontselect.c	2021-12-29 17:18:47.535670604 +0100
 @@ -47,6 +47,9 @@
  #include "ass_font.h"
  #include "ass_string.h"
@@ -10,7 +10,7 @@
  #define ABS(x) ((x) < 0 ? -(x) : (x))
  #define MAX_FULLNAME 100
  
-@@ -161,28 +164,63 @@
+@@ -166,21 +169,55 @@
      .destroy_font      = destroy_font_ft,
  };
  
@@ -50,6 +50,9 @@
 +    free(dirw);
      if (!d)
          return;
+     size_t dirlen = strlen(dir);
+     size_t namemax = 0;
+     char *namebuf = NULL;
      while (1) {
 -        struct dirent *entry = readdir(d);
 +        struct _tdirent *entry = _treaddir(d);
@@ -60,13 +63,21 @@
 +        {
 +            free(d_name);
              continue;
+-        size_t namelen = dirlen + strlen(entry->d_name) + 2u;
 +        }
-         char fullname[4096];
--        snprintf(fullname, sizeof(fullname), "%s/%s", dir, entry->d_name);
-+        _snprintf(fullname, sizeof(fullname), "%s/%s", dir, d_name);
++        size_t namelen = dirlen + strlen(d_name) + 2u;
+         if (namelen < 2 || namelen - 2 < dirlen)
+             continue;
+         if (namelen > namemax) {
+@@ -190,17 +227,18 @@
+             else
+                 continue;
+         }
+-        snprintf(namebuf, namemax, "%s/%s", dir, entry->d_name);
++        _snprintf(namebuf, namemax, "%s/%s", dir, d_name);
          size_t bufsize = 0;
-         ass_msg(library, MSGL_INFO, "Loading font file '%s'", fullname);
-         void *data = read_file(library, fullname, &bufsize);
+         ass_msg(library, MSGL_INFO, "Loading font file '%s'", namebuf);
+         void *data = read_file(library, namebuf, &bufsize);
          if (data) {
 -            ass_add_font(library, entry->d_name, data, bufsize);
 +            ass_add_font(library, d_name, data, bufsize);
@@ -74,6 +85,7 @@
          }
 +        free(d_name);
      }
+     free(namebuf);
 -    closedir(d);
 +    _tclosedir(d);
  }


=====================================
contrib/src/dav1d/SHA512SUMS
=====================================
@@ -1 +1 @@
-672708b07c389f21968b3d91be4547483f8c0d3b5d41e916503798896ab88212bafa3ca8c229624cbbbe5fdcfcb4f26f19ed8ce9ce1c9f8a217174fe397b6a35  dav1d-0.9.1.tar.xz
\ No newline at end of file
+87026f8b14e408ff50fc8f137ec2ede4b14c5f69687e615d2359d0f718ae5cb5176522490786d9ae1f7838182f82615c2674f7c2961b6dcec83f1ee587c3af7c  dav1d-0.9.2.tar.xz


=====================================
contrib/src/dav1d/rules.mak
=====================================
@@ -1,6 +1,6 @@
 # libdav1d
 
-DAV1D_VERSION := 0.9.1
+DAV1D_VERSION := 0.9.2
 DAV1D_URL := $(VIDEOLAN)/dav1d/$(DAV1D_VERSION)/dav1d-$(DAV1D_VERSION).tar.xz
 
 PKGS += dav1d


=====================================
contrib/src/freetype2/SHA512SUMS
=====================================
@@ -1 +1 @@
-827cda734aa6b537a8bcb247549b72bc1e082a5b32ab8d3cccb7cc26d5f6ee087c19ce34544fa388a1eb4ecaf97600dbabc3e10e950f2ba692617fee7081518f  freetype-2.10.4.tar.xz
+0848678482fbe20603a866f02da82c91122014d6f815ba4f1d9c03601c32e3ceb781f721c2b4427b6117d7c9742018af8dbb26566faf018595c70b50f8db3f08  freetype-2.11.1.tar.xz


=====================================
contrib/src/freetype2/rules.mak
=====================================
@@ -1,6 +1,6 @@
 # freetype2
 
-FREETYPE2_VERSION := 2.10.4
+FREETYPE2_VERSION := 2.11.1
 FREETYPE2_URL := $(SF)/freetype/freetype2/$(FREETYPE2_VERSION)/freetype-$(FREETYPE2_VERSION).tar.xz
 
 PKGS += freetype2
@@ -15,6 +15,7 @@ $(TARBALLS)/freetype-$(FREETYPE2_VERSION).tar.xz:
 
 freetype: freetype-$(FREETYPE2_VERSION).tar.xz .sum-freetype2
 	$(UNPACK)
+	$(APPLY) $(SRC)/freetype2/uwpfixes.patch
 	$(call pkg_static, "builds/unix/freetype2.in")
 	$(MOVE)
 


=====================================
contrib/src/freetype2/uwpfixes.patch
=====================================
@@ -0,0 +1,38 @@
+diff --git a/builds/windows/ftsystem.c b/builds/windows/ftsystem.c
+index 1ebadd49f..ac8ff1f92 100644
+--- a/builds/windows/ftsystem.c
++++ b/builds/windows/ftsystem.c
+@@ -28,6 +28,7 @@
+   /* memory mapping and allocation includes and definitions */
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
++#include <winapifamily.h>
+ 
+ 
+   /**************************************************************************
+@@ -296,7 +297,11 @@
+       goto Fail_Open;
+     }
+ 
++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+     fm = CreateFileMapping( file, NULL, PAGE_READONLY, 0, 0, NULL );
++#else
++    fm = CreateFileMappingFromApp( file, NULL, PAGE_READONLY, 0, NULL );
++#endif
+     if ( fm == NULL )
+     {
+       FT_ERROR(( "FT_Stream_Open: can not map file\n" ));
+@@ -308,8 +313,13 @@
+     /* a size greater than LONG_MAX                                    */
+     stream->size = size.LowPart;
+     stream->pos  = 0;
++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+     stream->base = (unsigned char *)
+                      MapViewOfFile( fm, FILE_MAP_READ, 0, 0, 0 );
++#else
++    stream->base = (unsigned char *)
++                     MapViewOfFileFromApp( fm, FILE_MAP_READ, 0, 0 );
++#endif
+ 
+     CloseHandle( fm );
+ 


=====================================
contrib/src/fribidi/SHA512SUMS
=====================================
@@ -1 +1 @@
-cb51920012c3c7507c17e2beb1dbbcfb8d7c6404e4cb54b260a332754a0d5b103d8834d77e8795651b3f38069c9bd2e9914c21b001411a72f9ffe1ec1ef2f360  fribidi-1.0.10.tar.xz
+6afde86784de06759f18235ccb44f23261a975f7cce0021b16755065a6a8ed84d7d5fb7fdcaadd691b48011efb4bfc2ee67555e5133a294a418cca1a0c85476c  fribidi-1.0.11.tar.xz


=====================================
contrib/src/fribidi/fix_static_linking.patch deleted
=====================================
@@ -1,28 +0,0 @@
-From 05e42a4d782ce14e648fd4c489e65eaff4609de2 Mon Sep 17 00:00:00 2001
-From: Christopher Degawa <ccom at randomderp.com>
-Date: Mon, 6 Jul 2020 20:55:11 +0000
-Subject: [PATCH] meson: add fribidi_static_cargs to extra_cflags
-
-meson seemingly doesn't have a section for cflags.private, so the flags will have to go to the regular cflags for now
-it can be replaced by manual sed or similar to append that line if wanted
-
-Fixes https://github.com/m-ab-s/media-autobuild_suite/issues/1735
-
-Signed-off-by: Christopher Degawa <ccom at randomderp.com>
----
- meson.build | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 6c69ed9..9ba9dab 100644
---- a/meson.build
-+++ b/meson.build
-@@ -103,6 +103,7 @@ pkg = import('pkgconfig')
- pkg.generate(name: 'GNU FriBidi',
-   filebase: 'fribidi',
-   description: 'Unicode Bidirectional Algorithm Library',
--  libraries: libfribidi, 
-+  libraries: libfribidi,
-+  extra_cflags: fribidi_static_cargs,
-   subdirs: 'fribidi',
-   version: meson.project_version())


=====================================
contrib/src/fribidi/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # FRIBIDI
-FRIBIDI_VERSION := 1.0.10
+FRIBIDI_VERSION := 1.0.11
 FRIBIDI_URL := https://github.com/fribidi/fribidi/releases/download/v$(FRIBIDI_VERSION)/fribidi-$(FRIBIDI_VERSION).tar.xz
 
 PKGS += fribidi
@@ -14,7 +14,6 @@ $(TARBALLS)/fribidi-$(FRIBIDI_VERSION).tar.xz:
 
 fribidi: fribidi-$(FRIBIDI_VERSION).tar.xz .sum-fribidi
 	$(UNPACK)
-	$(APPLY) $(SRC)/fribidi/fix_static_linking.patch
 	$(MOVE)
 
 # FIXME: DEPS_fribidi = iconv $(DEPS_iconv)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/79084ecb2f349ad47104e940c40b72487baae173...827394029074561a7f44ec7c0c477f6f7b483768

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/79084ecb2f349ad47104e940c40b72487baae173...827394029074561a7f44ec7c0c477f6f7b483768
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list