- 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)
This commit is contained in:
Jose Alonso Cardenas Marquez 2006-08-20 08:28:29 +00:00
parent 71e184665c
commit f7d4516e1a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=171013
3 changed files with 107 additions and 17 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= crystalspace PORTNAME= crystalspace
PORTVERSION= 0.99 PORTVERSION= 0.99
PORTREVISION= 3 PORTREVISION= 4
CATEGORIES= graphics CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= crystal MASTER_SITE_SUBDIR= crystal
@ -16,15 +16,19 @@ DISTNAME= cs-pseudo-stable-2006-01-27
MAINTAINER= acm@FreeBSD.org MAINTAINER= acm@FreeBSD.org
COMMENT= Free and portable 3D Game Development Kit 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 \ LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg \ jpeg.9:${PORTSDIR}/graphics/jpeg \
aa.1:${PORTSDIR}/graphics/aalib \ aa.1:${PORTSDIR}/graphics/aalib \
openal.0:${PORTSDIR}/audio/openal \ 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_BZIP2= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
USE_GCC= 3.4+ USE_GCC= 3.4+
USE_GL= yes USE_GL= yes
@ -33,10 +37,15 @@ CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
MAKE_ENV= CC="${CC}" CFLAGS="${CFLAGS} ${CXX}" \ MAKE_ENV= CC="${CC}" CFLAGS="${CFLAGS} ${CXX}" \
CPPFLAGS="${CPPFLAGS} "LDFLAGS="${LDFLAGS}" 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} DOCSDIR= share/doc/${PORTNAME}-${PORTVERSION}
WRKSRC= ${WRKDIR}/CS WRKSRC= ${WRKDIR}/CS
JAM_CMD= ${LOCALBASE}/bin/jam
JAM_ARGS= -qa
OPTIONS= DEBUG "Build with debugging information" on \ OPTIONS= DEBUG "Build with debugging information" on \
PYTHON "PYTHON interface" on \ PYTHON "PYTHON interface" on \
PERL "PERL interface" on \ PERL "PERL interface" on \
@ -59,10 +68,6 @@ OPTIONS= DEBUG "Build with debugging information" on \
BROKEN= Does not compile BROKEN= Does not compile
.endif .endif
.if ${ARCH} != "i386"
BROKEN= Does not compile on ${ARCH}
.endif
.if !defined(WITHOUT_DEBUG) .if !defined(WITHOUT_DEBUG)
CONFIGURE_ARGS+= --enable-debug=yes CONFIGURE_ARGS+= --enable-debug=yes
.else .else
@ -127,7 +132,7 @@ CONFIGURE_ARGS+= --without-freetype2
.endif .endif
.if !defined(WITHOUT_CAL3D) .if !defined(WITHOUT_CAL3D)
LIB_DEPENDS+= cal3d.11:${PORTSDIR}/graphics/cal3d-devel LIB_DEPENDS+= cal3d.12:${PORTSDIR}/graphics/cal3d
.else .else
CONFIGURE_ARGS+= --without-cal3d CONFIGURE_ARGS+= --without-cal3d
.endif .endif
@ -167,4 +172,12 @@ post-configure:
@${REINPLACE_CMD} -e 79d ${WRKSRC}/Jamfile @${REINPLACE_CMD} -e 79d ${WRKSRC}/Jamfile
.endif .endif
do-build:
@cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${JAM_CMD} ${JAM_ARGS}
do-install:
@cd ${WRKSRC} && \
${JAM_CMD} install
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -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);
}

View file

@ -1,10 +1,7 @@
bin/python.cex
bin/csdemo
bin/3ds2lev bin/3ds2lev
bin/map2cs bin/ceguitest
bin/maya2spr bin/cs-config
bin/md32spr bin/csdemo
bin/md22spr
bin/csbench bin/csbench
bin/csfgen bin/csfgen
bin/cslight bin/cslight
@ -13,12 +10,16 @@ bin/heightmapgen
bin/levtool bin/levtool
bin/lighter bin/lighter
bin/lighter2 bin/lighter2
bin/map2cs
bin/maya2spr
bin/md32spr
bin/md22spr
bin/partedit bin/partedit
bin/python.cex
bin/startme bin/startme
bin/viewmesh bin/viewmesh
bin/vsh bin/vsh
bin/walktest bin/walktest
bin/cs-config
etc/crystalspace/asciiart.cfg etc/crystalspace/asciiart.cfg
etc/crystalspace/autoexec.cfg etc/crystalspace/autoexec.cfg
etc/crystalspace/awstest.cfg etc/crystalspace/awstest.cfg
@ -677,6 +678,7 @@ lib/crystalspace/x2d.so
lib/crystalspace/xext86vm.so lib/crystalspace/xext86vm.so
lib/crystalspace/xextshm.so lib/crystalspace/xextshm.so
lib/crystalspace/xwin.so lib/crystalspace/xwin.so
lib/crystalspace/cegui.so
lib/crystalspace/csbmpimg.so lib/crystalspace/csbmpimg.so
lib/crystalspace/csddsimg.so lib/crystalspace/csddsimg.so
lib/crystalspace/csgifimg.so lib/crystalspace/csgifimg.so