aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/engineering.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 172f8481eb..190632436b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -38,6 +39,7 @@
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
+ #:use-module (guix svn-download)
#:use-module (guix monads)
#:use-module (guix store)
#:use-module (guix utils)
@@ -2533,3 +2535,59 @@ without any changes. And programmers that are familiar with the magellan API
can continue using it with a free library without the restrictions of the
official SDK.")
(license license:bsd-3)))
+
+(define-public openctm
+ (let ((revision 603))
+ ;; Previous versions don't compile, they need to link libGL and libGLU.
+ ;; Fixed in this revision.
+ (package
+ (name "openctm")
+ (version (string-append "1.0.3." (number->string revision)))
+ (source
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url "https://svn.code.sf.net/p/openctm/code/trunk")
+ (revision revision)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32 "01wb70m48xh5gwhv60a5brv4sxl0i0rh038w32cgnlxn5x86s9f1"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("mesa" ,mesa)
+ ("glu" ,glu)
+ ("glut" ,freeglut)
+ ("gtk" ,gtk+-2)
+ ("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:tests? #f ;no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (rename-file "Makefile.linux" "Makefile")
+ (let ((out (assoc-ref outputs "out")))
+ ;; Create output directories.
+ (mkdir-p (string-append out "/lib"))
+ (mkdir-p (string-append out "/include"))
+ (mkdir-p (string-append out "/bin"))
+ ;; Fix rpath.
+ (substitute* "tools/Makefile.linux"
+ (("-rpath,\\.")
+ (string-append "-rpath," out "/lib/"))
+ (("/usr/local")
+ out))
+ ;; Set right output.
+ (substitute* "Makefile"
+ (("/usr/lib")
+ (string-append out "/lib"))
+ (("\\/usr\\/local")
+ out))
+ #t))))))
+ (synopsis "3D triangle mesh format and related tools and libraries")
+ (description "OpenCTM is a file format, a software library and a tool set
+for compression of 3D triangle meshes. The geometry is compressed to a
+fraction of comparable file formats (3DS, STL, COLLADA...), and the format is
+accessible through a simple API")
+ (license license:zlib)
+ (home-page "http://openctm.sourceforge.net/"))))
predicates....* gnu/build/linux-container.scm (user-namespace-supported?, unprivileged-user-namespace-supported?, setgroups-supported?): New procedures. * tests/container.scm: Use predicates. * tests/syscalls.scm: Likewise. David Thompson 2015-10-28container: Remove unnecessary CLONE_CHILD_* flags....* gnu/build/linux-container.scm (namespaces->bit-mask): Remove CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID, which are unneeded. Discussed at <http://bugs.gnu.org/21694>. Ludovic Courtès 2015-10-10build: container: Fix call-with-clean-exit....Before, call-with-clean-exit would *always* return an exit code of 1. * gnu/build/linux-container.scm (call-with-clean-exit): Exit with status code of 0 if thunk does not throw an exception. * tests/containers.scm: Add test. David Thompson 2015-09-07build: container: Use the same clone flags as fork(3)....The intent is to make 'clone' behave a lot more like 'primitive-fork', which calls clone(2) with SIGCHLD, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID flags. Notably, running 'clone' at the REPL without these flags would break the REPL beyond repair. * guix/build/syscalls.scm (CLONE_CHILD_CLEARTID, CLONE_CHILD_SETTID): New variables. * gnu/build/linux-container.scm (namespaces->bit-mask): Add CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID to bit mask. David Thompson 2015-09-07build: container: Setup /dev/console....* gnu/build/linux-container.scm (mount-file-systems): Bind mount the controlling terminal as /dev/console. David Thompson 2015-08-08build: container: Add #:host-uids argument to call-with-container....It's not always possible to map 65536 uids when creating a container as the root user within another user namespace. This is true when building Guix within the build daemon's container. By using a uid range of 1 by default, even as the root user, the tests now pass. * gnu/build/linux-container.scm (initialize-user-namespace, run-container): Add 'host-uids' argument. (call-with-container): Add #:host-uids keyword argument. * tests/containers.scm ("container-excursion"): Update 'run-container' call. David Thompson 2015-07-09gnu: build: Add Linux container module....* gnu/build/linux-container.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * .dir-locals.el: Add Scheme indent rules for 'call-with-container', and 'container-excursion'. * tests/containers.scm: New file. * Makefile.am (SCM_TESTS): Add it. David Thompson