[packages/adapter: 581/631] replace opam deps

glen glen at pld-linux.org
Mon Sep 12 20:23:08 CEST 2016


commit 353b0c357d5143595b54ff57781bae2c246abc6e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Nov 26 00:09:46 2013 +0200

    replace opam deps

 adapter.awk | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index cd6e688..865ce85 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -1906,6 +1906,32 @@ function import_rpm_macros(  v) {
 	systemdtmpfilesdir = ENVIRON["systemdtmpfilesdir"]
 }
 
+# replace opam names (caml)
+function replace_opam_deps(field,     name) {
+	name = $2
+	if (name ~ "^(cryptokit|extlib|xmlm)$") {
+		name = "ocaml-" name;
+	} else if (name ~ "^(biniou|easy-format|yojson|gapi-ocaml)$") {
+		name = "ocaml-" name "-devel";
+	} else if (name == "ocamlfind") {
+		name = "ocaml-findlib"
+	} else if (name == "sqlite3-ocaml") {
+		name = "ocaml-sqlite"
+	} else if (name == "ocamlnet") {
+		name = "ocaml-net"
+	} else if (name == "ocurl") {
+		name = "ocaml-curl-devel"
+	} else if (name == "ocamlfuse") {
+		name = "ocaml-fuse-devel"
+	} else if (name == "camlidl") {
+		name = "ocaml-idl-devel"
+	}
+
+	if (name != $2) {
+		$2 = name;
+	}
+}
+
 # php virtual deps as discussed in devel-en
 function replace_php_virtual_deps(field) {
 	pkg = $2
@@ -2336,6 +2362,8 @@ function replace_requires(field,   pkg) {
 	# }}}
 
 	replace_php_virtual_deps(field)
+
+	replace_opam_deps(field)
 }
 
 # vim:ts=4:sw=4 fdm=marker
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list