Re: Preventing substitutions in PLIST ?

2014-10-21 Thread Stuart Cassoff
Alrighty.

This change so far eliminates 51 directories and 51 pkgIndex.tcl files.
Also, our auto_path and tm paths are the shortest around, yielding faster 
package load times.

$ echo 'puts $auto_path' | tclsh8.6
/usr/local/lib/tcl/tcl8.6 /usr/local/lib/tcl

$ echo 'puts [tcl::tm::path list]' | tclsh8.6
/usr/local/lib/tcl/modules/85 /usr/local/lib/tcl/modules/86 
/usr/local/lib/tcl/tcl8.6/modules


AFAIK OpenBSD is the only OS that is doing this!
The goal is for OpenBSD to be a great place for Tcler's and this is one more 
step in that direction.


Stu




Re: Preventing substitutions in PLIST ?

2014-10-20 Thread Stuart Cassoff
On 10/20/14 17:39, Landry Breuil wrote:
> On Mon, Oct 20, 2014 at 05:12:32PM -0400, Stuart Cassoff wrote:
>> On 10/20/14 16:26, Landry Breuil wrote:
>>> On Sun, Oct 12, 2014 at 01:08:37PM -0400, Stuart Cassoff wrote:
 On 09/26/14 10:46, Stuart Cassoff wrote:
> On 09/16/14 21:48, Stuart Cassoff wrote:
>> On 07/11/14 06:22, Stuart Henderson wrote:
>>> On 2014/07/10 23:44, Stuart Cassoff wrote:
 eh? meh?
>>>
>>> You need a subst variable with the actual path not just the version
>>> number, otherwise you're still going to be hand modifying PLISTs all
>>> over the place.
>>>
>>> So something like:
>>>
>>> MODTCL_MINVERSION?= 8.5
>>> MODTCL_MODPATH= lib/tcl/${MODTCL_MINVERSION}
>>> SUBST_VARS+=MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
>>>
>>> It would help clarify things to show a diff with a port that has
>>> been modified to use this method, too.
>>>
>>
>> Here are diffs for everything concerned.
>> Added missing modtcl vars and did a bit of rearranging in port-modules.5.
>> Described MODTCL_MINVERSION and MODTCL_MODPATH.
>> Removed the rest package from tcllib; it needs tDOM which we don't 
>> currently have.
>> Saves installing 51 directories and 51 pkgIndex.tcl files.
>>
>

> Another way to do this would be to change the Tcl module
> dirs to be like modules/85 instead of modules/8.5, then
> the MODTCL_MODPATH stuff wouldn't be needed.
>

 Here are the diffs for doint it this way. Simpler.
 Also simplified the existing layout Tcl itself:
 removes a couple of dirs, shortens module path.
 Also a fix for TkCon.
>>>
>>> Can you remind me why you hardcode 85 for tcllib/tklib/tkcon ?
>>> Other than that, you know better than anyone how this stuff should be
>>> laid, so just move ahead, dont wait for months for someone to okay that..
>>>
>>
>> Great, thanks!
>>
>> The 85 is hardcoded for two reasons:
>> 1) Tcl modules should be installed so that they are
>>available to the lowest Tcl version they'll work with.
>> 2) Using 8.5 will cause unwelcome PLIST substitutions
>>that can apparently only be remedied by complicating
>>things with more variables and explanations.
> 
> Yeah, i got that part - but does it mean that tcl 8.6 also looks for
> modules/85 in addition to modules/86 ?
> 

Yes, exactly.
Almost all modules will end up under 85 unless they're for Tcl 8.6 only.
$ echo 'puts [tcl::tm::path list]' | tclsh8.6
/usr/local/lib/tcl/modules/85 /usr/local/lib/tcl/modules/86 
/usr/local/lib/tcl/tcl8.6/modules


Stu




Re: Preventing substitutions in PLIST ?

2014-10-20 Thread Stuart Cassoff
On 10/20/14 16:26, Landry Breuil wrote:
> On Sun, Oct 12, 2014 at 01:08:37PM -0400, Stuart Cassoff wrote:
>> On 09/26/14 10:46, Stuart Cassoff wrote:
>>> On 09/16/14 21:48, Stuart Cassoff wrote:
 On 07/11/14 06:22, Stuart Henderson wrote:
> On 2014/07/10 23:44, Stuart Cassoff wrote:
>> eh? meh?
>
> You need a subst variable with the actual path not just the version
> number, otherwise you're still going to be hand modifying PLISTs all
> over the place.
>
> So something like:
>
> MODTCL_MINVERSION?=   8.5
> MODTCL_MODPATH=   lib/tcl/${MODTCL_MINVERSION}
> SUBST_VARS+=  MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
>
> It would help clarify things to show a diff with a port that has
> been modified to use this method, too.
>

 Here are diffs for everything concerned.
 Added missing modtcl vars and did a bit of rearranging in port-modules.5.
 Described MODTCL_MINVERSION and MODTCL_MODPATH.
 Removed the rest package from tcllib; it needs tDOM which we don't 
 currently have.
 Saves installing 51 directories and 51 pkgIndex.tcl files.

>>>
>>
>>> Another way to do this would be to change the Tcl module
>>> dirs to be like modules/85 instead of modules/8.5, then
>>> the MODTCL_MODPATH stuff wouldn't be needed.
>>>
>>
>> Here are the diffs for doint it this way. Simpler.
>> Also simplified the existing layout Tcl itself:
>> removes a couple of dirs, shortens module path.
>> Also a fix for TkCon.
> 
> Can you remind me why you hardcode 85 for tcllib/tklib/tkcon ?
> Other than that, you know better than anyone how this stuff should be
> laid, so just move ahead, dont wait for months for someone to okay that..
> 

Great, thanks!

The 85 is hardcoded for two reasons:
1) Tcl modules should be installed so that they are
   available to the lowest Tcl version they'll work with.
2) Using 8.5 will cause unwelcome PLIST substitutions
   that can apparently only be remedied by complicating
   things with more variables and explanations.

Stu



Re: Preventing substitutions in PLIST ?

