-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1861 from gridcoin-community/revert-1859-musl
Revert "build: Add support for building with musl and Alpine Linux"
- Loading branch information
Showing
11 changed files
with
208 additions
and
124 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,29 @@ | ||
package=fontconfig | ||
GCCFLAGS?= | ||
$(package)_version=2.12.1 | ||
$(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/ | ||
$(package)_download_path=http://www.freedesktop.org/software/fontconfig/release/ | ||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2 | ||
$(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 | ||
$(package)_dependencies=freetype expat | ||
$(package)_patches=0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch | ||
|
||
define $(package)_set_vars | ||
$(package)_config_opts=--disable-docs --disable-static --disable-libxml2 --disable-iconv | ||
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking | ||
$(package)_config_opts=--disable-docs --disable-static | ||
$(package)_cxxflags_aarch64_linux = $(GCCFLAGS) | ||
$(package)_cflags_aarch64_linux = $(GCCFLAGS) | ||
$(package)_cxxflags_arm_linux = $(GCCFLAGS) | ||
$(package)_cflags_arm_linux = $(GCCFLAGS) | ||
endef | ||
|
||
define $(package)_config_cmds | ||
patch -p1 < $($(package)_patch_dir)/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch &&\ | ||
$($(package)_autoconf) | ||
endef | ||
|
||
# 2.12.1 uses CHAR_WIDTH which is reserved and clashes with some glibc versions, but newer versions of fontconfig | ||
# have broken makefiles which needlessly attempt to re-generate headers with gperf. | ||
# Instead, change all uses of CHAR_WIDTH, and disable the rule that forces header re-generation. | ||
# This can be removed once the upstream build is fixed. | ||
define $(package)_build_cmds | ||
sed -i 's/CHAR_WIDTH/CHARWIDTH/g' fontconfig/fontconfig.h src/fcobjshash.gperf src/fcobjs.h src/fcobjshash.h && \ | ||
sed -i 's/fcobjshash.h: fcobjshash.gperf/fcobjshash.h:/' src/Makefile && \ | ||
$(MAKE) | ||
endef | ||
|
||
define $(package)_stage_cmds | ||
$(MAKE) DESTDIR=$($(package)_staging_dir) install | ||
endef | ||
|
||
define $(package)_postprocess_cmds | ||
rm lib/*.la | ||
endef |
73 changes: 73 additions & 0 deletions
73
depends/patches/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.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,73 @@ | ||
From 20cddc824c6501c2082cac41b162c34cd5fcc530 Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <raj.khem@gmail.com> | ||
Date: Sun, 11 Dec 2016 14:32:00 -0800 | ||
Subject: [PATCH] Avoid conflicts with integer width macros from TS | ||
18661-1:2014 | ||
|
||
glibc 2.25+ has now defined these macros in <limits.h> | ||
https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a | ||
|
||
Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
--- | ||
Upstream-Status: Submitted | ||
|
||
fontconfig/fontconfig.h | 2 +- | ||
src/fcobjs.h | 2 +- | ||
src/fcobjshash.gperf | 2 +- | ||
src/fcobjshash.h | 2 +- | ||
4 files changed, 4 insertions(+), 4 deletions(-) | ||
|
||
Index: fontconfig-2.12.1/fontconfig/fontconfig.h | ||
=================================================================== | ||
--- fontconfig-2.12.1.orig/fontconfig/fontconfig.h | ||
+++ fontconfig-2.12.1/fontconfig/fontconfig.h | ||
@@ -128,7 +128,8 @@ typedef int FcBool; | ||
#define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION | ||
|
||
/* Adjust outline rasterizer */ | ||
-#define FC_CHAR_WIDTH "charwidth" /* Int */ | ||
+#define FC_CHARWIDTH "charwidth" /* Int */ | ||
+#define FC_CHAR_WIDTH FC_CHARWIDTH | ||
#define FC_CHAR_HEIGHT "charheight"/* Int */ | ||
#define FC_MATRIX "matrix" /* FcMatrix */ | ||
|
||
Index: fontconfig-2.12.1/src/fcobjs.h | ||
=================================================================== | ||
--- fontconfig-2.12.1.orig/src/fcobjs.h | ||
+++ fontconfig-2.12.1/src/fcobjs.h | ||
@@ -51,7 +51,7 @@ FC_OBJECT (DPI, FcTypeDouble, NULL) | ||
FC_OBJECT (RGBA, FcTypeInteger, NULL) | ||
FC_OBJECT (SCALE, FcTypeDouble, NULL) | ||
FC_OBJECT (MINSPACE, FcTypeBool, NULL) | ||
-FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL) | ||
+FC_OBJECT (CHARWIDTH, FcTypeInteger, NULL) | ||
FC_OBJECT (CHAR_HEIGHT, FcTypeInteger, NULL) | ||
FC_OBJECT (MATRIX, FcTypeMatrix, NULL) | ||
FC_OBJECT (CHARSET, FcTypeCharSet, FcCompareCharSet) | ||
Index: fontconfig-2.12.1/src/fcobjshash.gperf | ||
=================================================================== | ||
--- fontconfig-2.12.1.orig/src/fcobjshash.gperf | ||
+++ fontconfig-2.12.1/src/fcobjshash.gperf | ||
@@ -44,7 +44,7 @@ int id; | ||
"rgba",FC_RGBA_OBJECT | ||
"scale",FC_SCALE_OBJECT | ||
"minspace",FC_MINSPACE_OBJECT | ||
-"charwidth",FC_CHAR_WIDTH_OBJECT | ||
+"charwidth",FC_CHARWIDTH_OBJECT | ||
"charheight",FC_CHAR_HEIGHT_OBJECT | ||
"matrix",FC_MATRIX_OBJECT | ||
"charset",FC_CHARSET_OBJECT | ||
Index: fontconfig-2.12.1/src/fcobjshash.h | ||
=================================================================== | ||
--- fontconfig-2.12.1.orig/src/fcobjshash.h | ||
+++ fontconfig-2.12.1/src/fcobjshash.h | ||
@@ -284,7 +284,7 @@ FcObjectTypeLookup (register const char | ||
{(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT}, | ||
{-1}, | ||
#line 47 "fcobjshash.gperf" | ||
- {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT}, | ||
+ {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT}, | ||
#line 48 "fcobjshash.gperf" | ||
{(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT}, | ||
#line 55 "fcobjshash.gperf" | ||
|
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
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
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
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,90 @@ | ||
/* | ||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> | ||
* | ||
* Permission to use, copy, modify, and distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
#ifndef BITCOIN_STRLCPY_H | ||
#define BITCOIN_STRLCPY_H | ||
|
||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
/* | ||
* Copy src to string dst of size siz. At most siz-1 characters | ||
* will be copied. Always NUL terminates (unless siz == 0). | ||
* Returns strlen(src); if retval >= siz, truncation occurred. | ||
*/ | ||
inline size_t strlcpy(char *dst, const char *src, size_t siz) | ||
{ | ||
char *d = dst; | ||
const char *s = src; | ||
size_t n = siz; | ||
|
||
/* Copy as many bytes as will fit */ | ||
if (n != 0) | ||
{ | ||
while (--n != 0) | ||
{ | ||
if ((*d++ = *s++) == '\0') | ||
break; | ||
} | ||
} | ||
|
||
/* Not enough room in dst, add NUL and traverse rest of src */ | ||
if (n == 0) | ||
{ | ||
if (siz != 0) | ||
*d = '\0'; /* NUL-terminate dst */ | ||
while (*s++) | ||
; | ||
} | ||
|
||
return(s - src - 1); /* count does not include NUL */ | ||
} | ||
|
||
/* | ||
* Appends src to string dst of size siz (unlike strncat, siz is the | ||
* full size of dst, not space left). At most siz-1 characters | ||
* will be copied. Always NUL terminates (unless siz <= strlen(dst)). | ||
* Returns strlen(src) + MIN(siz, strlen(initial dst)). | ||
* If retval >= siz, truncation occurred. | ||
*/ | ||
inline size_t strlcat(char *dst, const char *src, size_t siz) | ||
{ | ||
char *d = dst; | ||
const char *s = src; | ||
size_t n = siz; | ||
size_t dlen; | ||
|
||
/* Find the end of dst and adjust bytes left but don't go past end */ | ||
while (n-- != 0 && *d != '\0') | ||
d++; | ||
dlen = d - dst; | ||
n = siz - dlen; | ||
|
||
if (n == 0) | ||
return(dlen + strlen(s)); | ||
while (*s != '\0') | ||
{ | ||
if (n != 1) | ||
{ | ||
*d++ = *s; | ||
n--; | ||
} | ||
s++; | ||
} | ||
*d = '\0'; | ||
|
||
return(dlen + (s - src)); /* count does not include NUL */ | ||
} | ||
#endif |
Oops, something went wrong.