From 41f75a4c051b8b44359d502f37ed08d3c15d136c Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 21 Feb 2017 17:39:29 +0100 Subject: [PATCH] net-im/lurch: initial import of scm version --- metadata/repository_mask.conf | 1 + .../files/0001-Improve-build-system.patch | 160 ++++++++++++++++++ .../files/0002-axc-Improve-build-system.patch | 153 +++++++++++++++++ .../0003-omemo-Improve-build-system.patch | 146 ++++++++++++++++ packages/net-im/lurch/lurch-scm.exheres-0 | 73 ++++++++ 5 files changed, 533 insertions(+) create mode 100644 packages/net-im/lurch/files/0001-Improve-build-system.patch create mode 100644 packages/net-im/lurch/files/0002-axc-Improve-build-system.patch create mode 100644 packages/net-im/lurch/files/0003-omemo-Improve-build-system.patch create mode 100644 packages/net-im/lurch/lurch-scm.exheres-0 diff --git a/metadata/repository_mask.conf b/metadata/repository_mask.conf index fd853a0..0534386 100644 --- a/metadata/repository_mask.conf +++ b/metadata/repository_mask.conf @@ -9,6 +9,7 @@ media/livestreamer[~scm] media-gfx/pinta[~scm] net-im/gajim-omemo[~scm] + net-im/lurch[~scm] net-im/pidgin-opensteamworks[~scm] net-misc/remmina[~scm] x11-apps/terminator[~scm] diff --git a/packages/net-im/lurch/files/0001-Improve-build-system.patch b/packages/net-im/lurch/files/0001-Improve-build-system.patch new file mode 100644 index 0000000..bc5b533 --- /dev/null +++ b/packages/net-im/lurch/files/0001-Improve-build-system.patch @@ -0,0 +1,160 @@ +From f17d0d28a0c3f383c7d59763d0ba4be7ca27f881 Mon Sep 17 00:00:00 2001 +From: Julian Ospald +Date: Tue, 21 Feb 2017 16:40:32 +0100 +Subject: [PATCH] Improve build system +Upstream: submitted https://github.com/gkdr/lurch/pull/25 + +* respect system toolchain: gcc, pkg-config etc might be prefixed +* allow more control over passed flags, never overwriting CFLAGS etc + entirely +* proper quoting: make does _not_ take care of quoting in make rules +* default "install" target installs into system plugin dir, additional + "install-home" target installs into users home plugin dir +* simplify "clean" target and add "clean-all" target +* some minor changes to follow common Make style +* update .PHONY +--- + README.md | 2 +- + makefile | 101 ++++++++++++++++++++++++++++++++++++++++++++------------------ + 2 files changed, 73 insertions(+), 30 deletions(-) + +diff --git a/README.md b/README.md +index b5a5283..c188a3d 100644 +--- a/README.md ++++ b/README.md +@@ -10,7 +10,7 @@ + 2. `cd lurch` + 3. `git submodule update --init` (If you just pull a newer version, remember to also update the submodules as they might have changed!) + 4. `make` +-5. A final `make install` should copy the compiled plugin into your libpurple plugin dir. ++5. A final `make install-home` should copy the compiled plugin into your libpurple plugin dir. + 6. The next time you start Pidgin (or another libpurple client), you should be able to activate it in the "Plugins" window. + + ### Windows +diff --git a/makefile b/makefile +index 108fc42..bcf43e2 100644 +--- a/makefile ++++ b/makefile +@@ -1,6 +1,38 @@ +-PURPLE_PLUGIN_DIR=~/.purple/plugins +-PIDGIN_DIR=./pidgin-2.11.0 +-PURPLE_PLUGIN_SRC_DIR=$(PIDGIN_DIR)/libpurple/plugins ++### toolchain ++# ++CC ?= gcc ++PKG_CONFIG ?= pkg-config ++MKDIR = mkdir ++MKDIR_P = mkdir -p ++INSTALL = install ++INSTALL_LIB = $(INSTALL) -m 755 ++INSTALL_DIR = $(INSTALL) -d -m 755 ++RM = rm ++RM_RF = $(RM) -rf ++CMAKE ?= cmake ++CMAKE_FLAGS = -DCMAKE_BUILD_TYPE=Debug ++ ++ ++### flags ++# ++PKGCFG_C=$(shell $(PKG_CONFIG) --cflags glib-2.0 purple) \ ++ $(shell xml2-config --cflags) ++ ++PKGCFG_L=$(shell $(PKG_CONFIG) --libs purple glib-2.0 sqlite3 mxml) \ ++ $(shell xml2-config --libs) \ ++ -L$(shell $(PKG_CONFIG) --variable=plugindir purple) \ ++ $(shell libgcrypt-config --libs) ++ ++HEADERS=-I$(HDIR)/jabber -I$(LOMEMO_SRC) -I$(AXC_SRC) -I$(AX_DIR)/src ++CFLAGS += -std=c11 -Wall -g -Wstrict-overflow $(PKGCFG_C) $(HEADERS) ++CPPFLAGS += -D_XOPEN_SOURCE=700 -D_BSD_SOURCE ++LDFLAGS += -ldl -lm $(PKGCFG_L) -ljabber ++ ++ ++### directories ++# ++PURPLE_HOME_PLUGIN_DIR=~/.purple/plugins ++PURPLE_PLUGIN_DIR = $(shell $(PKG_CONFIG) --variable=plugindir purple) + + LDIR=./lib + BDIR=./build +@@ -22,40 +54,51 @@ AX_PATH=$(AX_DIR)/build/src/libaxolotl-c.a + + FILES=$(LOMEMO_PATH) $(AXC_PATH) $(AX_PATH) + +-HEADERS=-I$(HDIR)/jabber -I$(LOMEMO_SRC) -I$(AXC_SRC) -I$(AX_DIR)/src +- +-PKGCFG_C=$(shell pkg-config --cflags glib-2.0 purple) $(shell xml2-config --cflags) +-PKGCFG_L=$(shell pkg-config --libs purple glib-2.0 sqlite3 mxml) $(shell xml2-config --libs) -L$(shell pkg-config --variable=plugindir purple) $(shell libgcrypt-config --libs) +- +-CFLAGS=-std=c11 -Wall -g -Wstrict-overflow -D_XOPEN_SOURCE=700 -D_BSD_SOURCE $(PKGCFG_C) $(HEADERS) +-LFLAGS= -ldl -lm $(PKGCFG_L) -ljabber +- + ++### make rules ++# + all: $(BDIR)/lurch.so + + $(BDIR): +- mkdir -p build +- ++ $(MKDIR_P) build ++ + $(AX_PATH): +- cd $(AXC_DIR)/lib/libaxolotl-c/ && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make +- ++ cd $(AXC_DIR)/lib/libaxolotl-c/ && \ ++ $(MKDIR_P) build && \ ++ cd build && \ ++ $(CMAKE) $(CMAKE_FLAGS) .. \ ++ && $(MAKE) ++ + $(AXC_PATH): +- cd $(AXC_DIR) && make build/libaxc-nt.a +- ++ $(MAKE) -C "$(AXC_DIR)" build/libaxc-nt.a ++ + $(LOMEMO_PATH): +- cd $(LOMEMO_DIR) && make build/libomemo-conversations.a +- ++ $(MAKE) -C "$(LOMEMO_DIR)" build/libomemo-conversations.a ++ + $(BDIR)/lurch.so: $(SDIR)/lurch.c $(AX_PATH) $(AXC_PATH) $(LOMEMO_PATH) $(BDIR) +- gcc $(CFLAGS) -fPIC -c $(SDIR)/lurch.c -o $(BDIR)/lurch.o +- gcc -fPIC -shared $(CFLAGS) $(BDIR)/lurch.o $(FILES) -o $@ $(LFLAGS) +- ++ $(CC) -fPIC $(CFLAGS) $(CPPFLAGS) \ ++ -c "$(SDIR)/lurch.c" \ ++ -o "$(BDIR)/lurch.o" ++ $(CC) -fPIC -shared $(CFLAGS) $(CPPFLAGS) \ ++ "$(BDIR)/lurch.o" $(FILES) \ ++ -o $@ $(LDFLAGS) ++ + install: $(BDIR)/lurch.so +- mkdir -p $(PURPLE_PLUGIN_DIR) +- cp $(BDIR)/lurch.so $(PURPLE_PLUGIN_DIR)/lurch.so ++ [ -e "$(DESTDIR)/$(PURPLE_PLUGIN_DIR)" ] || \ ++ $(INSTALL_DIR) "$(DESTDIR)/$(PURPLE_PLUGIN_DIR)" ++ $(INSTALL_LIB) "$(BDIR)/lurch.so" "$(DESTDIR)/$(PURPLE_PLUGIN_DIR)/lurch.so" ++ ++install-home: $(BDIR)/lurch.so ++ [ -e "$(PURPLE_HOME_PLUGIN_DIR)" ] || \ ++ $(INSTALL_DIR) "$(PURPLE_HOME_PLUGIN_DIR)" ++ $(INSTALL_LIB) "$(BDIR)/lurch.so" "$(PURPLE_HOME_PLUGIN_DIR)/lurch.so" + +-.PHONY: clean + clean: +- rm -rf $(LOMEMO_BUILD) +- rm -rf $(AXC_BUILD) +- rm -rf $(AX_DIR)/build +- rm -rf $(BDIR) ++ $(RM_RF) "$(BDIR)" ++ ++clean-all: clean ++ $(MAKE) -C "$(LOMEMO_DIR)" clean ++ $(MAKE) -C "$(AXC_DIR)" clean ++ ++.PHONY: clean clean-all install install-home ++ +-- +2.11.1 + diff --git a/packages/net-im/lurch/files/0002-axc-Improve-build-system.patch b/packages/net-im/lurch/files/0002-axc-Improve-build-system.patch new file mode 100644 index 0000000..805caa1 --- /dev/null +++ b/packages/net-im/lurch/files/0002-axc-Improve-build-system.patch @@ -0,0 +1,153 @@ +From ace0369d26868163dd4f3ba1612812a1c6187197 Mon Sep 17 00:00:00 2001 +From: Julian Ospald +Date: Tue, 21 Feb 2017 17:18:42 +0100 +Subject: [PATCH] Improve build system +Upstream: submitted https://github.com/gkdr/axc/pull/1 + +* respect toolchain +* make stuff more Make compatible +--- + makefile | 85 ++++++++++++++++++++++++++++++++++++++++------------------------ + 1 file changed, 53 insertions(+), 32 deletions(-) + +diff --git a/makefile b/makefile +index 2ca357f..7841a5f 100644 +--- a/lib/axc/makefile ++++ b/lib/axc/makefile +@@ -1,3 +1,15 @@ ++### toolchain ++# ++CC ?= gcc ++AR ?= ar ++PKG_CONFIG ?= pkg-config ++LIBGCRYPT_CONFIG ?= libgcrypt-config ++MKDIR = mkdir ++MKDIR_P = mkdir -p ++CMAKE ?= cmake ++CMAKE_FLAGS = -DCMAKE_BUILD_TYPE=Debug ++ ++ + SDIR = src + LDIR = lib + BDIR = build +@@ -9,76 +21,85 @@ AX_DIR=./lib/libaxolotl-c + AX_BDIR=$(AX_DIR)/build/src + AX_PATH=$(AX_BDIR)/libaxolotl-c.a + +-PKGCFG_C=$(shell pkg-config --cflags sqlite3 glib-2.0) $(shell libgcrypt-config --cflags) +-PKGCFG_L=$(shell pkg-config --libs sqlite3 glib-2.0) $(shell libgcrypt-config --libs) ++PKGCFG_C=$(shell $(PKG_CONFIG) --cflags sqlite3 glib-2.0) \ ++ $(shell $(LIBGCRYPT_CONFIG) --cflags) ++PKGCFG_L=$(shell $(PKG_CONFIG) --libs sqlite3 glib-2.0) \ ++ $(shell $(LIBGCRYPT_CONFIG) --libs) + + HEADERS=-I$(AX_DIR)/src +-CFLAGS=$(HEADERS) $(PKGCFG_C) -std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -funsigned-char -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -fno-builtin-memset ++CFLAGS += $(HEADERS) $(PKGCFG_C) -std=c11 -Wall -Wextra -Wpedantic \ ++ -Wstrict-overflow -fno-strict-aliasing -funsigned-char \ ++ -fno-builtin-memset ++CPPFLAGS += -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE + TESTFLAGS=$(HEADERS) $(PKGCFG_C) -g -O0 --coverage + PICFLAGS=-fPIC $(CFLAGS) +-LFLAGS = -pthread -ldl $(PKGCFG_L) $(AX_PATH) -lm +-LFLAGS_T= -lcmocka $(LFLAGS) ++LDFLAGS += -pthread -ldl $(PKGCFG_L) $(AX_PATH) -lm ++LDFLAGS_T= -lcmocka $(LFLAGS) + + all: $(BDIR)/libaxc.a + + $(BDIR): +- mkdir -p $@ ++ $(MKDIR_P) $@ + + client: $(SDIR)/message_client.c $(BDIR)/axc_store.o $(BDIR)/axc_crypto.o $(BDIR)/axc.o $(AX_PATH) +- mkdir -p $@ +- gcc -D_POSIX_SOURCE -D_XOPEN_SOURCE=700 $(CFLAGS) $^ -o $@/$@.o $(LFLAGS) +- ++ $(MKDIR_P) $@ ++ $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@/$@.o $(LDFLAGS) ++ + $(BDIR)/axc.o: $(SDIR)/axc.c $(BDIR) +- gcc $(PICFLAGS) -c $< -o $@ +- ++ $(CC) $(PICFLAGS) $(CPPFLAGS) -c $< -o $@ ++ + $(BDIR)/axc-nt.o: $(SDIR)/axc.c $(BDIR) +- gcc $(PICFLAGS) -DNO_THREADS -c $< -o $@ +- ++ $(CC) $(PICFLAGS) $(CPPFLAGS) -DNO_THREADS -c $< -o $@ ++ + $(BDIR)/axc_crypto.o: $(SDIR)/axc_crypto.c $(BDIR) +- gcc $(PICFLAGS) -c $< -o $@ ++ $(CC) $(PICFLAGS) $(CPPFLAGS) -c $< -o $@ + + $(BDIR)/axc_store.o: $(SDIR)/axc_store.c $(BDIR) +- gcc $(PICFLAGS) -c $< -o $@ +- ++ $(CC) $(PICFLAGS) $(CPPFLAGS) -c $< -o $@ ++ + $(BDIR)/libaxc.a: $(BDIR)/axc.o $(BDIR)/axc_crypto.o $(BDIR)/axc_store.o +- ar rcs $@ $^ +- ++ $(AR) rcs $@ $^ ++ + $(BDIR)/libaxc-nt.a: $(BDIR)/axc-nt.o $(BDIR)/axc_crypto.o $(BDIR)/axc_store.o +- ar rcs $@ $^ ++ $(AR) rcs $@ $^ + + $(AX_PATH): +- cd $(AX_DIR) && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make +- ++ cd $(AX_DIR) && \ ++ $(MKDIR_P) build && \ ++ cd build && \ ++ $(CMAKE) $(CMAKE_FLAGS) .. && \ ++ $(MAKE) ++ + .PHONY: test + test: $(AX_PATH) test_store.o test_client.o + + .PHONY: test_store.o + test_store.o: $(SDIR)/axc_store.c $(SDIR)/axc_crypto.c $(TDIR)/test_store.c +- gcc $(TESTFLAGS) -o $(TDIR)/$@ $(TDIR)/test_store.c $(SDIR)/axc_crypto.c $(LFLAGS_T) ++ $(CC) $(TESTFLAGS) -o $(TDIR)/$@ $(TDIR)/test_store.c $(SDIR)/axc_crypto.c $(LDFLAGS_T) + -$(TDIR)/$@ + mv *.g* $(TDIR) +- ++ + test_store: test_store.o +- ++ + .PHONY: test_client.o + test_client.o: $(SDIR)/axc.c $(SDIR)/axc_crypto.c $(SDIR)/axc_store.c $(TDIR)/test_client.c +- gcc $(TESTFLAGS) -g $(HEADERS) -o $(TDIR)/$@ $(SDIR)/axc_crypto.c $(TDIR)/test_client.c $(LFLAGS_T) ++ $(CC) $(TESTFLAGS) -g $(HEADERS) -o $(TDIR)/$@ $(SDIR)/axc_crypto.c $(TDIR)/test_client.c $(LDFLAGS_T) + -$(TDIR)/$@ + mv *.g* $(TDIR) +- +-test_client: test_client.o +- ++ ++test_client: test_client.o ++ + .PHONY: coverage + coverage: test + gcovr -r . --html --html-details -o $@.html + gcovr -r . -s +- mkdir -p $@ ++ $(MKDIR_P) $@ + mv $@.* $@ +- ++ + .PHONY: clean + clean: + rm -rf client $(BDIR) $(CDIR) $(AX_DIR)/build + rm -f $(TDIR)/*.o + rm -f $(TDIR)/*.gcno $(TDIR)/*.gcda $(TDIR)/*.sqlite +- +- ++ ++ +-- +2.11.1 + diff --git a/packages/net-im/lurch/files/0003-omemo-Improve-build-system.patch b/packages/net-im/lurch/files/0003-omemo-Improve-build-system.patch new file mode 100644 index 0000000..66af60b --- /dev/null +++ b/packages/net-im/lurch/files/0003-omemo-Improve-build-system.patch @@ -0,0 +1,146 @@ +From 48e4c07fcd33fe1743119bde5cfa1ab414f2208a Mon Sep 17 00:00:00 2001 +From: Julian Ospald +Date: Tue, 21 Feb 2017 17:28:03 +0100 +Subject: [PATCH] Improve build system +Upstream: submitted https://github.com/gkdr/libomemo/pull/3 + +* respect toolchain +* make stuff more Make compatible +--- + makefile | 80 ++++++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 48 insertions(+), 32 deletions(-) + +diff --git a/makefile b/makefile +index 0785924..5d7ca01 100644 +--- a/lib/libomemo/makefile ++++ b/lib/libomemo/makefile +@@ -1,3 +1,14 @@ ++### toolchain ++# ++CC ?= gcc ++AR ?= ar ++LIBTOOL ?= libtool ++PKG_CONFIG ?= pkg-config ++LIBGCRYPT_CONFIG ?= libgcrypt-config ++MKDIR = mkdir ++MKDIR_P = mkdir -p ++ ++ + SDIR = src + BDIR = build + TDIR = test +@@ -7,66 +18,71 @@ LDIR = lib + # -fno-builtin-memset is enough to make gcc not optimize it away + FILES = + +-PKGCFG_C=$(shell pkg-config --cflags glib-2.0 sqlite3 mxml) $(shell libgcrypt-config --cflags) +-PKGCFG_L=$(shell pkg-config --libs glib-2.0 sqlite3 mxml) $(shell libgcrypt-config --libs) ++PKGCFG_C=$(shell $(PKG_CONFIG) --cflags glib-2.0 sqlite3 mxml) \ ++ $(shell $(LIBGCRYPT_CONFIG) --cflags) ++PKGCFG_L=$(shell $(PKG_CONFIG) --libs glib-2.0 sqlite3 mxml) \ ++ $(shell $(LIBGCRYPT_CONFIG) --libs) + +-CFLAGS =-std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -funsigned-char -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -fno-builtin-memset $(PKGCFG_C) ++CFLAGS += -std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow \ ++ -fno-strict-aliasing -funsigned-char \ ++ -fno-builtin-memset $(PKGCFG_C) ++CPPFLAGS += -D_XOPEN_SOURCE=700 -D_BSD_SOURCE + CFLAGS_CONVERSATIONS=$(CFLAGS) -DOMEMO_XMLNS='"eu.siacs.conversations.axolotl"' -DOMEMO_NS_SEPARATOR='"."' -DOMEMO_NS_NOVERSION + COVFLAGS = --coverage -O0 -g $(CFLAGS) +-LFLAGS =-pthread -ldl -lm $(PKGCFG_L) +-TESTFLAGS = -lcmocka $(LFLAGS) ++LDFLAGS += -pthread -ldl -lm $(PKGCFG_L) ++TESTFLAGS = -lcmocka $(LDFLAGS) + + all: $(BDIR)/libomemo-conversations.a + + $(BDIR): +- mkdir -p $@ +- +-libomemo: $(SDIR)/libomemo.c libomemo_crypto libomemo_storage $(BDIR) +- libtool --mode=compile gcc -c $(SDIR)/$@.c $(CFLAGS) -o $(BDIR)/$@.lo +- libtool --mode=link gcc -o $(BDIR)/$@.la $(BDIR)/$@.lo $(BDIR)/$@_crypto.lo $(BDIR)/$@_storage.lo +- ++ $(MKDIR_P) $@ ++ ++libomemo: $(SDIR)/libomemo.c libomemo_crypto libomemo_storage $(BDIR) ++ $(LIBTOOL) --mode=compile $(CC) -c $(SDIR)/$@.c $(CFLAGS) $(CPPFLAGS) -o $(BDIR)/$@.lo ++ $(LIBTOOL) --mode=link $(CC) -o $(BDIR)/$@.la $(BDIR)/$@.lo $(BDIR)/$@_crypto.lo $(BDIR)/$@_storage.lo ++ + libomemo-conversations: $(SDIR)/libomemo.c libomemo_crypto libomemo_storage $(BDIR) +- libtool --mode=compile gcc -c $(SDIR)/libomemo.c $(CFLAGS_CONVERSATIONS) -o $(BDIR)/libomemo.lo +- libtool --mode=link gcc -o $(BDIR)/libomemo.la $(BDIR)/libomemo.lo $(BDIR)/libomemo_crypto.lo $(BDIR)/libomemo_storage.lo ++ $(LIBTOOL) --mode=compile $(CC) -c $(SDIR)/libomemo.c $(CFLAGS_CONVERSATIONS) -o $(BDIR)/libomemo.lo ++ $(LIBTOOL) --mode=link $(CC) -o $(BDIR)/libomemo.la $(BDIR)/libomemo.lo $(BDIR)/libomemo_crypto.lo $(BDIR)/libomemo_storage.lo + + libomemo_crypto: $(SDIR)/libomemo_crypto.c build +- libtool --mode=compile gcc -c $(SDIR)/$@.c $(CFLAGS) -o $(BDIR)/$@.lo ++ $(LIBTOOL) --mode=compile $(CC) -c $(SDIR)/$@.c $(CFLAGS) $(CPPFLAGS) -o $(BDIR)/$@.lo + + libomemo_storage: $(SDIR)/libomemo_storage.c build +- libtool --mode=compile gcc -c $(SDIR)/$@.c $(CFLAGS) -o $(BDIR)/$@.lo ++ $(LIBTOOL) --mode=compile $(CC) -c $(SDIR)/$@.c $(CFLAGS) $(CPPFLAGS) -o $(BDIR)/$@.lo + + $(BDIR)/libomemo.o: $(BDIR) $(SDIR)/libomemo.c $(SDIR)/libomemo.h +- gcc -c $(CFLAGS) $(SDIR)/libomemo.c -o $@ +- ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(SDIR)/libomemo.c -o $@ ++ + $(BDIR)/libomemo-conversations.o: $(SDIR)/libomemo.c $(BDIR) +- gcc -c $(SDIR)/libomemo.c $(CFLAGS_CONVERSATIONS) -fPIC -o $@ +- ++ $(CC) -c $(SDIR)/libomemo.c $(CFLAGS_CONVERSATIONS) -fPIC -o $@ ++ + $(BDIR)/libomemo_crypto.o: $(SDIR)/libomemo_crypto.c $(BDIR) +- gcc -c $(SDIR)/libomemo_crypto.c $(CFLAGS) -fPIC -o $@ ++ $(CC) -c $(SDIR)/libomemo_crypto.c $(CFLAGS) $(CPPFLAGS) -fPIC -o $@ + + $(BDIR)/libomemo_storage.o: $(SDIR)/libomemo_storage.c $(BDIR) +- gcc -c $(SDIR)/libomemo_storage.c $(CFLAGS) -fPIC -o $@ +- ++ $(CC) -c $(SDIR)/libomemo_storage.c $(CFLAGS) $(CPPFLAGS) -fPIC -o $@ ++ + $(BDIR)/libomemo-conversations.a: $(BDIR)/libomemo-conversations.o $(BDIR)/libomemo_crypto.o $(BDIR)/libomemo_storage.o +- ar rcs $@ $^ +- ++ $(AR) rcs $@ $^ ++ + .PHONY = test_libomemo.o + test_libomemo: $(TDIR)/test_libomemo.c $(SDIR)/libomemo.c +- gcc $(COVFLAGS) $< $(FILES) -o $(TDIR)/$@.o $(TESTFLAGS) ++ $(CC) $(COVFLAGS) $< $(FILES) -o $(TDIR)/$@.o $(TESTFLAGS) + -$(TDIR)/$@.o + mv *.g* $(TDIR) +- ++ + .PHONY: test_crypto + test_crypto: $(TDIR)/test_crypto.c $(SDIR)/libomemo_crypto.c +- gcc $(COVFLAGS) $< $(FILES) -o $(TDIR)/$@.o $(TESTFLAGS) ++ $(CC) $(COVFLAGS) $< $(FILES) -o $(TDIR)/$@.o $(TESTFLAGS) + -$(TDIR)/$@.o +- mv *.g* $(TDIR) +- ++ mv *.g* $(TDIR) ++ + .PHONY: test_storage + test_storage: $(TDIR)/test_storage.c $(SDIR)/libomemo_storage.c +- gcc $(COVFLAGS) $< $(FILES) -o $(TDIR)/$@.o $(TESTFLAGS) ++ $(CC) $(COVFLAGS) $< $(FILES) -o $(TDIR)/$@.o $(TESTFLAGS) + -$(TDIR)/$@.o +- mv *.g* $(TDIR) ++ mv *.g* $(TDIR) + + .PHONY: test + test : test_libomemo test_crypto test_storage +@@ -75,7 +91,7 @@ test : test_libomemo test_crypto test_storage + coverage: test + gcovr -r . --html --html-details -o $@.html + gcovr -r . -s +- mkdir -p $@ ++ $(MKDIR_P) $@ + mv $@.* $@ + + .PHONY: clean +-- +2.11.1 + diff --git a/packages/net-im/lurch/lurch-scm.exheres-0 b/packages/net-im/lurch/lurch-scm.exheres-0 new file mode 100644 index 0000000..bc53dc1 --- /dev/null +++ b/packages/net-im/lurch/lurch-scm.exheres-0 @@ -0,0 +1,73 @@ +# Copyright 2017 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +SCM_REPOSITORY="https://github.com/gkdr/${PN}.git" +SCM_axc_REPOSITORY="https://github.com/gkdr/axc.git" +SCM_omemo_REPOSITORY="https://github.com/gkdr/libomemo.git" +SCM_SECONDARY_REPOSITORIES=" + axc + omemo +" +SCM_EXTERNAL_REFS=" + lib/axc:axc + lib/libomemo:omemo +" + +CMAKE_SOURCE=${WORK}/lib/axc/lib/libaxolotl-c + +require cmake [ api=2 out_of_source=false ] # don't let cmake mess with $WORK +require scm-git + +SUMMARY="OMEMO for libpurple - interoperable with other OMEMO clients" +HOMEPAGE="https://github.com/gkdr/${PN}" + +LICENCES="GPL-3" +SLOT="0" +PLATFORMS="~amd64 ~x86" +MYOPTIONS="" + +DEPENDENCIES=" + build: + sys-devel/libtool + virtual/pkg-config + build+run: + dev-db/sqlite:3 + dev-libs/glib:2 + dev-libs/libgcrypt + dev-libs/libxml2 + dev-libs/mxml + net-im/pidgin +" + +BUGS_TO="hasufell@posteo.de" +REMOTE_IDS="github:gkdr/${PN}" + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/0001-Improve-build-system.patch + "${FILES}"/0002-axc-Improve-build-system.patch + "${FILES}"/0003-omemo-Improve-build-system.patch +) + +src_prepare() { + # cmake part of libaxolotl-c + edo mkdir "${CMAKE_SOURCE}"/build + default +} + +src_configure() { + # cmake part of libaxolotl-c + edo cd "${CMAKE_SOURCE}"/build + cmake_src_configure +} + +src_compile() { + # cmake part of libaxolotl-c + emake -C "${CMAKE_SOURCE}"/build + + default +} + +src_install() { + default +} +