Hi Otto, Hi ports@,
I am working on getting rid of the use of USE_NINJA. (See Mordernize
CMake Module mail on ports@)
I can easily fix the comment issue "internal dep problem; "ninja: error:
'mruby/host/lib/libmruby.a'" by merging some fixes from upstream.
Precisely, "BYPRODUCTS" fix the issue here.
After the fix, however, the shared lib onigmo is no longer build. I
tried to fix this but I come to the conclusion that it does not need to
be build or installed at all.
FreeBSD also enable mruby but does nothing extra with onigmo. No other
BSD/Linux distro expect OpenBSD package libonigmo.
I would love to see an OK to remove it.
Rafael
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/h2o/Makefile,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 Makefile
--- Makefile 11 Mar 2022 20:09:54 -0000 1.12
+++ Makefile 1 Sep 2022 18:27:28 -0000
@@ -2,14 +2,13 @@ COMMENT = optimized HTTP server with sup
SHARED_LIBS += h2o-evloop 0.0
SHARED_LIBS += h2o 0.0
-SHARED_LIBS += onigmo 0.0 # 6.2
CATEGORIES = www
GH_ACCOUNT = h2o
GH_PROJECT = h2o
GH_TAGNAME = v2.2.6
-REVISION = 5
+REVISION = 6
HOMEPAGE = https://h2o.examp1e.net/
MAINTAINER = Otto Moerbeek <otto@drijf.net>
@@ -44,19 +43,11 @@ MODULES += lang/ruby
MODRUBY_RUNDEP = No
CONFIGURE_ARGS += -DWITH_MRUBY=ON
-# internal dep problem; "ninja: error: 'mruby/host/lib/libmruby.a',
-# needed by 'h2o', missing and no known rule to make it"
-USE_NINJA = No
-
pre-configure:
ln -sf ${RUBY} ${WRKDIR}/bin/ruby
.endif
post-install:
-.if ${FLAVOR:Mmruby}
- cd ${WRKBUILD}/mruby/host/mrbgems/mruby-onig-regexp; \
- ${INSTALL_DATA} onigmo-*/.libs/libonigmo.so.${LIBonigmo_VERSION} ${PREFIX}/lib/
-.endif
cd ${WRKSRC}/doc; pax -rw [a-z]* ${PREFIX}/share/doc/h2o/
mv ${PREFIX}/share/doc/h2o/examples ${PREFIX}/share/examples/h2o
${INSTALL_DATA} ${FILESDIR}/h2o.conf ${PREFIX}/share/examples/h2o/
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/www/h2o/patches/patch-CMakeLists_txt,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 11 Mar 2022 20:09:54 -0000 1.2
+++ patches/patch-CMakeLists_txt 1 Sep 2022 18:27:28 -0000
@@ -1,6 +1,8 @@
wslay is picked up and used if present during configure, but isn't
registered as a dependency in the libraries. disable it for now.
+mruby improvements from upstream
+
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -43,3 +45,27 @@ Index: CMakeLists.txt
IF (ZLIB_FOUND)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
+@@ -460,14 +460,21 @@ IF (WITH_MRUBY)
+ ELSE ()
+ SET(MRUBY_TOOLCHAIN "gcc")
+ ENDIF ()
+- ADD_CUSTOM_TARGET(mruby MRUBY_TOOLCHAIN=${MRUBY_TOOLCHAIN} MRUBY_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/misc/mruby_config.rb MRUBY_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}/mruby ruby minirake
+- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/deps/mruby)
++ ADD_CUSTOM_TARGET(mruby
++ # deps/mruby/tasks/toolchains/clang.rake looks for CC, CXX and LD.
++ # There are no C++ files in deps/mruby, use the C compiler for linking.
++ MRUBY_TOOLCHAIN=${MRUBY_TOOLCHAIN} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} LD=${CMAKE_C_COMPILER} MRUBY_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/misc/mruby_config.rb MRUBY_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}/mruby MRUBY_ADDITIONAL_CONFIG=${MRUBY_ADDITIONAL_CONFIG} ruby minirake
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/deps/mruby
++ BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/mruby/host/lib/libmruby.a"
++ "${CMAKE_CURRENT_BINARY_DIR}/mruby/host/mrbgems/mruby-onig-regexp/onigmo-6.1.1/.libs/libonigmo.a"
++ )
+ LIST(APPEND STANDALONE_SOURCE_FILES
+ lib/handler/mruby.c
+ lib/handler/mruby/chunked.c
+ lib/handler/mruby/http_request.c
+ lib/handler/configurator/mruby.c)
+ SET(STANDALONE_COMPILE_FLAGS "${STANDALONE_COMPILE_FLAGS} -DH2O_USE_MRUBY=1")
++ SET_PROPERTY(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/mruby/)
+ ENDIF (WITH_MRUBY)
+ IF (WITH_PICOTLS)
+ LIST(APPEND STANDALONE_SOURCE_FILES ${PICOTLS_SOURCE_FILES})
Index: pkg/PFRAG.mruby
===================================================================
RCS file: /cvs/ports/www/h2o/pkg/PFRAG.mruby,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 PFRAG.mruby
--- pkg/PFRAG.mruby 11 Mar 2022 20:09:54 -0000 1.2
+++ pkg/PFRAG.mruby 1 Sep 2022 18:27:28 -0000
@@ -1,4 +1,3 @@
-@lib lib/libonigmo.so.${LIBonigmo_VERSION}
share/examples/h2o/h2o_mruby/
share/examples/h2o/h2o_mruby/h2o.conf
share/examples/h2o/h2o_mruby/hello.rb
No comments:
Post a Comment