commit aa1a042bb0907a777c3157d98b14786f503e834b Author: Vivianne Langdon Date: Tue Feb 27 15:16:22 2024 -0500 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e78ee84 --- /dev/null +++ b/.gitignore @@ -0,0 +1,68 @@ +*.eps +*.go +*.log +*.pdf +*.png +*.tar.xz +*.tar.gz +*.tmp +*~ +.#* +\#*\# +,* +/ABOUT-NLS +/INSTALL +/aclocal.m4 +/autom4te.cache +/build-aux/ar-lib +/build-aux/compile +/build-aux/config.guess +/build-aux/config.rpath +/build-aux/config.sub +/build-aux/depcomp +/build-aux/install-sh +/build-aux/mdate-sh +/build-aux/missing +/build-aux/test-driver +/build-aux/texinfo.tex +/config.status +/configure +/configure.ac +/doc/*.1 +/doc/.dirstamp +/doc/contributing.*.texi +/doc/*.aux +/doc/*.cp +/doc/*.cps +/doc/*.fn +/doc/*.fns +/doc/*.html +/doc/*.info +/doc/*.info-[0-9] +/doc/*.ky +/doc/*.pg +/doc/*.toc +/doc/*.t2p +/doc/*.tp +/doc/*.vr +/doc/*.vrs +/doc/stamp-vti +/doc/version.texi +/doc/version-*.texi +/m4/* +/pre-inst-env +/pre-inst-env.in +/test-env +/test-tmp +/tests/*.trs +GPATH +GRTAGS +GTAGS +Makefile +Makefile.in +Makefile.am +config.cache +stamp-h[0-9] +tmp +/.version +/doc/stamp-[0-9] diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..f658e91 --- /dev/null +++ b/COPYING @@ -0,0 +1,3 @@ +This project's license is GPL 3+. + +You can read the full license at https://www.gnu.org/licenses/gpl.html. diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..afb8f59 --- /dev/null +++ b/HACKING @@ -0,0 +1,54 @@ +# -*- mode: org; coding: utf-8; -*- + +#+TITLE: Hacking guile-reflow + +* Contributing + +By far the easiest way to hack on guile-reflow is to develop using Guix: + +#+BEGIN_SRC bash + # Obtain the source code + cd /path/to/source-code + guix shell -Df guix.scm + # In the new shell, run: + hall build --execute && autoreconf -vif && ./configure && make check +#+END_SRC + +You may also want to set your directory as an authorized directory for +`guix shell' so it works without arguments. To do that, simply run + +#+BEGIN_SRC bash + echo $(pwd) >> $HOME/.config/guix/shell-authorized-directories +#+END_SRC + +You can now hack this project's files to your heart's content, whilst +testing them from your `guix shell' shell. + +To try out any scripts in the project you can now use + +#+BEGIN_SRC bash + ./pre-inst-env scripts/${script-name} +#+END_SRC + +If you'd like to tidy the project again, but retain the ability to test the +project from the commandline, simply run: + +#+BEGIN_SRC bash + ./hall clean --skip "scripts/${script-name},pre-inst-env" --execute +#+END_SRC + +** Manual Installation + +If you do not yet use Guix, you will have to install this project's +dependencies manually: + - autoconf + - automake + - pkg-config + - texinfo + - guile-hall + +Once those dependencies are installed you can run: + +#+BEGIN_SRC bash + hall build -x && autoreconf -vif && ./configure && make check +#+END_SRC diff --git a/README b/README new file mode 120000 index 0000000..314e17d --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.org \ No newline at end of file diff --git a/README.org b/README.org new file mode 100644 index 0000000..f9901cd --- /dev/null +++ b/README.org @@ -0,0 +1,4 @@ +# -*- mode: org; coding: utf-8; -*- + +#+TITLE: README for Reflow + diff --git a/doc/guile-reflow.texi b/doc/guile-reflow.texi new file mode 100644 index 0000000..0f3542f --- /dev/null +++ b/doc/guile-reflow.texi @@ -0,0 +1,60 @@ +\input texinfo +@c -*-texinfo-*- + +@c %**start of header +@setfilename reflow.info +@documentencoding UTF-8 +@settitle Reflow Reference Manual +@c %**end of header + +@include version.texi + +@copying +Copyright @copyright{} 2024 + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +copy of the license is included in the section entitled ``GNU Free +Documentation License''. +@end copying + +@dircategory The Algorithmic Language Scheme +@direntry +* Reflow: (reflow). +@end direntry + +@titlepage +@title The Reflow Manual +@author + +@page +@vskip 0pt plus 1filll +Edition @value{EDITION} @* +@value{UPDATED} @* + +@insertcopying +@end titlepage + +@contents + +@c ********************************************************************* +@node Top +@top Reflow + +This document describes Reflow version @value{VERSION}. + +@menu +* Introduction:: Why Reflow? +@end menu + +@c ********************************************************************* +@node Introduction +@chapter Introduction + +INTRODUCTION HERE + +This documentation is a stub. + +@bye diff --git a/guix.scm b/guix.scm new file mode 100644 index 0000000..b5a2949 --- /dev/null +++ b/guix.scm @@ -0,0 +1,49 @@ +(use-modules (gnu packages) + (gnu packages autotools) + (gnu packages guile) + (gnu packages guile-xyz) + (gnu packages pkg-config) + (gnu packages texinfo) + (guix build-system gnu) + (guix download) + (guix gexp) + ((guix licenses) #:prefix license:) + (guix packages) + (srfi srfi-1)) + +(package + (name "guile-reflow") + (version "0.1") + (source + (local-file + (dirname (current-filename)) + #:recursive? #t + #:select? (lambda (file stat) + (not (any (lambda (my-string) + (string-contains file my-string)) + (list ".git" ".dir-locals.el" "guix.scm")))))) + (build-system gnu-build-system) + (arguments + (list + #:make-flags + #~(list "GUILE_AUTO_COMPILE=0") + #:phases + #~(modify-phases %standard-phases + (add-before 'bootstrap 'hall + (lambda _ + (system* "hall" "build" "-x"))) + (replace 'bootstrap + (lambda _ + (system* "autoreconf" "-vif")))))) + (native-inputs (list autoconf + automake + guile-hall + pkg-config + texinfo)) + (inputs (list guile-3.0)) + (synopsis "Guile port of reflow") + (description + "A library to provide easy text wrapping in consoles that preserves control-code formatting.") + (home-page "https://git.solarpunk.moe/vv/guile-reflow") + (license license:gpl3+)) + diff --git a/hall.scm b/hall.scm new file mode 100644 index 0000000..c4a3051 --- /dev/null +++ b/hall.scm @@ -0,0 +1,35 @@ +(hall-description + (name "reflow") + (prefix "guile") + (version "0.1") + (author "Vivanne Langdon") + (email "") + (copyright (2024)) + (synopsis "Guile port of reflow") + (description + "A library to provide easy text wrapping in consoles that preserves control-code formatting.") + (home-page "https://git.solarpunk.moe/vv/guile-reflow") + (license gpl3+) + (dependencies `()) + (features + ((guix #t) + (use-guix-specs-for-dependencies #f) + (native-language-support #f) + (licensing #f))) + (files (libraries + ((directory "reflow" ()) + (scheme-file "reflow"))) + (tests ((directory "tests" ()))) + (documentation + ((org-file "README") + (symlink "README" "README.org") + (text-file "HACKING") + (text-file "COPYING") + (directory "doc" + ((texi-file "guile-reflow"))))) + (programs ()) + (infrastructure + ((scheme-file "guix") + (text-file ".gitignore") + (scheme-file "hall") + (directory "tests" ()))))) diff --git a/reflow.scm b/reflow.scm new file mode 100644 index 0000000..e69de29 diff --git a/reflow/hconfig.scm b/reflow/hconfig.scm new file mode 100644 index 0000000..2da5f6e --- /dev/null +++ b/reflow/hconfig.scm @@ -0,0 +1,35 @@ +(define-module + (reflow hconfig) + #:use-module + (srfi srfi-26) + #:export + (%version + %author + %license + %copyright + %gettext-domain + G_ + N_ + init-nls + init-locale)) + +(define %version "0.1") + +(define %author "") + +(define %license 'gpl3+) + +(define %copyright '(2024)) + +(define %gettext-domain "reflow") + +(define G_ identity) + +(define N_ identity) + +(define (init-nls) "Dummy as no NLS is used" #t) + +(define (init-locale) + "Dummy as no NLS is used" + #t) +