Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --- pkgsrc/x11/tk/Makefile 2005/08/31 09:40:15 1.48 +++ pkgsrc/x11/tk/Makefile 2023/06/14 10:29:45 1.93 @@ -1,78 +1,46 @@ -# $NetBSD: Makefile,v 1.48 2005/08/31 09:40:15 seb Exp $ +# $NetBSD: Makefile,v 1.93 2023/06/14 10:29:45 riastradh Exp $ -DISTNAME= tk8.4.11-src -PKGNAME= tk-8.4.11 -PKGREVISION= 1 +DISTNAME= tk${TK_VERSION}-src +PKGNAME= tk-${TK_VERSION} +PKGREVISION= 1 CATEGORIES= x11 lang MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/} -MAINTAINER= jwise@NetBSD.org -HOMEPAGE= http://www.tcl.tk/ +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://www.tcl.tk/ COMMENT= Graphical toolkit for TCL +LICENSE= 2-clause-bsd -PKG_INSTALLATION_TYPES= overwrite pkgviews +.include "../../x11/tk/Makefile.version" -WRKSRC= ${WRKDIR}/${DISTNAME:C/-src//}/unix +WRKSRC= ${WRKDIR}/tk${TK_VERSION} + +USE_GCC_RUNTIME= yes -USE_LIBTOOL= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --with-tcl=${BUILDLINK_PREFIX.tcl}/lib -CONFIGURE_ARGS+= --enable-threads +CONFIGURE_DIRS= unix +BUILD_DIRS= ${CONFIGURE_DIRS} +CONFIGURE_ARGS+= --with-tcl=${_CROSS_DESTDIR:U}${BUILDLINK_PREFIX.tcl}/lib CONFIGURE_ENV+= LIB_RUNTIME_DIR=${PREFIX}/lib -MAKE_ENV+= TOUCH=${TOUCH:Q} -PTHREAD_OPTS+= require + +PKGCONFIG_OVERRIDE+= unix/tk.pc.in TEST_TARGET= test -# Initially install the man pages into ${WRKDIR}/man, as we need a staged -# install to avoid overwriting existing manpages in ${PREFIX}/man. -CONFIGURE_ARGS+= --mandir=${WRKDIR:Q}/man +.if defined(ABI) && ${ABI} == "64" +CONFIGURE_ARGS+= --enable-64bit +.endif + +.include "options.mk" + +SUBST_CLASSES+= tk-config +SUBST_STAGE.tk-config= post-build +SUBST_FILES.tk-config= unix/tkConfig.sh +SUBST_SED.tk-config+= -e "s|${WRKSRC}/unix|${PREFIX}/lib|" +SUBST_SED.tk-config+= -e "s|${WRKSRC}|${PREFIX}/include/tk|" -.include "../../lang/tcl/buildlink3.mk" -.include "../../mk/pthread.buildlink3.mk" -.include "../../mk/x11.buildlink3.mk" - -post-build: - ${SED} \ - -e "s|${WRKSRC}|${PREFIX}/lib|" \ - -e "s|${WRKDIR}/${DISTNAME:C/-src//}|${PREFIX}/include/tk|" \ - ${WRKSRC}/tkConfig.sh > ${WRKSRC}/tkConfig.sh.tmp && \ - ${MV} ${WRKSRC}/tkConfig.sh.tmp ${WRKSRC}/tkConfig.sh - -post-install: - cd ${WRKDIR} && ${PAX} -rwpm man ${PREFIX} - ${RM} -rf ${WRKDIR}/man - ${RM} -f ${PREFIX}/bin/wish - cd ${PREFIX}/bin && ${LN} -s wish8.4 wish - ${INSTALL_DATA_DIR} ${PREFIX}/include/tk - ${INSTALL_DATA_DIR} ${PREFIX}/include/tk/generic - ${INSTALL_DATA_DIR} ${PREFIX}/include/tk/unix - ${INSTALL_DATA} ${WRKSRC}/../generic/default.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/ks_names.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tk.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tk3d.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkButton.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkCanvas.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkColor.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkDecls.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkFileFilter.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkFont.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkInitScript.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkInt.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkIntDecls.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkIntPlatDecls.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkIntXlibDecls.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkMenu.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkMenubutton.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkPlatDecls.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkPort.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkScale.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkScrollbar.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkSelect.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkText.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../generic/tkUndo.h ${PREFIX}/include/tk/generic - ${INSTALL_DATA} ${WRKSRC}/../unix/tkUnixDefault.h ${PREFIX}/include/tk/unix - ${INSTALL_DATA} ${WRKSRC}/../unix/tkUnixInt.h ${PREFIX}/include/tk/unix - ${INSTALL_DATA} ${WRKSRC}/../unix/tkUnixPort.h ${PREFIX}/include/tk/unix +PLIST_SUBST+= SONUM=${TK_SONUM} +PLIST_SUBST+= BASEVER=${TK_BASEVER} +.include "../../lang/tcl/buildlink3.mk" .include "../../mk/bsd.pkg.mk"