# Created by: Sergey Kozlov # $FreeBSD$ PORTNAME= staf PORTVERSION= 3.4.23 PORTREVISION= 1 CATEGORIES= devel net MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/V${PORTVERSION} DISTNAME= STAF${PORTVERSION:S/.//g}-src MAINTAINER= kozlov.sergey.404@gmail.com COMMENT= Software Testing Automation Framework LICENSE= EPL LICENSE_FILE= ${WRKSRC}/LICENSE.htm WRKSRC= ${WRKDIR}/src WRKSRC_SUBDIR= ${PORTNAME} INSTALL_WRKSRC= ${WRKDIR}/rel/freebsd/staf/${STAF_BUILD_TYPE} MAKEFILE= makefile MAKE_ARGS= OS_NAME="freebsd" \ CC_CC=${CXX} \ CC_C=${CC} \ CFLAGS="${CFLAGS}" \ CXXFLAGS="${CXXFLAGS}" \ LINKFLAGS="${LDFLAGS}" \ STAF_USE_SSL=${STAF_USE_SSL} \ STAF_USE_IPV6=${STAF_USE_IPV6} \ ZLIB_ROOT=/usr \ BUILD_TYPE=${STAF_BUILD_TYPE} \ PROJECTS="${STAF_PROJECTS}" OPTIONS_DEFINE= DEBUG IPV6 OPENSSL PYTHON OPTIONS_DEFAULT=OPENSSL OPTIONS_SUB= yes DEBUG_VARS= staf_build_type=debug DEBUG_VARS_OFF= staf_build_type=retail IPV6_VARS= staf_use_ipv6=1 IPV6_VARS_OFF= staf_use_ipv6="" OPENSSL_VARS= staf_use_ssl=1 use_openssl=yes OPENSSL_MAKE_ARGS= OPENSSL_ROOT=${OPENSSLBASE} \ OPENSSL_LIBDIRS="${OPENSSLLIB}" \ OPENSSL_INCLUDEDIRS=${OPENSSLINC} OPENSSL_VARS_OFF= staf_use_ssl="" PYTHON_USES= python:-3.4 PYTHON_VARS= staf_projects+=python use_python=py3kplist PYTHON_MAKE_ARGS= PYTHON_V${PYTHON_SUFFIX}_ROOT=${LOCALBASE} \ PYTHON_V${PYTHON_SUFFIX}_INCLUDEDIRS=${PYTHON_INCLUDEDIR} \ PYTHON_V${PYTHON_SUFFIX}_LIBS=${PYTHON_VERSION}${PYTHON_ABIVER} \ PYTHON_BUILD_V${PYTHON_SUFFIX}=1 MAKE_JOBS_UNSAFE= yes USES= gmake USE_LDCONFIG= yes USE_RC_SUBR= stafproc SUB_LIST+= STAF_VAR_DIR=${STAF_VAR_DIR} PLIST_SUB+= STAF_VAR_DIR=${STAF_VAR_DIR} STAF_PROJECTS= staf connprov_tcp connprov_localipc zip STAF_BIN_FILES= STAF STAFProc STAFReg STAFLoop STAFExecProxy FmtLog STAF_LIB_FILES= libHello.so libSTAF.so libSTAFDSLS.so libSTAFDeviceService.so \ libSTAFEXECPROXY.so libSTAFLIPC.so libSTAFLog.so \ libSTAFMon.so libSTAFPool.so libSTAFReg.so libSTAFTCP.so \ libSTAFZip.so STAF_PYLIB_FILES= PySTAFLog.py PySTAFMon.py STAF_SSL_FILES= CAList.crt STAFDefault.crt STAFDefault.key STAF_PYTHON_VERSIONS= 22 23 24 25 26 27 30 31 32 33 34 STAF_VAR_DIR?= /var/db/STAF .include .if ${PORT_OPTIONS:MPYTHON} .if ${PYTHON_MAJOR_VER} == 2 STAF_PYLIB_FILES+= PySTAF.py PLIST_SUB+= PYTHON_2="" PYTHON_3="@comment " MAKE_ARGS+= PYTHON_V${PYTHON_SUFFIX}_LIBDIRS=${PYTHON_LIBDIR}/config .else STAF_PYLIB_FILES+= PySTAFv3.py PLIST_SUB+= PYTHON_3="" PYTHON_2="@comment " MAKE_ARGS+= PYTHON_V${PYTHON_SUFFIX}_LIBDIRS=${PYTHON_LIBDIR}/config-${PYTHON_VER}${PYTHON_ABIVER} .endif .for i in ${STAF_PYTHON_VERSIONS} .if ${PYTHON_SUFFIX} != ${i} PYTHON_MAKE_ARGS+= PYTHON_BUILD_V${i}=0 .endif .endfor .endif post-patch: ${REINPLACE_CMD} "s|%%DATADIR%%|${DATADIR}|" \ ${WRKSRC}/stafif/STAFConverter.cpp \ ${WRKSRC}/connproviders/tcp/STAFTCPConnProvider.cpp ${REINPLACE_CMD} "s|%%PREFIX%%|${PREFIX}|g" \ ${WRKSRC}/stafproc/STAFProc.cpp ${REINPLACE_CMD} "s|%%STAFVARDIR%%|${STAF_VAR_DIR}|g" \ ${WRKSRC}/stafproc/STAFProc.cpp do-install: .for bin in ${STAF_BIN_FILES} ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/bin/${bin} ${STAGEDIR}${PREFIX}/bin/ .endfor ${LN} -s ${PREFIX}/bin/STAF ${STAGEDIR}${PREFIX}/bin/staf .for lib in ${STAF_LIB_FILES} ${INSTALL_LIB} ${INSTALL_WRKSRC}/lib/${lib} ${STAGEDIR}${PREFIX}/lib/ .endfor ${INSTALL_DATA} ${INSTALL_WRKSRC}/bin/STAF.cfg \ ${STAGEDIR}${PREFIX}/etc/STAF.cfg.sample cd ${INSTALL_WRKSRC}/include && \ ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include ${MKDIR} ${STAGEDIR}${DATADIR}/codepage cd ${INSTALL_WRKSRC}/codepage && \ ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/codepage ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${INSTALL_WRKSRC}/samples && \ ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} do-install-OPENSSL-on: ${MKDIR} ${STAGEDIR}${DATADIR} .for sslfile in ${STAF_SSL_FILES} ${INSTALL_DATA} ${INSTALL_WRKSRC}/bin/${sslfile} ${STAGEDIR}${DATADIR} .endfor do-install-PYTHON-on: ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} .for lib in ${STAF_PYLIB_FILES} ${INSTALL_DATA} ${INSTALL_WRKSRC}/lib/${lib} \ ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} .endfor ${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR}/${PORTNAME} \ ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} ${PYTHON_CMD} -O -m compileall -d ${PYTHON_SITELIBDIR}/${PORTNAME} \ ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} ${INSTALL_LIB} ${INSTALL_WRKSRC}/lib/python${PYTHON_SUFFIX}/PYSTAF.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME} ${ECHO} ${PORTNAME} > ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}.pth ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${INSTALL_WRKSRC}/docs && \ ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} post-install: ${MKDIR} ${STAGEDIR}${STAF_VAR_DIR} .include