Re: path normalisation in "base"

2016-10-12 Thread Gustaf Neumann
Am 11.10.16 um 16:38 schrieb René J.V. Bertin: On Tuesday October 11 2016 16:04:21 René J.V. Bertin wrote: {{{ proc macports::normalize { filename } { set nprefix [file dirname [file normalize "${macports::prefix}/foo"]] return [string map {${nprefix} ${macports::prefix}} [file normaliz

Re: platform{} statement

2016-06-05 Thread Gustaf Neumann
Am 05.06.16 um 16:46 schrieb René J.V. Bertin: On Sunday June 05 2016 15:08:34 Gustaf Neumann wrote: (eg. incorporating tcl files from some part of the rsync tree). however, i would NOT recommend it to allow it to the regular port maintainer, since a port maintainer might not have enough

Re: platform{} statement

2016-06-05 Thread Gustaf Neumann
Am 05.06.16 um 12:14 schrieb René J.V. Bertin: On Saturday June 04 2016 13:41:59 Gustaf Neumann wrote: yes, the {$len == 1} check needs to be generalized (was wrong in the earlier versions as well). If you mean in the other procedures: no, i was referring with "earlier version" to

Re: platform{} statement

2016-06-04 Thread Gustaf Neumann
Am 04.06.16 um 10:08 schrieb René J. V. Bertin: if {$len < 1} { My code has 2 here, and I think that's reasonable ("platform darwin" on its own doesn't make a lot of sense). The original code used as signature "proc platform {args} ..." and pulled later the "os" out of $args, whereas the

Re: platform{} statement

2016-06-03 Thread Gustaf Neumann
Am 03.06.16 um 14:55 schrieb René J. V. Bertin: Rainer Müller wrote: The definition of the platform proc is here: https://trac.macports.org/browser/trunk/base/src/port1.0/portutil.tcl?rev=149111#L765 Extending that syntax with an optional code block after an "else" keyword would be possible

Re: os.major etc. on Linux

2016-05-16 Thread Gustaf Neumann
Am 16.05.16 um 11:37 schrieb René J. V. Bertin: Gustaf Neumann wrote: Doesn't Tcl have the equivalent of sizeof(void*) or sizeof(size_t)? see puts $::tcl_platform(wordSize) puts $::tcl_platform(pointerSize) puts $::tcl_platform(machine) Ah, interesting, thanks (I missed

Re: os.major etc. on Linux

2016-05-13 Thread Gustaf Neumann
Am 13.05.16 um 12:52 schrieb René J.V. Bertin: Doesn't Tcl have the equivalent of sizeof(void*) or sizeof(size_t)? see puts $::tcl_platform(wordSize) puts $::tcl_platform(pointerSize) puts $::tcl_platform(machine) -g ___ macports-dev mailing

Re: [143330] trunk/dports/devel/docker-machine/Portfile

2015-12-13 Thread Gustaf Neumann
Am 13.12.15 um 01:48 schrieb Sean Farley: $ port lint docker-machine ---> Verifying Portfile for docker-machine Warning: Line 37 should use the expansion operator instead of the eval procedure. Change Warning: eval xinstall -m 755 [glob ${worksrcpath}/bin/*] ${destroot}${prefix}/bin/ Warni

Re: registry lock

2015-11-18 Thread Gustaf Neumann
If there would be only readers, locking would not be necessary. When there is a single concurrent writer, locking is necessary, otherwise the reader could see inconsistent state (e.g. partial writes in the database, or in the file system, or in the interaction between these). Most systems use p

Re: recursive glob ...

2015-06-18 Thread Gustaf Neumann
Am 17.06.15 um 20:35 schrieb petr: Hi all, how would I make a recursive glob in TCL? another common pattern is to use foreach file [exec find -L $path -type f -name $pattern] { ... } which is straight-forward to be tailored for a wide range of usage scenarios Best regards -gn _

Re: (un)setting environment variables from a Portfile

2015-01-11 Thread Gustaf Neumann
The leading colons denote a reference to a global variable. If a Tcl command is evaluated in a tclsh at the top-level these are not needed, on e.g. proc-scope these are required. It never hurts to use it to make it clear one is referring to a global variable. -g Am 11.01.15 um 19:58 schrieb Ren

Re: (un)setting environment variables from a Portfile

2015-01-11 Thread Gustaf Neumann
Is there a (Tcl) command one can use to set or unset variables at an appropriate point set environment variable set ::env(FOO) "some value" unset environment variable unset ::env(FOO) -g ___ macports-dev mailing list macports-dev@lists.macos

Re: 2.3.0

2014-04-13 Thread Gustaf Neumann
Am 04.04.14 02:10, schrieb Ryan Schmidt: 1. I changed the way the environment variables are output, to be sorted and one per line: https://trac.macports.org/ticket/40703 This is easier to read. However for reasons I don’t understand, I don’t always see them in log output; sometimes I just se

Re: 2.3.0

2014-04-05 Thread Gustaf Neumann
Am 06.04.14 00:56, schrieb Clemens Lang: I've seen this happen with debug output enabled now: DEBUG: Executing org.macports.uninstall (gettext) DEBUG: Changing to port directory: /opt/mports/var/macports/registry/portfiles/gettext-0.18.3.2_0/72c2558ef3fd1fb2daab1b5822e6a86e16af7bb3fb559eef213a2

Re: [117621] trunk/base

2014-03-08 Thread Gustaf Neumann
Also, big, big thanks from my side! -gustaf neumann Am 08.03.14 08:53, schrieb Ryan Schmidt: On Mar 5, 2014, at 16:19, c...@macports.org wrote: ... macports: use a local copy of Tcl 8.5, mostly fix out-of-source build (#28001) ... Thank you for doing all of this work! I’m really excited

Re: [116514] trunk/base/src

2014-02-06 Thread Gustaf Neumann
of course, you are right, it should be changed to -if {$macosx_version == "10.5"} { +if {$macosx_version eq "10.5"} { adding/removing quotes does not change the semantics. % expr 10.10 == "10.1" 1 % expr 10.10 eq "10.1" 0 although it will take a while until we hav

Re: [116514] trunk/base/src

2014-01-27 Thread Gustaf Neumann
dear all, i am afraid, that i am responsible for this bug, i was too eager in bracing expressions. Anyhow, unless i am missing something essential, i would recommend to simplify the construct for "const" and to drop the helper proc "_const" in proc const {name args} { interp alias {} $na

Re: [116449] trunk/base/src/port1.0

2014-01-27 Thread Gustaf Neumann
mailto:c...@macports.org> wrote: Revision 116449 <https://trac.macports.org/changeset/116449> Author c...@macports.org <mailto:c...@macports.org> Date 2014-01-25 08:57:17 -0800 (Sat, 25 Jan 2014) Log Message port1.0: Tcl cleanup, from a patch by Gustaf Neum

Re: Maverics/Xcode 5 proposal: no more xcode-select --install

2013-10-31 Thread Gustaf Neumann
Am 29.10.13 21:52, schrieb Clemens Lang: On Tue, Oct 29, 2013 at 08:47:29PM +, Paul Bennett wrote: Is 'xcode-select --install' really necessary on Mavericks? Without xcode-select --install, /usr/lib/tclConfig.sh does not exist and MacPorts base currently fails to configure because it cannot

Re: [MacPorts] TclVersionInfo modified

2013-10-24 Thread Gustaf Neumann
The link posted on macports-users http://www.opensource.apple.com/ is nice, since it leads also to all the tcl-versions shipped with Mac OS X since 10.0 (it was Tcl 8.3.2). -g Am 24.10.13 08:22, schrieb Ryan Schmidt: That explains why MacPorts is working at all on Mavericks. I expected they

Re: Tcl version compatibility

2013-09-25 Thread Gustaf Neumann
Am 25.09.13 12:38, schrieb Rainer Müller: Am 24.09.13 18:39, schrieb Joshua Root: On 2013-9-25 01:56 , Bradley Giesbrecht wrote: $ sw_vers -productVersion 10.5.8 $ make test ... ===> making test in src/macports1.0 /usr/bin/tclsh ./tests/test.tcl -nocolor extra characters after close-brace

Re: gsoc13-tests: src/macports1.0 errors

2013-09-25 Thread Gustaf Neumann
Am 24.09.13 18:39, schrieb Joshua Root: On 2013-9-25 01:56 , Bradley Giesbrecht wrote: $ sw_vers -productVersion 10.5.8 $ make test ... ===> making test in src/macports1.0 /usr/bin/tclsh ./tests/test.tcl -nocolor extra characters after close-brace while executing "set pwd [eval file join {*

Re: Looking for a cure for weird scope/memory of variables

2013-07-16 Thread Gustaf Neumann
Am 16.07.13 20:50, schrieb Lawrence Velázquez: I don't see this extending cleanly to multiple substitutions (which Mojca is doing in the actual Portfile), since you're only allowed one value per array key. I suppose you could have something like this: array set foo { foo-1.1,val1

Re: Looking for a cure for weird scope/memory of variables

2013-07-16 Thread Gustaf Neumann
Am 16.07.13 20:18, schrieb Mojca Miklavec: In general, the better strategy seems to for me to avoid the definition-time substitutions of the subport body at all. This could be achieved with an associative array indexed by the version numbers. When we have an array array set foo { 1.

Re: Macports Tcl

2013-07-15 Thread Gustaf Neumann
On Jul 13, 2013, at 8:25 AM, Gustaf Neumann wrote: The macports private version is installed under /opt/local/share/macports/{bin|lib|include|man}, so one can use this tclsh via preplacing /usr/bin/tclsh in /opt/local/bin/port by /opt/local/share/macports/bin/tclsh8.5 /opt/local/share/macpor

Re: Looking for a cure for weird scope/memory of variables

2013-07-13 Thread Gustaf Neumann
Am 10.07.13 00:25, schrieb Lawrence Velázquez: For selective definition-time substitution, you could use string map (http://wiki.tcl.tk/37332#pagetoc04c6ab3f): foreach {foo.version foo.string} ${foo.versions} { set script { subport foo-${foo.version} {

Re: Macports Tcl

2013-07-13 Thread Gustaf Neumann
Am 13.07.13 15:53, schrieb Lawrence Velázquez: Bootstrapping from source would be weird, for one. I suppose we'd bundle Tcl with the source, install using that one, install the Tcl port, and reinstall off of the port? It sounds gross, but it would only have to happen for the initial install. n

Re: Macports Tcl

2013-07-13 Thread Gustaf Neumann
Am 10.07.13 00:01, schrieb Clemens Lang: Of course, if you want to come up with a script that will build Tcl 8.6 somwhere in a private prefix with --enable-threads and the thread module, be my guest :) Attached is a script that does the full cycle, albeit for tcl 8.5. and tcllib 1.15; This wou

Re: Macports Tcl

2013-07-10 Thread Gustaf Neumann
Am 10.07.13 10:41, schrieb Rainer Müller: In the same way we currently have a local implementation of try based upon TIP #89, we could make it compatible with TIP #329/Tcl 8.6 instead. This could mean just importing the one from Tcllib (haven't checked its license) and make it work on Tcl 8.4. I

Re: Looking for a cure for weird scope/memory of variables

2013-07-09 Thread Gustaf Neumann
Am 09.07.13 19:56, schrieb Clemens Lang: On Tue, Jul 09, 2013 at 07:32:03PM +0200, Gustaf Neumann wrote: foreach {foo.version foo.string} ${foo.versions} { subport foo-${foo.version} [subst { pre-fetch { system "echo ${foo.version}" }

Re: Looking for a cure for weird scope/memory of variables

2013-07-09 Thread Gustaf Neumann
Am 09.07.13 19:25, schrieb Clemens Lang: with all the ugly quoting that will be caused by this. this is nicer to read: set foo.versions { 2.0 x 3.0 y 4.1 z } foreach {foo.version foo.string} ${foo.versions} { subport foo-${foo.version} [subst { pre-fetch {

Re: Macports Tcl

2013-07-09 Thread Gustaf Neumann
Am 09.07.13 17:56, schrieb Clemens Lang: Unfortunately the try implemented in tcl 8.6 seems to be TIP #329 [1]. oops, you are right, forgot that (the discussion was in 2008). At a glace, it seems MacPorts' try indeed conforms to TIP #89, but TIP #329 no longer provides the "catch" block availab

Re: Macports Tcl

2013-07-09 Thread Gustaf Neumann
The command "try" is new built-in tcl 8.6. Since the implementation of proc "try" in macports_util.tcl says, it is compatible with Tcl TIP #89, lets hope that the usage pattern in of "try" in macports are compatible with TIP #89, and one can use the built-in "try" instead of the proc - at least

Re: modern Tcl and correct quoting

2013-06-12 Thread Gustaf Neumann
{puts yes} {puts no} set n "07" if {$n == 7} {puts yes} {puts no} set n "08" if {$n == 8} {puts yes} {puts no} In a related but different area, the expression "?:" can be dangerous: set x nan expr {1 ? $x : 0} These are a good reason to stay away from numeric expre

Re: Finding the machine CPU arch

2013-03-06 Thread Gustaf Neumann
tform(machine) -gustaf neumann ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev

Re: mass rebuild for tcl/tk 8.6

2013-01-15 Thread Gustaf Neumann
f tcl8.5 in the future (but not for tcl8.4). -gustaf neumann Am 11.01.13 23:08, schrieb Aljaž Srebrnič: On 11/gen/2013, at 15:25, Jack Howarth wrote: I don't recall seeing a discussion in macports-dev regarding the transition from the tcl/tk 8.5 to 8.6 series. Also are there any plans for a

Re: [100699] trunk/dports/lang/tcl/Portfile

2012-12-23 Thread Gustaf Neumann
How about a port name tcl8.6. i have as well submitted sometime agoa a port named tcl84 for the apps still depending on it. -gustaf neumann Am 22.12.12 22:11, schrieb Joshua Root: On 2012-12-23 07:25 , Jeremy Huddleston Sequoia wrote: ok, then please: revbump tcl add --disable-threads to the

Re: looking for older Tcl/Tk ports

2012-06-16 Thread Gustaf Neumann
While being on this topic, i have fixed the ports otcl and tclcl which were broken since 4 years. With the patches attached to ticket https://trac.macports.org/ticket/14888 these port compile now nicely against tcl 8.5 Best regards -gustaf neumann On 11.06.12 12:40, Gustaf Neumann wrote

Re: looking for older Tcl/Tk ports

2012-06-11 Thread Gustaf Neumann
On 10.06.12 20:51, Ryan Schmidt wrote: A single ticket is probably fine since they're all related. Here is the all inclusive ticket: https://trac.macports.org/ticket/34826 From the Tcl front, it would be nice to commit the two fixes https://trac.macports.org/ticket/32859 https://trac.macports

Re: looking for older Tcl/Tk ports

2012-06-10 Thread Gustaf Neumann
to contribute these ports, how do you prefer it: should i open a ticket per port or a single ticket sufficient? -gustaf neumann ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Re: tcl expert needed

2012-06-01 Thread Gustaf Neumann
of a command in tcl is to use multiple namespaces and "namespace path" or imports/exports into namespaces. -gustaf neumann ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Re: How to pick a license

2012-02-14 Thread Gustaf Neumann
Am 14.02.12 15:07, schrieb Andrea D'Amore: Is there a license among good_licenses that could fit [1]? If not the case should I add one? For what's worth, here are the debian policies concerning license requirements: http://www.debian.org/doc/debian-policy/ch-docs.html -gustaf

Re: Tcl versions with threads enabled

2012-02-09 Thread Gustaf Neumann
l. unfortunately, one seems to have to check the portfile in order to figure out, whether one could run a test. -gustaf neumann ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Re: Tcl versions with threads enabled

2012-02-07 Thread Gustaf Neumann
Am 06.02.12 20:24, schrieb Bradley Giesbrecht: On Feb 4, 2012, at 1:20 AM, Gustaf Neumann wrote: b) making tcl threaded by default (my personal favorite, other tcl unix distros went this way) Yes, I think "b" is the more attractive option you present. Please excuse my possible

Re: Tcl versions with threads enabled

2012-02-06 Thread Gustaf Neumann
ds as a variant, other ports can't depend on that. -gustaf neumann ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Re: Tcl versions with threads enabled

2012-02-06 Thread Gustaf Neumann
ources for Tcl 8.6. Furthermore, several people report worse performance from Tcl 8.6 compared to 8.5. It looks to me as a good idea to provide in parallel a tcl8.5 and tcl8.6 port + subports for the packages. Anyhow, currently i would be already much happier with threa

Tcl versions with threads enabled

2012-02-04 Thread Gustaf Neumann
ts.org/ticket/32858 https://trac.macports.org/ticket/32859 https://trac.macports.org/ticket/32899 Best regards -gustaf neumann ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev