Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 May 2023 14:24:54 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 89d7e1df96bf - main - net/libtnl: Unbreak on HEAD
Message-ID:  <202305131424.34DEOsnT001027@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

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

commit 89d7e1df96bfc29e6851e927d11b6f01f11cca3e
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-05-12 23:12:51 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
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 <bsd.port.pre.mk>
+
+.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 <bsd.port.mk>
+.include <bsd.port.post.mk>
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 <stdio.h>
- 
- 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 <stdio.h>
+ 
+ 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)"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305131424.34DEOsnT001027>