diff options
author | CHOI Junho <cjh@FreeBSD.org> | 2002-11-23 12:27:12 +0000 |
---|---|---|
committer | CHOI Junho <cjh@FreeBSD.org> | 2002-11-23 12:27:12 +0000 |
commit | 22c0d8ea20cabb2d8b2bdc0eb2824be90d3bcb01 (patch) | |
tree | c7bfab7aeee50d927aa1a1fb20c1ec9d018cb6a0 | |
parent | Make fetchable (diff) |
- Fix build on -current(missing perl dependency)
- add NOA4 build option(A4/letter paper size selection)
Submitted by: Jung-uk Kim <jkim@niksun.com>, bento
-rw-r--r-- | korean/nh2ps/Makefile | 18 | ||||
-rw-r--r-- | korean/nh2ps/files/patch-aa | 14 | ||||
-rw-r--r-- | korean/nh2ps/files/patch-nh2ps.c | 64 | ||||
-rw-r--r-- | korean/nh2ps/scripts/configure | 11 |
4 files changed, 93 insertions, 14 deletions
diff --git a/korean/nh2ps/Makefile b/korean/nh2ps/Makefile index 018fc0c051e7..8975cc1159b8 100644 --- a/korean/nh2ps/Makefile +++ b/korean/nh2ps/Makefile @@ -7,13 +7,29 @@ PORTNAME= nh2ps PORTVERSION= 2.3.1 +PORTREVISION= 1 CATEGORIES= korean print MASTER_SITES= ftp://ftp.kr.freebsd.org/pub/users/cjh/nh2ps/ MAINTAINER= cjh@FreeBSD.org +USE_PERL5_BUILD=yes + MAN1= nh2ps.1 +.if !defined(NOA4) +XCFLAGS= -DA4_PAPERSIZE -DWIDTH=8.27 -DHEIGHT=11.64 +.else +XCFLAGS= -DWIDTH=8.5 -DHEIGHT=11.0 +.endif + +MAKE_ENV+= XCFLAGS="${XCFLAGS}" + +pre-everything:: +.if !defined(NOA4) + @${ECHO_MSG} "Type \"make NOA4=yes\" if you use no A4(letter) size paper." +.endif + post-patch: @(cd ${WRKSRC}; \ ${SED} s@/usr/local/bin/perl@${PERL5}@ mkpsfontmap.pl > mk.pl; \ @@ -21,7 +37,7 @@ post-patch: ${CHMOD} +x mkpsfontmap.pl) pre-install: - @(cd ${WRKSRC}; make install.man) + @(cd ${WRKSRC}; ${MAKE} PREFIX=${PREFIX} install.man) post-install: strip ${PREFIX}/bin/nh2ps diff --git a/korean/nh2ps/files/patch-aa b/korean/nh2ps/files/patch-aa index 9c48dc0c8fc9..c7b4c136ca3d 100644 --- a/korean/nh2ps/files/patch-aa +++ b/korean/nh2ps/files/patch-aa @@ -1,5 +1,5 @@ ---- ../nh2ps-2.3.orig/Makefile Sat Jul 18 22:12:03 1998 -+++ Makefile Sat Jul 18 22:12:12 1998 +--- Makefile.orig Tue Oct 20 20:04:13 1998 ++++ Makefile Mon Nov 18 15:32:22 2002 @@ -42,7 +42,6 @@ # stupid a**holes who add non-compatible "features" @@ -8,3 +8,13 @@ # directories BINDIR = ${PREFIX}/bin +@@ -70,8 +69,7 @@ + # + + # for a4 paper size, ps font mode +-CFLAGS = -DBSD -O2 -DHFONT -DWIDTH=8.27 -DHEIGHT=11.64 \ +- -DA4_PAPERSIZE=1 ++CFLAGS = ${XCFLAGS} -DBSD -O2 -DHFONT + + # for letter paper size + #CFLAGS = -DBSD -O2 -DHFONT -DWIDTH=8.5 -DHEIGHT=11.0 \ diff --git a/korean/nh2ps/files/patch-nh2ps.c b/korean/nh2ps/files/patch-nh2ps.c new file mode 100644 index 000000000000..0b0fecb417c1 --- /dev/null +++ b/korean/nh2ps/files/patch-nh2ps.c @@ -0,0 +1,64 @@ +--- nh2ps.c.orig Tue Oct 20 07:10:01 1998 ++++ nh2ps.c Wed Oct 23 16:51:28 2002 +@@ -255,6 +255,8 @@ + #define A4_WIDTH 8.27 + #define A4_HEIGHT 11.64 + ++#if A4_PAPERSIZE ++ + #ifndef WIDTH + #define WIDTH A4_WIDTH + #endif +@@ -263,6 +265,18 @@ + #define HEIGHT A4_HEIGHT + #endif + ++#else ++ ++#ifndef WIDTH ++#define WIDTH USA_WIDTH ++#endif ++ ++#ifndef HEIGHT ++#define HEIGHT USA_HEIGHT ++#endif ++ ++#endif ++ + #ifndef MARGIN + #define MARGIN 1.4 + #endif +@@ -560,7 +574,7 @@ + fprintf(stderr,"pos. = -#num\t\tnumber of copies to print\n"); + fprintf(stderr," -1\t\tone page per sheet\n"); + fprintf(stderr," -2\t\tTWIN PAGES per sheet\n"); +-#if A4_PAPERSIZE == 1 ++#if A4_PAPERSIZE + fprintf(stderr," -a\t\tUse USA paper size (8.5\" x 11\")\n"); + #else + fprintf(stderr," -a\t\tUse A4 paper size (21cm x 29.56cm (8.27\" x 11.64\"))\n"); +@@ -677,10 +691,14 @@ + interpret = TRUE; + break; + case 'a': /* American paper sizes */ +-#if defined(USA_HEIGHT) && defined(USA_WIDTH) ++#if A4_PAPERSIZE + paper_height = USA_HEIGHT; + paper_width = USA_WIDTH; + strcpy(papersizename, "Letter"); ++#else ++ paper_height = A4_HEIGHT; ++ paper_width = A4_WIDTH; ++ strcpy(papersizename, "A4"); + #endif + break; + case 'n': +@@ -2323,7 +2341,7 @@ + + #endif + +-#ifdef A4_PAPERSIZE ++#if A4_PAPERSIZE + strcpy(papersizename, "A4"); + #else + strcpy(papersizename, "Letter"); diff --git a/korean/nh2ps/scripts/configure b/korean/nh2ps/scripts/configure deleted file mode 100644 index b99a44d794f8..000000000000 --- a/korean/nh2ps/scripts/configure +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -cd $WRKSRC || exit 1; - -cat >> Makefile << END - -PREFIX= $PREFIX - -END -exit 0; - |