From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: [PATCH v4] gnu: Add bullet. Date: Sat, 13 Dec 2014 10:58:44 -0500 Message-ID: <877fxvfsnf.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: <87vblhynx2.fsf@netris.org> <1418474497-6119-1-git-send-email-sleep_walker@suse.cz> <1418474497-6119-2-git-send-email-sleep_walker@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzp5k-0006OO-Rg for guix-devel@gnu.org; Sat, 13 Dec 2014 10:58:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xzp5j-0006X1-Ea for guix-devel@gnu.org; Sat, 13 Dec 2014 10:58:48 -0500 Received: from mail.fsf.org ([208.118.235.13]:35427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzp5j-0006Wx-Ao for guix-devel@gnu.org; Sat, 13 Dec 2014 10:58:47 -0500 In-Reply-To: <1418474497-6119-2-git-send-email-sleep_walker@suse.cz> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?utf-8?B?VG9tw6HFoSDEjGVjaA==?= , guix-devel@gnu.org Tom=C3=A1=C5=A1 =C4=8Cech writes: > * gnu/packages/game-development.scm: New file > * gnu-system.am (GNU_SYSTEM_MODULES): Add it. > * gnu/packages/patches/bullet-add-fPIC-into-flags.patch: New file > * gnu-system.am (dist_patch_DATA): Add it. > --- > gnu-system.am | 2 + > gnu/packages/game-development.scm | 44 ++++++++++++++++= ++++++ > .../patches/bullet-add-fPIC-into-flags.patch | 13 +++++++ > 3 files changed, 59 insertions(+) > create mode 100644 gnu/packages/game-development.scm > create mode 100644 gnu/packages/patches/bullet-add-fPIC-into-flags.patch > > diff --git a/gnu-system.am b/gnu-system.am > index e828c01..d4c806e 100644 > --- a/gnu-system.am > +++ b/gnu-system.am > @@ -96,6 +96,7 @@ GNU_SYSTEM_MODULES =3D \ > gnu/packages/freeipmi.scm \ > gnu/packages/ftp.scm \ > gnu/packages/fribidi.scm \ > + gnu/packages/game-development.scm \ > gnu/packages/games.scm \ > gnu/packages/gawk.scm \ > gnu/packages/gcal.scm \ > @@ -334,6 +335,7 @@ dist_patch_DATA =3D \ > gnu/packages/patches/bigloo-gc-shebangs.patch \ > gnu/packages/patches/binutils-ld-new-dtags.patch \ > gnu/packages/patches/binutils-loongson-workaround.patch \ > + gnu/packages/patches/bullet-add-fPIC-into-flags.patch \ > gnu/packages/patches/cdparanoia-fpic.patch \ > gnu/packages/patches/clucene-pkgconfig.patch \ > gnu/packages/patches/cmake-fix-tests.patch \ > diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-develo= pment.scm > new file mode 100644 > index 0000000..96a87e1 > --- /dev/null > +++ b/gnu/packages/game-development.scm > @@ -0,0 +1,44 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2014 Tom=C3=A1=C5=A1 =C4=8Cech > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (gnu packages game-development) > + #:use-module (guix licenses) > + #:use-module (guix packages) > + #:use-module (guix download) > + #:use-module (guix build-system cmake) > + #:use-module (gnu packages)) > + > +(define-public bullet > + (package > + (name "bullet") > + (version "2.82-r2704") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://bullet.googlecode.com/files/b= ullet-" > + version ".tgz")) > + (sha256 > + (base32 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmw= kr37")) > + (patches (list (search-patch "bullet-add-fPIC-into-flags.p= atch"))))) > + (build-system cmake-build-system) > + (arguments '(#:tests? #f)) ; no 'test' target > + (home-page "http://bulletphysics.org/") > + (synopsis "3D physics engine library") > + (description > + "Bullet is a physics engine library usable for collision detection.= It=20 > +is used in some video games and movies.") > + (license zlib))) > diff --git a/gnu/packages/patches/bullet-add-fPIC-into-flags.patch b/gnu/= packages/patches/bullet-add-fPIC-into-flags.patch > new file mode 100644 > index 0000000..6e27660 > --- /dev/null > +++ b/gnu/packages/patches/bullet-add-fPIC-into-flags.patch > @@ -0,0 +1,13 @@ > +diff -up bullet-2.82-r2704/CMakeLists.txt.orig bullet-2.82-r2704/CMakeLi= sts.txt > +--- bullet-2.82-r2704/CMakeLists.txt.orig 2014-12-13 00:09:49.648710180 = +0100 > ++++ bullet-2.82-r2704/CMakeLists.txt 2014-12-13 00:10:44.205708986 +0100 > +@@ -17,6 +17,9 @@ IF (NOT CMAKE_BUILD_TYPE) > + SET(CMAKE_BUILD_TYPE "Release") > + ENDIF (NOT CMAKE_BUILD_TYPE)=20 > +=20 > ++SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fPIC") > ++SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") > ++ Is the second 'SET' redundant? Rather than using this patch file, you should instead add a new build phase to the bullet package. Add something like this to the arguments field, after '#:tests? #f': #:phases (alist-cons-before 'configure 'set-env-vars (lambda _ (setenv "CMAKE_CXX_FLAGS" (string-append (getenv "CMAKE_C_FLAGS") "-fPIC")))) I don't know enough about cmake to know if this will work, but hopefully it will give you an idea. =20=20 > + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") > + #MESSAGE("CMAKE_CXX_FLAGS_DEBUG=3D"+${CMAKE_CXX_FLAGS_DEBUG}) > +=20 > --=20 > 2.0.4 > > Things are looking good. :) --=20 David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate