add libaxolotl

This commit is contained in:
Tony Olagbaiye 2021-07-02 00:13:15 +01:00
parent 8988d969a0
commit 28106825e8
No known key found for this signature in database
GPG Key ID: 9E2FF3BDEBDFC910
5 changed files with 37 additions and 18 deletions

3
.envrc
View File

@ -36,7 +36,8 @@ use_guix()
PACKAGES=(
autoconf autoconf-archive automake libtool
make cmake gcc-toolchain pkg-config patchelf
weechat xz libxml2 libstrophe json-c
weechat libxml2 libstrophe
glib libsignal-protocol-c sqlite
)
# Thanks <https://lists.gnu.org/archive/html/guix-devel/2016-09/msg00859.html>

3
.gitmodules vendored
View File

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

View File

@ -14,28 +14,32 @@ LIBDIR ?= $(PREFIX)/lib
INSTALL ?= /usr/bin/install
SRCS=plugin.c \
account.c \
buffer.c \
channel.c \
command.c \
config.c \
connection.c \
input.c \
message.c \
user.c \
account.c \
buffer.c \
channel.c \
command.c \
config.c \
connection.c \
input.c \
message.c \
user.c \
DEPS=
DEPS=axc/build/libaxc.a
OBJS=$(subst .c,.o,$(SRCS))
all: weechat-xmpp
weechat-xmpp: $(DEPS) xmpp.so
xmpp.so: $(OBJS)
$(CC) $(LDFLAGS) -o xmpp.so $(OBJS) $(LDLIBS)
xmpp.so: $(OBJS) $(DEPS)
$(CC) $(LDFLAGS) -o xmpp.so $(OBJS) $(DEPS) $(LDLIBS)
which patchelf >/dev/null && \
patchelf --set-rpath $(LIBRARY_PATH):$(shell realpath $(shell dirname $(shell gcc --print-libgcc-file-name))/../../../) xmpp.so && \
patchelf --shrink-rpath xmpp.so || true
axc/build/libaxc.a:
$(MAKE) -C axc
axc: axc/build/libaxc.a
test: xmpp.so
env LD_PRELOAD=$(DEBUG) \
weechat -a -P 'alias,buflist,irc' -r '/plugin load ./xmpp.so'
@ -55,6 +59,10 @@ tidy:
clean:
$(RM) $(OBJS)
$(MAKE) -C axc clean
git submodule foreach --recursive git clean -xfd || true
git submodule foreach --recursive git reset --hard || true
git submodule update --init --recursive || true
distclean: clean
$(RM) *~ .depend

View File

@ -81,20 +81,26 @@
* [X] Opening PMs (/chat)
** TODO [#A] Implement essential functionality (milestone v0.2)
* [X] Opening PMs with initial message
* [ ] Handle wide errors gracefully
* [ ] [#B] Handle wide errors gracefully
* [ ] MUCs
* [X] Opening (/enter)
* [X] Receiving
* [X] Sending
* [ ] [#B] Edits
* [ ] [#B] Handle errors gracefully
* [ ] [#B] Presence/nicklist
* [ ] [#B] Show topic
* [ ] [#B] Edits
* [ ] OMEMO presence
* [ ] OMEMO messages
* [ ] [#B] Enters
* [ ] [#B] Leaves
* [ ] [#B] Tracking
* [ ] [#B] Set/show topic
* [ ] OMEMO (libsignal-protocol-c / axc)
* [ ] Presence
* [ ] Messages
* [ ] MUC PMs
* [ ] Send typing notifications
* [ ] Recv typing notifications
* [ ] OTR (libotr)
* [ ] PGP (libgpgme)
** TODO [#C] Implement completion engine (milestone v0.3)
** TODO [#D] Close all issues (milestone v1.0)

1
axc Submodule

@ -0,0 +1 @@
Subproject commit 1d4454ea42d39a2064955f2a8de5f89787743f2a