From: Stuart Cassoff Subject: Re: x11/tk/8.6: Missing headers in package? To: Stuart Henderson , Johannes Thyssen Tishman Cc: "ports@openbsd.org" Date: Thu, 19 Sep 2024 14:28:27 +0000 Private headers shouldn't be installed; if a package needs them then that package should be fixed.Maybe investigate to see what the software needs in terms of #define, private structs or functions then add some -D's or adjust the software to use public structs/functions. Stu(I have a really old togl port somewhere that I should dust off and finish.) On Wednesday, September 18, 2024 at 11:08:51 a.m. EDT, Johannes Thyssen Tishman wrote: 2024-09-18T13:55:03Z Stuart Henderson: > On 2024/09/18 15:29, Johannes Thyssen Tishman wrote: > > 2024-09-18T13:12:02Z Stuart Henderson: > > > > > > 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 > > Most things don't need them, only if they're poking about in internals > (which togl seems to be doing). > > > understand the reason for their removal, but I'd be interested to know > > if bringing them back could be considered. > > as an alternative to including in the tk package, it might be possible > to use BUILD_DEPENDS=x11/tk:patch and point netgen's build at the copy > from Tk's source dir (it will be extracted under netgen's WRKDIR). Oh wow, I didn't know about the :patch target. Thank you, this worked! > > > $ 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 > > > @@ -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 > > > @@ -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 > >