2013-03-08 11:32:11 +00:00
|
|
|
# Created by: gahr
|
2008-06-02 19:46:21 +00:00
|
|
|
|
|
|
|
PORTNAME= hla
|
2008-12-09 16:54:42 +00:00
|
|
|
PORTVERSION= 1.103
|
2008-06-02 19:46:21 +00:00
|
|
|
CATEGORIES= lang
|
2016-03-06 17:35:38 +00:00
|
|
|
MASTER_SITES= http://www.gahr.ch/FreeBSD/HLA/
|
|
|
|
DISTFILES= ${PORTNAME}src${EXTRACT_SUFX} bsd.hla.tar.gz lex.yy.c
|
2008-12-09 16:54:42 +00:00
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
2008-06-02 19:46:21 +00:00
|
|
|
EXTRACT_ONLY= ${PORTNAME}src${EXTRACT_SUFX}
|
|
|
|
|
2014-07-23 17:30:45 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2008-06-02 19:46:21 +00:00
|
|
|
COMMENT= High Level Assembly
|
|
|
|
|
2020-05-22 13:50:21 +00:00
|
|
|
BUILD_DEPENDS= as:devel/binutils
|
|
|
|
|
2017-01-13 07:21:04 +00:00
|
|
|
USES= bison dos2unix zip:infozip
|
2008-06-02 19:46:21 +00:00
|
|
|
|
2008-12-09 16:54:42 +00:00
|
|
|
WRKSRC= ${WRKDIR}/hlasrc/trunk/trunk
|
2008-06-02 19:46:21 +00:00
|
|
|
MAKEFILE= makefile.bsd
|
|
|
|
ALL_TARGET= hlaparse hla
|
|
|
|
|
2014-07-30 14:06:45 +00:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
2008-06-02 19:46:21 +00:00
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
|
2014-07-30 14:06:45 +00:00
|
|
|
OPTIONS_DEFINE= DOCS TEST
|
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MDOCS} || make(makesum)
|
2016-03-06 17:35:38 +00:00
|
|
|
DISTFILES+= HLARef_html${EXTRACT_SUFX} HLAstdlib_html${EXTRACT_SUFX}
|
2014-07-30 14:06:45 +00:00
|
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MTEST} || make(makesum)
|
2016-03-06 17:35:38 +00:00
|
|
|
DISTFILES+= hello.hla
|
2014-07-30 14:06:45 +00:00
|
|
|
.endif
|
|
|
|
|
2016-11-02 22:45:14 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2008-06-02 19:46:21 +00:00
|
|
|
post-extract:
|
|
|
|
${MKDIR} ${WRKDIR}/stdlib && \
|
2008-12-09 16:54:42 +00:00
|
|
|
${TAR} -zxf ${_DISTDIR}/bsd.${PORTNAME}.tar.gz -C ${WRKDIR}/stdlib
|
|
|
|
${CP} ${_DISTDIR}/lex.yy.c ${WRKSRC}
|
2016-04-05 15:56:55 +00:00
|
|
|
|
|
|
|
post-extract-TEST-on:
|
2008-12-09 16:54:42 +00:00
|
|
|
${CP} ${_DISTDIR}/hello.hla ${WRKSRC}
|
2016-04-05 15:56:55 +00:00
|
|
|
|
|
|
|
post-extract-DOCS-on:
|
2008-12-09 16:54:42 +00:00
|
|
|
(${MKDIR} ${WRKDIR}/HLAstdlib && \
|
2008-12-15 13:20:17 +00:00
|
|
|
${UNZIP_CMD} -q ${_DISTDIR}/HLAstdlib_html${EXTRACT_SUFX} -d ${WRKDIR}/HLAstdlib \
|
2008-06-02 19:46:21 +00:00
|
|
|
)
|
|
|
|
(${MKDIR} ${WRKDIR}/HLAReference && \
|
2008-12-09 16:54:42 +00:00
|
|
|
${UNZIP_CMD} -q ${_DISTDIR}/HLARef_html${EXTRACT_SUFX} -d ${WRKDIR}/HLAReference \
|
2008-06-02 19:46:21 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
post-patch:
|
2014-07-30 14:06:45 +00:00
|
|
|
@${REINPLACE_CMD} -e '/flex/d; s|gcc|${CC}|; s|-O2|${CFLAGS}|; \
|
|
|
|
s|-static-libgcc||' ${WRKSRC}/makefile.bsd
|
2008-06-02 19:46:21 +00:00
|
|
|
|
|
|
|
do-configure:
|
|
|
|
(cd ${WRKSRC} && bison -o hlaparse.c hlaparse.bsn)
|
|
|
|
|
|
|
|
do-install:
|
2014-07-30 14:06:45 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/hla ${STAGEDIR}${PREFIX}/bin
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/hlaparse ${STAGEDIR}${PREFIX}/bin
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/stdlib/hla/hlalib/hlalib.a ${STAGEDIR}${PREFIX}/lib
|
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/include/hla
|
2016-02-22 20:54:46 +00:00
|
|
|
@${CHMOD} 755 ${WRKDIR}/stdlib/hla/include/include # broken archive
|
2014-07-30 14:06:45 +00:00
|
|
|
(cd ${WRKDIR}/stdlib/hla/include/include && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/hla)
|
2008-06-02 19:46:21 +00:00
|
|
|
|
2016-04-05 15:56:55 +00:00
|
|
|
post-install-DOCS-on:
|
2014-07-30 14:06:45 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}/Reference ${STAGEDIR}${DOCSDIR}/stdlib
|
|
|
|
(cd ${WRKDIR}/HLAReference && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/Reference)
|
|
|
|
(cd ${WRKDIR}/HLAstdlib && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/stdlib)
|
2016-04-05 15:56:55 +00:00
|
|
|
|
|
|
|
do-test-TEST-on:
|
2008-06-02 19:46:21 +00:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "Testing HLA installation..."
|
|
|
|
@( \
|
2014-07-30 14:06:45 +00:00
|
|
|
hlainc=${STAGEDIR}${PREFIX}/include/hla hlalib=${STAGEDIR}${PREFIX}/lib/hlalib.a \
|
|
|
|
PATH=${PATH}:${STAGEDIR}${PREFIX}/bin ${WRKSRC}/hla ${WRKSRC}/hello.hla && \
|
2008-06-02 19:46:21 +00:00
|
|
|
${WRKSRC}/hello \
|
|
|
|
)
|
|
|
|
|
2016-11-02 22:45:14 +00:00
|
|
|
.include <bsd.port.post.mk>
|