aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/mtools/Makefile
blob: e29a5545c2ec9532054f414e727d3d658c2788d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Created by: WATANABE junya <junya-w@remus.dti.ne.jp>
# $FreeBSD$

PORTNAME=   mtools
PORTVERSION=    3.9.6
PORTREVISION=   1
CATEGORIES= japanese emulators
MASTER_SITES=   ftp://ftp.tux.org/pub/knaff/mtools/:mtools  \
        http://mtools.linux.lu/:mtools \
        ${MASTER_SITE_LOCAL:S/$/:local/} \
        ${MASTER_SITE_PORTS_JP:S/$/:jp/}
MASTER_SITE_SUBDIR= steve/:local ./:jp
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:mtools \
        ${DISTNAME}.PC98.patch.gz:local,jp
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Tools for manipulating MSDOS files + support 1232KB , Unicode LFN

USES=       gmake makeinfo
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-xdf
INFO=       mtools

post-patch:
    @cd ${WRKSRC}; \
      ${GZCAT} ${DISTDIR}/mtools-3.9.6.PC98.patch.gz | ${PATCH} -d . >/dev/null 2>&1; \
      for f in config.c mtools.5 mtools.texi; do \
        ${MV} $$f $$f.orig; \
        ${SED} -e s:/etc/mtools.conf:${PREFIX}/etc/mtools.conf: \
        < $$f.orig > $$f; done
    @cd ${WRKSRC}/scripts; for f in ocopy xcopy; do \
     if [ ! -f $$f -a -f $$f.orig ]; then ${CP} -p $$f.orig $$f ; fi \
     done
    @${REINPLACE_CMD} -E -e 's,MAN(1|5)DIR),DESTDIR)$$(&,' \
        -e '/(INSTALL|LN_S|mkinstalldirs)/ s,(bin|info)dir,DESTDIR)$$(&,g' \
        ${WRKSRC}/Makefile.in

post-install:
    @#  mwrite has been removed by author, but we'll keep it just a bit longer
    ${LN} -sf ${PREFIX}/bin/mtools ${STAGEDIR}${PREFIX}/bin/mwrite
    ${LN} -sf ${PREFIX}/man/man1/mcopy.1.gz \
        ${STAGEDIR}${PREFIX}/man/man1/mwrite.1.gz
    ${INSTALL_DATA} ${WRKSRC}/mtools.conf ${STAGEDIR}${PREFIX}/etc
    @${ECHO} "Please verify ${PREFIX}/etc/mtools.conf for your machine."

.include <bsd.port.mk>