<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/16919335865c3518f4f5fb9a2a874e2280224b9b">https://github.com/macports/macports-ports/commit/16919335865c3518f4f5fb9a2a874e2280224b9b</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 1691933 apache-solr8: Proposed port of latest solr v.8.0.0 with improved Portfile
</span>1691933 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 16919335865c3518f4f5fb9a2a874e2280224b9b
</span>Author: Steven Thomas Smith <s.t.smith@ieee.org>
AuthorDate: Mon Apr 29 17:03:50 2019 -0400
<span style='display:block; white-space:pre;color:#404040;'> apache-solr8: Proposed port of latest solr v.8.0.0 with improved Portfile
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * Upgrade to solr version 8.0.0
</span><span style='display:block; white-space:pre;color:#404040;'> * Fix bin/solr bash shell to run on macOS
</span><span style='display:block; white-space:pre;color:#404040;'> * Fix apache-solr4 install configuration
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The previous version is v.4, and is years out-of-date.
</span>---
java/apache-solr8/Portfile | 138 +++++++++++++++++++++++++++++++++++++++
java/apache-solr8/files/solr.in | 25 +++++++
java/apache-solr8/files/solr.xml | 2 +
3 files changed, 165 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/java/apache-solr8/Portfile b/java/apache-solr8/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..e6c2230
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/java/apache-solr8/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,138 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name apache-solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 8.0.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories java textproc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description An open source enterprise search platform.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description Solr is the popular, blazing fast open source enterprise \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ search platform from the Apache Lucene project.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage http://lucene.apache.org/solr/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs noarch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license Apache-2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+dist_subdir apache-solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname solr-${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+extract.suffix .tgz
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# curl -O https://www.apache.org/dist/lucene/solr/8.0.0/solr-8.0.0.tgz
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# curl -sI https://www.apache.org/dist/lucene/solr/8.0.0/solr-8.0.0.tgz | grep -i Content-Length
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites apache:lucene/solr/${version}/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 3512cc7298424ea6221ff86b9f0df9bec631d8b2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 0e6392d3b980ab917c731b054101aafcebceacc0e5063cb1e305aeeaec911d12 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 171894486
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_run port:openjdk12
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solrGroup solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solrUser solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+add_users ${solrUser} group=${solrGroup} home=${prefix}/var/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# set the destination paths.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set java_basepath ${prefix}/share/java
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_destpath ${java_basepath}/${distname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_path ${solr_destpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Used to define environment variables for bin/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_home ${prefix}/var/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_data_home ${prefix}/var/db/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_logs_dir ${solr_home}/logs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_pid_dir ${prefix}/var/run/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_port 8983
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_heap 1g
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This is what to set for fine-tuned Java memory control; see bin/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# set solr_java_mem ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_log_prestart_rotation true
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set solr_ulimit_checks false
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_configure no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # copy the distribution
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${java_basepath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy ${worksrcpath} ${destroot}${java_basepath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # create default directories
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -o ${solrUser} -g ${solrGroup} -m 755 -d ${destroot}${solr_home}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -o ${solrUser} -g ${solrGroup} -m 755 -d ${destroot}${solr_logs_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -o ${solrUser} -g ${solrGroup} -m 755 -d ${destroot}${prefix}/var/db/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -o ${solrUser} -g ${solrGroup} -m 775 -d ${destroot}${solr_pid_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # install the solr script
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 755 ${filespath}/solr.in ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_path@|${solr_path}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_home@|${solr_home}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_data_home@|${solr_data_home}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_logs_dir@|${solr_logs_dir}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_pid_dir@|${solr_pid_dir}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_port@|${solr_port}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_heap@|${solr_heap}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # reinplace "s|@solr_java_mem@|${solr_java_mem}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_log_prestart_rotation@|${solr_log_prestart_rotation}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@solr_ulimit_checks@|${solr_ulimit_checks}|g" ${destroot}${prefix}/bin/solr8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # copy the solr home files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -o ${solrUser} -g ${solrGroup} -m 644 ${filespath}/solr.xml ${destroot}${solr_home}/solr.xml
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -o ${solrUser} -g ${solrGroup} -m 644 ${filespath}/solr.xml ${destroot}${solr_home}/solr.xml.default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # remove `nohup` from `bin/solr`, which causes this error on macOS:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # sudo -u solr solr8 start # hangs with this error
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # nohup: can't detach from console: Inappropriate ioctl for device
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -E {s|^([[:space:]]+)nohup[[:space:]]+|\1|} ${destroot}${solr_destpath}/bin/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-activate {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Make sure initial conf files are present and setup correctly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f { solr.xml } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists ${solr_home}/${f}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file copy ${solr_home}/${f}.default \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${solr_home}/${f}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.create yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.name Solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: solr8 must start in the foreground so that launchd keeps it running
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.start "sudo -E -u ${solrUser} -g ${solrGroup} bash -c '${prefix}/bin/solr8 start -p ${solr_port} -f 1> ${solr_logs_dir}/solr-${solr_port}-console.log 2>&1'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.stop "sudo -E -u ${solrUser} -g ${solrGroup} ${prefix}/bin/solr8 stop -p ${solr_port} 2>/dev/null"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.restart "sudo -E -u ${solrUser} -g ${solrGroup} ${prefix}/bin/solr8 restart -p ${solr_port} 2>/dev/null"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.pidfile none
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes "This port is configured with a launch daemon for solr. See the solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+dashboard at http://localhost:${solr_port}.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+See 'solr8 start -help' for help. solr8 sets these environment variables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+before calling bin/solr. These can be redefined, then calling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+'sudo -E -u ${solrUser} solr8 start'.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_HOME=${solr_home}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_DATA_HOME=${solr_data_home}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_LOGS_DIR=${solr_logs_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_PID_DIR=${solr_pid_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_PORT=${solr_port}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_HEAP=${solr_heap}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_LOG_PRESTART_ROTATION=${solr_log_prestart_rotation}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export SOLR_ULIMIT_CHECKS=${solr_ulimit_checks}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+${name} is tested with the JDK provided in port openjdk12. Add these
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+lines to your ~/.profile to set up your java environment and test with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+'java -version':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Java environment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if \[ -x /usr/libexec/java_home \]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ export JAVA_HOME=\$(/usr/libexec/java_home)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ export KEYTOOL=\"\$JAVA_HOME\"/jre/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot.keepdirs ${destroot}${solr_pid_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${solr_home} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/var/db/solr ${destroot}${solr_logs_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.type regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url http://www.apache.org/dist/lucene/solr/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.regex (8.\[0-9.\]+)\/
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/java/apache-solr8/files/solr.in b/java/apache-solr8/files/solr.in
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..de2038e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/java/apache-solr8/files/solr.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,25 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#!/bin/bash
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+CMDNAME=`basename "$0"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+SOLR_PATH=@solr_path@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# If not already defined, export these environment variables for bin/solr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# see bin/solr start -help
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_HOME" ]; then export SOLR_HOME=@solr_home@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_DATA_HOME" ]; then export SOLR_DATA_HOME=@solr_data_home@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_LOGS_DIR" ]; then export SOLR_LOGS_DIR=@solr_logs_dir@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_PID_DIR" ]; then export SOLR_PID_DIR=@solr_pid_dir@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_PORT" ]; then export SOLR_PORT=@solr_port@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_HEAP" ]; then export SOLR_HEAP=@solr_heap@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# if [ -z "$SOLR_JAVA_MEM" ]; then export SOLR_JAVA_MEM=@solr_java_mem@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_LOG_PRESTART_ROTATION" ]; then export SOLR_LOG_PRESTART_ROTATION=@solr_log_prestart_rotation@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$SOLR_ULIMIT_CHECKS" ]; then export SOLR_ULIMIT_CHECKS=@solr_ulimit_checks@; fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# this shell function is not used, but instructive here
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+usage() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "Usage: See ${SOLR_PATH}/bin/solr" 1>&2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+${SOLR_PATH}/bin/solr $*
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/java/apache-solr8/files/solr.xml b/java/apache-solr8/files/solr.xml
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..191e51f
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/java/apache-solr8/files/solr.xml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,2 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<solr></solr>
</span></pre><pre style='margin:0'>
</pre>