-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (67 loc) · 2.92 KB
/
Makefile
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
PORTNAME= intellij-idea-ce
PORTVERSION= 2023.3.6
CATEGORIES= java devel
MASTER_SITES= https://download.jetbrains.com/idea/
DISTNAME= ideaIC-${PORTVERSION}
DIST_SUBDIR= jetbrains
MAINTAINER= [email protected]
COMMENT= IntelliJ IDEA Community Edition
WWW= https://www.jetbrains.com/idea/
LICENSE= APACHE20
BUILD_DEPENDS= jna>0:devel/jna
RUN_DEPENDS= intellij-fsnotifier>0:java/intellij-fsnotifier \
jetbrains-pty4j>=0.12.25:devel/jetbrains-pty4j \
jetbrains-restarter>=233.14015.106:devel/jetbrains-restarter \
jetbrains-sqlite>=233.14015.106:devel/jetbrains-sqlite \
lsof:sysutils/lsof
USES= cpe python:run
CPE_VENDOR= jetbrains
CPE_PRODUCT= ${PORTNAME}_idea
USE_JAVA= yes
JAVA_VERSION= 17+
DATADIR= ${PREFIX}/share/jetbrains/${PORTNAME}
NO_ARCH= yes
NO_ARCH_IGNORE= libjnidispatch.so
NO_BUILD= yes
SUB_FILES= ${PORTNAME} ${PORTNAME}.desktop pkg-message
SUB_LIST= JAVA_HOME=${JAVA_HOME}
WRKSRC= ${WRKDIR}/idea-IC-233.15026.9
do-install:
# Linux/Windows/OS X only so remove them
@${RM} -r \
${WRKSRC}/bin/fsnotifier \
${WRKSRC}/bin/remote-dev-server.sh \
${WRKSRC}/bin/repair \
${WRKSRC}/bin/restarter \
${WRKSRC}/jbr \
${WRKSRC}/lib/async-profiler \
${WRKSRC}/lib/jna \
${WRKSRC}/lib/native \
${WRKSRC}/lib/pty4j \
${WRKSRC}/plugins/cwm-plugin \
${WRKSRC}/plugins/gateway-plugin \
${WRKSRC}/plugins/remote-dev-server \
${WRKSRC}/plugins/webp/lib/libwebp
${MKDIR} ${STAGEDIR}${DATADIR}
@(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} \
"! -name *\.bak ! -name *\.so ! -name *\.dll ! -name *\.dylib ! -name *\.pdb ! -name *\.sh ! -name *\.exe")
@(cd ${WRKSRC}/bin && ${COPYTREE_BIN} . ${STAGEDIR}${DATADIR}/bin/ \
"-name *\.sh -o -name *\.py")
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/
# Use fsnotifier replacement provided by java/intellij-fsnotifier
${ECHO} "idea.filewatcher.executable.path=${PREFIX}/bin/fsnotifier" >> ${STAGEDIR}${DATADIR}/bin/idea.properties
# Install FreeBSD native lib provided by devel/jna
@${MKDIR} ${WRKDIR}/jna
@(cd ${WRKDIR}/jna && ${JAR} xf ${JAVAJARDIR}/jna.jar com/sun/jna/freebsd-x86-64/libjnidispatch.so)
${MKDIR} ${STAGEDIR}${DATADIR}/lib/jna/amd64
${INSTALL_LIB} ${WRKDIR}/jna/com/sun/jna/freebsd-x86-64/libjnidispatch.so ${STAGEDIR}${DATADIR}/lib/jna/amd64/
# Use pty4j replacement provided by devel/jetbrains-pty4j
${MKDIR} ${STAGEDIR}${DATADIR}/lib/pty4j/freebsd/x86-64
${LN} -sf ../../../../../pty4j/amd64/libpty.so ${STAGEDIR}${DATADIR}/lib/pty4j/freebsd/x86-64/libpty.so
# Use restarter provided by devel/jetbrains-restarter
${LN} -sf ../../restarter/restarter ${STAGEDIR}${DATADIR}/bin/restarter
# Use sqlite replacement provided by devel/jetbrains-sqlite
${MKDIR} ${STAGEDIR}${DATADIR}/lib/native/linux-x86_64
${LN} -sf ../../../../sqlite/amd64/libsqliteij.so ${STAGEDIR}${DATADIR}/lib/native/linux-x86_64/libsqliteij.so
.include <bsd.port.mk>