git: a5a627bd6681 - main - devel/ode: Update 0.13 -> 0.16.2

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 04 Nov 2022 05:38:18 UTC
The branch main has been updated by yuri:

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

commit a5a627bd66810124dbcf9eefd036bff5a522af89
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-11-04 05:34:40 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-11-04 05:34:40 +0000

    devel/ode: Update 0.13 -> 0.16.2
    
    PR:             255111
    Approved by:    acm@ (maintainer)
---
 devel/ode/Makefile                               | 58 ++++++++++--------------
 devel/ode/distinfo                               |  5 +-
 devel/ode/files/patch-CMakeLists.txt             | 13 ++++++
 devel/ode/files/patch-config.h.cmake.in          | 11 +++++
 devel/ode/files/patch-ode_demo_demo__jointPR.cpp | 11 -----
 devel/ode/files/patch-ode_demo_demo__jointPU.cpp | 11 -----
 devel/ode/files/patch-ode_demo_demo__piston.cpp  | 11 -----
 devel/ode/pkg-plist                              | 12 +++--
 games/alienarena/Makefile                        |  2 +-
 games/crashtest/Makefile                         |  2 +-
 games/gillo/Makefile                             |  2 +-
 games/irrlamb/Makefile                           |  1 +
 games/stormbaancoureur/Makefile                  |  2 +-
 games/xmoto/Makefile                             |  2 +-
 games/xonotic/Makefile                           |  2 +-
 misc/dartsim/Makefile                            |  2 +-
 misc/ompl/Makefile                               |  2 +-
 17 files changed, 69 insertions(+), 80 deletions(-)

diff --git a/devel/ode/Makefile b/devel/ode/Makefile
index 8395544bdd3e..95b843553986 100644
--- a/devel/ode/Makefile
+++ b/devel/ode/Makefile
@@ -1,9 +1,8 @@
 PORTNAME=	ode
-PORTVERSION=	0.13
-PORTREVISION=	4
+DISTVERSION=	0.16.2
 PORTEPOCH=	1
 CATEGORIES=	devel
-MASTER_SITES=	SF/opende/ODE/${PORTVERSION}
+MASTER_SITES=	https://bitbucket.org/odedevs/${PORTNAME}/downloads/
 
 MAINTAINER=	acm@FreeBSD.org
 COMMENT=	Articulated rigid body dynamics library
@@ -12,41 +11,34 @@ WWW=		https://www.ode.org/
 LICENSE=	LGPL21 BSD3CLAUSE
 LICENSE_COMB=	dual
 
-USES=		tar:bzip2 libtool pathfix
-GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--enable-shared
-TEST_TARGET=	check
-USE_CXXSTD=	c++03
+USES=		cmake:testing
 
-OPTIONS_DEFINE=		GIMPACT DOUBLE OU DEMOS
+CMAKE_OFF=	ODE_WITH_TESTS
+CMAKE_TESTING_ON=	ODE_WITH_TESTS
 
-GIMPACT_DESC=		Enable gimpact instead of opcode support
-DOUBLE_DESC=		Enable double precision (BROKEN with GIMPACT)
-OU_DESC=		Enable Thread-local storage (Experimental)
-DEMOS_DESC=		Build demos (not installed)
+CXXFLAGS+=	-Wno-c++11-narrowing
 
-GIMPACT_PREVENTS=	DOUBLE
-GIMPACT_CONFIGURE_ON=	--with-trimesh=gimpact
-GIMPACT_CONFIGURE_OFF=	--with-trimesh=opcode
-DOUBLE_CONFIGURE_ENABLE=double-precision
-OU_CONFIGURE_ENABLE=	ou
-DEMOS_CONFIGURE_ENABLE=	demos
+OPTIONS_DEFINE=		DEMOS GIMPACT LIBCCD OU TRIMESH # it looks like TRIMESH isn't defined but is needed because ODE_NO_TRIMESH is never defined otherwise
+OPTIONS_DEFAULT=	TRIMESH
+
+DEMOS_DESC=		Build demos (not installed)
+DEMOS_CMAKE_BOOL=	ODE_WITH_DEMOS
 DEMOS_USES=		gl localbase pkgconfig
 DEMOS_USE=		GL=gl,glu
 
