View | Details | Raw Unified | Return to bug 279553 | Differences between
and this patch

Collapse All | Expand All

(-)b/net-im/concord/Makefile (+59 lines)
Added Link Here
1
PORTNAME=				concord
2
DISTVERSIONPREFIX=		v
3
DISTVERSION=			2.3.0
4
CATEGORIES=				net-im devel
5
6
MAINTAINER=				mail@souji-thenria.net
7
COMMENT=				Discord library written in C
8
WWW=					https://github.com/Cogmasters/concord
9
10
LICENSE=				MIT
11
LICENSE_FILE=			${WRKSRC}/LICENSE
12
13
BUILD_DEPENDS=			curl:ftp/curl
14
RUN_DEPENDS=			curl:ftp/curl
15
16
USE_GITHUB=				yes
17
GH_ACCOUNT=				Cogmasters
18
19
EXAMPLESDIR=			${PREFIX}/share/examples/${PORTNAME}
20
21
OPTIONS_DEFINE=			EXAMPLES SIGINTCATCH DEBUG_WEBSOCKETS DEBUG_HTTP
22
OPTIONS_DEFAULT=		EXAMPLES SHARED
23
OPTIONS_SINGLE=			TARGETS
24
OPTIONS_SINGLE_TARGETS=	STATIC SHARED DEBUG
25
OPTIONS_SUB=			yes
26
27
DEBUG_HTTP_DESC=		Verbose debugging for HTTP communication
28
DEBUG_WEBSOCKETS_DESC=	Verbose debugging for WebSockets communication
29
SHARED_DESC=			Build dynamically linked version
30
SIGINTCATCH_DESC=		Shutdown gracefully when a SIGINT is received
31
STATIC_DESC=			Build statically linked version
32
33
DEBUG_MAKE_ARGS=	debug
34
DEBUG_HTTP_CFLAGS=			-DCCORD_DEBUG_HTTP
35
DEBUG_WEBSOCKETS_CFLAGS=	-DCCORD_DEBUG_WEBSOCKETS
36
SHARED_MAKE_ARGS=	shared
37
SIGINTCATCH_CFLAGS=			-DCCORD_SIGINTCATCH
38
STATIC_MAKE_ARGS=	static
39
40
do-build:
41
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
42
43
do-install:
44
	${INSTALL} -d ${STAGEDIR}${PREFIX}/include/concord
45
	${INSTALL} -d ${STAGEDIR}${PREFIX}/lib
46
	cd ${WRKSRC} && PREFIX=${STAGEDIR}${PREFIX} ${MAKE} ${INSTALL_DATA}
47
48
post-install-EXAMPLES-on:
49
	${INSTALL} -d ${STAGEDIR}${EXAMPLESDIR}
50
	cd ${WRKSRC}/examples/ && ${SED} -i '' 's/#include "\([^"]*\)\.h"/#include <concord\/\1.h>/g' *.c
51
	cd ${WRKSRC}/examples/ && ${SED} -i '' 's|\.\./config\.json|\.\/config\.json|g' *.c
52
	cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} "*.c" ${STAGEDIR}${EXAMPLESDIR}/
53
	${INSTALL_DATA} ${FILESDIR}/Makefile.examples ${STAGEDIR}${EXAMPLESDIR}/Makefile
54
	${INSTALL_DATA} ${FILESDIR}/config.json.examples ${STAGEDIR}${EXAMPLESDIR}/config.json
55
56
post-install-SHARED-on:
57
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libdiscord.so
58
59
.include <bsd.port.mk>
(-)b/net-im/concord/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1726788532
2
SHA256 (Cogmasters-concord-v2.3.0_GH0.tar.gz) = 3e789e6c6f9f3b5c480aaf4fb337819043c53fcce8b50966e95d7b5daef38d4d
3
SIZE (Cogmasters-concord-v2.3.0_GH0.tar.gz) = 775124
(-)b/net-im/concord/files/Makefile.examples (+48 lines)
Added Link Here
1
CC ?= cc
2
3
STD_BOTS   = 8ball \
4
             audit-log \
5
             ban \
6
             cache \
7
             channel \
8
             components \
9
             copycat \
10
             embed \
11
             emoji \
12
             fetch-messages \
13
             guild-template \
14
             guild \
15
             invite \
16
             manual-dm \
17
             pin \
18
             ping-pong \
19
             presence \
20
             reaction \
21
             shell \
22
             slash-commands \
23
             slash-commands2 \
24
             spam \
25
             webhook \
26
             timers
27
VOICE_BOTS = voice-join
28
29
BOTS += $(STD_BOTS)
30
31
CFLAGS  += -O0 -g -pthread -Wall -I/usr/local/include
32
LDFLAGS  = -L/usr/local/lib
33
LDLIBS   = -ldiscord -lcurl
34
35
all: $(BOTS)
36
37
voice:
38
	@ CFLAGS=-DCCORD_VOICE BOTS=$(VOICE_BOTS) $(MAKE)
