mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 13:11:46 +03:00
Ports: Add port for gettext
This commit is contained in:
parent
1c3c072a76
commit
b05a6a1701
Notes:
sideshowbarker
2024-07-18 18:29:54 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/b05a6a17017 Pull-request: https://github.com/SerenityOS/serenity/pull/6959
@ -32,6 +32,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
||||
| [`frotz`](frotz/) | Frotz | 2.53 | https://gitlab.com/DavidGriffith/frotz |
|
||||
| [`gcc`](gcc/) | GNU Compiler Collection | 11.1.0 | https://gcc.gnu.org/ |
|
||||
| [`genemu`](genemu/) | Genesis / MegaDrive Emulator | 3bf6f7c | https://github.com/rasky/genemu |
|
||||
| [`gettext`](gettext/) | GNU gettext | 0.21 | https://www.gnu.org/software/gettext/ |
|
||||
| [`git`](git/) | Git | 2.31.1 | https://git-scm.com/ |
|
||||
| [`gmp`](gmp/) | GNU Multiple Precision Arithmetic Library (GMP) | 6.2.1 | https://gmplib.org/ |
|
||||
| [`gnucobol`](gnucobol/) | GnuCOBOL | 3.1.2 | https://gnucobol.sourceforge.io/ |
|
||||
|
12
Ports/gettext/package.sh
Executable file
12
Ports/gettext/package.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=gettext
|
||||
version=0.21
|
||||
useconfigure=true
|
||||
files="https://ftp.gnu.org/pub/gnu/gettext/gettext-${version}.tar.gz gettext-${version}.tar.gz c77d0da3102aec9c07f43671e60611ebff89a996ef159497ce8e59d075786b12"
|
||||
auth_type=sha256
|
||||
|
||||
install() {
|
||||
run make DESTDIR=${SERENITY_INSTALL_ROOT} $installopts install
|
||||
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libintl.so -Wl,-soname,libintl.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libintl.a -Wl,--no-whole-archive -liconv
|
||||
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libintl.la
|
||||
}
|
24
Ports/gettext/patches/configure.patch
Normal file
24
Ports/gettext/patches/configure.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Naur gettext-0.21/build-aux/config.sub gettext-0.21.serenity/build-aux/config.sub
|
||||
--- gettext-0.21/build-aux/config.sub 2020-07-17 22:25:52.000000000 +0200
|
||||
+++ gettext-0.21.serenity/build-aux/config.sub 2021-05-08 04:40:29.446280648 +0200
|
||||
@@ -1692,7 +1692,7 @@
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
||||
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* | serenity* \
|
||||
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
||||
diff -Naur gettext-0.21/libtextstyle/build-aux/config.sub gettext-0.21.serenity/libtextstyle/build-aux/config.sub
|
||||
--- gettext-0.21/libtextstyle/build-aux/config.sub 2020-07-17 22:26:48.000000000 +0200
|
||||
+++ gettext-0.21.serenity/libtextstyle/build-aux/config.sub 2021-05-08 04:40:43.673225314 +0200
|
||||
@@ -1692,7 +1692,7 @@
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
||||
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* | serenity* \
|
||||
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
14
Ports/gettext/patches/fnmatch.patch
Normal file
14
Ports/gettext/patches/fnmatch.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -Naur gettext-0.21/gettext-tools/gnulib-lib/fnmatch_loop.c gettext-0.21.serenity/gettext-tools/gnulib-lib/fnmatch_loop.c
|
||||
--- gettext-0.21/gettext-tools/gnulib-lib/fnmatch_loop.c 2020-06-26 21:57:10.000000000 +0200
|
||||
+++ gettext-0.21.serenity/gettext-tools/gnulib-lib/fnmatch_loop.c 2021-05-08 05:06:59.944736766 +0200
|
||||
@@ -19,6 +19,10 @@
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __serenity__
|
||||
+# define FNM_EXTMATCH 9000
|
||||
+#endif
|
||||
+
|
||||
struct STRUCT
|
||||
{
|
||||
const CHAR *pattern;
|
48
Ports/gettext/patches/getprogname.patch
Normal file
48
Ports/gettext/patches/getprogname.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff -Naur gettext-0.21/gettext-runtime/gnulib-lib/getprogname.c gettext-0.21.serenity/gettext-runtime/gnulib-lib/getprogname.c
|
||||
--- gettext-0.21/gettext-runtime/gnulib-lib/getprogname.c 2020-07-05 22:09:26.000000000 +0200
|
||||
+++ gettext-0.21.serenity/gettext-runtime/gnulib-lib/getprogname.c 2021-05-08 05:04:37.755260750 +0200
|
||||
@@ -245,6 +245,8 @@
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
||||
diff -Naur gettext-0.21/gettext-tools/gnulib-lib/getprogname.c gettext-0.21.serenity/gettext-tools/gnulib-lib/getprogname.c
|
||||
--- gettext-0.21/gettext-tools/gnulib-lib/getprogname.c 2020-07-05 22:10:31.000000000 +0200
|
||||
+++ gettext-0.21.serenity/gettext-tools/gnulib-lib/getprogname.c 2021-05-08 05:04:30.225111896 +0200
|
||||
@@ -245,6 +245,8 @@
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
||||
diff -Naur gettext-0.21/gettext-tools/libgettextpo/getprogname.c gettext-0.21.serenity/gettext-tools/libgettextpo/getprogname.c
|
||||
--- gettext-0.21/gettext-tools/libgettextpo/getprogname.c 2020-07-05 22:11:43.000000000 +0200
|
||||
+++ gettext-0.21.serenity/gettext-tools/libgettextpo/getprogname.c 2021-05-08 05:04:16.591509028 +0200
|
||||
@@ -245,6 +245,8 @@
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
||||
diff -Naur gettext-0.21/libtextstyle/lib/getprogname.c gettext-0.21.serenity/libtextstyle/lib/getprogname.c
|
||||
--- gettext-0.21/libtextstyle/lib/getprogname.c 2020-07-05 22:12:31.000000000 +0200
|
||||
+++ gettext-0.21.serenity/libtextstyle/lib/getprogname.c 2021-05-08 05:04:34.065187807 +0200
|
||||
@@ -245,6 +245,8 @@
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
22
Ports/gettext/patches/wctype.patch
Normal file
22
Ports/gettext/patches/wctype.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -Naur gettext-0.21/gettext-tools/gnulib-lib/fnmatch.c gettext-0.21.serenity/gettext-tools/gnulib-lib/fnmatch.c
|
||||
--- gettext-0.21/gettext-tools/gnulib-lib/fnmatch.c 2020-06-26 21:52:53.000000000 +0200
|
||||
+++ gettext-0.21.serenity/gettext-tools/gnulib-lib/fnmatch.c 2021-05-08 05:14:25.420192898 +0200
|
||||
@@ -106,6 +106,18 @@
|
||||
# define CHAR_CLASS_MAX_LENGTH 256
|
||||
#endif
|
||||
|
||||
+#ifdef __serenity__
|
||||
+wctype_t wctype(const char*)
|
||||
+{
|
||||
+ asm("int3");
|
||||
+}
|
||||
+
|
||||
+int iswctype(wint_t, wctype_t)
|
||||
+{
|
||||
+ asm("int3");
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#define IS_CHAR_CLASS(string) wctype (string)
|
||||
|
||||
/* Avoid depending on library functions or files
|
Loading…
Reference in New Issue
Block a user