mirror of
https://github.com/RGBCube/serenity
synced 2025-07-30 10:57:35 +00:00
Ports: Add Fontconfig port
This commit is contained in:
parent
a8bd78e634
commit
c1511ebbea
4 changed files with 90 additions and 0 deletions
10
Ports/fontconfig/patches/config.sub.patch
Normal file
10
Ports/fontconfig/patches/config.sub.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- fontconfig-2.13.94/config.sub.orig 2021-10-24 19:47:39.283922896 -0700
|
||||
+++ fontconfig-2.13.94/config.sub 2021-10-24 19:47:56.679967977 -0700
|
||||
@@ -1334,6 +1334,7 @@
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
# sysv* is not here because it comes later, after sysvr4.
|
||||
gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
||||
+ | serenity* \
|
||||
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | kopensolaris* | plan9* \
|
67
Ports/fontconfig/patches/fccompat.c.patch
Normal file
67
Ports/fontconfig/patches/fccompat.c.patch
Normal file
|
@ -0,0 +1,67 @@
|
|||
--- fontconfig-2.13.94/src/fccompat.c 2021-10-24 21:16:27.503925061 -0700
|
||||
+++ fontconfig-2.13.94/src/fccompat.c 2021-10-24 21:16:21.115917517 -0700
|
||||
@@ -184,54 +184,6 @@
|
||||
{
|
||||
int32_t result;
|
||||
|
||||
-#if HAVE_RANDOM_R
|
||||
- static struct random_data fcrandbuf;
|
||||
- static char statebuf[256];
|
||||
- static FcBool initialized = FcFalse;
|
||||
-#ifdef _AIX
|
||||
- static char *retval;
|
||||
- long res;
|
||||
-#endif
|
||||
-
|
||||
- if (initialized != FcTrue)
|
||||
- {
|
||||
-#ifdef _AIX
|
||||
- initstate_r (time (NULL), statebuf, 256, &retval, &fcrandbuf);
|
||||
-#else
|
||||
- initstate_r (time (NULL), statebuf, 256, &fcrandbuf);
|
||||
-#endif
|
||||
- initialized = FcTrue;
|
||||
- }
|
||||
-
|
||||
-#ifdef _AIX
|
||||
- random_r (&res, &fcrandbuf);
|
||||
- result = (int32_t)res;
|
||||
-#else
|
||||
- random_r (&fcrandbuf, &result);
|
||||
-#endif
|
||||
-#elif HAVE_RANDOM
|
||||
- static char statebuf[256];
|
||||
- char *state;
|
||||
- static FcBool initialized = FcFalse;
|
||||
-
|
||||
- if (initialized != FcTrue)
|
||||
- {
|
||||
- state = initstate (time (NULL), statebuf, 256);
|
||||
- initialized = FcTrue;
|
||||
- }
|
||||
- else
|
||||
- state = setstate (statebuf);
|
||||
-
|
||||
- result = random ();
|
||||
-
|
||||
- setstate (state);
|
||||
-#elif HAVE_LRAND48
|
||||
- result = lrand48 ();
|
||||
-#elif HAVE_RAND_R
|
||||
- static unsigned int seed = time (NULL);
|
||||
-
|
||||
- result = rand_r (&seed);
|
||||
-#elif HAVE_RAND
|
||||
static FcBool initialized = FcFalse;
|
||||
|
||||
if (initialized != FcTrue)
|
||||
@@ -240,9 +192,6 @@
|
||||
initialized = FcTrue;
|
||||
}
|
||||
result = rand ();
|
||||
-#else
|
||||
-# error no random number generator function available.
|
||||
-#endif
|
||||
|
||||
return result;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue