Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --- pkgsrc/x11/tk/Makefile 2001/11/29 01:12:52 1.16 +++ pkgsrc/x11/tk/Makefile 2009/08/20 15:25:01 1.63 @@ -1,85 +1,79 @@ -# $NetBSD: Makefile,v 1.16 2001/11/29 01:12:52 hubertf Exp $ +# $NetBSD: Makefile,v 1.63 2009/08/20 15:25:01 jwise Exp $ -DISTNAME= tk8.3.2 -PKGNAME= tk-8.3.2 +DISTNAME= tk${TK_VERSION}-src +PKGNAME= tk-${TK_VERSION} PKGREVISION= 1 -CATEGORIES= x11 -MASTER_SITES= ftp://ftp.scriptics.com/pub/tcl/tcl8_3/ \ - ftp://ftp.informatik.uni-hamburg.de/pub/soft/lang/tcl/tcl8_3/ +CATEGORIES= x11 lang +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/} -MAINTAINER= jwise@netbsd.org -HOMEPAGE= http://www.tcltk.com/ +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.tcl.tk/ COMMENT= Graphical toolkit for TCL -WRKSRC= ${WRKDIR}/${DISTNAME}/unix -GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --with-tcl=${BUILDLINK_DIR}/lib -MAKE_ENV+= TOUCH="${TOUCH}" +.include "../../x11/tk/Makefile.version" + +PKG_DESTDIR_SUPPORT= user-destdir +PKG_INSTALLATION_TYPES= overwrite pkgviews + +WRKSRC= ${WRKDIR}/tk${TK_VERSION} -USE_X11= yes USE_LIBTOOL= yes -USE_BUILDLINK_ONLY= yes -REPLACE_BUILDLINK+= tkConfig.sh +GNU_CONFIGURE= yes +CONFIGURE_DIRS= unix +BUILD_DIRS= ${CONFIGURE_DIRS} +CONFIGURE_ARGS+= --with-tcl=${BUILDLINK_PREFIX.tcl}/lib +CONFIGURE_ARGS+= --enable-threads +CONFIGURE_ENV+= LIB_RUNTIME_DIR=${PREFIX}/lib +MAKE_ENV+= TOUCH=${TOUCH:Q} +PTHREAD_OPTS+= require + +TEST_TARGET= test + +.include "../../lang/tcl/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../x11/libX11/buildlink3.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|" + +INSTALLATION_DIRS+= include/tk +INSTALLATION_DIRS+= include/tk/generic +INSTALLATION_DIRS+= include/tk/unix -# 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}/man - -# Modify mkLinks script to remove the short-filename manpage if it was -# linked to a longer filename. -# -post-patch: - @cd ${WRKSRC}; \ - ${MV} -f mkLinks mkLinks.tmp; \ - ${GREP} -v "^exit 0" mkLinks.tmp > mkLinks; \ - ${CAT} mkLinks.tmp \ - | ${AWK} '/^ *ln / { print $$2 }' \ - | ${SORT} -u \ - | ${GREP} -v ".*\.n" \ - | ${SED} -e "s,^,${RM} -f ," \ - >> mkLinks; \ - ${RM} -f mkLinks.tmp; \ - ${CHMOD} +x mkLinks; +DESTDIRPREFIX= ${DESTDIR}${PREFIX} post-install: - ${CHMOD} -R ugo-w ${WRKDIR}/man - cd ${WRKDIR}; ${PAX} -rw man ${PREFIX} - ${CHMOD} -R ug+rw ${WRKDIR}/man - ${RM} -f ${PREFIX}/bin/wish - cd ${PREFIX}/bin && ${LN} -s wish8.3 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/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}/../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 - -test: - cd ${WRKSRC}; ${SETENV} LIBTOOL=${LIBTOOL} PREFIX=${PREFIX} ${MAKE} test + rm -f ${DESTDIRPREFIX:Q}/bin/wish + ln -s wish8.4 ${DESTDIRPREFIX:Q}/bin/wish + ${INSTALL_DATA} ${WRKSRC}/generic/default.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/ks_names.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tk.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tk3d.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkButton.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkCanvas.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkColor.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkDecls.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkFileFilter.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkFont.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkInitScript.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkInt.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkIntDecls.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkIntPlatDecls.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkIntXlibDecls.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkMenu.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkMenubutton.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkPlatDecls.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkPort.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkScale.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkScrollbar.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkSelect.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkText.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/generic/tkUndo.h ${DESTDIRPREFIX:Q}/include/tk/generic + ${INSTALL_DATA} ${WRKSRC}/unix/tkUnixDefault.h ${DESTDIRPREFIX:Q}/include/tk/unix + ${INSTALL_DATA} ${WRKSRC}/unix/tkUnixInt.h ${DESTDIRPREFIX:Q}/include/tk/unix + ${INSTALL_DATA} ${WRKSRC}/unix/tkUnixPort.h ${DESTDIRPREFIX:Q}/include/tk/unix -.include "../../lang/tcl/buildlink.mk" -.include "../../mk/x11.buildlink.mk" .include "../../mk/bsd.pkg.mk"