testing/dcd: new aport

https://github.com/dlang-community/DCD
The D Completion Daemon is an auto-complete program for the D programming language
This commit is contained in:
Rasmus Thomsen 2020-03-01 00:17:18 +01:00
parent 48200a7008
commit c3613e450b
2 changed files with 125 additions and 0 deletions

35
testing/dcd/APKBUILD Normal file
View File

@ -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"

View File

@ -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