Convert to options target helper
- Use PORTVERSION - Sort USE_PYTHON and USES
This commit is contained in:
parent
df6fb936bc
commit
8630174173
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=447420
@ -2,8 +2,8 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= MySQLdb
|
||||
PORTVERSION= 1.2.5
|
||||
DISTVERSIONPREFIX= ${PORTNAME}-
|
||||
DISTVERSION= 1.2.5
|
||||
CATEGORIES= databases python
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
@ -13,8 +13,8 @@ COMMENT= Access a MySQL database through Python
|
||||
LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/GPL-2.0
|
||||
|
||||
USES= python:2 mysql
|
||||
USE_PYTHON= distutils autoplist
|
||||
USES= mysql python:2
|
||||
USE_PYTHON= autoplist distutils
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= farcepest
|
||||
GH_PROJECT= ${PORTNAME}1
|
||||
@ -29,18 +29,15 @@ OPTIONS_DEFINE= DOCS MYSQLCLIENT_R
|
||||
OPTIONS_DEFAULT= MYSQLCLIENT_R
|
||||
MYSQLCLIENT_R_DESC= Use libmysqlclient_r (thread safe)
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MMYSQLCLIENT_R}
|
||||
pre-configure:
|
||||
@${REINPLACE_CMD} -E -e "s|(threadsafe.*)True|\1 False|" \
|
||||
${WRKSRC}/site.cfg
|
||||
.endif
|
||||
pre-configure-MYSQLCLIENT_R-on:
|
||||
${REINPLACE_CMD} -e '/threadsafe = / s|True|False|' ${WRKSRC}/site.cfg
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_mysql.so
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/* ${STAGEDIR}${DOCSDIR}
|
||||
${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_mysql.so
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user