Bug 192841 - [maintainer, patch] math/ocamlgsl devel/ocaml-equeue: Fix staging and installation
Summary: [maintainer, patch] math/ocamlgsl devel/ocaml-equeue: Fix staging and install...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-19 22:43 UTC by Michael Grünewald
Modified: 2014-08-23 16:18 UTC (History)
1 user (show)

See Also:


Attachments
All-in-one patch for ocamlgsl and ocaml-equeue (3.84 KB, patch)
2014-08-19 22:43 UTC, Michael Grünewald
no flags Details | Diff
All-in-one patch for ocamlgsl and ocaml-equeue (4.50 KB, patch)
2014-08-20 09:09 UTC, Michael Grünewald
michipili: maintainer-approval+
Details | Diff
All-in-one patch for ocamlgsl and ocaml-equeue (4.59 KB, patch)
2014-08-20 09:27 UTC, Michael Grünewald
no flags Details | Diff
Patch for devel/ocaml-equeue (2.53 KB, patch)
2014-08-22 20:44 UTC, Michael Grünewald
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grünewald 2014-08-19 22:43:23 UTC
Created attachment 146054 [details]
All-in-one patch for ocamlgsl and ocaml-equeue

The patch:

- reverts changes to bsd.ocaml.mk, whose logic I now better understand
- updates math/ocamlgsl to reflect these changes and fix an installation issue
- adds staging to and adopt devel/ocaml-equeue

The patch is to be applied from /usr/ports.
Comment 1 John Marino freebsd_committer 2014-08-19 22:50:47 UTC
I'll take it but you have to remove NOPORTDOCS, that is deprecated.
Comment 2 John Marino freebsd_committer 2014-08-20 06:43:25 UTC
Michael, can you:

1) convert NOPORTDOCS to DOCS option?
2) don't use ${CP} -R, but use ${COPYTREE_SHARE} ?
Comment 3 Michael Grünewald 2014-08-20 09:09:04 UTC
Created attachment 146059 [details]
All-in-one patch for ocamlgsl and ocaml-equeue

Jon, thank you for your hints, I prepared a corrected version.

I still have two issues with devel/ocaml-equeue:

1. Licensing is just defined by a file ${WRKSRC}/LICENSE without reference
   to any well-known stock license.  Is then LICENSE=EULA appropriate?

2. I noticed that devel/ocaml-equeue is superseded by ocaml-net, is it possible
   to mark devel/ocaml-equeue deprecated to give up support, in say, one year?

