From patchwork Tue Nov 1 20:22:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 44241 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 8302F27BBEB; Tue, 1 Nov 2022 20:24:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 6DCB127BBE9 for ; Tue, 1 Nov 2022 20:24:19 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opxno-0000zd-Ki; Tue, 01 Nov 2022 16:24:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opxnm-0000zI-GW for guix-patches@gnu.org; Tue, 01 Nov 2022 16:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opxnm-0002Hr-97 for guix-patches@gnu.org; Tue, 01 Nov 2022 16:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opxnm-0000Ry-3Y for guix-patches@gnu.org; Tue, 01 Nov 2022 16:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58952] [PATCH 3/3] gnu: meshlab: Unbundle vcglib and easyexif Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Nov 2022 20:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58952 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58952@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 58952-submit@debbugs.gnu.org id=B58952.16673341821640 (code B ref 58952); Tue, 01 Nov 2022 20:24:02 +0000 Received: (at 58952) by debbugs.gnu.org; 1 Nov 2022 20:23:02 +0000 Received: from localhost ([127.0.0.1]:44314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opxmo-0000QM-3K for submit@debbugs.gnu.org; Tue, 01 Nov 2022 16:23:02 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:33751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opxml-0000P5-J8 for 58952@debbugs.gnu.org; Tue, 01 Nov 2022 16:23:00 -0400 Received: by mail-wr1-f50.google.com with SMTP id h9so21737330wrt.0 for <58952@debbugs.gnu.org>; Tue, 01 Nov 2022 13:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CxTOZq89OSFna1wHINhFVDbzA7JHR+lAw2qRm854ldQ=; b=IHp2ixF5EBcs2wehhxsFnFMczjGJaGAZCqv7ygs/dXMGvujS0uKFiMmOa3KgIgtB3x fiUAcpaL9N5pQTP5OPVii8zJjhYdlvqqrLbVlWCkYHyDnTRTrkldBkjO7xI18iCWkNgb dZSApFK5K/lAeDz3bMAs6Fq4XLql74SiOwUF92vqAXvH0cctWDTO6FdYmUyBFoxznizA ZoE+brbr1dXI5KHEcC+m+iInn/0bxWXljv7sBcX2PGGep9VJ7D2w1jf6MlirBUkcG2od I6Sk2DFJzj2hmtgDcoGqx6tbDmnnIioOfmsNGJnQh+Zk3VnLu/lMaoVaqmaL5/ylS9M3 7lyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CxTOZq89OSFna1wHINhFVDbzA7JHR+lAw2qRm854ldQ=; b=zNB6BA81G09U+U2SATcuSjL0FtZ08Uoyi3YMlVK0UXfRjFvb4lJ5DdKPQCXCA3Owsa K8jPBV7x9wBjk/aRCSSuChBlS5cFf9BjEc6tsmKVxbFVzmYhUQm0h7nEW49a/dCrOKUV ERGTBxWEeYcn4hXiHZZGaSVmXIGhiun+4qntbmv6OwzszMcxG7Iz8OjsCnFfkgDwa/Xi ymFECvXtlbgmH+mIKZWsF9VJE5dh3Ppo8Hs3fJBFFcJMVydK+XUxKaBpPTHUJcXo3sIm gKhFEl5L1EHz36nclIb8oaOoNoKitNvfKtYIyVIULZUmloy3Fmu0mUtQ3DVHKTQXl24F JOIw== X-Gm-Message-State: ACrzQf2LwP/hnVMg0xagoK5Av+bA2niQltUMw1K+OxAgVeHNI1GJQuFL Rlq8cRk5ck9bgcub1Cgxdqw8jda+Rz0= X-Google-Smtp-Source: AMsMyM7g3r9nvq3YoV9qtJSKkUc4vFIrVbzgOqAi/lvrRCN9QYiidX9DgekA2VrLMsGMDIVn4DF8Rg== X-Received: by 2002:adf:e805:0:b0:236:5635:9520 with SMTP id o5-20020adfe805000000b0023656359520mr12332035wrm.154.1667334173891; Tue, 01 Nov 2022 13:22:53 -0700 (PDT) Received: from guxtil.incerto.xyz (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id i4-20020a05600c354400b003cf4c1e211fsm12301474wmq.38.2022.11.01.13.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:22:53 -0700 (PDT) From: Sharlatan Hellseher Date: Tue, 1 Nov 2022 20:22:46 +0000 Message-Id: <20221101202246.17659-3-sharlatanus@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221101202246.17659-1-sharlatanus@gmail.com> References: <20221101202246.17659-1-sharlatanus@gmail.com> MIME-Version: 1.0 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: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/engineering.scm (meshlab): [source]: Do not clone the project recursively. Add clean up procedure to remove any bundled libraries and external sources. [inputs]: Add vcglib and easyexif. Sort list alphabetically. [phases]{set-external-libraries}: New phase. --- gnu/packages/engineering.scm | 69 +++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 4f705d4b9b..41ed010d6e 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -126,6 +126,7 @@ (define-module (gnu packages engineering) #:use-module (gnu packages parallel) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) + #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pretty-print) #:use-module (gnu packages protobuf) @@ -2814,28 +2815,61 @@ (define-public meshlab (method git-fetch) (uri (git-reference (url "https://github.com/cnr-isti-vclab/meshlab") - (commit (string-append "MeshLab-" version)) - (recursive? #t))) + (commit (string-append "MeshLab-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0dkh9qw9z2160s6gjiv0a601kp6hvl66cplvi8rfc892zcykgiwd")))) + (base32 "0dkh9qw9z2160s6gjiv0a601kp6hvl66cplvi8rfc892zcykgiwd")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundeled libraries and prebuilt binaries, check if + ;; the list is changed in the next release. + (for-each (lambda (dir) + (delete-file-recursively dir)) + (list "src/external/OpenCTM-1.0.3" + "src/external/e57" + "src/external/easyexif" + "src/external/glew-2.1.0" + "src/external/levmar-2.3" + "src/external/lib3ds-1.3.0" + "src/external/libigl-2.3.0" + "src/external/muparser_v225" + "src/external/nexus" + "src/external/openkinect" + "src/external/qhull-2020.2" + "src/external/structuresynth-1.5" + "src/external/tinygltf" + "src/external/u3d" + "src/external/xerces" + "src/vcglib" + ;; XXX: Remove this in future release + ;; they are present in master and contains + ;; prebuilt libraries + ;; + ;; "resources/linux" + ;; "resources/windows" + ;; "resources/macos" + )))))) (build-system cmake-build-system) (inputs - (list qtbase-5 - mesa - glu + (list easyexif + eigen glew - muparser + glu gmp - eigen - libfreenect lib3ds + libfreenect + mesa + muparser openctm - qhull)) + qhull + qtbase-5 + vcglib)) (arguments (list #:tests? #f ; Has no tests #:configure-flags - #~(list (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath=" + #~(list (string-append "-DVCGDIR=" #$(this-package-input "vcglib") "/include/vcglib") + (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath=" #$output "/lib/meshlab") (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=" #$output "/lib/meshlab") @@ -2844,7 +2878,18 @@ (define-public meshlab #:phases #~(modify-phases %standard-phases (add-after 'unpack 'go-to-source-dir - (lambda _ (chdir "src")))))) + (lambda _ (chdir "src"))) + ;; XXX: Add more substitutions to CMake files if building start + ;; failing. GLEW and easyexif comes as hard dependencies for + ;; MashLab missing them prevent core built. + (add-before 'configure 'set-external-libraries + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "external/easyexif.cmake" + ((".*set.EXIF_DIR.*") + (string-append + "set(EXIF_DIR " + (search-input-directory inputs "/include/easyexif") + ")")))))))) (synopsis "3D triangular mesh processing and editing software") (home-page "https://www.meshlab.net/") (description "MeshLab is a system for the processing and editing of large,