From 57665bd19a5307c8a8c67217ad585d02dc0e707a Mon Sep 17 00:00:00 2001 From: Automaton Date: Thu, 6 Jun 2013 09:41:34 +0200 Subject: [PATCH] Update sysutils/mapchan to version 3.2 --- sysutils/mapchan/Makefile | 48 +++++++++++----------- sysutils/mapchan/distinfo | 4 +- sysutils/mapchan/dragonfly/patch-mapchan.c | 20 +++++++++ sysutils/mapchan/files/patch-Makefile | 24 +++++------ sysutils/mapchan/files/patch-mapchan.c | 21 ++++++++-- 5 files changed, 76 insertions(+), 41 deletions(-) create mode 100644 sysutils/mapchan/dragonfly/patch-mapchan.c diff --git a/sysutils/mapchan/Makefile b/sysutils/mapchan/Makefile index f8c943b2eab..6807d03a4eb 100644 --- a/sysutils/mapchan/Makefile +++ b/sysutils/mapchan/Makefile @@ -1,43 +1,45 @@ -# New ports collection makefile for: Utility "mapchan" of SCO Unix -# Date created: 17 February 2004 -# Whom: Konstantin Reznichenko -# -# $FreeBSD: ports/sysutils/mapchan/Makefile,v 1.7 2012/11/17 06:01:38 svnexp Exp $ -# +# Created by: Konstantin Reznichenko +# $FreeBSD: sysutils/mapchan/Makefile 319117 2013-05-26 16:14:45Z bsam $ 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} - +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -liconv 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 182be565e42..791afa13a4a 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/dragonfly/patch-mapchan.c b/sysutils/mapchan/dragonfly/patch-mapchan.c new file mode 100644 index 00000000000..f4e3edb4b8d --- /dev/null +++ b/sysutils/mapchan/dragonfly/patch-mapchan.c @@ -0,0 +1,20 @@ +--- mapchan.c.orig 2013-06-03 09:15:34.000000000 +0000 ++++ mapchan.c +@@ -15,7 +15,7 @@ + #include + #include + #include +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) + #include + #include + #else +@@ -194,7 +194,7 @@ int init_utf_tables(char *codeset) { + char buf[1]; + char obuf[MAXBYTES]; + char *pi, *po; +- int ii, io; ++ size_t ii, io; + struct bytecell *current_table; + + if (codeset == NULL) return(0); diff --git a/sysutils/mapchan/files/patch-Makefile b/sysutils/mapchan/files/patch-Makefile index e0dd1d3367f..e7380b671c4 100644 --- a/sysutils/mapchan/files/patch-Makefile +++ b/sysutils/mapchan/files/patch-Makefile @@ -1,23 +1,23 @@ ---- 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 20:10:47.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,9 +29,9 @@ + DEFS+=-DESC_C_TBL --BINDIR ?= /bin --MAPDIR ?= /etc/mapchan --LDFLAGS=-s + DESTDIR ?= / +-BINDIR ?= $(DESTDIR)/bin +-MAPDIR ?= $(DESTDIR)/etc/mapchan +-LDFLAGS ?= -s +BINDIR?=$(PREFIX)/bin +MAPDIR?=$(PREFIX)/mapchan -+LDFLAGS=-s -lutil - LOADLIBES=-lutil ++LDFLAGS+=-s -lutil + LOADLIBES = -lutil #-------------------------------------------------------------- CFLAGS += $(DEFS) diff --git a/sysutils/mapchan/files/patch-mapchan.c b/sysutils/mapchan/files/patch-mapchan.c index c373b6ae623..8992e7d662e 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 -- 2.41.0