Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/bullet/files/, sci-physics/bullet/
Date: Wed, 16 Sep 2020 14:28:45
Message-Id: 1600266489.0835ccb1949dd9931fd761dd521bc56cf513233b.soap@gentoo
1 commit: 0835ccb1949dd9931fd761dd521bc56cf513233b
2 Author: Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
3 AuthorDate: Sun Aug 30 16:52:40 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 16 14:28:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0835ccb1
7
8 sci-physics/bullet: version bump to 2.89
9
10 Closes: https://github.com/gentoo/gentoo/pull/17235
11 Package-Manager: Portage-3.0.4, Repoman-3.0.1
12 Signed-off-by: Ross Charles Campbell <rossbridger.cc <AT> gmail.com>
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 sci-physics/bullet/Manifest | 1 +
16 sci-physics/bullet/bullet-2.89.ebuild | 90 ++++++++++++++++++++++
17 .../files/bullet-2.89-no-dangling-pointer.patch | 26 +++++++
18 sci-physics/bullet/metadata.xml | 1 +
19 4 files changed, 118 insertions(+)
20
21 diff --git a/sci-physics/bullet/Manifest b/sci-physics/bullet/Manifest
22 index e83d7e958cb..56f16cbaf73 100644
23 --- a/sci-physics/bullet/Manifest
24 +++ b/sci-physics/bullet/Manifest
25 @@ -1 +1,2 @@
26 DIST bullet-2.86.tar.gz 25806558 BLAKE2B a8576d8dacd67b9789d32d7b1acc6c4025df3c15427c60d66f98b1906eee8b2b94e5b0108b9a8c00ca6261510ccaf57ba5c02c72fee8f528d4f723b304166731 SHA512 af8a6b282ab606437d7975a59cd8a9c2bf273c83b0e79f0c4c1de6fa51695ba6d5f3c853dce2fdba9cb55e7572214e15089e54db51afc465ca26f502cbd5a4f9
27 +DIST bullet-2.89.tar.gz 135742506 BLAKE2B 3725533bb50f3cf4783e21c57a5e3596f280d9aa3caa5b7a44925d4785206cc86514ff89c2cc1e33f8a14af7c8a5165190bb0515a6931fc4c7ec2e2b9aef3dd8 SHA512 3c4ba6a3b3623ef44dd4a23e0bc2e90dec1f2b7af463edcb886e110feac1dfb4a91945f0ed640052cac228318539e275976d37238102fb10a0f78aef065a730b
28
29 diff --git a/sci-physics/bullet/bullet-2.89.ebuild b/sci-physics/bullet/bullet-2.89.ebuild
30 new file mode 100644
31 index 00000000000..24626f66775
32 --- /dev/null
33 +++ b/sci-physics/bullet/bullet-2.89.ebuild
34 @@ -0,0 +1,90 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +inherit cmake toolchain-funcs
41 +
42 +DESCRIPTION="Continuous Collision Detection and Physics Library"
43 +HOMEPAGE="http://www.bulletphysics.com/"
44 +SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="ZLIB"
47 +SLOT="0/${PV}"
48 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
49 +IUSE="+bullet3 doc double-precision examples extras openmp tbb test threads"
50 +
51 +REQUIRED_USE="
52 + openmp? ( threads )
53 + tbb? ( threads )
54 +"
55 +
56 +RDEPEND="
57 + virtual/opengl
58 + media-libs/freeglut
59 + tbb? ( dev-cpp/tbb )
60 +"
61 +DEPEND="${RDEPEND}"
62 +BDEPEND="doc? ( app-doc/doxygen[dot] )"
63 +
64 +PATCHES=(
65 + "${FILESDIR}"/${PN}-2.85-soversion.patch
66 + "${FILESDIR}"/${PN}-2.89-no-dangling-pointer.patch
67 +)
68 +
69 +DOCS=( AUTHORS.txt LICENSE.txt README.md )
70 +
71 +# Building / linking of third Party library BussIK does not work out of the box
72 +RESTRICT="test"
73 +
74 +S="${WORKDIR}/${PN}3-${PV}"
75 +
76 +pkg_pretend() {
77 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
78 +}
79 +
80 +pkg_setup() {
81 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
82 +}
83 +
84 +src_prepare() {
85 + cmake_src_prepare
86 +
87 + # allow to generate docs
88 + sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die
89 +}
90 +
91 +src_configure() {
92 + local mycmakeargs=(
93 + -DBUILD_CPU_DEMOS=OFF
94 + -DBUILD_OPENGL3_DEMOS=OFF
95 + -DBUILD_BULLET2_DEMOS=OFF
96 + -DUSE_GRAPHICAL_BENCHMARK=OFF
97 + -DINSTALL_LIBS=ON
98 + -DINSTALL_EXTRA_LIBS=ON
99 + -DBUILD_BULLET3=$(usex bullet3)
100 + -DBUILD_EXTRAS=$(usex extras)
101 + -DUSE_DOUBLE_PRECISION=$(usex double-precision)
102 + -DBUILD_UNIT_TESTS=$(usex test)
103 + -DBULLET2_MULTITHREADING=$(usex threads)
104 + -DBULLET2_USE_OPEN_MP_MULTITHREADING=$(usex openmp)
105 + -DBULLET2_USE_TBB_MULTITHREADING=$(usex tbb)
106 + )
107 + cmake_src_configure
108 +}
109 +
110 +src_compile() {
111 + cmake_src_compile
112 +
113 + if use doc; then
114 + doxygen || die
115 + HTML_DOCS+=( html/. )
116 + DOCS+=( docs/*.pdf )
117 + fi
118 +
119 + if use examples; then
120 + # throws QA warnings
121 + rm examples/ThirdPartyLibs/openvr/*/linux64/libopenvr_api.so || die
122 + DOCS+=( examples )
123 + fi
124 +}
125
126 diff --git a/sci-physics/bullet/files/bullet-2.89-no-dangling-pointer.patch b/sci-physics/bullet/files/bullet-2.89-no-dangling-pointer.patch
127 new file mode 100644
128 index 00000000000..8eee0016ae2
129 --- /dev/null
130 +++ b/sci-physics/bullet/files/bullet-2.89-no-dangling-pointer.patch
131 @@ -0,0 +1,26 @@
132 +From 1c64add35ed4918222ceb4fe93b7bef0e2b4e41c Mon Sep 17 00:00:00 2001
133 +From: stolk <b.stolk@×××××.com>
134 +Date: Wed, 1 Apr 2020 10:59:16 -0700
135 +Subject: [PATCH] Do not return a dangling pointer!
136 +
137 +Signed-off-by: Ross Charles Campbell <rossbridger.cc@×××××.com>
138 +---
139 + Extras/ConvexDecomposition/cd_wavefront.cpp | 2 +-
140 + 1 file changed, 1 insertion(+), 1 deletion(-)
141 +
142 +diff --git a/Extras/ConvexDecomposition/cd_wavefront.cpp b/Extras/ConvexDecomposition/cd_wavefront.cpp
143 +index b33080964..53b5784df 100644
144 +--- a/Extras/ConvexDecomposition/cd_wavefront.cpp
145 ++++ b/Extras/ConvexDecomposition/cd_wavefront.cpp
146 +@@ -437,7 +437,7 @@ const char **InPlaceParser::GetArglist(char *line, int &count) // convert sourc
147 + {
148 + const char **ret = 0;
149 +
150 +- const char *argv[MAXARGS];
151 ++ static const char *argv[MAXARGS];
152 + int argc = 0;
153 +
154 + char *foo = line;
155 +--
156 +2.28.0
157 +
158
159 diff --git a/sci-physics/bullet/metadata.xml b/sci-physics/bullet/metadata.xml
160 index 3304e14d402..8dc1b6e634b 100644
161 --- a/sci-physics/bullet/metadata.xml
162 +++ b/sci-physics/bullet/metadata.xml
163 @@ -22,6 +22,7 @@
164 <flag name="bullet3">Build Bullet 3</flag>
165 <flag name="double-precision">Build libraries in double precision</flag>
166 <flag name="extras">Build additional libraries</flag>
167 + <flag restrict="&gt;=sci-physics/bullet-2.89" name="tbb">Enable multithreading with the Intel Threads Building Block dev-cpp/tbb</flag>
168 </use>
169 <upstream>
170 <remote-id type="google-code">bullet</remote-id>