Commit graph

179 commits

Author SHA1 Message Date
James Knight 6e4ccb99c3 build: avoid git repository discovery when determining version
When attempting to use Git to populate commit/branch information in a
version string, it is possible through repository discovery that it
uses Git information not relevant to project. For example, if
repository content is extract into an interim build location when using
an embedded build framework (e.g. Buildroot), the project will not have
its Git repository to refer to. When it cannot find its repository, it
will look into its parent folders and may find the Git repository of
another project and use its branch/commit information.

This commit provides an explicit path to the project's Git repository
when consider commit/branch information. This will prevent any
repository discovery from occurring.

Signed-off-by: James Knight <james.d.knight@live.com>
2024-08-03 18:35:55 +02:00
Simon Ser a3a9ec1211 build: use fs.relative_to() instead of hand-rolled logic
Meson has introduced a relative_to() function [1] in its fs module
since version 1.3.

[1]: https://mesonbuild.com/Fs-module.html#relative_to
2024-07-14 18:03:43 -04:00
Bill Li 274a5fcb73 build: Bump wlroots version 2024-07-13 13:03:23 +02:00
Tarcísio Eduardo Moreira Crocomo 3d00552035 build: bump libinput version required 2024-07-04 23:03:38 +02:00
Violet Purcell 2e9139df66 Update for versioned wlroots files
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4614
2024-05-28 20:21:07 +02:00
Simon Ser 9704152414 build: drop xwayland option
Instead of having a build-time option to enable/disable xwayland
support, just use the wlroots build config: enable xwayland in
Sway if it was enabled when building wlroots. I don't see any
use-case for disabling xwayland in Sway when enabled in wlroots:
Sway doesn't pull in any additional dependency (just pulls in
dependencies that wlroots already needs). We have a config command
to disable xwayland at runtime anyways.

This makes it so xwayland behaves the same way as other features
such as libinput backend and session support. This also reduces
the build matrix (less combinations of build options).

I think we originally introduced the xwayland option when we didn't
have a good way to figure out the wlroots build config from the
Sway build system.
2024-05-21 11:44:39 -04:00
Simon Ser 796898519b build: disable wayland-protocols subproject tests by default 2024-05-18 13:48:17 +02:00
Simon Ser fc640d5f6c Define _POSIX_C_SOURCE globally
See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
2024-02-23 17:43:19 +03:00
Simon Ser e39b0b816b build: bump version to 1.10-dev 2024-01-26 15:25:14 +01:00
Simon Ser ff07eab85b Detect Nvidia proprietary driver via drmGetVersion()
This is less punishing for users with the Nvidia driver loaded but
not used by Sway (e.g. for CUDA).
2023-12-12 10:04:14 -05:00
llyyr 4ad15a4015 meson: bump wlroots version after 0.17.0 release 2023-11-22 00:42:55 +03:00
Alexander Orzechowski 876687000d render: Use wlroots scale filter 2023-06-19 19:14:28 +02:00
Simon Ser bd58df61ef pango: add printf attribute
This allows the compiler to catch mismatches between the format
string and the arguments passed in.

Need to add -Wno-format-zero-length because we pass an empty string
on purpose in swaybar/render.c.
2023-04-14 18:34:54 +02:00
Simon Ser dee032d0a0 ipc: add LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM entry
This was introduced in the last libinput release.

