mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
patchinstall.py: Remove the autogenerated patch list.
This commit is contained in:
parent
7925f8829e
commit
66561ecf5d
@ -17,7 +17,7 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
import email.header, getopt, os, subprocess, sys, tempfile
|
||||
import email.header, getopt, os, subprocess, sys
|
||||
|
||||
stagingdir = os.path.dirname(os.path.realpath(__file__)) + '/../'
|
||||
patchdir = stagingdir + 'patches'
|
||||
@ -52,10 +52,9 @@ Options:
|
||||
git-am use `git am`
|
||||
git-am-C1 use `git am -C1`
|
||||
git-apply use `git apply`
|
||||
--no-patchlist do not generate a patch list (needed for `wine --patches`)
|
||||
--ignore-missing automatically add dependencies, but do not fail
|
||||
if they are missing or disabled
|
||||
-r, --rebase-mode alias for --backend=git-am-C1 --no-autoconf --no-patchlist
|
||||
-r, --rebase-mode alias for --backend=git-am-C1 --no-autoconf
|
||||
-d, --destdir=<path> install to <path> (defaults to current working directory)
|
||||
--upstream-commit print the Wine commit hash and exit
|
||||
'''
|
||||
@ -156,48 +155,11 @@ def add_patchset(patchlist, name):
|
||||
patchlist[name] = deps
|
||||
for dep in deps: add_patchset(patchlist, dep)
|
||||
|
||||
def generate_patchlist(patchlist):
|
||||
with tempfile.NamedTemporaryFile(mode='w') as f:
|
||||
f.write('''From: Wine Staging Team <webmaster@fds-team.de>
|
||||
Subject: Autogenerated patch list.
|
||||
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 5262c76..0a3182f 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -478,10 +478,''' + str(21 + patch_data.count('\n')) + ''' @@ const char *wine_get_version(void)
|
||||
return PACKAGE_VERSION;
|
||||
}
|
||||
|
||||
+static const struct
|
||||
+{
|
||||
+ const char *author;
|
||||
+ const char *subject;
|
||||
+ int revision;
|
||||
+}
|
||||
+wine_patch_data[] =
|
||||
+{
|
||||
''' + patch_data + '''+ {NULL, NULL, 0}
|
||||
+};
|
||||
+
|
||||
/* return the applied non-standard patches */
|
||||
const void *wine_get_patches(void)
|
||||
{
|
||||
- return NULL;
|
||||
+ return &wine_patch_data[0];
|
||||
}
|
||||
|
||||
/* return the build id string */
|
||||
''')
|
||||
f.flush()
|
||||
apply_patch(f.name)
|
||||
|
||||
def main():
|
||||
global backend, force_autoconf, winedir
|
||||
patchlist = {}
|
||||
excluded = []
|
||||
no_autoconf = False
|
||||
no_patchlist = False
|
||||
ignore_missing = False
|
||||
|
||||
try:
|
||||
@ -209,7 +171,6 @@ def main():
|
||||
'ignore-missing',
|
||||
'help',
|
||||
'no-autoconf',
|
||||
'no-patchlist',
|
||||
'upstream-commit',
|
||||
'version'])
|
||||
except getopt.GetoptError as err:
|
||||
@ -228,7 +189,6 @@ def main():
|
||||
sys.exit(0)
|
||||
elif o == '-r' or o == '--rebase-mode':
|
||||
no_autoconf = True
|
||||
no_patchlist = True
|
||||
backend = "git-am-C1"
|
||||
elif o == '-W' or o == '--exclude':
|
||||
excluded.append(a)
|
||||
@ -247,8 +207,6 @@ def main():
|
||||
no_autoconf = True
|
||||
elif o == '--force-autoconf':
|
||||
force_autoconf = True
|
||||
elif o == '--no-patchlist':
|
||||
no_patchlist = True
|
||||
elif o == '--ignore-missing':
|
||||
ignore_missing = True
|
||||
elif o == '--upstream-commit':
|
||||
@ -285,9 +243,6 @@ def main():
|
||||
if not apply_set(patchlist, p):
|
||||
sys.exit(1)
|
||||
|
||||
if 'Staging' in patchlist and not no_patchlist:
|
||||
generate_patchlist(patchlist)
|
||||
|
||||
if not no_autoconf and not force_autoconf:
|
||||
run(['autoreconf','-f'],cwd=winedir)
|
||||
run(['./tools/make_requests'],cwd=winedir)
|
||||
|
Loading…
Reference in New Issue
Block a user