From e9277ce26f2cfc54202645e69247d77276f4fde5 Mon Sep 17 00:00:00 2001 From: Boris Samorodov Date: Sun, 26 May 2013 15:32:09 +0000 Subject: . update to version 3.2; . trim Makefile header; . use new MASTER_SITES (SF); . refine COMMENT a little; . incorporate USES=iconv (which is needed since 3.0); . optionify using DOCS; . mute mkdir; . use utmp.h -> utmpx.h for OSVESION>900007. --- sysutils/mapchan/Makefile | 44 +++++++++++++++++----------------- sysutils/mapchan/distinfo | 4 ++-- sysutils/mapchan/files/patch-Makefile | 26 ++++++++++---------- sysutils/mapchan/files/patch-mapchan.c | 21 ++++++++++++---- 4 files changed, 55 insertions(+), 40 deletions(-) (limited to 'sysutils/mapchan') diff --git a/sysutils/mapchan/Makefile b/sysutils/mapchan/Makefile index 5234496be58f..b43586bb5188 100644 --- a/sysutils/mapchan/Makefile +++ b/sysutils/mapchan/Makefile @@ -1,43 +1,43 @@ -# New ports collection makefile for: Utility "mapchan" of SCO Unix -# Date created: 17 February 2004 -# Whom: Konstantin Reznichenko -# +# Created by: Konstantin Reznichenko # $FreeBSD$ -# PORTNAME= mapchan -PORTVERSION= 2.0 +PORTVERSION= 3.2 CATEGORIES= sysutils converters -MASTER_SITES= http://www.iceb.vc.ukrtel.net/download/ +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION} +EXTRACT_SUFX= .tgz MAINTAINER= bsam@FreeBSD.org -COMMENT= Implementation of the utility "mapchan" from SCO Unix - -USE_BZIP2= yes +COMMENT= Transform the input and output of a terminal (SCO Unix alike) +USES= iconv WRKSRC= ${WRKDIR}/${PORTNAME} - MAKE_ENV= MAPDIR=${PREFIX}/etc/${PORTNAME} - ETCDAT= *.map default.sample - MAN8= mapchan.8 - PORTDOCS= README +OPTIONS_DEFINE= DOCS post-extract: @${CP} ${WRKSRC}/doc/mapchan.F ${WRKSRC}/doc/mapchan.8 -post-patch: - @${FIND} ${WRKSRC} -name '*.orig' | ${XARGS} ${RM} - @${CP} ${WRKSRC}/examples/default ${WRKSRC}/examples/default.sample - @${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|" ${WRKSRC}/mapchan.c +.include post-install: - ${INSTALL_MAN} ${WRKSRC}/doc/mapchan.8 ${MANPREFIX}/man/man8 -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/doc/mapchan.8 ${MANPREFIX}/man/man8 +.endif + +.include + +post-patch: + ${FIND} ${WRKSRC} -name '*.orig' -delete + ${CP} ${WRKSRC}/examples/default ${WRKSRC}/examples/default.sample + ${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|" ${WRKSRC}/mapchan.c +.if ${OSVERSION} > 900007 + ${REINPLACE_CMD} -e "s|utmp.h|utmpx.h|" ${WRKSRC}/mapchan.c .endif -.include +.include diff --git a/sysutils/mapchan/distinfo b/sysutils/mapchan/distinfo index 182be565e427..791afa13a4a5 100644 --- a/sysutils/mapchan/distinfo +++ b/sysutils/mapchan/distinfo @@ -1,2 +1,2 @@ -SHA256 (mapchan-2.0.tar.bz2) = 348b202db14bf200b02d4b18c20b6e059db457e47b5b567eaa7af161045f50d6 -SIZE (mapchan-2.0.tar.bz2) = 22547 +SHA256 (mapchan-3.2.tgz) = 0b67e3e55da89adf4bc07645c9ce0540c0fd1b1eb257b7f9a163fc66e266f2ea +SIZE (mapchan-3.2.tgz) = 35601 diff --git a/sysutils/mapchan/files/patch-Makefile b/sysutils/mapchan/files/patch-Makefile index e0dd1d3367f4..c14b3d24ca3f 100644 --- a/sysutils/mapchan/files/patch-Makefile +++ b/sysutils/mapchan/files/patch-Makefile @@ -1,23 +1,25 @@ ---- Makefile.orig Wed Jul 6 00:16:36 2005 -+++ Makefile Mon Nov 14 22:52:35 2005 +--- Makefile.orig 2008-09-11 20:28:12.000000000 +0500 ++++ Makefile 2013-05-26 13:56:49.000000000 +0400 @@ -1,6 +1,6 @@ # # --CFLAGS=-O2 +-CFLAGS ?= -O2 +CFLAGS?=$(CFLAGS) + #CFLAGS ?= -g # # Defines: - #DEFS= -@@ -14,9 +14,9 @@ - # (3) If need call /bin/sh for parsing argument of option -s - DEFS+=-DEXEC_SHELL +@@ -29,10 +29,10 @@ DEFS+=-DMAP_ONOFF + DEFS+=-DESC_C_TBL --BINDIR ?= /bin --MAPDIR ?= /etc/mapchan --LDFLAGS=-s + DESTDIR ?= / +-BINDIR ?= $(DESTDIR)/bin +-MAPDIR ?= $(DESTDIR)/etc/mapchan +-LDFLAGS ?= -s +-LOADLIBES = -lutil +BINDIR?=$(PREFIX)/bin +MAPDIR?=$(PREFIX)/mapchan -+LDFLAGS=-s -lutil - LOADLIBES=-lutil ++LDFLAGS=-s -lutil -liconv -I /usr/local/include -L /usr/local/lib ++LOADLIBES = -lutil -liconv #-------------------------------------------------------------- CFLAGS += $(DEFS) + diff --git a/sysutils/mapchan/files/patch-mapchan.c b/sysutils/mapchan/files/patch-mapchan.c index c373b6ae6235..8992e7d662e1 100644 --- a/sysutils/mapchan/files/patch-mapchan.c +++ b/sysutils/mapchan/files/patch-mapchan.c @@ -1,6 +1,19 @@ ---- mapchan.c.orig Sat Oct 25 09:21:42 2003 -+++ mapchan.c Sun Feb 27 15:27:01 2005 -@@ -19,7 +19,7 @@ +--- mapchan.c.orig 2008-09-12 01:47:59.000000000 +0500 ++++ mapchan.c 2013-05-26 14:55:43.000000000 +0400 +@@ -15,7 +15,12 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#include ++#else + #include ++#endif + #include + #ifdef SYSLOG + #include +@@ -50,7 +55,7 @@ char *DEFAULT_LOGFILE = "mapchan.log"; #endif #ifndef CPATH @@ -8,4 +21,4 @@ + #define CPATH "/usr/local/etc/mapchan" #endif - #define BUFSIZE 4096 + #define BUFSIZE 32*1024 -- cgit v1.2.3