mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 04:41:14 -03:00
Use pkg-config variables
This allows all variables to be set properly when the prefix or datadir changes.
The generated .pc file looks like this:
prefix=/usr/local
datadir=${prefix}/share
completionsdir=${datadir}/fish/vendor_completions.d
functionsdir=${datadir}/fish/vendor_functions.d
confdir=${datadir}/fish/vendor_conf.d
Name: fish
Description: fish, the friendly interactive shell
URL: https://fishshell.com/
Version: 3.1.0-402-g75ae172ba228-dirty
Closes: https://bugs.archlinux.org/task/65904
This commit is contained in:
committed by
Fabian Homborg
parent
6c3732b99f
commit
d9d3557fcf
@@ -24,16 +24,20 @@ set(configure_input
|
||||
"This file was generated from a corresponding .in file.\
|
||||
DO NOT MANUALLY EDIT THIS FILE!")
|
||||
|
||||
set(rel_completionsdir "fish/vendor_completions.d")
|
||||
set(rel_functionsdir "fish/vendor_functions.d")
|
||||
set(rel_confdir "fish/vendor_conf.d")
|
||||
|
||||
set(extra_completionsdir
|
||||
/usr/local/share/fish/vendor_completions.d
|
||||
"/usr/local/share/${rel_completionsdir}"
|
||||
CACHE STRING "Path for extra completions")
|
||||
|
||||
set(extra_functionsdir
|
||||
/usr/local/share/fish/vendor_functions.d
|
||||
"/usr/local/share/${rel_functionsdir}"
|
||||
CACHE STRING "Path for extra functions")
|
||||
|
||||
set(extra_confdir
|
||||
/usr/local/share/fish/vendor_conf.d
|
||||
"/usr/local/share/${rel_confdir}"
|
||||
CACHE STRING "Path for extra configuration")
|
||||
|
||||
# These are the man pages that go in system manpath; all manpages go in the fish-specific manpath.
|
||||
@@ -99,7 +103,7 @@ fish_create_dirs(${rel_datadir}/fish/vendor_completions.d ${rel_datadir}/fish/ve
|
||||
${rel_datadir}/fish/vendor_conf.d)
|
||||
|
||||
fish_try_create_dirs(${rel_datadir}/pkgconfig)
|
||||
configure_file(fish.pc.in fish.pc.noversion)
|
||||
configure_file(fish.pc.in fish.pc.noversion @ONLY)
|
||||
|
||||
add_custom_command(OUTPUT fish.pc
|
||||
COMMAND sed '/Version/d' fish.pc.noversion > fish.pc
|
||||
|
||||
Reference in New Issue
Block a user