Ticket #1085: pkgconfig-version-fix-dx.patch

File pkgconfig-version-fix-dx.patch, 1.3 KB (added by dx, at 2014-02-28T00:42:32Z)

My version of the version fix patch

  • configure

    diff --git a/configure b/configure
    index b190b20..3a1cb68 100755
    a b if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; th 
    534534        echo 'Install xmlto if you want online help to work.'
    535535fi
    536536
     537REAL_BITLBEE_VERSION=`grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/'`
    537538echo
    538539if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then
    539540        nick=`bzr nick`
    if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; th 
    544545        fi
    545546        rev=`bzr revno`
    546547        echo 'Using bzr revision #'$rev' as version number'
    547         BITLBEE_VERSION=\"bzr$nick-$rev\"
     548        BITLBEE_VERSION=$REAL_BITLBEE_VERSION-bzr$nick-$rev
    548549fi
    549550
    550551if [ -n "$BITLBEE_VERSION" ]; then
    551552        echo 'Spoofing version number: '$BITLBEE_VERSION
    552553        echo '#undef BITLBEE_VERSION' >> config.h
    553         echo '#define BITLBEE_VERSION '$BITLBEE_VERSION >> config.h
     554        echo '#define BITLBEE_VERSION "'$BITLBEE_VERSION'"' >> config.h
    554555        echo
     556else
     557        # for pkg-config
     558        BITLBEE_VERSION=$REAL_BITLBEE_VERSION
    555559fi
    556560
     561
    557562if ! make helloworld > /dev/null 2>&1; then
    558563        echo "WARNING: Your version of make (BSD make?) does not support BitlBee's makefiles."
    559564        echo "BitlBee needs GNU make to build properly. On most systems GNU make is available"