[pkg-wine-party] [wine] 05/09: Add fontdir.patch to take into account the build time configuration.

Jens Reyer jreyer-guest at moszumanska.debian.org
Fri Apr 8 15:31:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

jreyer-guest pushed a commit to branch stretch
in repository wine.

commit e30a252c91e12dec36599f1049b0f5a4746f0dc2
Author: Jens Reyer <jre.winesim at gmail.com>
Date:   Fri Apr 1 13:50:35 2016 +0200

    Add fontdir.patch to take into account the build time configuration.
    
    Closes: #814844
---
 debian/changelog             |   2 +
 debian/patches/fontdir.patch | 103 +++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series        |   1 +
 3 files changed, 106 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4a090e0..2bfde87 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,8 @@ wine (1.8.1-3) UNRELEASED; urgency=medium
     - wineserver script: Drop obsolete script variable.
   * In the VCS-* fields point to the stretch git branch.
   * Set fontdir /usr/share/wine/fonts.
+  * Add fontdir.patch to take into account the build time configuration
+    (closes: #814844).
 
  -- Jens Reyer <jre.winesim at gmail.com>  Sun, 13 Mar 2016 02:40:12 +0100
 
diff --git a/debian/patches/fontdir.patch b/debian/patches/fontdir.patch
new file mode 100644
index 0000000..ecc802b
--- /dev/null
+++ b/debian/patches/fontdir.patch
@@ -0,0 +1,103 @@
+Description: gdi32: Take into account the fontdir directory specified at build time.
+Origin: http://source.winehq.org/git/wine.git/commit/1eac54ef7d6d90fcc973c5ea92a53be73f61ff12
+Bug: https://bugs.winehq.org/show_bug.cgi?id=40312
+Bug-Debian: https://bugs.debian.org/814844
+Applied-Upstream: 1.9.6
+
+--- a/dlls/gdi32/Makefile.in
++++ b/dlls/gdi32/Makefile.in
+@@ -49,3 +49,5 @@ C_SRCS = \
+ 	vertical.c
+ 
+ RC_SRCS = gdi32.rc
++
++freetype_EXTRADEFS = -DWINE_FONT_DIR=\"`$(MAKEDEP) -R ${datadir}/wine ${fontdir}`\"
+--- a/dlls/gdi32/freetype.c
++++ b/dlls/gdi32/freetype.c
+@@ -213,6 +213,10 @@ MAKE_FUNCPTR(FcPatternGetString);
+ #define GET_BE_WORD(x) RtlUshortByteSwap(x)
+ #endif
+ 
++#ifndef WINE_FONT_DIR
++#define WINE_FONT_DIR "fonts"
++#endif
++
+ /* This is basically a copy of FT_Bitmap_Size with an extra element added */
+ typedef struct {
+     FT_Short height;
+@@ -2960,22 +2964,44 @@ static void load_mac_fonts(void)
+ 
+ #endif
+ 
++static char *get_font_dir(void)
++{
++    const char *build_dir, *data_dir;
++    char *name = NULL;
++
++    if ((data_dir = wine_get_data_dir()))
++    {
++        if (!(name = HeapAlloc( GetProcessHeap(), 0, strlen(data_dir) + 1 + sizeof(WINE_FONT_DIR) )))
++            return NULL;
++        strcpy( name, data_dir );
++        strcat( name, "/" );
++        strcat( name, WINE_FONT_DIR );
++    }
++    else if ((build_dir = wine_get_build_dir()))
++    {
++        if (!(name = HeapAlloc( GetProcessHeap(), 0, strlen(build_dir) + sizeof("/fonts") )))
++            return NULL;
++        strcpy( name, build_dir );
++        strcat( name, "/fonts" );
++    }
++    return name;
++}
++
+ static char *get_data_dir_path( LPCWSTR file )
+ {
+     char *unix_name = NULL;
+-    const char *data_dir = wine_get_data_dir();
+-
+-    if (!data_dir) data_dir = wine_get_build_dir();
++    char *font_dir = get_font_dir();
+ 
+-    if (data_dir)
++    if (font_dir)
+     {
+         INT len = WideCharToMultiByte(CP_UNIXCP, 0, file, -1, NULL, 0, NULL, NULL);
+ 
+-        unix_name = HeapAlloc(GetProcessHeap(), 0, strlen(data_dir) + len + sizeof("/fonts/"));
+-        strcpy(unix_name, data_dir);
+-        strcat(unix_name, "/fonts/");
++        unix_name = HeapAlloc(GetProcessHeap(), 0, strlen(font_dir) + len + 1 );
++        strcpy(unix_name, font_dir);
++        strcat(unix_name, "/");
+ 
+         WideCharToMultiByte(CP_UNIXCP, 0, file, -1, unix_name + strlen(unix_name), len, NULL, NULL);
++        HeapFree( GetProcessHeap(), 0, font_dir );
+     }
+     return unix_name;
+ }
+@@ -4121,7 +4147,6 @@ static void init_font_list(void)
+     DWORD valuelen, datalen, i = 0, type, dlen, vlen;
+     WCHAR windowsdir[MAX_PATH];
+     char *unixname;
+-    const char *data_dir;
+ 
+     delete_external_font_keys();
+ 
+@@ -4137,13 +4162,9 @@ static void init_font_list(void)
+         HeapFree(GetProcessHeap(), 0, unixname);
+     }
+ 
+-    /* load the system truetype fonts */
+-    data_dir = wine_get_data_dir();
+-    if (!data_dir) data_dir = wine_get_build_dir();
+-    if (data_dir && (unixname = HeapAlloc(GetProcessHeap(), 0, strlen(data_dir) + sizeof("/fonts/"))))
++    /* load the wine fonts */
++    if ((unixname = get_font_dir()))
+     {
+-        strcpy(unixname, data_dir);
+-        strcat(unixname, "/fonts/");
+         ReadFontDir(unixname, TRUE);
+         HeapFree(GetProcessHeap(), 0, unixname);
+     }
diff --git a/debian/patches/series b/debian/patches/series
index 2031aec..5b85905 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+fontdir.patch
 makefile.patch
 kfreebsd.patch
 sfnt2fon.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wine/wine.git



More information about the pkg-wine-party mailing list