Skip to content

Commit

Permalink
emacs-mac-app{,devel}: fix resolving tree-sitter libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
amake committed Jun 4, 2024
1 parent 8ad13fc commit 575dc77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 14 additions & 3 deletions aqua/emacs-mac-app/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bitbucket.setup mituharu emacs-mac emacs-${emacs_version}-mac-${emacs_mac_ve
name emacs-mac-app
conflicts emacs-app emacs-app-devel
version ${emacs_mac_ver}
revision 1
revision 2
categories aqua editors
maintainers {amake @amake} openmaintainer

Expand Down Expand Up @@ -57,6 +57,8 @@ depends_build port:autoconf \
port:sqlite3 \
port:webp

set rpaths [list]

# The Mac port uses CoreText instead of HarfBuzz
configure.args --disable-silent-rules \
--with-mac \
Expand Down Expand Up @@ -84,12 +86,18 @@ platform darwin {
configure.cflags-append -fobjc-arc
}

pre-configure {
if {[llength $rpaths] > 0} {
configure.ldflags-append "-Wl,-rpath " [join $rpaths " -Wl,-rpath "]
}
}

subport ${name}-devel {
set emacs_version 29.3
set date 2024-03-25

version [string map {- {}} ${date}]
revision 0
revision 1

long_description \
${name} is the \"Mac port\" of GNU Emacs ${emacs_version}. \
Expand Down Expand Up @@ -151,13 +159,16 @@ variant nativecomp description {Builds emacs with native compilation support} {
configure.args-append --with-native-compilation=aot
compiler.cpath-prepend ${prefix}/include/gcc${gcc_v}
compiler.library_path-prepend ${prefix}/lib/gcc${gcc_v}
configure.ldflags-append "-Wl,-rpath ${prefix}/lib/gcc${gcc_v}"
lappend rpaths ${prefix}/lib/gcc${gcc_v}
}

variant treesitter description {Builds emacs with tree-sitter support} {
configure.args-delete --without-tree-sitter
configure.args-append --with-tree-sitter
depends_lib-append port:tree-sitter

lappend rpaths ${prefix}/lib

depends_run-append \
port:tree-sitter-typescript \
port:tree-sitter-javascript \
Expand Down
4 changes: 0 additions & 4 deletions aqua/emacs-mac-app/files/site-start.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@

;; Info-directory-list contains ${prefix}/share/info. See #32148.
(setq Info-default-directory-list (cons "__PREFIX__/share/info" Info-default-directory-list))

;; Look in MacPorts ${prefix} for tree-sitter parser libraries
(when (boundp 'treesit-extra-load-path)
(setq treesit-extra-load-path (cons "__PREFIX__/lib" treesit-extra-load-path)))

0 comments on commit 575dc77

Please sign in to comment.