git: de41d6d018ca - main - www/cutelyst: update to 3.7.0, latest upstream

From: Adriaan de Groot <adridg_at_FreeBSD.org>
Date: Sun, 27 Nov 2022 13:43:51 UTC
The branch main has been updated by adridg:

URL: https://cgit.FreeBSD.org/ports/commit/?id=de41d6d018ca2b76fc4ef5f70e8ac91c2454a741

commit de41d6d018ca2b76fc4ef5f70e8ac91c2454a741
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2022-11-27 13:37:31 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2022-11-27 13:43:47 +0000

    www/cutelyst: update to 3.7.0, latest upstream
    
    - BSD licensed now
    - Supports Qt6 (but the port doesn't)
    - Does not support Qt5.12 (but the port didn't anyway)
    - supports epoll always
---
 www/cutelyst/Makefile                                |  5 +++--
 www/cutelyst/distinfo                                |  6 +++---
 www/cutelyst/files/patch-CMakeLists.txt              | 20 ++++++++++++++++++++
 ...h-Cutelyst_Plugins_View_Grantlee_grantleeview.cpp | 10 ----------
 .../files/patch-EventLoopEPoll_CMakeLists.txt        | 13 +++++++++++++
 www/cutelyst/files/patch-server_CMakeLists.txt       | 20 ++++++++++++++++++++
 www/cutelyst/pkg-plist                               |  3 +++
 7 files changed, 62 insertions(+), 15 deletions(-)

diff --git a/www/cutelyst/Makefile b/www/cutelyst/Makefile
index 29055cdc752c..48036f75b7f9 100644
--- a/www/cutelyst/Makefile
+++ b/www/cutelyst/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	cutelyst
 DISTVERSIONPREFIX=	v
-DISTVERSION=	3.5.0
-PORTREVISION=	1
+DISTVERSION=	3.7.0
 CATEGORIES=	www
 
 MAINTAINER=	adridg@FreeBSD.org
@@ -11,6 +10,8 @@ WWW=		https://cutelyst.org
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/COPYING
 
+LIB_DEPENDS=	libepoll-shim.so:devel/libepoll-shim
+
 USES=		cmake compiler:c++11-lang localbase qt:5
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
diff --git a/www/cutelyst/distinfo b/www/cutelyst/distinfo
index 4ab47a2e9870..abd9fdd9b85f 100644
--- a/www/cutelyst/distinfo
+++ b/www/cutelyst/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1658233255
-SHA256 (cutelyst-cutelyst-v3.5.0_GH0.tar.gz) = 351578d495213c438365f988a70bb8f8c14b1d7dcef79ce0f723dd584388aa77
-SIZE (cutelyst-cutelyst-v3.5.0_GH0.tar.gz) = 481812
+TIMESTAMP = 1669411904
+SHA256 (cutelyst-cutelyst-v3.7.0_GH0.tar.gz) = 3d3589817d813657fbdafc0c299618b1ba6aebec5c954c9c921e173e179bbea2
+SIZE (cutelyst-cutelyst-v3.7.0_GH0.tar.gz) = 482108
diff --git a/www/cutelyst/files/patch-CMakeLists.txt b/www/cutelyst/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..0d8a58fb2c2c
--- /dev/null
+++ b/www/cutelyst/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig	2022-11-27 12:59:53 UTC
++++ CMakeLists.txt
+@@ -160,7 +160,7 @@ if(UNIX AND NOT (APPLE OR HAIKU))
+     set(LINUX TRUE)
+ endif()
+ 
+-if (LINUX)
++if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+     if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+         # FreeBSD isn't Linux, but it gets claimed as Linux, because it is
+         # UNIX and not APPLE (see just above).
+@@ -179,7 +179,7 @@ if (LINUX)
+             get_filename_component(EPOLL_SYS_DIR ${EPOLL_H} DIRECTORY)
+             get_filename_component(EPOLL_DIR ${EPOLL_SYS_DIR} DIRECTORY)
+             include_directories(${EPOLL_DIR})
+-            # add_subdirectory(EventLoopEPoll)
++            add_subdirectory(EventLoopEPoll)
+         endif()
+         set(LINUX FALSE)
+     else()
diff --git a/www/cutelyst/files/patch-Cutelyst_Plugins_View_Grantlee_grantleeview.cpp b/www/cutelyst/files/patch-Cutelyst_Plugins_View_Grantlee_grantleeview.cpp
deleted file mode 100644
index 7d126fb9f246..000000000000
--- a/www/cutelyst/files/patch-Cutelyst_Plugins_View_Grantlee_grantleeview.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- Cutelyst/Plugins/View/Grantlee/grantleeview.cpp.orig	2021-06-17 11:59:52 UTC
-+++ Cutelyst/Plugins/View/Grantlee/grantleeview.cpp
-@@ -23,6 +23,7 @@
- #include "response.h"
- #include "config.h"
- 
-+#include <grantlee/metatype.h>
- #include <grantlee/qtlocalizer.h>
- 
- #include <QString>
diff --git a/www/cutelyst/files/patch-EventLoopEPoll_CMakeLists.txt b/www/cutelyst/files/patch-EventLoopEPoll_CMakeLists.txt
new file mode 100644
index 000000000000..bf69a833d8fa
--- /dev/null
+++ b/www/cutelyst/files/patch-EventLoopEPoll_CMakeLists.txt
@@ -0,0 +1,13 @@
+--- EventLoopEPoll/CMakeLists.txt.orig	2022-11-27 13:04:21 UTC
++++ EventLoopEPoll/CMakeLists.txt
+@@ -25,6 +25,10 @@ set_target_properties(Cutelyst${PROJECT_VERSION_MAJOR}
+ target_link_libraries(Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}EventLoopEpoll
+     Qt${QT_VERSION_MAJOR}::Core
+ )
++if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
++    find_package(epoll-shim REQUIRED)
++    target_link_libraries(Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}EventLoopEpoll epoll-shim::epoll-shim)
++endif()
+ 
+ install(TARGETS Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}EventLoopEpoll EXPORT CutelystTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ 
diff --git a/www/cutelyst/files/patch-server_CMakeLists.txt b/www/cutelyst/files/patch-server_CMakeLists.txt
new file mode 100644
index 000000000000..e6b3abfac30b
--- /dev/null
+++ b/www/cutelyst/files/patch-server_CMakeLists.txt
@@ -0,0 +1,20 @@
+--- server/CMakeLists.txt.orig	2022-11-27 13:00:17 UTC
++++ server/CMakeLists.txt
+@@ -91,7 +91,7 @@ target_link_libraries(Cutelyst${PROJECT_VERSION_MAJOR}
+     PRIVATE Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}::Core
+ )
+ 
+-if (LINUX)
++if (TARGET Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}::EventLoopEPoll)
+ target_link_libraries(Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}Server
+     PRIVATE Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}::EventLoopEPoll
+ )
+@@ -130,7 +130,7 @@ target_link_libraries(cutelystd
+     PRIVATE Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}::Server
+ )
+ 
+-if (LINUX)
++if (TARGET Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}::EventLoopEPoll)
+ target_link_libraries(cutelystd
+     PRIVATE Cutelyst${PROJECT_VERSION_MAJOR}Qt${QT_VERSION_MAJOR}::EventLoopEPoll
+ )
diff --git a/www/cutelyst/pkg-plist b/www/cutelyst/pkg-plist
index 78fa36f8fdcc..b42323587f37 100644
--- a/www/cutelyst/pkg-plist
+++ b/www/cutelyst/pkg-plist
@@ -133,6 +133,9 @@ lib/libCutelyst3Qt5Authentication.so.%%SOVER%%
 lib/libCutelyst3Qt5CSRFProtection.so
 lib/libCutelyst3Qt5CSRFProtection.so.3
 lib/libCutelyst3Qt5CSRFProtection.so.%%SOVER%%
+lib/libCutelyst3Qt5EventLoopEpoll.so
+lib/libCutelyst3Qt5EventLoopEpoll.so.3
+lib/libCutelyst3Qt5EventLoopEpoll.so.%%SOVER%%
 lib/libCutelyst3Qt5Server.so
 lib/libCutelyst3Qt5Server.so.3
 lib/libCutelyst3Qt5Server.so.%%SOVER%%