ports/110234: [UPDATE] x11-toolkits/tk80

Martin Matuska martin at matuska.org
Mon Mar 12 16:30:06 UTC 2007


>Number:         110234
>Category:       ports
>Synopsis:       [UPDATE] x11-toolkits/tk80
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 12 16:30:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 6.2-RELEASE
>Organization:
>Environment:
FreeBSD 6.2-RELEASE i386 and amd64
>Description:
This update changes the following:
- adds TK80_MAN and WISH_WRAPPER to OPTIONS
- removes pseudo-installation of wish in favour of new lang/tcl-tk-wrapper port
- adds support for NO_INSTALL_MANPAGES knob
- uses USE_TCL from bsd.tcl.mk

Portlint -A and tinderbox do not complain.

I would like to take maintainership over this port.
>How-To-Repeat:
>Fix:
diff -Nbur x11-toolkits/tk80.orig/Makefile x11-toolkits/tk80/Makefile
--- x11-toolkits/tk80.orig/Makefile	Tue Jan 30 11:25:33 2007
+++ x11-toolkits/tk80/Makefile	Mon Mar 12 17:12:15 2007
@@ -7,36 +7,42 @@
 
 PORTNAME=	tk
 PORTVERSION=	8.0.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11-toolkits tk80
 MASTER_SITES=	${MASTER_SITE_TCLTK}
 MASTER_SITE_SUBDIR=	tcl8_0
 DISTNAME=	${PORTNAME}${PORTVERSION}
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	martin at matuska.org
 COMMENT=	Graphical toolkit for TCL
 
-LIB_DEPENDS=	tcl80.1:${PORTSDIR}/lang/tcl80
+USE_TCL=	80
+USE_TCL_BUILD=	80
 
 NO_LATEST_LINK=	yes
 USE_XLIB=	yes
 USE_LDCONFIG=	yes
-WRKSRC=		${WRKDIR}/tk8.0.5/unix
+WRKSRC=		${WRKDIR}/${PORTNAME}${PORTVERSION}/unix
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-shared
 CONFIGURE_ENV=	PORTSDIR=${PORTSDIR} TK_LIB_FILE=${TK_LIB_FILE}
 TK_LIB_FILE=	${TK_LIB}.${SHLIB_MAJOR}
-PKGINSTALL=	${PKGDIR}/pkg-install.wish
-PKGDEINSTALL=	${PKGDIR}/pkg-deinstall.wish
 
 SHLIB_MAJOR=	1
 SHLIB_MINOR=	4
 MAKEFILE=	makefile
 TK_LIB=		libtk80.so
 
+OPTIONS=	TK80_MAN "Install tk 8.0 manpages" off \
+		WISH_WRAPPER "Require wish wrapper from ports" off
+
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_TK80_MAN)
+.if defined(WITH_WISH_WRAPPER)
+RUN_DEPENDS+=		wish:${PORTSDIR}/lang/tcl-tk-wrapper
+.endif
+
+.if !defined(NO_INSTALL_MANPAGES) && defined(WITH_TK80_MAN)
 
 MAN1=	wish.1
 MAN3=	3DBorder.3 BindTable.3 CanvPsY.3 CanvTkwin.3 CanvTxtInfo.3 \
@@ -285,19 +291,16 @@
 post-configure:
 	@${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}
 	@${CP} ${FILESDIR}/makefile     ${WRKSRC}
-.if !defined(WITH_TK80_MAN)
-	${REINPLACE_CMD} -e 's|^MAN_INSTALL_DIR.*$$|MAN_INSTALL_DIR = ${WRKDIR}|' \
-		${WRKSRC}/Makefile
-.endif
 
 pre-build:
 	@cd ${WRKSRC} && ${MAKE} -f Makefile.lib PREFIX=${PREFIX} \
-	    SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR}
+	    SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} \
+	    X11BASE="${X11BASE}"
 
 post-install:
 	${LN} -sf ${TK_LIB_FILE} ${PREFIX}/lib/${TK_LIB}
-.if exists(${PKGINSTALL})
-	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL}
+.if !defined(NO_INSTALL_MANPAGES) && defined(WITH_TK80_MAN)
+	@cd ${WRKSRC} && ${MAKE} -f Makefile install-man
 .endif
 
 test:
