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

Initial draft of hevea recipe #5532

Closed
wants to merge 7 commits into from
Closed

Conversation

peterjc
Copy link
Contributor

@peterjc peterjc commented Apr 3, 2018

I would like to have hevea on conda, http://hevea.inria.fr/

Essentially this is a tool which can turn LaTeX documents into HTML.

Hevea is written in Objective Caml. Therefore it seems we may first need to package Objective Caml (ocaml) and/or OPAM, the OCaml package manager, in order to package hevea for conda. I currently have no interest in this or other ocaml packages except as a means to an end - simple installation of hevea.

The old ocmal website has source and pre-compiled Linux binaries (Debian packages, Fedora packages & Gentoo packages), http://caml.inria.fr/ocaml/release.en.html

The most recent version of OCaml is 4.06.0. It was released on 2017-11-03.
http://caml.inria.fr/pub/distrib/ocaml-4.06/ocaml-4.06.0.tar.gz
http://caml.inria.fr/pub/distrib/ocaml-4.06/ocaml-4.06.0.tar.xz

The new website recommends using OPAM, the OCaml package manager, or your local system package manager - which is perhaps where conda would sit?

https://ocaml.org/docs/install.html

The source releases include instructions. This also listed v4.06.0 as the latest, and the downloads refer to the old site URLs as listed above.

--

Do we need to package ocaml first? Can we recycle a pre-compiled binary package?

I presume it does not make sense to package OPAM instead (the OCaml package manager)?

Seems will also need to package Objective Caml (ocaml)
for conda...
@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/hevea) and found some lint.

Here's what I've got...

For recipes/hevea:

  • The "test" section was expected to be a dictionary, but got a str.
  • The recipe must have some tests.
  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [14]
  • The recipe must have a build/number section.
  • The "test" section was expected to be a dictionary, but got a str.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/hevea) and found some lint.

Here's what I've got...

For recipes/hevea:

  • The "test" section was expected to be a dictionary, but got a CommentedSeq.
  • The recipe must have some tests.
  • The "test" section was expected to be a dictionary, but got a CommentedSeq.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/hevea) and found it was in an excellent condition.

@bgruening bgruening closed this Apr 5, 2018
@bgruening bgruening reopened this Apr 5, 2018
@peterjc
Copy link
Contributor Author

peterjc commented Apr 6, 2018

Removed some redundant comment lines in order to trigger a build now that ocaml is on conda...

@@ -0,0 +1,3 @@
#!/bin/bash
make
make install
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to somehow tell conda to move the binary to $PREFIX

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Makefile should put the binaries under $PREFIX/bin on its own,

#### Standard configuration parameters
# Compile using ocamlopt, to use ocamlc set TARGET=byte
TARGET=opt
# Install prefix
PREFIX?=/usr/local
# Library directory of hevea
LIBDIR=$(PREFIX)/lib/hevea
# Where to install programms
BINDIR=$(PREFIX)/bin
#Where to install hevea.sty
LATEXLIBDIR=$(PREFIX)/lib/hevea
##### Advanced configuration param
...

@peterjc
Copy link
Contributor Author

peterjc commented Apr 6, 2018

The builds are failing with ocamlbuild: command not found which looks like an issue with my (brand new) ocaml recipe.

@peterjc
Copy link
Contributor Author

peterjc commented Apr 6, 2018

Progress, from INSTALL.adoc a clue:

since 4.03.0, as ocamlbuild is now distributed separately

@peterjc peterjc mentioned this pull request Apr 6, 2018
@peterjc
Copy link
Contributor Author

peterjc commented Apr 9, 2018

We now have ocamlbuild on conda... although my local testing suggests further tweaking will be required.

@peterjc
Copy link
Contributor Author

peterjc commented Apr 9, 2018

Nice to see macOS worked.

CircleCI and my local attempts breaking here on Linux:

+ /home/conda/staged-recipes/build_artifacts/hevea_1523286279618/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/ocamlopt.opt -c -w +a-3-4-9-41-45 -annot -safe-string -o bytes.cmx bytes.ml
File "bytes.ml", line 1:
Error: The implementation bytes.ml does not match the interface bytes.cmi:
       Values do not match:
         val blit_string : string -> int -> bytes -> int -> int -> unit
       is not included in
         val blit_string : string -> int -> t -> int -> int -> unit
       File "bytes.mli", line 6, characters 0-58: Expected declaration
       File "bytes.ml", line 4, characters 4-15: Actual declaration
Command exited with code 2.

It may be coincidence but the Makefile calls handle402.sh which runs check402.ml to decide which version of the bytes files to use:

$ more check402.ml 
let () =
  if compare Sys.ocaml_version "4.02.0" >= 0  then
    Printf.printf "ok\n"
  else
    Printf.printf "no\n"

The if statement in file handle402.sh ought to be quoted, but seems to work on CircleCI anyway:

$ more handle402.sh
DIR=$(dirname $0)
if [ ! -z "$CHECK" ]
then
  if [ "$(ocaml $DIR/check402.ml)" = "ok" ]; then
      rm -f $DIR/bytes.ml $DIR/bytes.mli
  else
      cp $DIR/bytes.mlp $DIR/bytes.ml
      cp $DIR/bytes.mlip $DIR/bytes.mli
  fi
fi

We could hard code this as we only have ocaml 4.06 in conda (so far).

@stale
Copy link

stale bot commented Feb 8, 2020

Hi friend!

We really, really, really appreciate that you have taken the time to make a PR on conda-forge/staged-recipes! conda-forge only exists because people like you donate their time to build and maintain conda recipes for use by the community.

In an effort to maintain this repository and increase the signal-to-noise for open PRs, the maintainers of staged-recipes close excessively old PRs after six months. This PR will remain open for another month, and then will be closed.

If you'd like to keep it open, please comment/push and we will be happy to oblige! Note that very old PRs will likely need to be rebased on master so that they can be rebuilt with the most recent CI scripts. If you have any trouble, or we missed reviewing this PR in the first place (sorry!), feel free to ping the team using a special command in a comment on the PR to get the attention of the staged-recipes team.

Cheers and thank you for contributing to this community effort!

@stale stale bot added the stale will be closed in 30 days label Feb 8, 2020
@stale
Copy link

stale bot commented Mar 9, 2020

Hi again! About a month ago, we commented on this PR saying it would be closed in another month if it was still inactive. It has been a month and so now it is being closed. Thank you so much for making it in the first place and contributing to the community project that is conda-forge. If you'd like to reopen this PR, please feel free to do so at any time!

Cheers and have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale will be closed in 30 days
Development

Successfully merging this pull request may close these issues.

None yet

3 participants