Skip to content

Commit

Permalink
Imported changes from purple-facebook
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeboski committed Aug 24, 2015
1 parent 60a4230 commit 53cedfa
Show file tree
Hide file tree
Showing 25 changed files with 9,365 additions and 4,798 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config.log
config.status
configure
debian
facebook/facebook-marshal.*
INSTALL
libtool
libtool.m4
Expand Down
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ os:
compiler:
- gcc

env:
- DEBUG=disable
- DEBUG=enable

before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq
--no-install-recommends
asciidoc
clang
libjson-glib-dev
lynx
xsltproc
xmlto
Expand All @@ -43,7 +40,7 @@ before_install:
- cd -

script:
- ./autogen.sh --${DEBUG}-debug
- CFLAGS="-Werror" ./autogen.sh --enable-warnings
- scan-build -k
--use-cc=$(which "${CC}")
--status-bugs
Expand Down
12 changes: 3 additions & 9 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,13 @@ Group Chats (creating chat):

## Debugging

Before debugging can begin, the plugin must be compiled with debugging
support. Once debugging support has been enabled, one of the two
supported environment variables can be defined to enable debugging
output. This can be used in unison with debuggers such as GDB, which
should enable easier tracing of bugs.
One of the two supported environment variables can be defined to enable
debugging output. This can be used in unison with debuggers such as
GDB, which should enable easier tracing of bugs.

When posting to the issue tracker, please ensure any sensitive
information has been stripped.

Enable debugging support (modify the build instructions above):

$ ./autogen.sh --enable-debug

Enable debugging output:

For bitlbee and the plugin:
Expand Down
50 changes: 26 additions & 24 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,27 @@ m4_define_default(
)

AC_ARG_ENABLE(
[debug],
[warnings],
[AS_HELP_STRING(
[--enable-debug],
[Enable debugging features]
[--enable-warnings],
[Enable additional compile-time (GCC) warnings]
)],
[DEBUG="yes"],
[DEBUG="no"]
)

AC_ARG_ENABLE(
[minimal-flags],
[AS_HELP_STRING(
[--enable-minimal-flags],
[Disable internal CFLAGS which are not required]
)],
[MINIMAL_FLAGS="yes"],
[MINIMAL_FLAGS="no"]
[WARNINGS="yes"],
[WARNINGS="no"]
)

AS_IF(
[test "x$DEBUG" == "xyes"],
[AC_DEFINE(DEBUG_FACEBOOK, 1)
AS_IF(
[test "x$MINIMAL_FLAGS" == "xno"],
[CFLAGS="$CFLAGS -Wall -Wformat-nonliteral -g -O0"]
)]
[test "x$WARNINGS" == "xyes"],
[CFLAGS="$CFLAGS -Wall -Wextra \
-Waggregate-return \
-Wdeclaration-after-statement \
-Wfloat-equal \
-Wformat \
-Winit-self \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wno-unused-parameter \
-Wpointer-arith"]
)

AC_ARG_WITH(
Expand All @@ -81,9 +76,16 @@ AC_ARG_WITH(
[plugindir="$with_plugindir"]
)

PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32.0])
PKG_CHECK_MODULES([BITLBEE], [bitlbee >= 3.2.2])
PKG_CHECK_MODULES([ZLIB], [zlib])
PKG_CHECK_MODULES([BITLBEE], [bitlbee >= 3.2.2])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32.0 gobject-2.0])
PKG_CHECK_MODULES([JSON], [json-glib-1.0 >= 0.14.0])
PKG_CHECK_MODULES([ZLIB], [zlib])

PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal])
AS_IF(
[test -z "$GLIB_GENMARSHAL"],
[AC_MSG_ERROR([The `glib-genmarshal' tool is missing.])]
)

AS_IF(
[test -z "$plugindir"],
Expand Down
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Maintainer: jgeboski <jgeboski@gmail.com>
Section: misc
Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev (>= 2.32), bitlbee-dev (>= 3.2.2), zlib1g-dev
Build-Depends: bitlbee-dev (>= 3.2.2), debhelper (>= 9), dh-autoreconf, libglib2.0-dev (>= 2.32), libjson-glib-dev (>= 0.14), zlib1g-dev
Homepage: https://github.com/jgeboski/bitlbee-facebook

Package: bitlbee-facebook
Architecture: any
Section: misc
Priority: optional
Depends: ${shlibs:Depends}, ${misc:Depends}, bitlbee (>= 3.2.2) | bitlbee-libpurple (>= 3.2.2)
Depends: ${shlibs:Depends}, ${misc:Depends}, bitlbee (>= 3.2.2) | bitlbee-libpurple (>= 3.2.2), libglib2.0-0 (>= 2.32), libjson-glib-1.0-0 (>= 0.14), zlib1g
Homepage: https://github.com/jgeboski/bitlbee-facebook
Description: Facebook protocol plugin for BitlBee
BitlBee Facebook implements the Facebook Messenger protocol into
Expand Down
48 changes: 38 additions & 10 deletions facebook/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
libdir = $(plugindir)
lib_LTLIBRARIES = facebook.la
libdir = $(plugindir)
lib_LTLIBRARIES = facebook.la

facebook_la_CFLAGS = \
$(BITLBEE_CFLAGS) \
$(JSON_CFLAGS) \
$(GLIB_CFLAGS) \
$(ZLIB_CFLAGS)

facebook_la_LDFLAGS = \
$(BITLBEE_LIBS) \
$(JSON_LIBS) \
$(GLIB_LIBS) \
$(ZLIB_LIBS)

facebook_la_CFLAGS = $(BITLBEE_CFLAGS) $(GLIB_CFLAGS) $(ZLIB_CFLAGS)
facebook_la_LDFLAGS = $(BITLBEE_LIBS) $(GLIB_LIBS) $(ZLIB_LIBS)
facebook_la_SOURCES = \
facebook-marshal.c \
facebook-marshal.h \
facebook.c \
facebook-api.c \
facebook-api.h \
facebook-data.c \
facebook-data.h \
facebook-http.c \
facebook-json.c \
facebook-mqtt.c \
facebook-thrift.c \
facebook-util.c \
facebook.h \
facebook-api.h
facebook-http.h \
facebook-id.h \
facebook-json.c \
facebook-json.h \
facebook-mqtt.c \
facebook-mqtt.h \
facebook-thrift.c \
facebook-thrift.h \
facebook-util.c \
facebook-util.h

# Build the library as a module
facebook_la_LDFLAGS += -module -avoid-version

EXTRA_DIST = \
marshaller.list

CLEANFILES = \
facebook-marshal.c \
facebook-marshal.h

facebook-marshal.c: $(srcdir)/marshaller.list facebook-marshal.h
$(AM_V_GEN)echo "#include \"facebook-marshal.h\"" > $@
$(AM_V_at)$(GLIB_GENMARSHAL) --prefix=fb_marshal --body $(srcdir)/marshaller.list >> $@

facebook-marshal.h: $(srcdir)/marshaller.list
$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=fb_marshal --header $(srcdir)/marshaller.list > $@
Loading

0 comments on commit 53cedfa

Please sign in to comment.