aboutsummaryrefslogtreecommitdiff
path: root/devel/tcl-trf
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2002-02-17 16:03:11 +0000
committerMikhail Teterin <mi@FreeBSD.org>2002-02-17 16:03:11 +0000
commit8ad0c3adab3c50e57f8c41d6ac55f3c2adf0e527 (patch)
tree09c1c2b63306d31664eb0b3fa578a0d151f2c591 /devel/tcl-trf
parentf57e43a9b8f150b28e6cfddc7f40eca33e8bc181 (diff)
downloadports-8ad0c3adab3c50e57f8c41d6ac55f3c2adf0e527.tar.gz
ports-8ad0c3adab3c50e57f8c41d6ac55f3c2adf0e527.zip
Resolve a few more symbols at compile/link time, rather than at
run-time. This fixes the bz2 commands. We link against -lmd, so use <md2.h> and <md5.h>, instead of <openssl/md[25].h> (why do we even install those separately?). Bump up portrevision. Change the reference (in the comment) from -lscrypt to -lcrypt.
Notes
Notes: svn path=/head/; revision=54822
Diffstat (limited to 'devel/tcl-trf')
-rw-r--r--devel/tcl-trf/Makefile14
-rw-r--r--devel/tcl-trf/files/patch-bz2_opt16
-rw-r--r--devel/tcl-trf/files/patch-crypt2
-rw-r--r--devel/tcl-trf/files/patch-loadman46
-rw-r--r--devel/tcl-trf/files/patch-md29
-rw-r--r--devel/tcl-trf/files/patch-mkin31
-rw-r--r--devel/tcl-trf/files/patch-zlib100
7 files changed, 166 insertions, 52 deletions
diff --git a/devel/tcl-trf/Makefile b/devel/tcl-trf/Makefile
index d88c8566d552..8f211864a79b 100644
--- a/devel/tcl-trf/Makefile
+++ b/devel/tcl-trf/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Trf
PORTVERSION= 2.1p2
+PORTREVISION= 1
CATEGORIES= devel tcl83
MASTER_SITES= http://www.oche.de/~akupries/soft/trf/download/
PKGNAMEPREFIX= tcl-
@@ -32,7 +33,17 @@ CONFIGURE_ARGS= --with-tcl=${LOCALBASE}/lib/tcl${TCL_VER} \
--with-tclinclude=${LOCALBASE}/include/tcl${TCL_VER} \
--enable-static-zlib --enable-static-bzlib \
--enable-static-md5
-CONFIGURE_ENV+= CFLAGS_OPTIMIZE="${CFLAGS}"
+
+post-extract:
+ ${RM} -rf ${WRKSRC}/compat
+
+post-patch:
+ # Make direct calls to -lbz2
+ ${PERL} -pi -e 's,bz\.([^(]+),BZ2_bz\u\1,g' \
+ ${WRKSRC}/generic/bz2.c
+ # Make direct calls to -lz
+ ${PERL} -pi -e 's,zf\.([^(]+),\1,g' ${WRKSRC}/generic/adler.c \
+ ${WRKSRC}/generic/crc_zlib.c ${WRKSRC}/generic/zip.c
post-install:
${LN} -sf ${SHLIB_NAME} ${PREFIX}/lib/${SHLIB_LINK}
@@ -40,6 +51,7 @@ post-install:
${RM} -f ${WRKSRC}/doc/html/*.orig
${MKDIR} ${DOCSDIR}
${CP} -pR ${WRKSRC}/doc/html/* ${DOCSDIR}
+ ${CHMOD} -R +r ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/painless-guide-to-crc.txt ${DOCSDIR}
.endif
diff --git a/devel/tcl-trf/files/patch-bz2_opt b/devel/tcl-trf/files/patch-bz2_opt
new file mode 100644
index 000000000000..15c071d06b2a
--- /dev/null
+++ b/devel/tcl-trf/files/patch-bz2_opt
@@ -0,0 +1,16 @@
+--- generic/bz2_opt.c Sat Nov 18 17:42:31 2000
++++ generic/bz2_opt.c Fri Feb 15 14:09:36 2002
+@@ -182,13 +182,4 @@
+
+ /*
+- * 'bz2' is used, therefore load the required library.
+- * And bail out if it is not available.
+- */
+-
+- if (TCL_OK != TrfLoadBZ2lib (interp)) {
+- return TCL_ERROR;
+- }
+-
+- /*
+ * Now perform the real option check.
+ */
diff --git a/devel/tcl-trf/files/patch-crypt b/devel/tcl-trf/files/patch-crypt
index ce817a2dbd58..eaeeb2053f2d 100644
--- a/devel/tcl-trf/files/patch-crypt
+++ b/devel/tcl-trf/files/patch-crypt
@@ -3,7 +3,7 @@
@@ -112,4 +112,6 @@
*/
-+char *crypt_md5(const char *pw, const char *salt); /* Live in -lscrypt */
++char *crypt_md5(const char *pw, const char *salt); /* Lives in -lcrypt */
+
static int
TrfMd5CryptObjCmd (notUsed, interp, objc, objv)
diff --git a/devel/tcl-trf/files/patch-loadman b/devel/tcl-trf/files/patch-loadman
index 1561632dbb6d..7a396f640312 100644
--- a/devel/tcl-trf/files/patch-loadman
+++ b/devel/tcl-trf/files/patch-loadman
@@ -1,18 +1,22 @@
---- generic/loadman.h Tue Mar 27 08:08:31 2001
-+++ generic/loadman.h Fri Feb 8 11:31:51 2002
-@@ -48,8 +48,7 @@
+Use FreeBSD's native md2 and sha implementations instead of those from
+the OpenSSL library.
+
+ -mi
+
+--- generic/loadman.h Fri Feb 15 14:49:06 2002
++++ generic/loadman.h Fri Feb 15 14:50:48 2002
+@@ -48,9 +48,5 @@
#ifdef HAVE_MD2_H
-# ifdef OPENSSL_SUB
-# include <openssl/md2.h>
-# else
-# include <md2.h>
+-# endif
+# include <md2.h>
-+# ifndef MD2_DIGEST_LENGTH
-+# define MD2_DIGEST_LENGTH 16
- # endif
#else
-@@ -58,15 +57,10 @@
+ # include "../compat/md2.h"
+@@ -58,9 +54,5 @@
#ifdef HAVE_SHA_H
-# ifdef OPENSSL_SUB
@@ -23,31 +27,3 @@
+# include <sha.h>
#else
# include "../compat/sha.h"
- #endif
-
--#include "../md5-crypt/md5.h"
--
-+#include <md5.h>
-
- #ifdef TCL_STORAGE_CLASS
-@@ -87,4 +81,5 @@
- */
-
-+#if 0
- typedef struct Md2Functions {
- long loaded;
-@@ -114,7 +109,4 @@
- } sha1Functions;
-
--
--
--
- /* Global variables containing the vectors declared above. 99% of the time they
- * are read, but during load a write is required, which has to be protected by
-@@ -125,4 +117,6 @@
- EXTERN md5Functions md5f; /* THREADING: serialize initialization */
- EXTERN sha1Functions sha1f; /* THREADING: serialize initialization */
-+
-+#endif
-
-
diff --git a/devel/tcl-trf/files/patch-md2 b/devel/tcl-trf/files/patch-md2
index 9f9cad1cbe2f..e78906317be9 100644
--- a/devel/tcl-trf/files/patch-md2
+++ b/devel/tcl-trf/files/patch-md2
@@ -1,6 +1,6 @@
--- generic/md2.c Wed Aug 9 15:13:17 2000
-+++ generic/md2.c Fri Feb 8 10:43:36 2002
-@@ -30,11 +30,6 @@
++++ generic/md2.c Fri Feb 15 14:55:50 2002
+@@ -30,13 +30,8 @@
#include "loadman.h"
-/*
@@ -13,7 +13,10 @@
+#include <sys/types.h>
+#include <md2.h>
- #define DIGEST_SIZE (MD2_DIGEST_LENGTH)
+-#define DIGEST_SIZE (MD2_DIGEST_LENGTH)
++#define DIGEST_SIZE 16
+ #define CTX_TYPE MD2_CTX
+
@@ -59,9 +54,9 @@
sizeof (CTX_TYPE),
DIGEST_SIZE,
diff --git a/devel/tcl-trf/files/patch-mkin b/devel/tcl-trf/files/patch-mkin
index 8a146e7e044e..388d60c687b1 100644
--- a/devel/tcl-trf/files/patch-mkin
+++ b/devel/tcl-trf/files/patch-mkin
@@ -1,5 +1,5 @@
--- Makefile.in Tue Aug 21 01:52:21 2001
-+++ Makefile.in Fri Feb 15 01:37:36 2002
++++ Makefile.in Fri Feb 15 15:02:35 2002
@@ -34,5 +34,5 @@
#========================================================================
@@ -13,47 +13,54 @@
+ $(TRF_GENSRCDIR)/haval.1996/haval.c \
$(TRF_GENSRCDIR)/sha.c \
$(TRF_GENSRCDIR)/adler.c \
-@@ -125,5 +126,4 @@
- TRF_BASE_OBJ = @DL_OBJS@ bz2lib.$(OBJEXT) \
- zlib.$(OBJEXT) \
+@@ -123,7 +124,5 @@
+ $(TRF_COMPRESS_OBJ)
+
+-TRF_BASE_OBJ = @DL_OBJS@ bz2lib.$(OBJEXT) \
+- zlib.$(OBJEXT) \
- loadman.$(OBJEXT) \
++TRF_BASE_OBJ = @DL_OBJS@ \
init.$(OBJEXT) \
registry.$(OBJEXT) \
-@@ -157,4 +157,5 @@
+@@ -157,4 +156,5 @@
md5dig.$(OBJEXT) \
haval.$(OBJEXT) \
+ haval-1996.$(OBJEXT) \
sha.$(OBJEXT) \
adler.$(OBJEXT) \
-@@ -191,5 +192,5 @@
+@@ -191,5 +191,5 @@
#========================================================================
-Trf_LIB_FILE = @Trf_LIB_FILE@
+Trf_LIB_FILE = libTrf2.so.1
$(Trf_LIB_FILE)_OBJECTS = $(Trf_OBJECTS)
-@@ -301,5 +302,5 @@
+@@ -301,8 +301,8 @@
SHLIB_LD = @SHLIB_LD@
SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
-+SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -lmd
++SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ -lmd -lbz2 -lz
STLIB_LD = @STLIB_LD@
TCL_BIN_DIR = @TCL_BIN_DIR@
-@@ -346,5 +347,5 @@
+-TCL_DEFS = @TCL_DEFS@
++TCL_DEFS = @TCL_DEFS@ -DHAVE_BZLIB_H
+ TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
+ TCL_LD_FLAGS = @TCL_LD_FLAGS@
+@@ -346,5 +346,5 @@
LIBS = @LIBS@
AR = ar
-CFLAGS = @CFLAGS@
+CFLAGS += @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-@@ -431,5 +432,5 @@
+@@ -431,5 +431,5 @@
check: test
-test:
+test: $(Trf_LIB_FILE)
LD_LIBRARY_PATH="$(srcdir):../tea/:$(ZLIB_LIB_DIR):$(SSL_LIB_DIR)"; \
export LD_LIBRARY_PATH; \
-@@ -612,4 +613,7 @@
+@@ -612,4 +612,7 @@
$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/haval.c` -o $@
+haval-1996.o: $(TRF_GENSRCDIR)/haval.1996/haval.c
@@ -61,7 +68,7 @@
+
sha.$(OBJEXT): $(TRF_GENSRCDIR)/sha.c
$(COMPILE) -c `@CYGPATH@ $(TRF_GENSRCDIR)/sha.c` -o $@
-@@ -755,5 +759,5 @@
+@@ -755,5 +758,5 @@
done
if test "x$(MAKE_LIB)" = "x$(MAKE_SHARED_LIB)"; then \
- $(TCLSH_PROG) mkIndex.tcl $(lib_BINARIES); \
diff --git a/devel/tcl-trf/files/patch-zlib b/devel/tcl-trf/files/patch-zlib
new file mode 100644
index 000000000000..b0ccb07efdca
--- /dev/null
+++ b/devel/tcl-trf/files/patch-zlib
@@ -0,0 +1,100 @@
+--- generic/adler.c Wed Aug 9 15:13:17 2000
++++ generic/adler.c Fri Feb 15 15:09:44 2002
+@@ -63,5 +63,5 @@
+ MDAdler_UpdateBuf,
+ MDAdler_Final,
+- MDAdler_Check
++ NULL
+ };
+
+@@ -222,36 +222,2 @@
+ out [3] = (char) ((adler >> 0) & 0xff);
+ }
+-
+-/*
+- *------------------------------------------------------*
+- *
+- * MDAdler_Check --
+- *
+- * ------------------------------------------------*
+- * Check for existence of libz, load it.
+- * ------------------------------------------------*
+- *
+- * Sideeffects:
+- * As of the called procedure.
+- *
+- * Result:
+- * None.
+- *
+- *------------------------------------------------------*
+- */
+-
+-static int
+-MDAdler_Check (interp)
+-Tcl_Interp* interp;
+-{
+- int res;
+-
+- START (MDAdler_Check);
+-
+- res = TrfLoadZlib (interp);
+-
+- PRINT ("res = %d\n", res);
+- DONE (MDAdler_Check);
+- return res;
+-}
+-
+--- generic/crc_zlib.c Wed Aug 9 15:13:17 2000
++++ generic/crc_zlib.c Fri Feb 15 15:11:49 2002
+@@ -63,5 +63,5 @@
+ MDcrcz_UpdateBuf,
+ MDcrcz_Final,
+- MDcrcz_Check
++ NULL
+ };
+
+@@ -217,28 +217,2 @@
+ out [0] = (char) ((crc >> 0) & 0xff);
+ }
+-
+-/*
+- *------------------------------------------------------*
+- *
+- * MDcrcz_Check --
+- *
+- * ------------------------------------------------*
+- * Check for existence of libz, load it.
+- * ------------------------------------------------*
+- *
+- * Sideeffects:
+- * As of the called procedure.
+- *
+- * Result:
+- * None.
+- *
+- *------------------------------------------------------*
+- */
+-
+-static int
+-MDcrcz_Check (interp)
+-Tcl_Interp* interp;
+-{
+- return TrfLoadZlib (interp);
+-}
+-
+--- generic/zip_opt.c Sat Nov 18 17:42:32 2000
++++ generic/zip_opt.c Fri Feb 15 15:13:22 2002
+@@ -183,13 +183,4 @@
+
+ /*
+- * 'zip' is used, therefore load the required library.
+- * And bail out if it is not available.
+- */
+-
+- if (TCL_OK != TrfLoadZlib (interp)) {
+- return TCL_ERROR;
+- }
+-
+- /*
+ * Now perform the real option check.
+ */