mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Move generate-patchlist.sh script into folder debian/tools, integrate patch-list-template.diff into the shell script
This commit is contained in:
parent
9fd0a6eb9d
commit
2f7523bffe
27
patch-list-template.diff → debian/tools/generate-patchlist.sh
vendored
Normal file → Executable file
27
patch-list-template.diff → debian/tools/generate-patchlist.sh
vendored
Normal file → Executable file
@ -1,5 +1,29 @@
|
||||
#!/bin/sh
|
||||
PATCH_DATA="";
|
||||
|
||||
for FILE in patches/*/*.def; do
|
||||
UUID=$(echo "${FILE}" | sed -e 's|^.*/||g' -e 's|\.def$||g');
|
||||
REVISION=$(cat "${FILE}" | sed -n 's|Revision: \(.*\)|\1|p');
|
||||
AUTHOR=$(cat "${FILE}" | sed -n 's|Author: \(.*\)|\1|p');
|
||||
TITLE=$(cat "${FILE}" | sed -n 's|Title: \(.*\)|\1|p');
|
||||
if [ "${AUTHOR}" = "" ] && [ "${TITLE}" = "" ]; then
|
||||
continue;
|
||||
fi
|
||||
if [ "${PATCH_DATA}" != "" ]; then
|
||||
PATCH_DATA="${PATCH_DATA}
|
||||
";
|
||||
fi
|
||||
PATCH_DATA="${PATCH_DATA}+ { \"${UUID}:${REVISION}\", \"${AUTHOR}\", \"${TITLE}\" },";
|
||||
done
|
||||
|
||||
PATCH_LINES=$(echo "${PATCH_DATA}" | grep -c '\n');
|
||||
PATCH_LINES=$((${PATCH_LINES}+20));
|
||||
PATCH_DATA=$(echo "${PATCH_DATA}" | sed ':a;N;$!ba;s/\n/\\n/g');
|
||||
|
||||
cat <<EOF | sed -e "s|##PATCH_LINES##|${PATCH_LINES}|" \
|
||||
-e "s|##PATCH_DATA##|${PATCH_DATA}|"
|
||||
From: "FDS-Team" <webmaster@fds-team.de>
|
||||
Subject: Autogenerated patch list.
|
||||
Subject: Autogenerated patch list.
|
||||
|
||||
---
|
||||
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
||||
@ -139,3 +163,4 @@ index 242bb69..aa9e585 100644
|
||||
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
|
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATCH_DATA="";
|
||||
for FILE in patches/*/*.def; do
|
||||
UUID=$(echo "${FILE}" | sed -e 's|^.*/||g' -e 's|\.def$||g');
|
||||
REVISION=$(cat "${FILE}" | sed -n 's|Revision: \(.*\)|\1|p');
|
||||
AUTHOR=$(cat "${FILE}" | sed -n 's|Author: \(.*\)|\1|p');
|
||||
TITLE=$(cat "${FILE}" | sed -n 's|Title: \(.*\)|\1|p');
|
||||
if [ "${AUTHOR}" = "" ] && [ "${TITLE}" = "" ]; then
|
||||
continue;
|
||||
fi
|
||||
if [ "${PATCH_DATA}" != "" ]; then
|
||||
PATCH_DATA="${PATCH_DATA}
|
||||
";
|
||||
fi
|
||||
PATCH_DATA="${PATCH_DATA}+ { \"${UUID}:${REVISION}\", \"${AUTHOR}\", \"${TITLE}\" },";
|
||||
done
|
||||
PATCH_LINES=$(echo "${PATCH_DATA}" | grep -c '\n');
|
||||
PATCH_LINES=$((${PATCH_LINES}+20));
|
||||
PATCH_DATA=$(echo "${PATCH_DATA}" | sed ':a;N;$!ba;s/\n/\\n/g');
|
||||
cat patch-list-template.diff | sed \
|
||||
-e "s|##PATCH_LINES##|${PATCH_LINES}|" \
|
||||
-e "s|##PATCH_DATA##|${PATCH_DATA}|"
|
||||
#
|
@ -4,7 +4,7 @@ PATCH:=patch -N -p0 --strip=1
|
||||
|
||||
install:
|
||||
# Update the list of patches
|
||||
cd $(CURDIR)/..; ./generate-patchlist.sh > $(CURDIR)/patch-list.patch;
|
||||
cd $(CURDIR)/..; ./debian/tools/generate-patchlist.sh > $(CURDIR)/patch-list.patch;
|
||||
|
||||
# Apply our patches to Wine
|
||||
cd $(DESTDIR); \
|
||||
|
@ -1,5 +1,5 @@
|
||||
From: "FDS-Team" <webmaster@fds-team.de>
|
||||
Subject: Autogenerated patch list.
|
||||
Subject: Autogenerated patch list.
|
||||
|
||||
---
|
||||
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
||||
|
@ -2,11 +2,11 @@
|
||||
# Installation: ln -s ../../precommit-hook.sh .git/hooks/pre-commit
|
||||
|
||||
git diff --cached --name-status | while read status file; do
|
||||
if [[ "$file" =~ ^patches/ ]] || [[ "$file" =~ ^patch-list-template.diff$ ]]; then
|
||||
if [[ "$file" =~ ^patches/ ]] || [[ "$file" =~ ^debian/tools/generate-patchlist.sh$ ]]; then
|
||||
echo ""
|
||||
echo "*** GENERATING patch-list.patch ***"
|
||||
echo ""
|
||||
./generate-patchlist.sh > patches/patch-list.patch || exit 1
|
||||
debian/tools/generate-patchlist.sh > patches/patch-list.patch || exit 1
|
||||
git add patches/patch-list.patch || exit 1
|
||||
break;
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user