2014-10-20 Thread Landry Breuil
On Mon, Oct 20, 2014 at 05:12:32PM -0400, Stuart Cassoff wrote:
> On 10/20/14 16:26, Landry Breuil wrote:
> > On Sun, Oct 12, 2014 at 01:08:37PM -0400, Stuart Cassoff wrote:
> >> On 09/26/14 10:46, Stuart Cassoff wrote:
> >>> On 09/16/14 21:48, Stuart Cassoff wrote:
>  On 07/11/14 06:22, Stuart Henderson wrote:
> > On 2014/07/10 23:44, Stuart Cassoff wrote:
> >> eh? meh?
> >
> > You need a subst variable with the actual path not just the version
> > number, otherwise you're still going to be hand modifying PLISTs all
> > over the place.
> >
> > So something like:
> >
> > MODTCL_MINVERSION?= 8.5
> > MODTCL_MODPATH= lib/tcl/${MODTCL_MINVERSION}
> > SUBST_VARS+=MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
> >
> > It would help clarify things to show a diff with a port that has
> > been modified to use this method, too.
> >
> 
>  Here are diffs for everything concerned.
>  Added missing modtcl vars and did a bit of rearranging in port-modules.5.
>  Described MODTCL_MINVERSION and MODTCL_MODPATH.
>  Removed the rest package from tcllib; it needs tDOM which we don't 
>  currently have.
>  Saves installing 51 directories and 51 pkgIndex.tcl files.
> 
> >>>
> >>
> >>> Another way to do this would be to change the Tcl module
> >>> dirs to be like modules/85 instead of modules/8.5, then
> >>> the MODTCL_MODPATH stuff wouldn't be needed.
> >>>
> >>
> >> Here are the diffs for doint it this way. Simpler.
> >> Also simplified the existing layout Tcl itself:
> >> removes a couple of dirs, shortens module path.
> >> Also a fix for TkCon.
> > 
> > Can you remind me why you hardcode 85 for tcllib/tklib/tkcon ?
> > Other than that, you know better than anyone how this stuff should be
> > laid, so just move ahead, dont wait for months for someone to okay that..
> > 
> 
> Great, thanks!
> 
> The 85 is hardcoded for two reasons:
> 1) Tcl modules should be installed so that they are
>available to the lowest Tcl version they'll work with.
> 2) Using 8.5 will cause unwelcome PLIST substitutions
>that can apparently only be remedied by complicating
>things with more variables and explanations.

Yeah, i got that part - but does it mean that tcl 8.6 also looks for
modules/85 in addition to modules/86 ?

Landry



Re: Preventing substitutions in PLIST ?

2014-10-20 Thread Landry Breuil
On Sun, Oct 12, 2014 at 01:08:37PM -0400, Stuart Cassoff wrote:
> On 09/26/14 10:46, Stuart Cassoff wrote:
> > On 09/16/14 21:48, Stuart Cassoff wrote:
> >> On 07/11/14 06:22, Stuart Henderson wrote:
> >>> On 2014/07/10 23:44, Stuart Cassoff wrote:
>  eh? meh?
> >>>
> >>> You need a subst variable with the actual path not just the version
> >>> number, otherwise you're still going to be hand modifying PLISTs all
> >>> over the place.
> >>>
> >>> So something like:
> >>>
> >>> MODTCL_MINVERSION?=   8.5
> >>> MODTCL_MODPATH=   lib/tcl/${MODTCL_MINVERSION}
> >>> SUBST_VARS+=  MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
> >>>
> >>> It would help clarify things to show a diff with a port that has
> >>> been modified to use this method, too.
> >>>
> >>
> >> Here are diffs for everything concerned.
> >> Added missing modtcl vars and did a bit of rearranging in port-modules.5.
> >> Described MODTCL_MINVERSION and MODTCL_MODPATH.
> >> Removed the rest package from tcllib; it needs tDOM which we don't 
> >> currently have.
> >> Saves installing 51 directories and 51 pkgIndex.tcl files.
> >>
> > 
> 
> > Another way to do this would be to change the Tcl module
> > dirs to be like modules/85 instead of modules/8.5, then
> > the MODTCL_MODPATH stuff wouldn't be needed.
> > 
> 
> Here are the diffs for doint it this way. Simpler.
> Also simplified the existing layout Tcl itself:
> removes a couple of dirs, shortens module path.
> Also a fix for TkCon.

Can you remind me why you hardcode 85 for tcllib/tklib/tkcon ?
Other than that, you know better than anyone how this stuff should be
laid, so just move ahead, dont wait for months for someone to okay that..

Landry



Re: Preventing substitutions in PLIST ?

2014-10-20 Thread Stuart Cassoff
On 10/12/14 13:08, Stuart Cassoff wrote:
> On 09/26/14 10:46, Stuart Cassoff wrote:
>> On 09/16/14 21:48, Stuart Cassoff wrote:
>>> On 07/11/14 06:22, Stuart Henderson wrote:
 On 2014/07/10 23:44, Stuart Cassoff wrote:
> eh? meh?

 You need a subst variable with the actual path not just the version
 number, otherwise you're still going to be hand modifying PLISTs all
 over the place.

 So something like:

 MODTCL_MINVERSION?=8.5
 MODTCL_MODPATH=lib/tcl/${MODTCL_MINVERSION}
 SUBST_VARS+=   MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN

 It would help clarify things to show a diff with a port that has
 been modified to use this method, too.

>>>
>>> Here are diffs for everything concerned.
>>> Added missing modtcl vars and did a bit of rearranging in port-modules.5.
>>> Described MODTCL_MINVERSION and MODTCL_MODPATH.
>>> Removed the rest package from tcllib; it needs tDOM which we don't 
>>> currently have.
>>> Saves installing 51 directories and 51 pkgIndex.tcl files.
>>>
>>
> 
>> Another way to do this would be to change the Tcl module
>> dirs to be like modules/85 instead of modules/8.5, then
>> the MODTCL_MODPATH stuff wouldn't be needed.
>>
> 
> Here are the diffs for doint it this way. Simpler.
> Also simplified the existing layout Tcl itself:
> removes a couple of dirs, shortens module path.
> Also a fix for TkCon.
> 

The more that Tcl Modules are leveraged the better things are for everyone:
smaller OpenBSD packages with less files and faster Tcl package loading in Tcl.

There will shortly be releases of 8.5.17 and 8.6.3.
I already have updated ports based on the rc's.
I'd really like to get this in now, before the coming update.

Finally, I've been at this for almost a year.
It would be nice to finish and move on.


Stu



Re: Preventing substitutions in PLIST ?

2014-10-12 Thread Stuart Cassoff
On 09/26/14 10:46, Stuart Cassoff wrote:
> On 09/16/14 21:48, Stuart Cassoff wrote:
>> On 07/11/14 06:22, Stuart Henderson wrote:
>>> On 2014/07/10 23:44, Stuart Cassoff wrote:
 eh? meh?
>>>
>>> You need a subst variable with the actual path not just the version
>>> number, otherwise you're still going to be hand modifying PLISTs all
>>> over the place.
>>>
>>> So something like:
>>>
>>> MODTCL_MINVERSION?= 8.5
>>> MODTCL_MODPATH= lib/tcl/${MODTCL_MINVERSION}
>>> SUBST_VARS+=MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
>>>
>>> It would help clarify things to show a diff with a port that has
>>> been modified to use this method, too.
>>>
>>
>> Here are diffs for everything concerned.
>> Added missing modtcl vars and did a bit of rearranging in port-modules.5.
>> Described MODTCL_MINVERSION and MODTCL_MODPATH.
>> Removed the rest package from tcllib; it needs tDOM which we don't currently 
>> have.
>> Saves installing 51 directories and 51 pkgIndex.tcl files.
>>
> 

> Another way to do this would be to change the Tcl module
> dirs to be like modules/85 instead of modules/8.5, then
> the MODTCL_MODPATH stuff wouldn't be needed.
> 

