diff --git a/net-im/Makefile b/net-im/Makefile index 75794ba362eb..9a079739aafe 100644 --- a/net-im/Makefile +++ b/net-im/Makefile @@ -1,181 +1,182 @@ COMMENT = Instant messaging SUBDIR += beebeep SUBDIR += biboumi SUBDIR += chatterino2 SUBDIR += coccinella + SUBDIR += concord SUBDIR += conduit SUBDIR += convey SUBDIR += coyim SUBDIR += cutegram SUBDIR += dendrite SUBDIR += dino SUBDIR += discordo SUBDIR += dissent SUBDIR += echat SUBDIR += ejabberd SUBDIR += farstream SUBDIR += finch SUBDIR += folks SUBDIR += fractal SUBDIR += freetalk SUBDIR += gajim SUBDIR += gloox SUBDIR += gomuks SUBDIR += gotktrix SUBDIR += gotosocial SUBDIR += gurk-rs SUBDIR += iamb SUBDIR += icmpchat SUBDIR += icqlib SUBDIR += jarl SUBDIR += jicofo SUBDIR += jitsi-meet-full SUBDIR += jitsi-prosody-plugins SUBDIR += jitsi-srtp-native SUBDIR += jitsi-videobridge SUBDIR += jsxc SUBDIR += kaccounts-integration SUBDIR += kaccounts-providers SUBDIR += kaidan SUBDIR += kopete SUBDIR += libaccounts-glib SUBDIR += libaccounts-qt SUBDIR += libmesode SUBDIR += libnice SUBDIR += libnice-gst1 SUBDIR += libpurple SUBDIR += libqtelegram-ae SUBDIR += libquotient SUBDIR += libsignal-client SUBDIR += libsignal-node SUBDIR += libsignon-glib SUBDIR += libstrophe SUBDIR += linux-discord SUBDIR += linux-whatsdesk SUBDIR += loudmouth SUBDIR += lurch SUBDIR += mastodon SUBDIR += matterbridge SUBDIR += matterhorn SUBDIR += matterircd SUBDIR += mbpurple SUBDIR += mcabber SUBDIR += meanwhile SUBDIR += mikutter SUBDIR += mtxclient SUBDIR += neochat SUBDIR += nextcloud-spreed-signaling SUBDIR += nextcloud-talk SUBDIR += nheko SUBDIR += openfire SUBDIR += oysttyer SUBDIR += p5-AnyEvent-XMPP SUBDIR += p5-DJabberd SUBDIR += p5-Jabber-Lite SUBDIR += p5-Jabber-SimpleSend SUBDIR += p5-Net-AOLIM SUBDIR += p5-Net-Async-XMPP SUBDIR += p5-Net-Jabber SUBDIR += p5-Net-NetSend SUBDIR += p5-Net-OSCAR SUBDIR += p5-Net-Stomp SUBDIR += p5-Net-XMPP SUBDIR += p5-Net-XMPP2 SUBDIR += p5-Protocol-XMPP SUBDIR += p5-SOAP-Transport-JABBER SUBDIR += pecl-stomp2 SUBDIR += pidgin SUBDIR += pidgin-bot-sentry SUBDIR += pidgin-fetion SUBDIR += pidgin-hotkeys SUBDIR += pidgin-latex SUBDIR += pidgin-libnotify SUBDIR += pidgin-manualsize SUBDIR += pidgin-sipe SUBDIR += pidgin-skypeweb SUBDIR += pidgin-twitter SUBDIR += pidgin-window_merge SUBDIR += profanity SUBDIR += prosody SUBDIR += prosody-modules SUBDIR += psi SUBDIR += purple-discord SUBDIR += purple-facebook SUBDIR += purple-googlechat SUBDIR += purple-gowhatsapp SUBDIR += purple-mattermost SUBDIR += purple-plugin-pack SUBDIR += purple-rocketchat SUBDIR += purple-slack SUBDIR += py-apprise SUBDIR += py-fbmq SUBDIR += py-matrix-synapse SUBDIR += py-mattermostdriver SUBDIR += py-nbxmpp SUBDIR += py-punjab SUBDIR += py-python-telegram-bot SUBDIR += py-slack-sdk SUBDIR += py-slackeventsapi SUBDIR += py-slixmpp SUBDIR += py-telepot SUBDIR += py-toxcore-c SUBDIR += py-unmessage SUBDIR += qTox SUBDIR += quaternion SUBDIR += qxmpp SUBDIR += ricochet SUBDIR += rubygem-discordrb-webhooks SUBDIR += rubygem-discordrb-webhooks-blackst0ne SUBDIR += rubygem-hipchat SUBDIR += rubygem-lita SUBDIR += rubygem-termtter SUBDIR += rubygem-tinder SUBDIR += ruqola SUBDIR += sayaka SUBDIR += scli SUBDIR += sendxmpp SUBDIR += signal-cli SUBDIR += signal-desktop SUBDIR += signald SUBDIR += slack-term SUBDIR += spectral SUBDIR += ssh-chat SUBDIR += sshout SUBDIR += talkatu SUBDIR += tdlib SUBDIR += tdlib-purple SUBDIR += telegram-cli SUBDIR += telegram-desktop SUBDIR += telegramqml SUBDIR += teleirc SUBDIR += telepathy-accounts-signon SUBDIR += telepathy-farstream SUBDIR += telepathy-gabble SUBDIR += telepathy-glib SUBDIR += telepathy-idle SUBDIR += telepathy-logger SUBDIR += telepathy-logger-qt5 SUBDIR += telepathy-mission-control SUBDIR += telepathy-qt SUBDIR += telepathy-sofiasip SUBDIR += tg_owt SUBDIR += tkabber SUBDIR += tkabber-plugins SUBDIR += tokodon SUBDIR += toot SUBDIR += tox SUBDIR += tox_extension_messages SUBDIR += toxbot SUBDIR += toxext SUBDIR += toxic SUBDIR += toxins SUBDIR += twirssi SUBDIR += uTox SUBDIR += vqcc-gtk SUBDIR += xmpp-client SUBDIR += yume SUBDIR += zkgroup SUBDIR += zoom .include diff --git a/net-im/concord/Makefile b/net-im/concord/Makefile new file mode 100644 index 000000000000..628a4052dd5c --- /dev/null +++ b/net-im/concord/Makefile @@ -0,0 +1,52 @@ +PORTNAME= concord +DISTVERSIONPREFIX= v +DISTVERSION= 2.3.0 +CATEGORIES= net-im devel + +MAINTAINER= mail@souji-thenria.net +COMMENT= Discord library written in C +WWW= https://github.com/Cogmasters/concord + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= curl>=7.56.1:ftp/curl +RUN_DEPENDS= curl>=7.56.1:ftp/curl + +USE_GITHUB= yes +GH_ACCOUNT= Cogmasters + +MAKE_ARGS= DESTINCLUDE_DIR=${STAGEDIR}${PREFIX}/include/concord \ + DESTLIBDIR=${STAGEDIR}${PREFIX}/lib + +OPTIONS_DEFINE= DEBUG_HTTP DEBUG_WEBSOCKETS EXAMPLES SIGINTCATCH +OPTIONS_DEFAULT= EXAMPLES SHARED +OPTIONS_SINGLE= TARGETS +OPTIONS_SINGLE_TARGETS= DEBUG SHARED STATIC +OPTIONS_SUB= yes + +DEBUG_HTTP_DESC= Verbose debugging for HTTP communication +DEBUG_WEBSOCKETS_DESC= Verbose debugging for WebSockets communication +SHARED_DESC= Build dynamically linked version +SIGINTCATCH_DESC= Shutdown gracefully when a SIGINT is received +STATIC_DESC= Build statically linked version + +DEBUG_VARS= ALL_TARGET=debug +DEBUG_HTTP_CFLAGS= -DCCORD_DEBUG_HTTP +DEBUG_WEBSOCKETS_CFLAGS= -DCCORD_DEBUG_WEBSOCKETS +SHARED_LIB_DEPENDS= libcurl.so:ftp/curl +SHARED_VARS= ALL_TARGET=shared +SIGINTCATCH_CFLAGS= -DCCORD_SIGINTCATCH +STATIC_VARS= ALL_TARGET=static + +post-install-EXAMPLES-on: + ${REINPLACE_CMD} -e 's|#include "\([^"]*\)\.h"|#include |; \ + s|\.\./config\.json|config.json|' ${WRKSRC}/examples/*.c + cd ${WRKSRC}/examples && ${COPYTREE_SHARE} "*.c" ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${FILESDIR}/Makefile.examples ${STAGEDIR}${EXAMPLESDIR}/Makefile + ${INSTALL_DATA} ${FILESDIR}/config.json.examples ${STAGEDIR}${EXAMPLESDIR}/config.json + +post-install-SHARED-on: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libdiscord.so + +.include diff --git a/net-im/concord/distinfo b/net-im/concord/distinfo new file mode 100644 index 000000000000..4a4b7a418c54 --- /dev/null +++ b/net-im/concord/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1726788532 +SHA256 (Cogmasters-concord-v2.3.0_GH0.tar.gz) = 3e789e6c6f9f3b5c480aaf4fb337819043c53fcce8b50966e95d7b5daef38d4d +SIZE (Cogmasters-concord-v2.3.0_GH0.tar.gz) = 775124 diff --git a/net-im/concord/files/Makefile.examples b/net-im/concord/files/Makefile.examples new file mode 100644 index 000000000000..0866c1e421d0 --- /dev/null +++ b/net-im/concord/files/Makefile.examples @@ -0,0 +1,48 @@ +CC ?= cc + +STD_BOTS = 8ball \ + audit-log \ + ban \ + cache \ + channel \ + components \ + copycat \ + embed \ + emoji \ + fetch-messages \ + guild-template \ + guild \ + invite \ + manual-dm \ + pin \ + ping-pong \ + presence \ + reaction \ + shell \ + slash-commands \ + slash-commands2 \ + spam \ + webhook \ + timers +VOICE_BOTS = voice-join + +BOTS += $(STD_BOTS) + +CFLAGS += -O0 -g -pthread -Wall -I/usr/local/include +LDFLAGS = -L/usr/local/lib +LDLIBS = -ldiscord -lcurl + +all: $(BOTS) + +voice: + @ CFLAGS=-DCCORD_VOICE BOTS=$(VOICE_BOTS) $(MAKE) + +echo: + @ echo -e 'CC: $(CC)\n' + @ echo -e 'STD_BOTS: $(STD_BOTS)\n' + @ echo -e 'VOICE_BOTS: $(VOICE_BOTS)\n' + +clean: + @ rm -f $(STD_BOTS) $(VOICE_BOTS) + +.PHONY: all echo clean diff --git a/net-im/concord/files/config.json.examples b/net-im/concord/files/config.json.examples new file mode 100644 index 000000000000..04cbe0bbe0f2 --- /dev/null +++ b/net-im/concord/files/config.json.examples @@ -0,0 +1,21 @@ +{ + "logging": { + "level": "trace", + "filename": "bot.log", + "quiet": false, + "overwrite": true, + "use_color": true, + "http": { + "enable": true, + "filename": "http.log" + }, + "disable_modules": ["WEBSOCKETS", "USER_AGENT"] + }, + "discord": { + "token": "YOUR-BOT-TOKEN", + "default_prefix": { + "enable": false, + "prefix": "YOUR-COMMANDS-PREFIX" + } + } +} diff --git a/net-im/concord/files/patch-src_Makefile b/net-im/concord/files/patch-src_Makefile new file mode 100644 index 000000000000..1b36f1549d7c --- /dev/null +++ b/net-im/concord/files/patch-src_Makefile @@ -0,0 +1,10 @@ +--- src/Makefile.orig 2024-09-20 12:42:26 UTC ++++ src/Makefile +@@ -82,7 +82,7 @@ $(SOLIB): deps + $(ARLIB): deps + $(AR) $(ARFLAGS) $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS) + $(SOLIB): deps +- $(CC) -shared -lcurl -o $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS) ++ $(CC) -shared -L$(PREFIX)/lib -lcurl -o $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS) + $(DYLIB): deps + $(CC) -dynamiclib $(DYFLAGS) -o $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS) diff --git a/net-im/concord/pkg-descr b/net-im/concord/pkg-descr new file mode 100644 index 000000000000..f9ff3432b28b --- /dev/null +++ b/net-im/concord/pkg-descr @@ -0,0 +1,3 @@ +Concord is an asynchronous C99 Discord API library with minimal external +dependencies, and a low-level translation of the Discord official documentation +to C code. diff --git a/net-im/concord/pkg-plist b/net-im/concord/pkg-plist new file mode 100644 index 000000000000..b7d737740297 --- /dev/null +++ b/net-im/concord/pkg-plist @@ -0,0 +1,84 @@ +include/concord/all.PRE.h +include/concord/anomap.h +include/concord/application_command.h +include/concord/attributes.h +include/concord/audit_log.h +include/concord/auto_moderation.h +include/concord/carray.h +include/concord/channel.h +include/concord/chash.h +include/concord/clock.h +include/concord/cog-utils.h +include/concord/concord-once.h +include/concord/curl-websocket.h +include/concord/discord-cache.h +include/concord/discord-events.h +include/concord/discord-internal.h +include/concord/discord-request.h +include/concord/discord-response.h +include/concord/discord-voice.h +include/concord/discord-worker.h +include/concord/discord.h +include/concord/discord_codecs.PRE.h +include/concord/discord_codecs.h +include/concord/emoji.h +include/concord/error.h +include/concord/gateway.h +include/concord/gencodecs-process.PRE.h +include/concord/gencodecs.h +include/concord/guild.h +include/concord/guild_scheduled_event.h +include/concord/guild_template.h +include/concord/interaction.h +include/concord/invite.h +include/concord/io_poller.h +include/concord/jsmn-find.h +include/concord/jsmn.h +include/concord/json-build.h +include/concord/log.h +include/concord/logconf.h +include/concord/oauth2.h +include/concord/osname.h +include/concord/priority_queue.h +include/concord/queriec.h +include/concord/queue.h +include/concord/sha1.h +include/concord/stage_instance.h +include/concord/sticker.h +include/concord/threadpool.h +include/concord/types.h +include/concord/user-agent.h +include/concord/user.h +include/concord/voice.h +include/concord/webhook.h +include/concord/websockets.h +%%DEBUG%%lib/libdiscord.a +%%STATIC%%lib/libdiscord.a +%%SHARED%%lib/libdiscord.so +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/8ball.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/audit-log.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ban.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cache.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/channel.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/components.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.json +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copycat.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/embed.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/emoji.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fetch-messages.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild-template.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/invite.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/manual-dm.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pin.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ping-pong.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/presence.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reaction.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shell.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands2.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/spam.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/timers.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/voice-join.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/webhook.c