Package: guix-patches;
Reported by: Adam Faiz <adam.faiz <at> disroot.org>
Date: Tue, 14 Mar 2023 06:54:02 UTC
Severity: normal
Tags: patch
Message #11 received at 62178 <at> debbugs.gnu.org (full text, mbox):
From: Adam Faiz <adam.faiz <at> disroot.org> To: 62178 <at> debbugs.gnu.org Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, iyzsong <at> envs.net Subject: [PATCH 2/5] gnu: Add futil. Date: Tue, 14 Mar 2023 15:02:30 +0800
From ca7eeb834e5b53667d0ec945454d80794ee2a717 Mon Sep 17 00:00:00 2001 Message-Id: <ca7eeb834e5b53667d0ec945454d80794ee2a717.1678775193.git.adam.faiz <at> disroot.org> In-Reply-To: <cover.1678775193.git.adam.faiz <at> disroot.org> References: <cover.1678775193.git.adam.faiz <at> disroot.org> From: AwesomeAdam54321 <adam.faiz <at> disroot.org> Date: Tue, 14 Mar 2023 13:55:09 +0800 Subject: [PATCH 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 | 91 +++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 gnu/packages/patches/futil-Add-Makefile.patch diff --git a/gnu/local.mk b/gnu/local.mk index c2521acf02..1bdbddce5e 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..69cda8aacc 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")))))) + (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..2c5760d31b --- /dev/null +++ b/gnu/packages/patches/futil-Add-Makefile.patch @@ -0,0 +1,91 @@ +From 29c2ab3931bc0749fb72d222b14a629170cea9e6 Mon Sep 17 00:00:00 2001 +From: AwesomeAdam54321 <adam.faiz <at> disroot.org> +Date: Sun, 12 Mar 2023 00:47:56 +0800 +Subject: [PATCH] futil: Add Makefile. + +Adapted from https://gitlab.com/hydren/terrarium/-/blob/master/build/linux-gcc-sdl2-release/src_libs/futil/subdir.mk +--- + Makefile | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 71 insertions(+) + create mode 100644 Makefile + +diff --git a/Makefile b/Makefile +new file mode 100644 +index 0000000..39d2275 +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,71 @@ ++################################################################################ ++# 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.so \ ++exception.so \ ++properties.so \ ++random.so \ ++round.so \ ++snprintf.so \ ++stox.so \ ++string_actions.so \ ++string_extra_operators.so \ ++string_parse.so \ ++string_split.so \ ++strtox.so ++ ++SRCDIR ?= . ++INCLUDE_PATH ?= ${SRCDIR}/include ++PREFIX ?= /usr/local ++ ++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 ++ ++%.so: %.c ++ @echo 'Building file: $<' ++ @echo 'Invoking: GCC C Compiler' ++ gcc -O3 -Wall -shared -fPIC -I${INCLUDE_PATH} -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" ++ @echo 'Finished building: $<' ++ @echo ' ' ++ ++%.so: %.cpp ++ @echo 'Building file: $<' ++ @echo 'Invoking: GCC C++ Compiler' ++ g++ -I${INCLUDE_PATH} -O3 -Wall -shared -fPIC -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" ++ @echo 'Finished building: $<' ++ @echo ' ' ++ ++clean: ++ rm $(wildcard *.so) ++ +-- +2.39.2 + -- 2.39.2
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.