drop json-c

v1
Tony Olagbaiye 4 years ago
parent a97d77f332
commit b6b6ed6246
No known key found for this signature in database
GPG Key ID: 9E2FF3BDEBDFC910

3
.gitmodules vendored

@ -1,3 +0,0 @@
[submodule "json-c"]
path = json-c
url = https://github.com/json-c/json-c

@ -4,7 +4,7 @@ ifdef DEBUG
endif endif
RM=rm -f RM=rm -f
FIND=find FIND=find
INCLUDES=-Ilibstrophe -Ijson-c INCLUDES=-Ilibstrophe
CFLAGS+=$(DBGCFLAGS) -fno-omit-frame-pointer -fPIC -std=gnu99 -g -Wall -Wextra -Werror-implicit-function-declaration -Wno-missing-field-initializers $(INCLUDES) CFLAGS+=$(DBGCFLAGS) -fno-omit-frame-pointer -fPIC -std=gnu99 -g -Wall -Wextra -Werror-implicit-function-declaration -Wno-missing-field-initializers $(INCLUDES)
LDFLAGS+=-shared -g $(DBGCFLAGS) $(DBGLDFLAGS) LDFLAGS+=-shared -g $(DBGCFLAGS) $(DBGLDFLAGS)
LDLIBS=-lstrophe -lpthread LDLIBS=-lstrophe -lpthread
@ -18,36 +18,7 @@ SRCS=plugin.c \
config.c \ config.c \
connection.c \ connection.c \
DEPS=json-c/libjson-c.a DEPS=
OLDSRCS=slack.c \
slack-api.c \
slack-buffer.c \
slack-channel.c \
slack-config.c \
slack-command.c \
slack-completion.c \
slack-emoji.c \
slack-input.c \
slack-message.c \
slack-oauth.c \
slack-request.c \
slack-teaminfo.c \
slack-user.c \
slack-workspace.c \
api/slack-api-hello.c \
api/slack-api-error.c \
api/slack-api-message.c \
api/slack-api-user-typing.c \
api/message/slack-api-message-bot-message.c \
api/message/slack-api-message-slackbot-response.c \
api/message/slack-api-message-me-message.c \
api/message/slack-api-message-unimplemented.c \
request/slack-request-chat-memessage.c \
request/slack-request-chat-postmessage.c \
request/slack-request-channels-list.c \
request/slack-request-conversations-members.c \
request/slack-request-emoji-list.c \
request/slack-request-users-list.c
OBJS=$(subst .c,.o,$(SRCS)) OBJS=$(subst .c,.o,$(SRCS))
all: $(DEPS) weechat-xmpp all: $(DEPS) weechat-xmpp
@ -57,15 +28,9 @@ weechat-xmpp: $(OBJS)
which patchelf >/dev/null && \ which patchelf >/dev/null && \
patchelf --set-rpath $(LIBRARY_PATH):$(shell patchelf --print-rpath xmpp.so) xmpp.so || true patchelf --set-rpath $(LIBRARY_PATH):$(shell patchelf --print-rpath xmpp.so) xmpp.so || true
json-c/libjson-c.a:
cd json-c && env CFLAGS= LDFLAGS= \
cmake -DCMAKE_C_FLAGS=-fPIC .
$(MAKE) -C json-c json-c-static
json-c: json-c/libjson-c.a
depend: .depend depend: .depend
.depend: json-c/libjson-c.a $(SRCS) .depend: $(SRCS)
$(RM) ./.depend $(RM) ./.depend
$(CC) $(CFLAGS) -MM $^>>./.depend $(CC) $(CFLAGS) -MM $^>>./.depend
@ -74,10 +39,6 @@ tidy:
clean: clean:
$(RM) $(OBJS) $(RM) $(OBJS)
$(MAKE) -C json-c clean || true
git submodule foreach --recursive git clean -xfd || true
git submodule foreach --recursive git reset --hard || true
git submodule update --init --recursive || true
distclean: clean distclean: clean
$(RM) *~ .depend $(RM) *~ .depend

@ -2,7 +2,6 @@
// License, version 2.0. If a copy of the MPL was not distributed with this // License, version 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <json.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <strophe.h> #include <strophe.h>
@ -260,7 +259,7 @@ int xmpp_connection_check_events(const void *pointer, void *data, int remaining_
} }
int xmpp_connection_route_message(xmpp_conn_t *workspace, int xmpp_connection_route_message(xmpp_conn_t *workspace,
const char *type, json_object *message) const char *type, void *message)
{ {
//struct stringcase key; //struct stringcase key;
//key.string = type; //key.string = type;

@ -16,6 +16,6 @@ void xmpp_connection_connect(const char* jid, const char* password);
int xmpp_connection_check_events(const void *pointer, void *data, int remaining_calls); int xmpp_connection_check_events(const void *pointer, void *data, int remaining_calls);
int xmpp_connection_route_message(xmpp_conn_t *connection, int xmpp_connection_route_message(xmpp_conn_t *connection,
const char *type, json_object *message); const char *type, void *message);
#endif /*WEECHAT_XMPP_CONNECTION_H*/ #endif /*WEECHAT_XMPP_CONNECTION_H*/

@ -1 +0,0 @@
Subproject commit 75bf657cc285c1b726492ed6af3645ea95fe17ac

@ -6,7 +6,6 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <strophe.h> #include <strophe.h>
#include <json.h>
#include <weechat/weechat-plugin.h> #include <weechat/weechat-plugin.h>
#include "plugin.h" #include "plugin.h"

Loading…
Cancel
Save