Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdint and zmq packages #33

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions packages/conf-zmq-android.0.1/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Virtual package relying on zmq library installation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not use virtual packages for native dependencies in cross-toolchains

This package can only install if the zmq devel library is installed
on the system.
7 changes: 7 additions & 0 deletions packages/conf-zmq-android.0.1/files/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <zmq.h>

// compile with: gcc test.c -lzmq

int main () {
return 0;
}
7 changes: 7 additions & 0 deletions packages/conf-zmq-android.0.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
opam-version: "1"
maintainer: "[email protected]"
homepage: "http://zeromq.org/"
license: "LGPL"
build: [
["ocamlfind" "-toolchain" "android" "ocamlc" "test.c" "-cclib" "-lzmq"]
]
1 change: 1 addition & 0 deletions packages/stdint-android.0.3.0/findlib
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stdint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed as opam does not know about -toolchain

28 changes: 28 additions & 0 deletions packages/stdint-android.0.3.0/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
opam-version: "1.2"
maintainer: "Markus W. Weissmann <[email protected]>"
authors: [
"Andre Nathan <[email protected]>"
"Jeff Shaw <[email protected]>"
"Markus W. Weissmann <[email protected]>"
"Florian Pichlmeier <[email protected]>"
]
license: "MIT"
homepage: "https://github.com/andrenth/ocaml-stdint"
doc: "http://stdint.forge.ocamlcore.org/doc/"
dev-repo: "https://github.com/andrenth/ocaml-stdint.git"
bug-reports: "https://github.com/andrenth/ocaml-stdint/issues"
build: [
["ocaml" "setup.ml" "-configure" "--prefix" "%{prefix}%/android-sysroot"]
["env" "OCAMLFIND_TOOLCHAIN=android" "ocaml" "setup.ml" "-build"]
]
install: [
["env" "OCAMLFIND_TOOLCHAIN=android" "ocaml" "setup.ml" "-install"]
]
remove: [["ocamlfind" "-toolchain" "android" "remove" "pkg"]]
build-doc: [ "ocaml" "setup.ml" "-doc" ]
depends: [
"ocaml-android"
"base-bytes"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implied in ocaml-android

"ocamlfind" {>= "1.5"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implied in ocaml-android

"ocamlbuild" {build}
]
2 changes: 2 additions & 0 deletions packages/stdint-android.0.3.0/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/andrenth/ocaml-stdint/archive/0.3.0.tar.gz"
checksum: "1f9fa21baf9c0df490a841a6e916963a"
1 change: 1 addition & 0 deletions packages/zmq-android.4.0-8/findlib
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zmq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed as opam does not know about -toolchain

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

without such findlib files for zmq-android and stdint, ocamlfind can't find this packages when I compile my code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't make any sense, ocamlfind does not use these "findlib" files. Are you sure there was no other difference? Can you check one more time please?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no findlib files in opam-repository anymore. ocaml/opam-repository#9328

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I remove them too -- on clear installation I don't seen problems without findlib files.

28 changes: 28 additions & 0 deletions packages/zmq-android.4.0-8/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
opam-version: "1.2"
maintainer: "[email protected]"
homepage: "https://github.com/issuu/ocaml-zmq"
authors: [ "Anders Fugman" "Pedro Borges" "Peter Zotov" ]
license: "MIT"
dev-repo: "https://github.com/issuu/ocaml-zmq.git"
bug-reports: "https://github.com/issuu/ocaml-zmq/issues"
build: [
["env" "OCAMLFIND_TOOLCHAIN=android" "ocaml" "setup.ml" "-configure" "--prefix" "%{prefix}%/android-sysroot"]
["env" "OCAMLFIND_TOOLCHAIN=android" "ocaml" "setup.ml" "-build"]
]
install: [
["env" "OCAMLFIND_TOOLCHAIN=android" "ocaml" "setup.ml" "-install"]
]
remove: [
["ocamlfind" "-toolchain" "android" "remove" "ZMQ"]
]
depends: [
"ocaml-android"
"conf-zmq-android"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this dependency, you should add a depext for the zmq package in MXE

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is MXE means http://mxe.cc/ ?
I don't use android-ndk -- I'm sit on yocto/bitbake with plain gcc cross-compiler suite, so I can't use it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, MXE is not relevant, forget this part.

"ocamlfind"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implied in ocaml-android

"base-unix"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implied in ocaml-android

"stdint-android"
"ocamlbuild" {build}
]
conflicts: [
"ocaml-zmq"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reason for this conflict

Copy link
Author

@mryau mryau May 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm steal this opam file from author of package, and just modified related part's. This line written by author of zmq.

]
2 changes: 2 additions & 0 deletions packages/zmq-android.4.0-8/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/issuu/ocaml-zmq/archive/4.0-8.tar.gz"
checksum: "dd0d5a27942bf8f86666ad783124cb23"