diff -Nbur x11-toolkits/tk80.orig/files/patch-ab x11-toolkits/tk80/files/patch-ab
--- x11-toolkits/tk80.orig/files/patch-ab	Mon Aug 23 21:59:09 2004
+++ x11-toolkits/tk80/files/patch-ab	Mon Mar 12 16:56:10 2007
@@ -1,23 +1,37 @@
---- Makefile.in.orig	Mon Mar  8 22:53:50 1999
-+++ Makefile.in	Mon Aug 23 12:50:30 2004
-@@ -58,3 +58,5 @@
+--- Makefile.in.orig	Tue Mar  9 07:53:50 1999
++++ Makefile.in	Mon Mar 12 16:55:45 2007
+@@ -56,7 +56,9 @@
+ BIN_DIR =		$(exec_prefix)/bin
+ 
  # Directory in which to install the include file tk.h:
 -INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include
 +INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include/tk$(VERSION)
 +GENERIC_INCLUDE_INSTALL_DIR = $(INCLUDE_INSTALL_DIR)/generic
 +UNIX_INCLUDE_INSTALL_DIR = $(INCLUDE_INSTALL_DIR)/unix
  
-@@ -114,3 +116,3 @@
+ # Top-level directory for manual entries:
+ MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/man
+@@ -112,7 +114,7 @@
+ 
+ # Libraries to use when linking.  This definition is determined by the
  # configure script.
 -LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
 +LIBS = -L${PREFIX}/lib -ltcl80 @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
  
-@@ -150,3 +152,3 @@
+ # To turn off the security checks that disallow incoming sends when
+ # the X server appears to be insecure, reverse the comments on the
+@@ -148,7 +150,7 @@
+ # "install" around;  better to use the install-sh script that comes
+ # with the distribution, which is slower but guaranteed to work.
  
 -INSTALL = @srcdir@/install-sh -c
 +INSTALL = install -c
  INSTALL_PROGRAM =	${INSTALL}
-@@ -313,2 +315,7 @@
+ INSTALL_DATA =		${INSTALL} -m 644
+ 
+@@ -311,6 +313,11 @@
+ 	@MAKE_LIB@
+ 	$(RANLIB) ${TK_LIB_FILE}
  
 +libtk80.a: ${OBJS}
 +	rm -f libtk80.a
@@ -25,29 +39,48 @@
 +	ranlib libtk80.a
 +
  # Make target which outputs the list of the .o contained in the Tk lib
-@@ -367,3 +374,3 @@
+ # usefull to build a single big shared library containing Tcl/Tk and other
+ # extensions.  used for the Tcl Plugin.  -- dl
+@@ -359,13 +366,13 @@
+ 	TK_LIBRARY=$(TOP_DIR)/library; export TK_LIBRARY; \
+ 	./tktest
+ 
+-install: install-binaries install-libraries install-demos install-man
++install: install-binaries install-libraries install-demos
+ 
+ # Note: before running ranlib below, must cd to target directory because
+ # some ranlibs write to current directory, and this might not always be
+ # possible (e.g. if installing as root).
  
 -install-binaries: $(TK_LIB_FILE) wish
 +install-binaries: $(TK_LIB_FILE) libtk80.a wish
  	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
