lang/tcl87: simplify Makefile and patches, remove obsolete OPTIONs, bump

This commit is contained in:
Pietro Cerutti 2018-03-09 15:40:14 +00:00
parent 8c43cc957a
commit 8bdf5bdb35
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=463967
4 changed files with 81 additions and 132 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= tcl
DISTVERSION= 8.7a1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang
MASTER_SITES= SF/tcl/Tcl/${DISTVERSION} \
TCLTK/tcl8_7
@ -18,15 +18,15 @@ LICENSE_NAME= Tcl/Tk License
LICENSE_FILE= ${WRKSRC}/../license.terms
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
OPTIONS_DEFINE= TCLMAN TZDATA MODULES THREADS DEBUG
OPTIONS_DEFINE= TCLMAN TZDATA DEBUG
OPTIONS_DEFINE_amd64= DTRACE
OPTIONS_DEFAULT=MODULES THREADS
OPTIONS_DEFAULT_amd64= DTRACE
TCLMAN_DESC= Install Tcl function manpages
TZDATA_DESC= Install Tcl timezone data
MODULES_DESC= Install Tcl common modules
OPTIONS_SUB= yes
USES= pathfix
.if !exists(/usr/sbin/dtrace)
OPTIONS_EXCLUDE+= DTRACE
.endif
@ -36,7 +36,7 @@ OPTIONS_EXCLUDE_FreeBSD_10= DTRACE
PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}${DISTVERSION}
WRKSRC= ${PATCH_WRKSRC}/unix
ALL_TARGET= all
ALL_TARGET= binaries libraries doc
INSTALL_TARGET= install-strip
TEST_TARGET= test-tcl
@ -46,21 +46,18 @@ CONFIGURE_ARGS= --enable-shared \
--enable-man-suffix=.${MAN_SUFFIX} \
--includedir=${PREFIX}/include/tcl${TCL_VER} \
--enable-symbols
CONFIGURE_ENV= PORTSDIR=${PORTSDIR}
TCL_VER= ${PORTVERSION:R}
MAN_SUFFIX= ${PKGBASE}
MAKE_ENV= SHORT_TCL_VER=${PKGNAMESUFFIX} \
MAN_SUFFIX=.${MAN_SUFFIX}
MAN_SUFFIX=.${MAN_SUFFIX} \
PLIST_SUB= TCL_VER=${TCL_VER} \
PKGNAMESUFFIX=${PKGNAMESUFFIX}
TCLMAN_INSTALL_TARGET= install-doc
TZDATA_INSTALL_TARGET= install-tzdata
MODULES_INSTALL_TARGET= install-modules
THREADS_CONFIGURE_ENABLE= threads
DEBUG_CONFIGURE_ENABLE= symbols
DTRACE_CONFIGURE_ENABLE= dtrace

View file

