Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 97 16:49:13 +0100
From:      Jean-Marc Zucconi <jmz@cabri.obs-besancon.fr>
To:        asami@vader.cs.berkeley.edu
Cc:        roberto@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-ports@freefall.freebsd.org
Subject:   Re: cvs commit:  ports/misc/ispell Makefile
Message-ID:  <9702171549.AA19399@cabri.obs-besancon.fr>
In-Reply-To: <199702140927.BAA07775@silvia.HIP.Berkeley.EDU> (asami@vader.cs.berkeley.edu)

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> Satoshi Asami writes:

 >  * Well, here is the modified makefile. With your patch, I have been able
 >  * to build the 3 packages with 'make', 'make ISPELL_LANG=british' and 
 >  * 'make ISPELL_LANG=french'.

 > If you can make it a little more symmetric (see japanese/ptex2), it
 > will be great.  Breifly:

 >  @ if neither of BATCH and ISPELL_LANG are not set, prompt user and
 >    ask for choice.

 >  @ if BATCH is set and ISPELL_LANG is not set, print out message and
 >    default to (American) English.

 >  @ if ISPELL_LANG is set, go ahead and build it.

 >  * ...if defined(ISPELL_LANG)
 >  * ...if ${ISPELL_LANG}==french
 >  * EXTRA_DICT=	francais-IREQ-1.4.tar.gz
 >  * MASTER_SITES+=	ftp://ftp.robot.ireq.ca/pub/ispell/
 >  * DISTFILES+=	${EXTRA_DICT}
 >  * ISPELL=		fr-
 >  * ...else
 >  * ISPELL=		uk-
 >  * ...endif
 >  * ...endif

 > Also, this will make "make ISPELL_LANG=american" produce a British
 > dictionary.... ;)

Is this better?

# New ports collection makefile for:    ispell
# Version required:     3.1.20
# Date created:         6 November 1994
# Whom:                 jmz
#
# $Id: Makefile,v 1.17 1997/02/07 23:03:11 jmz Exp $
#

DISTNAME=	ispell-3.1
PKGNAME=	${ISPELL}ispell-3.1.20
CATEGORIES=	misc
MASTER_SITES=	ftp://ftp.cs.ucla.edu/pub/ispell-3.1/
DISTFILES=	ispell-3.1.20.tar.gz
PLIST=		${PKGDIR}/${ISPELL}PLIST

MAINTAINER=	jmz@FreeBSD.org

MAKE_FLAGS=	TMPDIR=${.CURDIR} -f
MAN1=		buildhash.1 findaffix.1 ispell.1 munchlist.1 \
		sq.1 tryaffix.1 unsq.1
MAN4=		ispell.4 english.4

pre-fetch:
.if !defined(BATCH) && !defined(ISPELL_LANG)
	@echo 'You can build an american version, a british version or'
	@echo 'a french/english version of the ispell dictionary.'
	@echo -n 'What is your choice (us, br, fr) [us] ? '
	@read answ; case _$$answ in _[bB]*) ISPELL_LANG=british;;\
		_[fF]*) ISPELL_LANG=french;; _) ISPELL_LANG=american;;\
		*) echo 'Choice is incorrect'; exit 1;; esac;\
	${MAKE} ISPELL_LANG=$$ISPELL_LANG
.else
	@echo Building ${ISPELL_LANG} ispell
.endif

.if defined(ISPELL_LANG)
.if ${ISPELL_LANG}==french
EXTRA_DICT=	francais-IREQ-1.4.tar.gz
MASTER_SITES+=	ftp://ftp.robot.ireq.ca/pub/ispell/
DISTFILES+=	${EXTRA_DICT}
ISPELL=		fr-
.elif ${ISPELL_LANG}==british
ISPELL=		uk-
.else
ISPELL= #american
.endif
.else
	@echo '******************************************************' 
	@echo '* Note that you can build a french/english version   *' 
	@echo '* by typing "make ISPELL_LANG=french" and a british  *'
	@echo '* version by typing "make ISPELL_LANG=british"       *' 
	@echo '******************************************************' 
.endif

pre-configure:
.if defined(EXTRA_DICT)
	@echo ${EXTRA_DICT} > ${WRKDIR}/extra_dict
.endif

post-configure:
.if defined(ISPELL_LANG)
.if ${ISPELL_LANG}==british
	@mv ${WRKSRC}/local.h ${WRKSRC}/local.h.old; \
	  sed -e s/american/british/g <${WRKSRC}/local.h.old >${WRKSRC}/local.h
.endif
.endif
	@echo "#define CFLAGS \"${CFLAGS}\"" >> ${WRKSRC}/local.h

.include <bsd.port.mk>

Jean-Marc
 _____________________________________________________________________________
 Jean-Marc Zucconi       Observatoire de Besancon       F 25010 Besancon cedex
                   PGP Key: finger jmz@cabri.obs-besancon.fr
 =============================================================================



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