-@@ -381,2 +388,6 @@
+ 	    do \
+ 	    if [ ! -d $$i ] ; then \
+@@ -379,13 +386,19 @@
+ 	@$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
+ 	@(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
  	@chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
 +	@echo "Installing libtk80.a"
 +	@$(INSTALL_DATA) libtk80.a $(LIB_INSTALL_DIR)/libtk80.a
 +	@(cd $(LIB_INSTALL_DIR); $(RANLIB) libtk80.a)
 +	@chmod 555 $(LIB_INSTALL_DIR)/libtk80.a
  	@echo "Installing wish"
-@@ -384,3 +395,4 @@
+ 	@$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
  	@echo "Installing tkConfig.sh"
 -	@$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
 +	@mkdir -p $(LIB_INSTALL_DIR)/tk$(VERSION)
 +	@$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tk$(VERSION)/tkConfig.sh
  
-@@ -388,2 +400,3 @@
+ install-libraries:
  	@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
 +		$(GENERIC_INCLUDE_INSTALL_DIR) $(UNIX_INCLUDE_INSTALL_DIR) \
  		$(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images; \
-@@ -397,4 +410,14 @@
+ 	    do \
+ 	    if [ ! -d $$i ] ; then \
+@@ -395,8 +408,18 @@
+ 		else true; \
+ 		fi; \
  	    done;
 -	@echo "Installing tk.h"
 -	@$(INSTALL_DATA) $(GENERIC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h
@@ -64,3 +97,5 @@
 +	    done;
 +	@ln -sf $(GENERIC_INCLUDE_INSTALL_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h
  	for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(UNIX_DIR)/tkAppInit.c; \
+ 	    do \
+ 	    echo "Installing $$i"; \
diff -Nbur x11-toolkits/tk80.orig/pkg-deinstall.wish x11-toolkits/tk80/pkg-deinstall.wish
--- x11-toolkits/tk80.orig/pkg-deinstall.wish	Fri Jun  2 09:15:23 2000
+++ x11-toolkits/tk80/pkg-deinstall.wish	Thu Jan  1 01:00:00 1970
@@ -1,22 +0,0 @@
-#! /bin/sh
-#
-# Remove the ${PREFIX}/bin/wish script that gets installed by INSTALL.wish
-# if we are the last wish installation to be pkg_delete'd.
-#
-# $FreeBSD: ports/x11-toolkits/tk80/pkg-deinstall.wish,v 1.1 2000/06/02 07:15:23 hoek Exp $
-#
-
-#
-# Explicitly listing /usr/X11R6/bin here is debatable.
-#
-BINDIR="${PKG_PREFIX}/bin /usr/X11R6/bin"
-WISH=${PKG_PREFIX}/bin/wish
-
-wishes=$(/bin/ls ${BINDIR} 2> /dev/null | \
-    egrep '^o?wish(step)?(x|([0-9]+\.[0-9]+))([a-z][a-z])?$')
-
-if [ "$wishes" = "" -a -f ${WISH} ] && \
-    (head -3 ${WISH} | grep awieYJFnsuILOnfsYEW) > /dev/null 2>&1
-then
-	rm -f ${PKG_PREFIX}/bin/wish
-fi
diff -Nbur x11-toolkits/tk80.orig/pkg-install.wish x11-toolkits/tk80/pkg-install.wish
--- x11-toolkits/tk80.orig/pkg-install.wish	Wed May 26 02:34:26 1999
+++ x11-toolkits/tk80/pkg-install.wish	Thu Jan  1 01:00:00 1970
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-# The user may have a wish they want to preserve
-ver=`grep -a awieYJFnsuILOnfsYEW ${PKG_PREFIX}/bin/wish 2> /dev/null \
-    | sed -e 's/.*\*\*//'`
-if [ ! -e ${PKG_PREFIX}/bin/wish ] || [ "$ver" != "" -a "$ver" -lt 001 ]
-then
-	[ -f ${PKG_PREFIX}/bin/wish ] && chmod u+w ${PKG_PREFIX}/bin/wish
-
-	mkdir -p ${PKG_PREFIX}/bin
-	cat > ${PKG_PREFIX}/bin/wish <<'EOF'
-#!/bin/sh
-# Installed by ports system.  id: awieYJFnsuILOnfsYEW**001
- 
-(
-echo "In FreeBSD, wish is named with a version number.  This is because"
-echo "different versions of wish are not compatible with each other and"
-echo "they can not all be called \"wish\"!  You may need multiple versions"
-echo "installed because a given port may depend on a specific version."
-echo
-echo "On your system, wish is installed under at least the following names:"
-echo
-for name in $(/bin/ls $(echo $PATH | sed 's/:/ /g') 2> /dev/null | egrep '^wish(step)?(x|([0-9]+\.[0-9]+))([a-z][a-z])?$')
-do
-	echo $name
-done
-[ "$name" = "" ] && echo "No wish installations found, sorry."
-) 1>&2
-exit 1
-EOF
-	chmod a+rx ${PKG_PREFIX}/bin/wish
-fi
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list