Skip to content

Conversation

@andyjpb
Copy link
Contributor

@andyjpb andyjpb commented Aug 11, 2023

I am building this shape extension as follows on Debian 10.

$ cd shape/unix
$ ./configure --with-tclconf=/usr/lib/tcl8.6 --with-tkconf=/usr/lib

It doesn't work out-of-the-box but after applying the attached patches I get a unix/libshape04.so.1.0 binary.

I've also included some patches to get the demos working but I'm less sure of those because there seems to be something I don't understand about how unix/pkgIndex.tcl is supposed to work.

Please see the commit messages themselves for all the details.

Hopefully these patches are useful but please let me know if you need any more information.

--
andyjpb

+ ; rather than , in shapeSetUpdateOps() argument list.

+ Redefinition of panic is not required as it is supplied by the tcl 8.6
  headers.

+ Include shapeInt.h rather than shape.h in shapeUnixImpl.c to get definition of
  ShapeApplyToParent.

+ Make ordering of Shape_CombineWindow() arguments consistent with the
  prototype and the documentation.

Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>
I have `wish` and `wish8.6` executables.

8.X is available almost everywhere these days so assume that `wish` gives
us an 8.X `wish` so that we don't have to change this again for every minor
version.

Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>
There are no installation targets provided to install the library in a
well-known location. unix/pkgIndex.tcl contains some code to help scripts
find the library and to perform a renaming dance but this code isn't
available in a well-known location either.

...so this patch simply copy & pastes the snippet from unix/pkgIndex.tcl to
where it is needed to make the demos work.

The existing definition of `dir` prevents the demos from finding their
image resources and isn't compatible with the unix/pkgIndex.tcl library
loading trick so this patch also fixes it up so that it works for me.

Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>
Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>
@chrstphrchvz
Copy link

panic() is deprecated and will be removed in future Tcl, and is already unavailable on macOS. Its usage should just be migrated to the replacement Tcl_Panic(), which I currently have proposed in #8.

@dkfellows
Copy link
Owner

I'll need to do a bit more work, but this is definitely a monotonic improvement over what was there.

@dkfellows dkfellows merged commit 4bd04e1 into dkfellows:trunk Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants