From a8ee96a158d73aaf272fd5588a49995d4aa919cc Mon Sep 17 00:00:00 2001 From: jkim Date: Wed, 12 Jun 2013 19:26:46 +0000 Subject: - Fix build with Clang. - Modernize the port, e.g., trim makefile header. --- korean/hmconv/Makefile | 28 +++++++++++++++++++--------- korean/hmconv/files/Makefile | 13 ------------- korean/hmconv/files/patch-aa | 19 ------------------- korean/hmconv/files/patch-hmconv1.0pl3.c | 27 +++++++++++++++++++++++++++ korean/hmconv/pkg-plist | 2 -- 5 files changed, 46 insertions(+), 43 deletions(-) delete mode 100644 korean/hmconv/files/Makefile delete mode 100644 korean/hmconv/files/patch-aa create mode 100644 korean/hmconv/files/patch-hmconv1.0pl3.c delete mode 100644 korean/hmconv/pkg-plist (limited to 'korean') diff --git a/korean/hmconv/Makefile b/korean/hmconv/Makefile index 162bef44c5c6..e67777fb687a 100644 --- a/korean/hmconv/Makefile +++ b/korean/hmconv/Makefile @@ -1,12 +1,9 @@ -# New ports collection makefile for: hmconv -# Date created: 31 Mar 1997 -# Whom: Choi Jun Ho -# +# Created by: CHOI Junho # $FreeBSD$ -# PORTNAME= hmconv PORTVERSION= 1.0.3 +PORTREVISION= 1 CATEGORIES= korean mail MASTER_SITES= ftp://ftp.kr.FreeBSD.org/pub/FreeBSD-kr/distfiles/ \ ftp://ftp.kreonet.re.kr/pub/hangul/cair-archive/code/hmconv/ @@ -15,13 +12,26 @@ DISTNAME= hmconv1.0pl3 MAINTAINER= ports@FreeBSD.org COMMENT= Hangul code conversion utility for E-mail -WRKSRC= ${WRKDIR}/hmconv +PLIST_FILES= bin/hmailedit bin/hmconv +PORTDOCS= CHANGES README* +WRKSRC= ${WRKDIR}/${PORTNAME} -pre-build: - @${CP} ${FILESDIR}/Makefile ${WRKSRC} +OPTIONS_DEFINE= DOCS + +.include + +post-patch: + ${REINPLACE_CMD} -e 's|^HEDITOR=.*|HEDITOR=$$EDITOR|' \ + ${WRKSRC}/hmailedit + +do-build: + ${CC} ${CFLAGS} -o ${WRKSRC}/hmconv ${WRKSRC}/hmconv1.0pl3.c do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/hmconv ${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/hmailedit ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/hmconv ${PREFIX}/bin +.if ${PORT_OPTIONS:MDOCS} + cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${DOCSDIR} +.endif .include diff --git a/korean/hmconv/files/Makefile b/korean/hmconv/files/Makefile deleted file mode 100644 index cbd21750d040..000000000000 --- a/korean/hmconv/files/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# Simple makefile for hmconv -# -# 31 Mar 1997 Choi Jun Ho -# - -all: hmconv - -CFLAGS= -O - -hmconv: hmconv1.0pl3.o - $(CC) -o hmconv hmconv1.0pl3.o - -hmconv1.0pl3.o: hmconv1.0pl3.c diff --git a/korean/hmconv/files/patch-aa b/korean/hmconv/files/patch-aa deleted file mode 100644 index 36de80eb8606..000000000000 --- a/korean/hmconv/files/patch-aa +++ /dev/null @@ -1,19 +0,0 @@ -*** ../hmconv.old/hmailedit Mon Mar 31 22:27:38 1997 ---- hmailedit Mon Mar 31 22:35:23 1997 -*************** -*** 6,12 **** - # set your favorite Hangul editor to HEDITOR - # Pico users should give '-t' option, i.e. 'pico -t' instead of 'pico' - # Emacs,Mule,Hanemacs users may give '-nw' option -! HEDITOR=hvi - - # 'hmconv' is to be put in your search path - ---- 6,12 ---- - # set your favorite Hangul editor to HEDITOR - # Pico users should give '-t' option, i.e. 'pico -t' instead of 'pico' - # Emacs,Mule,Hanemacs users may give '-nw' option -! HEDITOR=$EDITOR - - # 'hmconv' is to be put in your search path - diff --git a/korean/hmconv/files/patch-hmconv1.0pl3.c b/korean/hmconv/files/patch-hmconv1.0pl3.c new file mode 100644 index 000000000000..56c11913798b --- /dev/null +++ b/korean/hmconv/files/patch-hmconv1.0pl3.c @@ -0,0 +1,27 @@ +--- hmconv1.0pl3.c.orig 1996-07-22 23:16:14.000000000 -0400 ++++ hmconv1.0pl3.c 2013-06-12 14:24:05.000000000 -0400 +@@ -46,6 +46,7 @@ + + + #include ++#include + #include + + #define isksc(c) ( (unsigned char) (c) > (unsigned char) '\240' && \ +@@ -125,6 +126,7 @@ + } + + #ifndef KNR ++int + main (int argc, char **argv) + #else + main (argc,argv) +@@ -208,7 +210,7 @@ + + if ( !ishangul) { /* KSC 5601 doesn't appear, yet */ + fputs((char *) line,out); /* no conversion */ +- return; ++ return(0); + } + + diff --git a/korean/hmconv/pkg-plist b/korean/hmconv/pkg-plist deleted file mode 100644 index da714ff3a1a0..000000000000 --- a/korean/hmconv/pkg-plist +++ /dev/null @@ -1,2 +0,0 @@ -bin/hmconv -bin/hmailedit -- cgit