aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/python3-patch-ng/README30
-rw-r--r--python/python3-patch-ng/python3-patch-ng.SlackBuild81
-rw-r--r--python/python3-patch-ng/python3-patch-ng.info10
-rw-r--r--python/python3-patch-ng/slack-desc19
4 files changed, 140 insertions, 0 deletions
diff --git a/python/python3-patch-ng/README b/python/python3-patch-ng/README
new file mode 100644
index 000000000000..5f9edb2ff67b
--- /dev/null
+++ b/python/python3-patch-ng/README
@@ -0,0 +1,30 @@
+Patch NG (New Generation)
+
+Library to parse and apply unified diffs.
+This project is a fork from the original python-patch project.
+
+Features
+
+Automatic correction of Linefeeds according to patched file
+Diffs broken by stripping trailing whitespace
+a/ and b/ prefixes
+Single file, which is a command line tool and a library
+No dependencies outside Python stdlib
+Patch format detection (SVN, HG, GIT)
+Nice diffstat histogram
+Linux / Windows / OS X
+Test coverage
+
+Things that don't work out of the box:
+
+File renaming, creation and removal
+Directory tree operations
+Version control specific properties
+Non-unified diff formats
+
+Usage
+
+Download patch_ng.py and run it with Python. It is a self-contained
+module without external dependencies.
+
+patch_ng.py diff.patch
diff --git a/python/python3-patch-ng/python3-patch-ng.SlackBuild b/python/python3-patch-ng/python3-patch-ng.SlackBuild
new file mode 100644
index 000000000000..86ed6820ec2c
--- /dev/null
+++ b/python/python3-patch-ng/python3-patch-ng.SlackBuild
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+# Slackware build script for python3-patch-ng
+
+# Copyright 2023, Lockywolf
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-patch-ng
+TARNAM=python-patch-ng
+VERSION=${VERSION:-1.17.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $TARNAM-$VERSION
+tar xvf $CWD/$TARNAM-$VERSION.tar.gz
+cd $TARNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} + -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} +
+
+python3 setup.py install --root=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ LICENSE README.md doc \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/python/python3-patch-ng/python3-patch-ng.info b/python/python3-patch-ng/python3-patch-ng.info
new file mode 100644
index 000000000000..dfb1dfe81f18
--- /dev/null
+++ b/python/python3-patch-ng/python3-patch-ng.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-patch-ng"
+VERSION="1.17.4"
+HOMEPAGE="https://github.com/conan-io/"
+DOWNLOAD="https://github.com/conan-io/python-patch-ng/archive/1.17.4/python-patch-ng-1.17.4.tar.gz"
+MD5SUM="b8c0dc0d722a3cecdc8f246c45133b5c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Lockywolf"
+EMAIL="for_sbo.python3-patch-ng_2023-09-23@lockywolf.net"
diff --git a/python/python3-patch-ng/slack-desc b/python/python3-patch-ng/slack-desc
new file mode 100644
index 000000000000..dcd33e28901f
--- /dev/null
+++ b/python/python3-patch-ng/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-patch-ng: python3-patch-ng (Patch NG - New Generation)
+python3-patch-ng:
+python3-patch-ng: Library to parse and apply unified diffs.
+python3-patch-ng: This project is a fork from the original python-patch project.
+python3-patch-ng:
+python3-patch-ng:
+python3-patch-ng:
+python3-patch-ng:
+python3-patch-ng:
+python3-patch-ng:
+python3-patch-ng: