From owner-svn-ports-head@freebsd.org Mon Dec 31 20:51:17 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A77EE1419D8B; Mon, 31 Dec 2018 20:51:17 +0000 (UTC) (envelope-from swills@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4983784BC3; Mon, 31 Dec 2018 20:51:17 +0000 (UTC) (envelope-from swills@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 3D0CFFE3C; Mon, 31 Dec 2018 20:51:17 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBVKpH9I090353; Mon, 31 Dec 2018 20:51:17 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBVKpGLv090348; Mon, 31 Dec 2018 20:51:16 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201812312051.wBVKpGLv090348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Mon, 31 Dec 2018 20:51:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r488837 - in head/mail/opendkim: . files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/mail/opendkim: . files X-SVN-Commit-Revision: 488837 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4983784BC3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2018 20:51:17 -0000 Author: swills Date: Mon Dec 31 20:51:16 2018 New Revision: 488837 URL: https://svnweb.freebsd.org/changeset/ports/488837 Log: mail/opendkim: fix build with lua52 and lua53 PR: 232953 Submitted by: Chad Jacob Milios (with slight changes) Reported by: pr@aoek.com Approved by: maintainer timeout (freebsd-ports@dan.me.uk, >2 weeks) Added: head/mail/opendkim/files/patch-miltertest_miltertest.c (contents, props changed) head/mail/opendkim/files/patch-opendkim_opendkim-lua.c (contents, props changed) Modified: head/mail/opendkim/Makefile (contents, props changed) head/mail/opendkim/distinfo (contents, props changed) Modified: head/mail/opendkim/Makefile ============================================================================== --- head/mail/opendkim/Makefile Mon Dec 31 20:31:29 2018 (r488836) +++ head/mail/opendkim/Makefile Mon Dec 31 20:51:16 2018 (r488837) @@ -154,12 +154,6 @@ USES+= bdb LDFLAGS+= -lpthread .endif -.include - -.if ${PORT_OPTIONS:MLUA} && ${LUA_VER_STR} >= 53 -BROKEN= Does not build with Lua 5.3: miltertest.c:4171:54: error: too few arguments to function call, expected 5, have 4 -.endif - pre-configure: ${REINPLACE_CMD} -e '/PKG_CHECK_MODULES/s/lua5\.[0-9]/lua-${LUA_VER}/' \ -e '/PKG_CONFIG/s/cyrussasl/libsasl2/' \ @@ -175,4 +169,4 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/opendkim/opendkim.conf.sample \ ${STAGEDIR}${PREFIX}/etc/mail/ -.include +.include Modified: head/mail/opendkim/distinfo ============================================================================== --- head/mail/opendkim/distinfo Mon Dec 31 20:31:29 2018 (r488836) +++ head/mail/opendkim/distinfo Mon Dec 31 20:51:16 2018 (r488837) @@ -1,2 +1,3 @@ +TIMESTAMP = 1544327198 SHA256 (opendkim-2.10.3.tar.gz) = 43a0ba57bf942095fe159d0748d8933c6b1dd1117caf0273fa9a0003215e681b SIZE (opendkim-2.10.3.tar.gz) = 1210224 Added: head/mail/opendkim/files/patch-miltertest_miltertest.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/opendkim/files/patch-miltertest_miltertest.c Mon Dec 31 20:51:16 2018 (r488837) @@ -0,0 +1,20 @@ +--- miltertest/miltertest.c.orig 2014-03-20 04:36:13 UTC ++++ miltertest/miltertest.c +@@ -4009,7 +4009,7 @@ main(int argc, char **argv) + } + + /* register functions */ +-#if LUA_VERSION_NUM == 502 ++#if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + luaL_newlib(l, mt_library); + lua_setglobal(l, "mt"); + #else /* LUA_VERSION_NUM == 502 */ +@@ -4163,7 +4163,7 @@ 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) + switch (lua_load(l, mt_lua_reader, (void *) &io, + script == NULL ? "(stdin)" : script, NULL)) + #else /* LUA_VERSION_NUM == 502 */ Added: head/mail/opendkim/files/patch-opendkim_opendkim-lua.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/opendkim/files/patch-opendkim_opendkim-lua.c Mon Dec 31 20:51:16 2018 (r488837) @@ -0,0 +1,152 @@ +--- 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 + free(ptr); + return NULL; + } +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + else if (nsize != 0 && ptr == NULL) + # 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 + ** Register functions. + */ + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + 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 + /* import other globals */ + dkimf_import_globals(ctx, l); + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) + # else /* LUA_VERSION_NUM == 502 */ + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +@@ -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_dump(l, dkimf_lua_writer, &io, 0) == 0) ++#else + if (lua_dump(l, dkimf_lua_writer, &io) == 0) ++#endif + { + *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 + ** Register functions. + */ + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + 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 + /* import other globals */ + dkimf_import_globals(ctx, l); + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) + # else /* LUA_VERSION_NUM == 502 */ + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +@@ -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_dump(l, dkimf_lua_writer, &io, 0) == 0) ++#else + if (lua_dump(l, dkimf_lua_writer, &io) == 0) ++#endif + { + *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 + ** Register functions. + */ + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + 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 + /* import other globals */ + dkimf_import_globals(ctx, l); + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) + # else /* LUA_VERSION_NUM == 502 */ + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +@@ -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_dump(l, dkimf_lua_writer, &io, 0) == 0) ++#else + if (lua_dump(l, dkimf_lua_writer, &io) == 0) ++#endif + { + *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 + ** Register functions. + */ + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + 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 + /* import other globals */ + dkimf_import_globals(ctx, l); + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name, NULL)) + # else /* LUA_VERSION_NUM == 502 */ + switch (lua_load(l, dkimf_lua_reader, (void *) &io, name)) +@@ -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_dump(l, dkimf_lua_writer, &io, 0) == 0) ++#else + if (lua_dump(l, dkimf_lua_writer, &io) == 0) ++#endif + { + *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 + lua_pushstring(l, query); + lua_setglobal(l, "query"); + +-# if LUA_VERSION_NUM == 502 ++# if (LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503) + switch (lua_load(l, dkimf_lua_reader, (void *) &io, script, NULL)) + # else /* LUA_VERSION_NUM == 502 */ + switch (lua_load(l, dkimf_lua_reader, (void *) &io, script)) +@@ -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_dump(l, dkimf_lua_writer, &io, 0) == 0) ++#else + if (lua_dump(l, dkimf_lua_writer, &io) == 0) ++#endif + { + *keep = (void *) io.lua_io_script; + *funclen = io.lua_io_len;