Skip to content

Commit f15ab32

Browse files
committed
Update libmagic.patch
Some commits missed to update the patch file, so we're catching up on this. To generally make this easier, we back-port generate_patch.sh from PHP-7.4, where we now also generate magic.h from magic.h.in.
1 parent 53140e5 commit f15ab32

File tree

2 files changed

+110
-66
lines changed

2 files changed

+110
-66
lines changed

ext/fileinfo/generate_patch.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
VERSION=5.33
2+
if [[ ! -d libmagic.orig ]]; then
3+
mkdir libmagic.orig
4+
wget -O - ftp://ftp.astron.com/pub/file/file-$VERSION.tar.gz \
5+
| tar -xz --strip-components=2 -C libmagic.orig file-$VERSION/src
6+
fi
7+
sed -e "s/X\.YY/${VERSION//.}/g" libmagic.orig/magic.h.in > libmagic.orig/magic.h
8+
diff -u libmagic.orig libmagic | grep -v '^Only in' > libmagic.patch

0 commit comments

Comments
 (0)