diff options
Diffstat (limited to 'src/devtools')
-rw-r--r-- | src/devtools/.gitignore | 4 | ||||
-rw-r--r-- | src/devtools/Makefile | 12 | ||||
-rw-r--r-- | src/devtools/checkpkg.patch | 45 | ||||
-rw-r--r-- | src/devtools/find-libdeps.patch | 47 | ||||
-rw-r--r-- | src/devtools/finddeps.patch | 35 | ||||
-rw-r--r-- | src/devtools/lddd.patch | 29 |
6 files changed, 172 insertions, 0 deletions
diff --git a/src/devtools/.gitignore b/src/devtools/.gitignore new file mode 100644 index 0000000..d669bbd --- /dev/null +++ b/src/devtools/.gitignore @@ -0,0 +1,4 @@ +* +!Makefile +!.gitignore +!*.patch diff --git a/src/devtools/Makefile b/src/devtools/Makefile new file mode 100644 index 0000000..72907f0 --- /dev/null +++ b/src/devtools/Makefile @@ -0,0 +1,12 @@ +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/automake.head.mk + +libretools-bins += checkpkg find-libdeps finddeps lddd +devtools-files = $(addsuffix .in,$(libretools-bins)) +am_sys_files += $(bindir)/find-libprovides + +$(DESTDIR)$(bindir)/find-libprovides: + install -d $(@D) + ln -sf find-libdeps $@ + +include $(topsrcdir)/automake.tail.mk diff --git a/src/devtools/checkpkg.patch b/src/devtools/checkpkg.patch new file mode 100644 index 0000000..5cfb794 --- /dev/null +++ b/src/devtools/checkpkg.patch @@ -0,0 +1,45 @@ +--- checkpkg.in 2014-03-21 13:59:31.849658036 -0400 ++++ checkpkg.ugly 2014-03-21 14:20:52.340291982 -0400 +@@ -1,8 +1,30 @@ + #!/bin/bash ++# License: Unspecified + + shopt -s extglob + +-m4_include(lib/common.sh) ++. "$(librelib messages)" ++ ++usage() { ++ print 'Usage: %s [-h]' "${0##*/}" ++ print 'Compare a locally built a package with the one in the repositories.' ++ echo ++ prose 'This should be run from a directory containing a ++ PKGBUILD. It searches for a locally built package ++ corresponding to the PKGBUILD, and downloads the last ++ version of that package from the pacman repositories. ++ It then compares the list of .so files provided by each ++ version of the package. It does this for each part of ++ a split package.' ++} ++ ++if [[ $1 = '-h' ]]; then ++ usage ++ exit 0 ++elif [[ $# -gt 0 ]]; then ++ usage >&2 ++ exit 1 ++fi + + # Source makepkg.conf; fail if it is not found + if [[ -r '/etc/makepkg.conf' ]]; then +@@ -17,7 +39,9 @@ + fi + + if [[ ! -f PKGBUILD ]]; then +- die 'This must be run in the directory of a built package.' ++ error 'This must be run in the directory of a built package.' ++ usage >&2 ++ exit 1 + fi + + . ./PKGBUILD diff --git a/src/devtools/find-libdeps.patch b/src/devtools/find-libdeps.patch new file mode 100644 index 0000000..1bcffc9 --- /dev/null +++ b/src/devtools/find-libdeps.patch @@ -0,0 +1,47 @@ +--- find-libdeps.in 2014-03-21 13:59:32.059649315 -0400 ++++ find-libdeps.ugly 2014-03-21 14:21:18.955744982 -0400 +@@ -1,6 +1,7 @@ + #!/bin/bash ++# License: Unspecified + +-m4_include(lib/common.sh) ++. "$(librelib messages)" + + set -e + shopt -s extglob +@@ -19,12 +20,32 @@ + *) die "Unknown mode %s" "$script_mode" ;; + esac + ++usage() { ++ print "Usage: find-lib(deps|provides) [options] <package file|extracted package dir>" ++ print "Find library dependencies or provides of a package." ++ echo ++ prose 'Prints a list of library dependencies in the format:' ++ echo ++ print ' <soname>=<soversion>-<soarch>' ++ echo ++ prose 'Where <soversion> is the shared library version, or ++ <soname> repeated if there is no version attached; and ++ <soarch> is the architecture of the library (either `32` ++ or `64`, based on the ELF Class).' ++ echo ++ print "Options:" ++ flag "--ignore-internal" "Ignore internal libraries; libraries ++ without a version attached" ++ flag "-h" "Show this message" ++} + if [[ -z $1 ]]; then +- echo "${0##*/} [options] <package file|extracted package dir>" +- echo "Options:" +- echo " --ignore-internal ignore internal libraries" ++ usage >&2 + exit 1 + fi ++if [[ $1 = '-h' ]]; then ++ usage ++ exit 0 ++fi + + if [[ -d $1 ]]; then + pushd $1 >/dev/null diff --git a/src/devtools/finddeps.patch b/src/devtools/finddeps.patch new file mode 100644 index 0000000..caf2121 --- /dev/null +++ b/src/devtools/finddeps.patch @@ -0,0 +1,35 @@ +--- finddeps.in 2014-03-21 13:59:32.249641424 -0400 ++++ finddeps.ugly 2014-03-21 14:21:09.949489174 -0400 +@@ -2,19 +2,26 @@ + # + # finddeps - find packages that depend on a given depname + # ++# License: Unspecified + +-m4_include(lib/common.sh) ++. "$(librelib messages)" + + match=$1 + ++usage() { ++ print 'Usage: %s <depname>' "${0##*/}" ++ print 'Find packages that depend on a given depname.' ++ echo ++ prose 'Run this script from the top-level directory of your ABS tree.' ++} + if [[ -z $match ]]; then +- echo 'Usage: finddeps <depname>' +- echo '' +- echo 'Find packages that depend on a given depname.' +- echo 'Run this script from the top-level directory of your ABS tree.' +- echo '' ++ usage >&2 + exit 1 + fi ++if [[ $match = '-h' ]]; then ++ usage ++ exit 0 ++fi + + find . -type d | while read d; do + if [[ -f "$d/PKGBUILD" ]]; then diff --git a/src/devtools/lddd.patch b/src/devtools/lddd.patch new file mode 100644 index 0000000..6383aa4 --- /dev/null +++ b/src/devtools/lddd.patch @@ -0,0 +1,29 @@ +--- lddd.in 2014-03-21 13:59:32.419634364 -0400 ++++ lddd.ugly 2014-03-21 14:21:31.538503947 -0400 +@@ -2,8 +2,25 @@ + # + # lddd - find broken library links on your machine + # ++# License: Unspecified + +-m4_include(lib/common.sh) ++. "$(librelib messages)" ++ ++usage() { ++ print "Usage: %s [-h]" "${0##*/}" ++ print "Find broken library links on your machine." ++ echo ++ prose 'Scans $PATH and library directories for ELF files with ++ references to missing shared libraries.' ++} ++ ++if [[ $1 = '-h' ]]; then ++ usage ++ exit 0 ++elif [[ $# -gt 0 ]]; then ++ usage >&2 ++ exit 1 ++fi + + ifs=$IFS + IFS="${IFS}:" |