From e6d0bba8ff70e3a4e5f98a8442a773ef199c924a Mon Sep 17 00:00:00 2001
From: Martin Wilke <miwi@FreeBSD.org>
Date: Tue, 13 Mar 2007 10:42:03 +0000
Subject: - Improved handling of WITH_TCL85_MAN - Manpages are not installed by
 default (default on for Tcl 8.4)

PR:             110257
Submitted by:   Martin Matuska <martin@matuska.org> (maintainer)
---
 lang/tcl85/Makefile                     | 24 +++++++++---------------
 lang/tcl85/files/patch-unix-Makefile.in | 13 +++++++++++--
 2 files changed, 20 insertions(+), 17 deletions(-)

(limited to 'lang/tcl85')

diff --git a/lang/tcl85/Makefile b/lang/tcl85/Makefile
index 578eaaf04ab6..0cd69fd4ee68 100644
--- a/lang/tcl85/Makefile
+++ b/lang/tcl85/Makefile
@@ -7,7 +7,7 @@
 
 PORTNAME=	tcl
 PORTVERSION=	8.5.a.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	lang
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	tcl
@@ -30,7 +30,7 @@ NOPRECIOUSMAKEVARS=	Too many _MLINKS for README.html
 PLIST_SUB=	TCL_VER=${TCL_VER} SHORT_TCL_VER=85
 EXTRACT_AFTER_ARGS=|${TAR} -xpf - --exclude compat/
 
-OPTIONS=	TCL85_MAN "Install tcl 8.5 manpages" on \
+OPTIONS=	TCL85_MAN "Install tcl 8.5 manpages" off \
 		TCLSH_WRAPPER "Require tclsh wrapper from ports" off
 
 .include <bsd.port.pre.mk>
@@ -53,7 +53,7 @@ LATEST_LINK=	tcl85${THREADS_SUFFIX}
 RUN_DEPENDS+=		tclsh:${PORTSDIR}/lang/tcl-tk-wrapper
 .endif
 
-.if defined(NO_INSTALL_MANPAGES) || defined(WITHOUT_TCL85_MAN)
+.if defined(NO_INSTALL_MANPAGES) || !defined(WITH_TCL85_MAN)
 
 PLIST_SUB+=	INSTMAN='@comment '
 
@@ -702,14 +702,6 @@ post-configure:
 	${REINPLACE_CMD} \
 		-e 's,-DNO_MEMMOVE=1,,' -e 's,-DNO_STRING_H=1,,' \
 		-e 's,^COMPAT_OBJS.*,,' ${WRKSRC}/Makefile
-.if defined(NO_INSTALL_MANPAGES) || defined(WITHOUT_TCL85_MAN)
-	${REINPLACE_CMD} -e 's|^MAN_INSTALL_DIR.*$$|MAN_INSTALL_DIR = ${WRKDIR}|' \
-		${WRKSRC}/Makefile
-. for mp in ${MAN1} ${MAN3} ${MANN}
-	@${REINPLACE_CMD} -e 's|^.so man.macros|.so ${DATADIR}/man.macros|'	\
-		${WRKSRC}/../doc/${mp}
-. endfor
-.endif
 .if ${BLACKHOLE} != '' && ${BLACKHOLE} != 0
 	# ====================================================
 	# net.inet.tcp.blackhole is non-zero. Some http-tests
@@ -720,12 +712,14 @@ post-configure:
 .endif
 
 post-install:
-.if exists(${PKGINSTALL})
-	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL}
-.endif
-.if !defined(NO_INSTALL_MANPAGES) && !defined(WITHOUT_TCL85_MAN)
+.if !defined(NO_INSTALL_MANPAGES) && defined(WITH_TCL85_MAN)
 	${MKDIR} ${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/../doc/man.macros ${DATADIR}
+. for mp in ${MAN1} ${MAN3} ${MANN}
+	@${REINPLACE_CMD} -e 's|^.so man.macros|.so ${DATADIR}/man.macros|'	\
+		${WRKSRC}/../doc/${mp}
+. endfor
+	@cd ${WRKSRC} && ${MAKE} -f Makefile install-doc ${MAKE_ENV}
 .endif
 
 regression-test:	build
diff --git a/lang/tcl85/files/patch-unix-Makefile.in b/lang/tcl85/files/patch-unix-Makefile.in
index 01f7d6881608..5722d28a780e 100644
--- a/lang/tcl85/files/patch-unix-Makefile.in
+++ b/lang/tcl85/files/patch-unix-Makefile.in
@@ -1,5 +1,5 @@
---- Makefile.in.orig	Wed Jan 17 13:10:55 2007
-+++ Makefile.in	Wed Jan 17 12:55:33 2007
+--- Makefile.in.orig	Mon Oct 23 15:41:32 2006
++++ Makefile.in	Mon Mar 12 18:28:44 2007
 @@ -57,6 +57,8 @@
  
  # Directory in which to install the include file tcl.h:
@@ -44,6 +44,15 @@
  
  ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
  	rm -f $@
+@@ -706,7 +718,7 @@
+ dltest.marker:
+ 	cd dltest ; $(MAKE)
+ 
+-INSTALL_TARGETS = install-binaries install-libraries install-doc @EXTRA_INSTALL@
++INSTALL_TARGETS = install-binaries install-libraries @EXTRA_INSTALL@
+ 
+ install: $(INSTALL_TARGETS)
+ 
 @@ -735,6 +747,13 @@
  	@echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/"
  	@@INSTALL_LIB@
-- 
cgit v1.2.3