OK

On 2025/01/21 16:12, Stuart Cassoff wrote:
> The comms/hamlib-tcl install is broken.
> I've already submitted a fix:
> https://marc.info/?l=openbsd-ports&m=173747434710789&w=2
> 
> With the changes to comms/hamlib, MODTCL_VERSION can be removed from 
> SUBST_VARS.
> Eventually "9.0" can be switched to "9" in ports, if desired.
> 
> Requiring ports to use "9.0" vs "9" isn't the end of the world.
> I propose these simple and minimally-disruptive changes.
> 
> These changes also remove MODTCL_CONFIG, as proposed here:
> https://marc.info/?l=openbsd-ports&m=173720557301207&w=2
> 
> Changed to string comparison for MODTCL_VERSION
> because in make,  9 == 9.0  and  9 != "9.0".
> 
> I've also tried to make the two .mk files as similar as possible.
> 
> 
> Stu
> 
> 
> 
> Index: tcl.port.mk
> ===================================================================
> RCS file: /cvs/ports/lang/tcl/tcl.port.mk,v
> diff -u -p -u -p -r1.18 tcl.port.mk
> --- tcl.port.mk    11 Mar 2022 19:29:17 -0000    1.18
> +++ tcl.port.mk    20 Jan 2025 20:07:39 -0000
> @@ -2,24 +2,29 @@ CATEGORIES +=        lang/tcl
> 
> MODTCL_VERSION ?=    8.5
> 
> -.if ${MODTCL_VERSION} == 8.5
> +.if ${MODTCL_VERSION} == "8.5"
> _MODTCL_SPEC =         tcl->=${MODTCL_VERSION},<8.6
> MODTCL_LIB ?=        tcl85
> -.elif ${MODTCL_VERSION} == 8.6
> +MODTCL_VER =        8.5
> +.elif ${MODTCL_VERSION} == "8.6"
> _MODTCL_SPEC =         tcl->=${MODTCL_VERSION},<8.7
> MODTCL_LIB ?=        tcl86
> +MODTCL_VER =        8.6
> +.elif ${MODTCL_VERSION} == "9.0"
> +_MODTCL_SPEC =         tcl->=9.0,<9.1
> +MODTCL_LIB ?=        tcl90
> +MODTCL_VER =        9
> .endif
> 
> -MODTCL_BIN ?=        ${LOCALBASE}/bin/tclsh${MODTCL_VERSION}
> -MODTCL_INCDIR ?=    ${LOCALBASE}/include/tcl${MODTCL_VERSION}
> -MODTCL_TCLDIR ?=    ${LOCALBASE}/lib/tcl
> +MODTCL_BIN ?=        ${LOCALBASE}/bin/tclsh${MODTCL_VER}
> +MODTCL_INCDIR ?=    ${LOCALBASE}/include/tcl${MODTCL_VER}
> +MODTCL_LIBDIR ?=    ${MODTCL_TCLDIR}/tcl${MODTCL_VER}
> MODTCL_MODDIR ?=    ${LOCALBASE}/lib/tcl/modules
> -MODTCL_LIBDIR ?=    ${MODTCL_TCLDIR}/tcl${MODTCL_VERSION}
> -MODTCL_CONFIG ?=    ${MODTCL_LIBDIR}/tclConfig.sh
> +MODTCL_TCLDIR ?=    ${LOCALBASE}/lib/tcl
> 
> -MODTCL_BUILD_DEPENDS ?=    ${_MODTCL_SPEC}:lang/tcl/${MODTCL_VERSION}
> -MODTCL_RUN_DEPENDS ?=    ${_MODTCL_SPEC}:lang/tcl/${MODTCL_VERSION}
> -MODTCL_LIB_DEPENDS ?=    ${_MODTCL_SPEC}:lang/tcl/${MODTCL_VERSION}
> +MODTCL_BUILD_DEPENDS ?=    ${_MODTCL_SPEC}:lang/tcl/${MODTCL_VER}
> +MODTCL_RUN_DEPENDS ?=    ${_MODTCL_SPEC}:lang/tcl/${MODTCL_VER}
> +MODTCL_LIB_DEPENDS ?=    ${_MODTCL_SPEC}:lang/tcl/${MODTCL_VER}
> MODTCL_WANTLIB ?=     ${MODTCL_LIB}
> 
> 
> @@ -37,5 +42,6 @@ MODTCL_TCLSH_ADJ =    perl -pi \
> 
> # Same for 'wish'.
> MODTCL_WISH_ADJ =    ${MODTCL_TCLSH_ADJ:S/tclsh/wish/}
> +
> 
> SUBST_VARS +=        MODTCL_VERSION MODTCL_BIN
> 
> 
> 
> Index: tk.port.mk
> ===================================================================
> RCS file: /cvs/ports/x11/tk/tk.port.mk,v
> diff -u -p -u -p -r1.15 tk.port.mk
> --- tk.port.mk    11 Mar 2022 20:17:26 -0000    1.15
> +++ tk.port.mk    20 Jan 2025 20:07:54 -0000
> @@ -7,28 +7,33 @@ CATEGORIES +=        x11/tk
> MODTK_VERSION ?=     8.5
> MODTCL_VERSION ?=     ${MODTK_VERSION}
> 
> -.if ${MODTK_VERSION} == 8.5
> +.if ${MODTK_VERSION} == "8.5"
> _MODTK_SPEC =         tk->=${MODTK_VERSION},<8.6
> MODTK_LIB ?=        tk85
> -.elif ${MODTK_VERSION} == 8.6
> +MODTK_VER =        8.5
> +.elif ${MODTK_VERSION} == "8.6"
> _MODTK_SPEC =         tk->=${MODTK_VERSION},<8.7
> MODTK_LIB ?=        tk86
> +MODTK_VER =        8.6
> +.elif ${MODTK_VERSION} == "9.0"
> +_MODTK_SPEC =         tk->=${MODTK_VERSION},<9.1
> +MODTK_LIB ?=        tk90
> +MODTK_VER =        9
> .endif
> 
> -MODTK_BIN ?=        ${LOCALBASE}/bin/wish${MODTK_VERSION}
> -MODTK_INCDIR ?=        ${LOCALBASE}/include/tk${MODTK_VERSION}
> -MODTK_LIBDIR ?=        ${MODTCL_TCLDIR}/tk${MODTK_VERSION}
> -MODTK_CONFIG ?=        ${MODTK_LIBDIR}/tkConfig.sh
> +MODTK_BIN ?=        ${LOCALBASE}/bin/wish${MODTK_VER}
> +MODTK_INCDIR ?=        ${LOCALBASE}/include/tk${MODTK_VER}
> +MODTK_LIBDIR ?=        ${MODTCL_TCLDIR}/tk${MODTK_VER}
> 
> 
> SUBST_VARS +=        MODTK_VERSION MODTK_BIN
> 
> MODULES +=        lang/tcl
> 
> -MODTK_BUILD_DEPENDS ?=    ${_MODTK_SPEC}:x11/tk/${MODTK_VERSION} \
> +MODTK_BUILD_DEPENDS ?=    ${_MODTK_SPEC}:x11/tk/${MODTK_VER} \
>             ${MODTCL_BUILD_DEPENDS}
> -MODTK_RUN_DEPENDS ?=    ${_MODTK_SPEC}:x11/tk/${MODTK_VERSION} \
> +MODTK_RUN_DEPENDS ?=    ${_MODTK_SPEC}:x11/tk/${MODTK_VER} \
>             ${MODTCL_RUN_DEPENDS}
> -MODTK_LIB_DEPENDS ?=    ${_MODTK_SPEC}:x11/tk/${MODTK_VERSION} \
> +MODTK_LIB_DEPENDS ?=    ${_MODTK_SPEC}:x11/tk/${MODTK_VER} \
>             ${MODTCL_LIB_DEPENDS}
> MODTK_WANTLIB ?=     ${MODTK_LIB} ${MODTCL_WANTLIB}
> 
> 
> 
> 
> On Tuesday, January 14, 2025 at 05:39:23 p.m. EST, Stuart Henderson 
> <s...@spacehopper.org> wrote: 
> 
> 
> 
> 
> 
> On 2025/01/14 17:38, Stuart Cassoff wrote:
> > Tcl 9 was released this year and I'd like to add it to the ports tree soon.
> > 
> > Here's an updated tcl.port.mk and diff.
> 
> same issue with mangled file/diff as jimtcl.
> 
> from webmail, you probably need to send the diff as an attachment
> (and if it still manages to mangle that, perhaps as a gzipped
> attachment).
> 
> 
> > One thing I'd like is to have "9" instead of "9.0" in files and dirs, like 
> > "tclsh9" instead of "tclsh9.0", the port dir itself would be "tcl9".
> > A future Tcl 9.1 would simply replace any 9.0.
> > I think it would be good/possible to just try to have only one Tcl 9, and 
> > eventually only one Tcl: 9.
> > A port would still have to set MODTCL_VERSION to "9.0", primarily since 
> > having "9" as the value of a subst var will wreak havoc with plists!
> > To facilitate that, I've copied the idea of default versions vars from the 
> > python.port.mk.
> 
> 
> python.port.mk still has some cruft from old things and I wouldn't
> really recommend it as a good place to copy from.
> 
> re MODPY_DEFAULT_VERSION_x, it isn't really useful any more (_3 is
> pointless now that the various lang/python/3.x have been replaced with
> lang/python/3, and _2 is never going to change, so they're surplus to
> requirements) - plus they ended up used incorrectly in several places
> so I have it on the cards to retire them at some point when I feel like
> untangling it. I'd suggest having an exit strategy if you want to add
> similar to tcl.port.mk (I think I'd probably add MODTCL_DEFAULT_VERSION_8
> for now, set MODTCL_VERSION=${MODTCL_DEFAULT_VERSION_8} in the various
> existing ports, and switch MODTCL_VERSION in tcl.port.mk to 9.0 or 9.
> 
> only one port, comms/hamlib, uses MODTCL_VERSION in the PLIST so I'm not
> sure it needs to be in SUBST_VARS at all.
> 
> if it's correct that hamlib installs to lib/tcl${MODTCL_VERSION}
> and you want to handle that via the module, you can set a new variable
> e.g. MODTCL_TCLVERLIB=lib/tcl${MODTCL_VERSION}, add that to SUBST_VARS,
> and regenerate hamlib's PLIST. even with MODTCL_VERSION=9 that's not
> likely to cause problems with PLIST substs due to the longer match.
> alternatively, just hardcode the version in hamlib's PLIST, it's only
> one port so easy enough to update by hand.
> 
> and of course if hamlib should really install to lib/tcl <no version>
> then that's even easier.
> 
> 



Reply via email to