Index | Thread | Search

From:
"Johannes Thyssen Tishman" <johannes@thyssentishman.com>
Subject:
Re: x11/tk/8.6: Missing headers in package?
To:
"Stuart Henderson" <stu@spacehopper.org>
Cc:
<ports@openbsd.org>, "Stuart Cassoff" <stwo@users.sourceforge.net>
Date:
Wed, 18 Sep 2024 15:29:42 +0200

Download raw body.

Thread
2024-09-18T13:12:02Z Stuart Henderson:
> On 2024/09/18 14:53, Johannes Thyssen Tishman wrote:
> > I'm trying to build a port (netgen, port attached) that depends on Tk
> > and I'm trying to use version 8.6. However when building I get the
> > following error:
> > 
> > /usr/ports/pobj/netgen-6.2.2404/netgen-6.2.2404/ng/Togl2.1/togl.c:30:10: fatal error: 'tkInt.h' file not found
> > #include <tkInt.h>   // don't need it on osx ???
> >          ^~~~~~~~~
> > 1 error generated.
> > ninja: build stopped: subcommand failed.
> > 
> > I looked at the package lists of both Tk versions and 8.5 includes the
> > above mentioned header as well as the following, many of which version
> > 8.6 does not include.
> > 
> > include/tk8.5/default.h
> > include/tk8.5/tk.h
> > include/tk8.5/tkDecls.h
> > include/tk8.5/tkInt.h
> > include/tk8.5/tkIntDecls.h
> > include/tk8.5/tkIntPlatDecls.h
> > include/tk8.5/tkIntXlibDecls.h
> > include/tk8.5/tkPlatDecls.h
> > include/tk8.5/tkPort.h
> > include/tk8.5/tkUnixDefault.h
> > include/tk8.5/tkUnixInt.h
> > include/tk8.5/tkUnixPort.h
> > include/tk8.5/ttkDecls.h
> > include/tk8.5/ttkTheme.h
> > 
> > Is there a specific reason for this? The Tk-8.6 package lists of other
> > OS's (e.g. Arch Linux[1] or FreeBSD[2]) include them as well.
> > 
> > I can build with version 8.5 with no issues, however this port will be
> > used in conjunction with cad/opencascade which depends on version 8.6.
> > Not sure if this would cause problems or not, but it seems silly to
> > install both versions if both could work with the same.
> > 
> > [1] https://archlinux.org/packages/extra/x86_64/tk/files/
> > [2] https://github.com/freebsd/freebsd-ports/blob/main/x11-toolkits/tk86/pkg-plist
> > 
>
> fwiw these are the private headers which stu@ intentionally removed
> in this commit:

Thanks Stuart. Hmm it's been a while since this was changed. I'm
surprised these headers were not needed until now. I don't really
understand the reason for their removal, but I'd be interested to know
if bringing them back could be considered.

