aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dcd
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-03-01 00:17:18 +0100
committerRasmus Thomsen <oss@cogitri.dev>2020-03-01 11:24:34 +0100
commitc3613e450b2ecd33bb606f2b67ea6214ef4eaa15 (patch)
treee05efcd194baf4d38d6f9b7c1bd8d9926c9f5c29 /testing/dcd
parent48200a70087efe66cfa215f859a499a0f8266dde (diff)
downloadaports-c3613e450b2ecd33bb606f2b67ea6214ef4eaa15.tar.bz2
aports-c3613e450b2ecd33bb606f2b67ea6214ef4eaa15.tar.xz
testing/dcd: new aport
https://github.com/dlang-community/DCD The D Completion Daemon is an auto-complete program for the D programming language
Diffstat (limited to 'testing/dcd')
-rw-r--r--testing/dcd/APKBUILD35
-rw-r--r--testing/dcd/do-shared-linking.patch90
2 files changed, 125 insertions, 0 deletions
diff --git a/testing/dcd/APKBUILD b/testing/dcd/APKBUILD
new file mode 100644
index 0000000000..a2294c42b2
--- /dev/null
+++ b/testing/dcd/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+pkgname=dcd
+pkgver=0.12.0
+_githash=33dbd7653ecf830b735382e11d9bee66853a6dcf
+pkgrel=0
+pkgdesc="The D Completion Daemon is an auto-complete program for the D programming language"
+url="https://github.com/dlang-community/DCD"
+arch="x86_64" # ldc
+license="GPL-3.0-or-later"
+makedepends="ldc ldc-runtime stdx-allocator-dev dsymbol-dev libdparse-dev
+ msgpack-d-dev dcontainers-dev bash"
+options="!check" # Can only be run with a DMD version of DCD
+source="https://github.com/dlang-community/DCD/archive/v$pkgver/dcd-$pkgver.tar.gz
+ do-shared-linking.patch"
+builddir="$srcdir/DCD-$pkgver"
+
+prepare() {
+ default_prepare
+
+ mkdir bin
+ echo $_githash > bin/githash.txt
+}
+
+build() {
+ make DFLAGS="-link-defaultlib-shared" ldc
+}
+
+package() {
+ install -d "$pkgdir"/usr/bin
+ install -m0755 bin/dcd-client bin/dcd-server "$pkgdir"/usr/bin/
+}
+
+sha512sums="caadc5d497d6a209fda23523164247c1b921cebbe641fb6b5cedcecd20075d9283407f132886a369b15286c327e6a9e6015f290c31283e2a49a0e676b4cf82a9 dcd-0.12.0.tar.gz
+3d0a85c47eca379ee350ba007200469e2c95ae3822d3826c275e6b4be7fa7d7d8e1c730fe971c6d67589888d94ea0c108581164952072ee9e956cf001298e21f do-shared-linking.patch"
diff --git a/testing/dcd/do-shared-linking.patch b/testing/dcd/do-shared-linking.patch
new file mode 100644
index 0000000000..abb63b36c5
--- /dev/null
+++ b/testing/dcd/do-shared-linking.patch
@@ -0,0 +1,90 @@
+diff --git a/makefile b/makefile
+index 2bf0be9..2c568f0 100644
+--- a/makefile
++++ b/makefile
+@@ -1,4 +1,4 @@
+-.PHONY: all
+++.PHONY: all
+
+ all: dmd
+ dmd: dmdserver dmdclient
+@@ -32,8 +32,7 @@ clean:
+
+ CLIENT_SRC := \
+ $(shell find src/dcd/common -name "*.d")\
+- $(shell find src/dcd/client -name "*.d")\
+- $(shell find msgpack-d/src/ -name "*.d")
++ $(shell find src/dcd/client -name "*.d")
+
+ DMD_CLIENT_FLAGS := -Imsgpack-d/src\
+ -Imsgpack-d/src\
+@@ -49,8 +48,8 @@ GDC_CLIENT_FLAGS := -Imsgpack-d/src\
+ -frelease\
+ -obin/dcd-client
+
+-LDC_CLIENT_FLAGS := -Imsgpack-d/src\
+- -Imsgpack-d/src\
++LDC_CLIENT_FLAGS := \
++ $(shell pkg-config --cflags msgpack-d) $(subst -l,-L=-l,$(shell pkg-config --libs msgpack-d))\
+ -J=bin\
+ -release\
+ -O5\
+@@ -63,29 +62,7 @@ override GDC_CLIENT_FLAGS += $(DFLAGS)
+
+ SERVER_SRC := \
+ $(shell find src/dcd/common -name "*.d")\
+- $(shell find src/dcd/server -name "*.d")\
+- $(shell find ${DSYMBOL_DIR}/src -name "*.d")\
+- $(shell find ${STDXALLOC_DIR}/source -name "*.d")\
+- ${DPARSE_DIR}/src/dparse/ast.d\
+- ${DPARSE_DIR}/src/dparse/entities.d\
+- ${DPARSE_DIR}/src/dparse/lexer.d\
+- ${DPARSE_DIR}/src/dparse/parser.d\
+- ${DPARSE_DIR}/src/dparse/formatter.d\
+- ${DPARSE_DIR}/src/dparse/rollback_allocator.d\
+- ${DPARSE_DIR}/src/dparse/stack_buffer.d\
+- ${DPARSE_DIR}/src/std/experimental/lexer.d\
+- containers/src/containers/dynamicarray.d\
+- containers/src/containers/ttree.d\
+- containers/src/containers/unrolledlist.d\
+- containers/src/containers/openhashset.d\
+- containers/src/containers/hashset.d\
+- containers/src/containers/internal/hash.d\
+- containers/src/containers/internal/node.d\
+- containers/src/containers/internal/storage_type.d\
+- containers/src/containers/internal/element_type.d\
+- containers/src/containers/internal/backwards.d\
+- containers/src/containers/slist.d\
+- $(shell find msgpack-d/src/ -name "*.d")
++ $(shell find src/dcd/server -name "*.d")
+
+ DMD_SERVER_FLAGS := -Icontainers/src\
+ -Imsgpack-d/src\
+@@ -117,10 +94,10 @@ GDC_SERVER_FLAGS := -Icontainers/src\
+ -frelease\
+ -obin/dcd-server
+
+-LDC_SERVER_FLAGS := -Icontainers/src\
+- -Imsgpack-d/src\
+- -I${DPARSE_DIR}/src\
+- -I${DSYMBOL_DIR}/src\
++LDC_SERVER_FLAGS := $(shell pkg-config --cflags dcontainers) $(subst -l,-L=-l,$(shell pkg-config --libs dcontainers))\
++ $(shell pkg-config --cflags msgpack-d) $(subst -l,-L=-l,$(shell pkg-config --libs msgpack-d))\
++ $(shell pkg-config --cflags dparse) $(subst -l,-L=-l,$(shell pkg-config --libs dparse))\
++ $(shell pkg-config --cflags dsymbol) $(subst -l,-L=-l,$(shell pkg-config --libs dsymbol))\
+ -Isrc\
+ -J=bin\
+ -O5\
+@@ -150,10 +127,10 @@ gdcserver: githash
+ mkdir -p bin
+ ${GDC} ${SERVER_SRC} ${GDC_SERVER_FLAGS}
+
+-ldcclient: githash
++ldcclient:
+ ${LDC} ${CLIENT_SRC} ${LDC_CLIENT_FLAGS} -oq -of=bin/dcd-client
+
+-ldcserver: githash
++ldcserver:
+ ${LDC} $(LDC_SERVER_FLAGS) ${SERVER_SRC} -oq -of=bin/dcd-server
+
+ test: debugserver dmdclient