From owner-dev-commits-ports-main@freebsd.org Tue Sep 21 03:49:43 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB3BF6B27FB; Tue, 21 Sep 2021 03:49:43 +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 4HD6r65KMFz4dB4; Tue, 21 Sep 2021 03:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 79FCA1CD58; Tue, 21 Sep 2021 03:49:39 +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 18L3ndlF018386; Tue, 21 Sep 2021 03:49:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18L3nds9018385; Tue, 21 Sep 2021 03:49:39 GMT (envelope-from git) Date: Tue, 21 Sep 2021 03:49:39 GMT Message-Id: <202109210349.18L3nds9018385@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 97fdd544cdf2 - main - www/llhttp: Build and install static library MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97fdd544cdf23c665a716e49254826a4b3d5dda1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 03:49:44 -0000 The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=97fdd544cdf23c665a716e49254826a4b3d5dda1 commit 97fdd544cdf23c665a716e49254826a4b3d5dda1 Author: Po-Chuan Hsieh AuthorDate: 2021-09-21 03:09:40 +0000 Commit: Po-Chuan Hsieh CommitDate: 2021-09-21 03:43:56 +0000 www/llhttp: Build and install static library - Bump PORTREVISION for package change --- www/llhttp/Makefile | 1 + www/llhttp/files/CMakeLists.txt | 13 ++++++++++++- www/llhttp/pkg-plist | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/www/llhttp/Makefile b/www/llhttp/Makefile index 10a9a89581d1..8e6de18aa8ff 100644 --- a/www/llhttp/Makefile +++ b/www/llhttp/Makefile @@ -3,6 +3,7 @@ PORTNAME= llhttp PORTVERSION= 6.0.4 DISTVERSIONPREFIX= release/v +PORTREVISION= 1 CATEGORIES= www MAINTAINER= sunpoet@FreeBSD.org diff --git a/www/llhttp/files/CMakeLists.txt b/www/llhttp/files/CMakeLists.txt index 41d2000e993d..2a3bb13a0028 100644 --- a/www/llhttp/files/CMakeLists.txt +++ b/www/llhttp/files/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_C_STANDARD 99) # Options # # Generic option -option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) +#option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) # Source code set(LLHTTP_SOURCES @@ -23,9 +23,11 @@ set(LLHTTP_HEADERS ) add_library(llhttp) +add_library(llhttp_static STATIC) add_library(llhttp::llhttp ALIAS llhttp) target_sources(llhttp PRIVATE ${LLHTTP_SOURCES} ${LLHTTP_HEADERS}) +target_sources(llhttp_static PRIVATE ${LLHTTP_SOURCES} ${LLHTTP_HEADERS}) # On windows with Visual Studio, add a debug postfix so that release # and debug libraries can coexist. @@ -37,14 +39,23 @@ target_include_directories(llhttp PUBLIC $ $ ) +target_include_directories(llhttp_static PUBLIC + $ + $ +) + set_target_properties(llhttp PROPERTIES PUBLIC_HEADER ${LLHTTP_HEADERS}) +set_target_properties(llhttp_static PROPERTIES OUTPUT_NAME llhttp) install(TARGETS llhttp EXPORT llhttp ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/ ) +install(TARGETS llhttp_static + ARCHIVE DESTINATION lib +) # This is required to work with FetchContent install(EXPORT llhttp diff --git a/www/llhttp/pkg-plist b/www/llhttp/pkg-plist index 2566db4a9842..d255355fd6c5 100644 --- a/www/llhttp/pkg-plist +++ b/www/llhttp/pkg-plist @@ -1,4 +1,5 @@ include/llhttp.h lib/cmake/llhttp/llhttp-config-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/llhttp/llhttp-config.cmake +lib/libllhttp.a lib/libllhttp.so