39
40
echo:
41
	@ echo -e 'CC: $(CC)\n'
42
	@ echo -e 'STD_BOTS: $(STD_BOTS)\n'
43
	@ echo -e 'VOICE_BOTS: $(VOICE_BOTS)\n'
44
45
clean:
46
	@ rm -f $(STD_BOTS) $(VOICE_BOTS)
47
48
.PHONY: all echo clean
(-)b/net-im/concord/files/config.json.examples (+21 lines)
Added Link Here
1
{
2
  "logging": {
3
    "level": "trace",
4
    "filename": "bot.log",
5
    "quiet": false,
6
    "overwrite": true,
7
    "use_color": true,
8
    "http": {
9
      "enable": true,
10
      "filename": "http.log"
11
    },
12
    "disable_modules": ["WEBSOCKETS", "USER_AGENT"]
13
  },
14
  "discord": {
15
    "token": "YOUR-BOT-TOKEN",
16
    "default_prefix": {
17
      "enable": false,
18
      "prefix": "YOUR-COMMANDS-PREFIX"
19
    }
20
  }
21
}
(-)b/net-im/concord/files/patch-src_Makefile (+10 lines)
Added Link Here
1
--- src/Makefile.orig	2024-09-20 12:42:26 UTC
2
+++ src/Makefile
3
@@ -82,7 +82,7 @@ $(SOLIB): deps
4
 $(ARLIB): deps
5
	$(AR) $(ARFLAGS) $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS)
6
 $(SOLIB): deps
7
-	$(CC) -shared -lcurl -o $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS)
8
+	$(CC) -shared -L$(PREFIX)/lib -lcurl -o $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS)
9
 $(DYLIB): deps
10
	$(CC) -dynamiclib $(DYFLAGS) -o $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS)
(-)b/net-im/concord/pkg-descr (+3 lines)
Added Link Here
1
Concord is an asynchronous C99 Discord API library with minimal external
2
dependencies, and a low-level translation of the Discord official documentation
3
to C code.
(-)b/net-im/concord/pkg-plist (-1 / +84 lines)
Added Link Here
0
- 
1
include/concord/all.PRE.h
2
include/concord/anomap.h
3
include/concord/application_command.h
4
include/concord/attributes.h
5
include/concord/audit_log.h
6
include/concord/auto_moderation.h
7
include/concord/carray.h
8
include/concord/channel.h
9
include/concord/chash.h
10
include/concord/clock.h
11
include/concord/cog-utils.h
12
include/concord/concord-once.h
13
include/concord/curl-websocket.h
14
include/concord/discord-cache.h
15
include/concord/discord-events.h
16
include/concord/discord-internal.h
17
include/concord/discord-request.h
18
include/concord/discord-response.h
19
include/concord/discord-voice.h
20
include/concord/discord-worker.h
21
include/concord/discord.h
22
include/concord/discord_codecs.PRE.h
23
include/concord/discord_codecs.h
24
include/concord/emoji.h
25
include/concord/error.h
26
include/concord/gateway.h
27
include/concord/gencodecs-process.PRE.h
28
include/concord/gencodecs.h
29
include/concord/guild.h
30
include/concord/guild_scheduled_event.h
31
include/concord/guild_template.h
32
include/concord/interaction.h
33
include/concord/invite.h
34
include/concord/io_poller.h
35
include/concord/jsmn-find.h
36
include/concord/jsmn.h
37
include/concord/json-build.h
38
include/concord/log.h
39
include/concord/logconf.h
40
include/concord/oauth2.h
41
include/concord/osname.h
42
include/concord/priority_queue.h
43
include/concord/queriec.h
44
include/concord/queue.h
45
include/concord/sha1.h
46
include/concord/stage_instance.h
47
include/concord/sticker.h
48
include/concord/threadpool.h
49
include/concord/types.h
50
include/concord/user-agent.h
51
include/concord/user.h
52
include/concord/voice.h
53
include/concord/webhook.h
54
include/concord/websockets.h
55
%%STATIC%%lib/libdiscord.a
56
%%DEBUG%%lib/libdiscord.a
57
%%SHARED%%lib/libdiscord.so
58
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/8ball.c
59
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
60
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/audit-log.c
61
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ban.c
62
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cache.c
63
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/channel.c
64
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/components.c
65
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.json
66
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copycat.c
67
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/embed.c
68
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/emoji.c
69
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fetch-messages.c
70
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild-template.c
71
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild.c
72
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/invite.c
73
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/manual-dm.c
74
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pin.c
75
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ping-pong.c
76
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/presence.c
77
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reaction.c
78
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shell.c
79
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands.c
80
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands2.c
81
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/spam.c
82
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/timers.c
83
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/voice-join.c
84
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/webhook.c

Return to bug 279553