You are not logged in.

#1 2005-05-07 14:00:14

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

[Lib: Development] ODE + OPAL + tinyxml

packages are 100% working

OPAL is a nice, high level physics layer on various physics libraries (currently only ODE, however its abstraction is very clean)
anyone whos used commercial libraries like Havok will really like this one.

ODE isnt the best physics library (try stacking alot of boxes!), but its BSD based so its totally free to anyone to use it.


ill add these (and my others) to AUR when i get the time


Note:
the library for tinyxml is currently made in the OPAL pkgbuild.. which is very bad.. but tiny doesnt have its own make files to generate a static library, only a test binary..
so for now itll have to do


here are the pkgbuilds


tinyxml
PKGBUILD

#contributor: Adam Griffiths <adam_griffithsAATTdart.net.au>
pkgname=tinyxml
pkgver=2.3.4
pkgrel=1
pkgdesc="TinyXml is a simple, small, C++ XML parser that can be easily integrating into other programs"
url="http://www.grinninglizard.com/tinyxml/"
license="zlib"
depends=()
source=(http://dl.sourceforge.net/sourceforge/tinyxml/tinyxml_2_3_4.tar.gz)

build()
{
  cd $startdir/src/$pkgname

  # Copy the includes since this is statically linked
  mkdir -p $startdir/pkg/usr/include/tinyxml
  mv {*.h,*.cpp,} $startdir/pkg/usr/include/tinyxml
}
md5sums=('4f79905f053c9f8bae091fedd0fe1581')


ODE
PKGBUILD

#contributor: Adam Griffiths <adam_griffithsAATTdart.net.au>
pkgname=ode
pkgver=0.5
pkgrel=1
pkgdesc="Open Dynamics Engine - ODE is an open source, high performance library for simulating rigid body dynamics."
url="http://ode.org/"
license="LGPL"
depends=()
source=(http://dl.sourceforge.net/sourceforge/opende/$pkgname-$pkgver.tgz)

build()
{
  # Allow for tri-meshes
  sed -i "s#OPCODE_DIRECTORY=OPCODEOPCODE_DIRECTORY=OPCODE\" $startdir/src/$pkgname-$pkgver/config/user-settings

  cd $startdir/src/$pkgname-$pkgver

  ./configure

  make || return 1

  # Manually copy the files since ODE doesnt have a `make install'
  mkdir -p $startdir/pkg/usr
  mv {include,lib} $startdir/pkg/usr
}
md5sums=('b33b21e04ee9661f27802b6b6c8eefd2')


OPAL
PKGBUILD

#contributor: Adam Griffiths <adam_griffithsAATTdart.net.au>
pkgname=opal
pkgver=0.3.0
pkgrel=1
pkgdesc="Open Physics Abstraction Layer - OPAL is a high-level interface for low-level physics engines used in games, robotics simulations, and other 3D applications."
url="http://opal.sourceforge.net/"
license="LGPL"
depends=('ode' 'tinyxml' 'scons')
source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver-src.zip)

build()
{
  cd $startdir/src/$pkgname-$pkgver-src/

  # Replace OPAL's single precision typedef with a double precision which is ODE's default
  sed -i "stypedef float real;typedef double real;\" $startdir/src/$pkgname-$pkgver-src/src/OpalMath.h

  # Copy the tinyxml files and create a static library for OPAL to use
  sed -i '10,20d' $startdir/src/opal-0.3.0-src/tools/tinyxml/SConstruct
  cp /usr/include/tinyxml/* $startdir/src/opal-0.3.0-src/tools/tinyxml
  cd $startdir/src/opal-0.3.0-src/tools/tinyxml
  scons

  # Temporarily copy the library for compilation
  cp $startdir/src/opal-0.3.0-src/tools/tinyxml/libtinyxml.a /usr/lib

  cd $startdir/src/$pkgname-$pkgver-src/
  scons ODE install prefix=$startdir/pkg/usr

  # Move the library back to our package
  mkdir -p $startdir/pkg/usr/lib
  mv /usr/lib/libtinyxml.a $startdir/pkg/usr/lib
}
md5sums=('5b84f09e4f390838a84ad9023097ec39')

Offline

#2 2005-05-07 14:52:35

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: [Lib: Development] ODE + OPAL + tinyxml

I get that ld-error on a number of packages for the i586 port. I still have no idea why tho.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#3 2005-05-07 16:39:44

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Re: [Lib: Development] ODE + OPAL + tinyxml

the $startdir/src/opal-0.3.0-/src/SConscript file has a block of code like this

# Add in XML source if desired
if env['XML']:
        if env['debug'] == True:
                env.Append(LIBS = ['tinyxmld'])
        else:
                env.Append(LIBS = ['tinyxml'])

if i comment it out, opal compiles, atleast i think it does.. it was pretty quick.. heh.. so i _hope_ its right

now i just have to get my head around `sed' so i can put it in the pkgbuild.. eugh..

Offline

#4 2005-05-07 21:58:30

droog
Member
Registered: 2004-11-18
Posts: 877

Re: [Lib: Development] ODE + OPAL + tinyxml

for deleting several lines like that, there is a nice way to do it with vim in the pkgbuild, Check out the rox pkgbuild, i think thats where i saw it. unless its easier with sed..

Offline

#5 2005-05-08 00:06:44

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: [Lib: Development] ODE + OPAL + tinyxml

droog wrote:

for deleting several lines like that, there is a nice way to do it with vim in the pkgbuild, Check out the rox pkgbuild, i think thats where i saw it. unless its easier with sed..

well, it 's easy to sed /14,25d/ , but, out of curiosity, what comes to mind
(in sed syntax) when asking for:
- find a match
- delete specified number of subsequent lines

i don't find an easy sed command for that.

-neri

Offline

#6 2005-05-08 05:32:35

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Re: [Lib: Development] ODE + OPAL + tinyxml

thanks for the suggestion guys, it made me go and search for a sed tute and i found one that was _reasonably_ well explained..

ive updated the packages above

Offline

Board footer

Powered by FluxBB