net/unison240 depends on lang/ocaml-nox11

Michelle Sullivan michelle at sorbs.net
Sat Mar 21 12:26:23 UTC 2015


Guido Falsi wrote:
> On 03/21/15 11:49, Michelle Sullivan wrote:
>   
>> Jeremie Le Hen wrote:
>>     
>>> Actually, I've just realized that I fixed net/unison232 in my local tree :o).
>>>
>>> Would you mind submitting it and applying the same for unison240?
>>>
>>> Here is the patch:
>>>
>>> Index: Makefile
>>> ===================================================================
>>> --- Makefile    (revision 381259)
>>> +++ Makefile    (working copy)
>>> @@ -34,20 +34,18 @@
>>>
>>>  .include <bsd.port.options.mk>
>>>
>>> +BUILD_DEPENDS+=        ocamlc:${PORTSDIR}/lang/ocaml
>>>  .if ${PORT_OPTIONS:MX11}
>>>  MAKE_ARGS+=    UISTYLE=gtk2
>>>  PLIST_SUB+=    TEXT=""
>>> -BUILD_DEPENDS+=        ocamlc:${PORTSDIR}/lang/ocaml \
>>> -               lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 \
>>> +BUILD_DEPENDS+=        lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 \
>>>                 icotool:${PORTSDIR}/graphics/icoutils
>>>  RUN_DEPENDS+=  lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
>>>  PATCH_DEPENDS+=        ${BUILD_DEPENDS}
>>> -CONFLICTS+=    ocaml-nox11*
>>>  SUB_FILES+=    ${PORTNAME}.desktop
>>>  .else
>>>  MAKE_ARGS+=    UISTYLE=text
>>>  PLIST_SUB+=    TEXT="@comment "
>>> -BUILD_DEPENDS+=        ocamlc:${PORTSDIR}/lang/ocaml-nox11
>>>  PATCH_DEPENDS+=        ${BUILD_DEPENDS}
>>>  .endif
>>>
>>>   
>>>       
>> This breaks -nox11 when building with pourdriere...
>>
>> =======================<phase: patch          >============================
>> ===>  Patching for unison-2.48.3_1
>> ===========================================================================
>> =======================<phase: build-depends  >============================
>> ===>   unison-2.48.3_1 depends on executable: ocamlc - not found
>> ===>    Verifying install for ocamlc in /usr/ports/lang/ocaml
>> ===>   unison-2.48.3_1 depends on package:
>> /packages/All/ocaml-4.01.0_4.tbz - not found
>> ===>   USE_PACKAGE_DEPENDS_ONLY set - not building missing dependency
>> from source
>> *** [build-depends] Error code 1
>>
>> Stop in /usr/ports/net/unison.
>> ===>  Cleaning for unison-2.48.3_1
>> build of /usr/ports/net/unison ended at Sat Mar 21 12:32:36 CET 2015
>>
>> -BUILD_DEPENDS+=        ocamlc:${PORTSDIR}/lang/ocaml-nox11
>>
>> should be there in the 'else' section of OPTIONS:MX11 (perhaps as
>> BUILD_DEPENDS= instead of BUILD_DEPENDS+=)
>>     
>
> Which is almost what the port did, and caused an error about multiple
> origins, as reported by jlh.
>
> I'm willing to find a solution to this, but at this point I need a way
> to reproduce the problem and really understand where the problem is/was.
>
> I do build regularly this port on poudriere in two jails, one with X11
> set and one with it unset and never saw this happen.
>
> I suspect it happens when there is some misalignment with the X11 option
> between ports (some with, some wothout), which is perfectly legitimate
> but makes things difficult to cope with, since the ocaml package changes
> it's suffix depending on that option.
>
> can you send me the full log for the failed build? I'd like to ask the
> same from jlh if he still has it, so I can understand what is really
> going on.
>   

I think the problem comes in when you build with poudriere because when
you're building without the build will just select the correct options
and build ocaml appropriately.. The build then continues as ocaml is
installed.

When building with poudriere the build_depends looks for the package but
the package selection process doesn't look for the -nox11 suffix as this
is set in the makefile of the port and not in the package selection process.

(If I explained that correctly ;-) )

Your package build initially was correct.  I believe pkgng is wrong -
either that or the whole build system needs to be updated so that the
package installation looks at the set options and makefiles when
deciding which package to find and install.  Personally I thing ocaml
(and similar) should not have the -nox11 options in the package name and
should just install as a dependency.... but I expect that will cause
other issues even more weird and wonderful.

Michelle


-- 
Michelle Sullivan
http://www.mhix.org/



More information about the freebsd-ports mailing list