Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
c695f423
Commit
c695f423
authored
2 years ago
by
David Demelier
Committed by
Michał Polański
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
testing/llhttp: upgrade to 6.0.7
parent
6819a95f
No related branches found
No related tags found
2 merge requests
!39304
[3.16] main/expat: security upgrade to 2.4.9
,
!36092
testing/llhttp: upgrade to 6.0.7
Pipeline
#127601
passed
2 years ago
Stage: lint
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testing/llhttp/APKBUILD
+3
-6
3 additions, 6 deletions
testing/llhttp/APKBUILD
testing/llhttp/soname.patch
+0
-207
0 additions, 207 deletions
testing/llhttp/soname.patch
with
3 additions
and
213 deletions
testing/llhttp/APKBUILD
+
3
−
6
View file @
c695f423
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname
=
llhttp
pkgver
=
6.0.
6
pkgver
=
6.0.
7
pkgrel
=
0
pkgdesc
=
"Port of http_parser to llparse"
url
=
"https://llhttp.org/"
...
...
@@ -9,9 +9,7 @@ license="MIT"
arch
=
"all !riscv64"
# limited by nodejs/npm
makedepends
=
"cmake clang npm"
subpackages
=
"
$pkgname
-dev
$pkgname
-doc"
source
=
"https://github.com/nodejs/llhttp/archive/v
$pkgver
/llhttp-
$pkgver
.tar.gz
soname.patch
"
source
=
"https://github.com/nodejs/llhttp/archive/v
$pkgver
/llhttp-
$pkgver
.tar.gz"
prepare
()
{
default_prepare
...
...
@@ -37,6 +35,5 @@ package() {
}
sha512sums
=
"
6d621aafcf8b0fcddfb8ceb04b69caa4c79f4b955c9548ee8616290a538fcbdd3b2f1f1d35c6609e03d49de01db2b771a60e38fd7f277dd89b5f1a0abc0c31ae llhttp-6.0.6.tar.gz
17bb4f27f4e09cda3909451f1825bbba59148b24ffc542f6bb691ce0b0167e50a91c62ed3ead97e6c7b18a67e97bfefca1939d2431e40f83a0a88090f63b1778 soname.patch
ac6f3f0f68d61f3513bd3bc960c13641f02cc28f5a35fce5db4040a63a07835bcc82fb705680dc94e516662ff68699dd7aac6be4ed9bf321d91ba8b8cf720d5b llhttp-6.0.7.tar.gz
"
This diff is collapsed.
Click to expand it.
testing/llhttp/soname.patch
deleted
100644 → 0
+
0
−
207
View file @
6819a95f
Patch-Source: https://github.com/nodejs/llhttp/pull/125
From 56a26d66afc9a918e68c96a7d3eeb807384ecd27 Mon Sep 17 00:00:00 2001
From: Jack Liar <15205739+JackLiar@users.noreply.github.com>
Date: Wed, 7 Jul 2021 20:10:14 +0800
Subject: [PATCH] enhance CMakeLists.txt
---
CMakeLists.txt | 116 +++++++++++++++++++++++++++++++++++++------------
1 file changed, 89 insertions(+), 27 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41d2000..c234222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,53 +1,115 @@
cmake_minimum_required(VERSION 3.5.1)
cmake_policy(SET CMP0069 NEW)
-project(llhttp C)
+project(llhttp VERSION 6.0.5)
+include(GNUInstallDirs)
set(CMAKE_C_STANDARD 99)
+# By default build in relwithdebinfo type, supports both lowercase and uppercase
+if(NOT CMAKE_CONFIGURATION_TYPES)
+ set(allowableBuileTypes DEBUG RELEASE RELWITHDEBINFO MINSIZEREL)
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${allowableBuileTypes}")
+ if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING "" FORCE)
+ else()
+ string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
+ if(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuileTypes)
+ message(FATEL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
+ endif()
+ endif()
+endif()
+
#
# 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)" ON)
+option(BUILD_STATIC_LIBS "Build static libraries (.lib/.a)" OFF)
# Source code
set(LLHTTP_SOURCES
- src/llhttp.c
- src/http.c
- src/api.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/llhttp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/http.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/api.c
)
set(LLHTTP_HEADERS
- include/llhttp.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/llhttp.h
)
-add_library(llhttp)
-add_library(llhttp::llhttp ALIAS llhttp)
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/libllhttp.pc.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/libllhttp.pc
+ @ONLY
+)
-target_sources(llhttp PRIVATE ${LLHTTP_SOURCES} ${LLHTTP_HEADERS})
+function(config_library target)
+ target_sources(${target} PRIVATE ${LLHTTP_SOURCES} ${LLHTTP_HEADERS})
-# On windows with Visual Studio, add a debug postfix so that release
-# and debug libraries can coexist.
-if(MSVC)
- set(CMAKE_DEBUG_POSTFIX "d")
-endif()
+ target_include_directories(${target} PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ )
-target_include_directories(llhttp PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- $<INSTALL_INTERFACE:include>
-)
+ set_target_properties(${target} PROPERTIES
+ OUTPUT_NAME llhttp
+ VERSION ${PROJECT_VERSION}
+ SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+ PUBLIC_HEADER ${LLHTTP_HEADERS}
+ )
-set_target_properties(llhttp PROPERTIES PUBLIC_HEADER ${LLHTTP_HEADERS})
+ install(TARGETS ${target}
+ EXPORT llhttp
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
-install(TARGETS llhttp
- EXPORT llhttp
- ARCHIVE DESTINATION lib
- PUBLIC_HEADER DESTINATION include/
-)
+ install(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/libllhttp.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+ )
-# This is required to work with FetchContent
-install(EXPORT llhttp
+ # This is required to work with FetchContent
+ install(EXPORT llhttp
FILE llhttp-config.cmake
NAMESPACE llhttp::
- DESTINATION lib/cmake/llhttp)
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/llhttp)
+endfunction(config_library target)
+
+if(BUILD_SHARED_LIBS)
+ add_library(llhttp_shared SHARED
+ ${llhttp_src}
+ )
+ add_library(llhttp::llhttp ALIAS llhttp_shared)
+ config_library(llhttp_shared)
+endif()
+
+if(BUILD_STATIC_LIBS)
+ add_library(llhttp_static STATIC
+ ${llhttp_src}
+ )
+ if(BUILD_SHARED_LIBS)
+ add_library(llhttp::llhttp ALIAS llhttp_shared)
+ else()
+ add_library(llhttp::llhttp ALIAS llhttp_static)
+ endif()
+ config_library(llhttp_static)
+endif()
+
+# On windows with Visual Studio, add a debug postfix so that release
+# and debug libraries can coexist.
+if(MSVC)
+ set(CMAKE_DEBUG_POSTFIX "d")
+endif()
+
+# Print project configure summary
+message(STATUS "")
+message(STATUS "")
+message(STATUS "Project configure summary:")
+message(STATUS "")
+message(STATUS " CMake build type .................: ${CMAKE_BUILD_TYPE}")
+message(STATUS " Install prefix ...................: ${CMAKE_INSTALL_PREFIX}")
+message(STATUS " Build shared library .............: ${BUILD_SHARED_LIBS}")
+message(STATUS " Build static library .............: ${BUILD_STATIC_LIBS}")
+message(STATUS "")
From d576df23f2c087da536cec1f380e80db69501d1e Mon Sep 17 00:00:00 2001
From: Jack Liar <15205739+JackLiar@users.noreply.github.com>
Date: Wed, 7 Jul 2021 21:03:17 +0800
Subject: [PATCH] add missing libllhttp.pc.in
---
libllhttp.pc.in | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 libllhttp.pc.in
diff --git a/libllhttp.pc.in b/libllhttp.pc.in
new file mode 100644
index 0000000..67d280a
--- /dev/null
+++ b/libllhttp.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
+includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: libllhttp
+Description: Node.js llhttp Library
+Version: @PROJECT_VERSION@
+Libs: -L${libdir} -lllhttp
+Cflags: -I${includedir}
Patch-Source: https://github.com/nodejs/llhttp/pull/141
From dcaea9bd4e9389b930dca61cb5e6b16be1278665 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Tue, 14 Dec 2021 09:41:35 -0500
Subject: [PATCH] Also copy libllhttp.pc.in to release directory
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 283c3d3..47f18e1 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,7 @@
release: generate
cp -rf src/llhttp.gyp release/
cp -rf src/common.gypi release/
cp -rf CMakeLists.txt release/
+ cp -rf libllhttp.pc.in release/
cp -rf README.md release/
cp -rf LICENSE-MIT release/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment