Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common_lisp PG: propagate MacPorts home to abcl; abcl: do not hardode used java #20089

Merged
merged 2 commits into from Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions _resources/port1.0/group/common_lisp-1.0.tcl
Expand Up @@ -236,11 +236,13 @@ proc common_lisp::clisp_asdf_operate {op name build_system_path} {
}

proc common_lisp::abcl_asdf_operate {op name build_system_path} {
global prefix
global prefix workpath
ui_info "Execute asdf:${op} at ${name} by ABCL"

# cleaner approach is somehow enforce different value to NSHomeDirectory
common_lisp::run "env XDG_CACHE_HOME=\$HOME/.cache ${prefix}/bin/abcl --noinit --batch" "--eval" ${op} ${name} ${build_system_path}
# ABCL runs on java and java uses NSHomeDirectory which ignores HOME env
# here I redefine user-homedir-pathname to use expected home folder everywhere
# See: https://github.com/armedbear/abcl/issues/614
common_lisp::run "${prefix}/bin/abcl --noinit --eval '(defun user-homedir-pathname () #p\"${workpath}/.home/\")'" "--eval" ${op} ${name} ${build_system_path}
}

proc common_lisp::ccl_asdf_operate {op name build_system_path} {
Expand All @@ -263,7 +265,7 @@ proc common_lisp::run {lisp eval_arg op name build_system_path} {

set loadcmd ${lisp}

append loadcmd " ${eval_arg} '(require \"asdf\")'"
append loadcmd " ${eval_arg} '(require :asdf)'"
append loadcmd " ${eval_arg} '(setf asdf:*central-registry* (list* (quote *default-pathname-defaults*) ${lisp-build-system-path} ${lisp-system-path} asdf:*central-registry*))'"
append loadcmd " ${eval_arg} '(asdf:operate (quote asdf:${op}) (quote ${name}))'"

Expand Down
6 changes: 4 additions & 2 deletions lang/abcl/Portfile
Expand Up @@ -5,9 +5,11 @@ PortGroup java 1.0

name abcl
version 1.9.2
revision 2
revision 3
categories lang java
license GPL-2
supported_archs noarch
platforms any
maintainers {easieste @easye} {@catap korins.ky:kirill} openmaintainer
description A Common Lisp implementation that runs on the JVM
long_description \
Expand Down Expand Up @@ -38,7 +40,6 @@ depends_build port:apache-ant

java.version 11
java.fallback openjdk11
java.enforce yes
use_configure no

patchfiles-append patch-macports-xdg-data-dir.diff
Expand All @@ -49,6 +50,7 @@ post-patch {

build.cmd ant
build.target abcl
build.args -Djava.path=/usr/bin/java

post-build {
reinplace "s|${worksrcpath}/dist/abcl.jar|${prefix}/share/java/abcl/abcl.jar|g" \
Expand Down
4 changes: 0 additions & 4 deletions lisp/cl-mgl-pax/Portfile
Expand Up @@ -51,7 +51,3 @@ subport cl-dref {

livecheck.type none
}

# Can't ensure directory #P"/Users/macports/.slime/"
# See: https://github.com/armedbear/abcl/issues/614
common_lisp.abcl no
4 changes: 0 additions & 4 deletions lisp/cl-stefil/Portfile
Expand Up @@ -28,7 +28,3 @@ depends_lib-append port:cl-alexandria \

# SBCL comply for styles
common_lisp.sbcl no

# Can't ensure directory #P"/Users/macports/.slime/"
# See: https://github.com/armedbear/abcl/issues/614
common_lisp.abcl no
4 changes: 0 additions & 4 deletions lisp/cl-swank/Portfile
Expand Up @@ -22,7 +22,3 @@ license Permissive
description Swank from SLIME

long_description {*}${description}

# Can't ensure directory #P"/Users/macports/.slime/"
# See: https://github.com/armedbear/abcl/issues/614
common_lisp.abcl no