[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 74/324: build: add autotools scripts
From: |
gnunet |
Subject: |
[gnunet-scheme] 74/324: build: add autotools scripts |
Date: |
Tue, 21 Sep 2021 13:21:54 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit a30e94b0092f963d7d4f218d2d841e2bd2c3704b
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat Feb 6 17:17:07 2021 +0100
build: add autotools scripts
TODO: make guix dependency optional
---
Makefile.am | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
README.org | 12 +++++++++
configure.ac | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
guix.scm | 18 ++++++++++---
4 files changed, 190 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..4e5b1b6
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,88 @@
+## Process this file with automake to produce Makefile.in
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2020 Maxime Devos
+#
+# Author (GnuTLS): Nikos Mavrogiannopoulos
+# Author (scheme-GNUnet): Maxime Devos
+#
+# This file was part of scheme-GNUnet.
+#
+# scheme-GNUnet is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# scheme-GNUnet is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with scheme-GNUnet. If not, see <http://www.gnu.org/licenses/>.
+
+# This file is partially based upon guile/Makefile.am in GnuTLS.
+# Not all scheme-GNUnet code is licensed as GPL, some is licensed as AGPL.
+
+ACLOCAL_AMFLAGS = -I m4
+AM_CPPFLAGS = -I$(top_srcdir)/include
+SUFFIXES = .scm .go
+
+# Scheme code that works
+modules = \
+ gnu/gnunet/scripts/download-store.scm \
+ gnu/gnunet/scripts/publish-store.scm \
+ gnu/gnunet/scripts/guix-stuff.scm \
+ \
+ gnu/gnunet/message/protocols.scm \
+ gnu/gnunet/message/envelope.scm \
+ \
+ gnu/gnunet/concurrency/update.scm \
+ \
+ gnu/gnunet/util/mq-enum.scm \
+ gnu/gnunet/util/mq-handler.scm \
+ gnu/gnunet/util/mq.scm \
+ \
+ gnu/gnunet/utils/bv-slice.scm \
+ gnu/gnunet/utils/hat-let.scm \
+ gnu/gnunet/utils/netstruct.scm
+
+dist_guilesite_DATA = $(modules)
+
+# Scheme code compilation
+if HAVE_GUILD
+nodist_guilesiteccache_DATA = $(modules:%.scm=%.go)
+
+# Unset 'GUILE_LOAD_COMPILED_PATH' so we can be sure that any .go file that we
+# load comes from the build directory.
+# XXX: Use the C locale for when Guile lacks
+#
<https://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
+%.go: %.scm
+ $(AM_V_GUILEC)$(MKDIR_P) "`dirname "$@"`" ; \
+ $(AM_V_P) && out=1 || out=- ; \
+ unset GUILE_LOAD_COMPILED_PATH ; LC_ALL=C \
+ builddir="$(top_builddir)" \
+ GUILE_AUTO_COMPILE=0 \
+ $(GUILD) compile --target="$(host)" \
+ -L "$(top_srcdir)" \
+ -Wformat -Wunbound-variable -Warity-mismatch \
+ -o "$@" "$<" >&$$out
+endif
+
+TEST_EXTENSIONS = .scm
+TESTS =
+
+# Scheme tests
+# FIXME ./pre-inst-env & ./test-env
+SCM_LOG_DRIVER = \
+ $(GUILE) -L $(top_srcdir) -C $(top_builddir) \
+ -e main $(top_srcdir)/build-aux/test-driver.scm
+
+SCM_TESTS = \
+ tests/envelope.scm \
+ tests/message-handler.scm \
+ tests/update.scm
+
+SCM_TESTS_ENVIRONMENT = \
+ GUILE_AUTO_COMPILE=0 \
+ GUILE_WARN_DEPRECATED=detailed
+TESTS += $(SCM_TESTS)
diff --git a/README.org b/README.org
index 6309f1d..4c220f4 100644
--- a/README.org
+++ b/README.org
@@ -9,6 +9,18 @@
TODO: ask upstream of use of name is acceptable
TODO: more bindings, less duplication
TODO: document directory & meta data format
+* How to build & install
+ #+BEGIN_SRC shell
+ # When using Guix
+ # (XXX make dependency on Guix itself optional)
+ guix environment -l guix.scm
+
+ autoreconf -vif
+ ./configure
+ make
+ make check
+ #+END_SRC
+ TODO install
* things that work
TODO: test suite for download & publish.
TODO (elsewhere): GNUnet service definitions for Guix in container
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..8561569
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,75 @@
+dnl Process this file with autoconf to produce a configure script.
+# Copyright (C) 2000-2012, 2016, 2019 Free Software Foundation, Inc.
+# Copyright (C) 2020, 2021 Maxime Devos
+#
+# Author (GnuTLS): Nikos Mavrogiannopoulos, Simon Josefsson
+# Author (scheme-GNUnet): Maxime Devos
+#
+# This file is part of scheme-gnunet
+#
+# scheme-GNUnet is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# scheme-GNUnet is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with scheme-GNUnet. If not, see <http://www.gnu.org/licenses/>.
+
+# This file is partially based upon the Autoconf script of GnuTLS.
+# Not all scheme-GNUnet code is licensed as GPL, some is licensed as AGPL.
+
+AC_PREREQ([2.61])
+AC_INIT([scheme-gnunet], [0], [])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIRS([m4])
+
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+
+AC_MSG_RESULT([***
+*** Checking for compilation programs...
+])
+dnl Checks for programs.
+#PKG_PROG_PKG_CONFIG
+
+dnl GNU Guile support
+AC_MSG_CHECKING([whether building the Scheme implementation])
+AC_ARG_ENABLE(guile,
+ AS_HELP_STRING([--enable-guile], [build GNU Guile implementation]),
+ [opt_guile_impl=$enableval], [opt_guile_impl=yes])
+AC_MSG_RESULT($opt_guile_bindings)
+
+AC_ARG_WITH([guile-site-dir], AS_HELP_STRING([--with-guile-site-dir=DIR],
+ [guile site directory for scheme-gnunet, default is guile system
settings]),
+ [guilesitedir="${withval}"], [guilesitedir='$(GUILE_SITE)'])
+AC_ARG_WITH([guile-site-ccache-dir],
AS_HELP_STRING([--with-guile-site-ccache-dir=DIR],
+ [guile ccache directory for scheme-gnunet, default is guile system
settings]),
+ [guilesiteccachedir="${withval}"],
[guilesiteccachedir='$(GUILE_SITE_CCACHE)'])
+AC_SUBST([guilesitedir])
+AC_SUBST([guilesiteccachedir])
+
+if test "$opt_guile_impl" = "yes"; then
+ AC_MSG_RESULT([***
+*** Detecting GNU Guile...
+])
+
+ dnl Check for 'guild', which can be used to compile Scheme code
+ dnl on Guile 2.x and 3.x.
+ AC_PATH_PROG([GUILD], [guild])
+ AC_SUBST([GUILD])
+
+ dnl TODO check if 2.x works
+ GUILE_PKG([3.0 2.2 2.0])
+ GUILE_PROGS
+ GUILE_SITE_DIR
+ GUILE_FLAGS
+fi
+
+AM_CONDITIONAL([HAVE_GUILE], [test "$opt_guile_bindings" = "yes"])
+AM_CONDITIONAL([HAVE_GUILD], [test "x$GUILD" != "x"])
+
+AC_OUTPUT([Makefile])
diff --git a/guix.scm b/guix.scm
index db93cb2..7623bfd 100644
--- a/guix.scm
+++ b/guix.scm
@@ -17,19 +17,31 @@
;; SPDX-License-Identifier: AGPL-3.0-or-later
(use-modules (gnu packages guile)
+ (gnu packages guile-xyz)
+ (gnu packages autotools)
+ (gnu packages gettext)
+ (gnu packages pkg-config)
(guix packages)
- (guix build-system guile)
+ (guix build-system gnu)
((guix licenses) #:prefix license:))
+
(define-public scheme-gnunet
(package
(name "scheme-gnunet")
(version "0.0")
(source #f)
- (build-system guile-build-system)
+ (build-system gnu-build-system)
(propagated-inputs `(("guile-zlib" . ,guile-zlib)
("guile-bytestructures" . ,guile-bytestructures)
+ ("guile-fibers" . ,guile-fibers)
("guile-json" . ,guile-json-4)))
- (native-inputs `(("guile" . ,guile-3.0)))
+ (native-inputs `(("guile" ,guile-3.0)
+ ("automake" ,automake)
+ ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
+ ("gettext" ,gettext-minimal)
+ ("pkg-config" ,pkg-config)
+ ("autoconf" ,autoconf-wrapper)))
+ (inputs `(("guile" ,guile-3.0)))
(synopsis "partial Scheme port of GNUnet")
(license license:agpl3+)
(description #f)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 54/324: Add missing dependency ‘guix-stuff.scm’, (continued)
- [gnunet-scheme] 54/324: Add missing dependency ‘guix-stuff.scm’, gnunet, 2021/09/21
- [gnunet-scheme] 62/324: Change e-mail address, gnunet, 2021/09/21
- [gnunet-scheme] 58/324: scripts: publish-store: use SRFI-39 parameters for configuration, gnunet, 2021/09/21
- [gnunet-scheme] 61/324: Write code for message handlers, gnunet, 2021/09/21
- [gnunet-scheme] 55/324: enum: implement docstrings and general niceness, gnunet, 2021/09/21
- [gnunet-scheme] 56/324: Define many GNUnet message types., gnunet, 2021/09/21
- [gnunet-scheme] 69/324: doc: Update ROADMAP with steps to do, gnunet, 2021/09/21
- [gnunet-scheme] 63/324: Define message envelope type and procedures., gnunet, 2021/09/21
- [gnunet-scheme] 73/324: concurrency: implement an ‘update stream’, gnunet, 2021/09/21
- [gnunet-scheme] 81/324: nse: define network structures., gnunet, 2021/09/21
- [gnunet-scheme] 74/324: build: add autotools scripts,
gnunet <=
- [gnunet-scheme] 78/324: scripts: download-store: remove debugging, gnunet, 2021/09/21
- [gnunet-scheme] 60/324: Allow using integer->value on maximal value, gnunet, 2021/09/21
- [gnunet-scheme] 68/324: scripts: download-store: allow downloads in nar format, gnunet, 2021/09/21
- [gnunet-scheme] 67/324: scripts: Don't flatten the FS tree and use SXML instead of JSON, gnunet, 2021/09/21
- [gnunet-scheme] 66/324: Document how to use GNUnet FS without networking., gnunet, 2021/09/21
- [gnunet-scheme] 70/324: doc: Progress update in README.org, gnunet, 2021/09/21
- [gnunet-scheme] 72/324: mq: fix make-envelope/dll constructor., gnunet, 2021/09/21
- [gnunet-scheme] 65/324: download-store: prepare supporting the nar output format, gnunet, 2021/09/21
- [gnunet-scheme] 64/324: scripts: download-store: use SRFI-39 parameters for configuration, gnunet, 2021/09/21
- [gnunet-scheme] 75/324: build: correct propagated-inputs fields, gnunet, 2021/09/21