160 lines
4.4 KiB
Diff
160 lines
4.4 KiB
Diff
From 5462396bee53cb13d8d6fde4c6d430412a17b64d Mon Sep 17 00:00:00 2001
|
|
From: Stephane Glondu <steph@glondu.net>
|
|
Date: Thu, 3 Apr 2025 09:52:20 +0200
|
|
Subject: [PATCH] Do not use dune sites
|
|
|
|
Using dune-site forces use of dune in all reverse-dependencies:
|
|
|
|
https://github.com/gildor478/ocaml-gettext/issues/36
|
|
|
|
The use here is to add an ocaml-gettext-specific directory to the
|
|
default MO search path. Remove this directory altogether. (This may
|
|
break reverse dependencies.)
|
|
---
|
|
dune-project | 2 --
|
|
gettext-camomile.opam | 2 --
|
|
gettext-stub.opam | 2 --
|
|
gettext.opam | 3 ---
|
|
src/lib/gettext/base/.keep-directory | 1 -
|
|
src/lib/gettext/base/dune | 13 +------------
|
|
src/lib/gettext/base/gettextConfig.ml | 9 +--------
|
|
7 files changed, 2 insertions(+), 30 deletions(-)
|
|
delete mode 100644 src/lib/gettext/base/.keep-directory
|
|
|
|
diff --git a/dune-project b/dune-project
|
|
index 2ee85d7..ef2b58e 100644
|
|
--- a/dune-project
|
|
+++ b/dune-project
|
|
@@ -2,7 +2,6 @@
|
|
(name gettext)
|
|
|
|
(explicit_js_mode)
|
|
-(using dune_site 0.1)
|
|
(generate_opam_files)
|
|
|
|
(source (github gildor478/ocaml-gettext))
|
|
@@ -25,7 +24,6 @@
|
|
"\|
|
|
)
|
|
(depends
|
|
- dune-site
|
|
(ocaml (>= "4.14.0"))
|
|
(cppo (and (>= 1.8.0) :build))
|
|
(seq (and (>= "base") :with-test))
|
|
diff --git a/gettext-camomile.opam b/gettext-camomile.opam
|
|
index 1fde721..05c96d1 100644
|
|
--- a/gettext-camomile.opam
|
|
+++ b/gettext-camomile.opam
|
|
@@ -25,11 +25,9 @@ build: [
|
|
name
|
|
"-j"
|
|
jobs
|
|
- "--promote-install-files=false"
|
|
"@install"
|
|
"@runtest" {with-test}
|
|
"@doc" {with-doc}
|
|
]
|
|
- ["dune" "install" "-p" name "--create-install-files" name]
|
|
]
|
|
dev-repo: "git+https://github.com/gildor478/ocaml-gettext.git"
|
|
diff --git a/gettext-stub.opam b/gettext-stub.opam
|
|
index 2463a70..980a584 100644
|
|
--- a/gettext-stub.opam
|
|
+++ b/gettext-stub.opam
|
|
@@ -24,12 +24,10 @@ build: [
|
|
name
|
|
"-j"
|
|
jobs
|
|
- "--promote-install-files=false"
|
|
"@install"
|
|
"@runtest" {with-test}
|
|
"@doc" {with-doc}
|
|
]
|
|
- ["dune" "install" "-p" name "--create-install-files" name]
|
|
]
|
|
dev-repo: "git+https://github.com/gildor478/ocaml-gettext.git"
|
|
depexts: [
|
|
diff --git a/gettext.opam b/gettext.opam
|
|
index 50a0933..d2f6490 100644
|
|
--- a/gettext.opam
|
|
+++ b/gettext.opam
|
|
@@ -19,7 +19,6 @@ doc: "https://gildor478.github.io/ocaml-gettext/"
|
|
bug-reports: "https://github.com/gildor478/ocaml-gettext/issues"
|
|
depends: [
|
|
"dune" {>= "3.17"}
|
|
- "dune-site"
|
|
"ocaml" {>= "4.14.0"}
|
|
"cppo" {>= "1.8.0" & build}
|
|
"seq" {>= "base" & with-test}
|
|
@@ -36,11 +35,9 @@ build: [
|
|
name
|
|
"-j"
|
|
jobs
|
|
- "--promote-install-files=false"
|
|
"@install"
|
|
"@runtest" {with-test}
|
|
"@doc" {with-doc}
|
|
]
|
|
- ["dune" "install" "-p" name "--create-install-files" name]
|
|
]
|
|
dev-repo: "git+https://github.com/gildor478/ocaml-gettext.git"
|
|
diff --git a/src/lib/gettext/base/.keep-directory b/src/lib/gettext/base/.keep-directory
|
|
deleted file mode 100644
|
|
index f1eab5f..0000000
|
|
--- a/src/lib/gettext/base/.keep-directory
|
|
+++ /dev/null
|
|
@@ -1 +0,0 @@
|
|
-# This directory contains MO files.
|
|
diff --git a/src/lib/gettext/base/dune b/src/lib/gettext/base/dune
|
|
index 2eae0c5..7b98bb7 100644
|
|
--- a/src/lib/gettext/base/dune
|
|
+++ b/src/lib/gettext/base/dune
|
|
@@ -4,17 +4,6 @@
|
|
(ocamlyacc
|
|
(modules gettextFormat_parser gettextMo_parser))
|
|
|
|
-(generate_sites_module
|
|
- (module gettextConfigDune)
|
|
- (sites gettext))
|
|
-
|
|
-(install
|
|
- (package gettext)
|
|
- (section
|
|
- (site
|
|
- (gettext locale)))
|
|
- (files .keep-directory))
|
|
-
|
|
(rule
|
|
(target gettextConfigGen.ml)
|
|
(action
|
|
@@ -33,4 +22,4 @@
|
|
GettextMo_int32
|
|
GettextMo_lexer
|
|
GettextMo_parser)
|
|
- (libraries dune-site fileutils))
|
|
+ (libraries fileutils))
|
|
diff --git a/src/lib/gettext/base/gettextConfig.ml b/src/lib/gettext/base/gettextConfig.ml
|
|
index 9d5d986..fe8963b 100644
|
|
--- a/src/lib/gettext/base/gettextConfig.ml
|
|
+++ b/src/lib/gettext/base/gettextConfig.ml
|
|
@@ -23,19 +23,12 @@
|
|
let default_dir = GettextConfigGen.default_localedir
|
|
|
|
let default_path () =
|
|
- let dunepath =
|
|
- match GettextConfigDune.Sites.locale with
|
|
- | [ path ] -> [ path ]
|
|
- | [] -> []
|
|
- | _ -> assert false
|
|
- in
|
|
let envpath =
|
|
match Sys.getenv "OCAML_LOCALEPATH" with
|
|
| s -> String.split_on_char ':' s
|
|
| exception Not_found -> []
|
|
in
|
|
- envpath @ dunepath
|
|
- @ [ GettextConfigGen.localedir; GettextConfigGen.default_localedir ]
|
|
+ envpath @ [ GettextConfigGen.localedir; GettextConfigGen.default_localedir ]
|
|
|
|
let default_codeset = ""
|
|
|