diff options
author | acm <acm@FreeBSD.org> | 2006-08-20 08:28:29 +0000 |
---|---|---|
committer | acm <acm@FreeBSD.org> | 2006-08-20 08:28:29 +0000 |
commit | 072b454d79885af542e17ac28716633136df545c (patch) | |
tree | 6eefc5184247a4b47c5a9751598363a6d1c17b56 /graphics/crystalspace | |
parent | 5e6173121b84c07c551f4acfca394aa945bc6cdb (diff) | |
download | FreeBSD-ports-072b454d79885af542e17ac28716633136df545c.zip FreeBSD-ports-072b454d79885af542e17ac28716633136df545c.tar.gz |
- Fix build on i386/amd64 [1]
- Fix pkg-plist
- Add missing dependencies
- Add CONFLICTS with graphics/crystalspace-devel (i'll commit it soon)
- Add one patch file for building this with new version of graphics/cal3d
- Others tiny modifications
Reported by: kris [1]
Approved by: garga (mentor)
Diffstat (limited to 'graphics/crystalspace')
-rw-r--r-- | graphics/crystalspace/Makefile | 33 | ||||
-rw-r--r-- | graphics/crystalspace/files/patch-plugins-mesh-sprcal3d-object_sprcal3d.cpp | 75 | ||||
-rw-r--r-- | graphics/crystalspace/pkg-plist | 16 |
3 files changed, 107 insertions, 17 deletions
diff --git a/graphics/crystalspace/Makefile b/graphics/crystalspace/Makefile index 25dea42..cba35de 100644 --- a/graphics/crystalspace/Makefile +++ b/graphics/crystalspace/Makefile @@ -7,7 +7,7 @@ PORTNAME= crystalspace PORTVERSION= 0.99 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= crystal @@ -16,15 +16,19 @@ DISTNAME= cs-pseudo-stable-2006-01-27 MAINTAINER= acm@FreeBSD.org COMMENT= Free and portable 3D Game Development Kit -BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm +BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm \ + swig:${PORTSDIR}/devel/swig13 \ + jam:${PORTSDIR}/devel/jam LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \ jpeg.9:${PORTSDIR}/graphics/jpeg \ aa.1:${PORTSDIR}/graphics/aalib \ openal.0:${PORTSDIR}/audio/openal \ - alut.1:${PORTSDIR}/audio/freealut + alut.1:${PORTSDIR}/audio/freealut \ + CEGUIBase.0:${PORTSDIR}/graphics/cegui + +CONFLICTS= crystalspace-devel-[0-9]* USE_BZIP2= yes -USE_GMAKE= yes GNU_CONFIGURE= yes USE_GCC= 3.4+ USE_GL= yes @@ -33,10 +37,15 @@ CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} MAKE_ENV= CC="${CC}" CFLAGS="${CFLAGS} ${CXX}" \ CPPFLAGS="${CPPFLAGS} "LDFLAGS="${LDFLAGS}" -CONFIGURE_ARGS+= --enable-cpu-specific-optimizations=no +CONFIGURE_ARGS+= --enable-cpu-specific-optimizations=no \ + --disable-make-emulation \ + --prefix=${PREFIX} DOCSDIR= share/doc/${PORTNAME}-${PORTVERSION} WRKSRC= ${WRKDIR}/CS +JAM_CMD= ${LOCALBASE}/bin/jam +JAM_ARGS= -qa + OPTIONS= DEBUG "Build with debugging information" on \ PYTHON "PYTHON interface" on \ PERL "PERL interface" on \ @@ -59,10 +68,6 @@ OPTIONS= DEBUG "Build with debugging information" on \ BROKEN= Does not compile .endif -.if ${ARCH} != "i386" -BROKEN= Does not compile on ${ARCH} -.endif - .if !defined(WITHOUT_DEBUG) CONFIGURE_ARGS+= --enable-debug=yes .else @@ -127,7 +132,7 @@ CONFIGURE_ARGS+= --without-freetype2 .endif .if !defined(WITHOUT_CAL3D) -LIB_DEPENDS+= cal3d.11:${PORTSDIR}/graphics/cal3d-devel +LIB_DEPENDS+= cal3d.12:${PORTSDIR}/graphics/cal3d .else CONFIGURE_ARGS+= --without-cal3d .endif @@ -167,4 +172,12 @@ post-configure: @${REINPLACE_CMD} -e 79d ${WRKSRC}/Jamfile .endif +do-build: + @cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${JAM_CMD} ${JAM_ARGS} + +do-install: + @cd ${WRKSRC} && \ + ${JAM_CMD} install + .include <bsd.port.post.mk> diff --git a/graphics/crystalspace/files/patch-plugins-mesh-sprcal3d-object_sprcal3d.cpp b/graphics/crystalspace/files/patch-plugins-mesh-sprcal3d-object_sprcal3d.cpp new file mode 100644 index 0000000..0f10319 --- /dev/null +++ b/graphics/crystalspace/files/patch-plugins-mesh-sprcal3d-object_sprcal3d.cpp @@ -0,0 +1,75 @@ +--- plugins/mesh/sprcal3d/object/sprcal3d.cpp Wed Aug 16 10:45:55 2006 ++++ plugins/mesh/sprcal3d/object/sprcal3d.cpp Wed Aug 16 23:34:50 2006 +@@ -53,6 +53,8 @@ + + + #include "sprcal3d.h" ++#include <cal3d/coretrack.h> ++#include <cal3d/corekeyframe.h> + + // STL include required by cal3d + #include <string> +@@ -657,10 +659,12 @@ + ->getVectorCoreBone(); + + // loop through all root core bones +- std::list<int>::iterator iteratorRootCoreBoneId; +- for (iteratorRootCoreBoneId = pCoreSkeleton->getListRootCoreBoneId().begin() +- ; iteratorRootCoreBoneId != pCoreSkeleton->getListRootCoreBoneId().end() +- ; ++iteratorRootCoreBoneId) ++ std::vector<int>& rootCoreBones = ++ pCoreSkeleton->getVectorRootCoreBoneId(); ++ std::vector<int>::iterator iteratorRootCoreBoneId; ++ for (iteratorRootCoreBoneId = rootCoreBones.begin(); ++ iteratorRootCoreBoneId != rootCoreBones.end(); ++ ++iteratorRootCoreBoneId) + { + CalCoreBone *bone = vectorCoreBone[*iteratorRootCoreBoneId]; + CalQuaternion bonerot = bone->getRotation(); +@@ -677,32 +681,25 @@ + { + CalCoreAnimation *anim = calCoreModel.getCoreAnimation(i); + if (!anim) continue; +- +- const uint trackCount = anim->getTrackCount(); +- std::vector<CalTransform> poses = anim->getPoses(); +- const uint frameCount = (uint)poses.size() / trackCount; +- + // loop through all root core bones +- std::list<int>::iterator iteratorRootCoreBoneId; +- for (iteratorRootCoreBoneId = pCoreSkeleton->getListRootCoreBoneId().begin() +- ; iteratorRootCoreBoneId != pCoreSkeleton->getListRootCoreBoneId().end() +- ; ++iteratorRootCoreBoneId) ++ for (iteratorRootCoreBoneId = rootCoreBones.begin(); ++ iteratorRootCoreBoneId != rootCoreBones.end(); ++ ++iteratorRootCoreBoneId) + { +- int boneTrack = anim->getTrackAssignment (*iteratorRootCoreBoneId); +- if (boneTrack < 0) continue; +- for (uint j = 0; j < frameCount; j++) ++ CalCoreTrack *track = anim->getCoreTrack(*iteratorRootCoreBoneId); ++ if (!track) continue; ++ for (int j=0; j<track->getCoreKeyframeCount(); j++) + { +- CalTransform& tf = poses[j * trackCount + boneTrack]; +- CalQuaternion bonerot = tf.getRotation(); +- CalVector bonevec = tf.getTranslation(); +- bonerot *= quatrot; +- bonevec *= quatrot; +- bonevec += translation; +- tf.setRotation (bonerot); +- tf.setTranslation (bonevec); ++ CalCoreKeyframe *frame = track->getCoreKeyframe(j); ++ CalQuaternion bonerot = frame->getRotation(); ++ CalVector bonevec = frame->getTranslation(); ++ bonerot *= quatrot; ++ bonevec *= quatrot; ++ bonevec += translation; ++ frame->setRotation(bonerot); ++ frame->setTranslation(bonevec); + } + } +- anim->setPoses (poses, trackCount); + } + // calCoreModel.getCoreSkeleton()->calculateBoundingBoxes(&calCoreModel); + } diff --git a/graphics/crystalspace/pkg-plist b/graphics/crystalspace/pkg-plist index 21cac20..96fb5be 100644 --- a/graphics/crystalspace/pkg-plist +++ b/graphics/crystalspace/pkg-plist @@ -1,10 +1,7 @@ -bin/python.cex -bin/csdemo bin/3ds2lev -bin/map2cs -bin/maya2spr -bin/md32spr -bin/md22spr +bin/ceguitest +bin/cs-config +bin/csdemo bin/csbench bin/csfgen bin/cslight @@ -13,12 +10,16 @@ bin/heightmapgen bin/levtool bin/lighter bin/lighter2 +bin/map2cs +bin/maya2spr +bin/md32spr +bin/md22spr bin/partedit +bin/python.cex bin/startme bin/viewmesh bin/vsh bin/walktest -bin/cs-config etc/crystalspace/asciiart.cfg etc/crystalspace/autoexec.cfg etc/crystalspace/awstest.cfg @@ -677,6 +678,7 @@ lib/crystalspace/x2d.so lib/crystalspace/xext86vm.so lib/crystalspace/xextshm.so lib/crystalspace/xwin.so +lib/crystalspace/cegui.so lib/crystalspace/csbmpimg.so lib/crystalspace/csddsimg.so lib/crystalspace/csgifimg.so |