unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Adam Faiz via Guix-patches via <guix-patches@gnu.org>
To: 62178@debbugs.gnu.org
Subject: [bug#62178] [PATCH v1 2/5] gnu: Add futil.
Date: Thu, 16 Mar 2023 14:29:37 +0800	[thread overview]
Message-ID: <d6919530-2e0e-0895-7cb4-1c6523d80f68@disroot.org> (raw)
In-Reply-To: <00c2af06-fa2f-81d3-e3de-444eaf232732@disroot.org>

 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 <adam.faiz@disroot.org>
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 <adam.faiz@disroot.org>
+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
+
-- 
2.39.2





  parent reply	other threads:[~2023-03-16  6:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
2023-03-14  6:57 ` [bug#62178] [PATCH 1/5] gnu: Add fgeal Adam Faiz via Guix-patches via
2023-03-14  7:02 ` [bug#62178] [PATCH 2/5] gnu: Add futil Adam Faiz via Guix-patches via
2023-03-14  7:09 ` [bug#62178] [PATCH 3/5] gnu: Add libgeramun Adam Faiz via Guix-patches via
2023-03-14 19:41   ` Liliana Marie Prikler
2023-03-14  7:11 ` [bug#62178] [PATCH 4/5] gnu: Add rapidxml Adam Faiz via Guix-patches via
2023-03-14  7:13 ` [bug#62178] [PATCH 5/5] gnu: Add terrarium Adam Faiz via Guix-patches via
2023-03-14 17:50   ` Liliana Marie Prikler
2023-04-18 14:34     ` Adam Faiz via Guix-patches via
2023-03-16  6:26 ` [bug#62178] [PATCH v1 1/5] gnu: Add fgeal Adam Faiz via Guix-patches via
2023-04-18 16:50   ` Liliana Marie Prikler
2023-03-16  6:29 ` Adam Faiz via Guix-patches via [this message]
2023-04-18 16:55   ` [bug#62178] [PATCH v1 2/5] gnu: Add futil Liliana Marie Prikler
2023-03-16  6:30 ` [bug#62178] [PATCH v1 3/5] gnu: Add libgeramun Adam Faiz via Guix-patches via
2023-03-16  6:31 ` [bug#62178] [PATCH v1 4/5] gnu: Add rapidxml Adam Faiz via Guix-patches via
2023-04-18 17:28   ` Liliana Marie Prikler
2023-03-16  6:32 ` [bug#62178] [PATCH v1 5/5] gnu: Add terrarium Adam Faiz via Guix-patches via
2023-04-18 18:28   ` Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6919530-2e0e-0895-7cb4-1c6523d80f68@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=62178@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).