summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/box2d')
-rw-r--r--dev-libs/box2d/Manifest4
-rw-r--r--dev-libs/box2d/box2d-2.0.1.ebuild56
-rw-r--r--dev-libs/box2d/files/box2d-2.0.1-gcc4.patch25
-rw-r--r--dev-libs/box2d/metadata.xml9
4 files changed, 94 insertions, 0 deletions
diff --git a/dev-libs/box2d/Manifest b/dev-libs/box2d/Manifest
new file mode 100644
index 0000000..b3eaf8f
--- /dev/null
+++ b/dev-libs/box2d/Manifest
@@ -0,0 +1,4 @@
+AUX box2d-2.0.1-gcc4.patch 809 RMD160 2af0a29c3a8b9a09901939bcfbb27fe185c26fc1 SHA1 57115719f6de29b8601e2faddbe482c2a9a1dc29 SHA256 5aa81532c9039b9fdfa44dab6dac9cae4815731227e6a46d3a5fe12cb1acce0e
+DIST Box2D_v2.0.1.zip 866019 RMD160 4a1e4b62c814b9a562d1ca6b580bfec83a7ad8a9 SHA1 27a1a0bd08c81bbf661fa008645ee5c538bb2767 SHA256 62857048aa089b558561074154430883cee491eedd71247f75f488cba859e21f
+EBUILD box2d-2.0.1.ebuild 1207 RMD160 a023e169ab6e492e6b7390ef255e91ad61f0b4cb SHA1 d0eb14003361d748bdd8f9a0da44bae6818acb73 SHA256 0edb253964f1efbac2982b526ef6e553975adbd80f5f59bbdf17df8cb5a429af
+MISC metadata.xml 249 RMD160 220cde0fc1a8d7d355705f0f6772bd8d77cdc17a SHA1 34b33eb8d24cd8bfef2ddfb8e80334fd77cc9488 SHA256 3875fd5008d7f5bfe7f3cf7bf330c209a5034f5988d37c1699fb3be35a7be906
diff --git a/dev-libs/box2d/box2d-2.0.1.ebuild b/dev-libs/box2d/box2d-2.0.1.ebuild
new file mode 100644
index 0000000..767815d
--- /dev/null
+++ b/dev-libs/box2d/box2d-2.0.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+MY_PN=Box2D
+
+inherit eutils
+
+IUSE=""
+
+DESCRIPTION="Box2D is an open source physics engine written primarily for games."
+HOMEPAGE="http://www.box2d.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}_v${PV}.zip"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="media-libs/freeglut
+ app-arch/unzip"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_PN}_v${PV}/${MY_PN}/Source
+
+src_prepare(){
+ epatch "${FILESDIR}"/${P}-gcc4.patch
+ sed -i -e "s:../Source/::g" -i ../Include/Box2D.h || die sed failed
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ dodoc ../Readme.txt
+
+ dolib.a Gen/float/lib${PN}.a
+
+ insinto /usr/include/${MY_PN}/
+ doins ../Include/${MY_PN}.h
+ insinto /usr/include/${MY_PN}/Collision/
+ doins Collision/*.h
+ insinto /usr/include/${MY_PN}/Collision/Shapes/
+ doins Collision/Shapes/*.h
+ insinto /usr/include/${MY_PN}/Common/
+ doins Common/*.h
+ insinto /usr/include/${MY_PN}/Dynamics/
+ doins Dynamics/*.h
+ insinto /usr/include/${MY_PN}/Dynamics/Contacts/
+ doins Dynamics/Contacts/*.h
+ insinto /usr/include/${MY_PN}/Dynamics/Joints/
+ doins Dynamics/Joints/*.h
+}
diff --git a/dev-libs/box2d/files/box2d-2.0.1-gcc4.patch b/dev-libs/box2d/files/box2d-2.0.1-gcc4.patch
new file mode 100644
index 0000000..16da07c
--- /dev/null
+++ b/dev-libs/box2d/files/box2d-2.0.1-gcc4.patch
@@ -0,0 +1,25 @@
+diff -Naur Box2D/Source/Common/b2BlockAllocator.cpp Box2D/Source/Common/b2BlockAllocator.cpp
+--- Box2D/Source/Common/b2BlockAllocator.cpp 2007-11-24 11:25:02.000000000 +0100
++++ Box2D/Source/Common/b2BlockAllocator.cpp 2009-10-12 15:56:39.000000000 +0200
+@@ -20,6 +20,7 @@
+ #include <cstdlib>
+ #include <memory>
+ #include <climits>
++#include <cstring>
+
+ int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] =
+ {
+diff -Naur Box2D/Source/Common/b2Math.h Box2D/Source/Common/b2Math.h
+--- Box2D/Source/Common/b2Math.h 2008-04-07 23:35:04.000000000 +0200
++++ Box2D/Source/Common/b2Math.h 2009-10-12 15:55:44.000000000 +0200
+@@ -23,8 +23,8 @@
+ #include <cmath>
+ #include <cfloat>
+ #include <cstdlib>
+-
+-#include <stdio.h>
++#include <cstring>
++#include <cstdio>
+
+ #ifdef TARGET_FLOAT32_IS_FIXED
+
diff --git a/dev-libs/box2d/metadata.xml b/dev-libs/box2d/metadata.xml
new file mode 100644
index 0000000..4e4714e
--- /dev/null
+++ b/dev-libs/box2d/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>frostworks@gmx.de</email>
+ <name>Marcel Unbehaun</name>
+</maintainer>
+<herd>games</herd>
+</pkgmetadata>