Best,
Michael
Comment 4 John Marino freebsd_committer 2014-08-20 09:12:49 UTC
(In reply to Michael Grünewald from comment #3)
> 1. Licensing is just defined by a file ${WRKSRC}/LICENSE without reference
>    to any well-known stock license.  Is then LICENSE=EULA appropriate?

No, you need to explicitly define 4 license variable if you want to define a license.  See textproc/words port but instead of LICENCE_TEXT use LICENSE_FILE= ${WRKSRC}/LICENCE  (I think, check Mk/bsd.license.mk to be sure)

> 
> 2. I noticed that devel/ocaml-equeue is superseded by ocaml-net, is it
> possible
>    to mark devel/ocaml-equeue deprecated to give up support, in say, one
> year?


Just use DEPRECATED and EXPIRATION_DATE functions and set the latter to one year from now.
Comment 5 Michael Grünewald 2014-08-20 09:27:13 UTC
Created attachment 146060 [details]
All-in-one patch for ocamlgsl and ocaml-equeue

I had the four variables, my question was merely on the particular choice of
LICENSE=EULA as a “catch all” choice for everything not fitting in other
categories.

I positioned DEPRECATED with a hint at www/ocaml-net and EXPIRATION_DATE.
Comment 6 John Marino freebsd_committer 2014-08-20 09:32:00 UTC
(In reply to Michael Grünewald from comment #5)
> Created attachment 146060 [details]
> All-in-one patch for ocamlgsl and ocaml-equeue
> 
> I had the four variables, my question was merely on the particular choice of
> LICENSE=EULA as a “catch all” choice for everything not fitting in other
> categories.

I would give it a more descriptive name.  In the end, it's just a label though, whatever you want.
Comment 7 John Marino freebsd_committer 2014-08-20 09:33:22 UTC
I'm worried about the OCAMLFIND_LDCONF change.

Other ports have this, shouldn't all ports with OCAMLFIND_LDCONF be touched?
Comment 8 Michael Grünewald 2014-08-20 10:30:14 UTC
Hi John,

This is a change I introduced a few weeks ago (r357405) while working on
math/ocamlgsl, to work around ocamlfind editing some file, which breaks staging.
Meanwhile I understood more of the code in bsd.ocaml.mk and figured out what is
the “canonical way” of dealing with ocamlfind, as intended by the bsd.ocaml.mk
author.

This is the list of ocaml-ports potentially affected by the change, i.e. those
whose Makefile changed after r357405 and do not say NO_STAGE and are not BROKEN:
Maybe we could build them on redports against my patch?

% sh report_ocaml.sh
363904|textproc/ocaml-expat
363904|textproc/ocaml-csv
361856|lang/ocaml-autoconf
361857|lang/ocaml-nox11
364951|graphics/ocaml-lablgl
360588|databases/ocaml-sqlite3
361962|math/ocaml-ocamlgraph
365108|x11-toolkits/ocaml-lablgtk2
363374|ftp/ocaml-ocurl
361929|devel/ocaml-lwt
362014|devel/ocaml-magic
364953|devel/ocaml-camomile
361465|devel/ocaml-cppo
361986|devel/ocaml-extlib
361533|devel/ocaml-ounit
363399|devel/ocaml-camomile-examples
361541|devel/ocaml-xstrp4
362014|devel/ocaml-pcre
361535|devel/ocaml-classes
364334|devel/ocaml-lacaml
364183|devel/ocaml-findlib
361463|devel/ocaml-camljava
362516|devel/ocaml-react
361472|devel/ocaml-deriving-ocsigen
361530|devel/ocaml-xstr
361534|devel/ocaml-annexlib
364881|devel/ocaml-sdl
361538|devel/ocaml-sem

But I am not really sure we should modify again `bsd.ocaml.mk`.  Because of
staging, we cannot let ocamlfind tinker with lib/ocaml/ld.conf, which is
handled by saying USE_OCAML_LDCONFIG=YES. So a porter:

1. Either needs to hunt down occurences of ocamlfind install in the
   installation code.

2. Or relies on the bandstrip in bsd.ocaml.mk introduced in r357405 which
   instructs ocamlfind to edit /dev/null as if it were the OCaml ld.conf.

I think 1. can be a bit hard, because there is a lot of build systems out
here (gmake, oasis, ocamlbuild at least) and it is not always obvious to
find the call to `ocamlfind install` (especially for OASIS).
The bandstrip actually existing in bsd.ocaml.mk has the “one fit them all
advantage” which seems very convenient to me.
Comment 9 John Marino freebsd_committer 2014-08-20 10:35:17 UTC
(In reply to Michael Grünewald from comment #8) 
> But I am not really sure we should modify again `bsd.ocaml.mk`.  Because of
> staging, we cannot let ocamlfind tinker with lib/ocaml/ld.conf, which is
> handled by saying USE_OCAML_LDCONFIG=YES. So a porter:
> 
> 1. Either needs to hunt down occurences of ocamlfind install in the
>    installation code.

and do what with it?  delete them?


> 
> 2. Or relies on the bandstrip in bsd.ocaml.mk introduced in r357405 which
>    instructs ocamlfind to edit /dev/null as if it were the OCaml ld.conf.


I thought that was the point, to nullify USE_OCAML_LDCONFIG until we could figure out a way to either properly build ldconfig database for ocaml within staging or remove it completely.


> I think 1. can be a bit hard, because there is a lot of build systems out
> here (gmake, oasis, ocamlbuild at least) and it is not always obvious to
> find the call to `ocamlfind install` (especially for OASIS).
> The bandstrip actually existing in bsd.ocaml.mk has the “one fit them all
> advantage” which seems very convenient to me.


I think we need to start with the answer to the question: Is the ocaml ldconfig functionality useful and therefore should be preserved?
Comment 10 Michael Grünewald 2014-08-20 18:20:44 UTC
>> So a porter:
>> 
>> 1. Either needs to hunt down occurences of ocamlfind install in the
>>    installation code.

> and do what with it?  delete them?

Occurence of the command `ocamlfind install` command should be replaced
by `ocamlfind install -ldconf ignore`.

> I thought that was the point, to nullify USE_OCAML_LDCONFIG […] Is the ocaml
> ldconfig functionality useful and therefore should be preserved?

The ocaml ldconfig in bsd.ocaml.mk is very useful and should be preserved.
It takes care at post-install of the update of lib/ocaml/ld.conf file, which is
appropriate because this update cannot takes place as part of the staged install,
as it does if a port uses ocamlfind to install.
Comment 11 John Marino freebsd_committer 2014-08-21 11:26:17 UTC
okay, can we split out bsd.ocaml.mk change to another PR?

Remember I wanted to plan for this specifically and I can't help but feel this is being rushed and not well thought out.

Will the 2 port fixes work without the bsd.ocaml.mk change?
Comment 12 Michael Grünewald 2014-08-22 11:01:31 UTC
> okay, can we split out bsd.ocaml.mk change to another PR?

To me there is actually no real reason to change bsd.ocaml.mk again but
since you wrote something like, the last change (r357405) I made to
bsd.ocaml.mk more looks like a bandstrip to you, I tried to figure out
how to get away without.

Meanwhile I think the functionalities in bsd.ocaml.mk@357405 should remain
there.  I will send you a new patch pretty soon, maybe by the end of the day (ECT).
Comment 13 Michael Grünewald 2014-08-22 20:44:20 UTC
Created attachment 146165 [details]
Patch for devel/ocaml-equeue

Hi John,

Here is a patch for devel/ocaml-equeue, with staging and use of COPYTREE_SHARE,
portlint did not find obvious errors.

I would like to think about porting of OCaml software using ocamlfind
again, but unfortunately I will be away for the two next weeks or so,
and it seems that we first have to live with a status quo.

Regards,
Michael
Comment 14 John Marino freebsd_committer 2014-08-22 20:45:50 UTC
ok.  and what about  math/ocamlgsl ?  the title mentions it.
Comment 15 Michael Grünewald 2014-08-22 21:54:28 UTC
The changes in ocamlgsl were related to the change in bsd.ocaml.mk, so they too
are not relevant any more.

There is a new version of ocamlgsl that I will work out when I'm back.
Comment 16 John Marino freebsd_committer 2014-08-23 16:03:40 UTC
install commands are masked and longer than 80 columns.  Unmasking and wrapping...
Comment 17 commit-hook freebsd_committer 2014-08-23 16:15:12 UTC
A commit references this bug:

Author: marino
Date: Sat Aug 23 16:14:20 UTC 2014
New revision: 365750
URL: http://svnweb.freebsd.org/changeset/ports/365750

Log:
  Stage devel/ocaml-equeue and assign maintainship to submitter

  PR:		192841
  Submitted by:	Michael Gruenewald

Changes:
  head/devel/ocaml-equeue/Makefile
Comment 18 John Marino freebsd_committer 2014-08-23 16:18:18 UTC
Thanks!