all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: "Tomáš Čech" <sleep_walker@suse.cz>, guix-devel@gnu.org
Subject: Re: [PATCH v4] gnu: Add bullet.
Date: Sat, 13 Dec 2014 10:58:44 -0500	[thread overview]
Message-ID: <877fxvfsnf.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <1418474497-6119-2-git-send-email-sleep_walker@suse.cz>

Tomáš Čech <sleep_walker@suse.cz> 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 =				\
>    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 =						\
>    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-development.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 © 2014 Tomáš Čech <sleep_walker@suse.cz>
> +;;;
> +;;; 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 <http://www.gnu.org/licenses/>.
> +
> +(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/bullet-"
> +                                  version ".tgz"))
> +              (sha256
> +               (base32 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))
> +              (patches (list (search-patch "bullet-add-fPIC-into-flags.patch")))))
> +    (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 
> +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/CMakeLists.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) 
> + 
> ++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.
  
> + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
> + #MESSAGE("CMAKE_CXX_FLAGS_DEBUG="+${CMAKE_CXX_FLAGS_DEBUG})
> + 
> -- 
> 2.0.4
>
>

Things are looking good. :)

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

  reply	other threads:[~2014-12-13 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 22:21 [PATCH v3] gnu: Add bullet Tomáš Čech
2014-12-12  3:09 ` David Thompson
2014-12-12  7:08   ` Tomas Cech
2014-12-12 13:53     ` Mark H Weaver
2014-12-13 12:41       ` Tomáš Čech
2014-12-13 12:41         ` [PATCH v4] " Tomáš Čech
2014-12-13 15:58           ` David Thompson [this message]
2014-12-15 10:48             ` Tomas Cech
2014-12-15 10:50               ` [PATCH v5] " Tomáš Čech
2014-12-15 13:14               ` [PATCH v4] " David Thompson

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=877fxvfsnf.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    --cc=sleep_walker@suse.cz \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.