From nobody Sat May 13 14:24:54 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QJSZb1Pqcz4BRKQ; Sat, 13 May 2023 14:24:55 +0000 (UTC) (envelope-from git@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 4QJSZb0vJJz4HDf; Sat, 13 May 2023 14:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683987895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7JkAqT6R3DP5zgzVO7c8EDg2wVAtff7BD/p+yuM7QMk=; b=VQVvyXBRewaEGYarPGF0Rg99BVlOg9eDVQ0ih0a3rWG3vyclC4fqEkfONmlRpjo27zAg82 +MiBIOnsrg/zBQM92RJi/owZx13RQy7w8vEknYeTM2fTEJdowxZSGHvGN+XvoAJqKaefoP PmiMTIEUQ//SYRkvVqfR/qPXkB8azZSBq89ffvNkt1mDLih1ghyhaeZeam7UH8ORnJELjW MOh+U6opp3CYkoiCnyitx6VRKBlxCZVp1RAaq+Sq6dPS0BIdxWRt8zn8ctUeYQCAWAZqCQ QfiMhu2sGYjyqNgsQ5MeDf9GwgogWva24kcdTyg2FDzr0vrM7kl962ZxAmGFaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683987895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7JkAqT6R3DP5zgzVO7c8EDg2wVAtff7BD/p+yuM7QMk=; b=TgqFpdXX1E7nRevH8pxh9fpZ3cCeEexS0NEDj9k2F2+8WAmS6QCZhBeSkOAN613JSJCo2z 14h93sHnI6lducn4Dli2Z2kzNCr2FDdSLdbvY7wSJLpOXnXxUY7eZ+ZZ4wbod7PIfUbIM7 pGWCWw05ns3VYzQz3h2UNSquTwdJOF3w3hNoJIETpqYgxp1P0osvkwqfpiszM6J+5jhQZa lU8XppChYwYCpnvtkNG4p0FETyHREqWjeyILZ53NYjN6ibhit50SJyjEStZfUtobCG9vAS 5zy1kq70axOz8BgMkriuSYahO3mRVQ+7Cux2Gl6Niink526m+Zz2Q/nkxzcO6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683987895; a=rsa-sha256; cv=none; b=KLCYc4ba7HjjLsS3lmTLMpCjgsradFPyygFsRHg2r49ejg4V9v1kwJ9xzpNDLJLSe4A8AK Xhy0c/f4DRUpHd+WUk/sqlQpvNk0NB5TDeX12GeBneETFW06KeDdLyVTdX9IAt64AAQpTQ aDwpzSU+xUVRohCmTPnjkQoELYnDIf/u1S0ZLGPpzL/18YBDFrLB7ouZ9Z9GY3vJcicRwF MTpQECEjH6HQoqP2hp6dSegkiAXnntUG3FUwf+LcHkLwDmQCKD5nOPCkbJGbqxkPynzebA 3c3gHRIdyg8yRZR5su6LT82sLZMcYLjhDeYDVq/xGIhHHlyw6kooBAxC3ZWEPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QJSZZ75MQzL8w; Sat, 13 May 2023 14:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34DEOsCq001028; Sat, 13 May 2023 14:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34DEOsnT001027; Sat, 13 May 2023 14:24:54 GMT (envelope-from git) Date: Sat, 13 May 2023 14:24:54 GMT Message-Id: <202305131424.34DEOsnT001027@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 89d7e1df96bf - main - net/libtnl: Unbreak on HEAD List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89d7e1df96bfc29e6851e927d11b6f01f11cca3e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=89d7e1df96bfc29e6851e927d11b6f01f11cca3e commit 89d7e1df96bfc29e6851e927d11b6f01f11cca3e Author: Muhammad Moinur Rahman AuthorDate: 2023-05-12 23:12:51 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2023-05-13 14:24:16 +0000 net/libtnl: Unbreak on HEAD - Refresh patches - Pet portclippy - Adopt port --- net/libtnl/Makefile | 18 +++-- net/libtnl/files/patch-platform | 94 ++++++++++++---------- .../files/{patch-platforms => patch-tnlTypes.h} | 12 ++- 3 files changed, 71 insertions(+), 53 deletions(-) diff --git a/net/libtnl/Makefile b/net/libtnl/Makefile index e3fcc4d54a62..8c4e90bae211 100644 --- a/net/libtnl/Makefile +++ b/net/libtnl/Makefile @@ -5,21 +5,27 @@ CATEGORIES= net devel MASTER_SITES= SF/opentnl/TNL%20Source/${PORTVERSION} DISTNAME= tnl-${PORTVERSION}-source -MAINTAINER= ports@FreeBSD.org +MAINTAINER= bofh@FreeBSD.org COMMENT= Robust, secure, easy to use cross-platform C++ networking API WWW= https://sourceforge.net/projects/opentnl/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/../LICENSE.txt +# Other arches can be added easily, provided there is hardware to test: +ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64 powerpc64le + USES= uidfix USE_GCC= yes -WRKSRC= ${WRKDIR}/tnl/tnl USE_LDCONFIG= yes + MAKEFILE= ${FILESDIR}/Makefile.bsd -# Other arches can be added easily, provided there is hardware to test: -ONLY_FOR_ARCHS= i386 amd64 powerpc powerpc64 powerpc64le -.if defined(NO_PROFILE) || defined(NOPROFILE) + +WRKSRC= ${WRKDIR}/tnl/tnl + +.include + +.if defined(NO_PROFILE) || defined(NOPROFILE) || ( ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400079 ) PLIST_SUB+= PROFILE='@comment ' .else PLIST_SUB+= PROFILE='' @@ -34,4 +40,4 @@ PLIST_SUB+= PROFILE='' pre-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include/tnl -.include +.include diff --git a/net/libtnl/files/patch-platform b/net/libtnl/files/patch-platform index 7cef84fa96e3..9b79b1939863 100644 --- a/net/libtnl/files/patch-platform +++ b/net/libtnl/files/patch-platform @@ -1,46 +1,7 @@ -Use defines instead of (partially incorrect) function-wrappers for -standard functions. - - -mi - ---- tnlPlatform.h 2004-09-28 14:45:25.000000000 -0400 -+++ tnlPlatform.h 2008-08-17 20:47:59.000000000 -0400 -@@ -31,4 +31,5 @@ - #include "tnlTypes.h" - #endif -+#include - - namespace TNL { -@@ -101,10 +102,11 @@ - /// - /// This will print into the specified string until the buffer size is reached. --extern int dSprintf(char *buffer, U32 bufferSize, const char *format, ...); -- --/// Vsprintf with buffer size argument. --/// --/// This will print into the specified string until the buffer size is reached. --extern int dVsprintf(char *buffer, U32 bufferSize, const char *format, void *arglist); ///< compiler independent -+#ifdef TNL_COMPILER_VISUALC -+# define dSprintf _snprintf -+# define dVsprintf _vsnprintf -+#else -+# define dSprintf snprintf -+# define dVsprintf vsnprintf -+#endif - - inline char dToupper(const char c) { if (c >= char('a') && c <= char('z')) return char(c + 'A' - 'a'); else return c; } ///< Converts an ASCII character to upper case. -@@ -120,6 +122,6 @@ - #if defined (__GNUC__) - --int stricmp(const char *str1, const char *str2); --int strnicmp(const char *str1, const char *str2, unsigned int len); -+#define stricmp(str1, str2) strcasecmp(str1, str2) -+#define strnicmp(str1, str2, size) strncasecmp(str1, str2, size) - - #endif ---- platform.cpp 2004-08-20 14:26:58.000000000 -0400 -+++ platform.cpp 2008-08-17 11:43:55.000000000 -0400 -@@ -435,54 +435,3 @@ +--- platform.cpp.orig 2004-08-20 18:26:58 UTC ++++ platform.cpp +@@ -434,55 +434,4 @@ bool atob(const char *str) + return !stricmp(str, "true") || atof(str); } -S32 dSprintf(char *buffer, U32 bufferSize, const char *format, ...) @@ -95,3 +56,50 @@ standard functions. -#endif - - +Use defines instead of (partially incorrect) function-wrappers for +standard functions. + + -mi + +--- tnlPlatform.h.orig 2004-09-28 18:45:25 UTC ++++ tnlPlatform.h +@@ -30,6 +30,7 @@ + #ifndef _TNL_TYPES_H_ + #include "tnlTypes.h" + #endif ++#include + + namespace TNL { + +@@ -100,13 +101,14 @@ extern bool atob(const char *str); ///< String + /// Printf into string with a buffer size. + /// + /// This will print into the specified string until the buffer size is reached. +-extern int dSprintf(char *buffer, U32 bufferSize, const char *format, ...); ++#ifdef TNL_COMPILER_VISUALC ++# define dSprintf _snprintf ++# define dVsprintf _vsnprintf ++#else ++# define dSprintf snprintf ++# define dVsprintf vsnprintf ++#endif + +-/// Vsprintf with buffer size argument. +-/// +-/// This will print into the specified string until the buffer size is reached. +-extern int dVsprintf(char *buffer, U32 bufferSize, const char *format, void *arglist); ///< compiler independent +- + inline char dToupper(const char c) { if (c >= char('a') && c <= char('z')) return char(c + 'A' - 'a'); else return c; } ///< Converts an ASCII character to upper case. + inline char dTolower(const char c) { if (c >= char('A') && c <= char('Z')) return char(c - 'A' + 'a'); else return c; } ///< Converts an ASCII character to lower case. + +@@ -119,8 +121,8 @@ inline char dTolower(const char c) { if (c >= char('A' + + #if defined (__GNUC__) + +-int stricmp(const char *str1, const char *str2); +-int strnicmp(const char *str1, const char *str2, unsigned int len); ++#define stricmp(str1, str2) strcasecmp(str1, str2) ++#define strnicmp(str1, str2, size) strncasecmp(str1, str2, size) + + #endif + diff --git a/net/libtnl/files/patch-platforms b/net/libtnl/files/patch-tnlTypes.h similarity index 58% rename from net/libtnl/files/patch-platforms rename to net/libtnl/files/patch-tnlTypes.h index a5131fae7dda..d8195f5d8877 100644 --- a/net/libtnl/files/patch-platforms +++ b/net/libtnl/files/patch-tnlTypes.h @@ -3,9 +3,10 @@ other architectures is easy too. -mi ---- tnlTypes.h 2004-09-28 14:45:25.000000000 -0400 -+++ tnlTypes.h 2008-08-17 10:30:26.000000000 -0400 -@@ -285,6 +285,6 @@ +--- tnlTypes.h.orig 2004-09-28 18:45:25 UTC ++++ tnlTypes.h +@@ -284,8 +284,8 @@ typedef unsigned long long U64; ///< Compiler indepe + // Identify the target CPU and assembly language options //---------------------------------------------------------------------------------- -#if defined(_M_IX86) || defined(i386) @@ -14,10 +15,13 @@ other architectures is easy too. +# define TNL_CPU_STRING "x86" # define TNL_CPU_X86 # define TNL_LITTLE_ENDIAN -@@ -294,5 +294,5 @@ + # define TNL_SUPPORTS_NASM +@@ -293,7 +293,7 @@ typedef unsigned long long U64; ///< Compiler indepe + # if defined (__GNUC__) # if __GNUC__ == 2 # define TNL_GCC_2 -# elif __GNUC__ == 3 +# elif __GNUC__ >= 3 # define TNL_GCC_3 # else + # error "TNL: Unsupported version of GCC (see tnlMethodDispatch.cpp)"