patchupdate.py: Change output format of 'wine --patches' to match the wine ANNOUNCE file.

This commit is contained in:
Sebastian Lackner 2014-11-15 08:31:56 +01:00
parent 972842c50e
commit dc05c7f163
5 changed files with 301 additions and 287 deletions

View File

@ -1,32 +1,52 @@
#!/bin/sh
PATCH_DATA=$(cat);
PATCH_LINES=$(echo "${PATCH_DATA}" | wc -l);
PATCH_LINES=$((${PATCH_LINES}+20));
PATCH_LINES=$((${PATCH_LINES}+22));
cat <<EOF
From: "FDS-Team" <webmaster@fds-team.de>
From: FDS-Team <webmaster@fds-team.de>
Subject: Autogenerated patch list.
---
include/wine/library.h | 1 +
libs/wine/config.c | 16 ++++++++++++++++
libs/wine/wine.def | 1 +
libs/wine/wine.map | 1 +
4 files changed, 19 insertions(+)
diff --git a/include/wine/library.h b/include/wine/library.h
index 242bb69..fae73fe 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -43,6 +43,7 @@ extern const char *wine_get_data_dir(void);
extern const char *wine_get_server_dir(void);
extern const char *wine_get_user_name(void);
extern const char *wine_get_version(void);
+extern const void *wine_get_patches(void);
extern const char *wine_get_build_id(void);
extern void wine_init_argv0_path( const char *argv0 );
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
diff --git a/libs/wine/config.c b/libs/wine/config.c
index a273502..5fa0cd5 100644
index a273502..d6b0067 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -478,6 +478,${PATCH_LINES} @@ const char *wine_get_version(void)
return PACKAGE_VERSION;
}
+struct wine_patch {
+ const char *name;
+static const struct
+{
+ const char *author;
+ const char *title;
+} wine_patch_data[] = {
+ const char *subject;
+}
+wine_patch_data[] =
+{
${PATCH_DATA}
+ { NULL, NULL, NULL }
+ { NULL, NULL }
+};
+
+/* return the applied non-standard patches */
+const void * wine_get_patches(void)
+const void *wine_get_patches(void)
+{
+ return &wine_patch_data[0];
+}
@ -58,16 +78,4 @@ index 2159fac..7cb2918 100644
wine_init;
wine_init_argv0_path;
wine_is_dbcs_leadbyte;
diff --git a/include/wine/library.h b/include/wine/library.h
index 242bb69..aa9e585 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -43,6 +43,7 @@ extern const char *wine_get_data_dir(void);
extern const char *wine_get_server_dir(void);
extern const char *wine_get_user_name(void);
extern const char *wine_get_version(void);
+extern const void *wine_get_patches(void);
extern const char *wine_get_build_id(void);
extern void wine_init_argv0_path( const char *argv0 );
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
EOF

View File

@ -500,8 +500,8 @@ def generate_makefile(all_patches):
if len(patch.patches):
fp.write("\t@( \\\n")
for p in _unique(patch.patches, key=lambda p: (p.patch_author, p.patch_subject)):
fp.write("\t\techo '+ { \"%s\", \"%s\", \"%s\" },'; \\\n" % \
(patch.name, _escape(p.patch_author), _escape(p.patch_subject)))
fp.write("\t\techo '+ { \"%s\", \"%s\" },'; \\\n" % \
(_escape(p.patch_author), _escape(p.patch_subject)))
fp.write("\t) > %s.ok\n" % patch.name)
else:
fp.write("\ttouch %s.ok\n" % patch.name)

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,19 @@
From d88eb32e40bff9b8279f57b13a5f2cc09a9273ea Mon Sep 17 00:00:00 2001
From 378c383c738f097fd6fa81badca0cde5c6858970 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 29 May 2014 23:43:45 +0200
Subject: loader: Add commandline option --patches to show the patch list.
---
dlls/ntdll/misc.c | 8 ++++++++
dlls/ntdll/ntdll.spec | 1 +
loader/main.c | 19 ++++++++++++++++++-
3 files changed, 27 insertions(+), 1 deletion(-)
dlls/ntdll/misc.c | 8 ++++++++
dlls/ntdll/ntdll.spec | 1 +
loader/main.c | 32 +++++++++++++++++++++++++++++++-
3 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index 8bd4eb7..4b4c318 100644
index ad1b43b..1f985e7 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
@@ -55,6 +55,14 @@ const char * CDECL NTDLL_wine_get_version(void)
}
/*********************************************************************
@ -29,10 +29,10 @@ index 8bd4eb7..4b4c318 100644
*/
const char * CDECL NTDLL_wine_get_build_id(void)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 5bac269..ab50882 100644
index 7e95969..f9483aa 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1419,6 +1419,7 @@
@@ -1421,6 +1421,7 @@
# Version
@ cdecl wine_get_version() NTDLL_wine_get_version
@ -41,23 +41,10 @@ index 5bac269..ab50882 100644
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
diff --git a/loader/main.c b/loader/main.c
index ac67290..71e5055 100644
index ac67290..db9a176 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -79,6 +79,12 @@ static inline void reserve_area( void *addr, size_t size )
#endif /* __APPLE__ */
+struct wine_patch {
+ const char *name;
+ const char *author;
+ const char *title;
+};
+
/***********************************************************************
* check_command_line
*
@@ -89,7 +95,8 @@ static void check_command_line( int argc, char *argv[] )
@@ -89,7 +89,8 @@ static void check_command_line( int argc, char *argv[] )
static const char usage[] =
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
" wine --help Display this help and exit\n"
@ -67,23 +54,42 @@ index ac67290..71e5055 100644
if (argc <= 1)
{
@@ -106,6 +113,16 @@ static void check_command_line( int argc, char *argv[] )
@@ -106,6 +107,35 @@ static void check_command_line( int argc, char *argv[] )
printf( "%s\n", wine_get_build_id() );
exit(0);
}
+ if (!strcmp( argv[1], "--patches" ))
+ {
+ const struct wine_patch *wine_patch_data = wine_get_patches();
+ for(; wine_patch_data->name != NULL; wine_patch_data++)
+ const struct
+ {
+ printf( "%s :: %s :: %s\n", wine_patch_data->name, wine_patch_data->author,
+ wine_patch_data->title );
+ const char *author;
+ const char *subject;
+ }
+ *next, *cur = wine_get_patches();
+
+ while (cur->author)
+ {
+ next = cur + 1;
+ while (next->author)
+ {
+ if (strcmp(cur->author, next->author)) break;
+ next++;
+ }
+
+ printf("%s (%d):\n", cur->author, next - cur);
+ while (cur < next)
+ {
+ printf(" %s\n", cur->subject);
+ cur++;
+ }
+ printf("\n");
+ }
+
+ exit(0);
+ }
}
--
1.7.9.5
2.1.3

View File

@ -250,7 +250,7 @@ index 76bf324..36738f2 100644
#include <pthread.h>
#include "wine/library.h"
@@ -96,7 +102,8 @@ static void check_command_line( int argc, char *argv[] )
@@ -90,7 +96,8 @@ static void check_command_line( int argc, char *argv[] )
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
" wine --help Display this help and exit\n"
" wine --version Output version information and exit\n"
@ -260,8 +260,8 @@ index 76bf324..36738f2 100644
if (argc <= 1)
{
@@ -123,6 +130,47 @@ static void check_command_line( int argc, char *argv[] )
}
@@ -135,6 +142,47 @@ static void check_command_line( int argc, char *argv[] )
exit(0);
}
+ if (!strcmp( argv[1], "--check-libs" ))