Date: Fri, 21 Jul 2006 06:07:50 +0400 (MSD) From: Dmitry Marakasov <amdmi3@mail.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/100636: [PATCH] devel/ode: update to 0.6 Message-ID: <20060721020750.EF5AA3EB@hades.panopticon> Resent-Message-ID: <200607210210.k6L2ADDK066090@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 100636 >Category: ports >Synopsis: [PATCH] devel/ode: update to 0.6 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Jul 21 02:10:13 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 6.1-RELEASE i386 >Organization: >Environment: System: FreeBSD hades.panopticon 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Thu May 11 15:07:32 MSD 2006 amdmi3@hades.panopticon:/usr/obj/usr/src/sys/HADES i386 >Description: Update to 0.6. Done severe rewrite of a port, as ODE uses autotools instead of nasty configurator.c now. Note, that the port does not install shared library. Reasons for this: - All ports that link against ode depend on it this way: BUILD_DEPENDS= ${X11BASE}/lib/libode.a:${PORTSDIR}/devel/ode as `gcc -lode` prefers to link against shared lib when both static and shared libs are present, these dependencies will be broken. - Performance. I think it's reasonable to statically link ode, as it was done before. - Library is named libode.so, not libode.so.0 or alike. That will cause trouble if ode ABI is changed. Lib was tested with xmoto and my new port that wants ode >=0.6 only, without any problems. I also think that devel/ode-devel should be retired after this update is committed. >How-To-Repeat: >Fix: --- ode.patch begins here --- diff -ruN ode.orig/Makefile ode/Makefile --- ode.orig/Makefile Fri Jul 21 05:51:58 2006 +++ ode/Makefile Thu Jul 20 22:26:23 2006 @@ -6,56 +6,56 @@ # PORTNAME= ode -PORTVERSION= 0.5 -PORTREVISION= 1 +PORTVERSION= 0.6 PORTEPOCH= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= opende -EXTRACT_SUFX= .tgz +DISTNAME= ${PORTNAME}-src-${PORTVERSION} MAINTAINER= dyeske@yahoo.com COMMENT= Articulated rigid body dynamics library CONFLICTS= ode-devel-[0-9].* +USE_ZIP= yes USE_X_PREFIX= yes USE_GL= yes USE_GMAKE= yes +GNU_CONFIGURE= yes -OPTIONS= OPCODE "Enable code required by TriList (trimesh) class" on +CONFIGURE_ARGS= --program-prefix= +CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include" \ + LIBS="-L${X11BASE}/lib" + +OPTIONS= OPCODE "Enable code required by TriList (trimesh) class" on \ + GYROSCOPIC "Configure ODE to work with gyroscopic term" on \ + DOUBLE "Enable double precision" off + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} .include <bsd.port.pre.mk> -post-patch: - @${REINPLACE_CMD} -e \ - 's|malloc.h|stdlib.h|g' \ - ${WRKSRC}/configurator.c - - @${REINPLACE_CMD} -e \ - 's|g++|${CXX}|; \ - s|-Wall||g; \ - s|-L/usr/X11/lib|-lXext|; \ - s|-L/usr/lib/X11R6||; \ - s|-L/usr/lib/X11||; \ - s|-L/usr/X11R6/lib|-L${X11BASE}/lib|; \ - s|-fno-rtti||; \ - s|-ffast-math|${CXXFLAGS} -I${X11BASE}/include|' \ - ${WRKSRC}/config/makefile.unix-gcc -.if !defined(WITHOUT_OPCODE) - @${REINPLACE_CMD} -e \ - 's/^#OPCODE_DIRECTORY/OPCODE_DIRECTORY/' \ - ${WRKSRC}/config/user-settings +.if defined(WITHOUT_OPCODE) +CONFIGURE_ARGS+= --disable-opcode +.endif + +.if defined(WITHOUT_GYROSCOPIC) +CONFIGURE_ARGS+= --disable-gyroscopic +.endif + +.if defined(WITH_DOUBLE) +CONFIGURE_ARGS+= --enable-double-precision .endif -do-configure: - cd ${WRKSRC} ; ${GMAKE} configure - @${REINPLACE_CMD} -e '/include.*values.h/d' ${WRKSRC}/include/ode/config.h - -do-install: - @${INSTALL_DATA} ${WRKSRC}/lib/libode.a ${PREFIX}/lib - @${INSTALL_DATA} ${WRKSRC}/lib/libdrawstuff.a ${PREFIX}/lib - @${MKDIR} ${PREFIX}/include/ode - @${INSTALL_DATA} ${WRKSRC}/include/ode/*.h ${PREFIX}/include/ode +post-patch: + @${REINPLACE_CMD} -e '/if test/ s|==|=|' -e 's|^\( *CFLAGS=\)|#\1|;' \ + -e 's|^\( *CPPFLAGS=\)|#\1|' -e 's|^\( *CXXFLAGS=\)|#\1|' \ + -e 's|__isnanf||g; s|__isnan||g' -e 's|-lpthread|-pthread|g' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e '/^traplib_PROGRAMS / d' ${WRKSRC}/ode/src/Makefile.in + @${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]||' .include <bsd.port.post.mk> diff -ruN ode.orig/distinfo ode/distinfo --- ode.orig/distinfo Fri Jul 21 05:51:58 2006 +++ ode/distinfo Tue Jul 11 19:54:47 2006 @@ -1,3 +1,3 @@ -MD5 (ode-0.5.tgz) = b33b21e04ee9661f27802b6b6c8eefd2 -SHA256 (ode-0.5.tgz) = 5388c4cd4666f270f18216c90ab6526229c53fdc7e82f93ddb0824e69521df1c -SIZE (ode-0.5.tgz) = 1710720 +MD5 (ode-src-0.6.zip) = 7afdb1d434a1e2cc2d701fdf8d1f2fad +SHA256 (ode-src-0.6.zip) = 5bc01923bd68b122368f15d4e969bff4d53acbd69af521712b33181d47b36b88 +SIZE (ode-src-0.6.zip) = 1808849 diff -ruN ode.orig/files/patch-Makefile ode/files/patch-Makefile --- ode.orig/files/patch-Makefile Fri Jul 21 05:51:58 2006 +++ ode/files/patch-Makefile Thu Jan 1 03:00:00 1970 @@ -1,28 +0,0 @@ ---- Makefile.orig Wed Jun 9 16:12:12 2004 -+++ Makefile Wed Jun 9 16:13:39 2004 -@@ -329,13 +329,13 @@ - -$(DEL_CMD) OPCODE/*.obj OPCODE/*.o OPCODE/Ice/*.obj OPCODE/Ice/*.o - - %$(OBJ): %.c -- $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $< -+ $(CC) $(C_INC)$(INCPATH) $(C_FLAGS) $(DEFINES) $(C_OUT)$@ $< - - %$(OBJ): %.cpp -- $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(INC_OPCODE) $(DEFINES) $(C_OPT)$(OPT) $(C_OUT)$@ $< -+ $(CC) $(C_INC)$(INCPATH) $(C_FLAGS) $(INC_OPCODE) $(DEFINES) $(C_OUT)$@ $< - - %.exe: %$(OBJ) -- $(CC) $(C_EXEOUT)$@ $< $(ODE_LIB) $(DRAWSTUFF_LIB) $(RESOURCE_FILE) $(LINK_OPENGL) $(LINK_MATH) -+ $(CC) $(C_EXEOUT)$@ $< $(ODE_LIB) $(DRAWSTUFF_LIB) $(RESOURCE_FILE) $(LINK_OPENGL) $(LINK_MATH) ${LDFLAGS} - - - # windows specific rules -@@ -357,7 +357,7 @@ - - # unix-gcc specific dependency making - --DEP_RULE=gcc -M $(C_INC)$(INCPATH) $(DEFINES) -+DEP_RULE=${CC} -M $(C_INC)$(INCPATH) $(DEFINES) - depend: - $(DEP_RULE) $(ODE_SRC) $(ODE_PREGEN_SRC) | tools/process_deps ode/src/ > Makefile.deps - $(DEP_RULE) $(DRAWSTUFF_SRC) | tools/process_deps drawstuff/src/ >> Makefile.deps diff -ruN ode.orig/files/patch-OPC_TreeCollider.h ode/files/patch-OPC_TreeCollider.h --- ode.orig/files/patch-OPC_TreeCollider.h Fri Jul 21 05:51:58 2006 +++ ode/files/patch-OPC_TreeCollider.h Thu Jan 1 03:00:00 1970 @@ -1,30 +0,0 @@ ---- OPCODE/OPC_TreeCollider.h.orig Mon May 23 20:11:48 2005 -+++ OPCODE/OPC_TreeCollider.h Mon May 23 20:16:16 2005 -@@ -28,6 +28,13 @@ - //! even entering the recursive collision code. - struct OPCODE_API BVTCache : Pair - { -+ inline_ void ResetCountDown() -+ { -+#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! -+ CountDown = 50; -+#endif // __MESHMERIZER_H__ -+ } -+ - //! Constructor - inline_ BVTCache() - { -@@ -46,13 +53,6 @@ - SepVector.pid = 0; - SepVector.qid = 0; - SepVector.SV = Point(1.0f, 0.0f, 0.0f); --#endif // __MESHMERIZER_H__ -- } -- -- inline_ void ResetCountDown() -- { --#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! -- CountDown = 50; - #endif // __MESHMERIZER_H__ - } - diff -ruN ode.orig/files/patch-configurator.c ode/files/patch-configurator.c --- ode.orig/files/patch-configurator.c Fri Jul 21 05:51:58 2006 +++ ode/files/patch-configurator.c Thu Jan 1 03:00:00 1970 @@ -1,11 +0,0 @@ ---- configurator.c.orig Sat May 29 21:46:03 2004 -+++ configurator.c Tue Dec 6 03:48:15 2005 -@@ -222,7 +222,7 @@ - write_header_comment (file,"is this a pentium on a gcc-based platform?"); - write_to_file ("ctest.cpp", - "int main() {\n" -- " asm (\"mov $0,%%eax\\n cpuid\\n\" : : : \"%eax\");\n" -+ " asm (\"mov $0,%%eax\\n mov %%eax,(%%esi)\\n cpuid\\n\" : : : \"%eax\");\n" - " return 0;\n" - "}\n"); - delete_file ("ctest.exe"); diff -ruN ode.orig/pkg-plist ode/pkg-plist --- ode.orig/pkg-plist Fri Jul 21 05:51:58 2006 +++ ode/pkg-plist Mon Jul 17 00:12:20 2006 @@ -1,5 +1,4 @@ -lib/libdrawstuff.a -lib/libode.a +bin/ode-config include/ode/collision.h include/ode/collision_space.h include/ode/collision_trimesh.h @@ -21,4 +20,5 @@ include/ode/odemath.h include/ode/rotation.h include/ode/timer.h +lib/libode.a @dirrm include/ode --- ode.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060721020750.EF5AA3EB>