-post-patch:
-	@${REINPLACE_CMD} -e '/if test/ s|==|=|' -e 's|^\( *CFLAGS=\)|#\1|;' \
-		-e 's|^\( *CPPFLAGS=\)|#\1|' -e 's|^\( *CXXFLAGS=\)|#\1|' \
-		-e 's|CPPFLAGS+=" |CPPFLAGS="$$CPPFLAGS |' \
-		${WRKSRC}/configure
-	@${FIND} ${WRKSRC} -type f -name Makefile.in -print0 | ${XARGS} -0 ${REINPLACE_CMD} \
-		-e '/^DEFAULT_INCLUDES/ s|$$| -I$$(top_builddir)/include|' \
-		-e '/CFLAGS/ s|-O[12]||'
-	@${REINPLACE_CMD} 's|<malloc.h>|<stdlib.h>|g' \
-		${WRKSRC}/build/config-default.h ${WRKSRC}/ou/src/ou/malloc.cpp
-
-post-install:
-	${SED} -e '/PACKAGE/ s|^|//|; /VERSION/ s|^|//|' ${WRKSRC}/ode/src/config.h \
-		> ${STAGEDIR}${PREFIX}/include/ode/config.h
+GIMPACT_DESC=		Enable gimpact instead of opcode support
+GIMPACT_CMAKE_BOOL=	ODE_WITH_GIMPACT
+GIMPACT_PREVENTS=	TRIMESH
+
+LIBCCD_DESC=		Use libccd for handling some collision tests absent in ODE
+LIBCCD_CMAKE_BOOL=	ODE_WITH_LIBCCD ODE_WITH_LIBCCD_SYSTEM
+LIBCCD_CXXFLAGS=	-I${WRKSRC}/libccd/src/custom
+LIBCCD_LIB_DEPENDS=	libccd.so:math/libccd
+
+OU_DESC=		Enable Thread-local storage (Experimental)
+OU_CMAKE_BOOL=		ODE_WITH_OU
+
+TRIMESH_DESC=		Build with trimesh
+TRIMESH_CMAKE_OFF=	-DODE_NO_TRIMESH=ON
 
 .include <bsd.port.mk>
