Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2013 15:32:09 +0000 (UTC)
From:      Boris Samorodov <bsam@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r319115 - in head/sysutils/mapchan: . files
Message-ID:  <201305261532.r4QFW9TX067984@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bsam
Date: Sun May 26 15:32:09 2013
New Revision: 319115
URL: http://svnweb.freebsd.org/changeset/ports/319115

Log:
  . 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.

Modified:
  head/sysutils/mapchan/Makefile
  head/sysutils/mapchan/distinfo
  head/sysutils/mapchan/files/patch-Makefile
  head/sysutils/mapchan/files/patch-mapchan.c

Modified: head/sysutils/mapchan/Makefile
==============================================================================
--- head/sysutils/mapchan/Makefile	Sun May 26 15:20:50 2013	(r319114)
+++ head/sysutils/mapchan/Makefile	Sun May 26 15:32:09 2013	(r319115)
@@ -1,43 +1,43 @@
-# New ports collection makefile for: Utility "mapchan" of SCO Unix
-# Date created:   17 February 2004
-# Whom:    Konstantin Reznichenko <kot@premierbank.dp.ua>
-#
+# Created by: Konstantin Reznichenko <kot@premierbank.dp.ua>
 # $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 <bsd.port.options.mk>
 
 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 <bsd.port.pre.mk>
+
+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 <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/sysutils/mapchan/distinfo
==============================================================================
--- head/sysutils/mapchan/distinfo	Sun May 26 15:20:50 2013	(r319114)
+++ head/sysutils/mapchan/distinfo	Sun May 26 15:32:09 2013	(r319115)
@@ -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

Modified: head/sysutils/mapchan/files/patch-Makefile
==============================================================================
--- head/sysutils/mapchan/files/patch-Makefile	Sun May 26 15:20:50 2013	(r319114)
+++ head/sysutils/mapchan/files/patch-Makefile	Sun May 26 15:32:09 2013	(r319115)
@@ -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)
+ 

Modified: head/sysutils/mapchan/files/patch-mapchan.c
==============================================================================
--- head/sysutils/mapchan/files/patch-mapchan.c	Sun May 26 15:20:50 2013	(r319114)
+++ head/sysutils/mapchan/files/patch-mapchan.c	Sun May 26 15:32:09 2013	(r319115)
@@ -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 <stdlib.h>
+ #include <signal.h>
+ #include <libgen.h>
++#ifdef __FreeBSD__
++#include <libutil.h>
++#include <sys/ioctl.h>
++#else
+ #include <pty.h>
++#endif
+ #include <utmp.h>
+ #ifdef SYSLOG
+ #include <syslog.h>
+@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305261532.r4QFW9TX067984>