Here are the diffs for doint it this way. Simpler.
Also simplified the existing layout Tcl itself:
removes a couple of dirs, shortens module path.
Also a fix for TkCon.


Index: Makefile
===
RCS file: /cvs/ports/lang/tcl/8.5/Makefile,v
retrieving revision 1.32
diff -u -p -r1.32 Makefile
--- Makefile22 Sep 2014 16:54:11 -  1.32
+++ Makefile12 Oct 2014 16:43:55 -
@@ -4,6 +4,7 @@ COMMENT =   Tool Command Language
 
 DISTNAME = tcl8.5.16
 PKGNAME =  tcl-8.5.16
+REVISION = 0
 SHARED_LIBS =  tcl85 1.6
 CATEGORIES =   lang lang/tcl
 HOMEPAGE = http://www.tcl.tk/
Index: patches/patch-library_tm_tcl
===
RCS file: /cvs/ports/lang/tcl/8.5/patches/patch-library_tm_tcl,v
retrieving revision 1.3
diff -u -p -r1.3 patch-library_tm_tcl
--- patches/patch-library_tm_tcl20 Sep 2013 10:09:08 -  1.3
+++ patches/patch-library_tm_tcl12 Oct 2014 16:43:55 -
@@ -11,8 +11,8 @@ $OpenBSD: patch-library_tm_tcl,v 1.3 201
 -  ]
 +
 +# OpenBSD layout
