On Thu, Jan 05, 2023 at 03:24:05PM -0500, Brad Smith wrote: > Here is an update to lighttpd 1.4.68. > > Also a conversion to using CMake and I noticed there was PostgreSQL > support so added that as well. > > https://www.lighttpd.net/2023/1/3/1.4.68/
Send proper up to date diff. Index: Makefile =================================================================== RCS file: /home/cvs/ports/www/lighttpd/Makefile,v retrieving revision 1.172 diff -u -p -u -p -r1.172 Makefile --- Makefile 8 Nov 2022 11:17:18 -0000 1.172 +++ Makefile 5 Jan 2023 20:31:07 -0000 @@ -1,10 +1,9 @@ COMMENT= secure, fast, compliant, and very flexible web-server -DISTNAME= lighttpd-1.4.67 +DISTNAME= lighttpd-1.4.68 CATEGORIES= www net MASTER_SITES= https://download.lighttpd.net/lighttpd/releases-1.4.x/ EXTRACT_SUFX= .tar.xz -REVISION= 0 HOMEPAGE= https://www.lighttpd.net/ @@ -15,42 +14,45 @@ PERMIT_PACKAGE= Yes WANTLIB= c crypto m pcre2-8 ssl z ${MODLUA_WANTLIB} -COMPILER= base-clang ports-gcc base-gcc +COMPILER= base-clang ports-gcc -MODULES= lang/lua +MODULES= devel/cmake \ + lang/lua MODLUA_SA= Yes LIB_DEPENDS+= devel/pcre2 \ ${MODLUA_LIB_DEPENDS} RUN_DEPENDS+= www/spawn-fcgi -LIBTOOL_FLAGS= --tag=disable-static -CONFIGURE_STYLE= gnu -CONFIGURE_ARGS+= --libdir="${PREFIX}/lib/lighttpd" \ - --with-lua \ - --with-openssl -CONFIGURE_ENV+= CC_FOR_BUILD="${CC}" \ - CFLAGS_FOR_BUILD="${CFLAGS}" \ - CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" \ - LUA_CFLAGS="`pkg-config --cflags ${MODLUA_DEP}`" \ - LUA_LIBS="`pkg-config --libs ${MODLUA_DEP}`" +CONFIGURE_ARGS+=-DWITH_LUA=ON \ + -DWITH_LUA_VERSION=${MODLUA_DEP} \ + -DWITH_OPENSSL=ON +CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" -FLAVORS= ldap mysql +FLAVORS= ldap mysql pgsql FLAVOR?= .if ${FLAVOR:Mldap} -CONFIGURE_ARGS+= --with-ldap +CONFIGURE_ARGS+= -DWITH_LDAP=ON LIB_DEPENDS+= databases/openldap WANTLIB+= lber ldap sasl2 .endif .if ${FLAVOR:Mmysql} -CONFIGURE_ARGS+= --with-mysql +CONFIGURE_ARGS+= -DWITH_MYSQL=ON LIB_DEPENDS+= databases/mariadb -WANTLIB+= mariadb pthread +WANTLIB+= mariadb .endif +.if ${FLAVOR:Mpgsql} +CONFIGURE_ARGS+= -DWITH_PGSQL=ON +LIB_DEPENDS+= databases/postgresql +WANTLIB+= pq +.endif + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + post-extract: @cp -f ${FILESDIR}/lighttpd.conf ${WRKSRC}/doc @@ -70,6 +72,5 @@ post-install: ${PREFIX}/share/examples/lighttpd/access.log ${INSTALL_DATA} /dev/null \ ${PREFIX}/share/examples/lighttpd/error.log - rm -f ${PREFIX}/lib/lighttpd/*.la .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /home/cvs/ports/www/lighttpd/distinfo,v retrieving revision 1.70 diff -u -p -u -p -r1.70 distinfo --- distinfo 4 Oct 2022 11:34:23 -0000 1.70 +++ distinfo 4 Jan 2023 15:13:45 -0000 @@ -1,2 +1,2 @@ -SHA256 (lighttpd-1.4.67.tar.xz) = fgTXZ/UajYJLMuJIPvKVCYKSDUJ9EnLvRmf0nW+J81g= -SIZE (lighttpd-1.4.67.tar.xz) = 1039872 +SHA256 (lighttpd-1.4.68.tar.xz) = 5W83rlK2PhraTXbOeABa/7blbuova9sM4X1tNulYM4Q= +SIZE (lighttpd-1.4.68.tar.xz) = 1030612 Index: files/lighttpd.conf =================================================================== RCS file: /home/cvs/ports/www/lighttpd/files/lighttpd.conf,v retrieving revision 1.1 diff -u -p -u -p -r1.1 lighttpd.conf --- files/lighttpd.conf 18 Aug 2010 11:16:55 -0000 1.1 +++ files/lighttpd.conf 6 Jan 2023 01:01:10 -0000 @@ -22,11 +22,9 @@ server.modules = ( # "mod_evhost", # "mod_userdir", # "mod_cgi", -# "mod_compress", +# "mod_deflate", # "mod_ssi", -# "mod_usertrack", # "mod_expire", -# "mod_secdownload", # "mod_rrdtool", "mod_accesslog" ) Index: patches/patch-doc_CMakeLists_txt =================================================================== RCS file: patches/patch-doc_CMakeLists_txt diff -N patches/patch-doc_CMakeLists_txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-doc_CMakeLists_txt 5 Jan 2023 20:10:31 -0000 @@ -0,0 +1,11 @@ +[cmake] add doc/CMakeLists.txt to dist tar ball (#3181) +da8abbfad414f2f8078e0b50302d691f8b21bbe0 + +Index: doc/CMakeLists.txt +--- doc/CMakeLists.txt.orig ++++ doc/CMakeLists.txt +@@ -0,0 +1,4 @@ ++install(FILES ++ lighttpd.8 ++ lighttpd-angel.8 ++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) Index: patches/patch-src_CMakeLists_txt =================================================================== RCS file: patches/patch-src_CMakeLists_txt diff -N patches/patch-src_CMakeLists_txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_CMakeLists_txt 5 Jan 2023 20:17:28 -0000 @@ -0,0 +1,63 @@ +- [cmake] remove -I/usr/include/mysql for mysql.h (#3181) + 6ea696d1113e38ac2639074ba50b72e6a0180959 +- [cmake] add -DWITH_LUA_VERSION= to specify lua ver (#3181) + 84b4ccf89bdfa5817f1ec6328550cc7e3f52cbac +- [cmake] use mysql_config cflags and ldflags (#3181) + cc0bb8aa00c321d86a75a7f8138b4f783bac1bf3 + +Index: src/CMakeLists.txt +--- src/CMakeLists.txt.orig ++++ src/CMakeLists.txt +@@ -37,6 +37,7 @@ option(WITH_KRB5 "with Kerberos5-support for mod_auth + option(WITH_LDAP "with LDAP-support for mod_auth mod_vhostdb_ldap [default: off]") + option(WITH_PAM "with PAM-support for mod_auth [default: off]") + option(WITH_LUA "with lua for mod_magnet [default: off]") ++option(WITH_LUA_VERSION "specify lua version for mod_magnet") + # option(WITH_VALGRIND "with internal support for valgrind [default: off]") + option(WITH_FAM "fam/gamin for reducing number of stat() calls [default: off]") + option(WITH_LIBDEFLATE "with libdeflate-support for mod_deflate [default: off]") +@@ -333,15 +334,10 @@ endif() + + if(WITH_MYSQL) + xconfig(mysql_config MYSQL_LDFLAGS MYSQL_CFLAGS) +- +- set(CMAKE_REQUIRED_INCLUDES /usr/include/mysql) +- check_include_files(mysql.h HAVE_MYSQL_H) +- set(CMAKE_REQUIRED_INCLUDES) +- if(HAVE_MYSQL_H) +- check_library_exists(mysqlclient mysql_real_connect "" HAVE_MYSQL) ++ if(MYSQL_LDFLAGS) ++ set(HAVE_MYSQL TRUE) + endif() + else() +- unset(HAVE_MYSQL_H) + unset(HAVE_MYSQL) + endif() + +@@ -764,7 +760,11 @@ else() + endif() + + if(WITH_LUA) +- pkg_search_module(LUA REQUIRED lua5.4 lua-5.4 lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua) ++ if(WITH_LUA_VERSION) ++ pkg_search_module(LUA REQUIRED ${WITH_LUA_VERSION}) ++ else() ++ pkg_search_module(LUA REQUIRED lua5.4 lua-5.4 lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua) ++ endif() + message(STATUS "found lua at: INCDIR: ${LUA_INCLUDE_DIRS} LIBDIR: ${LUA_LIBRARY_DIRS} LDFLAGS: ${LUA_LDFLAGS} CFLAGS: ${LUA_CFLAGS}") + set(HAVE_LUA_H 1 "Have liblua header") + else() +@@ -1003,10 +1003,10 @@ if(WITH_MAXMINDDB) + target_link_libraries(mod_maxminddb maxminddb) + endif() + +-if(HAVE_MYSQL_H AND HAVE_MYSQL) ++if(HAVE_MYSQL) + add_and_install_library(mod_vhostdb_mysql "mod_vhostdb_mysql.c") +- target_link_libraries(mod_vhostdb_mysql mysqlclient) +- include_directories(/usr/include/mysql) ++ target_link_libraries(mod_vhostdb_mysql ${MYSQL_LDFLAGS}) ++ add_target_properties(mod_vhostdb_mysql COMPILE_FLAGS ${MYSQL_CFLAGS}) + endif() + + if(HAVE_PGSQL) Index: pkg/DESCR =================================================================== RCS file: /home/cvs/ports/www/lighttpd/pkg/DESCR,v retrieving revision 1.6 diff -u -p -u -p -r1.6 DESCR --- pkg/DESCR 26 Dec 2016 09:30:19 -0000 1.6 +++ pkg/DESCR 5 Jan 2023 19:47:15 -0000 @@ -10,3 +10,5 @@ Flavors: ldap - Enable LDAP support for authentication. mysql - Enable MySQL support for authentication and virtual hosting. + pgsql - Enable PostgreSQL support for authentication and + virtual hosting. Index: pkg/PFRAG.pgsql =================================================================== RCS file: pkg/PFRAG.pgsql diff -N pkg/PFRAG.pgsql --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PFRAG.pgsql 5 Jan 2023 19:50:47 -0000 @@ -0,0 +1 @@ +@so lib/lighttpd/mod_vhostdb_pgsql.so Index: pkg/PLIST =================================================================== RCS file: /home/cvs/ports/www/lighttpd/pkg/PLIST,v retrieving revision 1.32 diff -u -p -u -p -r1.32 PLIST --- pkg/PLIST 8 Nov 2022 11:17:18 -0000 1.32 +++ pkg/PLIST 5 Jan 2023 19:46:26 -0000 @@ -11,7 +11,6 @@ lib/lighttpd/ @so lib/lighttpd/mod_cgi.so @so lib/lighttpd/mod_deflate.so @so lib/lighttpd/mod_dirlisting.so -@so lib/lighttpd/mod_evasive.so @so lib/lighttpd/mod_evhost.so @so lib/lighttpd/mod_expire.so @so lib/lighttpd/mod_extforward.so @@ -24,21 +23,19 @@ lib/lighttpd/ @so lib/lighttpd/mod_rewrite.so @so lib/lighttpd/mod_rrdtool.so @so lib/lighttpd/mod_scgi.so -@so lib/lighttpd/mod_secdownload.so @so lib/lighttpd/mod_setenv.so @so lib/lighttpd/mod_simple_vhost.so @so lib/lighttpd/mod_sockproxy.so @so lib/lighttpd/mod_ssi.so @so lib/lighttpd/mod_staticfile.so @so lib/lighttpd/mod_status.so -@so lib/lighttpd/mod_uploadprogress.so @so lib/lighttpd/mod_userdir.so -@so lib/lighttpd/mod_usertrack.so @so lib/lighttpd/mod_vhostdb.so @so lib/lighttpd/mod_webdav.so @so lib/lighttpd/mod_wstunnel.so %%ldap%% %%mysql%% +%%pgsql%% @man man/man8/lighttpd-angel.8 @man man/man8/lighttpd.8 @bin sbin/lighttpd