diff --git a/net-im/concord/Makefile b/net-im/concord/Makefile index 91919838e58a..a1d74c3fc4d8 100644 --- a/net-im/concord/Makefile +++ b/net-im/concord/Makefile @@ -1,53 +1,55 @@ PORTNAME= concord DISTVERSIONPREFIX= v DISTVERSION= 2.3.0 +PORTREVISION= 1 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 LIB_DEPENDS= libcurl.so:ftp/curl USE_GITHUB= yes GH_ACCOUNT= Cogmasters USE_LDCONFIG= yes MAKE_ARGS= DESTINCLUDE_DIR=${STAGEDIR}${PREFIX}/include/concord \ - DESTLIBDIR=${STAGEDIR}${PREFIX}/lib + DESTLIBDIR=${STAGEDIR}${PREFIX}/lib \ + ABIVERSION=1 # This is for the soname value MAKE_JOBS_UNSAFE= yes OPTIONS_DEFINE= DEBUG DEBUG_HTTP DEBUG_WEBSOCKETS EXAMPLES SIGINTCATCH OPTIONS_DEFAULT= EXAMPLES OPTIONS_SUB= yes DEBUG_HTTP_DESC= Verbose debugging for HTTP communication DEBUG_WEBSOCKETS_DESC= Verbose debugging for WebSockets communication SIGINTCATCH_DESC= Shutdown gracefully when a SIGINT is received DEBUG_VARS= ALL_TARGET=debug DEBUG_HTTP_CFLAGS= -DCCORD_DEBUG_HTTP DEBUG_WEBSOCKETS_CFLAGS= -DCCORD_DEBUG_WEBSOCKETS EXAMPLES_USES= localbase:ldflags EXAMPLES_VARS= ALL_TARGET=examples SIGINTCATCH_CFLAGS= -DCCORD_SIGINTCATCH post-patch-EXAMPLES-on: ${REINPLACE_CMD} -e 's|\.\./config\.json|config.json|' ${WRKSRC}/examples/*.c post-install-DEBUG-off: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libdiscord.so post-install-EXAMPLES-on: ${REINPLACE_CMD} -e 's|#include "\([^"]*\)\.h"|#include |' \ ${WRKSRC}/examples/*.c cd ${WRKSRC}/examples && ${COPYTREE_SHARE} "*.c" ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples && ${COPYTREE_BIN} "*" ${STAGEDIR}${EXAMPLESDIR} \ '! -name Makefile ! -name *\.bak ! -name *\.c ! -name *\.orig' ${INSTALL_DATA} ${FILESDIR}/Makefile.examples ${STAGEDIR}${EXAMPLESDIR}/Makefile ${INSTALL_DATA} ${FILESDIR}/config.json.examples ${STAGEDIR}${EXAMPLESDIR}/config.json .include diff --git a/net-im/concord/files/patch-Makefile b/net-im/concord/files/patch-Makefile index eff7f8b40ecd..fdfeb8eb25eb 100644 --- a/net-im/concord/files/patch-Makefile +++ b/net-im/concord/files/patch-Makefile @@ -1,11 +1,27 @@ --- Makefile.orig 2024-05-06 23:04:41 UTC +++ Makefile @@ -20,7 +20,7 @@ CFLAGS ?= -O2 CFLAGS ?= -O2 -all: static +all: shared static static: @ CFLAGS="$(CFLAGS)" $(MAKE) -C $(CORE_DIR) +@@ -40,6 +40,7 @@ install: + @ mkdir -p $(DESTINCLUDE_DIR) + install -d $(DESTLIBDIR) + install -m 644 $(LIBDIR)/* $(DESTLIBDIR) ++ ln -fs libdiscord.so.$(ABIVERSION) $(DESTLIBDIR)/libdiscord.so + install -d $(DESTINCLUDE_DIR) + install -m 644 $(INCLUDE_DIR)/*.h $(CORE_DIR)/*.h $(GENCODECS_DIR)/*.h \ + $(DESTINCLUDE_DIR) +@@ -48,6 +49,7 @@ uninstall: + rm -rf $(PREFIX)/include/concord + rm -rf $(PREFIX)/lib/libdiscord.a + rm -rf $(PREFIX)/lib/libdiscord.so ++ rm -rf $(PREFIX)/lib/libdiscord.so.$(ABIVERSION) + rm -rf $(PREFIX)/lib/libdiscord.dylib + + docs: diff --git a/net-im/concord/files/patch-src_Makefile b/net-im/concord/files/patch-src_Makefile index 5eb202b4c985..88597041132f 100644 --- a/net-im/concord/files/patch-src_Makefile +++ b/net-im/concord/files/patch-src_Makefile @@ -1,11 +1,20 @@ --- src/Makefile.orig 2024-05-06 23:04:41 UTC +++ src/Makefile +@@ -60,7 +60,7 @@ ARLIB = $(LIBDIR)/libdiscord.a + -I$(INCLUDE_DIR) -I$(CORE_DIR) -I$(GENCODECS_DIR) -I$(PREFIX)/include + + ARLIB = $(LIBDIR)/libdiscord.a +-SOLIB = $(LIBDIR)/libdiscord.so ++SOLIB = $(LIBDIR)/libdiscord.so.$(ABIVERSION) + DYLIB = $(LIBDIR)/libdiscord.dylib + + ARFLAGS = -cqsv @@ -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) ++ $(CC) -shared -Wl,-soname,libdiscord.so.$(ABIVERSION) -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-plist b/net-im/concord/pkg-plist index 596c4b40d1d6..3ff60e7ffb56 100644 --- a/net-im/concord/pkg-plist +++ b/net-im/concord/pkg-plist @@ -1,108 +1,108 @@ 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 lib/libdiscord.a lib/libdiscord.so +lib/libdiscord.so.1 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/8ball %%PORTEXAMPLES%%%%EXAMPLESDIR%%/8ball.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile %%PORTEXAMPLES%%%%EXAMPLESDIR%%/audit-log %%PORTEXAMPLES%%%%EXAMPLESDIR%%/audit-log.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/ban %%PORTEXAMPLES%%%%EXAMPLESDIR%%/ban.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/cache %%PORTEXAMPLES%%%%EXAMPLESDIR%%/cache.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/channel %%PORTEXAMPLES%%%%EXAMPLESDIR%%/channel.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/components %%PORTEXAMPLES%%%%EXAMPLESDIR%%/components.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.json %%PORTEXAMPLES%%%%EXAMPLESDIR%%/copycat %%PORTEXAMPLES%%%%EXAMPLESDIR%%/copycat.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/embed %%PORTEXAMPLES%%%%EXAMPLESDIR%%/embed.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/emoji %%PORTEXAMPLES%%%%EXAMPLESDIR%%/emoji.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/fetch-messages %%PORTEXAMPLES%%%%EXAMPLESDIR%%/fetch-messages.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild %%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild-template %%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild-template.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/guild.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/invite %%PORTEXAMPLES%%%%EXAMPLESDIR%%/invite.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/manual-dm %%PORTEXAMPLES%%%%EXAMPLESDIR%%/manual-dm.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/pin %%PORTEXAMPLES%%%%EXAMPLESDIR%%/pin.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/ping-pong %%PORTEXAMPLES%%%%EXAMPLESDIR%%/ping-pong.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/presence %%PORTEXAMPLES%%%%EXAMPLESDIR%%/presence.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reaction %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reaction.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/shell %%PORTEXAMPLES%%%%EXAMPLESDIR%%/shell.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands %%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands2 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/slash-commands2.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/spam %%PORTEXAMPLES%%%%EXAMPLESDIR%%/spam.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/timers %%PORTEXAMPLES%%%%EXAMPLESDIR%%/timers.c -@comment %%PORTEXAMPLES%%%%EXAMPLESDIR%%/voice-join %%PORTEXAMPLES%%%%EXAMPLESDIR%%/voice-join.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/webhook %%PORTEXAMPLES%%%%EXAMPLESDIR%%/webhook.c