Commit a5a627bd authored by Yuri Victorovich's avatar Yuri Victorovich
Browse files

devel/ode: Update 0.13 -> 0.16.2

PR:		255111
Approved by:	acm@ (maintainer)
parent 32231b9e
Loading
Loading
Loading
Loading
+25 −33
Original line number Diff line number Diff line
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>
+3 −2
Original line number Diff line number Diff line
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
+13 −0
Original line number Diff line number Diff line
--- 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(
+11 −0
Original line number Diff line number Diff line
--- 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
+0 −11
Original line number Diff line number Diff line
--- 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
Loading