Skip to content

Commit

Permalink
Update to Dune 3.16 and generate opam file
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Oct 15, 2024
1 parent 0245480 commit 489754d
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 32 deletions.
41 changes: 40 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,41 @@
(lang dune 1.0)
(lang dune 3.16)
(name extlib)

(generate_opam_files true)
(formatting (enabled_for dune))

(source (github ygrek/ocaml-extlib))
(documentation "https://ygrek.org/p/extlib/doc/")
(maintainers "ygrek@autistici.org")
(license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception")

(package
(name extlib)
(synopsis "A complete yet small extension for OCaml standard library")
(description
"The purpose of this library is to add new functions to OCaml standard library
modules, to modify some functions in order to get better performances or
safety (tail-recursive) and also to provide new modules which should be useful
for day to day programming.
Current goal is to maintain compatibility, new software is encouraged to not use extlib since stdlib
is now seeing many additions and improvements which make many parts of extlib obsolete.
For tail-recursion safety consider using other libraries e.g. containers.
")
(authors
"Nicolas Cannasse"
"Brian Hurt"
"Yamagata Yoriyuki"
"Markus Mottl"
"Jesse Guardiani"
"John Skaller"
"Bardur Arantsson"
"Janne Hellsten"
"Richard W.M. Jones"
"ygrek"
"Gabriel Scherer"
"Pietro Abate")
(depends
(ocaml (>= "4.02"))
(cppo (and :build (>= "1.0.1")))))

53 changes: 32 additions & 21 deletions extlib.opam
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
maintainer: "ygrek@autistici.org"
homepage: "https://github.com/ygrek/ocaml-extlib"
dev-repo: "git+https://github.com/ygrek/ocaml-extlib.git"
bug-reports: "https://github.com/ygrek/ocaml-extlib/issues"
doc: ["https://ygrek.org/p/extlib/doc/"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis: "A complete yet small extension for OCaml standard library"
description: """
The purpose of this library is to add new functions to OCaml standard library
modules, to modify some functions in order to get better performances or
safety (tail-recursive) and also to provide new modules which should be useful
for day to day programming.

Current goal is to maintain compatibility, new software is encouraged to not use extlib since stdlib
is now seeing many additions and improvements which make many parts of extlib obsolete.
For tail-recursion safety consider using other libraries e.g. containers.
"""
maintainer: ["ygrek@autistici.org"]
authors: [
"Nicolas Cannasse"
"Brian Hurt"
Expand All @@ -19,24 +26,28 @@ authors: [
"Gabriel Scherer"
"Pietro Abate"
]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://github.com/ygrek/ocaml-extlib"
doc: "https://ygrek.org/p/extlib/doc/"
bug-reports: "https://github.com/ygrek/ocaml-extlib/issues"
depends: [
"dune" {>= "1.0"}
"dune" {>= "3.16"}
"ocaml" {>= "4.02"}
"cppo" {build & >= "1.0.1"}
"odoc" {with-doc}
]
synopsis:
"A complete yet small extension for OCaml standard library"
description: """
The purpose of this library is to add new functions to OCaml standard library
modules, to modify some functions in order to get better performances or
safety (tail-recursive) and also to provide new modules which should be useful
for day to day programming.

Current goal is to maintain compatibility, new software is encouraged to not use extlib since stdlib
is now seeing many additions and improvements which make many parts of extlib obsolete.
For tail-recursion safety consider using other libraries e.g. containers.
"""
build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ygrek/ocaml-extlib.git"
2 changes: 1 addition & 1 deletion src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name extlib)
(public_name extlib)
(modules :standard \ configure install base64 unzip uChar uTF8)
(flags :standard -w -3-6-9-27-32-33-35-39-50)
(flags :standard -w -3-6-9-27-32-33-35-39-50-69)
(preprocess
(action
(run %{bin:cppo} %{read-lines:compat-level} %{input-file})))
Expand Down
14 changes: 5 additions & 9 deletions test/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
(executable
(name runner)
(flags :standard -w -3-6-35-27)
(modules :standard \ test_Unzip test_UTF8 test_Base64)
(libraries extlib))

(alias
(name runtest)
(action (run ./runner.exe)))
(test
(name runner)
(flags :standard -w -3-6-35-27)
(modules :standard \ test_Unzip test_UTF8 test_Base64)
(libraries extlib))

0 comments on commit 489754d

Please sign in to comment.