Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nghttp3: add new package #22443

Merged
merged 1 commit into from
Oct 26, 2023
Merged

nghttp3: add new package #22443

merged 1 commit into from
Oct 26, 2023

Conversation

stangri
Copy link
Member

@stangri stangri commented Oct 18, 2023

Maintainer: me
Compile tested: x86_64, Sophos XG-135r3, OpenWrt 23.05.0
Run tested: x86_64, Sophos XG-135r3, OpenWrt 23.05.0

Description:

  • add new package to allow building of curl with HTTP/3 support

PS. I'd like to solicit feedback on cherry-picking it for 23.05 as well.

libs/nghttp3/Makefile Outdated Show resolved Hide resolved
stangri added a commit to stangri/packages that referenced this pull request Oct 18, 2023
* these changes along with 2 PRs below and using non-standard
  openssl library allow for building curl with HTTP/3 support
* openwrt#22443
* openwrt#22444

Signed-off-by: Stan Grishin <stangri@melmac.ca>
Copy link
Member

@BKPepe BKPepe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks simple, understandable, thanks!

@neheb maybe there can be added PKG_BUILD_PARALLEL as well?

@BKPepe BKPepe requested a review from neheb October 22, 2023 11:04
@stangri
Copy link
Member Author

stangri commented Oct 22, 2023

@BKPepe @neheb -- your thoughts on cherry-picking it for 23.05?

@BKPepe
Copy link
Member

BKPepe commented Oct 22, 2023 via email

@1715173329
Copy link
Member

1715173329 commented Oct 23, 2023

Upstream supports CMake as well, would be nice to use it. (the same for ngtcp2)

@stangri
Copy link
Member Author

stangri commented Oct 23, 2023

Upstream supports CMake as well, would be nice to use it. (the same for ngtcp2)

I've had limited experience/exposure with the Makefiles. Is it just a matter of adding include $(INCLUDE_DIR)/cmake.mk just below the package.mk include?

If not, do you want to take over maintainership of these two libs and make necessary changes (either before or after this is merged)?

@1715173329
Copy link
Member

I've had limited experience/exposure with the Makefiles. Is it just a matter of adding include $(INCLUDE_DIR)/cmake.mk just below the package.mk include?

Basically yes.

diff --git a/libs/nghttp3/Makefile b/libs/nghttp3/Makefile
index 8ee97b3e84..29ecf73d27 100644
--- a/libs/nghttp3/Makefile
+++ b/libs/nghttp3/Makefile
@@ -12,10 +12,10 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
 
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libnghttp3
   SECTION:=libs
@@ -28,15 +28,7 @@ define Package/libnghttp3/description
  nghttp3 is a thin HTTP/3 layer over an underlying QUIC stack.
 endef
 
-CONFIGURE_ARGS += --enable-lib-only
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/usr/include/nghttp3
-	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/nghttp3/*.h $(1)/usr/include/nghttp3/
-	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
-	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnghttp3.so* $(1)/usr/lib/
-endef
+CMAKE_OPTIONS += -DENABLE_LIB_ONLY=ON
 
 define Package/libnghttp3/install
 	$(INSTALL_DIR) $(1)/usr/lib
  • PKG_FIXUP: it's only used by autotools
  • PKG_INSTALL/PKG_BUILD_PARALLEL: cmake enables them by default
  • CMAKE_INSTALL: copy all dev files to staging dir (this replaces Build/InstallDev)
  • CONFIGURE_ARGS: replaced by CMAKE_OPTIONS

* add new package to allow building of curl with HTTP/3 support
* switch to using cmake

Signed-off-by: Stan Grishin <stangri@melmac.ca>
@stangri stangri merged commit a2c2035 into openwrt:master Oct 26, 2023
12 checks passed
stangri added a commit to stangri/packages that referenced this pull request Oct 26, 2023
* these changes along with 2 PRs below and using non-standard
  openssl library allow for building curl with HTTP/3 support
* openwrt#22443
* openwrt#22444

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 6bd2b89)
stangri added a commit to stangri/packages that referenced this pull request Oct 26, 2023
* these changes along with 2 PRs below and using non-standard
  openssl library allow for building curl with HTTP/3 support
* openwrt#22443
* openwrt#22444

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 6bd2b89)
jmv2009 pushed a commit to jmv2009/packages that referenced this pull request Oct 27, 2023
* these changes along with 2 PRs below and using non-standard
  openssl library allow for building curl with HTTP/3 support
* openwrt#22443
* openwrt#22444

Signed-off-by: Stan Grishin <stangri@melmac.ca>
@stangri stangri deleted the master-nghttp3 branch November 27, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants