aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-06-10 00:29:36 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2008-06-10 00:29:36 +0100
commitb6cd9e9fe0aa86e83fc4a43b3db2240839e2103a (patch)
treeaabd166c11bb46f150623f249d207b0497b240d6
parentde8e584d7f4fea214934af094a4df2672d7e0be8 (diff)
parent783e9b76de9a8ec16e8229d7c476b16ba8011554 (diff)
The merge from the future. 2025 is going to be awesome. :-)
-rw-r--r--.bzrignore2
-rw-r--r--bitlbee.h4
-rwxr-xr-xconfigure42
-rw-r--r--debian/changelog6
-rw-r--r--debian/control2
-rw-r--r--storage_xml.c7
6 files changed, 46 insertions, 17 deletions
diff --git a/.bzrignore b/.bzrignore
index 12dd9c10..7d0ad548 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -16,3 +16,5 @@ tests/check
*.gcov
*.gcno
*.o
+coverage
+bitlbee.info
diff --git a/bitlbee.h b/bitlbee.h
index 60694a2a..f10e66d2 100644
--- a/bitlbee.h
+++ b/bitlbee.h
@@ -94,10 +94,6 @@
#undef g_main_quit
#define g_main_quit __PLEASE_USE_B_MAIN_QUIT__
-#ifndef F_OK
-#define F_OK 0
-#endif
-
#ifndef G_GNUC_MALLOC
/* Doesn't exist in GLib <=2.4 while everything else in BitlBee should
work with it, so let's fake this one. */
diff --git a/configure b/configure
index 22989f60..88307d88 100755
--- a/configure
+++ b/configure
@@ -73,6 +73,8 @@ Option Description Default
--events=... Event handler (glib, libevent) $events
--ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto)
$ssl
+
+--target=... Cross compilation target same as host
EOF
exit;
fi
@@ -131,6 +133,13 @@ cat<<EOF>config.h
#define CPU "$cpu"
EOF
+if [ -n "$target" ]; then
+ PKG_CONFIG_PATH=/usr/$target/lib/pkgconfig
+ PATH=/usr/$target/bin:$PATH
+ CC=$target-cc
+ LD=$target-ld
+fi
+
if [ "$debug" = "1" ]; then
[ -z "$CFLAGS" ] && CFLAGS=-g
echo 'DEBUG=1' >> Makefile.settings
@@ -157,15 +166,17 @@ fi
echo "CC=$CC" >> Makefile.settings;
-if [ -n "$LD" ]; then
- echo "LD=$LD" >> Makefile.settings;
-elif type ld > /dev/null 2> /dev/null; then
- echo "LD=ld" >> Makefile.settings;
-else
- echo 'Cannot find ld, aborting.'
- exit 1;
+if [ -z "$LD" ]; then
+ if type ld > /dev/null 2> /dev/null; then
+ LD=ld
+ else
+ echo 'Cannot find ld, aborting.'
+ exit 1;
+ fi
fi
+echo "LD=$LD" >> Makefile.settings
+
if [ -z "$PKG_CONFIG" ]; then
PKG_CONFIG=pkg-config
fi
@@ -212,7 +223,14 @@ echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
detect_gnutls()
{
- if libgnutls-config --version > /dev/null 2> /dev/null; then
+ if $PKG_CONFIG --exists gnutls; then
+ cat <<EOF>>Makefile.settings
+EFLAGS+=`$PKG_CONFIG --libs gnutls`
+CFLAGS+=`$PKG_CONFIG --cflags gnutls`
+EOF
+ ssl=gnutls
+ ret=1
+ elif libgnutls-config --version > /dev/null 2> /dev/null; then
cat <<EOF>>Makefile.settings
EFLAGS+=`libgnutls-config --libs`
CFLAGS+=`libgnutls-config --cflags`
@@ -374,8 +392,8 @@ else
fi
if [ "$gcov" = "1" ]; then
- echo "CFLAGS+=-ftest-coverage -fprofile-arcs" >> Makefile.settings
- echo "EFLAGS+=-lgcov" >> Makefile.settings
+ echo "CFLAGS+=--coverage" >> Makefile.settings
+ echo "EFLAGS+=--coverage" >> Makefile.settings
fi
if [ "$plugins" = 0 ]; then
@@ -488,6 +506,10 @@ CYGWIN* )
;;
esac
+if [ -n "$target" ]; then
+ echo "Cross-compiling for: $target"
+fi
+
echo
echo 'Configuration done:'
diff --git a/debian/changelog b/debian/changelog
index f4b71762..202571d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+bitlbee (1.2-5) UNRELEASED; urgency=low
+
+ * Add Homepage and Vcs-Bzr fields.
+
+ -- Jelmer Vernooij <jelmer@samba.org> Sun, 11 May 2008 14:18:16 +0200
+
bitlbee (1.2-4) unstable; urgency=low
* Fixed init script to use the BITLBEE_OPTS variable, not an undefined
diff --git a/debian/control b/debian/control
index 8faa27b8..47eb9a72 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,8 @@ Priority: optional
Maintainer: Wilmer van der Gaast <wilmer@gaast.net>
Standards-Version: 3.5.9
Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf
+Homepage: http://www.bitlbee.org/
+Vcs-Bzr: http://code.bitlbee.org/bitlbee/
Package: bitlbee
Architecture: any
diff --git a/storage_xml.c b/storage_xml.c
index f37fce44..ab7da6e3 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -28,6 +28,7 @@
#include "base64.h"
#include "arc.h"
#include "md5.h"
+#include <glib/gstdio.h>
typedef enum
{
@@ -242,9 +243,9 @@ GMarkupParser xml_parser =
static void xml_init( void )
{
- if( access( global.conf->configdir, F_OK ) != 0 )
+ if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) )
log_message( LOGLVL_WARNING, "The configuration directory `%s' does not exist. Configuration won't be saved.", global.conf->configdir );
- else if( access( global.conf->configdir, R_OK ) != 0 || access( global.conf->configdir, W_OK ) != 0 )
+ else if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) || g_access( global.conf->configdir, W_OK ) != 0 )
log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to `%s'.", global.conf->configdir );
}
@@ -371,7 +372,7 @@ static storage_status_t xml_save( irc_t *irc, int overwrite )
g_snprintf( path, sizeof( path ) - 2, "%s%s%s", global.conf->configdir, path2, ".xml" );
g_free( path2 );
- if( !overwrite && access( path, F_OK ) != -1 )
+ if( !overwrite && g_file_test( path, G_FILE_TEST_EXISTS ) )
return STORAGE_ALREADY_EXISTS;
strcat( path, "~" );