-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/MINGW-packages: update harfbuzz/pango
also rebuild all packages that depends on freetype, since some might use static libs.
- Loading branch information
Showing
34 changed files
with
1,049 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tools/MINGW-packages/mingw-w64-fontconfig/0001-fix-config-linking.all.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- fontconfig-2.10.92/conf.d/Makefile.am.orig 2013-04-13 06:32:27 +0400 | ||
+++ fontconfig-2.10.92/conf.d/Makefile.am 2013-04-13 06:37:08 +0400 | ||
@@ -83,9 +83,9 @@ | ||
@(echo cd $(DESTDIR)$(configdir); \ | ||
cd $(DESTDIR)$(configdir); \ | ||
for i in $(CONF_LINKS); do \ | ||
- echo $(RM) $$i";" ln -s $(templatedir)/$$i .; \ | ||
+ echo $(RM) $$i";" ln -s $(DESTDIR)$(templatedir)/$$i .; \ | ||
$(RM) $$i; \ | ||
- ln -s $(templatedir)/$$i .; \ | ||
+ ln -s $(DESTDIR)$(templatedir)/$$i .; \ | ||
done) | ||
uninstall-local: | ||
@(echo cd $(DESTDIR)$(configdir); \ |
12 changes: 12 additions & 0 deletions
12
tools/MINGW-packages/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- fontconfig-2.11.0/test/test-migration.c.orig 2013-10-11 03:10:18.000000000 +0000 | ||
+++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 12:20:57.859195300 +0000 | ||
@@ -4,6 +4,9 @@ | ||
#include <unistd.h> | ||
#include <sys/types.h> | ||
#include <dirent.h> | ||
+#ifdef _WIN32 | ||
+#define mkdir(path,mode) _mkdir(path) | ||
+#endif | ||
#ifndef HAVE_STRUCT_DIRENT_D_TYPE | ||
#include <sys/types.h> | ||
#include <sys/stat.h> |
34 changes: 34 additions & 0 deletions
34
tools/MINGW-packages/mingw-w64-fontconfig/0003-fix-link-libintl.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 07bd14c5c7fed103020dc9b630d6a254861ada07 Mon Sep 17 00:00:00 2001 | ||
From: Akira TAGOH <akira@tagoh.org> | ||
Date: Fri, 9 Mar 2018 11:55:43 +0900 | ||
Subject: Fix the build issue again on MinGW with enabling nls | ||
|
||
--- | ||
src/Makefile.am | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/Makefile.am b/src/Makefile.am | ||
index 1ff065b..2111ce0 100644 | ||
--- a/src/Makefile.am | ||
+++ b/src/Makefile.am | ||
@@ -82,7 +82,7 @@ AM_CPPFLAGS = \ | ||
-DFC_CACHEDIR='"$(FC_CACHEDIR)"' \ | ||
-DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' \ | ||
-DFC_TEMPLATEDIR='"$(TEMPLATEDIR)"' | ||
-LDADD = $(INTLLIBS) | ||
+LDADD = $(LIBINTL) | ||
|
||
EXTRA_DIST += makealias | ||
|
||
@@ -168,7 +168,7 @@ lib_LTLIBRARIES = libfontconfig.la | ||
libfontconfig_la_LDFLAGS = \ | ||
-version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) | ||
|
||
-libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(UUID_LIBS) $(INTLLIBS) | ||
+libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(UUID_LIBS) $(LTLIBINTL) | ||
|
||
libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency) | ||
|
||
-- | ||
cgit v1.1 | ||
|
216 changes: 216 additions & 0 deletions
216
tools/MINGW-packages/mingw-w64-fontconfig/0004-fix-mkdtemp.mingw.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
--- fontconfig-2.11.0/test/test-migration.c.orig 2014-02-06 12:24:45.529605800 +0000 | ||
+++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 14:43:19.691870300 +0000 | ||
@@ -9,6 +9,213 @@ | ||
#endif | ||
#include <fontconfig/fontconfig.h> | ||
|
||
+#if defined(_WIN32) | ||
+#include <time.h> | ||
+#include <math.h> | ||
+#include <errno.h> | ||
+#include <sys/stat.h> | ||
+#include <string.h> | ||
+#include <windows.h> | ||
+#include <accctrl.h> | ||
+#include <aclapi.h> | ||
+ | ||
+static PSECURITY_DESCRIPTOR | ||
+create_sd (int permissions) | ||
+{ | ||
+ PSECURITY_DESCRIPTOR pSD = NULL; | ||
+ int i; | ||
+ int j; | ||
+ EXPLICIT_ACCESS ea[3]; | ||
+ PSID sids[3] = { NULL, NULL, NULL }; | ||
+ WELL_KNOWN_SID_TYPE sidtypes[3] = { WinCreatorOwnerSid, WinCreatorGroupSid, WinWorldSid }; | ||
+ int ea_len = 0; | ||
+ DWORD dwRes, dwDisposition; | ||
+ PACL pACL = NULL; | ||
+ | ||
+ /* Initialize a security descriptor. */ | ||
+ pSD = (PSECURITY_DESCRIPTOR) LocalAlloc (LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH); | ||
+ if (NULL == pSD) | ||
+ { | ||
+ errno = ENOMEM; | ||
+ return NULL; | ||
+ } | ||
+ | ||
+ if (!InitializeSecurityDescriptor (pSD, SECURITY_DESCRIPTOR_REVISION)) | ||
+ { | ||
+ LocalFree (pSD); | ||
+ errno = EIO; | ||
+ return NULL; | ||
+ } | ||
+ | ||
+ for (i = 0; i < 3; i++) | ||
+ { | ||
+ BOOL b; | ||
+ DWORD bytes; | ||
+ int imasked = permissions & (07 << (2 - i)); | ||
+ if (!imasked) | ||
+ continue; | ||
+ | ||
+ bytes = SECURITY_MAX_SID_SIZE; | ||
+ sids[ea_len] = (PSID) LocalAlloc (LMEM_FIXED, bytes); | ||
+ if (NULL == sids[ea_len]) | ||
+ { | ||
+ errno = ENOMEM; | ||
+ LocalFree (pSD); | ||
+ for (j = 0; j < ea_len; j++) | ||
+ { | ||
+ if (sids[j] != NULL) | ||
+ { | ||
+ LocalFree (sids[j]); | ||
+ sids[j] = NULL; | ||
+ } | ||
+ } | ||
+ return NULL; | ||
+ } | ||
+ | ||
+ b = CreateWellKnownSid (sidtypes[i], NULL, sids[ea_len], &bytes); | ||
+ if (!b) | ||
+ { | ||
+ errno = EINVAL; | ||
+ LocalFree (pSD); | ||
+ for (j = 0; j < ea_len; j++) | ||
+ { | ||
+ if (sids[j] != NULL) | ||
+ { | ||
+ LocalFree (sids[j]); | ||
+ sids[j] = NULL; | ||
+ } | ||
+ } | ||
+ return NULL; | ||
+ } | ||
+ | ||
+ /* Initialize an EXPLICIT_ACCESS structure for an ACE. */ | ||
+ ZeroMemory (&ea[ea_len], sizeof(EXPLICIT_ACCESS)); | ||
+ bytes = 0; | ||
+ if (01 & imasked) | ||
+ bytes = bytes | GENERIC_READ; | ||
+ if (02 & imasked) | ||
+ bytes = bytes | GENERIC_WRITE; | ||
+ if (04 & imasked) | ||
+ bytes = bytes | GENERIC_EXECUTE; | ||
+ ea[ea_len].grfAccessPermissions = bytes; | ||
+ ea[ea_len].grfAccessMode = SET_ACCESS; | ||
+ ea[ea_len].grfInheritance= NO_INHERITANCE; | ||
+ ea[ea_len].Trustee.TrusteeForm = TRUSTEE_IS_SID; | ||
+ ea[ea_len].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; | ||
+ ea[ea_len].Trustee.ptstrName = (LPTSTR) sids[ea_len]; | ||
+ ea_len = ea_len + 1; | ||
+ } | ||
+ | ||
+ /* Create a new ACL that contains the new ACEs. */ | ||
+ dwRes = SetEntriesInAcl (ea_len, ea, NULL, &pACL); | ||
+ if (ERROR_SUCCESS != dwRes) | ||
+ { | ||
+ errno = EIO; | ||
+ LocalFree (pSD); | ||
+ for (j = 0; j < ea_len; j++) | ||
+ { | ||
+ if (sids[j] != NULL) | ||
+ { | ||
+ LocalFree (sids[j]); | ||
+ sids[j] = NULL; | ||
+ } | ||
+ } | ||
+ return NULL; | ||
+ } | ||
+ | ||
+ for (j = 0; j < ea_len; j++) | ||
+ { | ||
+ if (sids[j] != NULL) | ||
+ { | ||
+ LocalFree (sids[j]); | ||
+ sids[j] = NULL; | ||
+ } | ||
+ } | ||
+ | ||
+ /* Add the ACL to the security descriptor. */ | ||
+ if (!SetSecurityDescriptorDacl (pSD, | ||
+ TRUE, // bDaclPresent flag | ||
+ pACL, | ||
+ FALSE)) // not a default DACL | ||
+ { | ||
+ errno = EIO; | ||
+ LocalFree (pSD); | ||
+ LocalFree (pACL); | ||
+ return NULL; | ||
+ } | ||
+ | ||
+ return pSD; | ||
+} | ||
+ | ||
+static void | ||
+free_sd (PSECURITY_DESCRIPTOR sd) | ||
+{ | ||
+ BOOL b, present, defaulted; | ||
+ PACL pACL = NULL; | ||
+ present = FALSE; | ||
+ b = GetSecurityDescriptorDacl (sd, &present, &pACL, &defaulted); | ||
+ if (b && present && !defaulted && pACL) | ||
+ LocalFree (pACL); | ||
+ LocalFree (sd); | ||
+} | ||
+ | ||
+static void | ||
+randtemplate (char *template, size_t l) | ||
+{ | ||
+ int i; | ||
+ for (i = l - 6; i < l; i++) | ||
+ { | ||
+ int r = rand (); | ||
+ if ((r / (RAND_MAX + 1)) > ((RAND_MAX + 1) / 2)) | ||
+ template[i] = 'A' + (double) rand () / (RAND_MAX + 1) * ('Z' - 'A'); | ||
+ else | ||
+ template[i] = 'a' + (double) rand () / (RAND_MAX + 1) * ('z' - 'a'); | ||
+ } | ||
+} | ||
+ | ||
+static char * | ||
+mkdtemp (char *template) | ||
+{ | ||
+ int i; | ||
+ size_t l; | ||
+ BOOL b; | ||
+ SECURITY_ATTRIBUTES sa; | ||
+ | ||
+ if (template == NULL) | ||
+ { | ||
+ errno = EINVAL; | ||
+ return NULL; | ||
+ } | ||
+ l = strlen (template); | ||
+ if (l < 6 || strcmp (&template[l - 6], "XXXXXX") != 0) | ||
+ { | ||
+ errno = EINVAL; | ||
+ return NULL; | ||
+ } | ||
+ srand(time (NULL)); | ||
+ sa.nLength = sizeof (sa); | ||
+ sa.lpSecurityDescriptor = create_sd (0700); | ||
+ sa.bInheritHandle = FALSE; | ||
+ do | ||
+ { | ||
+ randtemplate (template, l); | ||
+ SetLastError (0); | ||
+ b = CreateDirectoryA (template, &sa); | ||
+ } while (!b && GetLastError () == ERROR_ALREADY_EXISTS); | ||
+ free_sd (sa.lpSecurityDescriptor); | ||
+ if (!b) | ||
+ { | ||
+ errno = EIO; | ||
+ return NULL; | ||
+ } | ||
+ else | ||
+ { | ||
+ errno = 0; | ||
+ return template; | ||
+ } | ||
+} | ||
+#endif | ||
+ | ||
FcBool | ||
mkdir_p(const char *dir) | ||
{ |
27 changes: 27 additions & 0 deletions
27
tools/MINGW-packages/mingw-w64-fontconfig/0005-fix-setenv.mingw.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- fontconfig-2.11.0/test/test-migration.c.orig 2014-02-06 14:43:19.691870300 +0000 | ||
+++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 14:48:25.336182200 +0000 | ||
@@ -214,6 +214,24 @@ | ||
return template; | ||
} | ||
} | ||
+ | ||
+static int | ||
+setenv (const char *var, const char *val, int ovr) | ||
+{ | ||
+ BOOL b; | ||
+ char c[2]; | ||
+ if (!ovr) | ||
+ { | ||
+ DWORD d; | ||
+ d = GetEnvironmentVariableA (var, c, 2); | ||
+ if (0 != d && GetLastError () != ERROR_ENVVAR_NOT_FOUND) | ||
+ return; | ||
+ } | ||
+ b = SetEnvironmentVariableA (var, val); | ||
+ if (b) | ||
+ return 0; | ||
+ return 1; | ||
+} | ||
#endif | ||
|
||
FcBool |
22 changes: 22 additions & 0 deletions
22
tools/MINGW-packages/mingw-w64-fontconfig/0007-pkgconfig.mingw.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- fontconfig-2.11.93/m4/pkg.m4.orig 2015-03-09 02:54:03.000000000 +0000 | ||
+++ fontconfig-2.11.93/m4/pkg.m4 2015-04-06 11:04:21.862416100 +0000 | ||
@@ -111,8 +111,8 @@ | ||
pkg_failed=no | ||
AC_MSG_CHECKING([for $1]) | ||
|
||
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | ||
-_PKG_CONFIG([$1][_LIBS], [libs], [$2]) | ||
+_PKG_CONFIG([$1][_CFLAGS], [cflags --dont-define-prefix], [$2]) | ||
+_PKG_CONFIG([$1][_LIBS], [libs --dont-define-prefix], [$2]) | ||
|
||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | ||
and $1[]_LIBS to avoid the need to call pkg-config. | ||
@@ -207,7 +207,7 @@ | ||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | ||
|
||
-_PKG_CONFIG([$1], [variable="][$3]["], [$2]) | ||
+_PKG_CONFIG([$1], [variable="][$3][" --dont-define-prefix], [$2]) | ||
AS_VAR_COPY([$1], [pkg_cv_][$1]) | ||
|
||
AS_VAR_IF([$1], [""], [$5], [$4])dnl |
Oops, something went wrong.