Ports: Add Fontconfig port
This commit is contained in:
parent
a8bd78e634
commit
c1511ebbea
Notes:
sideshowbarker
2024-07-18 01:49:11 +09:00
Author: https://github.com/bcoles Commit: https://github.com/SerenityOS/serenity/commit/c1511ebbead Pull-request: https://github.com/SerenityOS/serenity/pull/10636
4 changed files with 90 additions and 0 deletions
|
@ -38,6 +38,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`flatbuffers`](flatbuffers/) | Flatbuffers | 1.12.0 | https://github.com/google/flatbuffers |
|
||||
| [`flex`](flex/) | flex | 2.6.4 | https://github.com/westes/flex |
|
||||
| [`fotaq`](fotaq/) | Flight of the Amazon Queen | 1.0 | https://www.scummvm.org/games/#games-queen |
|
||||
| [`fontconfig`](fontconfig/) | Fontconfig | 2.13.94 | https://www.freedesktop.org/wiki/Software/fontconfig/ |
|
||||
| [`ffmpeg`](ffmpeg/) | ffmpeg | 4.4 | https://ffmpeg.org |
|
||||
| [`freeciv`](freeciv/) | Freeciv | 3.0.0-beta2 | http://freeciv.org/ |
|
||||
| [`freetype`](freetype/) | FreeType | 2.10.4 | https://www.freetype.org/ |
|
||||
|
|
12
Ports/fontconfig/package.sh
Executable file
12
Ports/fontconfig/package.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=fontconfig
|
||||
version=2.13.94
|
||||
useconfigure="true"
|
||||
depends=("libxml2")
|
||||
files="https://www.freedesktop.org/software/fontconfig/release/fontconfig-${version}.tar.xz fontconfig-${version}.tar.xz a5f052cb73fd479ffb7b697980510903b563bbb55b8f7a2b001fcfb94026003c"
|
||||
auth_type="sha256"
|
||||
configopts=("--prefix=/usr/local" "--enable-libxml2" "LDFLAGS=-ldl -lxml2")
|
||||
|
||||
export CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/local/include/libxml2"
|
||||
export LIBXML2_CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/local/include/libxml2/"
|
||||
export LIBXML2_LIBS="-lxml2"
|
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
Reference in a new issue