From patchwork Thu Jul 28 04:11:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 41031 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 E10C927BBEA; Thu, 28 Jul 2022 05:13:03 +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_INVALID, DKIM_SIGNED,FREEMAIL_FROM,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 2B83527BBE9 for ; Thu, 28 Jul 2022 05:13:03 +0100 (BST) Received: from localhost ([::1]:43908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGutS-0002qv-BW for patchwork@mira.cbaines.net; Thu, 28 Jul 2022 00:13:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGusV-0002W0-3z for guix-patches@gnu.org; Thu, 28 Jul 2022 00:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39357) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGusU-0002BV-Rf for guix-patches@gnu.org; Thu, 28 Jul 2022 00:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGusU-0005hD-N6 for guix-patches@gnu.org; Thu, 28 Jul 2022 00:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56806] [PATCH 9/9] gnu: Add hashlink. References: <9PX8REXHYFolHkT-TXF_SZcRFDEe1-1KwK9riBoz1tnsKV2raznmLO3YTlzbpdyJ9dBOqnpcaUomHmLfOWjytFrkLEvIW_upqCAA_-byN50=@protonmail.com> In-Reply-To: <9PX8REXHYFolHkT-TXF_SZcRFDEe1-1KwK9riBoz1tnsKV2raznmLO3YTlzbpdyJ9dBOqnpcaUomHmLfOWjytFrkLEvIW_upqCAA_-byN50=@protonmail.com> Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Jul 2022 04:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "56806@debbugs.gnu.org" <56806@debbugs.gnu.org> Received: via spool by 56806-submit@debbugs.gnu.org id=B56806.165898151021857 (code B ref 56806); Thu, 28 Jul 2022 04:12:02 +0000 Received: (at 56806) by debbugs.gnu.org; 28 Jul 2022 04:11:50 +0000 Received: from localhost ([127.0.0.1]:57337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGusI-0005gT-50 for submit@debbugs.gnu.org; Thu, 28 Jul 2022 00:11:50 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:19791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGusF-0005gD-S6 for 56806@debbugs.gnu.org; Thu, 28 Jul 2022 00:11:48 -0400 Date: Thu, 28 Jul 2022 04:11:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658981502; x=1659240702; bh=uBU6DW7BQPfCZ2ZOiFNEKr2NRgfT4o5EF73wrqjwU8Q=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=qmFqI8L8eFPiNNC5fW+itgrEGResEvTTrFJouWUlgHpBjmvSSUoZS1na7SUHtntCN x/ErRX/j6G2zsFXatuT42GrhSorW19Ku1h+aBKZNt2v+fdPjbniam+Gs1Kye+ZEnJg eHeyt1o9YOMa8UtlMyiyTDlY0ygJXSHyoOjPZSLCcQ/JtwrJfFyObZnhdFyaCUzGZB +jL6g0S0wGnL5Urdb9DjFeyZDzajvMugD5xDn6Iqflgxvas45lbAYKCl6lhHzo+qbN eRi7xfYZkVeBVYZgMLumqB/NK3ke63unxAZfGYrj1QTWBybReqmBF4mX5QH3AIODrd AbNVRidnodyKg== Message-ID: <7qTaPCHNgqby8ax2a2rAvMFc7fTMsapBKAUMfeSwop-hCRs--vhp8SbCwOwXXpTmSwcf3n_98XDb1fmuzIsqBVfn3pMw-oGvwt3Tl3w_ghU=@protonmail.com> Feedback-ID: 7805494:user:proton 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches Empty Message From fa69682cc2051d5058322228cc45e6e5a3ecfc55 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 27 Jul 2022 23:45:22 -0400 Subject: [PATCH 9/9] gnu: Add hashlink. * gnu/packages/haxe.scm (hashlink): New variable. --- gnu/packages/haxe.scm | 93 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/gnu/packages/haxe.scm b/gnu/packages/haxe.scm index 95de4c5e4b..6876dbdc6f 100644 --- a/gnu/packages/haxe.scm +++ b/gnu/packages/haxe.scm @@ -189,3 +189,96 @@ (define-public haxe (license (list license:gpl2+ ; the compiler itself license:expat)))) ; the standard library +(define-public hashlink + (package + (name "hashlink") + (version "1.12") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/HaxeFoundation/hashlink") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0i5f1mxpgjcdirx60kxrw0r0y15qh3j16a6fj8mzkq3k7j2hc982")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled libraries (mainly used for Windows build). + (delete-file-recursively "include") + #t)))) + (build-system gnu-build-system) + (arguments + ;; Looks like there are tests with CMake, but there is confusion if this + ;; is a supported way to build on Linux. See, e.g. + ;; https://github.com/HaxeFoundation/hashlink/issues/397. Also, the + ;; CMake build requires running the library manager haxelib in the build + ;; process for the tests, likely requiring network access. + ;; TODO: Use cmake-build-system instead and enable tests? + (list #:tests? #f + #:make-flags + ;; The built hdll libraries need help finding libhl.so. + #~(list (string-append "LIBFLAGS=-Wl,-rpath=" #$output "/lib")) + #:phases + #~(modify-phases %standard-phases + ;; Don't try to build the (removed) bundled libraries pcre, + ;; minimp3, and mikktspace. Provide the approriate paths and + ;; linking options. + (add-after 'unpack 'use-system-libs + (lambda _ + (substitute* "Makefile" + (("\\$\\{PCRE\\}") "") + (("-lpthread") "-lpthread -lpcre16") + (("include/minimp3") + (string-append #$(this-package-input "minimp3") "/include")) + (("include/mikktspace ") + (string-append #$(this-package-input "mikktspace") "/include ")) + (("include/mikktspace/mikktspace.o") "") + (("-lpng") "-lpng -lmikktspace")))) + (replace 'configure + (lambda* _ + (setenv "CC" #$(cc-for-target)) + (setenv "PREFIX" #$output))) + (replace 'build + (lambda* (#:key make-flags parallel-build? #:allow-other-keys) + (apply invoke "make" "-j" (if parallel-build? + (number->string (parallel-job-count)) + "1") + make-flags)))))) + (inputs (list glu + haxe + libjpeg-turbo + libpng + libuv + libvorbis + mbedtls-apache + mikktspace + minimp3 + openal + pcre + sdl2 + sqlite + zlib)) + (native-inputs (list pkg-config)) + (home-page "https://hashlink.haxe.org/") + (synopsis "Virtual machine for the Haxe language") + (description + "HashLink (HL) is a virtual machine for the Haxe language. It can run +bytecode produced by the Haxe compiler, or converted to C by HL. The HashLink runtime +includes the following features: +@itemize +@item Fully compatible with the Haxe specification +@item Support file I/O, regular expressions, network, etc. +@item Unicode strings by default +@item Mark-and-not-sweep Garbage Collector +@item x86 and x86-64 HL/C compilation +@item x86 and x86-64 HL/JIT compilation +@end itemize + +While the standard HL runtime provides support for Haxe standard library, +HashLink also provides several libraries that can optionally be used to build +HL-specific applications. This includes the FMT library for compression and +image support and SDL for mouse, keyboard, and game controller support, +OpenGL, and more.") + (license license:expat))) -- 2.37.1