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

View file

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