1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

lang/mit-scheme: modernize option handling.

This commit is contained in:
Jimmy Olgeni 2019-02-10 10:17:45 +00:00
parent d9e80cf72c
commit 8afa6f2d5b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=492596
2 changed files with 28 additions and 58 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= mit-scheme
PORTVERSION= 9.2
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= lang scheme
MASTER_SITES= GNU/mit-scheme/stable.pkg/${PORTVERSION}
DISTNAME= ${PORTNAME}-${PORTVERSION}-${MIT_SCHEME_ARCH}
@ -19,67 +19,34 @@ USES= gmake
WRKSRC= ${WRKDIR}/mit-scheme-${PORTVERSION}/src/
OPTIONS_DEFINE= GDBM MCRYPT MHASH OPENSSL PGSQL X11
OPTIONS_SUB= yes
MCRYPT_DESC= mcrypt library support
MHASH_DESC= mhash library support
GDBM_CONFIGURE_ENABLE= gdbm
MCRYPT_CONFIGURE_ENABLE= mcrypt
MHASH_CONFIGURE_ENABLE= mhash
OPENSSL_CONFIGURE_ENABLE= openssl
PGSQL_CONFIGURE_ENABLE= pgsql
X11_CONFIGURE_ENABLE= x11
GDBM_CONFIGURE_WITH= gdbm=${LOCALBASE}
MCRYPT_CONFIGURE_WITH= mcrypt=${LOCALBASE}
MHASH_CONFIGURE_WITH= mhash=${LOCALBASE}
OPENSSL_CONFIGURE_WITH= openssl
PGSQL_CONFIGURE_WITH= libpq=${LOCALBASE}
X11_CONFIGURE_WITH= x
OPENSSL_USES= ssl
PGSQL_USES= pgsql
X11_USE= xorg=x11
GDBM_LIB_DEPENDS+= libgdbm.so:databases/gdbm
MHASH_LIB_DEPENDS+= libmhash.so:security/mhash
MCRYPT_LIB_DEPENDS+= libmcrypt.so:security/libmcrypt
.include <bsd.port.pre.mk>
# TODO implement db4 support
CONFIGURE_ARGS+=--without-db-4
.if ${PORT_OPTIONS:MGDBM}
PLIST_SUB+= GDBM=""
CONFIGURE_ARGS+=--with-gdbm=${LOCALBASE}
LIB_DEPENDS+= libgdbm.so:databases/gdbm
.else
PLIST_SUB+= GDBM="@comment "
CONFIGURE_ARGS+=--without-gdbm
.endif
.if ${PORT_OPTIONS:MMHASH}
PLIST_SUB+= MHASH=""
CONFIGURE_ARGS+=--with-mhash=${LOCALBASE}
LIB_DEPENDS+= libmhash.so:security/mhash
.else
PLIST_SUB+= MHASH="@comment "
CONFIGURE_ARGS+=--without-mhash
.endif
.if ${PORT_OPTIONS:MMCRYPT}
PLIST_SUB+= MCRYPT=""
CONFIGURE_ARGS+=--with-mcrypt=${LOCALBASE}
LIB_DEPENDS+= libmcrypt.so:security/libmcrypt
.else
PLIST_SUB+= MCRYPT="@comment "
CONFIGURE_ARGS+=--without-mcrypt
.endif
.if ${PORT_OPTIONS:MOPENSSL}
PLIST_SUB+= OPENSSL=""
CONFIGURE_ARGS+=--with-openssl
.else
PLIST_SUB+= OPENSSL="@comment "
CONFIGURE_ARGS+=--without-openssl
.endif
.if ${PORT_OPTIONS:MPGSQL}
PLIST_SUB+= POSTGRESQL=""
CONFIGURE_ARGS+=--with-libpq=${LOCALBASE}
USES+= pgsql
.else
PLIST_SUB+= POSTGRESQL="@comment "
CONFIGURE_ARGS+=--without-libpq
.endif
.if ${PORT_OPTIONS:MX11}
PLIST_SUB+= X11=""
CONFIGURE_ARGS+=--with-x
USE_XORG= x11
.else
PLIST_SUB+= X11="@comment "
CONFIGURE_ARGS+=--without-x
.endif
.if ${ARCH} == amd64
MIT_SCHEME_ARCH=x86-64
.else
@ -101,4 +68,7 @@ do-install:
@cd ${WRKDIR}/mit-scheme-${PORTVERSION}/src && ${MAKE_CMD} install DESTDIR=${STAGEDIR}
${INSTALL_MAN} ${WRKDIR}/mit-scheme-${PORTVERSION}/doc/scheme.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/
[ $$(${LS} ${STAGEDIR}${PREFIX}/lib/mit-scheme-${MIT_SCHEME_ARCH}/lib/ | wc -l) = 0 ] || \
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mit-scheme-${MIT_SCHEME_ARCH}/lib/*.so
.include <bsd.port.post.mk>

View File

@ -781,7 +781,7 @@ lib/mit-scheme-%%MIT_SCHEME_ARCH%%/xml/xml-w32.pkd
%%MCRYPT%%lib/mit-scheme-%%MIT_SCHEME_ARCH%%/lib/prmcrypt.so
%%MHASH%%lib/mit-scheme-%%MIT_SCHEME_ARCH%%/lib/prmhash.so
%%OPENSSL%%lib/mit-scheme-%%MIT_SCHEME_ARCH%%/lib/prmd5.so
%%POSTGRESQL%%lib/mit-scheme-%%MIT_SCHEME_ARCH%%/lib/prpgsql.so
%%PGSQL%%lib/mit-scheme-%%MIT_SCHEME_ARCH%%/lib/prpgsql.so
%%X11%%lib/mit-scheme-%%MIT_SCHEME_ARCH%%/lib/prx11.so
man/man1/scheme.1.gz
@dir lib/mit-scheme-%%MIT_SCHEME_ARCH%%/lib