From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6I4NNYK3tGNfIAAAbAwnHQ (envelope-from ) for ; Wed, 04 Jan 2023 00:17:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qCEaNYK3tGMUjwAA9RJhRA (envelope-from ) for ; Wed, 04 Jan 2023 00:17:22 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8BAAEDEF4 for ; Wed, 4 Jan 2023 00:17:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCqWs-0001UG-E8; Tue, 03 Jan 2023 18:17:10 -0500 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 1pCqWk-0001RH-Md for guix-patches@gnu.org; Tue, 03 Jan 2023 18:17:04 -0500 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 1pCqWk-0007KY-EY for guix-patches@gnu.org; Tue, 03 Jan 2023 18:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCqWj-0005PH-T3 for guix-patches@gnu.org; Tue, 03 Jan 2023 18:17:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60201] [PATCH v9] gnu: Add wdl. References: In-Reply-To: Resent-From: Sughosha Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Jan 2023 23:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60201 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "60201@debbugs.gnu.org" <60201@debbugs.gnu.org> Received: via spool by 60201-submit@debbugs.gnu.org id=B60201.167278777320715 (code B ref 60201); Tue, 03 Jan 2023 23:17:01 +0000 Received: (at 60201) by debbugs.gnu.org; 3 Jan 2023 23:16:13 +0000 Received: from localhost ([127.0.0.1]:47070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCqVw-0005O1-Lz for submit@debbugs.gnu.org; Tue, 03 Jan 2023 18:16:13 -0500 Received: from mail-40138.protonmail.ch ([185.70.40.138]:54083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCqVr-0005NV-J5 for 60201@debbugs.gnu.org; Tue, 03 Jan 2023 18:16:11 -0500 Date: Tue, 03 Jan 2023 23:15:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1672787761; x=1673046961; bh=jgYVrQdVhFbU10Eis8EufmfMJqs6Y1SDN/XkKodhocc=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=PO9uPpfHzjUdx/14SwEQ9pAq8Zv1Sh8GBJ1CP4WY3Jre03wHQoeA+3WKShU9tpFWw wPmV6ARJW6ZpFhVl+yAdz98U+VaUMzSvJ70tlhSYluFcsnjA3umTbawwoolnbPLB18 zCK6emOOW8dBJaP9aIIC427rQaZLCUcCBWQN0N3jUIj2Ch/3WqBYsmyH5m5Fdhh5Ug sWP+gjNrO/8lEPr519IAmHuSWiyR4+mzTqlKTzL3P9bhnxbcKmkMNFzRQUBmkqKh4d d6ubHim4hyim3gIA0zHDY+dApd3CXoGiI6E0Ba+DLpSAUtdhNMBsq85QOQFtc/Hr14 oKg7UBjLS+aMw== Message-ID: Feedback-ID: 45211691:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Reply-to: Sughosha X-ACL-Warn: , Sughosha via Guix-patches From: Sughosha via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672787842; a=rsa-sha256; cv=none; b=VK0B64abcQ4Y+yQK1zPLbU6/uLocRLx0X8GDBj/Meqae7bwryTKT+rWcpplq6p3T4M4zzk O37GzE5vb9fFoNclZMrWJCA5umcnsNPSWyWT5ypFubCt+vhVx2N/+aD2bkCRycgDfNY9si WoJgNzIBQZuUNH3vOxwOAfpdxoh9UnvLrjIQe2MK0SMNaLdxc6obDHGJuEse9+sAhsdEOh pd2mPEhx1EXiv+lfyRJ+owqEbgHeg8PL0xuMLTrxJCCU0rYBkDXZwwlmN6PobLGi/Syw9J Mak3CUXszs42rfXc1UDjtj6NasD9GHr8xLD/ZJEX/00/IXAO7m1XnPYPrmYRRQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=proton.me header.s=protonmail header.b=PO9uPpfH; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672787842; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jgYVrQdVhFbU10Eis8EufmfMJqs6Y1SDN/XkKodhocc=; b=raOQSKGhAXCqXRhF+ihhHcH/WHQB/sZ+mWO+vYhin9R+6SsBdP6PRGVamcYh1Tvnr2aCYU JU0TTfD4iFLrZCmhZ4xRrPUaSZQ1v2P/Crsj3uZ2mVdGZ9uimSZ1IA2RQqfv1+/9uaoOo9 XDl3E1gpzAyIn52drcC0GScNBYuw9repbSMUcVTFTncKzdw1K6hFEXh2TOYNha5gpKmoXQ Uqn84BQH+vZimIEBJ8AEMAnqRhTFQFbGj/YFXpF83c3ZQoKrm8rSd7D+XpIpaS48bpVnYU F05UmBSDb7ffsWbUOAI69P84IfjgDmXeV6h2luZZR9en0rJrNAtNVgEFNCRizg== X-Spam-Score: -3.56 X-Migadu-Queue-Id: 8BAAEDEF4 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=proton.me header.s=protonmail header.b=PO9uPpfH; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.56 X-TUID: qkpRpnYcDB0U Alined and improved the definition, as per the chat in IRC. * gnu/packages/cpp.scm (wdl): New public variable. * gnu/packages/patches/wdl-link-libs-and-fix-jnetlib.patch: New file. * gnu/local.mk: Register the patch file. --- gnu/local.mk | 1 + gnu/packages/cpp.scm | 125 ++++++++++++++++++ .../wdl-link-libs-and-fix-jnetlib.patch | 53 ++++++++ 3 files changed, 179 insertions(+) create mode 100644 gnu/packages/patches/wdl-link-libs-and-fix-jnetlib.patc= h diff --git a/gnu/local.mk b/gnu/local.mk index f0b1b3fd15..4b6ef757ad 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1987,6 +1987,7 @@ dist_patch_DATA =3D=09=09=09=09=09=09\ %D%/packages/patches/wacomtablet-add-missing-includes.patch=09\ %D%/packages/patches/wacomtablet-qt5.15.patch=09=09=09\ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch=09\ + %D%/packages/patches/wdl-link-libs-and-fix-jnetlib.patch=09\ %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch=09\ %D%/packages/patches/webrtc-audio-processing-big-endian.patch=09\ %D%/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch= \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index a3df706f43..bcf234187e 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -63,6 +63,7 @@ (define-module (gnu packages cpp) #:use-module (guix modules) #:use-module (guix gexp) #:use-module (gnu packages) + #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages build-tools) @@ -73,7 +74,11 @@ (define-module (gnu packages cpp) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages documentation) + #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) #:use-module (gnu packages libevent) #:use-module (gnu packages libunwind) #:use-module (gnu packages linux) @@ -91,6 +96,7 @@ (define-module (gnu packages cpp) #:use-module (gnu packages tls) #:use-module (gnu packages web) #:use-module (gnu packages xml) + #:use-module (gnu packages xorg) #:use-module (ice-9 match)) =20 (define-public argagg @@ -2231,3 +2237,122 @@ (define-public safeint addition and subtraction for all combinations of signed and unsigned 32-bi= t and 64-bit integers.") (license license:expat))) + +(define-public wdl + ;; No tag is available. + (let ((commit "da86a62d11e46e4ecd8b16f9775cb5188340a0e2") + (revision "0")) + (package + (name "wdl") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/justinfrankel/WDL") + (commit commit))) + (file-name (git-file-name name version)) + ;; This patch fixes error of undefined functions, due to n= ot + ;; linking libraries, and invalid object. + (patches + (search-patches "wdl-link-libs-and-fix-jnetlib.patch")) + (sha256 + (base32 + "0hdb604szkbrlyffiw94rz8wx4nvmk3zdkycfirqgjs7mh0l6vbq")) + (modules '((guix build utils))) + ;; Unbundle third party libraries which are not needed. + (snippet + '(for-each + (lambda (dir) + (with-directory-excursion "WDL" + (delete-file-recursively dir))) + (list "cmath" + "libpng" + "lice/glew" + "giflib" + "jpeglib" + "zlib"))))) + (build-system gnu-build-system) + (arguments + (list + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (chdir "WDL") + (invoke "make" "-Ceel2") ;build eel2 + (invoke "make" "-Cjnetlib") ;build jnetlib + + ;; Build swell. + (chdir "swell") + (invoke "make" "SWELL_SUPPORT_GTK=3Dtrue") + (invoke "make" "libSwell.colortheme"))) + (replace 'install + (lambda _ + (let ((include (string-append #$output + "/include/WDL"))) + (chdir "../") + (delete-file-recursively "lice/test") + (delete-file-recursively "swell/sample_project= ") + (for-each + (lambda (file) + (mkdir-p (string-append include "/" file))= ) + (list "eel2" + "jnetlib" + "lice" + "localize" + "plush2" + "prvhash" + "swell" + "win32_curses" + "wingui/scrollbar")) + (for-each + (lambda (file) + (copy-file file + (string-append include "/" file))) + (find-files "." "\\.h$")) + (with-directory-excursion "swell" + (install-file "libSwell.so" + (string-append #$output + "/lib")) + (install-file "libSwell.colortheme" + (string-append #$output + "/share/WDL"))) + (install-file "eel2/loose_eel" + (string-append #$output + "/libexec")) + (install-file "jnetlib/jnl.a" + (string-append #$output + "/lib")))))))) + (native-inputs (list pkg-config nasm)) + (inputs (list cairo + fontconfig + freetype + gdk-pixbuf + glib + gtk+ + libxi + libx11 + mesa + zlib)) + (home-page "https://www.cockos.com/wdl/") + (synopsis "Modestly reusable C++ libraries") + (description + "WDL is a modestly reusable C++ library that offers the following: +@itemize +@item Inline classes for cleanly managing memory allocations, lists, +queues, resource pools, strings, etc. +@item File reading/writing wrappers +@item Directory scanning API +@item SHA-1 implementation +@item Mergesort implementation +@item Blowfish implementation +@item Fast FFT implementation (based on DJBFFT) +@item Audio tools +@item LICE - Lightweight Image Compositing Engine +@item WDL Virtual Window system +@item Plush2 - Portable, lightweight software 3d rendering engine +@item SWELL - Simple Windows Emulation Layer +@item And more. +@end itemize") + (license license:zlib)))) diff --git a/gnu/packages/patches/wdl-link-libs-and-fix-jnetlib.patch b/gnu= /packages/patches/wdl-link-libs-and-fix-jnetlib.patch new file mode 100644 index 0000000000..29ec0f058c --- /dev/null +++ b/gnu/packages/patches/wdl-link-libs-and-fix-jnetlib.patch @@ -0,0 +1,53 @@ +From 2d129502354da4fe39dac13463ea742f8026ab91 Mon Sep 17 00:00:00 2001 +From: Sughosha +Date: Tue, 3 Jan 2023 22:15:09 +0100 +Subject: [PATCH] Link libs and fix jnetlib. + +--- + WDL/eel2/Makefile | 2 +- + WDL/jnetlib/Makefile | 2 +- + WDL/swell/Makefile | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/WDL/eel2/Makefile b/WDL/eel2/Makefile +index ac2e41f1..0ffca97a 100644 +--- a/WDL/eel2/Makefile ++++ b/WDL/eel2/Makefile +@@ -153,7 +153,7 @@ gen-lex: # the output of this, lex.nseel.c, is unused= because we have a handwri + =09$(CXX) $(CXXFLAGS) -c -o $@ $^ +=20 + loose_eel: loose_eel.o $(OBJS) $(OBJS2) +-=09g++ -o $@ $^ $(CXXFLAGS) $(LFLAGS) ++=09g++ -o $@ $^ $(CXXFLAGS) $(LFLAGS) -lGL +=20 + clean: + =09-rm -f -- loose_eel loose_eel.o $(OBJS) +diff --git a/WDL/jnetlib/Makefile b/WDL/jnetlib/Makefile +index 10d9fe8a..85570c5a 100644 +--- a/WDL/jnetlib/Makefile ++++ b/WDL/jnetlib/Makefile +@@ -7,7 +7,7 @@ CC =3D gcc + CPP =3D g++ + CXX =3D g++ +=20 +-OBJS =3D asyncdns.o connection.o httpget.o httpserv.o listen.o util.o ser= con.o ++OBJS =3D asyncdns.o connection.o httpget.o httpserv.o listen.o util.o +=20 + jnl.a: ${OBJS} + =09-rm -f jnl.a +diff --git a/WDL/swell/Makefile b/WDL/swell/Makefile +index 9e7e2d87..8e98a543 100644 +--- a/WDL/swell/Makefile ++++ b/WDL/swell/Makefile +@@ -167,7 +167,7 @@ libSwell$(DLL_EXT): $(OBJS) + =09$(CXX) -shared -o $@ $(CFLAGS) $(LFLAGS) $^ $(LINKEXTRA) +=20 + test: $(OBJS) test.o +-=09$(CXX) -o test $(CFLAGS) $(LFLAGS) $^ $(LINKEXTRA) ++=09$(CXX) -o test $(CFLAGS) $(LFLAGS) $^ $(LINKEXTRA) -lpthread -ldl $(sh= ell $(PKG_CONFIG) --libs gtk+-3.0 freetype2) -lfontconfig -lGL -lXi -lX11 +=20 + libSwell.colortheme: swell-gdi-generic.cpp $(SWELL_HEADERS) + =09$(CXX) $(CFLAGS) -o make-theme -DSWELL__MAKE_THEME swell-gdi-generic.c= pp -lpthread +--=20 +2.38.1 + --=20 2.38.1