[gentoo-commits] repo/gentoo:master commit in: sci-physics/bullet/, sci-physics/bullet/files/

2022-11-27 Thread Andrew Ammerlaan
commit: 884d9dafc85fe80042e62fd1434e9ca7e8668183
Author: Niccolò Belli  linuxsystems  it>
AuthorDate: Tue Nov  8 11:40:14 2022 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sun Nov 27 21:45:46 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=884d9daf

sci-physics/bullet: rename altivec vector keywords

Altivec vectors can be defined with either the "vector" keyword or the
"__vector" type. In general "__vector" should be prefered for
include files, as otherwise it might conflicts with other type define
in the source code (define a vector class in C++ is quite common).
This causes bullet to fail to build on powerpc if the
code is compiled with -maltivec, or by default on ppc64el which always
has altivec enabled.

See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760310
Closes: https://bugs.gentoo.org/852101
Signed-off-by: Niccolò Belli  linuxsystems.it>
Closes: https://github.com/gentoo/gentoo/pull/28193
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 sci-physics/bullet/bullet-3.21.ebuild  |  2 ++
 ...ullet-3.21-replace_altivec_vector_keyword.patch | 24 ++
 2 files changed, 26 insertions(+)

diff --git a/sci-physics/bullet/bullet-3.21.ebuild 
b/sci-physics/bullet/bullet-3.21.ebuild
index 2dd6ebe42362..fab2d923dee4 100644
--- a/sci-physics/bullet/bullet-3.21.ebuild
+++ b/sci-physics/bullet/bullet-3.21.ebuild
@@ -45,6 +45,8 @@ pkg_setup() {
 }
 
 src_prepare() {
+   (use ppc || use ppc64) && PATCHES+=( 
"${FILESDIR}/${P}-replace_altivec_vector_keyword.patch" )
+
cmake_src_prepare
 
# allow to generate docs

diff --git 
a/sci-physics/bullet/files/bullet-3.21-replace_altivec_vector_keyword.patch 
b/sci-physics/bullet/files/bullet-3.21-replace_altivec_vector_keyword.patch
new file mode 100644
index ..01ef90646d5b
--- /dev/null
+++ b/sci-physics/bullet/files/bullet-3.21-replace_altivec_vector_keyword.patch
@@ -0,0 +1,24 @@
+--- a/src/clew/clew.h  2022-02-16 18:12:48.879740507 +0100
 b/src/clew/clew.h  2022-02-16 18:13:32.403061196 +0100
+@@ -319,14 +319,14 @@
+ 
+ /* Define basic vector types */
+ #if defined(__VEC__)
+ #include  /* may be omitted depending on compiler. AltiVec spec 
provides no way to detect whether the header is required. */
+-  typedef vector unsigned char __cl_uchar16;
+-  typedef vector signed char __cl_char16;
+-  typedef vector unsigned short __cl_ushort8;
+-  typedef vector signed short __cl_short8;
+-  typedef vector unsigned int __cl_uint4;
+-  typedef vector signed int __cl_int4;
+-  typedef vector float __cl_float4;
++   typedef __vector unsigned char __cl_uchar16;
++   typedef __vector signed char   __cl_char16;
++   typedef __vector unsigned short__cl_ushort8;
++   typedef __vector signed short  __cl_short8;
++   typedef __vector unsigned int  __cl_uint4;
++   typedef __vector signed int__cl_int4;
++   typedef __vector float __cl_float4;
+ #define __CL_UCHAR16__ 1
+ #define __CL_CHAR16__ 1
+ #define __CL_USHORT8__ 1



[gentoo-commits] repo/gentoo:master commit in: sci-physics/bullet/, sci-physics/bullet/files/

2016-11-13 Thread David Seifert
commit: 61a570da371183a1e5fc01fa4cae5b1574279e45
Author: Gerhard Bräunlich  gmx  net>
AuthorDate: Sat Nov 12 14:51:53 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Sun Nov 13 21:48:21 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61a570da

sci-physics/bullet: Version bump to 2.85, EAPI bump 5 -> 6

Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2820

Signed-off-by: David Seifert  gentoo.org>

 sci-physics/bullet/Manifest|  1 +
 sci-physics/bullet/bullet-2.85.ebuild  | 74 ++
 .../bullet/files/bullet-2.85-soversion.patch   | 31 +
 3 files changed, 106 insertions(+)

diff --git a/sci-physics/bullet/Manifest b/sci-physics/bullet/Manifest
index 424ca80..f840c00 100644
--- a/sci-physics/bullet/Manifest
+++ b/sci-physics/bullet/Manifest
@@ -1,2 +1,3 @@
 DIST bullet-2.83.4.tar.gz 17529283 SHA256 
2cf287cead9a116c56f6d6f15f73dc8b3ed1fe407ef2ca894027d585fab07341 SHA512 
1a10a11671bd152835a45d44a1b3214e29c255338405705f2aaa41adfbdb545ec02f09b94003b836fafcc2b59b836e5b749696a5bb3489ec7050af0d02d9b2e1
 WHIRLPOOL 
7a47229112fdd1c96e232b91d734ff10c2b6cf6ff0563bd3e6fa4c113112fe3f169dc0e42fee56aacf66b6717a10901f0c61c618a6c691bf1eb3cbcefbf2
 DIST bullet-2.83.5.tar.gz 17759627 SHA256 
df6d58898d3d3bf117854dd64467dbd09625e048624c797649b46bf1c595b152 SHA512 
9e1ca7b3afb700bfafc2d39d8ec8b004b5bae7788385e763c15a63a7754c50bfd79e1a6ab501569b613eb5a9c132688c747aa70db0b80099cfe40b6146c32290
 WHIRLPOOL 
6c304902dd6bc9e800befe5c214adcec48e068e6db288ddf211ce17af74abd8ebc44a34ee1349a17bd22e1f9c316782d7680bb55566b4100b2f788377921be29
+DIST bullet-2.85.tar.gz 24020355 SHA256 
0dc3c9488c2b4176f916640ca57860d6689890d0f58c6fceed0f10ddc1fa082f SHA512 
f13abb85864202161d1c19596e290735848a7de53ffe09aa8f656d80a523f6382c0f7864a104ee8c437cf88e0f593c4682ecbb87d74adfe1cc868c1a36d3ecea
 WHIRLPOOL 
1c4c576df02633f53d255dad0f690e2e30e26604b95a87c79032ce8059b5705f7685af5cc832151c83d410624d41cc21ab35c38593c662ea0bd78ddb1247946c

diff --git a/sci-physics/bullet/bullet-2.85.ebuild 
b/sci-physics/bullet/bullet-2.85.ebuild
new file mode 100644
index ..8190ebc
--- /dev/null
+++ b/sci-physics/bullet/bullet-2.85.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Continuous Collision Detection and Physics Library"
+HOMEPAGE="http://www.bulletphysics.com/;
+SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+bullet3 doc double-precision examples extras test"
+
+RDEPEND="
+   virtual/opengl
+   media-libs/freeglut"
+DEPEND="${RDEPEND}
+   doc? ( app-doc/doxygen[dot] )"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.85-soversion.patch )
+
+DOCS=( AUTHORS.txt LICENSE.txt README.md )
+
+# Building / linking of third Party library BussIK does not work out of the box
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}3-${PV}"
+
+src_prepare() {
+   cmake-utils_src_prepare
+
+   # allow to generate docs
+   sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die
+}
+
+src_configure() {
+   local mycmakeargs=(
+   -DBUILD_SHARED_LIBS=ON
+   -DBUILD_CPU_DEMOS=OFF
+   -DBUILD_OPENGL3_DEMOS=OFF
+   -DBUILD_BULLET2_DEMOS=OFF
+   -DUSE_GRAPHICAL_BENCHMARK=OFF
+   -DINSTALL_LIBS=ON
+   -DINSTALL_EXTRA_LIBS=ON
+   -DBUILD_BULLET3=$(usex bullet3)
+   -DBUILD_EXTRAS=$(usex extras)
+   -DUSE_DOUBLE_PRECISION=$(usex double-precision)
+   -DBUILD_UNIT_TESTS=$(usex test)
+   )
+   cmake-utils_src_configure
+}
+
+src_compile() {
+   cmake-utils_src_compile
+
+   if use doc; then
+   doxygen || die
+   HTML_DOCS+=( html/. )
+   DOCS+=( docs/*.pdf )
+   fi
+}
+
+src_install() {
+   cmake-utils_src_install
+
+   if use examples; then
+   dodoc -r examples
+   docompress -x /usr/share/doc/${PF}/examples
+   fi
+}

diff --git a/sci-physics/bullet/files/bullet-2.85-soversion.patch 
b/sci-physics/bullet/files/bullet-2.85-soversion.patch
new file mode 100644
index ..74cfe4e
--- /dev/null
+++ b/sci-physics/bullet/files/bullet-2.85-soversion.patch
@@ -0,0 +1,31 @@
+ Extras/Serialize/BulletFileLoader/CMakeLists.txt   |2 ++
+ .../Serialize/BulletWorldImporter/CMakeLists.txt   |2 ++
+ Extras/glui/CMakeLists.txt |2 ++
+ 3 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/Extras/Serialize/BulletFileLoader/CMakeLists.txt 
b/Extras/Serialize/BulletFileLoader/CMakeLists.txt
+index 486cfdc..f1e0884 100644
+--- a/Extras/Serialize/BulletFileLoader/CMakeLists.txt