- Timestamp:
- 2015-05-09T19:50:30Z (10 years ago)
- Children:
- ec8b369
- Parents:
- 356e2dd (diff), 5014380 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r356e2dd rb8c336b 56 56 GLIB_MIN_VERSION=2.16 57 57 58 echo BitlBee configure59 60 58 # Cygwin and Darwin don't support PIC/PIE 61 59 case "$arch" in … … 65 63 pie=0;; 66 64 esac 65 66 get_version() { 67 REAL_BITLBEE_VERSION=$(grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/') 68 69 if [ -n "$BITLBEE_VERSION" ]; then 70 # environment variable already set to something to spoof it 71 # don't replace it with the git stuff 72 return 73 fi 74 75 BITLBEE_VERSION=$REAL_BITLBEE_VERSION 76 77 if [ -d $srcdir/.git ] && type git > /dev/null 2> /dev/null; then 78 timestamp=$(cd $srcdir; git show -s --format=%ci HEAD | sed 's/ .*$//; s/-//g') 79 branch=$(cd $srcdir; git rev-parse --abbrev-ref HEAD) 80 81 search="(.+)-([0-9]+)-(g[0-9a-f]+)" 82 replace="\1+$timestamp+$branch+\2-\3-git" 83 84 BITLBEE_VERSION=$(cd $srcdir; git describe --long --tags | sed -r "s/$search/$replace/") 85 86 unset timestamp branch search replace 87 fi 88 } 89 90 if [ "$1" = "--dump-version" ]; then 91 srcdir=$(cd $(dirname $0);pwd) 92 get_version 93 echo $BITLBEE_VERSION 94 exit 95 fi 96 97 echo BitlBee configure 67 98 68 99 while [ -n "$1" ]; do … … 672 703 fi 673 704 674 REAL_BITLBEE_VERSION=`grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/'` 675 echo 676 if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then 677 nick=`bzr nick` 678 if [ -n "$nick" -a "$nick" != "bitlbee" ]; then 679 nick="-$nick" 680 else 681 nick="" 682 fi 683 rev=`bzr revno` 684 echo 'Using bzr revision #'$rev' as version number' 685 BITLBEE_VERSION=$REAL_BITLBEE_VERSION-bzr$nick-$rev 686 fi 687 688 if [ -z "$BITLBEE_VERSION" -a -d .git ] && type git > /dev/null 2> /dev/null; then 689 rev=`git describe --long --tags`-`git rev-parse --abbrev-ref HEAD` 690 echo 'Using '$rev' as git version number' 691 BITLBEE_VERSION=$rev-git 692 fi 693 694 if [ -n "$BITLBEE_VERSION" ]; then 705 get_version 706 707 if [ "$BITLBEE_VERSION" != "$REAL_BITLBEE_VERSION" ]; then 695 708 echo 'Spoofing version number: '$BITLBEE_VERSION 696 709 echo '#undef BITLBEE_VERSION' >> config.h 697 710 echo '#define BITLBEE_VERSION "'$BITLBEE_VERSION'"' >> config.h 698 711 echo 699 else700 # for pkg-config701 BITLBEE_VERSION=$REAL_BITLBEE_VERSION702 712 fi 703 713
Note: See TracChangeset
for help on using the changeset viewer.