diff options
author | Erich Eckner <git@eckner.net> | 2016-06-06 20:17:52 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-06-06 20:17:52 +0200 |
commit | 98dd3a35c1393565905e04090a3c09333990a09b (patch) | |
tree | 203b2c37adf030542be87ff0a82d68ba8c0d0c09 | |
download | crux-patches-98dd3a35c1393565905e04090a3c09333990a09b.tar.xz |
patch, damit ports patcht
-rw-r--r-- | core/ports/post_update_patches.Pkgfile.patch | 15 | ||||
-rw-r--r-- | core/ports/post_update_patches.patch.new | 69 |
2 files changed, 84 insertions, 0 deletions
diff --git a/core/ports/post_update_patches.Pkgfile.patch b/core/ports/post_update_patches.Pkgfile.patch new file mode 100644 index 0000000..618237f --- /dev/null +++ b/core/ports/post_update_patches.Pkgfile.patch @@ -0,0 +1,15 @@ +--- Pkgfile 2015-11-25 17:13:38.556662829 +0100 ++++ Pkgfile 2016-04-27 22:36:58.230001880 +0200 +@@ -8,10 +8,12 @@ + + source=(http://crux.nu/files/tools/ports/$name-$version.tar.gz \ + core.rsync opt.rsync xorg.rsync compat-32.rsync.inactive \ ++ post_update_patches.patch \ + contrib.rsync.inactive) + + build () { + cd $name-$version ++ patch -p0 -i $SRC/post_update_patches.patch + make + make DESTDIR=$PKG MANDIR=/usr/share/man install + diff --git a/core/ports/post_update_patches.patch.new b/core/ports/post_update_patches.patch.new new file mode 100644 index 0000000..a69b192 --- /dev/null +++ b/core/ports/post_update_patches.patch.new @@ -0,0 +1,69 @@ +--- ports.in 2004-03-07 21:55:24.000000000 +0100 ++++ ports.in 2016-04-27 22:41:06.030194539 +0200 +@@ -21,7 +21,50 @@ + # + + VERSION="#VERSION#" + PORTS_DIR="/usr/ports" ++PATCHES_DIR="/usr/patches" ++ ++post_update_hooks() { ++ ( ++ . $file ++ case $(basename $driver) in ++ httpup) ++ CURRENT_DIR=${ROOT_DIR#$PORTS_DIR} ++ ;; ++ rsync) ++ CURRENT_DIR=${destination#$PORTS_DIR} ++ ;; ++ git) ++ CURRENT_DIR=/$NAME ++ ;; ++ *) ++ echo "$COMMAND: unknown driver '$(basename $driver)'" ++ exit 1 ++ esac ++ [ -d $PATCHES_DIR$CURRENT_DIR ] || exit 0 ++ for PATCH_PORT in $PATCHES_DIR$CURRENT_DIR/* ++ do ++ [ -d $PATCH_PORT ] || continue ++ [ -d $PORTS_DIR${PATCH_PORT#$PATCHES_DIR} ] || continue ++ cd $PORTS_DIR${PATCH_PORT#$PATCHES_DIR} ++ for DATEI in $(find $PATCH_PORT \( -name ".*" -prune -false \) -o \( -type f -not -name ".*" \) ) ++ do ++ case $DATEI in ++ *.patch) ++ patch -p0 -i $DATEI ++ ;; ++ *.new) ++ cp $DATEI $(basename $DATEI .new) ++ md5sum $(basename $DATEI .new) >> .md5sum ++ ;; ++ *) ++ echo "$COMMAND: patch file '$DATEI' has unknown extension" ++ exit 1 ++ esac ++ done ++ done ++ ) || exit $? ++} + + check_ports_dir() { + if [ ! -d "$PORTS_DIR" ]; then +@@ -53,6 +96,7 @@ + file=/etc/ports/$collection.$suffix + if [ -f $file ]; then + $driver $file ++ post_update_hooks $driver $file + fi + fi + done +@@ -67,6 +111,7 @@ + suffix=`basename $driver` + for file in /etc/ports/*.$suffix; do + $driver $file ++ post_update_hooks $driver $file + done + fi + done |