freebsd-ports/lang/mtasc/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

77 lines
2.3 KiB
Makefile

PORTNAME= mtasc
PORTVERSION= 1.14
PORTREVISION= 1
CATEGORIES= lang www
MASTER_SITES= LOCAL/chinsan
MAINTAINER= saper@saper.info
COMMENT= Motion-Twin ActionScript 2 Compiler
WWW= https://mtasc.org/
LICENSE= GPLv2+
BUILD_DEPENDS= ${LOCALBASE}/lib/ocaml/site-lib/extlib/IO.cmi:devel/ocaml-extlib
USE_OCAML= yes
USE_OCAML_FINDLIB=yes
USE_OCAML_CAMLP4=yes
OCAML_PKGDIRS= # This port uses ocaml-findlib but doesn't install one
OCAMLLEX?= ${LOCALBASE}/bin/ocamllex
OCAMLOPT?= ${LOCALBASE}/bin/ocamlopt
ZLIB_OPTS= -cclib "${WRKSRC}/extc/extc_stubs.o" -cclib -lz extc.mli extc.ml
SWFLIB_INC= -I ${WRKSRC}/extc -I ${WRKSRC}/swflib
SWFLIB_FILES= as3.mli as3code.ml as3parse.ml swf.ml swfZip.ml actionScript.ml \
swfParser.ml
MTASC_OBJ= expr.cmx lexer.cmx parser.cmx typer.cmx class.cmx plugin.cmx\
genSwf.cmx main.cmx
WRKSRC= ${WRKDIR}/ocaml
PORTDATA= std std8
OPTIONS_DEFINE= DOCS EXAMPLES
post-patch:
@${REINPLACE_CMD} -E 's,n(read|write) ch,n\1_string ch,' \
${WRKSRC}/swflib/actionScript.ml \
${WRKSRC}/swflib/as3code.ml \
${WRKSRC}/swflib/as3parse.ml \
${WRKSRC}/swflib/swfParser.ml
do-build:
(cd ${WRKSRC}/extc && \
${OCAMLOPT} ${WRKSRC}/extc/extc_stubs.c && \
${OCAMLOPT} -a -o extc.cmxa ${ZLIB_OPTS} )
(cd ${WRKSRC}/swflib && \
${OCAMLFIND} ocamlopt -package extlib \
-a -o swflib.cmxa ${SWFLIB_INC} ${SWFLIB_FILES} )
(cd ${WRKSRC}/mtasc && \
${OCAMLLEX} lexer.mll && \
${OCAMLOPT} -c expr.ml lexer.ml && \
${OCAMLOPT} -c -pp camlp4o parser.ml && \
${OCAMLFIND} ocamlopt -package extlib -c ${SWFLIB_INC} \
typer.ml class.ml plugin.ml \
genSwf.ml main.ml )
(cd ${WRKSRC}/mtasc && \
${OCAMLFIND} ocamlopt -package extlib -linkpkg \
-o ${WRKSRC}/mtasc-bin \
${WRKSRC}/extc/extc.cmxa \
${WRKSRC}/swflib/swflib.cmxa \
${MTASC_OBJ} )
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/mtasc-bin ${STAGEDIR}${PREFIX}/bin/mtasc
@${MKDIR} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC}/mtasc && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR})
${INSTALL_MAN} ${WRKSRC}/mtasc/doc/mtasc.1 ${STAGEDIR}${PREFIX}/man/man1
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/mtasc/doc/*.txt ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/mtasc/doc/HelloWorld.as ${STAGEDIR}${EXAMPLESDIR}
# Remove orphan dir created by bsd.ocaml.mk
-@${RMDIR} -p ${STAGEDIR}${OCAMLFIND_DESTDIR}
.include <bsd.port.mk>