Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 33 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/bin/sh
## 30_nonettle.dpatch by Magnus Holmgren <holmgren@debian.org>
##
## DP: Link dynamically with libnettle-dev instead of the bundled version

set -e
FILES=`find src -name nettle -prune -o -name Makefile.in -print`

dpatch_patch() {
    if [ ! -f debian/patched/30_nonettle_orig.tar.gz ]; then
        tar -czf debian/patched/30_nonettle_orig.tar.gz $FILES
        sed -ri -e '/^LDADD/,+1s%(\.\.?/)*nettle/libnettle\.a|-lnettle%-lnettle -lhogweed%' \
            -e 's%\s*(-[IL]\s*)?(\.\.?/)*\bnettle(/libnettle\.a)?\b%%g' $FILES
        mv src/nettle src/nettle-unused
    fi
}

dpatch_unpatch() {
    if [ -f debian/patched/30_nonettle_orig.tar.gz ]; then
        mv src/nettle-unused src/nettle
        tar -xzf debian/patched/30_nonettle_orig.tar.gz
    fi
}

DPATCH_LIB_NO_DEFAULT=1

. /usr/share/dpatch/dpatch.lib.sh