> $ cvsps -s 136 -g
> ---------------------
> PatchSet 136
> Date: 2015/05/22 05:17:59
> Author: stu
> Branch: HEAD
> Tag: (none)
> Log:
> Update to 8.6.4.
>
> Discontinue the installation of private header files.
> Better setting of Tcl include dir.
> Improved lib/package/module path config/runtime.
> Port improvements for less diff churn on future port updates.
>
> Members:
> 	8.6/Makefile:1.8->1.9
> 	8.6/distinfo:1.3->1.4
> 	8.6/patches/patch-library_tk_tcl:1.1->1.2
> 	8.6/patches/patch-unix_Makefile_in:1.3->1.4
> 	8.6/pkg/PLIST:1.6->1.7
>
> Index: ports/x11/tk/8.6/Makefile
> diff -u ports/x11/tk/8.6/Makefile:1.8 ports/x11/tk/8.6/Makefile:1.9
> --- ports/x11/tk/8.6/Makefile:1.8	Sun Sep  7 18:49:32 2014
> +++ ports/x11/tk/8.6/Makefile	Fri May 22 04:17:59 2015
> @@ -1,10 +1,11 @@
> -# $OpenBSD: Makefile,v 1.8 2014/09/07 18:49:32 stu Exp $
> +# $OpenBSD: Makefile,v 1.9 2015/05/22 04:17:59 stu Exp $
>
>  COMMENT =		graphical toolkit for Tcl
>
> -DISTNAME =		tk8.6.2
> -PKGNAME =		tk-8.6.2
> -SHARED_LIBS =		tk86 1.1
> +P =			4
> +DISTNAME =		tk8.6.${P}
> +PKGNAME =		tk-8.6.${P}
> +SHARED_LIBS =		tk86 1.2
>  CATEGORIES =		x11 x11/tk
>  HOMEPAGE =		http://www.tcl.tk/
>  MAINTAINER =		Stuart Cassoff <stwo@users.sourceforge.net>
> @@ -17,11 +18,11 @@
>  MASTER_SITES =		${MASTER_SITE_SOURCEFORGE:=tcl/}
>  DISTFILES =		${DISTNAME}-src.tar.gz
>
> -LIB_DEPENDS =		tcl->=8.6.2,<8.6.3:lang/tcl/8.6
> +LIB_DEPENDS =		tcl-8.6.${P}:lang/tcl/8.6
>
>  MAKE_FLAGS +=		TK_LIBRARY='$$(prefix)/lib/tcl/tk$$(VERSION)' \
> -			TCL_GENERIC_DIR='$$(GENERIC_DIR)' \
> -			TCL_PLATFORM_DIR='$$(GENERIC_DIR)'
> +			TCL_GENERIC_DIR='${LOCALBASE}/include/tcl8.6' \
> +			TCL_PLATFORM_DIR='$$(TCL_GENERIC_DIR)'
>
>  FAKE_FLAGS =		INSTALL_DATA_DIR="${INSTALL_DATA_DIR}" \
>  			INSTALL_LIBRARY="${INSTALL_DATA}" \
> @@ -43,8 +44,6 @@
>  			--enable-man-symlinks \
>  			--disable-rpath \
>  			--with-tcl="${LOCALBASE}/lib/tcl/tcl8.6" \
> -			EXTRA_INSTALL="install-private-headers" \
> -			EXTRA_CC_SWITCHES="-I${LOCALBASE}/include/tcl8.6" \
>  			SHLIB_VERSION="${LIBtk86_VERSION}"
>
>  .include <bsd.port.arch.mk>
> @@ -63,9 +62,6 @@
>  TESTHOME =		${WRKDIR}/testhome
>  # Use TESTFLAGS to control the Tk tests
>  TESTFLAGS =
> -
> -pre-configure:
> -	@${SUBST_CMD} ${WRKSRC}/installManPage
>
>  pre-test:
>  	mkdir -p ${TESTHOME}
> Index: ports/x11/tk/8.6/distinfo
> diff -u ports/x11/tk/8.6/distinfo:1.3 ports/x11/tk/8.6/distinfo:1.4
> --- ports/x11/tk/8.6/distinfo:1.3	Sun Sep  7 18:49:32 2014
> +++ ports/x11/tk/8.6/distinfo	Fri May 22 04:17:59 2015
> @@ -1,2 +1,2 @@
> -SHA256 (tk8.6.2-src.tar.gz) = r7ZjkEPsOJBa/iK2HKVIICF/TU6B4K1J+DnBbSv5hXk=
> -SIZE (tk8.6.2-src.tar.gz) = 4246617
> +SHA256 (tk8.6.4-src.tar.gz) = CPmd+F5dycQnF2IWPGqruWLIspfcXEwa+L3QX8LdJsE=
> +SIZE (tk8.6.4-src.tar.gz) = 4266426
> Index: ports/x11/tk/8.6/patches/patch-library_tk_tcl
> diff -u ports/x11/tk/8.6/patches/patch-library_tk_tcl:1.1 ports/x11/tk/8.6/patches/patch-library_tk_tcl:1.2
> --- ports/x11/tk/8.6/patches/patch-library_tk_tcl:1.1	Sat Feb  2 11:18:09 2013
> +++ ports/x11/tk/8.6/patches/patch-library_tk_tcl	Fri May 22 04:17:59 2015
> @@ -1,11 +1,12 @@
> -$OpenBSD: patch-library_tk_tcl,v 1.1 2013/02/02 11:18:09 stu Exp $
> ---- library/tk.tcl.orig	Wed Feb 15 20:58:18 2012
> -+++ library/tk.tcl	Wed Feb 15 21:46:10 2012
> -@@ -53,13 +53,13 @@ namespace eval ::ttk {
> +$OpenBSD: patch-library_tk_tcl,v 1.2 2015/05/22 04:17:59 stu Exp $
> +--- library/tk.tcl.orig	Thu Feb 26 12:13:57 2015
> ++++ library/tk.tcl	Mon Apr  6 21:52:53 2015
> +@@ -53,13 +53,14 @@ namespace eval ::ttk {
>       }
>   }
>
>  -# Add Ttk & Tk's directory to the end of the auto-load search path, if it
> ++# OpenBSD layout.
>  +# Add Tk's directory to the end of the auto-load search path, if it
>   # isn't already on the path:
>
> Index: ports/x11/tk/8.6/patches/patch-unix_Makefile_in
> diff -u ports/x11/tk/8.6/patches/patch-unix_Makefile_in:1.3 ports/x11/tk/8.6/patches/patch-unix_Makefile_in:1.4
> --- ports/x11/tk/8.6/patches/patch-unix_Makefile_in:1.3	Sun Sep  7 18:49:32 2014
> +++ ports/x11/tk/8.6/patches/patch-unix_Makefile_in	Fri May 22 04:17:59 2015
> @@ -1,15 +1,7 @@
> -$OpenBSD: patch-unix_Makefile_in,v 1.3 2014/09/07 18:49:32 stu Exp $
> ---- unix/Makefile.in.orig	Mon Jul 28 11:56:44 2014
> -+++ unix/Makefile.in	Sun Aug 17 17:01:38 2014
> -@@ -558,6 +558,7 @@ PUBLIC_HDRS = $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDec
> - # The private headers we want installed for install-private-headers
> - PRIVATE_HDRS = $(GENERIC_DIR)/tkInt.h $(GENERIC_DIR)/tkIntDecls.h \
> - 	$(GENERIC_DIR)/tkIntPlatDecls.h $(GENERIC_DIR)/tkPort.h \
> -+	$(GENERIC_DIR)/default.h $(UNIX_DIR)/tkUnixDefault.h \
> - 	$(TTK_HDRS) $(@TK_WINDOWINGSYSTEM@_PRIVATE_HDRS)
> -
> - DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
> -@@ -593,6 +594,10 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
> +$OpenBSD: patch-unix_Makefile_in,v 1.4 2015/05/22 04:17:59 stu Exp $
> +--- unix/Makefile.in.orig	Wed Mar 11 09:59:53 2015
> ++++ unix/Makefile.in	Mon Apr  6 19:47:51 2015
> +@@ -593,6 +593,10 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
>   	rm -f $@
>   	@MAKE_STUB_LIB@
>
> @@ -20,7 +12,7 @@
>   # Build Aqua resource files
>   ${TK_RSRC_FILE}: $(AQUA_RESOURCES)
>   	rm -f $@
> -@@ -740,10 +745,10 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
> +@@ -740,10 +744,10 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
>   	    echo "}";\
>   	    fi \
>   	    ) > "$(PKG_INDEX)"; \
> @@ -32,7 +24,7 @@
>   	@if test -f "tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \
>   	    $(INSTALL_LIBRARY) "tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\
>   	    chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\
> -@@ -761,7 +766,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
> +@@ -761,7 +765,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
>   	@EXTRA_INSTALL_BINARIES@
>   	@echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/"
>   	@$(INSTALL_DATA_DIR) $(LIB_INSTALL_DIR)/pkgconfig
> @@ -41,7 +33,7 @@
>
>   install-libraries: libraries
>   	@for i in "$(SCRIPT_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)/images" \
> -@@ -816,6 +821,7 @@ install-demos:
> +@@ -816,6 +820,7 @@ install-demos:
>   	    if [ -f $$i ] ; then \
>   		sed -e '3 s|exec wish|exec wish$(VERSION)|' \
>   			$$i > "$(DEMO_INSTALL_DIR)"/`basename $$i`; \
> @@ -49,7 +41,7 @@
>   	    fi; \
>   	    done;
>   	@for i in $(DEMOPROGS); \
> -@@ -823,7 +829,7 @@ install-demos:
> +@@ -823,7 +828,7 @@ install-demos:
>   	    if test $$i = "square"; then \
>   	    rm -f  "$(DEMO_INSTALL_DIR)/$$i"; \
>   	    else \
> Index: ports/x11/tk/8.6/pkg/PLIST
> diff -u ports/x11/tk/8.6/pkg/PLIST:1.6 ports/x11/tk/8.6/pkg/PLIST:1.7
> --- ports/x11/tk/8.6/pkg/PLIST:1.6	Sun Sep  7 18:49:32 2014
> +++ ports/x11/tk/8.6/pkg/PLIST	Fri May 22 04:17:59 2015
> @@ -1,23 +1,12 @@
> -@comment $OpenBSD: PLIST,v 1.6 2014/09/07 18:49:32 stu Exp $
> +@comment $OpenBSD: PLIST,v 1.7 2015/05/22 04:17:59 stu Exp $
>  @option no-default-conflict
>  @conflict tk->=8.6,<8.7
>  %%SHARED%%
>  @bin bin/wish8.6
>  include/tk8.6/
> -include/tk8.6/default.h
>  include/tk8.6/tk.h
>  include/tk8.6/tkDecls.h
> -include/tk8.6/tkInt.h
> -include/tk8.6/tkIntDecls.h
> -include/tk8.6/tkIntPlatDecls.h
> -include/tk8.6/tkIntXlibDecls.h
>  include/tk8.6/tkPlatDecls.h
> -include/tk8.6/tkPort.h
> -include/tk8.6/tkUnixDefault.h
> -include/tk8.6/tkUnixInt.h
> -include/tk8.6/tkUnixPort.h
> -include/tk8.6/ttkDecls.h
> -include/tk8.6/ttkTheme.h
>  lib/libtk86.a
>  @lib lib/libtk86.so.${LIBtk86_VERSION}
>  lib/libtkstub86.a