aboutsummaryrefslogtreecommitdiff
path: root/lang/scala/Makefile
blob: 6f236819bbc4e3e96c89ed5ebb1f03c4bd587dee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Created by: Mitsuru YOSHIDA <mitsuru@riken.jp>

PORTNAME=	scala
PORTVERSION=	2.13.1
CATEGORIES=	lang java
MASTER_SITES=	http://www.scala-lang.org/files/archive/

MAINTAINER=	freebsd-ports@jan0sch.de
COMMENT=	Scala Programming Language

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/doc/LICENSE.md

RUN_DEPENDS=	bash:shells/bash

USES=		tar:tgz

OPTIONS_DEFINE=	DOCS

NO_ARCH=	yes
NO_BUILD=	yes
USE_JAVA=	yes
JAVA_VERSION=	1.8+

SCALA_HOME=	${DATADIR}
SCALA_SHRDIRS=	lib
SCALA_DOCDIRS=	tools
SCALA_BINS=	fsc \
		scala \
		scalac \
		scaladoc \
		scalap

SCALA_MANS=	${SCALA_BINS:S,$,.1,}
PLIST_FILES=	${SCALA_BINS:S,^,bin/,} \
	man/man1/fsc.1.gz \
	man/man1/scala.1.gz \
	man/man1/scalac.1.gz \
	man/man1/scaladoc.1.gz \
	man/man1/scalap.1.gz

PORTDATA=	*
PORTDOCS=	*

pre-patch:
	@${ECHO_MSG} "Installation settings:"
	@${ECHO_MSG} "   SCALA_HOME:    ${SCALA_HOME}"

do-install:
	@${MKDIR} ${STAGEDIR}${SCALA_HOME}/bin
.for f in ${SCALA_BINS}
	${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${SCALA_HOME}/bin/${f}
	${LN} -s ${SCALA_HOME}/bin/${f} ${STAGEDIR}${PREFIX}/bin/${f}
.endfor
.for d in ${SCALA_SHRDIRS}
	(cd ${WRKSRC}/${d} && ${COPYTREE_SHARE} . ${STAGEDIR}${SCALA_HOME}/${d})
.endfor
.for m in ${SCALA_MANS}
	${INSTALL_MAN} ${WRKSRC}/man/man1/${m} ${STAGEDIR}${MANPREFIX}/man/man1/${m}
.endfor

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for d in ${SCALA_DOCDIRS}
	(cd ${WRKSRC}/doc/${d} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/${d})
.endfor

.include <bsd.port.mk>