mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
Ports: Update gettext's patches to use git patches
This commit is contained in:
parent
2f58fe00bd
commit
d4413bc26b
6 changed files with 142 additions and 78 deletions
|
@ -1,7 +1,18 @@
|
|||
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 @@
|
||||
From 849a14feac4220857d03ed5b4c35b03e418c6eb8 Mon Sep 17 00:00:00 2001
|
||||
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
|
||||
Date: Mon, 16 May 2022 15:44:34 +0430
|
||||
Subject: [PATCH 1/3] Teach config.sub about serenity
|
||||
|
||||
---
|
||||
build-aux/config.sub | 2 +-
|
||||
libtextstyle/build-aux/config.sub | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/build-aux/config.sub b/build-aux/config.sub
|
||||
index 3d9a8dc..94c9729 100755
|
||||
--- a/build-aux/config.sub
|
||||
+++ b/build-aux/config.sub
|
||||
@@ -1692,7 +1692,7 @@ case $os in
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
|
@ -10,10 +21,11 @@ diff -Naur gettext-0.21/build-aux/config.sub gettext-0.21.serenity/build-aux/con
|
|||
| *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 @@
|
||||
diff --git a/libtextstyle/build-aux/config.sub b/libtextstyle/build-aux/config.sub
|
||||
index 3d9a8dc..94c9729 100755
|
||||
--- a/libtextstyle/build-aux/config.sub
|
||||
+++ b/libtextstyle/build-aux/config.sub
|
||||
@@ -1692,7 +1692,7 @@ case $os in
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
|
@ -22,3 +34,6 @@ diff -Naur gettext-0.21/libtextstyle/build-aux/config.sub gettext-0.21.serenity/
|
|||
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
||||
--
|
||||
2.36.1
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
From 5eb27ed6f09fb3387c23fb6cd4c39204d4592787 Mon Sep 17 00:00:00 2001
|
||||
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
|
||||
Date: Mon, 16 May 2022 15:44:53 +0430
|
||||
Subject: [PATCH 2/3] Stub out the getprogname() implementation
|
||||
|
||||
---
|
||||
gettext-runtime/gnulib-lib/getprogname.c | 2 ++
|
||||
gettext-tools/gnulib-lib/getprogname.c | 2 ++
|
||||
gettext-tools/libgettextpo/getprogname.c | 2 ++
|
||||
libtextstyle/lib/getprogname.c | 2 ++
|
||||
4 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gettext-runtime/gnulib-lib/getprogname.c b/gettext-runtime/gnulib-lib/getprogname.c
|
||||
index 5e6f764..e800b89 100644
|
||||
--- a/gettext-runtime/gnulib-lib/getprogname.c
|
||||
+++ b/gettext-runtime/gnulib-lib/getprogname.c
|
||||
@@ -245,6 +245,8 @@ getprogname (void)
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
||||
diff --git a/gettext-tools/gnulib-lib/getprogname.c b/gettext-tools/gnulib-lib/getprogname.c
|
||||
index 5e6f764..e800b89 100644
|
||||
--- a/gettext-tools/gnulib-lib/getprogname.c
|
||||
+++ b/gettext-tools/gnulib-lib/getprogname.c
|
||||
@@ -245,6 +245,8 @@ getprogname (void)
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
||||
diff --git a/gettext-tools/libgettextpo/getprogname.c b/gettext-tools/libgettextpo/getprogname.c
|
||||
index 5e6f764..e800b89 100644
|
||||
--- a/gettext-tools/libgettextpo/getprogname.c
|
||||
+++ b/gettext-tools/libgettextpo/getprogname.c
|
||||
@@ -245,6 +245,8 @@ getprogname (void)
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
||||
diff --git a/libtextstyle/lib/getprogname.c b/libtextstyle/lib/getprogname.c
|
||||
index 5e6f764..e800b89 100644
|
||||
--- a/libtextstyle/lib/getprogname.c
|
||||
+++ b/libtextstyle/lib/getprogname.c
|
||||
@@ -245,6 +245,8 @@ getprogname (void)
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
+# elif defined(__serenity__)
|
||||
+ return NULL;
|
||||
# else
|
||||
# error "getprogname module not ported to this OS"
|
||||
# endif
|
||||
--
|
||||
2.36.1
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
From 83aa314598238bfcbd9d55aa96a3fbe937c45a81 Mon Sep 17 00:00:00 2001
|
||||
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
|
||||
Date: Mon, 16 May 2022 15:45:32 +0430
|
||||
Subject: [PATCH 3/3] Stub out some wctype functions
|
||||
|
||||
---
|
||||
gettext-tools/gnulib-lib/fnmatch.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/gettext-tools/gnulib-lib/fnmatch.c b/gettext-tools/gnulib-lib/fnmatch.c
|
||||
index 3937ce3..84aa6e6 100644
|
||||
--- a/gettext-tools/gnulib-lib/fnmatch.c
|
||||
+++ b/gettext-tools/gnulib-lib/fnmatch.c
|
||||
@@ -106,6 +106,18 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
|
||||
# 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
|
||||
--
|
||||
2.36.1
|
||||
|
17
Ports/gettext/patches/ReadMe.md
Normal file
17
Ports/gettext/patches/ReadMe.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Patches for gettext on SerenityOS
|
||||
|
||||
## `0001-Teach-config.sub-about-serenity.patch`
|
||||
|
||||
Teach config.sub about serenity
|
||||
|
||||
|
||||
## `0002-Stub-out-the-getprogname-implementation.patch`
|
||||
|
||||
Stub out the getprogname() implementation
|
||||
|
||||
|
||||
## `0003-Stub-out-some-wctype-functions.patch`
|
||||
|
||||
Stub out some wctype functions
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
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
|
|
@ -1,22 +0,0 @@
|
|||
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 a new issue