-+add [file join [info library] modules [info tclversion]] \
-+  [file join [file dirname [info library]] modules [info tclversion]]
++add [file join [info library] modules] \
++  [file join [lindex $::tcl_pkgPath 0] modules 85]
  
  if {$tcl_platform(platform) eq "windows"} {
set sep ";"
Index: patches/patch-unix_Makefile_in
===
RCS file: /cvs/ports/lang/tcl/8.5/patches/patch-unix_Makefile_in,v
retrieving revision 1.13
diff -u -p -r1.13 patch-unix_Makefile_in
--- patches/patch-unix_Makefile_in  22 Sep 2014 16:54:11 -  1.13
+++ patches/patch-unix_Makefile_in  12 Oct 2014 16:43:55 -
@@ -34,7 +34,7 @@ $OpenBSD: patch-unix_Makefile_in,v 1.13 
fi; \
done;
 -  @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.4  
../tcl8/8.4/platform ../tcl8/8.5; \
-+  @for i in opt0.4 http1.0 encoding modules modules/8.5 
modules/8.5/platform ../modules/8.5; \
++  @for i in opt0.4 http1.0 encoding modules modules/platform 
../modules/85; \
do \
if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
@@ -43,7 +43,7 @@ $OpenBSD: patch-unix_Makefile_in,v 1.13 
done;
@echo "Installing package http 2.7.13 as a Tcl Module";
 -  @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl 
"$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.13.tm;
-+  @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl 
"$(SCRIPT_INSTALL_DIR)"/modules/8.5/http-2.7.13.tm;
++  @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl 
"$(SCRIPT_INSTALL_DIR)"/modules/http-2.7.13.tm;
@echo "Installing package opt0.4 files to 
$(SCRIPT_INSTALL_DIR)/opt0.4/";
@for i in $(TOP_DIR)/library/opt/*.tcl ; \
do \
@@ -51,17 +51,17 @@ $OpenBSD: patch-unix_Makefile_in,v 1.13 
done;
@echo "Installing package msgcat 1.5.2 as a Tcl Module";
 -  @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl 
"$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.5.2.tm;
-+  @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl 
"$(SCRIPT_INSTALL_DIR)"/modules/8.5/msgcat-1.5.2.tm;
++  @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl 
"$(SCRIPT_INSTALL_DIR)"/modules/msgcat-1.5.2.tm;
@echo "Installing package tcltest 2.3.8 as a Tcl Module";
 -  @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl 
"$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.8.tm;
-+  @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl 
"$(SCRIPT_INSTALL_DIR)"/modules/8.5/

Re: Preventing substitutions in PLIST ?

2014-10-09 Thread Stuart Cassoff
On 09/26/14 10:46, Stuart Cassoff wrote:
> On 09/16/14 21:48, Stuart Cassoff wrote:
>> On 07/11/14 06:22, Stuart Henderson wrote:
>>> On 2014/07/10 23:44, Stuart Cassoff wrote:
 eh? meh?
>>>
>>> You need a subst variable with the actual path not just the version
>>> number, otherwise you're still going to be hand modifying PLISTs all
>>> over the place.
>>>
>>> So something like:
>>>
>>> MODTCL_MINVERSION?= 8.5
>>> MODTCL_MODPATH= lib/tcl/${MODTCL_MINVERSION}
>>> SUBST_VARS+=MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
>>>
>>> It would help clarify things to show a diff with a port that has
>>> been modified to use this method, too.
>>>
>>
>> Here are diffs for everything concerned.
>> Added missing modtcl vars and did a bit of rearranging in port-modules.5.
>> Described MODTCL_MINVERSION and MODTCL_MODPATH.
>> Removed the rest package from tcllib; it needs tDOM which we don't currently 
>> have.
>> Saves installing 51 directories and 51 pkgIndex.tcl files.
>>


> Another way to do this would be to change the Tcl module
> dirs to be like modules/85 instead of modules/8.5, then
> the MODTCL_MODPATH stuff wouldn't be needed.

It would be great to get a bit of feedback.
I'd really like to move forward with this.

Stu



Re: Preventing substitutions in PLIST ?

2014-09-26 Thread Stuart Cassoff
On 09/16/14 21:48, Stuart Cassoff wrote:
> On 07/11/14 06:22, Stuart Henderson wrote:
>> On 2014/07/10 23:44, Stuart Cassoff wrote:
>>> eh? meh?
>>
>> You need a subst variable with the actual path not just the version
>> number, otherwise you're still going to be hand modifying PLISTs all
>> over the place.
>>
>> So something like:
>>
>> MODTCL_MINVERSION?=  8.5
>> MODTCL_MODPATH=  lib/tcl/${MODTCL_MINVERSION}
>> SUBST_VARS+= MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
>>
>> It would help clarify things to show a diff with a port that has
>> been modified to use this method, too.
>>
> 
> Here are diffs for everything concerned.
> Added missing modtcl vars and did a bit of rearranging in port-modules.5.
> Described MODTCL_MINVERSION and MODTCL_MODPATH.
> Removed the rest package from tcllib; it needs tDOM which we don't currently 
> have.
> Saves installing 51 directories and 51 pkgIndex.tcl files.
> 

Another way to do this would be to change the Tcl module
dirs to be like modules/85 instead of modules/8.5, then
the MODTCL_MODPATH stuff wouldn't be needed.



Re: Preventing substitutions in PLIST ?

2014-09-16 Thread Stuart Cassoff
On 07/11/14 06:22, Stuart Henderson wrote:
> On 2014/07/10 23:44, Stuart Cassoff wrote:
>> eh? meh?
> 
> You need a subst variable with the actual path not just the version
> number, otherwise you're still going to be hand modifying PLISTs all
> over the place.
> 
> So something like:
> 
> MODTCL_MINVERSION?=   8.5
> MODTCL_MODPATH=   lib/tcl/${MODTCL_MINVERSION}
> SUBST_VARS+=  MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN
> 
> It would help clarify things to show a diff with a port that has
> been modified to use this method, too.
> 

Here are diffs for everything concerned.
Added missing modtcl vars and did a bit of rearranging in port-modules.5.
Described MODTCL_MINVERSION and MODTCL_MODPATH.
Removed the rest package from tcllib; it needs tDOM which we don't currently 
have.
Saves installing 51 directories and 51 pkgIndex.tcl files.


Index: port-modules.5
===
RCS file: /cvs/src/share/man/man5/port-modules.5,v
retrieving revision 1.183
diff -u -p -r1.183 port-modules.5
--- port-modules.5  13 Sep 2014 16:30:05 -  1.183
+++ port-modules.5  16 Sep 2014 22:47:51 -
@@ -966,15 +966,20 @@ See
 .It lang/tcl
 Sets
 .Ev MODTCL_VERSION ,
+.Ev MODTCL_MINVERSION ,
 .Ev MODTCL_BIN ,
 .Ev MODTCL_INCDIR ,
+.Ev MODTCL_TCLDIR ,
+.Ev MODTCL_MODDIR ,
 .Ev MODTCL_LIBDIR ,
+.Ev MODTCL_CONFIG ,
+.Ev MODTCL_MODPATH ,
 .Ev MODTCL_BUILD_DEPENDS ,
 .Ev MODTCL_RUN_DEPENDS ,
-.Ev MODTCL_LIB ,
 .Ev MODTCL_LIB_DEPENDS ,
+.Ev MODTCL_LIB ,
 and
-.Ev MODTCL_CONFIG .
+.Ev MODTCL_WANTLIB .
 .Ev MODTCL_VERSION
 is the default version used by all Tcl ports and may be overridden.
 Provides
@@ -986,6 +991,14 @@ Also affects
 .Ev CATEGORIES
 and
 .Ev SUBST_VARS .
+.Ev MODTCL_MINVERSION
+and
+.Ev MODTCL_MODPATH
+may be used to prevent unwanted
+.Ev MODTCL_VERSION
+or
+.Ev MODTK_VERSION
+substitutions in PLISTs.
 .It perl
 This module is documented in the main
 .Xr bsd.port.mk 5
@@ -1614,12 +1627,13 @@ Sets
 .Ev MODTK_BIN ,
 .Ev MODTK_INCDIR ,
 .Ev MODTK_LIBDIR ,
+.Ev MODTK_CONFIG ,
 .Ev MODTK_BUILD_DEPENDS ,
 .Ev MODTK_RUN_DEPENDS ,
-.Ev MODTK_LIB ,
 .Ev MODTK_LIB_DEPENDS ,
+.Ev MODTK_LIB ,
 and
-.Ev MODTK_CONFIG .
+.Ev MODTK_WANTLIB .
 .Ev MODTK_VERSION
 is the default version used by all Tk ports and
 may be overridden.


Index: tcl.port.mk
===
RCS file: /cvs/ports/lang/tcl/tcl.port.mk,v
retrieving revision 1.16
diff -u -p -r1.16 tcl.port.mk
--- tcl.port.mk 17 Nov 2013 11:08:03 -  1.16
+++ tcl.port.mk 16 Sep 2014 22:54:41 -
@@ -3,6 +3,7 @@
 CATEGORIES +=  lang/tcl
 
 MODTCL_VERSION ?=  8.5
+MODTCL_MINVERSION ?=   8.5
 
 .if ${MODTCL_VERSION} == 8.4
 _MODTCL_SPEC = tcl->=${MODTCL_VERSION},<8.5
@@ -21,6 +22,7 @@ MODTCL_TCLDIR ?=  ${LOCALBASE}/lib/tcl
 MODTCL_MODDIR ?=   ${LOCALBASE}/lib/tcl/modules
 MODTCL_LIBDIR ?=   ${MODTCL_TCLDIR}/tcl${MODTCL_VERSION}
 MODTCL_CONFIG ?=   ${MODTCL_LIBDIR}/tclConfig.sh
+MODTCL_MODPATH ?=  lib/tcl/modules/${MODTCL_MINVERSION}
 
 MODTCL_BUILD_DEPENDS ?=${_MODTCL_SPEC}:lang/tcl/${MODTCL_VERSION}
 MODTCL_RUN_DEPENDS ?=  ${_MODTCL_SPEC}:lang/tcl/${MODTCL_VERSION}
@@ -43,4 +45,4 @@ MODTCL_TCLSH_ADJ =perl -pi \
 # Same for 'wish'.
 MODTCL_WISH_ADJ =  ${MODTCL_TCLSH_ADJ:S/tclsh/wish/}
 
-SUBST_VARS +=  MODTCL_VERSION MODTCL_BIN
+SUBST_VARS +=  MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN


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  16 Sep 2014 22:54:01 -
@@ -22,7 +22,7 @@ MODTK_LIBDIR ?=   ${MODTCL_TCLDIR}/tk${MO
 MODTK_CONFIG ?=${MODTK_LIBDIR}/tkConfig.sh
 
 
-SUBST_VARS +=  MODTK_VERSION MODTK_BIN
+SUBST_VARS +=  MODTCL_MODPATH MODTK_VERSION MODTK_BIN
 
 MODULES += lang/tcl
 


Index: Makefile
===
RCS file: /cvs/ports/devel/tcllib/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile1 Sep 2014 03:15:22 -   1.22
+++ Makefile17 Sep 2014 01:35:01 -
@@ -3,6 +3,7 @@
 COMMENT =  Tcl Standard Library
 
 DISTNAME = tcllib-1.16pl0
+REVISION = 0
 CATEGORIES =   devel lang/tcl
 HOMEPAGE = http://sourceforge.net/projects/tcllib/
 MAINTAINER =   Stuart Cassoff 
@@ -27,6 +28,7 @@ do-install:
-nroff-path ${PREFIX}/man/mann \
-example-path ${PREFIX}/share/examples/tcllib \
-app-path ${PREFIX}/share/examples/tcllib/apps \
+   -mp ${PREFIX}/${MODTCL_MODPATH} \
-csb ${PREFIX}/share/doc \
-tclsh ${MODTCL_BIN} \
-descr "`cat ${PKGDIR}/DESCR`"
Index: patches/patch-installer_tcl
===
RCS file: /c

Re: Preventing substitutions in PLIST ?

2014-07-11 Thread Stuart Henderson
On 2014/07/10 23:44, Stuart Cassoff wrote:
> eh? meh?

You need a subst variable with the actual path not just the version
number, otherwise you're still going to be hand modifying PLISTs all
over the place.

So something like:

MODTCL_MINVERSION?= 8.5
MODTCL_MODPATH= lib/tcl/${MODTCL_MINVERSION}
SUBST_VARS+=MODTCL_MODPATH MODTCL_VERSION MODTCL_BIN

It would help clarify things to show a diff with a port that has
been modified to use this method, too.



Re: Preventing substitutions in PLIST ?

2014-07-10 Thread Stuart Cassoff
eh? meh?

On 04/16/14 11:07, Stuart Cassoff wrote:
> So, is this ok? I think it's ok or very close to ok.
> It would be nice to get over this hurdle.
> 
> 
> Stu
> 
> 
> On 04/09/14 17:58, Stuart Cassoff wrote:
>> On 12/08/13 09:23, Marc Espie wrote:
>>> On Sun, Dec 08, 2013 at 08:41:23AM -0500, Stuart Cassoff wrote:
 On 12/07/13 16:42, Marc Espie wrote:
> On Sat, Dec 07, 2013 at 03:39:28PM -0500, Stuart Cassoff wrote:
>> On 12/05/13 05:36, Marc Espie wrote:
>>> On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
 I'd like tcllib and tklib to make use of 'tcl modules'.
 Every package that can be installed as a tcl module saves one file and 
 one dir
 and there are enough eligible packages that I think it's worth doing.
 This makes use of a newer tcl packaging system that's a bit better 
 and/or faster.

 These should always be installend in the dir for lowest tcl version 
 possible, which is 8.5.
 I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.

 Here's the result for one package:
>>>
>>> So, make sure to look at the result of update-plist, it's not always
>>> right.
>>>
>>
>> How's this? Snippet from the port Makefile diff.
>>
>> +# We want the lowest Tcl version possible.
>> +MODTK_VERSION =8.5
>> +
>> +# Manual target to adjust PLIST after update-plist.
>> +adj-plist:
>> +   perl -pi -e 's/\$${MODTK_VERSION}/8.5/' ${PKGDIR}/PLIST
>> +
> YUCK. A big *NO*.
>
> Did you try the approach I outlined ?  Namely provide longer module 
> variables
> that would be FIRST in the substituted list.
>
>>>
 It confused and frightened me.

 Eventually I manned-up and so with your approach I get this in the PLIST:

 lib/tcl/${MODTK_MODPATH}/autoscroll-1.1.tm

 Which I don't understand much more.

 Either way I get the same package file so maybe I don't actually have a 
 problem here?
>>>
>>> Maybe you don't understand it much more, but it's cleaner, in as much
>>> as there's no extra step to fix the plist after update-plist.
>>>
>>> ... and it will fix the same problem in (potentially) other ports, without
>>> you needing to special-case each and every port.
>>>
>>
>> Ok I understand now, thanks.
>>
>> How's this? Should there be a MODTK_MINVERSION as well?
>>
>>
>> Index: lang/tcl/tcl.port.mk
>> ===
>> RCS file: /cvs/ports/lang/tcl/tcl.port.mk,v
>> retrieving revision 1.16
>> diff -u -p -u -p -r1.16 tcl.port.mk
>> --- lang/tcl/tcl.port.mk 17 Nov 2013 11:08:03 -  1.16
>> +++ lang/tcl/tcl.port.mk 9 Apr 2014 21:26:05 -
>> @@ -3,6 +3,7 @@
>>  CATEGORIES +=   lang/tcl
>>
>>  MODTCL_VERSION ?=   8.5
>> +MODTCL_MINVERSION ?=8.5
>>
>>  .if ${MODTCL_VERSION} == 8.4
>>  _MODTCL_SPEC =  tcl->=${MODTCL_VERSION},<8.5
>> @@ -43,4 +44,4 @@ MODTCL_TCLSH_ADJ = perl -pi \
>>  # Same for 'wish'.
>>  MODTCL_WISH_ADJ =   ${MODTCL_TCLSH_ADJ:S/tclsh/wish/}
>>
>> -SUBST_VARS +=   MODTCL_VERSION MODTCL_BIN
>> +SUBST_VARS +=   MODTCL_MINVERSION MODTCL_VERSION MODTCL_BIN
>> Index: x11/tk/tk.port.mk
>> ===
>> RCS file: /cvs/ports/x11/tk/tk.port.mk,v
>> retrieving revision 1.12
>> diff -u -p -u -p -r1.12 tk.port.mk
>> --- x11/tk/tk.port.mk2 Feb 2013 11:18:28 -   1.12
>> +++ x11/tk/tk.port.mk9 Apr 2014 21:26:55 -
>> @@ -22,7 +22,7 @@ MODTK_LIBDIR ?=${MODTCL_TCLDIR}/tk${MO
>>  MODTK_CONFIG ?= ${MODTK_LIBDIR}/tkConfig.sh
>>
>>
>> -SUBST_VARS +=   MODTK_VERSION MODTK_BIN
>> +SUBST_VARS +=   MODTCL_MINVERSION MODTK_VERSION MODTK_BIN
>>
>>  MODULES +=  lang/tcl
>>
>>
>>
>> Index: port-modules.5
>> ===
>> RCS file: /cvs/src/share/man/man5/port-modules.5,v
>> retrieving revision 1.172
>> diff -u -p -u -p -r1.172 port-modules.5
>> --- port-modules.5   2 Apr 2014 15:00:27 -   1.172
>> +++ port-modules.5   9 Apr 2014 21:24:27 -
>> @@ -933,8 +933,9 @@ Sets
>>  .Ev MODTCL_RUN_DEPENDS ,
>>  .Ev MODTCL_LIB ,
>>  .Ev MODTCL_LIB_DEPENDS ,
>> +.Ev MODTCL_CONFIG
>>  and
>> -.Ev MODTCL_CONFIG .
>> +.Ev MODTCL_MINVERSION .
>>  .Ev MODTCL_VERSION
>>  is the default version used by all Tcl ports and may be overridden.
>>  Provides
>> @@ -946,6 +947,10 @@ Also affects
>>  .Ev CATEGORIES
>>  and
>>  .Ev SUBST_VARS .
>> +.Ev MODTCL_MINVERSION
>> +may be used to prevent unwanted
>> +.Ev MODTCL_VERSION
>> +substitutions in PLISTs.
>>  .It perl
>>  This module is documented in the main
>>  .Xr bsd.port.mk 5
>>
>>
>>
> 
> 
> 



Re: Preventing substitutions in PLIST ?

2014-04-16 Thread Stuart Cassoff
So, is this ok? I think it's ok or very close to ok.
It would be nice to get over this hurdle.


Stu


On 04/09/14 17:58, Stuart Cassoff wrote:
> On 12/08/13 09:23, Marc Espie wrote:
>> On Sun, Dec 08, 2013 at 08:41:23AM -0500, Stuart Cassoff wrote:
>>> On 12/07/13 16:42, Marc Espie wrote:
 On Sat, Dec 07, 2013 at 03:39:28PM -0500, Stuart Cassoff wrote:
> On 12/05/13 05:36, Marc Espie wrote:
>> On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
>>> I'd like tcllib and tklib to make use of 'tcl modules'.
>>> Every package that can be installed as a tcl module saves one file and 
>>> one dir
>>> and there are enough eligible packages that I think it's worth doing.
>>> This makes use of a newer tcl packaging system that's a bit better 
>>> and/or faster.
>>>
>>> These should always be installend in the dir for lowest tcl version 
>>> possible, which is 8.5.
>>> I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.
>>>
>>> Here's the result for one package:
>>
>> So, make sure to look at the result of update-plist, it's not always
>> right.
>>
>
> How's this? Snippet from the port Makefile diff.
>
> +# We want the lowest Tcl version possible.
> +MODTK_VERSION =8.5
> +
> +# Manual target to adjust PLIST after update-plist.
> +adj-plist:
> +   perl -pi -e 's/\$${MODTK_VERSION}/8.5/' ${PKGDIR}/PLIST
> +
 YUCK. A big *NO*.

 Did you try the approach I outlined ?  Namely provide longer module 
 variables
 that would be FIRST in the substituted list.

>>
>>> It confused and frightened me.
>>>
>>> Eventually I manned-up and so with your approach I get this in the PLIST:
>>>
>>> lib/tcl/${MODTK_MODPATH}/autoscroll-1.1.tm
>>>
>>> Which I don't understand much more.
>>>
>>> Either way I get the same package file so maybe I don't actually have a 
>>> problem here?
>>
>> Maybe you don't understand it much more, but it's cleaner, in as much
>> as there's no extra step to fix the plist after update-plist.
>>
>> ... and it will fix the same problem in (potentially) other ports, without
>> you needing to special-case each and every port.
>>
> 
> Ok I understand now, thanks.
> 
> How's this? Should there be a MODTK_MINVERSION as well?
> 
> 
> Index: lang/tcl/tcl.port.mk
> ===
> RCS file: /cvs/ports/lang/tcl/tcl.port.mk,v
> retrieving revision 1.16
> diff -u -p -u -p -r1.16 tcl.port.mk
> --- lang/tcl/tcl.port.mk  17 Nov 2013 11:08:03 -  1.16
> +++ lang/tcl/tcl.port.mk  9 Apr 2014 21:26:05 -
> @@ -3,6 +3,7 @@
>  CATEGORIES +=lang/tcl
> 
>  MODTCL_VERSION ?=8.5
> +MODTCL_MINVERSION ?= 8.5
> 
>  .if ${MODTCL_VERSION} == 8.4
>  _MODTCL_SPEC =   tcl->=${MODTCL_VERSION},<8.5
> @@ -43,4 +44,4 @@ MODTCL_TCLSH_ADJ =  perl -pi \
>  # Same for 'wish'.
>  MODTCL_WISH_ADJ =${MODTCL_TCLSH_ADJ:S/tclsh/wish/}
> 
> -SUBST_VARS +=MODTCL_VERSION MODTCL_BIN
> +SUBST_VARS +=MODTCL_MINVERSION MODTCL_VERSION MODTCL_BIN
> Index: x11/tk/tk.port.mk
> ===
> RCS file: /cvs/ports/x11/tk/tk.port.mk,v
> retrieving revision 1.12
> diff -u -p -u -p -r1.12 tk.port.mk
> --- x11/tk/tk.port.mk 2 Feb 2013 11:18:28 -   1.12
> +++ x11/tk/tk.port.mk 9 Apr 2014 21:26:55 -
> @@ -22,7 +22,7 @@ MODTK_LIBDIR ?= ${MODTCL_TCLDIR}/tk${MO
>  MODTK_CONFIG ?=  ${MODTK_LIBDIR}/tkConfig.sh
> 
> 
> -SUBST_VARS +=MODTK_VERSION MODTK_BIN
> +SUBST_VARS +=MODTCL_MINVERSION MODTK_VERSION MODTK_BIN
> 
>  MODULES +=   lang/tcl
> 
> 
> 
> Index: port-modules.5
> ===
> RCS file: /cvs/src/share/man/man5/port-modules.5,v
> retrieving revision 1.172
> diff -u -p -u -p -r1.172 port-modules.5
> --- port-modules.52 Apr 2014 15:00:27 -   1.172
> +++ port-modules.59 Apr 2014 21:24:27 -
> @@ -933,8 +933,9 @@ Sets
>  .Ev MODTCL_RUN_DEPENDS ,
>  .Ev MODTCL_LIB ,
>  .Ev MODTCL_LIB_DEPENDS ,
> +.Ev MODTCL_CONFIG
>  and
> -.Ev MODTCL_CONFIG .
> +.Ev MODTCL_MINVERSION .
>  .Ev MODTCL_VERSION
>  is the default version used by all Tcl ports and may be overridden.
>  Provides
> @@ -946,6 +947,10 @@ Also affects
>  .Ev CATEGORIES
>  and
>  .Ev SUBST_VARS .
> +.Ev MODTCL_MINVERSION
> +may be used to prevent unwanted
> +.Ev MODTCL_VERSION
> +substitutions in PLISTs.
>  .It perl
>  This module is documented in the main
>  .Xr bsd.port.mk 5
> 
> 
> 



Re: Preventing substitutions in PLIST ?

2014-04-09 Thread Stuart Cassoff
On 12/08/13 09:23, Marc Espie wrote:
> On Sun, Dec 08, 2013 at 08:41:23AM -0500, Stuart Cassoff wrote:
>> On 12/07/13 16:42, Marc Espie wrote:
>>> On Sat, Dec 07, 2013 at 03:39:28PM -0500, Stuart Cassoff wrote:
 On 12/05/13 05:36, Marc Espie wrote:
> On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
>> I'd like tcllib and tklib to make use of 'tcl modules'.
>> Every package that can be installed as a tcl module saves one file and 
>> one dir
>> and there are enough eligible packages that I think it's worth doing.
>> This makes use of a newer tcl packaging system that's a bit better 
>> and/or faster.
>>
>> These should always be installend in the dir for lowest tcl version 
>> possible, which is 8.5.
>> I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.
>>
>> Here's the result for one package:
>
> So, make sure to look at the result of update-plist, it's not always
> right.
>

 How's this? Snippet from the port Makefile diff.

 +# We want the lowest Tcl version possible.
 +MODTK_VERSION =8.5
 +
 +# Manual target to adjust PLIST after update-plist.
 +adj-plist:
 +   perl -pi -e 's/\$${MODTK_VERSION}/8.5/' ${PKGDIR}/PLIST
 +
>>> YUCK. A big *NO*.
>>>
>>> Did you try the approach I outlined ?  Namely provide longer module 
>>> variables
>>> that would be FIRST in the substituted list.
>>>
> 
>> It confused and frightened me.
>>
>> Eventually I manned-up and so with your approach I get this in the PLIST:
>>
>> lib/tcl/${MODTK_MODPATH}/autoscroll-1.1.tm
>>
>> Which I don't understand much more.
>>
>> Either way I get the same package file so maybe I don't actually have a 
>> problem here?
> 
> Maybe you don't understand it much more, but it's cleaner, in as much
> as there's no extra step to fix the plist after update-plist.
> 
> ... and it will fix the same problem in (potentially) other ports, without
> you needing to special-case each and every port.
> 

Ok I understand now, thanks.

How's this? Should there be a MODTK_MINVERSION as well?


Index: lang/tcl/tcl.port.mk
===
RCS file: /cvs/ports/lang/tcl/tcl.port.mk,v
retrieving revision 1.16
diff -u -p -u -p -r1.16 tcl.port.mk
--- lang/tcl/tcl.port.mk17 Nov 2013 11:08:03 -  1.16
+++ lang/tcl/tcl.port.mk9 Apr 2014 21:26:05 -
@@ -3,6 +3,7 @@
 CATEGORIES +=  lang/tcl

 MODTCL_VERSION ?=  8.5
+MODTCL_MINVERSION ?=   8.5

 .if ${MODTCL_VERSION} == 8.4
 _MODTCL_SPEC = tcl->=${MODTCL_VERSION},<8.5
@@ -43,4 +44,4 @@ MODTCL_TCLSH_ADJ =perl -pi \
 # Same for 'wish'.
 MODTCL_WISH_ADJ =  ${MODTCL_TCLSH_ADJ:S/tclsh/wish/}

-SUBST_VARS +=  MODTCL_VERSION MODTCL_BIN
+SUBST_VARS +=  MODTCL_MINVERSION MODTCL_VERSION MODTCL_BIN
Index: x11/tk/tk.port.mk
===
RCS file: /cvs/ports/x11/tk/tk.port.mk,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 tk.port.mk
--- x11/tk/tk.port.mk   2 Feb 2013 11:18:28 -   1.12
+++ x11/tk/tk.port.mk   9 Apr 2014 21:26:55 -
@@ -22,7 +22,7 @@ MODTK_LIBDIR ?=   ${MODTCL_TCLDIR}/tk${MO
 MODTK_CONFIG ?=${MODTK_LIBDIR}/tkConfig.sh


-SUBST_VARS +=  MODTK_VERSION MODTK_BIN
+SUBST_VARS +=  MODTCL_MINVERSION MODTK_VERSION MODTK_BIN

 MODULES += lang/tcl



Index: port-modules.5
===
RCS file: /cvs/src/share/man/man5/port-modules.5,v
retrieving revision 1.172
diff -u -p -u -p -r1.172 port-modules.5
--- port-modules.5  2 Apr 2014 15:00:27 -   1.172
+++ port-modules.5  9 Apr 2014 21:24:27 -
@@ -933,8 +933,9 @@ Sets
 .Ev MODTCL_RUN_DEPENDS ,
 .Ev MODTCL_LIB ,
 .Ev MODTCL_LIB_DEPENDS ,
+.Ev MODTCL_CONFIG
 and
-.Ev MODTCL_CONFIG .
+.Ev MODTCL_MINVERSION .
 .Ev MODTCL_VERSION
 is the default version used by all Tcl ports and may be overridden.
 Provides
@@ -946,6 +947,10 @@ Also affects
 .Ev CATEGORIES
 and
 .Ev SUBST_VARS .
+.Ev MODTCL_MINVERSION
+may be used to prevent unwanted
+.Ev MODTCL_VERSION
+substitutions in PLISTs.
 .It perl
 This module is documented in the main
 .Xr bsd.port.mk 5



Re: Preventing substitutions in PLIST ?

2013-12-08 Thread Marc Espie
On Sun, Dec 08, 2013 at 08:41:23AM -0500, Stuart Cassoff wrote:
> On 12/07/13 16:42, Marc Espie wrote:
> > On Sat, Dec 07, 2013 at 03:39:28PM -0500, Stuart Cassoff wrote:
> >> On 12/05/13 05:36, Marc Espie wrote:
> >>> On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
>  I'd like tcllib and tklib to make use of 'tcl modules'.
>  Every package that can be installed as a tcl module saves one file and 
>  one dir
>  and there are enough eligible packages that I think it's worth doing.
>  This makes use of a newer tcl packaging system that's a bit better 
>  and/or faster.
> 
>  These should always be installend in the dir for lowest tcl version 
>  possible, which is 8.5.
>  I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.
> 
>  Here's the result for one package:
> >>>
> >>> So, make sure to look at the result of update-plist, it's not always
> >>> right.
> >>>
> >>
> >> How's this? Snippet from the port Makefile diff.
> >>
> >> +# We want the lowest Tcl version possible.
> >> +MODTK_VERSION =8.5
> >> +
> >> +# Manual target to adjust PLIST after update-plist.
> >> +adj-plist:
> >> +   perl -pi -e 's/\$${MODTK_VERSION}/8.5/' ${PKGDIR}/PLIST
> >> +
> > YUCK. A big *NO*.
> > 
> > Did you try the approach I outlined ?  Namely provide longer module 
> > variables
> > that would be FIRST in the substituted list.
> > 

> It confused and frightened me.
> 
> Eventually I manned-up and so with your approach I get this in the PLIST:
> 
> lib/tcl/${MODTK_MODPATH}/autoscroll-1.1.tm
> 
> Which I don't understand much more.
> 
> Either way I get the same package file so maybe I don't actually have a 
> problem here?

Maybe you don't understand it much more, but it's cleaner, in as much
as there's no extra step to fix the plist after update-plist.

... and it will fix the same problem in (potentially) other ports, without
you needing to special-case each and every port.



Re: Preventing substitutions in PLIST ?

2013-12-08 Thread Stuart Cassoff
On 12/07/13 16:42, Marc Espie wrote:
> On Sat, Dec 07, 2013 at 03:39:28PM -0500, Stuart Cassoff wrote:
>> On 12/05/13 05:36, Marc Espie wrote:
>>> On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
 I'd like tcllib and tklib to make use of 'tcl modules'.
 Every package that can be installed as a tcl module saves one file and one 
 dir
 and there are enough eligible packages that I think it's worth doing.
 This makes use of a newer tcl packaging system that's a bit better and/or 
 faster.

 These should always be installend in the dir for lowest tcl version 
 possible, which is 8.5.
 I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.

 Here's the result for one package:
>>>
>>> So, make sure to look at the result of update-plist, it's not always
>>> right.
>>>
>>
>> How's this? Snippet from the port Makefile diff.
>>
>> +# We want the lowest Tcl version possible.
>> +MODTK_VERSION =8.5
>> +
>> +# Manual target to adjust PLIST after update-plist.
>> +adj-plist:
>> +   perl -pi -e 's/\$${MODTK_VERSION}/8.5/' ${PKGDIR}/PLIST
>> +
> YUCK. A big *NO*.
> 
> Did you try the approach I outlined ?  Namely provide longer module variables
> that would be FIRST in the substituted list.
> 

It confused and frightened me.

Eventually I manned-up and so with your approach I get this in the PLIST:

lib/tcl/${MODTK_MODPATH}/autoscroll-1.1.tm

Which I don't understand much more.

Either way I get the same package file so maybe I don't actually have a problem 
here?


Stu




Re: Preventing substitutions in PLIST ?

2013-12-07 Thread Marc Espie
On Sat, Dec 07, 2013 at 03:39:28PM -0500, Stuart Cassoff wrote:
> On 12/05/13 05:36, Marc Espie wrote:
> > On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
> >> I'd like tcllib and tklib to make use of 'tcl modules'.
> >> Every package that can be installed as a tcl module saves one file and one 
> >> dir
> >> and there are enough eligible packages that I think it's worth doing.
> >> This makes use of a newer tcl packaging system that's a bit better and/or 
> >> faster.
> >>
> >> These should always be installend in the dir for lowest tcl version 
> >> possible, which is 8.5.
> >> I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.
> >>
> >> Here's the result for one package:
> > 
> > So, make sure to look at the result of update-plist, it's not always
> > right.
> > 
> 
> How's this? Snippet from the port Makefile diff.
> 
> +# We want the lowest Tcl version possible.
> +MODTK_VERSION =8.5
> +
> +# Manual target to adjust PLIST after update-plist.
> +adj-plist:
> +   perl -pi -e 's/\$${MODTK_VERSION}/8.5/' ${PKGDIR}/PLIST
> +
YUCK. A big *NO*.

Did you try the approach I outlined ?  Namely provide longer module variables
that would be FIRST in the substituted list.



Re: Preventing substitutions in PLIST ?

2013-12-07 Thread Stuart Cassoff
On 12/05/13 05:36, Marc Espie wrote:
> On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
>> I'd like tcllib and tklib to make use of 'tcl modules'.
>> Every package that can be installed as a tcl module saves one file and one 
>> dir
>> and there are enough eligible packages that I think it's worth doing.
>> This makes use of a newer tcl packaging system that's a bit better and/or 
>> faster.
>>
>> These should always be installend in the dir for lowest tcl version 
>> possible, which is 8.5.
>> I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.
>>
>> Here's the result for one package:
> 
> So, make sure to look at the result of update-plist, it's not always
> right.
> 

How's this? Snippet from the port Makefile diff.

+# We want the lowest Tcl version possible.
+MODTK_VERSION =8.5
+
+# Manual target to adjust PLIST after update-plist.
+adj-plist:
+   perl -pi -e 's/\$${MODTK_VERSION}/8.5/' ${PKGDIR}/PLIST
+



Re: Preventing substitutions in PLIST ?

2013-12-05 Thread Stuart Cassoff
On 12/05/13 05:36, Marc Espie wrote:
> On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
>> I'd like tcllib and tklib to make use of 'tcl modules'.
>> Every package that can be installed as a tcl module saves one file and one 
>> dir
>> and there are enough eligible packages that I think it's worth doing.
>> This makes use of a newer tcl packaging system that's a bit better and/or 
>> faster.
>>
>> These should always be installend in the dir for lowest tcl version 
>> possible, which is 8.5.
>> I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.
>>
>> Here's the result for one package:
> 
> So, make sure to look at the result of update-plist, it's not always
> right.
> 
> Another trick would be to add a longer variable *in front* of MODTK_VERSION
> in SUBST_VARS.
> 
> E.g., 
> 
> MODTK_MINVERSION ?= 8.5
> MODTK_MODPATH=modules/${MODTK_MINVERSION}
> 
> SUBST_VARS = ... MODTK_MODPATH MODTK_VERSION ...
> 
> should solve your substitute issue
> 

Thanks.
For now I'll go with manually adjusting the PLIST
and I'll put a note in the Makefile.

Stu



Re: Preventing substitutions in PLIST ?

2013-12-05 Thread Marc Espie
On Thu, Dec 05, 2013 at 01:26:47AM -0500, Stuart Cassoff wrote:
> I'd like tcllib and tklib to make use of 'tcl modules'.
> Every package that can be installed as a tcl module saves one file and one dir
> and there are enough eligible packages that I think it's worth doing.
> This makes use of a newer tcl packaging system that's a bit better and/or 
> faster.
> 
> These should always be installend in the dir for lowest tcl version possible, 
> which is 8.5.
> I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.
> 
> Here's the result for one package:

So, make sure to look at the result of update-plist, it's not always
right.

Another trick would be to add a longer variable *in front* of MODTK_VERSION
in SUBST_VARS.

E.g., 

MODTK_MINVERSION ?= 8.5
MODTK_MODPATH=modules/${MODTK_MINVERSION}

SUBST_VARS = ... MODTK_MODPATH MODTK_VERSION ...

should solve your substitute issue


> --- /usr/ports/devel/tklib/pkg/PLISTSat Nov 16 16:26:47 2013
> +++ PLIST   Thu Dec  5 00:09:14 2013
> @@ -3,9 +3,6 @@
>  @conflict wcb-*
>  @pkgpath devel/mentry
>  @pkgpath devel/wcb
> -lib/tcl/autoscroll/
> -lib/tcl/autoscroll/autoscroll.tcl
> -lib/tcl/autoscroll/pkgIndex.tcl
>  lib/tcl/canvas/
>  lib/tcl/canvas/canvas_drag.tcl
>  lib/tcl/canvas/canvas_epoints.tcl
> @@ -101,6 +98,7 @@
>  lib/tcl/menubar/node.tcl
>  lib/tcl/menubar/pkgIndex.tcl
>  lib/tcl/menubar/tree.tcl
> +lib/tcl/modules/${MODTK_VERSION}/autoscroll-1.1.tm
>  lib/tcl/ntext/
>  lib/tcl/ntext/ntext.tcl
>  lib/tcl/ntext/pkgIndex.tcl



Preventing substitutions in PLIST ?

2013-12-04 Thread Stuart Cassoff
I'd like tcllib and tklib to make use of 'tcl modules'.
Every package that can be installed as a tcl module saves one file and one dir
and there are enough eligible packages that I think it's worth doing.
This makes use of a newer tcl packaging system that's a bit better and/or 
faster.

These should always be installend in the dir for lowest tcl version possible, 
which is 8.5.
I'm concerned that ${MODTK_VERSION} in the PLIST isn't right.

Here's the result for one package:

--- /usr/ports/devel/tklib/pkg/PLISTSat Nov 16 16:26:47 2013
+++ PLIST   Thu Dec  5 00:09:14 2013
@@ -3,9 +3,6 @@
 @conflict wcb-*
 @pkgpath devel/mentry
 @pkgpath devel/wcb
-lib/tcl/autoscroll/
-lib/tcl/autoscroll/autoscroll.tcl
-lib/tcl/autoscroll/pkgIndex.tcl
 lib/tcl/canvas/
 lib/tcl/canvas/canvas_drag.tcl
 lib/tcl/canvas/canvas_epoints.tcl
@@ -101,6 +98,7 @@
 lib/tcl/menubar/node.tcl
 lib/tcl/menubar/pkgIndex.tcl
 lib/tcl/menubar/tree.tcl
+lib/tcl/modules/${MODTK_VERSION}/autoscroll-1.1.tm
 lib/tcl/ntext/
 lib/tcl/ntext/ntext.tcl
 lib/tcl/ntext/pkgIndex.tcl