From 335d62fc6e33a92b93d8fdd05bcf89fdcfbeb991 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:09:59 +0100 Subject: [PATCH 01/17] new file: packages/liblinear/liblinear.2.47/opam --- packages/liblinear/liblinear.2.47/opam | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 packages/liblinear/liblinear.2.47/opam diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam new file mode 100644 index 00000000000..a322722393e --- /dev/null +++ b/packages/liblinear/liblinear.2.47/opam @@ -0,0 +1,34 @@ +opam-version: "2.0" +authors: "https://www.csie.ntu.edu.tw/~cjlin/liblinear/contributors.html" +homepage: "https://www.csie.ntu.edu.tw/~cjlin/liblinear" +maintainer: "https://www.csie.ntu.edu.tw/~cjlin/index.html" +bug-reports: "https://github.com/ocaml/opam-repository/issues" +license: "BSD-3-Clause" +build: [ + [make] + ["cp" "liblinear-train" "%{bin}%/liblinear-train"] + ["cp" "liblinear-predict" "%{bin}%/liblinear-predict"] +] +depexts: [ + ["conf-gcc"] + ["conf-g++"] +] +available: os != "win32" +synopsis: "User-space installer for liblinear" +description: """ +Attempt a user-space installation of liblinear. +If successful, liblinear-train and liblinear-predict will be installed +into opam's bin directory. +Note: liblinear is a C++ software which is required by some OCaml +software in opam-repository. +Having an automatic user-space installer in opam-repos. will make those +software easier to install (e.g. even if you don't have root access +to install the liblinear system package). +""" +dev-repo: "git://https://github.com/cjlin1/liblinear.git" +url { + src: "https://github.com/cjlin1/liblinear/archive/refs/tags/v247.tar.gz" + checksum: [ + "sha256=a62c46f20a01a4626260462c905721f5471da4550d38c3b68ffacf0aa64067b4" + ] +} From d415f9e8f2e6e5f1e99a6cbdef1bb0d8c4ba611f Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:15:55 +0100 Subject: [PATCH 02/17] some fixes in liblinear.2.47/opam --- packages/liblinear/liblinear.2.47/opam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index a322722393e..e7939276684 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -5,6 +5,8 @@ maintainer: "https://www.csie.ntu.edu.tw/~cjlin/index.html" bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ + ["sh" "-c" "pwd"] + ["sh" "-c" "cd liblinear-247"] [make] ["cp" "liblinear-train" "%{bin}%/liblinear-train"] ["cp" "liblinear-predict" "%{bin}%/liblinear-predict"] From 8c5e6d62fb840b2c2cf3ef2f5240797588a3bf72 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:22:24 +0100 Subject: [PATCH 03/17] liblinear.2.47/opam: fixes --- packages/liblinear/liblinear.2.47/opam | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index e7939276684..9f42da59698 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,7 +6,6 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ ["sh" "-c" "pwd"] - ["sh" "-c" "cd liblinear-247"] [make] ["cp" "liblinear-train" "%{bin}%/liblinear-train"] ["cp" "liblinear-predict" "%{bin}%/liblinear-predict"] From 0204b7e1e110455b673983237ae17b8b6e15f4a5 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:24:51 +0100 Subject: [PATCH 04/17] more debug info --- packages/liblinear/liblinear.2.47/opam | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index 9f42da59698..719948820cc 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,6 +6,7 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ ["sh" "-c" "pwd"] + ["sh" "-c" "ls -la"] [make] ["cp" "liblinear-train" "%{bin}%/liblinear-train"] ["cp" "liblinear-predict" "%{bin}%/liblinear-predict"] From 12fecb23dfa95d0e36d51da9e445d2d02e0c674e Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:27:22 +0100 Subject: [PATCH 05/17] more fixes --- packages/liblinear/liblinear.2.47/opam | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index 719948820cc..11920bf2202 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -7,9 +7,7 @@ license: "BSD-3-Clause" build: [ ["sh" "-c" "pwd"] ["sh" "-c" "ls -la"] - [make] - ["cp" "liblinear-train" "%{bin}%/liblinear-train"] - ["cp" "liblinear-predict" "%{bin}%/liblinear-predict"] + ["sh" "-c" "cd liblinear-247 && make && cp liblinear-train %{bin}%/ && cp liblinear-predict %{bin}%/"] ] depexts: [ ["conf-gcc"] From 1af77b370295ce762c0541a40c1007910741c265 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:32:46 +0100 Subject: [PATCH 06/17] more fixes --- packages/liblinear/liblinear.2.47/opam | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index 11920bf2202..d8f3087e16f 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -5,9 +5,11 @@ maintainer: "https://www.csie.ntu.edu.tw/~cjlin/index.html" bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ - ["sh" "-c" "pwd"] - ["sh" "-c" "ls -la"] - ["sh" "-c" "cd liblinear-247 && make && cp liblinear-train %{bin}%/ && cp liblinear-predict %{bin}%/"] + ["sh" "-c" "pwd && ls -la"] + [make "-C liblinear-247"] + ["sh" "-c" "pwd && ls -la && ls -la liblinear-247"] + ["sh" "-c" "cp liblinear-247/train %{bin}%/liblinear-train"] + ["sh" "-c" "cp liblinear-247/predict %{bin}%/liblinear-predict"] ] depexts: [ ["conf-gcc"] From 8675f8ed80179e88ce1d83dc6496191e1e79db33 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:34:18 +0100 Subject: [PATCH 07/17] more fixes --- packages/liblinear/liblinear.2.47/opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index d8f3087e16f..bf0383960d7 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,7 +6,7 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ ["sh" "-c" "pwd && ls -la"] - [make "-C liblinear-247"] + ["sh" "-c" "make -C liblinear-247"] ["sh" "-c" "pwd && ls -la && ls -la liblinear-247"] ["sh" "-c" "cp liblinear-247/train %{bin}%/liblinear-train"] ["sh" "-c" "cp liblinear-247/predict %{bin}%/liblinear-predict"] From de06b41c6bd4030d6d8e93129d4adb24995bc53a Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 11:44:47 +0100 Subject: [PATCH 08/17] final fixes? --- packages/liblinear/liblinear.2.47/opam | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index bf0383960d7..59389c22570 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -5,11 +5,9 @@ maintainer: "https://www.csie.ntu.edu.tw/~cjlin/index.html" bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ - ["sh" "-c" "pwd && ls -la"] ["sh" "-c" "make -C liblinear-247"] - ["sh" "-c" "pwd && ls -la && ls -la liblinear-247"] - ["sh" "-c" "cp liblinear-247/train %{bin}%/liblinear-train"] - ["sh" "-c" "cp liblinear-247/predict %{bin}%/liblinear-predict"] + ["cp" "liblinear-247/train" "%{bin}%/liblinear-train"] + ["cp" "liblinear-247/predict" "%{bin}%/liblinear-predict"] ] depexts: [ ["conf-gcc"] From 4dcc99c25c5a1f0ffccb44d8877d4b3875ee912e Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 13:14:32 +0100 Subject: [PATCH 09/17] try using install instead of cp in the hope to solve problems when OPAMROOT is served via NFS --- packages/liblinear/liblinear.2.47/opam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index 59389c22570..a38859d0d3e 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,8 +6,8 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ ["sh" "-c" "make -C liblinear-247"] - ["cp" "liblinear-247/train" "%{bin}%/liblinear-train"] - ["cp" "liblinear-247/predict" "%{bin}%/liblinear-predict"] + ["install" "liblinear-247/train" "%{bin}%/liblinear-train"] + ["install" "liblinear-247/predict" "%{bin}%/liblinear-predict"] ] depexts: [ ["conf-gcc"] From 4bd09f1e93d18177aa193718ec779c4ca856b512 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 13:24:46 +0100 Subject: [PATCH 10/17] trying 'cp -d --preserve=all' instead of 'install' --- packages/liblinear/liblinear.2.47/opam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index a38859d0d3e..3ccb6beee07 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,8 +6,8 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ ["sh" "-c" "make -C liblinear-247"] - ["install" "liblinear-247/train" "%{bin}%/liblinear-train"] - ["install" "liblinear-247/predict" "%{bin}%/liblinear-predict"] + ["cp" "-d" "--preserve=all" "liblinear-247/train" "%{bin}%/liblinear-train"] + ["cp" "-d" "--preserve=all" "liblinear-247/predict" "%{bin}%/liblinear-predict"] ] depexts: [ ["conf-gcc"] From d8a33c28ea6f55fcf6292c8937bf5e3f292069d9 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Thu, 24 Oct 2024 15:03:12 +0100 Subject: [PATCH 11/17] opam: use install instead of cp since it is what should be used --- packages/liblinear/liblinear.2.47/opam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index 3ccb6beee07..a38859d0d3e 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,8 +6,8 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ ["sh" "-c" "make -C liblinear-247"] - ["cp" "-d" "--preserve=all" "liblinear-247/train" "%{bin}%/liblinear-train"] - ["cp" "-d" "--preserve=all" "liblinear-247/predict" "%{bin}%/liblinear-predict"] + ["install" "liblinear-247/train" "%{bin}%/liblinear-train"] + ["install" "liblinear-247/predict" "%{bin}%/liblinear-predict"] ] depexts: [ ["conf-gcc"] From 87ab89c57d368167fc234d78ec4ed1103393d714 Mon Sep 17 00:00:00 2001 From: "Francois C. M. Berenger" Date: Mon, 28 Oct 2024 10:00:05 +0000 Subject: [PATCH 12/17] there are no depexts; only depends on some conf-* packages --- packages/liblinear/liblinear.2.47/opam | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index a38859d0d3e..274620e8d50 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -1,7 +1,8 @@ opam-version: "2.0" authors: "https://www.csie.ntu.edu.tw/~cjlin/liblinear/contributors.html" homepage: "https://www.csie.ntu.edu.tw/~cjlin/liblinear" -maintainer: "https://www.csie.ntu.edu.tw/~cjlin/index.html" +#maintainer: "https://www.csie.ntu.edu.tw/~cjlin/index.html" +maintainer: "unixjunkie@sdf.org" bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ @@ -9,9 +10,9 @@ build: [ ["install" "liblinear-247/train" "%{bin}%/liblinear-train"] ["install" "liblinear-247/predict" "%{bin}%/liblinear-predict"] ] -depexts: [ - ["conf-gcc"] - ["conf-g++"] +depends: [ + "conf-gcc" + "conf-g++" ] available: os != "win32" synopsis: "User-space installer for liblinear" From 65d2b9f37f7bd7b87c7010891deb92bcb566b2ad Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 31 Oct 2024 13:43:09 +0100 Subject: [PATCH 13/17] Update packages/liblinear/liblinear.2.47/opam --- packages/liblinear/liblinear.2.47/opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index 274620e8d50..fafb1fae0dc 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,7 +6,7 @@ maintainer: "unixjunkie@sdf.org" bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ - ["sh" "-c" "make -C liblinear-247"] + ["sh" "-c" "make"] ["install" "liblinear-247/train" "%{bin}%/liblinear-train"] ["install" "liblinear-247/predict" "%{bin}%/liblinear-predict"] ] From 09a38378f8432968896b9bd2ec57575120d40690 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 31 Oct 2024 13:44:22 +0100 Subject: [PATCH 14/17] Update packages/liblinear/liblinear.2.47/opam --- packages/liblinear/liblinear.2.47/opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index fafb1fae0dc..de7c58bfa5d 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -6,7 +6,7 @@ maintainer: "unixjunkie@sdf.org" bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ - ["sh" "-c" "make"] + [make] ["install" "liblinear-247/train" "%{bin}%/liblinear-train"] ["install" "liblinear-247/predict" "%{bin}%/liblinear-predict"] ] From 880152148d45979bd40b1996b471337069a88f49 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 31 Oct 2024 19:25:55 +0100 Subject: [PATCH 15/17] Apply suggestions from code review --- packages/liblinear/liblinear.2.47/opam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index de7c58bfa5d..a7d1a8a44cf 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -7,8 +7,8 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ [make] - ["install" "liblinear-247/train" "%{bin}%/liblinear-train"] - ["install" "liblinear-247/predict" "%{bin}%/liblinear-predict"] + ["install" "train" "%{bin}%/liblinear-train"] + ["install" "predict" "%{bin}%/liblinear-predict"] ] depends: [ "conf-gcc" From 4002e947933f1f870f6fed94e230d9d089fc40ac Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Mon, 4 Nov 2024 12:20:30 +0100 Subject: [PATCH 16/17] Update packages/liblinear/liblinear.2.47/opam --- packages/liblinear/liblinear.2.47/opam | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index a7d1a8a44cf..8f072d5fb1b 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -7,8 +7,7 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ [make] - ["install" "train" "%{bin}%/liblinear-train"] - ["install" "predict" "%{bin}%/liblinear-predict"] + ["sh" "-exc" "echo 'bin: [\\n \"train\" {\"liblinear-train\"}\\n \"predict\" {\"liblinear-predict\"}\\n]' > liblinear.install"] ] depends: [ "conf-gcc" From 268ddc09d5473f186a000a4bf12a5a49349b51d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20B=C3=A9renger?= Date: Tue, 26 Nov 2024 16:37:28 +0000 Subject: [PATCH 17/17] Update opam let's keep things simple --- packages/liblinear/liblinear.2.47/opam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/liblinear/liblinear.2.47/opam b/packages/liblinear/liblinear.2.47/opam index 8f072d5fb1b..73c28ddd46e 100644 --- a/packages/liblinear/liblinear.2.47/opam +++ b/packages/liblinear/liblinear.2.47/opam @@ -7,7 +7,8 @@ bug-reports: "https://github.com/ocaml/opam-repository/issues" license: "BSD-3-Clause" build: [ [make] - ["sh" "-exc" "echo 'bin: [\\n \"train\" {\"liblinear-train\"}\\n \"predict\" {\"liblinear-predict\"}\\n]' > liblinear.install"] + ["cp" "train" "%{bin}%/liblinear_train"] + ["cp" "predict" "%{bin}%/liblinear_predict"] ] depends: [ "conf-gcc"