- Use OPTIONS

- Make zemberek optional (requires dbus).

Approved by:	gnome (marcus)
This commit is contained in:
Stanislav Sedov 2009-02-12 17:11:09 +00:00
parent af13aa1d5a
commit 3a9cefc5cd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=228124
2 changed files with 22 additions and 24 deletions

View file

@ -15,8 +15,6 @@ DIST_SUBDIR= gnome2
MAINTAINER= gnome@FreeBSD.org MAINTAINER= gnome@FreeBSD.org
COMMENT= Dictionary/spellchecking framework COMMENT= Dictionary/spellchecking framework
LIB_DEPENDS= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib
USE_GMAKE= yes USE_GMAKE= yes
USE_AUTOTOOLS= libtool:15 USE_AUTOTOOLS= libtool:15
USE_LDCONFIG= yes USE_LDCONFIG= yes
@ -28,15 +26,9 @@ CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
MAN1= enchant.1 MAN1= enchant.1
.ifndef(WITHOUT_ASPELL) OPTIONS= ASPELL "Enable aspell support" on \
LIB_DEPENDS+= pspell.16:${PORTSDIR}/textproc/aspell ZEMBEREK "Enable zemberek backend (requires DBUS)" off
CONFIGURE_ARGS+=--enable-aspell \
--with-aspell-prefix=${LOCALBASE}
PLIST_SUB+= ASPELL=""
.else
CONFIGURE_ARGS+=--disable-aspell
PLIST_SUB+= ASPELL="@comment "
.endif
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
@ -54,17 +46,23 @@ PLIST_SUB+= ASPELL="@comment "
#PLIST_SUB+= HSPELL="@comment " #PLIST_SUB+= HSPELL="@comment "
#.endif #.endif
pre-everything:: .ifndef(WITHOUT_ASPELL)
.if !defined(WITHOUT_ASPELL) || !defined(WITH_HSPELL) LIB_DEPENDS+= pspell.16:${PORTSDIR}/textproc/aspell
@${ECHO_CMD} '===> The following options are available for this port:' CONFIGURE_ARGS+=--enable-aspell \
.if !defined(WITHOUT_ASPELL) --with-aspell-prefix=${LOCALBASE}
@${ECHO_CMD} '===>' PLIST_SUB+= ASPELL=""
@${ECHO_CMD} '===> Define WITHOUT_ASPELL to disable aspell support' .else
CONFIGURE_ARGS+=--disable-aspell
PLIST_SUB+= ASPELL="@comment "
.endif .endif
#.if !defined(WITH_HSPELL)
# @${ECHO_CMD} '===>' .if defined(WITH_ZEMBEREK) && !defined(WITHOUT_DBUS)
# @${ECHO_CMD} '===> Define WITH_HSPELL to enable hspell (Hebrew) support' LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib
#.endif CONFIGURE_ARGS+= --enable-zemberek
PLIST_SUB+= ZEMBEREK=""
.else
PLIST_SUB+= ZEMBEREK="@comment "
CONFIGURE_ARGS+= --disable-zemberek
.endif .endif
post-patch: post-patch:

View file

@ -12,9 +12,9 @@ lib/enchant/libenchant_ispell.so
lib/enchant/libenchant_myspell.a lib/enchant/libenchant_myspell.a
lib/enchant/libenchant_myspell.la lib/enchant/libenchant_myspell.la
lib/enchant/libenchant_myspell.so lib/enchant/libenchant_myspell.so
lib/enchant/libenchant_zemberek.a %%ZEMBEREK%%lib/enchant/libenchant_zemberek.a
lib/enchant/libenchant_zemberek.la %%ZEMBEREK%%lib/enchant/libenchant_zemberek.la
lib/enchant/libenchant_zemberek.so %%ZEMBEREK%%lib/enchant/libenchant_zemberek.so
lib/libenchant.a lib/libenchant.a
lib/libenchant.la lib/libenchant.la
lib/libenchant.so lib/libenchant.so