Fixes the following error:

    ../sway/ipc-json.c:928:17: error: enumeration value 'LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM' not handled in switch [-Werror=switch]
      928 |                 switch (libinput_device_config_accel_get_profile(device)) {
          |                 ^~~~~~
2023-03-27 10:56:16 +02:00
Ronan Pigott 2f2cdd60de input: enable user xkb configs with cap_sys_nice 2023-01-11 11:32:09 +01:00
Simon Ser d41f11e6bd build: fix have_xwayland when xcb-icccm is not found
xcb-icccm is required to build Xwayland support.
2022-11-29 11:47:21 -05:00
Simon Ser a358d6760e build: move completions to separate file 2022-11-28 18:51:45 -05:00
Simon Ser f54d22ca2a build: remove trailing newline at end of file 2022-11-28 20:00:49 +01:00
Simon Ser e62299daa4 Make libinput backend optional 2022-11-28 13:28:15 -05:00
Simon Ser 5b64e2fc31 Make GLES2 optional 2022-11-28 13:28:15 -05:00
Simon Ser 81518e299c build: bump version to 1.9-dev 2022-11-26 23:25:54 +01:00
Simon Ser 37e4a3d637 build: drop unused wayland-egl dependency 2022-11-26 18:15:57 +01:00
Joe Kappus fdde67405e build: bump wlroots dependency to 0.17.0 2022-11-11 22:31:18 +01:00
Simon Ser dcd2076f38 Use wl_signal_emit_mutable()
This function fixes segfaults when emitting a signal potentially
removes arbitrary listeners.
2022-11-10 22:27:38 +03:00
pudiva chip líquida 7cc8ab6d6c Support libinput's 1.21 new dwtp option
Support the new dwtp (disable while trackpointing) option introduced in
libinput 1.21, allowing users to control whether the trackpoint (like
those in Thinkpads, but not only) should be disabled while using the
keyboard/touchpad.

See: https://gitlab.freedesktop.org/libinput/libinput/-/issues/731
2022-10-30 10:56:34 +01:00
Simon Ser a5c2e9fee0 build: link with -pthread
Fixes the following FreeBSD error:

    ld: error: undefined symbol: pthread_getschedparam
    >>> referenced by realtime.c:25 (../sway/realtime.c:25)
    >>>               sway/sway.p/realtime.c.o:(set_rr_scheduling)

Fixes: a3a82efbf6 ("realtime: request SCHED_RR using CAP_SYS_NICE")
2022-05-30 18:40:26 +02:00
kraftwerk28 acdb48a59c Chase wlroots X11 hints update 2022-04-18 08:57:16 +02:00
ndren f614f35e73
Replace pcre with pcre2
Closes: https://github.com/swaywm/sway/issues/6838
2022-03-12 14:02:32 +01:00
Simon Ser a1905c6a08 build: execute wlroots subproject before finding deps
wlroots often requires dependencies more recent than Sway's.
Executing the wlroots subproject first will give Meson a chance to
find these newer dependencies, possibly via subprojects.

The subproject will override the "wlroots" dependency when executed,
so we don't need to use get_variable anymore.

References: https://github.com/swaywm/sway/pull/6498#issuecomment-1001746017
2022-01-18 13:57:50 -05:00
Kirill Chibisov dbaf2e4fdb build: fix building with basu
02b412a introduced the use of list for sdbus deps, however
it was assuming that all packages which were in a list has a version
higher than 239. That is true for libsystemd and libelogind, since they
use the same versions, however basu is using version numbers which are
way lower than what libsystemd/libelogind are using, so basu only build
is failing.
2022-01-12 17:25:34 +01:00
Kenny Levinsen 470e04e8da meson: check: false on run_command
Future meson releases will change the default and warns when the
implicit default is used, breaking builds.

Explicitly set check: false to maintain behavior and silence warnings.
2022-01-11 11:51:49 +01:00
Simon Ser eaeb173a4b build: bump version to 1.8-dev
Historically we've been sticking with the last release number in
the master branch. However that's a bit confusing, people can't
easily figure out whether they're using a release or a work-in-progress
snapshot. Only the commit hash appended to the version number may
help, but that's not very explicit and disappears when using a
tarball.

We could bump the version in master to the next release number.
However during the RC cycle there would be a downgrade from 1.8 to
1.8-rc1. Also it would be hard to tell the difference between a
stable release and an old snapshot.

This patch introduces a new pre-release identifier, "dev". It's
alphabetically before "rc" so it should be correctly sorted by
semver comparisons. "dev" is upgraded to "rc" (and then to stable)
when doing a release. The master branch always uses a "dev"
version, only release branches use "rc" or stable versions.
2021-12-23 19:08:59 +01:00
Sefa Eyeoglu 17ee30d070 build: bump wlroots dependency to 0.16.0 2021-12-19 12:17:13 +01:00
Cole Mickens 0b4e3d39eb meson.build: require wayland-protocols 1.24
As far as I can tell `ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT` is introduced in wayland-protocols 1.24.
2021-12-14 10:00:15 +01:00
Simon Ser 57a7b3998e swaynag: remove xdg-output logic
We can just get the output name from wl_output directly, now that
wl_output version 4 exists.
2021-12-13 20:17:20 -06:00
Simon Ser 02b412a3d4 build: use list for sdbus dep
This allows to simplify our logic. Meson will pick the first found
library.
2021-11-26 12:10:18 -06:00
Simon Ser 9727db67cf build: remove scdoc stdin/stdout hack
Since [1], Meson allows feeding the input file as stdin and
capturing stout to the output file. We don't need the sh hack
anymore.

[1]: https://github.com/mesonbuild/meson/pull/8923
2021-09-15 08:21:20 +02:00
Dylan Araps 2024725cc0 Add meson options to enable/disable swaybar and swaynag 2021-07-21 18:24:09 +02:00
Simon Ser 151193b4cd build: use ExternalProgram.full_path instead of path
ExternalProgram.path has been deprecated.
2021-06-30 13:37:00 +02:00
Simon Ser 5f3773f21e build: use Dependency.get_variable instead of get_pkgconfig_variable
Dependency.get_pkgconfig_variable has been deprecated.
2021-06-30 13:37:00 +02:00
Simon Ser 8348178c66 build: use meson.global_build_root()
meson.build_root() is deprecated.

References: https://github.com/mesonbuild/meson/pull/8629
2021-06-30 13:37:00 +02:00
Simon Ser c53ef02385 build: bump wlroots dependency to 0.15.0 2021-06-23 14:32:31 +02:00
Simon Ser d7ec66d563 build: remove sd-bus status item
sd-bus == tray, no need to print the same thing twice.
2021-05-04 21:07:04 +02:00
Kenny Levinsen 4e77bc2935 meson: libseat is no longer optional
See: https://github.com/swaywm/wlroots/pull/2839
2021-04-14 23:29:09 +02:00
Simon Ser e49a98fcb3 build: stop checking for logind
wlroots has removed its logind session backend [1]. It now relies
on libseat only.

[1]: https://github.com/swaywm/wlroots/pull/2786
2021-04-11 12:14:40 +02:00
Simon Ser 7a68a28475 build: update wlroots dependency version to 0.14.x
The latest commit of Sway always requires the latest commit of
wlroots.
2021-04-08 08:55:20 +02:00
Simon Ser 8cd014cab7 build: bump version to 1.6 2021-04-07 22:02:55 +02:00
Simon Ser a9563a3710 build: update version to v1.6-rc2 2021-03-24 09:47:39 +01:00
Simon Ser adf7a6f892 build: update version to v1.6-rc1 2021-03-16 18:04:39 +01:00
Simon Ser eea9c6331f Automatically map built-in touchscreens/tablets to built-in panels
Detect whether an output is built-in via its type. Detect whether
a touchscreen or tablet tool is built-in via its ID_PATH property.
2021-02-25 09:38:00 -05:00