From 21c47648398af1f998d19d995ea636e9bb6f8164 Mon Sep 17 00:00:00 2001 From: Yoshimura Yuu Date: Sun, 22 Oct 2023 20:28:34 +0900 Subject: [PATCH 1/7] Generate version info from `satysfi.opam` --- src/dune | 5 +++++ src/frontend/main.ml | 2 +- tools/genversion/dune | 3 +++ tools/genversion/dune-project | 1 + tools/genversion/genversion.ml | 21 +++++++++++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 tools/genversion/dune create mode 100644 tools/genversion/dune-project create mode 100644 tools/genversion/genversion.ml diff --git a/src/dune b/src/dune index 230c14527..0e9828848 100644 --- a/src/dune +++ b/src/dune @@ -39,6 +39,11 @@ (modules parser dataParser) (flags (--table --explain))) +(rule + (targets version.ml) + (deps ../tools/genversion/genversion.exe (:src ../satysfi.opam)) + (action (with-stdout-to %{targets} (run %{deps})))) + (rule (targets types.ml) (deps (:src types.cppo.ml) __insttype.gen.ml __attype.gen.ml __codetype.gen.ml __unliftcode.gen.ml) diff --git a/src/frontend/main.ml b/src/frontend/main.ml index 749661668..464aede49 100644 --- a/src/frontend/main.ml +++ b/src/frontend/main.ml @@ -1006,7 +1006,7 @@ let error_log_environment suspended = let arg_version () = print_string ( - " SATySFi version 0.0.9\n" + (Printf.sprintf " SATySFi version %s\n" Version.version) (* ^ " (in the middle of the transition from Macrodown)\n" ^ " ____ ____ ________ _____ ______\n" diff --git a/tools/genversion/dune b/tools/genversion/dune new file mode 100644 index 000000000..abde6685f --- /dev/null +++ b/tools/genversion/dune @@ -0,0 +1,3 @@ +(executable + (name genversion) + (libraries str)) diff --git a/tools/genversion/dune-project b/tools/genversion/dune-project new file mode 100644 index 000000000..de4fc2092 --- /dev/null +++ b/tools/genversion/dune-project @@ -0,0 +1 @@ +(lang dune 1.0) diff --git a/tools/genversion/genversion.ml b/tools/genversion/genversion.ml new file mode 100644 index 000000000..d4791f201 --- /dev/null +++ b/tools/genversion/genversion.ml @@ -0,0 +1,21 @@ +let version_regex = Str.regexp {|^version: ?"\([0-9]+\.[0-9]+\.[0-9]+\)"$|} + +let () = + let version = ref "" in + let opam_file_path = Sys.argv.(1) in + let channel_in = open_in opam_file_path in + let search_version () = + let cond = ref true in + while !cond do + let line = input_line channel_in in + try + let _ = Str.search_forward version_regex line 0 in + version := Str.matched_group 1 line; + cond := false + with Not_found -> + () + done + in + search_version (); + close_in channel_in; + print_endline ("let version = \"" ^ !version ^ "\"") From 8338dbe69e9021d25d0265c6be4e8eb517c4444d Mon Sep 17 00:00:00 2001 From: Takashi Suwa Date: Sun, 31 Dec 2023 16:24:54 +0900 Subject: [PATCH 2/7] avoid `camlimages.5.0.5` for an installation issue --- satysfi.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satysfi.opam b/satysfi.opam index a1edd7172..85a84ddbc 100644 --- a/satysfi.opam +++ b/satysfi.opam @@ -22,7 +22,7 @@ remove: [ depends: [ "ocaml" {>= "4.12.0"} "batteries" - "camlimages" {>= "5.0.1"} + "camlimages" {>= "5.0.1" & < "5.0.5"} "camlpdf" {= "2.3.1+satysfi"} "core_kernel" {>= "v0.15"} "cppo" {build & >= "1.6.4" & < "1.7.0"} From cfc4c9dfa3ef560cf7c54c37c896d52c5cd681fa Mon Sep 17 00:00:00 2001 From: Takashi Suwa Date: Fri, 19 Jan 2024 03:02:30 +0900 Subject: [PATCH 3/7] fix `src/dune` about how to use `camlimages` --- src/dune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dune b/src/dune index 230c14527..b29287324 100644 --- a/src/dune +++ b/src/dune @@ -4,7 +4,7 @@ (flags (-w -3 -bin-annot -thread -safe-string)) (libraries str batteries - camlimages + camlimages.core camlimages.jpeg camlimages.png camlpdf From 62dcbfd697fc866bc5ede0dfe1296370d6b817a3 Mon Sep 17 00:00:00 2001 From: Takashi Suwa Date: Fri, 19 Jan 2024 03:04:03 +0900 Subject: [PATCH 4/7] specify more versions in `satysfi.opam` --- satysfi.opam | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/satysfi.opam b/satysfi.opam index 85a84ddbc..d6337321d 100644 --- a/satysfi.opam +++ b/satysfi.opam @@ -20,21 +20,21 @@ remove: [ ] # Packages whose version suffix is "+satysfi" are distributed on satysfi-external-repo. depends: [ - "ocaml" {>= "4.12.0"} - "batteries" - "camlimages" {>= "5.0.1" & < "5.0.5"} + "ocaml" {>= "4.12.0" & < "5.0.0"} + "batteries" {>= "3.6.0" & < "4.0.0"} + "camlimages" {>= "5.0.1" & < "6.0.0"} "camlpdf" {= "2.3.1+satysfi"} - "core_kernel" {>= "v0.15"} + "core_kernel" {>= "v0.15" & < "v0.16"} "cppo" {build & >= "1.6.4" & < "1.7.0"} "dune" {build} "menhir" "ocamlfind" {build} - "otfed" {= "0.3.1"} - "ppx_deriving" - "re" {build} - "uutf" + "otfed" {>= "0.3.1" & < "0.4"} + "ppx_deriving" {>= "5.2.1" & < "6.0.0"} + "re" {build & >= "1.10.4" & < "2.0.0"} + "uutf" {>= "1.0.3" & < "2.0.0"} "yojson-with-position" {= "1.4.2+satysfi"} - "omd" {< "2.0.0~"} + "omd" {>= "1.3.2" & < "2.0.0~"} ] synopsis: "A statically-typed, functional typesetting system" description: """ From e0f744e66abac9fd420ab14eefb45393ec005148 Mon Sep 17 00:00:00 2001 From: Takashi Suwa Date: Sun, 4 Feb 2024 02:18:26 +0900 Subject: [PATCH 5/7] revert change on the version constraint of `camlimages` for the moment --- satysfi.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satysfi.opam b/satysfi.opam index d6337321d..b3771019b 100644 --- a/satysfi.opam +++ b/satysfi.opam @@ -22,7 +22,7 @@ remove: [ depends: [ "ocaml" {>= "4.12.0" & < "5.0.0"} "batteries" {>= "3.6.0" & < "4.0.0"} - "camlimages" {>= "5.0.1" & < "6.0.0"} + "camlimages" {>= "5.0.1" & < "5.0.5"} "camlpdf" {= "2.3.1+satysfi"} "core_kernel" {>= "v0.15" & < "v0.16"} "cppo" {build & >= "1.6.4" & < "1.7.0"} From 1150d30f2fc948d14e76099aaa35798f52955e6d Mon Sep 17 00:00:00 2001 From: Takashi Suwa Date: Mon, 5 Feb 2024 21:14:17 +0900 Subject: [PATCH 6/7] release 0.0.11 --- CHANGELOG.md | 8 +++++++- satysfi.opam | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a7c77bc0..bd176e93c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [0.0.11] - 2024-02-05 +### Fixed +- Improve the dependency description in the `.opam` file ([PR\#426](https://github.com/gfngfn/SATySFi/pull/426)). +- Avoid `camlimages.5.0.5` due to an installation issue ([PR\#425](https://github.com/gfngfn/SATySFi/pull/425)). + ## [0.0.10] - 2023-10-12 ### Fixed - Fix URLs of Latin Modern fonts for installation ([PR\#412](https://github.com/gfngfn/SATySFi/pull/412) by `caphosra`). @@ -153,7 +158,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/), - Initial version of SATySFi - [Unreleased]: https://github.com/gfngfn/SATySFi/compare/v0.0.10...HEAD + [Unreleased]: https://github.com/gfngfn/SATySFi/compare/v0.0.11...HEAD + [0.0.11]: https://github.com/gfngfn/SATySFi/compare/v0.0.10...v0.0.11 [0.0.10]: https://github.com/gfngfn/SATySFi/compare/v0.0.9...v0.0.10 [0.0.9]: https://github.com/gfngfn/SATySFi/compare/v0.0.8...v0.0.9 [0.0.8]: https://github.com/gfngfn/SATySFi/compare/v0.0.7...v0.0.8 diff --git a/satysfi.opam b/satysfi.opam index b3771019b..4a2ff9b68 100644 --- a/satysfi.opam +++ b/satysfi.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "satysfi" -version: "0.0.10" +version: "0.0.11" maintainer: "Takashi Suwa" authors: [ "Takashi Suwa" From eee46e8e2f2b0869c2750f8284e0a21047424f71 Mon Sep 17 00:00:00 2001 From: Takashi Suwa Date: Mon, 5 Feb 2024 22:44:14 +0900 Subject: [PATCH 7/7] update README --- README-ja.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README-ja.md b/README-ja.md index de971f320..f28c3a0d7 100644 --- a/README-ja.md +++ b/README-ja.md @@ -14,7 +14,7 @@ * 株式会社ドワンゴ(2018年10月–2019年3月.アルバイトとして) * [The SATySFi​book](https://booth.pm/ja/items/1127224)を購入頂いた,多くの匿名の支援者の方々 -また,2023年10月現在も発展を続けています。 +また,2024年2月現在も発展を続けています。 ## Satyrographos を使ったインストール方法 (初心者向け) diff --git a/README.md b/README.md index a9f0b5dd0..bbc55ac19 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This software was supported by: * Dwango Co., Ltd. (October 2018 – March 2019; as a part-time job), and * many anonymous supporters who bought [The SATySFi​book](https://booth.pm/ja/items/1127224), -and its development continues to this day (Oct 2023). +and its development continues to this day (Feb 2024). ## Install using Satyrographos (for non-devs)