aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/tk80
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-13 10:31:50 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-13 10:31:50 +0000
commit5bd95f77f5310d06d509ad4470f28ffc72752571 (patch)
treed14a7ce48993362516818c1b5da137c4c7487a93 /x11-toolkits/tk80
parenta23ccae9a44d5d52bd339b89503397e11f485a93 (diff)
- 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 - Pass maintainership to submitter - Bump PORTREVISION PR: 110234 Submitted by: Martin Matuska <martin@matuska.org>
Notes
Notes: svn path=/head/; revision=187282
Diffstat (limited to 'x11-toolkits/tk80')
-rw-r--r--x11-toolkits/tk80/Makefile31
-rw-r--r--x11-toolkits/tk80/files/patch-ab57
-rw-r--r--x11-toolkits/tk80/pkg-deinstall.wish22
-rw-r--r--x11-toolkits/tk80/pkg-install.wish32
4 files changed, 63 insertions, 79 deletions
diff --git a/x11-toolkits/tk80/Makefile b/x11-toolkits/tk80/Makefile
index 2d6131ea06e6..a55116f2f539 100644
--- a/x11-toolkits/tk80/Makefile
+++ b/x11-toolkits/tk80/Makefile
@@ -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@FreeBSD.org
+MAINTAINER= martin@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-patch:
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 --git a/x11-toolkits/tk80/files/patch-ab b/x11-toolkits/tk80/files/patch-ab
index 2edc6fc428db..4302bcb52851 100644
--- a/x11-toolkits/tk80/files/patch-ab
+++ b/x11-toolkits/tk80/files/patch-ab
@@ -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 --git a/x11-toolkits/tk80/pkg-deinstall.wish b/x11-toolkits/tk80/pkg-deinstall.wish
deleted file mode 100644
index 20ca9e8436c4..000000000000
--- a/x11-toolkits/tk80/pkg-deinstall.wish
+++ /dev/null
@@ -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$
-#
-
-#
-# 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 --git a/x11-toolkits/tk80/pkg-install.wish b/x11-toolkits/tk80/pkg-install.wish
deleted file mode 100644
index d526f076a498..000000000000
--- a/x11-toolkits/tk80/pkg-install.wish
+++ /dev/null
@@ -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