From owner-freebsd-ports Tue Aug 24 23:30:16 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B5F9915227 for ; Tue, 24 Aug 1999 23:30:11 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id XAA00999; Tue, 24 Aug 1999 23:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id 3EE791589C; Tue, 24 Aug 1999 23:25:28 -0700 (PDT) (envelope-from mi@aldan.algebra.com) Received: from guest.newton (guest.newton [10.10.0.3]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id CAA11865; Wed, 25 Aug 1999 02:22:59 -0400 (EDT) Received: (from mi@localhost) by guest.newton (8.9.3/8.9.1) id CAA05936; Wed, 25 Aug 1999 02:21:59 -0400 (EDT) Message-Id: <199908250621.CAA05936@guest.newton> Date: Wed, 25 Aug 1999 02:21:59 -0400 (EDT) From: Mikhail Teterin Reply-To: mi@aldan.algebra.com To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: ache@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/13370: elm-port upgraded, improved Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 13370 >Category: ports >Synopsis: elm-port upgraded, improved >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 24 23:30:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Mikhail Teterin >Release: FreeBSD 3.2-STABLE i386 >Organization: Virtual Estates, Inc. >Environment: >Description: The current version of the port is very old -- it is ...54. Version ..60 was released at the end of May. The current version would not build on my 2.2.8 system, which does not have inttypes.h. This port addresses those two things, and hack elm to force it to use share-library. All of the elm's utilities (answer, readmsg, newalias, etc.) and the elm itself link with static libutil.a. This port makes and installs the shared version libelmutil.so* and makes all of the executables link with it instead. This alone reduced the size of the (gzipped) package, for example from 370Kb to 261Kb. The virtual memory usage will also be smaller at runtime, when, say, readmsg is invoked from inside the elm-spawned editor. >How-To-Repeat: >Fix: diff -P -r -U1 elm54/Makefile elm/Makefile --- elm54/Makefile Sun Aug 22 19:32:58 1999 +++ elm/Makefile Wed Aug 25 01:42:15 1999 @@ -6,6 +6,6 @@ # -# $Id: Makefile,v 1.53 1999/08/22 23:32:58 mharo Exp $ +# $Id: Makefile,v 1.52 1999/04/07 18:28:33 ache Exp $ # -DISTNAME= elm-2.4ME+54 +DISTNAME= elm-2.4ME+60 CATEGORIES= mail @@ -17,3 +17,3 @@ -WRKSRC= ${WRKDIR}/elm2.4.ME+.54 +WRKSRC= ${WRKDIR}/elm2.4.ME+.60 MAN1= answer.1 checkalias.1 elm.1 elmalias.1 fastmail.1 \ @@ -28,7 +28,11 @@ + +PLIST_SUB+= LIBELMUTIL="${LIBELMUTIL}" + post-configure: ${CP} ${FILESDIR}/elm.mimecharsets ${WRKSRC}/bin + ${CP} ${FILESDIR}/Makefile.bsd ${WRKSRC}/lib post-install: - perl -pi -e 's,/usr/local,${PREFIX},' ${WRKSRC}/nls/LANGS + ${PERL} -pi -e 's,/usr/local,${PREFIX},' ${WRKSRC}/nls/LANGS cd ${WRKSRC}/nls; ${MAKE} install @@ -43 +47,3 @@ .include + +LIBELMUTIL!= ${MAKE} -f ${FILESDIR}/Makefile.bsd JUST_WONDERING=Y printname diff -P -r -U1 elm54/files/Makefile.bsd elm/files/Makefile.bsd --- elm54/files/Makefile.bsd Wed Dec 31 19:00:00 1969 +++ elm/files/Makefile.bsd Wed Aug 25 02:00:10 1999 @@ -0,0 +1,26 @@ + +SRCS= ${LIB_SRC} +LIB= elmutil +SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 +INTERNALLIB= True + +all: ${SHLIB_NAME} + +install: ${SHLIB_NAME} + ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALLFLAGS} ${SHLINSTALLFLAGS} ${SHLIB_NAME} \ + ${PREFIX}/lib + +printname: + @echo ${SHLIB_NAME} + +.if !defined(JUST_WONDERING) +.include "Makefile" +.endif + +.include + +# The 3.*'s bsd.lib.mk defines SHLIB_NAME. If it's not defined -- we are +# on an old, aout system: +SHLIB_NAME?=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} diff -P -r -U1 elm54/files/md5 elm/files/md5 --- elm54/files/md5 Wed Apr 7 14:28:38 1999 +++ elm/files/md5 Wed Aug 25 01:42:17 1999 @@ -1 +1 @@ -MD5 (elm-2.4ME+54.tar.gz) = 189b1bd3ed6f1c8c0e8a116a201ab49e +MD5 (elm-2.4ME+60.tar.gz) = 4bf2f6711327d8f3f69305f0aad1544f diff -P -r -U1 elm54/patches/patch-ad elm/patches/patch-ad --- elm54/patches/patch-ad Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-ad Wed Aug 25 01:53:23 1999 @@ -0,0 +1,9 @@ +--- src/Makefile.SH.orig Wed May 26 06:29:50 1999 ++++ src/Makefile.SH Tue Aug 24 22:19:54 1999 +@@ -336,4 +336,4 @@ + # Dependencies and rules for compiling C programs +-$(BIN)/elm: $& $(ELM_OBJ) ../melib/libme.a ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(ELM_OBJ) ../melib/libme.a ../lib/libutil.a $(LIBS) $(LIB2) ++$(BIN)/elm: $& $(ELM_OBJ) ../melib/libme.a ++ $(CC) $(LFLAGS) -o $@ $(ELM_OBJ) ../melib/libme.a -L../lib -lelmutil $(LIBS) $(LIB2) + diff -P -r -U1 elm54/patches/patch-ae elm/patches/patch-ae --- elm54/patches/patch-ae Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-ae Wed Aug 25 01:55:08 1999 @@ -0,0 +1,63 @@ +--- utils/Makefile.SH.orig Wed May 26 06:29:51 1999 ++++ utils/Makefile.SH Tue Aug 24 22:22:38 1999 +@@ -211,3 +211,3 @@ + .PRECIOUS: $(INCLDIR)/defs.h $(INCLDIR)/elm.h \ +- $(INCLDIR)/headers.h ../lib/libutil.a ++ $(INCLDIR)/headers.h + +@@ -218,4 +218,4 @@ + +-$(BIN)/answer: $(ANSWER_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(ANSWER_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/answer: $(ANSWER_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(ANSWER_OBJ) -L../lib -lelmutil $(LIB2) + +@@ -224,4 +224,4 @@ + +-$(BIN)/elmalias: $(ELMALIAS_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(ELMALIAS_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/elmalias: $(ELMALIAS_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(ELMALIAS_OBJ) -L../lib -lelmutil $(LIB2) + +@@ -230,4 +230,4 @@ + +-$(BIN)/fastmail: $(FASTMAIL_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(FASTMAIL_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/fastmail: $(FASTMAIL_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(FASTMAIL_OBJ) -L../lib -lelmutil $(LIB2) + +@@ -236,4 +236,4 @@ + +-$(BIN)/frm: $(FRM_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(FRM_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/frm: $(FRM_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(FRM_OBJ) -L../lib -lelmutil $(LIB2) + +@@ -242,4 +242,4 @@ + +-$(BIN)/newalias: $(NEWALIAS_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(NEWALIAS_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/newalias: $(NEWALIAS_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(NEWALIAS_OBJ) -L../lib -lelmutil $(LIB2) + +@@ -248,4 +248,4 @@ + +-$(BIN)/newmail: $(NEWMAIL_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(NEWMAIL_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/newmail: $(NEWMAIL_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(NEWMAIL_OBJ) -L../lib -lelmutil $(LIB2) + +@@ -254,4 +254,4 @@ + +-$(BIN)/readmsg: $(READMSG_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(READMSG_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/readmsg: $(READMSG_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(READMSG_OBJ) -L../lib -lelmutil $(LIB2) + +@@ -260,4 +260,4 @@ + +-$(BIN)/prlong: $(PRLONG_OBJ) ../lib/libutil.a +- $(CC) $(LFLAGS) -o $@ $(PRLONG_OBJ) ../lib/libutil.a $(LIB2) ++$(BIN)/prlong: $(PRLONG_OBJ) ++ $(CC) $(LFLAGS) -o $@ $(PRLONG_OBJ) -L../lib -lelmutil $(LIB2) + diff -P -r -U1 elm54/patches/patch-af elm/patches/patch-af --- elm54/patches/patch-af Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-af Wed Aug 25 01:42:15 1999 @@ -0,0 +1,7 @@ +--- filter/Makefile.SH.orig Wed May 26 06:29:47 1999 ++++ filter/Makefile.SH Tue Aug 24 22:30:45 1999 +@@ -155,3 +155,3 @@ + $(BIN)/filter: $& $(FILTER_OBJ) +- $(CC) $(LFLAGS) -o $@ $(FILTER_OBJ) ../lib/libutil.a $(LIB2) ++ $(CC) $(LFLAGS) -o $@ $(FILTER_OBJ) -L../lib -lelmutil $(LIB2) + diff -P -r -U1 elm54/patches/patch-ah elm/patches/patch-ah --- elm54/patches/patch-ah Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-ah Wed Aug 25 01:42:16 1999 @@ -0,0 +1,7 @@ +--- Makefile.SH.orig Wed May 26 06:29:46 1999 ++++ Makefile.SH Tue Aug 24 23:00:22 1999 +@@ -57,3 +57,3 @@ + cd melib; $(MAKE) $(MJ) -$(MAKEFLAGS) $@ +- cd lib; $(MAKE) $(MJ) -$(MAKEFLAGS) $@ ++ cd lib; $(MAKE) $(MJ) -$(MAKEFLAGS) -f Makefile.bsd $@ + cd src; $(MAKE) $(MJ) -$(MAKEFLAGS) $@ diff -P -r -U1 elm54/patches/patch-ai elm/patches/patch-ai --- elm54/patches/patch-ai Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-ai Wed Aug 25 01:42:16 1999 @@ -0,0 +1,10 @@ +--- lib/Makefile.SH.orig Wed May 26 06:29:48 1999 ++++ lib/Makefile.SH Tue Aug 24 23:09:47 1999 +@@ -208,5 +208,5 @@ + +-all: Makefile libutil.a ++all: Makefile # libutil.a + +-install: Makefile libutil.a ++install: Makefile # libutil.a + diff -P -r -U1 elm54/patches/patch-ak elm/patches/patch-ak --- elm54/patches/patch-ak Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-ak Wed Aug 25 01:42:16 1999 @@ -0,0 +1,48 @@ +--- lib/mk_aliases.c.orig Wed May 26 06:29:49 1999 ++++ lib/mk_aliases.c Tue Aug 24 23:57:11 1999 +@@ -48,4 +48,2 @@ + +-extern int is_system; /* system file updating? */ +- + #ifdef DEBUG +@@ -226,5 +224,6 @@ + +-void add_to_table(data, aliases, lastn, firstn, comment, addresses) ++void add_to_table(data, aliases, lastn, firstn, comment, addresses, is_system) + FILE *data; + char *aliases, *lastn, *firstn, *comment, *addresses; ++ int is_system; + { +@@ -389,3 +388,3 @@ + +-void put_alias(data) ++void put_alias(data, is_system) + FILE *data; +@@ -551,3 +550,3 @@ + +- add_to_table(data, aliases, lastn, firstn, comment, addresses); ++ add_to_table(data, aliases, lastn, firstn, comment, addresses, is_system); + } +@@ -556,5 +555,5 @@ + +-int do_newalias(inputname, dataname, fromelm, textwarn) ++int do_newalias(inputname, dataname, fromelm, textwarn, is_system) + char *inputname, *dataname; +- int fromelm, textwarn; ++ int fromelm, textwarn, is_system; + { +@@ -569,3 +568,3 @@ + if ((buffer = malloc(2 * VERY_LONG_STRING)) == NULL) { +- error(catgets(elm_msg_cat, NewaliasSet, NewaliasNoAlloc, ++ lib_error(CATGETS(elm_msg_cat, NewaliasSet, NewaliasNoAlloc, + "Unable to allocate space for alias buffer!")); +@@ -619,3 +618,3 @@ + while (get_alias(in, fromelm) != -1) { +- put_alias(data); ++ put_alias(data, is_system); + if (err_flag) break; +@@ -626,3 +625,3 @@ + sleep(sleepmsg); +- error(catgets(elm_msg_cat, NewaliasSet, NewaliasNoSave, ++ lib_error(CATGETS(elm_msg_cat, NewaliasSet, NewaliasNoSave, + "** Not saving tables! Please fix and re-run!")); diff -P -r -U1 elm54/patches/patch-al elm/patches/patch-al --- elm54/patches/patch-al Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-al Wed Aug 25 01:42:16 1999 @@ -0,0 +1,13 @@ +--- hdrs/elmlib.h.orig Wed May 26 06:29:47 1999 ++++ hdrs/elmlib.h Tue Aug 24 23:46:19 1999 +@@ -41,7 +41,7 @@ + extern void add_to_table P_((FILE *,char *, char *, char *, +- char *, char *)); ++ char *, char *, int)); + extern int check_alias P_((char *)); + extern int check_address P_((char *)); +-extern void put_alias P_((FILE *)); +-extern int do_newalias P_((char *, char *,int, int)); ++extern void put_alias P_((FILE *, int)); ++extern int do_newalias P_((char *, char *,int, int, int)); + diff -P -r -U1 elm54/patches/patch-am elm/patches/patch-am --- elm54/patches/patch-am Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-am Wed Aug 25 01:42:16 1999 @@ -0,0 +1,7 @@ +--- utils/newalias.c.orig Wed May 26 06:29:51 1999 ++++ utils/newalias.c Tue Aug 24 23:48:14 1999 +@@ -94,3 +94,3 @@ + +- if ((a = do_newalias(inputname, dataname, FALSE, TRUE)) < 0) { ++ if ((a = do_newalias(inputname, dataname, FALSE, TRUE, is_system)) < 0) { + exit(1); diff -P -r -U1 elm54/patches/patch-an elm/patches/patch-an --- elm54/patches/patch-an Wed Dec 31 19:00:00 1969 +++ elm/patches/patch-an Wed Aug 25 01:42:16 1999 @@ -0,0 +1,12 @@ +--- src/alias.c.orig Wed May 26 06:29:50 1999 ++++ src/alias.c Wed Aug 25 00:01:56 1999 +@@ -55,4 +55,2 @@ + +-int is_system=0; /* system file updating? */ +- + extern int errno; +@@ -1222,3 +1220,3 @@ + +- na = do_newalias(itextfile, odatafile, TRUE, FALSE); ++ na = do_newalias(itextfile, odatafile, TRUE, FALSE, FALSE); + if (na >= 0) { diff -P -r -U1 elm54/pkg/PLIST elm/pkg/PLIST --- elm54/pkg/PLIST Wed Apr 7 14:28:39 1999 +++ elm/pkg/PLIST Wed Aug 25 01:42:16 1999 @@ -6,2 +6,3 @@ bin/frm +lib/%%LIBELMUTIL%% @exec ln -f %D/%F %D/bin/nfrm diff -P -r -U1 elm54/scripts/pre-configure elm/scripts/pre-configure --- elm54/scripts/pre-configure Wed Apr 7 14:36:43 1999 +++ elm/scripts/pre-configure Wed Aug 25 01:49:10 1999 @@ -26,4 +26,13 @@ d_poll='define' -d_inttypes='define' -d_nointtypes='undef' +case `uname -r` in + 2*) + d_inttypes='undef' + d_nointtypes='define' + ;; + 3*|4*) + d_inttypes='define' + d_nointtypes='undef' + ;; +esac +d_mmap='define' n='-n' >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message