1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/textproc/aspell/Makefile
Rong-En Fan 741aa71483 Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.
Specifically, newer autoconf (> 2.13) has different semantic of the
configure target. In short, one should use --build=CONFIGURE_TARGET
instead of CONFIGURE_TARGET directly. Otherwise, you will get a warning
and the old semantic may be removed in later autoconf releases.

To workaround this issue, many ports hack the CONFIGURE_TARGET variable
so that it contains the ``--build='' prefix.

To solve this issue, under the fact that some ports still have
configure script generated by the old autoconf, we use runtime detection
in the do-configure target so that the proper argument can be used.

Changes to Mk/*:
 - Add runtime detection magic in bsd.port.mk
 - Remove CONFIGURE_TARGET hack in various bsd.*.mk
 - USE_GNOME=gnometarget is now an no-op

Changes to individual ports, other than removing the CONFIGURE_TARGET hack:

= pkg-plist changed (due to the ugly CONFIGURE_TARGET prefix in * executables)
  - comms/gnuradio
  - science/abinit
  - science/elmer-fem
  - science/elmer-matc
  - science/elmer-meshgen2d
  - science/elmerfront
  - science/elmerpost

= use x86_64 as ARCH
  - devel/g-wrap

= other changes
  - print/magicfilter
    GNU_CONFIGURE -> HAS_CONFIGURE since it's not generated by autoconf

Total # of ports modified:  1,027
Total # of ports affected: ~7,000 (set GNU_CONFIGURE to yes)

PR:		126524 (obsoletes 52917)
Submitted by:	rafan
Tested on:	two pointyhat 7-amd64 exp runs (by pav)
Approved by:	portmgr (pav)
2008-08-21 06:18:49 +00:00

134 lines
3.4 KiB
Makefile

# New ports collection makefile for: aspell
# Date created: 7 December 1998
# Whom: Josh Gilliam <josh@quick.net>
#
# $FreeBSD$
#
PORTNAME= aspell
PORTVERSION= 0.60.6
PORTREVISION= 2
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= aspell
.if defined(WITHOUT_DICTEN)
PKGNAMESUFFIX= -without-dicten
.endif
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= thierry@FreeBSD.org
COMMENT= Spelling checker with better suggestion logic than ispell
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-dict-dir=${DATADIR} \
--enable-docdir=${DOCSDIR} \
--enable-static
PTHREAD_CFLAGS= # Disable threading
PTHREAD_LIBS= # libaspell may be used by unthreaded apps.
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS} ${PTHREAD_LIBS}"
USE_GMAKE= yes
USE_ICONV= yes
USE_PERL5_BUILD= yes
USE_LDCONFIG= yes
SLAVEDIRS= textproc/aspell-without-dicten
MAKE_ARGS= NOPORTDOCS=${NOPORTDOCS}
VERINST= ${PORTVERSION:R}
SUB_FILES= aspell.ver
PLIST_SUB= VER=${VERINST}
SUB_LIST= VERINST=${VERINST}
.if defined(WITHOUT_DICTEN)
CONFLICTS= aspell-0.*
DICT_TARGET=
.else
VERDICT_EN= 6-en-6.0-0
DICT_SUFFIX= .tar.bz2
MASTER_SITES+= ${MASTER_SITE_GNU:S|$|:dicten|}
MASTER_SITE_SUBDIR+= aspell/dict/en/:dicten
DISTFILES+= aspell${VERDICT_EN}${DICT_SUFFIX}:dicten
CONFLICTS= aspell-without-dicten-0.*
DICT_TARGET= inst-dicten
CONF_DICT_ENV= ASPELL="${PREFIX}/bin/aspell" \
WORD_LIST_COMPRESS="${PREFIX}/bin/word-list-compress"
.endif
.if defined(WITH_ISPELL)
CONFLICTS+= ispell* ??-ispell*
SCRIPTS= ispell spell
PLIST_SUB+= SCRIPTS=""
.else
PLIST_SUB+= SCRIPTS="@comment "
.endif
.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.else
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
.endif
.if !defined(NOPORTDOCS)
MAN1= aspell-import.1 aspell.1 pspell-config.1 \
run-with-aspell.1 word-list-compress.1 prezip-bin.1
INFO= aspell-dev aspell
.endif
# Does not link without at least -O
.if !defined(CFLAGS) || ${CFLAGS:M-O*} == ""
CFLAGS+= -O
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 602107
CONFIGURE_ARGS+= --disable-wide-curses
.else
CONFIGURE_ARGS+= --enable-curses=ncursesw
.endif
pre-everything::
@${ECHO_MSG} ""
.if !defined(WITH_ISPELL)
@${ECHO_MSG} "Define WITH_ISPELL to install Ispell's wrapper."
@${ECHO_MSG} ""
.endif
.if !defined(WITHOUT_DICTEN)
@${ECHO_MSG} "Define WITHOUT_DICTEN to not install english dictionary."
@${ECHO_MSG} ""
.endif
post-extract:
.if !defined(WITHOUT_DICTEN)
cd ${WRKDIR} && \
${TAR} -xjf ${DISTDIR}/aspell${VERDICT_EN}${DICT_SUFFIX}
.endif
pre-configure:
@cd ${WRKSRC} && ${ACLOCAL}
post-install: ${DICT_TARGET}
${INSTALL_DATA} ${WRKDIR}/aspell.ver ${PREFIX}/etc
.if defined(WITH_ISPELL)
${INSTALL_SCRIPT} ${SCRIPTS:S|^|${WRKSRC}/scripts/|} ${PREFIX}/bin
.endif
@${ECHO_CMD} "@dirrm share/aspell" >> ${TMPPLIST}
@${ECHO_CMD} "@dirrm lib/aspell-${VERINST}" >> ${TMPPLIST}
inst-dicten:
# Install en-aspell by default
.if !exists(${LOCALBASE}/lib/aspell-${VERINST}/en.dat) && !defined(WITHOUT_DICTEN)
@${ECHO_MSG} "===> Installing for en dictionaries"
cd ${WRKDIR}/aspell${VERDICT_EN} && \
${CONF_DICT_ENV} ./${CONFIGURE_SCRIPT} && \
${GMAKE} ${INSTALL_TARGET}
${SED} -e "s|%%VER%%|${VERINST}|" ${MASTERDIR}/pkg-plist.en \
>> ${TMPPLIST}
.endif
.include <bsd.port.post.mk>