From nobody Mon Sep 30 20:40:43 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHXyh20fHz5Xdnt; Mon, 30 Sep 2024 20:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHXyh0HFlz4J9v; Mon, 30 Sep 2024 20:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727728844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g1VVcsx1EkvDu35PeHoAD32H15jk5orlAzogXEvuDYI=; b=FAtr34+ahnW0CUnGS7uzZe1+Mi9nKNWb6dUyVwkRFdLGeU7l/YjchtviBI0OpEbYIksD4H tHlr0amDAiwF4LSrg0SKH86kml53BXrGY81GvS1re/hei5NcthyU0ZSvnKiMB87hU5gMIg i+Y9kcGbu30gZ3xY5xYfn55C79ub0vzlNNtAtdK28y/fO1+mkxs0vphR6g/odYDCzK/8cX Px9E+SYSYk+XCiLKNGrXPlZ1ZzBrSnye0ASthhEOmKR0SGtsRxX8Y2PhYDlmkfytd5fHAL sAFhTGX2PRDwacH3N61m9iDoSsEU196MxbtMl6aL+OLKIUTPGM5vmUj9vwK8Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727728844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g1VVcsx1EkvDu35PeHoAD32H15jk5orlAzogXEvuDYI=; b=Avzkk7olzR9kOk04qP284yIjAp8PB70y6nNYydFAjiJ0/QQV3LBj9I4CVs8XE9uc1NfNht taB2hFTz2igLPu/vXGaMiC1sT9psgh10REKeBBgcfCuKPNKUvEcPhRdYKWGla80Uub4EYD uyouUcFsX4Rsdm+4eBU6QrquHXNdsUofdwZpMBrDhxCLQsdLBrMkoAiQPR8U3bN/bIci7p 49iTsx1IV2lHdQUqI1nz4LgRThrjgBaZ9SQ8TdAA0KEU527cIS6kqa43ZXM6zzN1no1sHA eFpYWE3My6kVlZgFm4vXYAGrLgvavgWqeZBCLBvUWbtv//hSSyx+3vJlwdmR2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727728844; a=rsa-sha256; cv=none; b=k2noFeflVa50b6G0WdH7TV9+OgeICWdu2NSyq7F6rMckdMjhCteWWb6n+GiqW0NYjCL4Xy XA8uwN5wpg/wGR6ZziTnf/Ra0lUo4GpYgOogT8CQsEFi6B8AzGxsZFhrvzOT7XpSeuOFU3 LnlsNt9gFr8t9aWF7xLkL00Bzxte7nOU/R6ccbkKGVIGNuB8tCIxXPrN+Rj9BNMd/+IJCm gb2B7FMH8GbU5OMMOCOYsKk6VU6hNq/MPtxnDrIUv3vhfrcBmvmFJykx6Ib8xkNabYmJHm dWgIq2zq8tP5pGOlqenog1N7XlXGjzn9N96vvbPz2u7Hpd8lx+DqSbAS3lTDLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHXyg5lMZz17Kq; Mon, 30 Sep 2024 20:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48UKehqT050025; Mon, 30 Sep 2024 20:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48UKeh92050022; Mon, 30 Sep 2024 20:40:43 GMT (envelope-from git) Date: Mon, 30 Sep 2024 20:40:43 GMT Message-Id: <202409302040.48UKeh92050022@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: 27e816ac013a - main - net-im/concord: Improve port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27e816ac013a9cb938481342c26d3398b04453f9 Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=27e816ac013a9cb938481342c26d3398b04453f9 commit 27e816ac013a9cb938481342c26d3398b04453f9 Author: Vladimir Druzenko AuthorDate: 2024-09-30 20:31:42 +0000 Commit: Vladimir Druzenko CommitDate: 2024-09-30 20:40:33 +0000 net-im/concord: Improve port - Add USE_LDCONFIG - port installs .so library. - Allow build both shared and static libraries at same time. - Prebuild examples. PR: 279553 Approved by: Souji Thenria --- net-im/concord/Makefile | 35 ++++++++++++++-------------- net-im/concord/files/patch-Makefile | 11 +++++++++ net-im/concord/files/patch-examples_Makefile | 11 +++++++++ net-im/concord/files/patch-src_Makefile | 7 +++--- net-im/concord/pkg-plist | 30 +++++++++++++++++++++--- 5 files changed, 71 insertions(+), 23 deletions(-) diff --git a/net-im/concord/Makefile b/net-im/concord/Makefile index 628a4052dd5c..91919838e58a 100644 --- a/net-im/concord/Makefile +++ b/net-im/concord/Makefile @@ -10,43 +10,44 @@ 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 +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 +MAKE_JOBS_UNSAFE= yes -OPTIONS_DEFINE= DEBUG_HTTP DEBUG_WEBSOCKETS EXAMPLES SIGINTCATCH -OPTIONS_DEFAULT= EXAMPLES SHARED -OPTIONS_SINGLE= TARGETS -OPTIONS_SINGLE_TARGETS= DEBUG SHARED STATIC +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 -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 +EXAMPLES_USES= localbase:ldflags +EXAMPLES_VARS= ALL_TARGET=examples SIGINTCATCH_CFLAGS= -DCCORD_SIGINTCATCH -STATIC_VARS= ALL_TARGET=static + +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 |; \ - s|\.\./config\.json|config.json|' ${WRKSRC}/examples/*.c + ${REINPLACE_CMD} -e 's|#include "\([^"]*\)\.h"|#include |' \ + ${WRKSRC}/examples/*.c cd ${WRKSRC}/examples && ${COPYTREE_SHARE} "*.c" ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${FILESDIR}/Makefile.examples ${STAGEDIR}${EXAMPLESDIR}/Makefile + 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 -post-install-SHARED-on: - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libdiscord.so - .include diff --git a/net-im/concord/files/patch-Makefile b/net-im/concord/files/patch-Makefile new file mode 100644 index 000000000000..eff7f8b40ecd --- /dev/null +++ b/net-im/concord/files/patch-Makefile @@ -0,0 +1,11 @@ +--- 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) diff --git a/net-im/concord/files/patch-examples_Makefile b/net-im/concord/files/patch-examples_Makefile new file mode 100644 index 000000000000..9a6e0ef3190e --- /dev/null +++ b/net-im/concord/files/patch-examples_Makefile @@ -0,0 +1,11 @@ +--- examples/Makefile.orig 2024-09-22 09:38:52 UTC ++++ examples/Makefile +@@ -36,7 +36,7 @@ CFLAGS += -O0 -g -pthread -Wall \ + + CFLAGS += -O0 -g -pthread -Wall \ + -I$(INCLUDE_DIR) -I$(CORE_DIR) -I$(GENCODECS_DIR) +-LDFLAGS = -L$(TOP)/lib ++LDFLAGS += -L$(TOP)/lib + LDLIBS = -ldiscord -lcurl + + all: $(BOTS) diff --git a/net-im/concord/files/patch-src_Makefile b/net-im/concord/files/patch-src_Makefile index 1b36f1549d7c..5eb202b4c985 100644 --- a/net-im/concord/files/patch-src_Makefile +++ b/net-im/concord/files/patch-src_Makefile @@ -1,10 +1,11 @@ ---- src/Makefile.orig 2024-09-20 12:42:26 UTC +--- src/Makefile.orig 2024-05-06 23:04:41 UTC +++ src/Makefile @@ -82,7 +82,7 @@ $(SOLIB): deps $(ARLIB): deps - $(AR) $(ARFLAGS) $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS) + $(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) + $(CC) -dynamiclib $(DYFLAGS) -o $@ $(OBJS) $(GENCODECS_OBJ) $(CORE_OBJS) + diff --git a/net-im/concord/pkg-plist b/net-im/concord/pkg-plist index b7d737740297..596c4b40d1d6 100644 --- a/net-im/concord/pkg-plist +++ b/net-im/concord/pkg-plist @@ -52,33 +52,57 @@ 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 +lib/libdiscord.a +lib/libdiscord.so +%%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