Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: Chipmunk2D-7.0.2
Date: Fri, 03 May 2019 12:25:13 +0200	[thread overview]
Message-ID: <20190503102513.UTm2f_Y_wcE-ICmffVn4h-Eiu27OLJaxrCNEpzP3CiU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11439@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

There is an updated pull request by vaartis against master on the void-packages repository

https://github.com/vaartis/void-packages chipmunk
https://github.com/void-linux/void-packages/pull/11439

New package: Chipmunk2D-7.0.2
A fast and lightweight 2D game physics library.

A patch file from https://github.com/void-linux/void-packages/pull/11439.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chipmunk-11439.patch --]
[-- Type: application/text/x-diff, Size: 4320 bytes --]

From 4160d28c4105b7e99ef9d50657101afc90816b16 Mon Sep 17 00:00:00 2001
From: Ekaterina Vaartis <vaartis@cock.li>
Date: Thu, 2 May 2019 21:01:12 +0300
Subject: [PATCH] New package: Chipmunk2D-7.0.2

---
 common/shlibs                                 |  1 +
 srcpkgs/Chipmunk2D-devel                      |  1 +
 .../patches/backport-zero-division.patch      | 35 +++++++++++++++++++
 srcpkgs/Chipmunk2D/patches/musl-sysctl.patch  | 14 ++++++++
 srcpkgs/Chipmunk2D/template                   | 29 +++++++++++++++
 srcpkgs/Chipmunk2D/update                     |  1 +
 6 files changed, 81 insertions(+)
 create mode 120000 srcpkgs/Chipmunk2D-devel
 create mode 100644 srcpkgs/Chipmunk2D/patches/backport-zero-division.patch
 create mode 100644 srcpkgs/Chipmunk2D/patches/musl-sysctl.patch
 create mode 100644 srcpkgs/Chipmunk2D/template
 create mode 100644 srcpkgs/Chipmunk2D/update

diff --git a/common/shlibs b/common/shlibs
index 5bdd8d9832a..8e6bb0a1d9d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3450,3 +3450,4 @@ liboblibs.so.0.0 oblibs-0.0.1.1_1
 libaal-1.0.so.7 libaal-1.0.7_1
 libaal-minimal.so.0 libaal-1.0.7_1
 libcli.so.1.9 libcli-1.9.8.4_1
+libchipmunk.so.7 Chipmunk2D-7.0.2_1
diff --git a/srcpkgs/Chipmunk2D-devel b/srcpkgs/Chipmunk2D-devel
new file mode 120000
index 00000000000..30953c01c83
--- /dev/null
+++ b/srcpkgs/Chipmunk2D-devel
@@ -0,0 +1 @@
+Chipmunk2D
\ No newline at end of file
diff --git a/srcpkgs/Chipmunk2D/patches/backport-zero-division.patch b/srcpkgs/Chipmunk2D/patches/backport-zero-division.patch
new file mode 100644
index 00000000000..8c95a2ac832
--- /dev/null
+++ b/srcpkgs/Chipmunk2D/patches/backport-zero-division.patch
@@ -0,0 +1,35 @@
+From 6a5767cc5a6c8f88f8cc689c0916ddc0111308fe Mon Sep 17 00:00:00 2001
+From: Bram Stolk <b.stolk@gmail.com>
+Date: Fri, 30 Mar 2018 19:21:26 -0700
+Subject: [PATCH] Fix issue #144 of division by zero when setting zero mass,
+ zero moment.
+
+---
+ src/cpBody.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git src/cpBody.c src/cpBody.c
+index a8e0797..8ad2bc9 100644
+--- src/cpBody.c
++++ src/cpBody.c
+@@ -258,7 +258,7 @@ cpBodySetMass(cpBody *body, cpFloat mass)
+ 	
+ 	cpBodyActivate(body);
+ 	body->m = mass;
+-	body->m_inv = 1.0f/mass;
++	body->m_inv = mass == 0.0f ? INFINITY : 1.0f/mass;
+ 	cpAssertSaneBody(body);
+ }
+ 
+@@ -275,7 +275,7 @@ cpBodySetMoment(cpBody *body, cpFloat moment)
+ 	
+ 	cpBodyActivate(body);
+ 	body->i = moment;
+-	body->i_inv = 1.0f/moment;
++	body->i_inv = moment == 0.0f ? INFINITY : 1.0f/moment;
+ 	cpAssertSaneBody(body);
+ }
+ 
+-- 
+2.21.0
+
diff --git a/srcpkgs/Chipmunk2D/patches/musl-sysctl.patch b/srcpkgs/Chipmunk2D/patches/musl-sysctl.patch
new file mode 100644
index 00000000000..7b154bc62a8
--- /dev/null
+++ b/srcpkgs/Chipmunk2D/patches/musl-sysctl.patch
@@ -0,0 +1,14 @@
+diff --git src/cpHastySpace.c src/cpHastySpace.c
+index 8dca425..e087df8 100644
+--- src/cpHastySpace.c
++++ src/cpHastySpace.c
+@@ -8,7 +8,9 @@
+ 
+ //#include <sys/param.h >
+ #ifndef _WIN32
++#ifdef __APPLE__
+ #include <sys/sysctl.h>
++#endif
+ #include <pthread.h>
+ #else
+ #ifndef WIN32_LEAN_AND_MEAN
diff --git a/srcpkgs/Chipmunk2D/template b/srcpkgs/Chipmunk2D/template
new file mode 100644
index 00000000000..7b80d185230
--- /dev/null
+++ b/srcpkgs/Chipmunk2D/template
@@ -0,0 +1,29 @@
+# Template file for 'Chipmunk2D'
+pkgname=Chipmunk2D
+version=7.0.2
+revision=1
+wrksrc="Chipmunk2D-Chipmunk-${version}"
+build_style=cmake
+short_desc="Fast and lightweight 2D game physics library"
+maintainer="Ekaterina Vaartis <vaartis@cock.li>"
+license="MIT"
+homepage="http://chipmunk-physics.net/"
+distfiles="https://github.com/slembcke/Chipmunk2D/archive/Chipmunk-${version}.tar.gz"
+checksum="6b6d8d5d910c4442fb9c8c4c46a178126d8c21d075cdb3ce439a7f8d8757b0ca"
+
+configure_args="-DBUILD_DEMOS=NO"
+
+post_install() {
+	vlicense LICENSE.txt
+}
+
+Chipmunk2D-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/Chipmunk2D/update b/srcpkgs/Chipmunk2D/update
new file mode 100644
index 00000000000..fe81afc6880
--- /dev/null
+++ b/srcpkgs/Chipmunk2D/update
@@ -0,0 +1 @@
+pkgname=Chipmunk
\ No newline at end of file

  parent reply	other threads:[~2019-05-03 10:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11439@inbox.vuxu.org>
2019-05-03  8:21 ` voidlinux-github
2019-05-03 10:25 ` [PR PATCH] [Updated] " voidlinux-github
2019-05-03 10:25 ` voidlinux-github [this message]
2019-05-06 13:19 ` voidlinux-github
2019-05-06 13:19 ` voidlinux-github
2019-05-06 14:11 ` voidlinux-github
2019-05-06 14:28 ` [PR PATCH] [Updated] " voidlinux-github
2019-05-06 14:28 ` voidlinux-github
2019-05-09  7:53 ` voidlinux-github
2019-05-09 21:15 ` voidlinux-github
2019-05-09 21:16 ` voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190503102513.UTm2f_Y_wcE-ICmffVn4h-Eiu27OLJaxrCNEpzP3CiU@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).