patchinstall.sh: Only apply patchlist when 'Staging' patchset is enabled. Ensure Staging/004-*.patch also compiles without patchlist.

This commit is contained in:
Sebastian Lackner
2015-01-26 03:46:33 +01:00
parent e65c2c7954
commit 0c2b776e83
3 changed files with 120 additions and 107 deletions

View File

@@ -53,6 +53,12 @@ abort()
exit 1
}}
# Show a warning
warning()
{{
echo "WARNING: $1" >&2
}}
{patch_helpers}
# Default settings
@@ -269,9 +275,14 @@ patch_apply ()
# If autoupdate is enabled then create a tempfile to keep track of all patches
if test "$enable_patchlist" -eq 1; then
patchlist=$(mktemp)
if test ! -f "$patchlist"; then
abort "Unable to create temporary file for patchlist."
if test "$enable_Staging" -eq 1; then
patchlist=$(mktemp)
if test ! -f "$patchlist"; then
abort "Unable to create temporary file for patchlist."
fi
else
warning "Skipping generation of patchlist because 'Staging' patchset is disabled."
enable_patchlist=0
fi
fi
@@ -285,27 +296,16 @@ if test "$enable_patchlist" -eq 1; then
patch_data=$(cat "$patchlist" | sort)
patch_lines=$(echo "$patch_data" | wc -l)
if test ! -z "$patch_data"; then
patch_lines=$((${{patch_lines}}+23))
patch_lines=$((${{patch_lines}}+21))
cat > "$patchlist" <<EOF
From: Wine Staging Team <webmaster@fds-team.de>
Subject: Autogenerated patch list.
diff --git a/include/wine/library.h b/include/wine/library.h
--- 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..0a3182f 100644
index 5262c76..0a3182f 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -478,6 +478,${{patch_lines}} @@ const char *wine_get_version(void)
@@ -478,10 +478,${{patch_lines}} @@ const char *wine_get_version(void)
return PACKAGE_VERSION;
}}
@@ -321,39 +321,14 @@ ${{patch_data}}
+ {{ NULL, NULL, 0 }}
+}};
+
+/* return the applied non-standard patches */
+const void *wine_get_patches(void)
+{{
+ return &wine_patch_data[0];
+}}
+
/* return the build id string */
const char *wine_get_build_id(void)
/* return the applied non-standard patches */
const void *wine_get_patches(void)
{{
diff --git a/libs/wine/wine.def b/libs/wine/wine.def
index ed315bd..5b42029 100644
--- a/libs/wine/wine.def
+++ b/libs/wine/wine.def
@@ -83,6 +83,7 @@ EXPORTS
wine_get_sortkey
wine_get_user_name
wine_get_version
+ wine_get_patches
wine_init
wine_init_argv0_path
wine_is_dbcs_leadbyte
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 2159fac..7cb2918 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -90,6 +90,7 @@ WINE_1.0
wine_get_ss;
wine_get_user_name;
wine_get_version;
+ wine_get_patches;
wine_init;
wine_init_argv0_path;
wine_is_dbcs_leadbyte;
- return NULL;
+ return &wine_patch_data[0];
}}
/* return the build id string */
EOF
patch_apply_file "$patchlist"
fi