guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: THIS IS NOT A REAL COMMIT, JUST A CONVENIENT WAY OF SHARING WORK


From: guix-commits
Subject: 01/01: THIS IS NOT A REAL COMMIT, JUST A CONVENIENT WAY OF SHARING WORK IN PROGRESS. DO NOT MERGE!!!
Date: Sat, 19 Sep 2020 08:57:11 -0400 (EDT)

andreas pushed a commit to branch wip-ae-slicr
in repository guix.

commit bd567367981d2832299d21e4078f1bf50c975294
Author: Andreas Enge <andreas@enge.fr>
AuthorDate: Sat Sep 19 14:47:49 2020 +0200

    THIS IS NOT A REAL COMMIT, JUST A CONVENIENT WAY OF SHARING WORK
    IN PROGRESS. DO NOT MERGE!!!
---
 gnu/local.mk              |  1 +
 gnu/packages/perl.scm     | 47 ++++++++++++++++++++++++++--
 gnu/packages/printers.scm | 78 +++++++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 122 insertions(+), 4 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 1a1a648..3ab4f92 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1570,6 +1570,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/sharutils-CVE-2018-1000097.patch                \
   %D%/packages/patches/shadow-hurd-pctrl.patch                 \
   %D%/packages/patches/shishi-fix-libgcrypt-detection.patch    \
+  %D%/packages/patches/slic3r-gcc-8.patch                      \
   %D%/packages/patches/slim-session.patch                      \
   %D%/packages/patches/slim-config.patch                       \
   %D%/packages/patches/slim-sigusr1.patch                      \
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index bd6e746..6a8ba8f 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès 
<ludo@gnu.org>
-;;; Copyright © 2013, 2019 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2019, 2020 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016, 2017, 2019, 2020 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
@@ -74,7 +74,8 @@
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
-  #:use-module (gnu packages web))
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages xorg))
 
 ;;;
 ;;; Please: Try to add new module packages in alphabetic order.
@@ -11387,3 +11388,45 @@ regexp patterns in modules.")
     (description "Data::SExpression parses Lisp S-Expressions into Perl data
 structures.")
     (license license:perl-license)))
+
+(define-public perl-opengl
+  (package
+    (name "perl-opengl")
+    (version "0.70")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "mirror://cpan/authors/id/C/CH/CHM/OpenGL-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "1q3lz168q081iwl9jg21fbzhp9la79gav9mv6nmh2jab83s2l3mj"))))
+    (build-system perl-build-system)
+    (inputs `(("mesa" ,mesa) ; TODO: needed?
+              ("glu" ,glu) ; TODO: needed?
+              ("freeglut" ,freeglut) ; TODO: needed?
+              ("libxi" ,libxi)
+              ("libxmu" ,libxmu)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-makefile
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "utils/Makefile"
+               ;(("^CC=cc") "CC=gcc")
+               ;(("^LINK=cc") "LINK=gcc")
+               ;; Drop building utils/glversion.txt, since it requires a
+               ;; running X server and tests the graphics card present in
+               ;; the build system. Nix has a similar approach, but seems
+               ;; to check in an additional text file
+               ;; perl-opengl-gl-extensions.txt; where will this be needed?
+               (("^all: glversion.txt") "all:"))
+             #t)))))
+    (home-page "https://metacpan.org/release/OpenGL";)
+    (synopsis
+      "Perl bindings to the OpenGL API, GLU, and GLUT/FreeGLUT")
+    (description "The package provides Perl bindings to OpenGL, GLU
+and FreeGLUT.")
+    (license (package-license perl))))
diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm
index bbf98ee..bcd69d4 100644
--- a/gnu/packages/printers.scm
+++ b/gnu/packages/printers.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Andreas Enge <andreas@enge.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,13 +24,19 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
-  #:use-module (gnu packages libusb)
   #:use-module (gnu packages ghostscript)
+  #:use-module (gnu packages libusb)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages qt))
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages wxwidgets))
 
 ;; This is a module for packages related to printer-like devices, but not
 ;; related to CUPS.
@@ -138,3 +145,70 @@ driver is known to work with these printers:
 @item Lenovo M7605D
 @end enumerate")
     (license license:gpl2+)))
+
+(define-public slic3r
+  (package
+    (name "slic3r")
+    (version "1.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/slic3r/Slic3r.git";)
+             (commit version)))
+       (patches (search-patches "slic3r-gcc-8.patch"))
+       (sha256
+        (base32 "1pg4jxzb7f58ls5s8mygza8kqdap2c50kwlsdkf28bz1xi611zbi"))))
+    (build-system perl-build-system)
+    (arguments
+     '(#:tests? #f ; no tests in package
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'no-local-lib
+           (lambda _
+             ;; Drop loading of the local::lib module.
+             (substitute* (find-files "t" "\\.t$")
+               (("use local::lib.*$") ""))
+             ;; While we are at it, correct a buggy path in a source file.
+             (substitute* "xs/src/libslic3r/GCodeSender.cpp"
+               (("\"/usr/include/asm-generic/ioctls.h\"")
+                 "<asm-generic/ioctls.h>"))
+             #t))
+         (add-before 'configure 'set-env
+           (lambda _
+             (setenv "SLIC3R_NO_AUTO" "1") ; to avoid the use of cpanm
+             (setenv "PERL5LIB" (string-append (getcwd) "/xs/blib/arch:"
+                                               (getcwd) "/xs/blib/lib:"
+                                               (getenv "PERL5LIB")))
+             #t))
+         (add-before 'configure 'build-xs
+           (lambda _
+             (with-directory-excursion "xs"
+               (system* "perl" "Build.PL")
+               (system* "perl" "Build"))
+             #t))
+         (add-after 'configure 'build-gui
+           (lambda _
+             (system* "perl" "Build.PL" "--gui")
+             #t))
+         (delete 'build)))) ; everything is done elsewhere
+    (native-inputs
+     `(("perl-class-accessor" ,perl-class-accessor)
+       ("perl-devel-checklib" ,perl-devel-checklib)
+       ("perl-encode-locale" ,perl-encode-locale)
+       ("perl-extutils-cppguess" ,perl-extutils-cppguess)
+       ("perl-extutils-typemaps-default" ,perl-extutils-typemaps-default)
+       ("perl-io-stringy" ,perl-io-stringy)
+       ("perl-module-build-withxspp" ,perl-module-build-withxspp)
+       ("perl-moo" ,perl-moo)
+       ("perl-scalar-list-utils" ,perl-scalar-list-utils)))
+    (inputs
+     `(("boost" ,boost)
+       ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
+    (home-page "https://slic3r.org/";)
+    (synopsis "3D printing toolbox")
+    (description "Slic3r is a tool to convert a 3D model into printing
+instructions for a 3D printer.  It cuts the model into horizontal slices
+(layers), generates toolpaths to fill them and calculates the amount of
+material to be extruded.")
+    (license license:agpl3+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]