Commit Graph

60 Commits

Author SHA1 Message Date
Fabian Boehm
378dc9123a git_version_gen: Just print the version
This was needed because we #included it in C++, but now it's easier to
have just the version in there
2024-12-06 22:12:26 +01:00
Johannes Altmanninger
9eeed5ca12 Install fish-* man pages in default MANPATH
fish adds ~/.local/share/fish/man to its MANPATH for builtins etc.  But pages
like fish-doc are unambiguous so it seems like they should be accessible
from outside fish by default.

Closes #10711
2024-09-14 07:21:18 +02:00
Fabian Boehm
721a360707 cmake: Remove a bunch of unnecessary code
We are no longer C++, we no longer support xcode

Note: This will remove a warning "DO NOT EDIT" comment from __fish_build_paths.fish, but
that's unnecessary. The file is typically in /usr or another
package-manager-owned location, so people don't typically edit it.

And if it did we don't actually *care*, it'll work fine.
2024-03-03 20:36:24 +01:00
David Adam
cb46396b67 cmake: build executables by driving cargo directly
Drops the requirement for Corrosion, as almost none of its extensive features
are required.
2024-01-30 18:18:55 +08:00
David Adam
1683e720a8 Use Rust for executables
Use Rust for executables

Drops the C++ entry points and restructures the Rust package into a
library and three binary crates.

Renames the fish-rust package to fish.

At least on Ubuntu, "fish_indent" is built before "fish".
Make sure export CURSES_LIBRARY_LIST to all binaries to make sure
that "cached-curses-libnames" is populated.

Closes #10198
2024-01-13 03:07:29 +01:00
Fabian Boehm
cb51b236f3 cmake: Include GNUInstallDirs earlier for BINDIR etc to take effect
GNUInstallDirs is what defines CMAKE_INSTALL_FULL_BINDIR and such, so
the setting in Rust.cmake didn't work.

This also makes build.rs error out if any of these aren't defined
2024-01-10 17:51:23 +01:00
Fabian Boehm
2aee930659 Revert "Remove redundantly set corrosion env vars."
This reverts commit 114ebe3b8f.
2024-01-10 17:21:05 +01:00
Johannes Altmanninger
114ebe3b8f Remove redundantly set corrosion env vars.
They should already be set in Rust.cmake.
See https://github.com/fish-shell/fish-shell/pull/10198#discussion_r1446402611
2024-01-10 09:38:45 +01:00
ridiculousfish
5e06e80136 Remove angular "partials"
These are no longer used as we are fully on Alpine.js
2023-10-08 12:22:56 -07:00
Fabian Boehm
d6a6d77429 cmake: Fix SYSCONFDIR and friends 2023-09-06 09:49:24 +02:00
Aaron Gyes
550857ef65 Remove obsolete lynx bug mitigation
a lynx-internal hash of div.contents collided with em>a which caused
built-in styling to render much of entire pages as emphasized links.

Since switching from doxygen, we haven't had a <div class="contents">
so this workaround is no longer needed.
2023-01-01 19:41:41 -08:00
ridiculousfish
fecc022030 Rename the top-level test target to fish_run_tests
This keeps 'test' as an alias target. The reason is for compatibility
with CMake 3.10  and earlier, where one cannot make a target named
'test'.
2021-11-26 13:13:42 -08:00
Aaron Gyes
87b2c2fdec install the fish.png file itself 2021-10-17 09:20:06 -07:00
Aaron Gyes
5accc67f1a don't install .desktop file and icon on macOS 2021-10-16 14:20:47 -07:00
Mahmoud Al-Qudsi
7bcf527f84 Remove cmake test_prep target
This is now carried out more cleanly and more correctly by
test_driver.sh
2021-08-29 08:56:12 +02:00
Mahmoud Al-Qudsi
35975d83af Run each test fully independently in own environment 2021-08-29 08:56:12 +02:00
Jan Palus
0918653510 Handle absolute path in CMAKE_INSTALL_DATADIR
Cmake accepts both absolute and relative paths in CMAKE_INSTALL_DATADIR.
For the latter case CMAKE_INSTALL_PREFIX is being prepended
automatically. %{rel_datadir} is derived from CMAKE_INSTALL_DATADIR
which was assumed to be relative and otherwise causes issues in a .pc
file where prefix is being prepended unconditionally.

