aboutsummaryrefslogtreecommitdiffstats
path: root/lang/hla/Makefile
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2008-06-03 03:46:21 +0800
committergahr <gahr@FreeBSD.org>2008-06-03 03:46:21 +0800
commit18d65381a9a7a9c90a18a3092ae29ad2c59ad978 (patch)
treebe669111bcbfd235ecb323005dadf99d81c03152 /lang/hla/Makefile
parenta5e53642a03d6e4c28f5c2817f515fa1936fdf13 (diff)
downloadfreebsd-ports-gnome-18d65381a9a7a9c90a18a3092ae29ad2c59ad978.tar.gz
freebsd-ports-gnome-18d65381a9a7a9c90a18a3092ae29ad2c59ad978.tar.zst
freebsd-ports-gnome-18d65381a9a7a9c90a18a3092ae29ad2c59ad978.zip
- New port: hla
High Level Assembler (HLA) is an assembly language developed by Randall Hyde which can use high-level language constructs to aid x86 assembly programmer beginners and advanced assembly developers alike.
Diffstat (limited to 'lang/hla/Makefile')
-rw-r--r--lang/hla/Makefile89
1 files changed, 89 insertions, 0 deletions
diff --git a/lang/hla/Makefile b/lang/hla/Makefile
new file mode 100644
index 000000000000..66c0ab47c660
--- /dev/null
+++ b/lang/hla/Makefile
@@ -0,0 +1,89 @@
+# vim: ts=8
+# New ports collection Makefile for: hla
+# Date created: 29 May 2008
+# Whom: gahr
+#
+# $FreeBSD$
+#
+
+PORTNAME= hla
+PORTVERSION= 1.102
+CATEGORIES= lang
+MASTER_SITES= http://webster.cs.ucr.edu/AsmTools/HLA/HLAv${PORTVERSION}/:src \
+ http://www.gahr.ch/FreeBSD/HLA/:extra
+PKGNAMEPREFIX= linux-
+DISTFILES= ${PORTNAME}src${EXTRACT_SUFX}:src \
+ HLARef_html${EXTRACT_SUFX}:src \
+ HLAStdlib_html${EXTRACT_SUFX}:src \
+ linux.${PORTNAME}.tar.gz:src\
+ lex.yy.c:extra \
+ hello.hla:extra
+EXTRACT_ONLY= ${PORTNAME}src${EXTRACT_SUFX}
+
+MAINTAINER= gahr@FreeBSD.org
+COMMENT= High Level Assembly
+
+USE_ZIP= yes
+USE_BISON= build
+USE_LINUX= yes
+
+WRKSRC= ${WRKDIR}/hlasrc/working
+MAKEFILE= makefile.bsd
+ALL_TARGET= hlaparse hla
+
+ONLY_FOR_ARCHS= i386
+
+post-extract:
+ ${MKDIR} ${WRKDIR}/stdlib && \
+ ${TAR} -zxf ${DISTDIR}/linux.${PORTNAME}.tar.gz -C ${WRKDIR}/stdlib
+ ${CP} ${DISTDIR}/lex.yy.c ${WRKSRC}
+ ${CP} ${DISTDIR}/hello.hla ${WRKSRC}
+.if !defined(NOPORTDOCS)
+ (${MKDIR} ${WRKDIR}/HLAStdlib && \
+ ${UNZIP_CMD} -q ${DISTDIR}/HLAStdlib_html${EXTRACT_SUFX} -d ${WRKDIR}/HLAStdlib \
+ )
+ (${MKDIR} ${WRKDIR}/HLAReference && \
+ ${UNZIP_CMD} -q ${DISTDIR}/HLARef_html${EXTRACT_SUFX} -d ${WRKDIR}/HLAReference \
+ )
+.endif
+
+post-patch:
+ ${REINPLACE_CMD} -e '/flex/d' ${WRKSRC}/makefile.bsd
+
+do-configure:
+ (cd ${WRKSRC} && bison -o hlaparse.c hlaparse.bsn)
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/hla ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/hlaparse ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKDIR}/stdlib/hla/hlalib/hlalib.a ${PREFIX}/lib
+ ${INSTALL} -d ${PREFIX}/include/hla
+ (cd ${WRKDIR}/stdlib/hla/include && ${COPYTREE_SHARE} \* ${PREFIX}/include/hla)
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d ${DOCSDIR}/Reference
+ ${INSTALL} -d ${DOCSDIR}/Stdlib
+ (cd ${WRKDIR}/HLAReference && ${COPYTREE_SHARE} \* ${DOCSDIR}/Reference)
+ (cd ${WRKDIR}/HLAStdlib && ${COPYTREE_SHARE} \* ${DOCSDIR}/Stdlib)
+.endif
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "Testing HLA installation..."
+ @( \
+ hlainc=${PREFIX}/include/hla hlalib=${PREFIX}/lib/hlalib.a \
+ ${WRKSRC}/hla ${WRKSRC}/hello.hla && \
+ ${BRANDELF} -t Linux ${WRKSRC}/hello && \
+ ${WRKSRC}/hello \
+ )
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "Remember to set the following environment variables:"
+ @${ECHO_MSG} "hlainc -> ${PREFIX}/include/hla"
+ @${ECHO_MSG} "hlalib -> ${PREFIX}/lib/hlalib.a"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "Remember that your executables must be run under the Linux ABI:"
+ @${ECHO_MSG} "> hla hello.hla"
+ @${ECHO_MSG} "> brandelf -t Linux hello"
+ @${ECHO_MSG} "> ./hello"
+ @${ECHO_MSG} ""
+
+.include <bsd.port.mk>