summaryrefslogtreecommitdiffstats
path: root/devel/leiningen
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@jbernard.io> 2019-11-30 10:23:40 -0500
committerGravatar Jon Bernard <jbernard@jbernard.io> 2019-11-30 10:23:40 -0500
commit0b852a317e8d470656f5732a4a0e105c418b7311 (patch)
tree422daac635379c8fc2538a24e6626fc2f454529c /devel/leiningen
parent94f121b76fdf284f702357eedb379c08b59bcd45 (diff)
downloadmystuff-0b852a317e8d470656f5732a4a0e105c418b7311.tar.gz
mystuff-0b852a317e8d470656f5732a4a0e105c418b7311.tar.bz2
mystuff-0b852a317e8d470656f5732a4a0e105c418b7311.zip
Update leiningen to match ports but preserve personal changes
Diffstat (limited to 'devel/leiningen')
-rw-r--r--devel/leiningen/Makefile66
-rw-r--r--devel/leiningen/patches/patch-bin_lein-pkg20
-rw-r--r--devel/leiningen/pkg/PLIST2
3 files changed, 52 insertions, 36 deletions
diff --git a/devel/leiningen/Makefile b/devel/leiningen/Makefile
index d3bbe47..fb16d8f 100644
--- a/devel/leiningen/Makefile
+++ b/devel/leiningen/Makefile
@@ -1,47 +1,47 @@
# $OpenBSD$
-COMMENT = Automate Clojure projects without setting your hair on fire
+COMMENT = Clojure project automation
-GH_ACCOUNT = technomancy
-GH_PROJECT = leiningen
-GH_TAGNAME = 2.9.1
+GH_ACCOUNT = technomancy
+GH_PROJECT = leiningen
+GH_TAGNAME = 2.9.1
+REVISION = 0
-CATEGORIES = devel
+JAR_FILE = ${DISTNAME}-standalone.zip
-HOMEPAGE = https://leiningen.org/
+CATEGORIES = devel lang
-# Eclipse Public License Version 1.0 (http://www.eclipse.org/legal/epl-v10.html)
-PERMIT_PACKAGE_CDROM = commercial distribution defend and indemnify clauses
-PERMIT_PACKAGE_FTP = Yes
-PERMIT_DISTFILES_FTP = Yes
+HOMEPAGE = https://leiningen.org
-MASTER_SITES0 = https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/
-MASTER_SITES1 = https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${GH_TAGNAME}/
+MASTER_SITES0 = ${MASTER_SITES:S/archive/releases\/download/}
+DISTFILES = ${DISTNAME}${EXTRACT_SUFX} ${JAR_FILE}:0
+EXTRACT_ONLY = ${DISTNAME}${EXTRACT_SUFX}
-DISTFILES = ${PKGNAME}.tar.gz{${GH_TAGNAME}.tar.gz}:0 \
- ${PKGNAME}-standalone.zip:1
-EXTRACT_ONLY = ${PKGNAME}.tar.gz
+# EPL
+PERMIT_PACKAGE = Yes
-MODULES = java
-RUN_DEPENDS = shells/bash \
- ${MODJAVA_RUN_DEPENDS}
-MODJAVA_VER = 11+
+MODULES = java
+MODJAVA_VER = 11+
-NO_BUILD = Yes
+RUN_DEPENDS = shells/bash
+
+NO_BUILD = Yes
+NO_TEST = Yes
+
+LEIN = ${WRKSRC}/bin/lein-pkg
+LEIN_DIR = ${PREFIX}/share/java
+BASH_DIR = ${PREFIX}/share/bash-completion/completions
+ZSH_DIR = ${PREFIX}/share/zsh/site-functions
+
+SUBST_VARS += JAR_FILE \
+ LEIN_DIR
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/lein-pkg \
- ${PREFIX}/bin/lein
- ${INSTALL_MAN} ${WRKSRC}/doc/lein.1 \
- ${PREFIX}/man/man1
- ${INSTALL_DATA_DIR} ${PREFIX}/share/java
- ${INSTALL_DATA} ${DISTDIR}/${PKGNAME}-standalone.zip \
- ${PREFIX}/share/java/${PKGNAME}-standalone.jar
- ${INSTALL_DATA_DIR} ${PREFIX}/share/bash-completion/completions/
- ${INSTALL_DATA} ${WRKSRC}/bash_completion.bash \
- ${PREFIX}/share/bash-completion/completions/lein
- ${INSTALL_DATA_DIR} ${PREFIX}/share/zsh/site-functions/
- ${INSTALL_DATA} ${WRKSRC}/zsh_completion.zsh \
- ${PREFIX}/share/zsh/site-functions/_lein
+ ${SUBST_PROGRAM} ${LEIN} ${PREFIX}/bin/lein
+ ${INSTALL_MAN} ${WRKSRC}/doc/lein.1 ${PREFIX}/man/man1/
+ ${INSTALL_DATA_DIR} ${LEIN_DIR} ${BASH_DIR} ${ZSH_DIR}
+ ${INSTALL_DATA} ${FULLDISTDIR}/${JAR_FILE} ${LEIN_DIR}/
+ ${INSTALL_DATA} ${WRKSRC}/bash_completion.bash ${BASH_DIR}/lein
+ ${INSTALL_DATA} ${WRKSRC}/zsh_completion.zsh ${ZSH_DIR}/_lein
.include <bsd.port.mk>
diff --git a/devel/leiningen/patches/patch-bin_lein-pkg b/devel/leiningen/patches/patch-bin_lein-pkg
index 12cf336..36ed72c 100644
--- a/devel/leiningen/patches/patch-bin_lein-pkg
+++ b/devel/leiningen/patches/patch-bin_lein-pkg
@@ -1,9 +1,14 @@
$OpenBSD$
+
+- fix shebang
+- set path to standalone jar
+- use sha1(1)
+
--- bin/lein-pkg.orig Mon Feb 20 11:42:41 2017
+++ bin/lein-pkg Mon Feb 20 11:42:56 2017
@@ -1,4 +1,4 @@
-#!/bin/bash
-+#!/usr/local/bin/bash
++#!${LOCALBASE}/bin/bash
# This variant of the lein script is meant for downstream packagers.
# It has all the cross-platform stuff stripped out as well as the
@@ -12,7 +17,18 @@ $OpenBSD$
# and add them individually to the classpath/bootclasspath as well.
-LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar
-+LEIN_JAR=/usr/local/share/java/leiningen-$LEIN_VERSION-standalone.jar
++LEIN_JAR=${LEIN_DIR}/${JAR_FILE}
# Do not use installed leiningen jar during self-compilation
if ! { [ "$1" = "compile" ] &&
+@@ -88,8 +88,8 @@ fi
+ if [ "$LEIN_FAST_TRAMPOLINE" != "" ] && [ -r project.clj ]; then
+ INPUTS="$* $(cat project.clj) $(test -f "$LEIN_HOME/profiles.clj" && cat "$LEIN_HOME/profiles.clj")"
+
+- if command -v shasum >/dev/null 2>&1; then
+- SUM="shasum"
++ if command -v sha1 >/dev/null 2>&1; then
++ SUM="sha1"
+ elif command -v sha1sum >/dev/null 2>&1; then
+ SUM="sha1sum"
+ else
diff --git a/devel/leiningen/pkg/PLIST b/devel/leiningen/pkg/PLIST
index 5541840..96fef8d 100644
--- a/devel/leiningen/pkg/PLIST
+++ b/devel/leiningen/pkg/PLIST
@@ -5,7 +5,7 @@ share/bash-completion/
share/bash-completion/completions/
share/bash-completion/completions/lein
share/java/
-share/java/${FULLPKGNAME}-standalone.jar
+share/java/${JAR_FILE}
share/zsh/
share/zsh/site-functions/
share/zsh/site-functions/_lein