From nobody Wed Feb 22 01:52:38 2023 X-Original-To: dev-commits-ports-all@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 4PLzgV4mgJz3tn24; Wed, 22 Feb 2023 01:52:38 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PLzgV3s45z3NcS; Wed, 22 Feb 2023 01:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677030758; 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=o+JckSkJnZb+a/MXp+KH9RHOCiUUVS2Ja6XdksHZibQ=; b=NvgXGbBTnRTKhu10tBDVWbZzARWYCiwTAdI3VIsntm+1brnm9E7FD/iFmlejRWAWMj0RZi KdGTDR6a3eiabwZhlvZqoMrcZ69ptXGApdMEKYXbAJChAo9kIT9St72n2oRxkgIWR7jZhI 1kENDkytxrBtWL2Zg65iWuRJDiPXcJaiknXvTniuOqnFsFItvfWag8jNCollZ6etiQI5b3 9acZaTtHPHL2BtyT+lP1xFk/Ng2WzyCxghDiw6+RVuAGFdGG8tb9IRPGnpqQdUKowU6C7+ M/iTakxdaK0NuruqhQBb/81QQjBnx2EeVlNRWF+4c+b4/OGEDTAkKdWhMeQ0Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677030758; 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=o+JckSkJnZb+a/MXp+KH9RHOCiUUVS2Ja6XdksHZibQ=; b=m3PwQzg2qyd5sjryTsgNPVWtyxNKh2hKELMauBFobdThKbY7YVkq9TIdseZTux/xFg6A5r iLOiksAzV/hXLk2E2CraBrUUVk1RYWD7ZZs5ixghLetldVI2maEsQ/sQPlP8jowlTTUBEA UJdfiYdxqpBrtXzA/sDUxvBsfJWSDKR9wA3x8aUylZpGUR5o1gEfTI9XeOIOk3310+veku K5OzXuLZdAFHj2+iF1ghwvj9DI8j7SFw0XPL7nUnqFbFwqZAebvdXDDxD6j7GJrW1V084R CkeXSy2bUR5sulL9kVmg2VebwRijT3/dG06k8yXUWYZ7bY3wd7sByF2wEQ1d/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677030758; a=rsa-sha256; cv=none; b=Bx5QNVkb2Lwumn0M62gmXmNNoZBalDa91XIE0xPKPvuE0lRYDhpo2urfQgb9KciPFmvyFy 5alBDhKKBa1DsrtqOocGVq+41QrAgycKmvz0d7ubqoP1pwDQ5MmZyCFJ53wAV9Wk19tGBL vgx8Q0EfUPaBWrg56S1rii744oWoKvMhmtQpJhWfMwJsRJtzklTnzWB+UPaXYWJx12uS/P Gce3WvtY8xumRWEx1PxoMl/EZWVPfZr/JsUMADZbxEeG4FFQUc73/RGV4wWeSqbhn2Yu0M uOc/9s2/yv3chGUF4uwy33rBHqzdHBksvB4Tei2IPzYATcyBO2NPr+i+QKZ98Q== 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 4PLzgV2bLQzjss; Wed, 22 Feb 2023 01:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31M1qcSn039481; Wed, 22 Feb 2023 01:52:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31M1qcnR039480; Wed, 22 Feb 2023 01:52:38 GMT (envelope-from git) Date: Wed, 22 Feb 2023 01:52:38 GMT Message-Id: <202302220152.31M1qcnR039480@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 35c73981e5fd - main - sysutils/ttyd: Only link with shared library List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35c73981e5fdb1f9aee2cfbc75e9cc23857459e6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=35c73981e5fdb1f9aee2cfbc75e9cc23857459e6 commit 35c73981e5fdb1f9aee2cfbc75e9cc23857459e6 Author: Daniel Engberg AuthorDate: 2023-02-22 01:45:23 +0000 Commit: Daniel Engberg CommitDate: 2023-02-22 01:45:27 +0000 sysutils/ttyd: Only link with shared library Due to how upstream handles libraries ttyd picks up both static and shared library of libwebsockets which is not intended. The least intrusive way I found is to simply detect it using pkgconfig instead. While at it, disable check for git to determine version. Reported by: Jeff Schmidt Approved by: portmgr (blanket, build fix) --- sysutils/ttyd/Makefile | 2 ++ sysutils/ttyd/files/patch-CMakeLists.txt | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/sysutils/ttyd/Makefile b/sysutils/ttyd/Makefile index cb2fcce0f954..fdb1ab2c5aaf 100644 --- a/sysutils/ttyd/Makefile +++ b/sysutils/ttyd/Makefile @@ -18,6 +18,8 @@ USES= cmake pkgconfig ssl USE_GITHUB= yes GH_ACCOUNT= tsl0922 +CMAKE_ARGS= -DCMAKE_DISABLE_FIND_PACKAGE_Git:BOOL=True + PLIST_FILES= bin/${PORTNAME} \ share/man/man1/ttyd.1.gz diff --git a/sysutils/ttyd/files/patch-CMakeLists.txt b/sysutils/ttyd/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..72c238549302 --- /dev/null +++ b/sysutils/ttyd/files/patch-CMakeLists.txt @@ -0,0 +1,20 @@ +--- CMakeLists.txt.orig 2023-01-18 03:42:54 UTC ++++ CMakeLists.txt +@@ -58,11 +58,15 @@ if(JSON-C_FOUND) + SET(JSON-C_LIBRARIES "${JSON-C_LIBRARY}") + endif() + ++find_package(PkgConfig REQUIRED) + find_package(ZLIB REQUIRED) +-find_package(Libwebsockets 3.2.0 REQUIRED) ++pkg_search_module(LIBWEBSOCKETS REQUIRED libwebsockets>=3.2.0) ++if(LIBWEBSOCKETS_FOUND) ++ message(STATUS "Found LIBWEBSOCKETS: ${LIBWEBSOCKETS_LINK_LIBRARIES} - Version: ${LIBWEBSOCKETS_VERSION}") ++endif() + + set(INCLUDE_DIRS ${ZLIB_INCLUDE_DIR} ${LIBWEBSOCKETS_INCLUDE_DIRS} ${JSON-C_INCLUDE_DIRS} ${LIBUV_INCLUDE_DIRS}) +-set(LINK_LIBS ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES} ${JSON-C_LIBRARIES} ${LIBUV_LIBRARIES}) ++set(LINK_LIBS ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LINK_LIBRARIES} ${JSON-C_LIBRARIES} ${LIBUV_LIBRARIES}) + + set (CMAKE_REQUIRED_INCLUDES ${INCLUDE_DIRS}) + include(CheckSymbolExists)