Re: MODULES= lang/tcl or x11/tk but not both
Good idea but 8.6 will still be picked up in a ports tree where Tcl/Tk default versions are 8.6 and the port Makefile contains MODTK_VERSION=8.5 if MODULES=lang/tcl x11/tk. (x11/tk lang/tcl) would work). A remedy would be to swap them around or set MODTCL_VERSION as well. Only two ports with this problem; I doubt we'll see (or think about it) it much. For the reasons above and prevention being better than cure, I propose something like: Index: tk.port.mk === RCS file: /cvs/ports/x11/tk/tk.port.mk,v retrieving revision 1.13 diff -u -p -u -p -r1.13 tk.port.mk --- tk.port.mk 22 Jul 2018 01:49:25 - 1.13 +++ tk.port.mk 25 Jul 2018 00:56:28 - @@ -1,5 +1,9 @@ # $OpenBSD: tk.port.mk,v 1.13 2018/07/22 01:49:25 stu Exp $ +.if ${MODULES:Mlang/tcl} +ERRORS += "Fatal: MODULES = lang/tcl or x11/tk but not both.\nChoose one and set MOD* variables accordingly." +.endif + CATEGORIES += x11/tk MODTK_VERSION ?= 8.5 Stu > -- Original Message -- > From: Stuart Henderson > Date: July 24, 2018 at 5:52 PM > > > On 2018/07/24 12:32, Stuart Cassoff wrote: > > Only one is needed. Having both can cause problems. > > > > I found 2 ports (lang/pypy, systutils/libisoburn) with this problem, which > > can be seen: > > $ cd /usr/ports/sysutils/libisoburn/ && make show=MODULES > > lang/tcl x11/tk gnu lang/tcl > > > > If MODULES=x11/tk then lang/tcl will be automatically added at the end. > > > > A port with "MODULES = lang/tcl x11/tk" and "MODTK_VERSION=8.5" > > will break if the default ports Tcl/Tk is 8.6 > > > > Using "MODULES=x11/tk" and "MODTK_VERSION=8.5" would be sufficient. > > > > OK? > > > > Stu > > > > > > Index: Makefile > > === > > RCS file: /cvs/ports/lang/pypy/Makefile,v > > retrieving revision 1.30 > > diff -u -p -u -p -r1.30 Makefile > > --- Makefile15 Dec 2017 16:47:34 - 1.30 > > +++ Makefile24 Jul 2018 16:19:50 - > > @@ -55,7 +55,7 @@ DISTFILES += ${BOOTSTRAP-${MACHINE_ARCH > > # if adding archs, list *all* bootstraps in SUPDISTFILES > > SUPDISTFILES = ${BOOTSTRAP-amd64}:0 > > > > -MODULES += lang/python lang/tcl x11/tk > > +MODULES += lang/python x11/tk > > MODPY_VERSION =2.7 > > > > COMPILER = base-clang ports-gcc > > > > > > Index: Makefile > > === > > RCS file: /cvs/ports/sysutils/libisoburn/Makefile,v > > retrieving revision 1.1.1.1 > > diff -u -p -u -p -r1.1.1.1 Makefile > > --- Makefile19 Dec 2017 20:20:44 - 1.1.1.1 > > +++ Makefile24 Jul 2018 16:20:35 - > > @@ -22,7 +22,7 @@ MASTER_SITES =http://files.libburnia-pr > > # GPLv2+ > > PERMIT_PACKAGE_CDROM = Yes > > > > -MODULES = lang/tcl x11/tk > > +MODULES = x11/tk > > > > LIB_DEPENDS-main = sysutils/libisofs \ > > sysutils/libburn > > > > Makes sense, but how about making tk.port.mk more robust against this > as well? > > Index: tk.port.mk > === > RCS file: /cvs/ports/x11/tk/tk.port.mk,v > retrieving revision 1.12 > diff -u -p -r1.12 tk.port.mk > --- tk.port.mk2 Feb 2013 11:18:28 - 1.12 > +++ tk.port.mk24 Jul 2018 21:52:32 - > @@ -24,7 +24,9 @@ MODTK_CONFIG ?= ${MODTK_LIBDIR}/tkConfi > > SUBST_VARS +=MODTK_VERSION MODTK_BIN > > +.if !${MODULES:Mlang/tcl} > MODULES += lang/tcl > +.endif > > MODTK_BUILD_DEPENDS ?= ${_MODTK_SPEC}:x11/tk/${MODTK_VERSION} \ > ${MODTCL_BUILD_DEPENDS} > >
Re: MODULES= lang/tcl or x11/tk but not both
On 2018/07/24 12:32, Stuart Cassoff wrote: > Only one is needed. Having both can cause problems. > > I found 2 ports (lang/pypy, systutils/libisoburn) with this problem, which > can be seen: > $ cd /usr/ports/sysutils/libisoburn/ && make show=MODULES > lang/tcl x11/tk gnu lang/tcl > > If MODULES=x11/tk then lang/tcl will be automatically added at the end. > > A port with "MODULES = lang/tcl x11/tk" and "MODTK_VERSION=8.5" > will break if the default ports Tcl/Tk is 8.6 > > Using "MODULES=x11/tk" and "MODTK_VERSION=8.5" would be sufficient. > > OK? > > Stu > > > Index: Makefile > === > RCS file: /cvs/ports/lang/pypy/Makefile,v > retrieving revision 1.30 > diff -u -p -u -p -r1.30 Makefile > --- Makefile 15 Dec 2017 16:47:34 - 1.30 > +++ Makefile 24 Jul 2018 16:19:50 - > @@ -55,7 +55,7 @@ DISTFILES +=${BOOTSTRAP-${MACHINE_ARCH > # if adding archs, list *all* bootstraps in SUPDISTFILES > SUPDISTFILES = ${BOOTSTRAP-amd64}:0 > > -MODULES += lang/python lang/tcl x11/tk > +MODULES += lang/python x11/tk > MODPY_VERSION = 2.7 > > COMPILER = base-clang ports-gcc > > > Index: Makefile > === > RCS file: /cvs/ports/sysutils/libisoburn/Makefile,v > retrieving revision 1.1.1.1 > diff -u -p -u -p -r1.1.1.1 Makefile > --- Makefile 19 Dec 2017 20:20:44 - 1.1.1.1 > +++ Makefile 24 Jul 2018 16:20:35 - > @@ -22,7 +22,7 @@ MASTER_SITES = http://files.libburnia-pr > # GPLv2+ > PERMIT_PACKAGE_CDROM = Yes > > -MODULES =lang/tcl x11/tk > +MODULES =x11/tk > > LIB_DEPENDS-main = sysutils/libisofs \ > sysutils/libburn > Makes sense, but how about making tk.port.mk more robust against this as well? Index: tk.port.mk === RCS file: /cvs/ports/x11/tk/tk.port.mk,v retrieving revision 1.12 diff -u -p -r1.12 tk.port.mk --- tk.port.mk 2 Feb 2013 11:18:28 - 1.12 +++ tk.port.mk 24 Jul 2018 21:52:32 - @@ -24,7 +24,9 @@ MODTK_CONFIG ?= ${MODTK_LIBDIR}/tkConfi SUBST_VARS += MODTK_VERSION MODTK_BIN +.if !${MODULES:Mlang/tcl} MODULES += lang/tcl +.endif MODTK_BUILD_DEPENDS ?= ${_MODTK_SPEC}:x11/tk/${MODTK_VERSION} \ ${MODTCL_BUILD_DEPENDS}
MODULES= lang/tcl or x11/tk but not both
Only one is needed. Having both can cause problems. I found 2 ports (lang/pypy, systutils/libisoburn) with this problem, which can be seen: $ cd /usr/ports/sysutils/libisoburn/ && make show=MODULES lang/tcl x11/tk gnu lang/tcl If MODULES=x11/tk then lang/tcl will be automatically added at the end. A port with "MODULES = lang/tcl x11/tk" and "MODTK_VERSION=8.5" will break if the default ports Tcl/Tk is 8.6 Using "MODULES=x11/tk" and "MODTK_VERSION=8.5" would be sufficient. OK? Stu Index: Makefile === RCS file: /cvs/ports/lang/pypy/Makefile,v retrieving revision 1.30 diff -u -p -u -p -r1.30 Makefile --- Makefile15 Dec 2017 16:47:34 - 1.30 +++ Makefile24 Jul 2018 16:19:50 - @@ -55,7 +55,7 @@ DISTFILES += ${BOOTSTRAP-${MACHINE_ARCH # if adding archs, list *all* bootstraps in SUPDISTFILES SUPDISTFILES = ${BOOTSTRAP-amd64}:0 -MODULES += lang/python lang/tcl x11/tk +MODULES += lang/python x11/tk MODPY_VERSION =2.7 COMPILER = base-clang ports-gcc Index: Makefile === RCS file: /cvs/ports/sysutils/libisoburn/Makefile,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 Makefile --- Makefile19 Dec 2017 20:20:44 - 1.1.1.1 +++ Makefile24 Jul 2018 16:20:35 - @@ -22,7 +22,7 @@ MASTER_SITES =http://files.libburnia-pr # GPLv2+ PERMIT_PACKAGE_CDROM = Yes -MODULES = lang/tcl x11/tk +MODULES = x11/tk LIB_DEPENDS-main = sysutils/libisofs \ sysutils/libburn