blob: 1180165672a8be9cbd0ff91aa330340422887835 (
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
|
PORTNAME= jts
DISTVERSION= 1.18.1
DISTVERSIONPREFIX= jts-
CATEGORIES= math databases java
MAINTAINER= mfechner@FreeBSD.org
COMMENT= JTS Topology Suite
WWW= https://github.com/locationtech/jts
LICENSE= EPL
#LICENSE_COMB= dual
BUILD_DEPENDS= maven>0:devel/maven
USE_GITHUB= yes
GH_ACCOUNT= locationtech
USE_JAVA= yes
JAVA_VERSION= 11+
NO_ARCH= yes
VER= ${PORTVERSION:tl}
JARFILES= core/target/jts-core app/target/jts-app io/common/target/jts-io-common lab/target/jts-lab
JARDOCFILES= io/common/target/jts-io-common core/target/jts-core lab/target/jts-lab
PLIST_SUB= VERSION=${VER}
PORTDOCS= *
OPTIONS_DEFINE= DOCS
# to rebuild the deps archive:
# 1. set DEV_UPDATE_MODE=yes
# 2. make makesum build
# 3. upload the *-deps using: make pushToGH
# 4. set DEV_UPDATE_MODE=no
# 5. make clean makesum
DEV_UPDATE_MODE= no
.if (${DEV_UPDATE_MODE} == "yes")
pre-build:
mkdir -p ${WRKDIR}/.m2
cd ${WRKDIR}/.m2 && rm -Rf .git
cd ${WRKDIR}/.m2 && git init
cd ${WRKDIR}/.m2 && git remote add origin git@github.com:mfechner/freebsd-math-jts-deps.git
cd ${WRKDIR}/.m2 && git fetch
cd ${WRKDIR}/.m2 && rm -Rf repository
cd ${WRKDIR}/.m2 && git checkout master
cd ${WRKDIR}/.m2 && rm -Rf repository
post-build:
@${ECHO} "(!!!) Please upload the maven repo using: make pushToGH"
.else
GH_TUPLE= mfechner:freebsd-math-jts-deps:${VER}:m2
MASTER_SITES+= LOCAL/mfechner/:maven
MVN_ARGS= --offline
# Move the download deps to correct destination
post-patch:
@${MV} ${WRKDIR}/freebsd-math-jts-deps-${VER} ${WRKDIR}/.m2
.endif
#-Dmaven.repo.local=${WRKDIR}/freebsd-math-jts-deps-${VER}/
do-build:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${LOCALBASE}/bin/mvn ${MVN_ARGS} \
-fae clean install \
-Dmaven.test.skip=true \
-Duser.home=${WRKDIR}
do-install:
.for jar in ${JARFILES}
@${INSTALL_DATA} ${WRKSRC}/modules/${jar}-${VER}.jar \
${STAGEDIR}${JAVALIBDIR}/
.endfor
${RLN} ${STAGEDIR}${JAVALIBDIR}/jts-core-${VER}.jar ${STAGEDIR}${JAVALIBDIR}/jts-core.jar
do-install-DOCS-on:
.for jar in ${JARDOCFILES}
@${INSTALL_DATA} ${WRKSRC}/modules/${jar}-${VER}-javadoc.jar \
${STAGEDIR}${JAVALIBDIR}/
.endfor
# Make sure you build the port before (not in poudriere, make build) with DEV_UPDATE_MODE=yes
# before you execute this target
pushToGH:
@cd ${WRKDIR}/.m2
cd ${WRKDIR}/.m2 && git add .
cd ${WRKDIR}/.m2 && git status
cd ${WRKDIR}/.m2 && git commit -m "Update deps for version ${VER}."
read -p "Continue to push new version ${VER} to GH" dummy
cd ${WRKDIR}/.m2 && git push -u origin master
cd ${WRKDIR}/.m2 && git tag -f ${VER}
cd ${WRKDIR}/.m2 && git push --tags -f
.include <bsd.port.mk>
|