Skip to content

Commit

Permalink
Install terminfo data under /usr/share/julia (#55881)
Browse files Browse the repository at this point in the history
Just like all other libraries, we don't want internal Julia files to
mess with system files.

Introduced by #55411.

(cherry picked from commit 0dbb6eb)
  • Loading branch information
nalimilan authored and KristofferC committed Sep 30, 2024
1 parent 4f26286 commit 73d43af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ endif
$(INSTALL_F) $(JULIAHOME)/contrib/julia.appdata.xml $(DESTDIR)$(datarootdir)/appdata/
# Install terminal info database
ifneq ($(WITH_TERMINFO),0)
cp -R -L $(build_datarootdir)/terminfo $(DESTDIR)$(datarootdir)
cp -R -L $(build_datarootdir)/julia/terminfo $(DESTDIR)$(datarootdir)/julia/
endif

# Update RPATH entries and JL_SYSTEM_IMAGE_PATH if $(private_libdir_rel) != $(build_private_libdir_rel)
Expand Down
2 changes: 1 addition & 1 deletion base/terminfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function find_terminfo_file(term::String)
append!(terminfo_dirs,
replace(split(ENV["TERMINFO_DIRS"], ':'),
"" => "/usr/share/terminfo"))
push!(terminfo_dirs, normpath(Sys.BINDIR, DATAROOTDIR, "terminfo"))
push!(terminfo_dirs, normpath(Sys.BINDIR, DATAROOTDIR, "julia", "terminfo"))
Sys.isunix() &&
push!(terminfo_dirs, "/etc/terminfo", "/lib/terminfo", "/usr/share/terminfo")
for dir in terminfo_dirs
Expand Down
4 changes: 2 additions & 2 deletions deps/terminfo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ $(BUILDDIR)/TermInfoDB-v$(TERMINFO_VER)/build-checked: $(BUILDDIR)/TermInfoDB-v$
echo 1 > $@

define TERMINFO_INSTALL
mkdir -p $2/$$(build_datarootdir)
cp -R $1/terminfo $2/$$(build_datarootdir)
mkdir -p $2/$$(build_datarootdir)/julia
cp -R $1/terminfo $2/$$(build_datarootdir)/julia/
endef
$(eval $(call staged-install, \
terminfo,TermInfoDB-v$(TERMINFO_VER), \
Expand Down

0 comments on commit 73d43af

Please sign in to comment.