From patchwork Tue Sep 6 08:33:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kristian Lein-Mathisen X-Patchwork-Id: 42236 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3EA1227BBE9; Tue, 6 Sep 2022 09:44:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AE3EB27BBEA for ; Tue, 6 Sep 2022 09:44:24 +0100 (BST) Received: from localhost ([::1]:49080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVUBz-00012F-Qa for patchwork@mira.cbaines.net; Tue, 06 Sep 2022 04:44:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVU1y-0000ZQ-Sq for guix-patches@gnu.org; Tue, 06 Sep 2022 04:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVU1y-0004ka-J6 for guix-patches@gnu.org; Tue, 06 Sep 2022 04:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVU1y-0005kl-DW for guix-patches@gnu.org; Tue, 06 Sep 2022 04:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57361] [PATCH] gnu: Add solvespace. References: In-Reply-To: Resent-From: Kristian Lein-Mathisen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Sep 2022 08:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57361 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57361@debbugs.gnu.org Received: via spool by 57361-submit@debbugs.gnu.org id=B57361.166245323122096 (code B ref 57361); Tue, 06 Sep 2022 08:34:02 +0000 Received: (at 57361) by debbugs.gnu.org; 6 Sep 2022 08:33:51 +0000 Received: from localhost ([127.0.0.1]:49543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVU1n-0005kJ-2O for submit@debbugs.gnu.org; Tue, 06 Sep 2022 04:33:51 -0400 Received: from mail-oa1-f41.google.com ([209.85.160.41]:33784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVU1k-0005k3-F5 for 57361@debbugs.gnu.org; Tue, 06 Sep 2022 04:33:49 -0400 Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-1274ec87ad5so11575318fac.0 for <57361@debbugs.gnu.org>; Tue, 06 Sep 2022 01:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=wNfgmya24kYviwYjTppWYE7NnfVrb6HbuzgnoCXKe7M=; b=gceD5j7eOGo/QZZ1lT+Aj9cnc8m4eenXRQANb7gsihIb1F2I5owY/3EPSH9YYH9tAP W9a1z2eebYP3j5S7DrgYGKM0oE+XSIM6RQ+S5zEiha1neXIhltu0y51lwkY/SfvT7TsO 3fz+TeslRQ2Cp53TOUcfW5V2vi8iQa7VQp4ZTfE5RXsxZFbBmInDlbhZo1m+dHbwp8MA MuVAnOxh/w1pPijnUhKy34fusFKlKkQWLQmRhKkgEcaQeAJdLYcb8o+7gDmMgg7tfjmS W1cGANRbuIa7msxtEJDB0FWN2vLHaXq0KXLJPCkmnqI7ukypuARkxv+peQnvP+Ke5Ir1 cJpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=wNfgmya24kYviwYjTppWYE7NnfVrb6HbuzgnoCXKe7M=; b=54IUA6iqIJwVGkq9vjo54yW8WNQzeghnGrvYG9bvvYmzh1Uxajr3hO1MvyHTtEsI7K TGJKJx1oi7oGP48EiL+ADzWIoeCmf5WE1QpupfuXH7zTb+FrRYTsXqcB7qnr3OUyaWvo mybawiuwpkhL2nUMZ1tzCdg3GKUvsLzc+IA81KwoUKPy/kTftgrGDfkuyD9WMRyoxjnF Zn1sj7oi2zlBTt6avDOm0EgPvzvy7SipUoH7PqVOUN1/ZfYwINKo/uZY4lx/OfHBuaiV L91CLVc0sZmCwmPOo0M/AzrdJA4N993a2umpzpnJEjBMim2q6COr6NgwwmtQMFTTRyHQ O79Q== X-Gm-Message-State: ACgBeo2SjJoweHKCDmZdu7GoithQv/pr6Pc94dqq7wORq/USrmVGMNrh OHcybd0LiO7jbERng5CKDRYy9wd9Ri1Xso5sl4bWNCFq X-Google-Smtp-Source: AA6agR6leN2XOGn1eWBBlwrgdMovHuYVZaASfdoS2h4ftnVgdSlPg/a7ox+lUr22uJt/9fBDT/GkCmUFXaoAs3nrt+w= X-Received: by 2002:a05:6870:c68a:b0:127:a3f9:2c16 with SMTP id cv10-20020a056870c68a00b00127a3f92c16mr2136803oab.246.1662453223049; Tue, 06 Sep 2022 01:33:43 -0700 (PDT) MIME-Version: 1.0 From: Kristian Lein-Mathisen Date: Tue, 6 Sep 2022 10:33:32 +0200 Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Sorry, forgot to add (gnu packages c) dependency. Here are the updated patches again. K. From a2967120d10320962a0298caa412d320bca7804a Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen Date: Tue, 6 Sep 2022 10:24:01 +0200 Subject: [PATCH 2/2] gnu: Add solvespace. * gnu/packages/engineering.scm (solvespace): New variable. --- gnu/packages/engineering.scm | 91 ++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index f195179413..f6a5e22188 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -78,6 +78,7 @@ (define-module (gnu packages engineering) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages commencement) @@ -2895,6 +2896,96 @@ (define-public pcb2gcode dynamic calibration of the milling depth.") (license license:gpl3+)))) +;; libdxfrw has no readme, no version release, no tags. Initial commit says +;; "libdxfrw-0.6.3 import", but it shares no git history with "upstream" +;; https://github.com/codelibs/libdxfrw. Both are difficult to package +;; separately as they don't install properly. Copying in-tree instead of +;; #:recursive #t to avoid downloading the other bigger dependencies which +;; aren't needed. +(define libdxfrw-sources + (origin + (method git-fetch) + (uri (git-reference (url + "https://github.com/solvespace/libdxfrw") + (commit + "0b7b7b709d9299565db603f878214656ef5e9ddf"))) + (sha256 (base32 + "0d2wjq81466m3hb5cffiy99vhx0irwwy47yfxp318k2q4cvd5z2a")))) + +(define-public solvespace + (let ((commit "70bde63cb32a7f049fa56cbdf924e2695fcb2916") + (version "3.1")) + (package + (name "solvespace") + (version version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/solvespace/solvespace") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1hbdln44k00a6vlklv2mq2c9zda3i9d5x0f7ks85w4v6zskhqnra")))) + (build-system cmake-build-system) + (native-inputs (list pkg-config gettext-minimal)) + (arguments + (list + #:build-type "Release" + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-libdxfrw + (lambda _ + (copy-recursively #$libdxfrw-sources + "extlib/libdxfrw"))) + (add-before 'configure 'embed-git-commit-hash + (lambda _ + ;; `git describe` doesn't work here, so embed + ;; the commit hash directly in CMakeLists.txt as + ;; described instead. + (substitute* "CMakeLists.txt" + (("include\\(GetGitCommitHash\\)") + (string-append "set(GIT_COMMIT_HASH " + #$commit ")"))))) + (add-before 'configure 'use-packaged-mimalloc + (lambda _ + (substitute* "CMakeLists.txt" + (("message\\(STATUS \"Using in-tree mimalloc\"\\)") + "message(STATUS \"Using guix packaged mimalloc\")") + (("add_subdirectory\\(extlib/mimalloc EXCLUDE_FROM_ALL\\)") + "find_package(mimalloc REQUIRED)"))))))) + (inputs (list cairo + eigen + freetype + gtkmm-3 + json-c + libpng + libspnav ;spaceware + mimalloc + mesa + zlib)) + (synopsis "Parametric 2D/3D CAD") + (description + "SOLVESPACE is a parametric 3D @acronym{CAD, +Computer Aided Design} tool. Applications include: + +@itemize +@item modeling 3d parts — draw with extrudes, revolves, helixes and + Boolean (union / difference / intersection) operations +@item modeling 2d parts — draw the part as a single section, + and export DXF, PDF, SVG; use 3d assembly to verify fit +@item 3d-printed parts — export the STL or other triangle mesh + expected by most 3d printers +@item preparing CAM data — export 2d vector art for a waterjet + machine or laser cutter; or generate STEP or STL, for import into + third-party CAM software for machining +@item mechanism design — use the constraint solver to simulate planar + or spatial linkages, with pin, ball, or slide joints +@item plane and solid geometry — replace hand-solved trigonometry and spreadsheets + with a live dimensioned drawing +@end itemize") + (home-page "https://solvespace.com/") + (license license:gpl3+)))) + (define-public syscall-intercept ;; Upstream provides no tag. Also, last version update is 4 years old. (let ((commit "304404581c57d43478438d175099d20260bae74e") -- 2.37.2