From patchwork Thu Mar 16 06:29:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Faiz X-Patchwork-Id: 48043 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 C01B016E47; Thu, 16 Mar 2023 06:30:14 +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=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 2F3B816E0D for ; Thu, 16 Mar 2023 06:30:14 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pch7l-00014t-68; Thu, 16 Mar 2023 02:30:05 -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 1pch7j-00014h-1d for guix-patches@gnu.org; Thu, 16 Mar 2023 02:30:03 -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 1pch7i-0002Zm-IZ for guix-patches@gnu.org; Thu, 16 Mar 2023 02:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pch7i-0000Tt-4U for guix-patches@gnu.org; Thu, 16 Mar 2023 02:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62178] [PATCH v1 2/5] gnu: Add futil. References: <00c2af06-fa2f-81d3-e3de-444eaf232732@disroot.org> In-Reply-To: <00c2af06-fa2f-81d3-e3de-444eaf232732@disroot.org> Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Mar 2023 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62178 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62178@debbugs.gnu.org Received: via spool by 62178-submit@debbugs.gnu.org id=B62178.16789481851804 (code B ref 62178); Thu, 16 Mar 2023 06:30:02 +0000 Received: (at 62178) by debbugs.gnu.org; 16 Mar 2023 06:29:45 +0000 Received: from localhost ([127.0.0.1]:41046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pch7R-0000T1-AB for submit@debbugs.gnu.org; Thu, 16 Mar 2023 02:29:45 -0400 Received: from knopi.disroot.org ([178.21.23.139]:59068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pch7O-0000Sq-4T for 62178@debbugs.gnu.org; Thu, 16 Mar 2023 02:29:43 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7E05D44543 for <62178@debbugs.gnu.org>; Thu, 16 Mar 2023 07:29:41 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P5mGEuJxWODX for <62178@debbugs.gnu.org>; Thu, 16 Mar 2023 07:29:40 +0100 (CET) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1678948180; bh=1dUF0q4sJxFPRfE6xoOxWRabGri03Uet8wkXwu+8yQM=; h=Date:To:From:Subject; b=Il26igQCu9V8bNqyFL1GTkdX1bKQRi7caeV7ckR7kCcTuc2PHibQjgYhQjFZa9TCu QGTs4b+WX6vtHsb/BpQGK5hh2h7RD4s6WNMhpQLY6lIIf25WLuOczi+/nqYm3ydKCT oMqTbD/x8auL5mgk6Z++FdMoJqHU856mRuU0nfLTIZ5/CZnCLLu9GF8GDJ+kbKGjZC XhxvJOYXpW9HctoYm/6JScRqxsv+GMfm1ep2n7PlBymaBnUnpbmLaE/O2rxPd/qi9K 9ftzCa3EYOKM+lZeExcc00VHrsYUJhKa803WGcnEUyaD9tpg/Qr2S9+YwrrKWc+vVL HOPh2FnikDZLA== Date: Thu, 16 Mar 2023 14:29:37 +0800 MIME-Version: 1.0 Content-Language: en-US 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: Adam Faiz X-ACL-Warn: , Adam Faiz via Guix-patches X-Patchwork-Original-From: Adam Faiz via Guix-patches via From: Adam Faiz Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From 53d9b1d0ab260a2b2aa4ee84dd00f97517c381db Mon Sep 17 00:00:00 2001 Message-Id: <53d9b1d0ab260a2b2aa4ee84dd00f97517c381db.1678947948.git.adam.faiz@disroot.org> In-Reply-To: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org> References: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org> From: AwesomeAdam54321 Date: Tue, 14 Mar 2023 13:55:09 +0800 Subject: [PATCH v1 2/5] gnu: Add futil. * gnu/packages/cpp.scm (futil): New variable. * gnu/packages/patches/futil-add-makefile.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/cpp.scm | 38 ++++++++ gnu/packages/patches/futil-add-makefile.patch | 92 +++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 gnu/packages/patches/futil-add-makefile.patch diff --git a/gnu/local.mk b/gnu/local.mk index c2521acf02..76129c9d82 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1133,6 +1133,7 @@ dist_patch_DATA = \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-glibc-2.34.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ + %D%/packages/patches/futil-add-makefile.patch \ %D%/packages/patches/fxdiv-system-libraries.patch \ %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \ %D%/packages/patches/ganeti-disable-version-symlinks.patch \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index ed6ae69198..5b146b3f4a 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -1216,6 +1216,44 @@ (define-public folly (supported-systems '("aarch64-linux" "x86_64-linux")) (license license:asl2.0))) +(define-public futil + (let ((commit "83fcf85cf7638947a44657b2f334c2d8a2d5d02d") + (revision "0")) + (package + (name "futil") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/hydren/futil") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "05vyx6n4aqix3w1z76hal9zxzixfxnlw0cg4b06lc1l9gnw6ja71")) + (patches + (search-patches "futil-add-makefile.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + (for-each + (lambda (file) + (install-file file "include/futil")) + (find-files "." "\\.h(pp)?$")))))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (delete 'configure)) + #:make-flags + #~(list (string-append "DESTDIR=" #$output) + "PREFIX="))) + (home-page "https://gitlab.com/hydren/futil") + (synopsis "C++ utility code library") + (description "Futil is a set of C++ utility code and library headers.") + (license license:zlib)))) + (define-public poco (package (name "poco") diff --git a/gnu/packages/patches/futil-add-makefile.patch b/gnu/packages/patches/futil-add-makefile.patch new file mode 100644 index 0000000000..c580128f5e --- /dev/null +++ b/gnu/packages/patches/futil-add-makefile.patch @@ -0,0 +1,92 @@ +From da31e9bb1abd95d81b4d4eb18888e41c30092fb9 Mon Sep 17 00:00:00 2001 +From: AwesomeAdam54321 +Date: Sun, 12 Mar 2023 00:47:56 +0800 +Subject: [PATCH] futil: add makefile. + +Adapted from https://gitlab.com/hydren/terrarium/-/raw/master/build/linux-gcc-sdl2-release/src_libs/futil/subdir.mk +--- + Makefile | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 72 insertions(+) + create mode 100644 Makefile + +diff --git a/Makefile b/Makefile +new file mode 100644 +index 0000000..a97ea48 +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,72 @@ ++################################################################################ ++# Automatically-generated file. Do not edit! ++################################################################################ ++ ++# Add inputs and outputs from these tool invocations to the build variables ++CPP_SRCS += \ ++exception.cpp \ ++properties.cpp \ ++stox.cpp \ ++string_actions.cpp \ ++string_extra_operators.cpp \ ++string_parse.cpp \ ++string_split.cpp ++ ++C_SRCS += \ ++chrono.c \ ++random.c \ ++round.c \ ++snprintf.c \ ++strtox.c ++ ++OBJS += \ ++chrono.o \ ++exception.o \ ++properties.o \ ++random.o \ ++round.o \ ++snprintf.o \ ++stox.o \ ++string_actions.o \ ++string_extra_operators.o \ ++string_parse.o \ ++string_split.o \ ++strtox.o ++ ++SRCDIR ?= . ++INCLUDE_PATH ?= ${SRCDIR}/include ++PREFIX ?= /usr/local ++CFLAGS = -O3 -Wall -fPIC -c -fmessage-length=0 -MMD -MP ++ ++all: libfutil.so ++ ++libfutil.so: $(OBJS) $(USER_OBJS) ++ @echo 'Building target: $@' ++ @echo 'Invoking: GCC C++ Linker' ++ g++ -shared -o "libfutil.so" $(OBJS) $(USER_OBJS) $(LIBS) ++ @echo 'Finished building target: $@' ++ @echo ' ' ++ ++install: all ++ install -d $(DESTDIR)$(PREFIX) ++ cp -r include $(DESTDIR)$(PREFIX) ++ install -d $(DESTDIR)$(PREFIX)/lib ++ install -m 644 libfutil.so $(DESTDIR)$(PREFIX)/lib ++ ++%.o: %.c ++ @echo 'Building file: $<' ++ @echo 'Invoking: GCC C Compiler' ++ gcc -I${INCLUDE_PATH} $(CFLAGS) -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" ++ @echo 'Finished building: $<' ++ @echo ' ' ++ ++%.o: %.cpp ++ @echo 'Building file: $<' ++ @echo 'Invoking: GCC C++ Compiler' ++ g++ -I${INCLUDE_PATH} $(CFLAGS) -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" ++ @echo 'Finished building: $<' ++ @echo ' ' ++ ++clean: ++ rm $(wildcard *.o) libfutil.so ++ +-- +2.39.2 +