Make sure %{rel_datadir} is relative by calculating RELATIVE_PATH from
CMAKE_INSTALL_PREFIX to CMAKE_INSTALL_FULL_DATADIR which is known to be
absolute.

Fixes #8150
2021-07-20 13:43:34 +02:00
Fabian Homborg
fa20dc8141 Do install the themes
This has cheesy pattern matching that I'm not entirely sure adds
anything?

Surely if we add something to share/web_config that should be
installed *by default*?

Anyway, let's just add .theme to it
2021-07-10 11:13:10 +02:00
ridiculousfish
1b950f5f3b Switch fish.pc dependency from FBVF file to CHECK-FBVF target
Previously, both fish.pc and libfish had generating the
FISH-BUILD-VERSION-FILE attached as a command. In principle they could
both try to run the command simultaneously and now CMake complains about
this with the Xcode generator.

Switch to having fish.pc depend on the CHECK-FISH-BUILD-VERSION-FILE as a
target instead of a command. This allows it to participate in dependency
resolution and CMake will succeed again.

Fixes #7838
2021-03-21 12:39:24 -07:00
Fabian Homborg
382595e1e9 Update some .md references 2020-05-30 10:07:21 +02:00
Simon Ser
e3684526f2 Change extra_*dir options to use prefix instead of /usr/local 2020-04-04 13:07:54 +02:00
Simon Ser
d9d3557fcf 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
2020-04-04 13:07:54 +02:00
ridiculousfish
f117addf7c Use lowercase CMake function names
This is a best practice to distinguish them from variables.
2020-03-14 16:11:35 -07:00
Fabian Homborg
1106706927 cmake: Remove commented autotools code 2020-02-21 19:33:06 +01:00
David Adam
f36a391f26 fish.desktop: install .desktop and icon 2020-01-25 16:48:57 +08:00
David Adam
8ff0c351a9 vendor_*.d: also create these directories in the prefix 2020-01-25 16:12:20 +08:00
David Adam
81306d3b30 vendor_*.d: include /usr/local by default as "extra" directory
Closes #5029.
2020-01-25 16:12:20 +08:00
Johannes Altmanninger
e3782603ec Load vendor configuration from $XDG_DATA_DIRS/vendor_*.d
$XDG_DATA_DIRS/vendor_{completions,conf,functions}.d
Additionally, CMake variables extra_{completions,conf,functions}dir are
appended, if they are not already contained in $XDG_DATA_DIRS.

If XDG_DATA_DIRS is not defined, we fall back to

$__fish_datadir/vendor_completions.d:${extra_completionsdir}

for completions. Same for conf and functions.
2020-01-12 16:12:41 +01:00
David Adam
a10547018e cmake: don't install realpath manpage on non-macOS systems 2019-09-17 20:54:11 +08:00
Fabian Homborg
cdbd0891f7 Remove invocation tests
These are now all performed by littlecheck, so there's no need for the
entire target anymore.
2019-06-25 22:31:45 +02:00
Fabian Homborg
bfb61879cd Do create installation directories that already exist
Reverts 71329a250b.

That tried to fix problems with pkgconfig by not recreating it.
Instead, use the function we already have for not trying too hard to
create a directory.

Fixes #5735.
2019-03-12 18:50:45 +01:00
David Adam
9acfe0261b cmake: install system manpath manpages
The build path of these files moved under Sphinx.
2019-02-28 22:03:57 +11:00
Fabian Homborg
3674efad0b Fix manpage directory
This installed files in man/ directly, instead of in man/man1/, so
they weren't installed.

