#!/bin/sh
# This is a shell archive
echo x php74-sqlsrv
mkdir -p php74-sqlsrv > /dev/null 2>&1
echo x php74-sqlsrv/distinfo
sed 's/^X//' > php74-sqlsrv/distinfo << 'SHAR_END'
XTIMESTAMP = 1638565776
XSHA256 (microsoft-msphpsql-5.9.0-v5.9.0_GH0.tar.gz) = fe960c4c32c83cd98c84fe85c5cdcb145ed0679ee36a3ab6f16132249a4c0d61
XSIZE (microsoft-msphpsql-5.9.0-v5.9.0_GH0.tar.gz) = 10762839
SHAR_END
echo x php74-sqlsrv/Makefile
sed 's/^X//' > php74-sqlsrv/Makefile << 'SHAR_END'
X# Created by: Anish Mistry <anish.mistry@arcanumbridge.com>
X
XPORTNAME=	sqlsrv
XPORTVERSION=	5.9.0
XCATEGORIES=	databases
XPKGNAMEPREFIX=	${FLAVOR}-
XDISTNAME=	v${PORTVERSION}
X
XMAINTAINER=	anish.mistry@arcanumbridge.com
XCOMMENT=	MS SQL Server Database Driver
X
XLICENSE=	MIT
X
XBUILD_DEPENDS=	bash:shells/bash
XLIB_DEPENDS=	libodbc.so:databases/unixODBC
X
XUSES=		php:ext
X
XWRKSRC_SUBDIR=	source/${PORTNAME}
XUSE_PHP=	iconv
XUSE_GITHUB=	yes
XGH_PROJECT=	msphpsql
XGH_ACCOUNT=	microsoft
XGH_TAGNAME=	v${PORTVERSION}
X
XCONFIGURE_ARGS+=	CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include" LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
XHAS_CONFIGURE=	yes
X
Xpost-patch:
X	${REINPLACE_CMD} -e 's|/bin|${LOCALBASE}/bin|g' "${WRKSRC}/../packagize.sh"
X	${CHMOD} +x "${WRKSRC}/../packagize.sh" && cd "${WRKSRC}/.." && "${WRKSRC}/../packagize.sh"
X
XTEST_TARGET=	test
X
X.include <bsd.port.mk>
SHAR_END
echo x php74-sqlsrv/pkg-descr
sed 's/^X//' > php74-sqlsrv/pkg-descr << 'SHAR_END'
XOfficial Microsoft Drivers for PHP for SQL Server
X
XWWW: https://github.com/microsoft/msphpsql
SHAR_END
exit
