1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00
freebsd-ports/databases/luadbi/Makefile
Dmitry Marakasov 67971bd0fb Improve shebangfix framework
- Support multiple values in *_OLD_CMD, i.e. we can now fix both "/usr/bin/python" and "/usr/bin/env python" at the same time
- Default *_OLD_CMD values are now always appended, so you don't need to specify them in individual ports
- Add lua support (depends on USES=lua)
- Add more default values, such as "/usr/bin/env foo" for python, perl, bash, ruby and lua
- Shebangfix now matches whole words, e.g. we will no longer (erroneously) replace "/usr/bin/perl5.005" with "${perl_CMD}5.005" (but "/usr/bin/perl -tt" is still (correctly) replaced with "${perl_CMD} -tt")

Note that *_OLD_CMD items containing spaces must now be quoted (e.g. perl_OLD_CMD=/bin/perl /usr/bin/perl "/usr/bin/env perl")

Update shebangfix usage according to new rules in many ports:

- Remove *_OLD_CMD for patterns now replaced by default
- Quote custom *_OLD_CMD which contain spaces

Fix shebangfix usage in many ports (irrelevant to infrastructure change):

- Remove redundant SHEBANG_LANG (no need to duplicate default langs)
- Remove redundant *_CMD (such as python_CMD=${LOCALBASE}/bin/python${PYTHON_VER} when USES=python is present)
- Never use *_OLD_CMD in REINPLACE_CMD matchers, these should always look for exact string

Approved by:	portmgr (bapt)
Differential Revision:	D3756
2015-10-19 14:50:52 +00:00

61 lines
1.5 KiB
Makefile

# Created by: Olexander Melnyk <olexander.v.melnyk@gmail.com>
# $FreeBSD$
PORTNAME= luadbi
PORTVERSION= 0.5
PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= GOOGLE_CODE
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= olexander.v.melnyk@gmail.com
COMMENT= LuaDBI driver
LICENSE= MIT
NO_WRKSUBDIR= yes
USES= gmake lua:51 shebangfix
SHEBANG_FILES= DBI.lua
CFLAGS+= -fpic -I${LOCALBASE}/include -I${LUA_INCDIR} -I. \
-I${LOCALBASE}/include/postgresql/server
LDFLAGS+= -shared -L${LOCALBASE}/lib -L${LUA_LIBDIR}
MAKE_ENV+= COMMON_LDFLAGS="${LDFLAGS}"
OPTIONS_MULTI= DATABASE
OPTIONS_MULTI_DATABASE= MYSQL SQLITE3 PGSQL
OPTIONS_DEFAULT= MYSQL
PLIST_FILES= %%LUA_MODSHAREDIR%%/DBI.lua
MYSQL_USE= MYSQL=yes
MYSQL_LDFLAGS= -L ${LOCALBASE}/lib/mysql
MYSQL_CFLAGS= -I ${LOCALBASE}/include/mysql
MYSQL_ALL_TARGET= mysql
MYSQL_PLIST_FILES= %%LUA_MODLIBDIR%%/dbdmysql.so
SQLITE3_USE= SQLITE=3
SQLITE3_ALL_TARGET= sqlite3
SQLITE3_PLIST_FILES= %%LUA_MODLIBDIR%%/dbdsqlite3.so
PGSQL_USES= pgsql
PGSQL_ALL_TARGET= psql
PGSQL_PLIST_FILES= %%LUA_MODLIBDIR%%/dbdpostgresql.so
do-install:
@${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
@${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}
${CP} ${WRKSRC}/DBI.lua ${STAGEDIR}${LUA_MODSHAREDIR}
do-install-MYSQL-on:
${INSTALL_PROGRAM} ${WRKSRC}/dbdmysql.so ${STAGEDIR}${LUA_MODLIBDIR}
do-install-SQLITE3-on:
${INSTALL_PROGRAM} ${WRKSRC}/dbdsqlite3.so ${STAGEDIR}${LUA_MODLIBDIR}
do-install-PGSQL-on:
${INSTALL_PROGRAM} ${WRKSRC}/dbdpostgresql.so ${STAGEDIR}${LUA_MODLIBDIR}
.include <bsd.port.mk>