pkgsrc/databases/tokyocabinet/options.mk
obache 3b22e3b7cf Introduce PKG_OPTIONS for database/tokyocabinet to select compression support
(zlib/bzip2/lzo/lzma and enabled by default for former two).

LZO and LZMA supports are exclusive, optional and should be selected by
user's use-case (priority of data compression ratio, compression speed,
or so on).

Furthermore, Tokyocabinet uses archives/lzmalib for lzma support, but lzmalib
conflicts with archivers/xz.
It means if tokyocabinet is installed with lzma, failed to install xz,
and result in failure of "make extract" for packages using .lzma/.xz distfiles.
This issue also resolved by optionify lzma support and disabled by default.

This changes also make tokyocabinet ABI changes, so bump PKGREVISION
and recursive bump.

OKed to commit in freeze by wiz@.
2009-12-19 12:56:45 +00:00

40 lines
1,005 B
Makefile

# $NetBSD: options.mk,v 1.1 2009/12/19 12:56:45 obache Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.tokyocabinet
PKG_SUPPORTED_OPTIONS= zlib bzip2
PKG_OPTIONS_OPTIONAL_GROUPS= codec
PKG_OPTIONS_GROUP.codec= lzma lzo
PKG_SUGGESTED_OPTIONS= zlib bzip2
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mzlib)
.include "../../devel/zlib/buildlink3.mk"
CONFIGURE_ARGS+= --enable-zlib
CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib}
.else
CONFIGURE_ARGS+= --disable-zlib
.endif
.if !empty(PKG_OPTIONS:Mbzip2)
.include "../../archivers/bzip2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-bzip
CONFIGURE_ARGS+= --with-bzip=${BUILDLINK_PREFIX.bzip2}
.else
CONFIGURE_ARGS+= --disable-bzip
.endif
.if !empty(PKG_OPTIONS:Mlzma)
.include "../../archivers/lzmalib/buildlink3.mk"
CONFIGURE_ARGS+= --enable-exlzma
.else
CONFIGURE_ARGS+= --disable-exlzma
.endif
.if !empty(PKG_OPTIONS:Mlzo)
.include "../../archivers/lzo/buildlink3.mk"
CONFIGURE_ARGS+= --enable-exlzo
.else
CONFIGURE_ARGS+= --disable-exlzo
.endif