diff --git a/devel/ode/distinfo b/devel/ode/distinfo
index 4679824956d8..77c7e88d2be7 100644
--- a/devel/ode/distinfo
+++ b/devel/ode/distinfo
@@ -1,2 +1,3 @@
-SHA256 (ode-0.13.tar.bz2) = 34ce3e236e313bf109a0cb5546d2fca462aed99f29a42e62bc1463b803c31ef9
-SIZE (ode-0.13.tar.bz2) = 2008288
+TIMESTAMP = 1667161105
+SHA256 (ode-0.16.2.tar.gz) = b26aebdcb015e2d89720ef48e0cb2e8a3ca77915f89d853893e7cc861f810f22
+SIZE (ode-0.16.2.tar.gz) = 2627992
diff --git a/devel/ode/files/patch-CMakeLists.txt b/devel/ode/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..1ea3a77cc367
--- /dev/null
+++ b/devel/ode/files/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+--- CMakeLists.txt.orig	2020-07-30 13:27:35 UTC
++++ CMakeLists.txt
+@@ -568,8 +568,8 @@ endif()
+ if(ODE_WITH_LIBCCD)
+ 	if(ODE_WITH_LIBCCD_SYSTEM)
+ 		find_package(ccd)
+-		target_compile_definitions(ode PRIVATE -DdLIBCCD_ENABLED -DdLIBCCD_SYSTEM)
+-		target_link_libraries(ODE ccd::ccd)
++		target_compile_definitions(ODE PRIVATE -DdLIBCCD_ENABLED -DdLIBCCD_SYSTEM)
++		target_link_libraries(ODE ccd)
+ 	else()
+ 		target_compile_definitions(ODE PRIVATE -DdLIBCCD_ENABLED -DdLIBCCD_INTERNAL)
+ 		target_include_directories(
diff --git a/devel/ode/files/patch-config.h.cmake.in b/devel/ode/files/patch-config.h.cmake.in
new file mode 100644
index 000000000000..86e771e11c96
--- /dev/null
+++ b/devel/ode/files/patch-config.h.cmake.in
@@ -0,0 +1,11 @@
+--- config.h.cmake.in.orig	2022-10-30 20:20:09 UTC
++++ config.h.cmake.in
+@@ -67,7 +67,7 @@
+ #define ODE_PLATFORM_PS3
+ #elif defined(_MSC_VER) || defined(__CYGWIN32__) || defined(__MINGW32__)
+ #define ODE_PLATFORM_WINDOWS
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ #define ODE_PLATFORM_LINUX
+ #elif defined(__APPLE__) && defined(__MACH__)
+ #define ODE_PLATFORM_OSX
diff --git a/devel/ode/files/patch-ode_demo_demo__jointPR.cpp b/devel/ode/files/patch-ode_demo_demo__jointPR.cpp
deleted file mode 100644
index 189a7ef9e500..000000000000
--- a/devel/ode/files/patch-ode_demo_demo__jointPR.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- ode/demo/demo_jointPR.cpp.orig	2013-08-19 17:48:05 UTC
-+++ ode/demo/demo_jointPR.cpp
-@@ -329,7 +329,7 @@ int main (int argc, char **argv)
-             {
-                 int j = i+1;
-                 if ( j+1 > argc      ||  // Check if we have enough arguments
--                        argv[j] == '\0' ||  // We should have a path here
-+                        argv[j][0] == '\0' ||  // We should have a path here
-                         argv[j][0] == '-' ) // We should have a path not a command line
-                     Help(argv);
-                 else
diff --git a/devel/ode/files/patch-ode_demo_demo__jointPU.cpp b/devel/ode/files/patch-ode_demo_demo__jointPU.cpp
deleted file mode 100644
index 588366a601a4..000000000000
--- a/devel/ode/files/patch-ode_demo_demo__jointPU.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- ode/demo/demo_jointPU.cpp.orig	2013-12-06 21:52:14 UTC
-+++ ode/demo/demo_jointPU.cpp
-@@ -579,7 +579,7 @@ int main (int argc, char **argv)
-       if (0 == strcmp ("-t", argv[i]) || 0 == strcmp ("--texture-path", argv[i]) ) {
-         int j = i+1;
-         if ( j+1 > argc      ||  // Check if we have enough arguments
--             argv[j] == '\0' ||  // We should have a path here
-+             argv[j][0] == '\0' ||  // We should have a path here
-              argv[j][0] == '-' ) // We should have a path not a command line
-           Help (argv);
-         else
diff --git a/devel/ode/files/patch-ode_demo_demo__piston.cpp b/devel/ode/files/patch-ode_demo_demo__piston.cpp
deleted file mode 100644
index 3fdbb3327816..000000000000
--- a/devel/ode/files/patch-ode_demo_demo__piston.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- ode/demo/demo_piston.cpp.orig	2013-08-19 17:48:05 UTC
-+++ ode/demo/demo_piston.cpp
-@@ -659,7 +659,7 @@ int main (int argc, char **argv)
-                 {
-                     int j = i+1;
-                     if ( j+1 > argc      ||  // Check if we have enough arguments
--                            argv[j] == '\0' ||  // We should have a path here
-+                            argv[j][0] == '\0' ||  // We should have a path here
-                             argv[j][0] == '-' ) // We should have a path not a command line
-                         Help (argv);
-                     else
diff --git a/devel/ode/pkg-plist b/devel/ode/pkg-plist
index 6956b591ec05..ec840b633c84 100644
--- a/devel/ode/pkg-plist
+++ b/devel/ode/pkg-plist
@@ -4,12 +4,13 @@ include/ode/collision_space.h
 include/ode/collision_trimesh.h
 include/ode/common.h
 include/ode/compatibility.h
-include/ode/config.h
 include/ode/contact.h
+include/ode/cooperative.h
 include/ode/error.h
 include/ode/export-dif.h
 include/ode/mass.h
 include/ode/matrix.h
+include/ode/matrix_coop.h
 include/ode/memory.h
 include/ode/misc.h
 include/ode/objects.h
@@ -25,8 +26,11 @@ include/ode/rotation.h
 include/ode/threading.h
 include/ode/threading_impl.h
 include/ode/timer.h
-lib/libode.a
+include/ode/version.h
+lib/cmake/ode-0.16.2/ode-config-version.cmake
+lib/cmake/ode-0.16.2/ode-config.cmake
+lib/cmake/ode-0.16.2/ode-export-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/ode-0.16.2/ode-export.cmake
 lib/libode.so
-lib/libode.so.3
-lib/libode.so.3.1.0
+lib/libode.so.0.16.2
 libdata/pkgconfig/ode.pc
diff --git a/games/alienarena/Makefile b/games/alienarena/Makefile
index 5330f03cdd8c..4cb224365bb0 100644
--- a/games/alienarena/Makefile
+++ b/games/alienarena/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	alienarena
 PORTVERSION=	2013.766
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	games
 MASTER_SITES=	SF/alienarena.mirror/Alien%20Arena%207.66/ \
 		http://icculus.org/alienarena/Files/ \
diff --git a/games/crashtest/Makefile b/games/crashtest/Makefile
index 43f66b87a668..e5577708b93d 100644
--- a/games/crashtest/Makefile
+++ b/games/crashtest/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	crashtest
 PORTVERSION=	1.1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	games education
 MASTER_SITES=	http://www.stolk.org/crashtest/
 
diff --git a/games/gillo/Makefile b/games/gillo/Makefile
index afbfb0753306..892cb0875e4c 100644
--- a/games/gillo/Makefile
+++ b/games/gillo/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	gillo
 DISTVERSION=	1.0beta1
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	games
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/1.0beta1
 DISTNAME=	${PORTNAME}-${DISTVERSION}-src
diff --git a/games/irrlamb/Makefile b/games/irrlamb/Makefile
index 19590abf7499..a00e1e65b463 100644
--- a/games/irrlamb/Makefile
+++ b/games/irrlamb/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	irrlamb
 PORTVERSION=	1.0.3
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	games
 
diff --git a/games/stormbaancoureur/Makefile b/games/stormbaancoureur/Makefile
index fd9969b95400..6a4c9d689c98 100644
--- a/games/stormbaancoureur/Makefile
+++ b/games/stormbaancoureur/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	stormbaancoureur
 PORTVERSION=	2.1.6
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	games
 MASTER_SITES=	http://www.stolk.org/stormbaancoureur/download/ \
 		http://mirror.amdmi3.ru/distfiles/
diff --git a/games/xmoto/Makefile b/games/xmoto/Makefile
index 7044db0063b6..bb0c2ca913f2 100644
--- a/games/xmoto/Makefile
+++ b/games/xmoto/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xmoto
 PORTVERSION=	0.6.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	games
 
 MAINTAINER=	amdmi3@FreeBSD.org
diff --git a/games/xonotic/Makefile b/games/xonotic/Makefile
index b989d89872a5..8f1b25abbb9d 100644
--- a/games/xonotic/Makefile
+++ b/games/xonotic/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xonotic
 PORTVERSION=	0.8.5
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	games
 MASTER_SITES=	http://nl.dl.xonotic.org/ \
 		http://mirror.bitmissile.com/xonotic/releases/
diff --git a/misc/dartsim/Makefile b/misc/dartsim/Makefile
index 3cd4985b3067..b5110bb9d19f 100644
--- a/misc/dartsim/Makefile
+++ b/misc/dartsim/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	dartsim
 DISTVERSIONPREFIX=	v
 DISTVERSION=	6.12.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	misc
 
 MAINTAINER=	yuri@FreeBSD.org
diff --git a/misc/ompl/Makefile b/misc/ompl/Makefile
index 49158e2671b2..16e7b9570cb5 100644
--- a/misc/ompl/Makefile
+++ b/misc/ompl/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	ompl
 DISTVERSION=	1.5.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	misc comms
 
 MAINTAINER=	yuri@FreeBSD.org