aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine_build_scaffold.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-06-27 15:27:05 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2021-06-28 14:39:52 -0400
commit4e84f496adb538db3d3fc75134d6e05086332bf9 (patch)
treefab98dc3b98839a6a3457bd340074e96a5d2f094 /org/spine_build_scaffold.org
parentnix-build cleanup, external sources localized (diff)
org-mode code block headers
Diffstat (limited to 'org/spine_build_scaffold.org')
-rw-r--r--org/spine_build_scaffold.org108
1 files changed, 76 insertions, 32 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index 0b8f763..f4d950e 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -14,6 +14,7 @@
#+PROPERTY: header-args+ :results no
#+PROPERTY: header-args+ :cache no
#+PROPERTY: header-args+ :padline no
+#+PROPERTY: header-args+ :mkdirp yes
[[./spine.org][spine.org]] VERSION
[[./spine_info.org][spine_info.org]] [[../org/][org/]]
@@ -72,13 +73,15 @@
- soversion
#+NAME: version_soversion
+#+BEGIN_SRC sh
0
#+END_SRC
* makefile :makefile:
** tangle
-#+BEGIN_SRC makefile :tangle ../makefile
+#+HEADER: :tangle ../makefile
+#+BEGIN_SRC makefile
<<make_set_var_0_git_version>>
<<make_set_var_1_dub>>
<<make_set_var_2_project_details>>
@@ -1134,7 +1137,8 @@ gitsnapshot: distclean tangle
* dub.settings.json :dub:config:json:
-#+BEGIN_SRC json :NO-tangle ../dub.settings.json
+#+HEADER: :NO-tangle ../dub.settings.json
+#+BEGIN_SRC json
{
"defaultArchitecture": "x86_64",
"defaultCompiler": "ldc"
@@ -1150,7 +1154,8 @@ gitsnapshot: distclean tangle
- tinyendian
- imageformats
-#+BEGIN_SRC json :tangle ../dub.json
+#+HEADER: :tangle ../dub.json
+#+BEGIN_SRC json
{
"authors": [
"Ralph Amissah"
@@ -1428,7 +1433,8 @@ gitsnapshot: distclean tangle
** +check dub.json+
-#+BEGIN_SRC sh :NO-tangle ../dub.json
+#+HEADER: :NO-tangle ../dub.json
+#+BEGIN_SRC sh
{
"authors": [
"Ralph Amissah"
@@ -1489,7 +1495,10 @@ not configured here using dub.json for the moment
** header (including dependencies) :header:
-#+BEGIN_SRC sh :NO-tangle ../dub.sdl :tangle-mode (identity #o755) :shebang #!/usr/bin/env dub
+#+HEADER: :NO-tangle ../dub.sdl
+#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang #!/usr/bin/env dub
+#+BEGIN_SRC sh
name "spine"
description "sisu document parser"
homepage "https://sisudoc.org"
@@ -1515,7 +1524,8 @@ time (dub --compiler=dmd --build=release)
time (dub --compiler=ldc2 --build=release)
time (dub --compiler=gdc --build=release)
-#+BEGIN_SRC sh :NO-tangle ../dub.sdl
+#+HEADER: :NO-tangle ../dub.sdl
+#+BEGIN_SRC sh
configuration "default" {
targetName "spine"
postGenerateCommands "notify-send -t 0 'D executable ready' 'spine'"
@@ -1527,7 +1537,8 @@ configuration "default" {
time (dub --compiler=dmd -color --config=dmd --build=dmd)
time (dub --compiler=dmd -color --config=dmd --build=dmd-release)
-#+BEGIN_SRC sh :NO-tangle ../dub.sdl
+#+HEADER: :NO-tangle ../dub.sdl
+#+BEGIN_SRC sh
configuration "dmd" {
targetName "spine-dmd"
postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-dmd'"
@@ -1558,7 +1569,8 @@ configuration "dmd-version" {
time (dub --compiler=ldc2 -color --config=ldc --build=ldc)
time (dub --compiler=ldc2 -color --config=ldc --build=ldc-release)
-#+BEGIN_SRC sh :NO-tangle ../dub.sdl
+#+HEADER: :NO-tangle ../dub.sdl
+#+BEGIN_SRC sh
configuration "ldc" {
targetName "spine-ldc"
postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-ldc'"
@@ -1590,7 +1602,8 @@ configuration "ldc-version" {
time (dub --compiler=gdc --config=gdc --build=gdc)
time (dub --compiler=gdc --config=gdc --build=gdc-release)
-#+BEGIN_SRC sh :NO-tangle ../dub.sdl
+#+HEADER: :NO-tangle ../dub.sdl
+#+BEGIN_SRC sh
configuration "gdc" {
targetName "spine-gdc"
postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-gdc'"
@@ -1666,7 +1679,8 @@ cat spine_sources.txt
**** project meson.build :filelist:
-#+BEGIN_SRC sh :tangle ../meson.build
+#+HEADER: :tangle ../meson.build
+#+BEGIN_SRC sh
project('spine', 'd',
license: 'AGPL-3',
version: '<<version_spine>>',
@@ -1741,7 +1755,8 @@ spine_exe = executable('spine',
** meson subprojects [taken care of using dub] :subprojects:
*** README
-#+BEGIN_SRC txt :tangle ../subprojects/README
+#+HEADER: :tangle ../subprojects/README
+#+BEGIN_SRC txt
- d2sqlite3
- dub
- https://code.dlang.org/packages/d2sqlite3
@@ -1769,7 +1784,8 @@ spine_exe = executable('spine',
*** d2sqlite3 :d2sqlite3:
**** wrap
-#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.wrap
+#+HEADER: :tangle ../subprojects/d2sqlite3.wrap
+#+BEGIN_SRC sh
[wrap-git]
directory = d2sqlite3
url = https://github.com/dlang-community/d2sqlite3.git
@@ -1778,7 +1794,8 @@ revision = head
**** meson.build
-#+BEGIN_SRC sh :NO-tangle ../subprojects/d2sqlite3.meson.build
+#+HEADER: :NO-tangle ../subprojects/d2sqlite3.meson.build
+#+BEGIN_SRC sh
project('d2sqlite3', 'd',
meson_version: '>=<<version_meson>>',
license: 'BSL-1.0',
@@ -1832,7 +1849,8 @@ d2sqlite3_dep = declare_dependency(
*** dyaml :dyaml:
**** wrap
-#+BEGIN_SRC sh :tangle ../subprojects/dyaml.wrap
+#+HEADER: :tangle ../subprojects/dyaml.wrap
+#+BEGIN_SRC sh
[wrap-git]
directory = dyaml
url = https://github.com/dlang-community/D-YAML.git
@@ -1843,7 +1861,8 @@ revision = head
Upstream provides meson.build
-#+BEGIN_SRC sh :NO-tangle ../subprojects/D-YAML/meson.build
+#+HEADER: :NO-tangle ../subprojects/D-YAML/meson.build
+#+BEGIN_SRC sh
project('D-YAML', 'd',
meson_version: '>=<<version_meson>>',
subproject_dir: 'contrib',
@@ -1919,7 +1938,8 @@ dyaml_dep = declare_dependency(
*** imageformats :imageformats:
**** wrap
-#+BEGIN_SRC sh :tangle ../subprojects/imageformats.wrap
+#+HEADER: :tangle ../subprojects/imageformats.wrap
+#+BEGIN_SRC sh
[wrap-git]
directory = imageformats
url = https://github.com/lgvz/imageformats.git
@@ -1928,7 +1948,8 @@ revision = head
**** meson.build
-#+BEGIN_SRC sh :NO-tangle ../subprojects/imageformats.meson.build
+#+HEADER: :NO-tangle ../subprojects/imageformats.meson.build
+#+BEGIN_SRC sh
project('imageformats', 'd',
meson_version: '>=<<version_meson>>',
license: 'BSL-1.0',
@@ -1974,7 +1995,8 @@ imageformats_dep = declare_dependency(
*** tinyendian (dyaml dependency) :tinyendian:
**** wrap
-#+BEGIN_SRC sh :tangle ../subprojects/tinyendian.wrap
+#+HEADER: :tangle ../subprojects/tinyendian.wrap
+#+BEGIN_SRC sh
[wrap-git]
directory = tinyendian
url = https://github.com/dlang-community/tinyendian.git
@@ -1985,7 +2007,8 @@ revision = head
Upstream provides meson.build
-#+BEGIN_SRC sh :NO-tangle ../subprojects/tinyendian/meson.build
+#+HEADER: :NO-tangle ../subprojects/tinyendian/meson.build
+#+BEGIN_SRC sh
# -*- mode: python; -*-
project(
@@ -2037,7 +2060,8 @@ tinyendian_dep = declare_dependency(
** envrc :envrc:
*** .envrc
-#+BEGIN_SRC nix :tangle ../.envrc
+#+HEADER: :tangle ../.envrc
+#+BEGIN_SRC sh
NIX_ENFORCE_PURITY=0
if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local
source .envrc-local
@@ -2046,7 +2070,8 @@ fi
- lorri?
-#+BEGIN_SRC nix :NO-tangle ../.envrc
+#+HEADER: :NO-tangle ../.envrc
+#+BEGIN_SRC sh
if type lorri &>/dev/null; then
echo "direnv: using lorri from PATH ($(type -p lorri))"
eval "$(lorri direnv)"
@@ -2061,7 +2086,8 @@ fi
- enable flakes
-#+BEGIN_SRC nix :NO-tangle ../.envrc
+#+HEADER: :NO-tangle ../.envrc
+#+BEGIN_SRC sh
if [ -f flake.lock ] && [ -f flake.nix ]; then
# reload when these files change
watch_file flake.nix
@@ -2095,7 +2121,8 @@ fi
- bespoke modify appropriately and generate if needed
-#+BEGIN_SRC nix :tangle ../.envrc-local_
+#+HEADER: :tangle ../.envrc-local_
+#+BEGIN_SRC sh
export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
#export NIX_PATH=nixpkgs=<<nixpkgs_path>>
## reload when these files change
@@ -2288,7 +2315,8 @@ nix develop
nix flake update
-#+BEGIN_SRC nix :tangle ../flake.nix
+#+HEADER: :tangle ../flake.nix
+#+BEGIN_SRC nix
{
description = "a sisu like document parser";
inputs = {
@@ -2354,7 +2382,8 @@ nix flake update
}
#+END_SRC
-#+BEGIN_SRC nix :NO-tangle ../flake.nix
+#+HEADER: :NO-tangle ../flake.nix
+#+BEGIN_SRC nix
{
description = "a sisu like document parser";
inputs = {
@@ -2419,7 +2448,10 @@ nix flake update
nix build -f default.nix
./result/bin/spine
-#+BEGIN_SRC nix :tangle ../shell.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell"
+#+HEADER: :tangle ../shell.nix
+#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --pure"
+#+BEGIN_SRC nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
@@ -2445,7 +2477,10 @@ pkgs.mkShell {
}
#+END_SRC
-#+BEGIN_SRC nix :NO-tangle ../shell.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell"
+#+HEADER: :NO-tangle ../shell.nix
+#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang "#!/usr/bin/env -S nix-shell"
+#+BEGIN_SRC nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
@@ -2481,7 +2516,10 @@ pkgs.mkShell {
nix build -f project.nix
nix build -f spine.nix
-#+BEGIN_SRC nix :tangle ../default.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-build"
+#+HEADER: :tangle ../default.nix
+#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang "#!/usr/bin/env -S nix-build"
+#+BEGIN_SRC nix
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
lib ? pkgs.lib,
@@ -2613,7 +2651,8 @@ meta = with pkgs.lib; {
** dub.selections.json
-#+BEGIN_SRC nix :NO-tangle ../dub.selections.json
+#+HEADER: :NO-tangle ../dub.selections.json
+#+BEGIN_SRC nix
{
"fileVersion": 1,
"versions": {
@@ -2627,7 +2666,8 @@ meta = with pkgs.lib; {
** dub.selections.nix
-#+BEGIN_SRC nix :NO-tangle ../nix/dub.selections.nix
+#+HEADER: :NO-tangle ../nix/dub.selections.nix
+#+BEGIN_SRC nix
# This file was generated by https://github.com/lionello/dub2nix v0.2.3
[ {
fetch = {
@@ -2790,7 +2830,10 @@ babel tangle) org files in ./org/ to create .d source files in ./src/doc_reform/
(similar functionality is contained within the "makefile" created by this
"dr_build_scaffold.org" file make tangle)
-#+BEGIN_SRC sh :tangle ../tangle :tangle-mode (identity #o755) :shebang "#!/bin/sh"
+#+HEADER: :tangle ../tangle
+#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang "#!/bin/sh"
+#+BEGIN_SRC sh
# -*- mode: shell-script -*-
# tangle files with org-mode
DIR=`pwd`
@@ -3158,7 +3201,8 @@ toc
*** dub (using ldc rather than dmd) overlay REFERENCE :overlay:
-#+BEGIN_SRC nix :NO-tangle ~/nixpkgs/pkgs/development/tools/build-managers/dub/default.nix
+#+HEADER: :NO-tangle ~/nixpkgs/pkgs/development/tools/build-managers/dub/default.nix
+#+BEGIN_SRC nix
{ lib, stdenv, fetchFromGitHub, curl, libevent, rsync, ldc, dcompiler ? ldc }:
assert dcompiler != null;