aboutsummaryrefslogtreecommitdiffstats
path: root/cad/electric-ng/Makefile
blob: 59171c2542215003ad46a600c2b1f7bda5cd4c07 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# New ports collection makefile for:    electric-ng
# Date created:     2006-07-14
# Whom:         Stanislav Sedov <ssedov@mbsd.msk.ru>
#
# $MBSDlabs$
# $FreeBSD$
#

PORTNAME=   electric-ng
PORTVERSION=    8.08
PORTREVISION=   0
CATEGORIES= cad java
MASTER_SITES=   ${MASTER_SITE_GNU} \
        http://www.staticfreesoft.com/:1
MASTER_SITE_SUBDIR= ${PORTNAME:S/-ng//}
DISTNAME=   electric-${PORTVERSION}
EXTRACT_SUFX=   .jar
EXTRACT_ONLY=

MAINTAINER= stas@FreeBSD.org
COMMENT=    A sophisticated VLSI design system

USE_JAVA=   yes
JAVA_VERSION=   1.5+
NO_BUILD=   yes
PLIST_FILES=    %%JAVAJARDIR%%/${JARFILE} \
        bin/electric-ng
SUB_LIST+=  LIBFILES="${LIBFILES}" \
        JARFILE="${JARFILE}"
SUB_FILES=  electric-ng

OPTIONS=    BSH "Enable embedded java interpreter via BSH"  off \
        3D  "Enable 3D visualization via Java3D"        off \
        IRSIM   "Install IRSIM plugin"              off \
        ANIM    "Install 3D animation plugin"           off \
        AXIS    "Install 3D Axis Controller plugin"     off \
        RUSSIAN "Install Russian manual"            off

JARFILE=    ${DISTNAME}${EXTRACT_SUFX}
J3DLIB=     ${LOCALBASE}/share/java/java3d/jar/j3dcore.jar
PLUGINDIR=  ${PREFIX}/libexec/electric/

.include <bsd.port.pre.mk>

.if exists(${JAVALIBDIR}/bsh.jar)
WITH_BSH=   yes
.endif
.if defined(WITH_BSH)
RUN_DEPENDS+=   ${JAVALIBDIR}/bsh.jar:${PORTSDIR}/lang/bsh
LIBFILES+=  ${JAVALIBDIR}/bsh.jar
.endif

.if defined(WITH_AXIS)
WITH_3D=    yes
PLUGINS+=   electricJava3D-8.08
.endif

.if defined(WITH_ANIM)
WITH_3D=    yes
RUN_DEPENDS+=   ${JAVALIBDIR}/jmf.jar:${PORTSDIR}/java/jmf
PLUGINS+=   electricJMF-8.08
.endif

.if exists(${J3DLIB})
WITH_3D=    yes
.endif
.if defined(WITH_3D)
RUN_DEPENDS+=   ${J3DLIB}:${PORTSDIR}/java/java3d
.endif

.if defined(WITH_IRSIM)
PLUGINS+=   electricIRSIM-8.08
.endif

.if defined(WITH_RUSSIAN)
PLUGINS+=   electricRussianManual-8.08
.endif

.if defined(PLUGINS)
LIBFILES+=  ${PLUGINS:S,$,.jar,:S,^,${PLUGINDIR}/,}
DISTFILES=  ${PLUGINS:S,$,.jar,:S,$,:1,} ${DISTNAME}${EXTRACT_SUFX}
PLIST_FILES+=   ${PLUGINS:S,$,.jar,:S,^,libexec/electric/,}
.endif

do-install:
    @${MKDIR} ${JAVAJARDIR}
    ${INSTALL_DATA} ${DISTDIR}/${JARFILE} ${JAVAJARDIR}
    ${INSTALL_SCRIPT} ${WRKDIR}/electric-ng ${PREFIX}/bin

.if defined(PLUGINS)
    # Install plugins
    @${MKDIR} ${PLUGINDIR}/
    ${INSTALL_DATA} ${PLUGINS:S,^,${DISTDIR}/,:S,$,.jar,} ${PLUGINDIR}/
.endif

.include <bsd.port.post.mk>