See #5696.
2019-02-25 21:16:42 +01:00
David Adam
4f3786f8d0 Build system: add extra sysconf directories
Closes #5235.
2018-11-04 21:14:06 +08:00
Mahmoud Al-Qudsi
e26d5418af Revert "Blow away existing $fish_data_dir on (re)install"
This reverts commit e35983438e.
Reopens #4314. Closes #5007.

# Conflicts:
#	share/config.fish
2018-05-31 22:41:49 -05:00
Mahmoud Al-Qudsi
e35983438e Blow away existing $fish_data_dir on (re)install
Fixes #4314 (under cmake, at least)
2018-04-14 21:01:52 -05:00
David Adam
0572b29f26 [cmake] install manual from binary directory
Fixes out-of-tree builds.
2018-03-24 22:38:38 +08:00
David Adam
b819f38e83 [cmake] fix selection of manual pages for installation 2018-03-24 22:38:38 +08:00
David Adam
a6d2b06529 [cmake] use full paths for extra configuration/function/completion dirs 2018-03-24 22:38:38 +08:00
David Adam
625ef5d734 [cmake] fix generation of fish pkgconfig file
Use `printf` instead of the non-portable `echo -n`.
2018-03-24 22:38:38 +08:00
David Adam
b5aea3fd8b Revert "[cmake] Fix installing docs"
INSTALL_DOCS is not a controllable option, and is only used to indicate
whether they will be installed or not.

This reverts commit e800b18ee9.
2018-03-13 22:08:05 +08:00
Fabian Homborg
e800b18ee9 [cmake] Fix installing docs
Installing docs is not optional if they have been built
2018-03-13 12:55:05 +01:00
Mahmoud Al-Qudsi
71329a250b [cmake] Don't create installation directories that already exist
fish's cmake install routines were attempting to create system
directories that already existed, an operation for which the permissions
to do so may not be available (e.g. /usr/local/share/pkgconfig)

This commit first checks if a directory exists before creating it.
2018-03-04 15:46:29 -06:00
David Adam
2747945c55 [cmake] don't try too hard to create extra vendor directories
Homebrew and other systems set the path for the extra completion,
function and configuration directories outside the writeable prefix.

Mirror the autotools build in trying to create these directories, but
not causing the whole install to fail if this operation in unsuccessful.
2018-02-27 20:42:58 +08:00
Mahmoud Al-Qudsi
1b27c97bfb [cmake] Fix dependency path for FBVF for fish.pc rule
The custom command for fish.pc had a dependency on FBVF, but it appears
that the relative path to FBVF was incorrect and with CMake 3.10.1 under
FreeBSD this was consistently causing the build to fail if
../build_tools/git_version_gen.sh hadn't (coincidentally, I think?)
already run.

Explicitly set the dependency path for FBVF to the binary directory.
2018-02-21 13:58:56 -06:00
Mahmoud Al-Qudsi
9e1576bdc4 Revert "[cmake] Add rule to generate FBVF"
This reverts commit e4c59ac60a.

I hadn't seen the FBVF rule in the `Version` CMake file. There's
something else going on here.
2018-02-21 13:50:05 -06:00
Mahmoud Al-Qudsi
e4c59ac60a [cmake] Add rule to generate FBVF
The custom command for fish.pc had a dependency on FBVF, but there was
no cmake rule for the generation of the FBVF file. With CMake 3.10.1
under FreeBSD, this was consistently causing the build to fail if
../build_tools/git_version_gen.sh hadn't (coincidentally, I think?)
already run.
2018-02-21 13:40:15 -06:00
Mahmoud Al-Qudsi
462b9c2209 Fix broken fish.pc build on non-GNU platforms
`-v` is a non-standard GNU-only extension to `awk`, its usage in the
generation of the fish.pc script breaks on non-GNU platforms (such as
FreeBSD and presumably macOS).

Using `sed` with only standard posix commands instead.
2018-01-23 22:07:04 -06:00
David Adam
020fe5ccdf [cmake] fix installation of translations 2018-01-22 14:30:36 +08:00
David Adam
164108d0a9 [cmake] mark manual as an optional component for install 2018-01-21 20:37:29 +08:00