From owner-svn-ports-all@freebsd.org Tue Jan 19 03:46:03 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 260FF4E3988; Tue, 19 Jan 2021 03:46:03 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DKZLz0YhXz4SqB; Tue, 19 Jan 2021 03:46:03 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 067E21F9E8; Tue, 19 Jan 2021 03:46:03 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 10J3k2Jf051346; Tue, 19 Jan 2021 03:46:02 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 10J3k23L051345; Tue, 19 Jan 2021 03:46:02 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202101190346.10J3k23L051345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Tue, 19 Jan 2021 03:46:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r562018 - head/mail/opendkim/files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: head/mail/opendkim/files X-SVN-Commit-Revision: 562018 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2021 03:46:03 -0000 Author: danfe Date: Tue Jan 19 03:46:02 2021 New Revision: 562018 URL: https://svnweb.freebsd.org/changeset/ports/562018 Log: Fix Lua version checks and thus unbreak the build against Lua 5.4. PR: 251688 Submitted by: dim Modified: head/mail/opendkim/files/patch-miltertest_miltertest.c head/mail/opendkim/files/patch-opendkim_opendkim-lua.c Modified: head/mail/opendkim/files/patch-miltertest_miltertest.c ============================================================================== --- head/mail/opendkim/files/patch-miltertest_miltertest.c Tue Jan 19 03:24:46 2021 (r562017) +++ head/mail/opendkim/files/patch-miltertest_miltertest.c Tue Jan 19 03:46:02 2021 (r562018) @@ -1,20 +1,35 @@ --- miltertest/miltertest.c.orig 2014-03-20 04:36:13 UTC +++ miltertest/miltertest.c -@@ -4009,7 +4009,7 @@ main(int argc, char **argv) +@@ -4009,12 +4009,12 @@ main(int argc, char **argv) } /* register functions */ -#if LUA_VERSION_NUM == 502 -+#if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++#if LUA_VERSION_NUM >= 502 luaL_newlib(l, mt_library); lua_setglobal(l, "mt"); - #else /* LUA_VERSION_NUM == 502 */ -@@ -4163,7 +4163,7 @@ main(int argc, char **argv) +-#else /* LUA_VERSION_NUM == 502 */ ++#else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "mt", mt_library); +-#endif /* LUA_VERSION_NUM == 502 */ ++#endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); + + /* register constants */ +@@ -4163,13 +4163,13 @@ main(int argc, char **argv) lua_setglobal(l, "SMFIF_SETSYMLIST"); #endif /* SMFIF_SETSYMLIST */ -#if LUA_VERSION_NUM == 502 -+#if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++#if LUA_VERSION_NUM >= 502 switch (lua_load(l, mt_lua_reader, (void *) &io, script == NULL ? "(stdin)" : script, NULL)) - #else /* LUA_VERSION_NUM == 502 */ +-#else /* LUA_VERSION_NUM == 502 */ ++#else /* LUA_VERSION_NUM >= 502 */ + switch (lua_load(l, mt_lua_reader, (void *) &io, + script == NULL ? "(stdin)" : script)) +-#endif /* LUA_VERSION_NUM == 502 */ ++#endif /* LUA_VERSION_NUM >= 502 */ + { + case 0: + break; Modified: head/mail/opendkim/files/patch-opendkim_opendkim-lua.c ============================================================================== --- head/mail/opendkim/files/patch-opendkim_opendkim-lua.c Tue Jan 19 03:24:46 2021 (r562017) +++ head/mail/opendkim/files/patch-opendkim_opendkim-lua.c Tue Jan 19 03:46:02 2021 (r562018) @@ -1,37 +1,56 @@ --- opendkim/opendkim-lua.c.orig 2015-02-04 00:31:11 UTC +++ opendkim/opendkim-lua.c -@@ -282,7 +282,7 @@ dkimf_lua_alloc(void *ud, void *ptr, size_t osize, siz +@@ -282,11 +282,11 @@ dkimf_lua_alloc(void *ud, void *ptr, size_t osize, siz free(ptr); return NULL; } -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 else if (nsize != 0 && ptr == NULL) - # else /* LUA_VERSION_NUM == 502 */ +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ else if (nsize != 0 && osize == 0) -@@ -482,7 +482,7 @@ dkimf_lua_setup_hook(void *ctx, const char *script, si +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + { + return malloc(nsize); + } +@@ -482,12 +482,12 @@ dkimf_lua_setup_hook(void *ctx, const char *script, si ** Register functions. */ -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 luaL_newlib(l, dkimf_lua_lib_setup); lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM == 502 */ -@@ -529,7 +529,7 @@ dkimf_lua_setup_hook(void *ctx, const char *script, si +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_setup); +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); + + /* +@@ -529,11 +529,11 @@ dkimf_lua_setup_hook(void *ctx, const char *script, si /* import other globals */ dkimf_import_globals(ctx, l); -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) - # else /* LUA_VERSION_NUM == 502 */ +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + { + case 0: + break; @@ -561,7 +561,11 @@ dkimf_lua_setup_hook(void *ctx, const char *script, si io.lua_io_len = 0; io.lua_io_alloc = 0; -+#if (LUA_VERSION_NUM == 503) ++#if (LUA_VERSION_NUM >= 503) + if (lua_dump(l, dkimf_lua_writer, &io, 0) == 0) +#else if (lua_dump(l, dkimf_lua_writer, &io) == 0) @@ -39,29 +58,42 @@ { *keep = (void *) io.lua_io_script; *funclen = io.lua_io_len; -@@ -637,7 +641,7 @@ dkimf_lua_screen_hook(void *ctx, const char *script, s +@@ -637,12 +641,12 @@ dkimf_lua_screen_hook(void *ctx, const char *script, s ** Register functions. */ -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 luaL_newlib(l, dkimf_lua_lib_screen); lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM == 502 */ -@@ -674,7 +678,7 @@ dkimf_lua_screen_hook(void *ctx, const char *script, s +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_screen); +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); + + /* +@@ -674,11 +678,11 @@ dkimf_lua_screen_hook(void *ctx, const char *script, s /* import other globals */ dkimf_import_globals(ctx, l); -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) - # else /* LUA_VERSION_NUM == 502 */ +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + { + case 0: + break; @@ -706,7 +710,11 @@ dkimf_lua_screen_hook(void *ctx, const char *script, s io.lua_io_len = 0; io.lua_io_alloc = 0; -+#if (LUA_VERSION_NUM == 503) ++#if (LUA_VERSION_NUM >= 503) + if (lua_dump(l, dkimf_lua_writer, &io, 0) == 0) +#else if (lua_dump(l, dkimf_lua_writer, &io) == 0) @@ -69,29 +101,42 @@ { *keep = (void *) io.lua_io_script; *funclen = io.lua_io_len; -@@ -782,7 +790,7 @@ dkimf_lua_stats_hook(void *ctx, const char *script, si +@@ -782,12 +790,12 @@ dkimf_lua_stats_hook(void *ctx, const char *script, si ** Register functions. */ -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 luaL_newlib(l, dkimf_lua_lib_stats); lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM == 502 */ -@@ -911,7 +919,7 @@ dkimf_lua_stats_hook(void *ctx, const char *script, si +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_stats); +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); + + /* +@@ -911,11 +919,11 @@ dkimf_lua_stats_hook(void *ctx, const char *script, si /* import other globals */ dkimf_import_globals(ctx, l); -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) - # else /* LUA_VERSION_NUM == 502 */ +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + { + case 0: + break; @@ -943,7 +951,11 @@ dkimf_lua_stats_hook(void *ctx, const char *script, si io.lua_io_len = 0; io.lua_io_alloc = 0; -+#if (LUA_VERSION_NUM == 503) ++#if (LUA_VERSION_NUM >= 503) + if (lua_dump(l, dkimf_lua_writer, &io, 0) == 0) +#else if (lua_dump(l, dkimf_lua_writer, &io) == 0) @@ -99,29 +144,42 @@ { *keep = (void *) io.lua_io_script; *funclen = io.lua_io_len; -@@ -1019,7 +1031,7 @@ dkimf_lua_final_hook(void *ctx, const char *script, si +@@ -1019,12 +1031,12 @@ dkimf_lua_final_hook(void *ctx, const char *script, si ** Register functions. */ -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 luaL_newlib(l, dkimf_lua_lib_final); lua_setglobal(l, "odkim"); - # else /* LUA_VERSION_NUM == 502 */ -@@ -1148,7 +1160,7 @@ dkimf_lua_final_hook(void *ctx, const char *script, si +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_final); +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); + + /* +@@ -1148,11 +1160,11 @@ dkimf_lua_final_hook(void *ctx, const char *script, si /* import other globals */ dkimf_import_globals(ctx, l); -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) - # else /* LUA_VERSION_NUM == 502 */ +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + { + case 0: + break; @@ -1180,7 +1192,11 @@ dkimf_lua_final_hook(void *ctx, const char *script, si io.lua_io_len = 0; io.lua_io_alloc = 0; -+#if (LUA_VERSION_NUM == 503) ++#if (LUA_VERSION_NUM >= 503) + if (lua_dump(l, dkimf_lua_writer, &io, 0) == 0) +#else if (lua_dump(l, dkimf_lua_writer, &io) == 0) @@ -129,20 +187,26 @@ { *keep = (void *) io.lua_io_script; *funclen = io.lua_io_len; -@@ -1249,7 +1265,7 @@ dkimf_lua_db_hook(const char *script, size_t scriptlen +@@ -1249,11 +1265,11 @@ dkimf_lua_db_hook(const char *script, size_t scriptlen lua_pushstring(l, query); lua_setglobal(l, "query"); -# if LUA_VERSION_NUM == 502 -+# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) ++# if LUA_VERSION_NUM >= 502 switch (lua_load(l, dkimf_lua_reader, (void *) &io, script, NULL)) - # else /* LUA_VERSION_NUM == 502 */ +-# else /* LUA_VERSION_NUM == 502 */ ++# else /* LUA_VERSION_NUM >= 502 */ switch (lua_load(l, dkimf_lua_reader, (void *) &io, script)) +-# endif /* LUA_VERSION_NUM == 502 */ ++# endif /* LUA_VERSION_NUM >= 502 */ + { + case 0: + break; @@ -1281,7 +1297,11 @@ dkimf_lua_db_hook(const char *script, size_t scriptlen io.lua_io_len = 0; io.lua_io_alloc = 0; -+#if (LUA_VERSION_NUM == 503) ++#if (LUA_VERSION_NUM >= 503) + if (lua_dump(l, dkimf_lua_writer, &io, 0) == 0) +#else if (lua_dump(l, dkimf_lua_writer, &io) == 0)