@ -1,114 +0,0 @@
--- unix/Makefile.in.orig 2017-04-20 14:47:01 UTC
+++ unix/Makefile.in
@@ -80,10 +80,10 @@ HTML_DIR = @HTML_DIR@
HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR)
# Directory in which to install the configuration file tclConfig.sh
-CONFIG_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
+CONFIG_INSTALL_DIR = $(SCRIPT_INSTALL_DIR)
# Directory in which to install bundled packages:
-PACKAGE_DIR = @PACKAGE_DIR@
+PACKAGE_DIR = $(SCRIPT_INSTALL_DIR)
# Package search path.
TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
@@ -613,7 +613,7 @@ SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $
# Start of rules
#--------------------------------------------------------------------------
-all: binaries libraries doc packages
+all: binaries libraries doc
binaries: ${LIB_FILE} ${TCL_EXE}
@@ -774,8 +774,8 @@ INSTALL_DOC_TARGETS = install-doc
INSTALL_PACKAGE_TARGETS = install-packages
INSTALL_DEV_TARGETS = install-headers
INSTALL_EXTRA_TARGETS = @EXTRA_INSTALL@
-INSTALL_TARGETS = $(INSTALL_BASE_TARGETS) $(INSTALL_DOC_TARGETS) $(INSTALL_DEV_TARGETS) \
- $(INSTALL_PACKAGE_TARGETS) $(INSTALL_EXTRA_TARGETS)
+INSTALL_TARGETS = $(INSTALL_BASE_TARGETS) $(INSTALL_DEV_TARGETS) \
+ $(INSTALL_EXTRA_TARGETS)
install: $(INSTALL_TARGETS)
@@ -809,12 +809,17 @@ install-binaries: binaries
@INSTALL_STUB_LIB@ ; \
fi
@EXTRA_INSTALL_BINARIES@
- @echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/"
- @$(INSTALL_DATA_DIR) $(LIB_INSTALL_DIR)/pkgconfig
- @$(INSTALL_DATA) tcl.pc $(LIB_INSTALL_DIR)/pkgconfig/tcl.pc
+ @echo "Installing pkg-config file to $(prefix)/libdata/pkgconfig"
+ @$(INSTALL_DATA_DIR) $(INSTALL_ROOT)$(prefix)/libdata/pkgconfig
+ @$(INSTALL_DATA) tcl.pc $(INSTALL_ROOT)$(prefix)/libdata/pkgconfig/tcl${SHORT_TCL_VER}.pc
+ @for i in $(TOP_DIR)/library/*.tcl $(TOP_DIR)/library/tclIndex \
+ $(UNIX_DIR)/tclAppInit.c @LDAIX_SRC@ @DTRACE_SRC@; \
+ do \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \
+ done;
install-libraries: libraries
- @for i in "$(SCRIPT_INSTALL_DIR)"; \
+ @for i in "$(SCRIPT_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)"/encoding; \
do \
if [ ! -d "$$i" ] ; then \
echo "Making directory $$i"; \
@@ -822,7 +827,13 @@ install-libraries: libraries
else true; \
fi; \
done;
- @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6; \
+ @echo "Installing encoding files to $(SCRIPT_INSTALL_DIR)/encoding";
+ @for i in $(TOP_DIR)/library/encoding/*.enc ; do \
+ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/encoding; \
+ done;
+
+install-modules: libraries
+ @for i in opt0.4 http1.0 platform; \
do \
if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
@@ -842,31 +853,31 @@ install-libraries: libraries
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \
done;
@echo "Installing package http 2.8.12 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.12.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/http-2.8.12.tm;
@echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/";
@for i in $(TOP_DIR)/library/opt/*.tcl ; \
do \
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \
done;
@echo "Installing package msgcat 1.6.1 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.6.1.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/msgcat-1.6.1.tm;
@echo "Installing package tcltest 2.4.0 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.4.0.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/tcltest-2.4.0.tm;
@echo "Installing package platform 1.0.14 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.14.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/platform-1.0.14.tm;
@echo "Installing package platform::shell 1.1.4 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/platform/shell-1.1.4.tm;
@echo "Installing encoding files to $(SCRIPT_INSTALL_DIR)/encoding/";
@for i in $(TOP_DIR)/library/encoding/*.enc ; do \
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/encoding; \
done;
- @if [ -n "$(TCL_MODULE_PATH)" -a -f $(TOP_DIR)/library/tm.tcl ]; then \
- echo "Customizing tcl module path"; \
- echo "if {![interp issafe]} { ::tcl::tm::roots {$(TCL_MODULE_PATH)} }" >> \
- "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \
- fi
+ @echo "Customizing tcl module path"; \
+ echo "if {![interp issafe]} { ::tcl::tm::roots {$(TCL_MODULE_PATH)} }" >> \
+ "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \
+ echo "::tcl::tm::path add {$(TCL_LIBRARY)}" >> \
+ "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \
install-tzdata:
@for i in tzdata; \

View file

@ -0,0 +1,66 @@
--- unix/Makefile.in.orig 2017-09-07 12:54:11 UTC
+++ unix/Makefile.in
@@ -80,7 +80,7 @@ HTML_DIR = @HTML_DIR@
HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR)
# Directory in which to install the configuration file tclConfig.sh
-CONFIG_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
+CONFIG_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY)
# Directory in which to install bundled packages:
PACKAGE_DIR = @PACKAGE_DIR@
@@ -813,7 +813,7 @@ install-binaries: binaries
@EXTRA_INSTALL_BINARIES@
@echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/"
@$(INSTALL_DATA_DIR) $(LIB_INSTALL_DIR)/pkgconfig
- @$(INSTALL_DATA) tcl.pc $(LIB_INSTALL_DIR)/pkgconfig/tcl.pc
+ @$(INSTALL_DATA) tcl.pc $(LIB_INSTALL_DIR)/pkgconfig/tcl${SHORT_TCL_VER}.pc
install-libraries: libraries
@for i in "$(SCRIPT_INSTALL_DIR)"; \
@@ -824,7 +824,7 @@ install-libraries: libraries
else true; \
fi; \
done;
- @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6; \
+ @for i in opt0.4 http1.0 encoding platform; \
do \
if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
@@ -844,21 +844,21 @@ install-libraries: libraries
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \
done;
@echo "Installing package http 2.8.12 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.12.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/http-2.8.12.tm;
@echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/";
@for i in $(TOP_DIR)/library/opt/*.tcl ; \
do \
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \
done;
@echo "Installing package msgcat 1.6.1 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.6.1.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/msgcat-1.6.1.tm;
@echo "Installing package tcltest 2.4.0 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.4.0.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/tcltest-2.4.0.tm;
@echo "Installing package platform 1.0.14 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.14.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/platform-1.0.14.tm;
@echo "Installing package platform::shell 1.1.4 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm;
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/platform/shell-1.1.4.tm;
@echo "Installing encoding files to $(SCRIPT_INSTALL_DIR)/encoding/";
@for i in $(TOP_DIR)/library/encoding/*.enc ; do \
@@ -869,6 +869,9 @@ install-libraries: libraries
echo "if {![interp issafe]} { ::tcl::tm::roots {$(TCL_MODULE_PATH)} }" >> \
"$(SCRIPT_INSTALL_DIR)"/tm.tcl; \
fi
+ echo "::tcl::tm::path add {$(TCL_LIBRARY)}" >> \
+ "$(SCRIPT_INSTALL_DIR)"/tm.tcl;
+
install-tzdata:
@for i in tzdata; \

View file

@ -11,15 +11,15 @@ include/tcl%%TCL_VER%%/tclOODecls.h
include/tcl%%TCL_VER%%/tclPlatDecls.h
include/tcl%%TCL_VER%%/tclTomMath.h
include/tcl%%TCL_VER%%/tclTomMathDecls.h
%%MODULES%%lib/tcl%%TCL_VER%%/http-2.8.12.tm
%%MODULES%%lib/tcl%%TCL_VER%%/http1.0/http.tcl
%%MODULES%%lib/tcl%%TCL_VER%%/http1.0/pkgIndex.tcl
%%MODULES%%lib/tcl%%TCL_VER%%/msgcat-1.6.1.tm
%%MODULES%%lib/tcl%%TCL_VER%%/opt0.4/optparse.tcl
%%MODULES%%lib/tcl%%TCL_VER%%/opt0.4/pkgIndex.tcl
%%MODULES%%lib/tcl%%TCL_VER%%/platform-1.0.14.tm
%%MODULES%%lib/tcl%%TCL_VER%%/platform/shell-1.1.4.tm
%%MODULES%%lib/tcl%%TCL_VER%%/tcltest-2.4.0.tm
lib/tcl%%TCL_VER%%/http-2.8.12.tm
lib/tcl%%TCL_VER%%/http1.0/http.tcl
lib/tcl%%TCL_VER%%/http1.0/pkgIndex.tcl
lib/tcl%%TCL_VER%%/msgcat-1.6.1.tm
lib/tcl%%TCL_VER%%/opt0.4/optparse.tcl
lib/tcl%%TCL_VER%%/opt0.4/pkgIndex.tcl
lib/tcl%%TCL_VER%%/platform-1.0.14.tm
lib/tcl%%TCL_VER%%/platform/shell-1.1.4.tm
lib/tcl%%TCL_VER%%/tcltest-2.4.0.tm
lib/tcl%%TCL_VER%%/auto.tcl
lib/tcl%%TCL_VER%%/clock.tcl
lib/tcl%%TCL_VER%%/encoding/ascii.enc