├── .gitmodules ├── COPYING ├── INSTALL.md ├── README ├── core ├── baseinit ├── baselayout ├── busybox │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── patches │ ├── sources │ └── version ├── byacc │ ├── README │ ├── build │ ├── checksums │ ├── sources │ └── version ├── bzip2 ├── curl ├── flex │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── git │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── kiss ├── linux-headers │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── llvm │ ├── build │ ├── checksums │ ├── depends │ ├── files │ │ └── c99 │ ├── post-install │ ├── sources │ └── version ├── m4 │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ │ └── m4-hand-written-lexer.patch │ ├── post-install │ ├── sources │ └── version ├── make │ ├── build │ ├── checksums │ ├── post-install │ ├── sources │ └── version ├── musl │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── sources │ └── version ├── openssl ├── pigz ├── xz └── zlib ├── extra ├── adwaita-icon-theme │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── alsa-lib ├── alsa-utils │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── atk ├── bkeymaps ├── cairo ├── cbindgen ├── ccache │ ├── build │ ├── checksums │ ├── depends │ ├── post-install │ ├── sources │ └── version ├── cmake ├── dhcpcd ├── dosfstools ├── e2fsprogs │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── efibootmgr │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── efivar │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ │ ├── 0dad6d78a7fb5f6c5fb4a1d646040539db6cf865.patch │ │ ├── 4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch │ │ ├── b98ba8921010d03f46704a476c69861515deb1ca.patch │ │ ├── c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch │ │ └── fdb803402fb32fa6d020bac57a40c7efe4aabb7d.patch │ ├── sources │ └── version ├── eiwd │ ├── README │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── post-install │ ├── sources │ └── version ├── expat ├── ffmpeg │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── firefox-privacy ├── firefox │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ │ ├── fix-clang-as.patch │ │ ├── fix-linux-header.patch │ │ ├── no-fribidi.patch │ │ └── no-x11.patch │ ├── post-install │ ├── sources │ └── version ├── fontconfig │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── post-install │ ├── sources │ └── version ├── freetype-harfbuzz ├── gdk-pixbuf ├── glib ├── gtk+3 │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ ├── post-install │ ├── sources │ └── version ├── hicolor-icon-theme ├── intel-vaapi-driver ├── json-c ├── kirc ├── lame ├── libass ├── libelf │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ ├── sources │ └── version ├── libffi ├── libjpeg-turbo ├── libogg ├── libpng ├── libtheora ├── libudev-zero ├── libva ├── libva-utils ├── libvorbis ├── libvpx │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── sources │ └── version ├── libwebp ├── man-pages ├── mandoc │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ ├── sources │ └── version ├── mdevd │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── sources │ └── version ├── mesa │ ├── build │ ├── checksums │ ├── depends │ ├── post-install │ ├── sources │ └── version ├── meson ├── mold │ ├── README │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── mpv ├── mutt │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── nasm │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── netbsd-curses │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── nodejs ├── opendoas │ ├── README │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── sources │ └── version ├── openresolv ├── openssh ├── opus │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── pango ├── pcre ├── perl ├── pkgconf ├── python ├── rust ├── samurai ├── scdoc │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── sqlite ├── ssu │ ├── README │ ├── build │ ├── checksums │ ├── depends │ ├── post-install │ ├── sources │ └── version ├── strace │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── ttf-croscore ├── tzdata ├── util-linux │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── vim │ ├── build │ ├── depends │ ├── sources │ └── version ├── wpa_supplicant │ ├── build │ ├── checksums │ ├── depends │ ├── files │ ├── sources │ └── version ├── x264 │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ ├── sources │ └── version ├── x265 ├── xvidcore │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version └── zstd │ ├── build │ ├── checksums │ ├── depends │ ├── sources │ └── version ├── gnu ├── gmake │ ├── build │ ├── checksums │ ├── sources │ └── version ├── gnu-as │ ├── build │ ├── checksums │ ├── depends │ ├── patches │ ├── sources │ └── version └── gnugrep └── wayland ├── foot-pgo ├── build ├── checksums ├── depends ├── post-install ├── sources └── version ├── foot ├── build ├── checksums ├── depends ├── post-install ├── sources └── version ├── grim ├── libdrm ├── libinput ├── build ├── checksums ├── depends ├── patches ├── sources └── version ├── libpciaccess ├── libseat ├── libxkbcommon ├── build ├── checksums ├── depends ├── sources └── version ├── pixman ├── slurp ├── sway ├── sway-no-seat ├── sway-tiny ├── wayland-protocols ├── wayland ├── build ├── checksums ├── depends ├── sources └── version ├── wbg ├── wl-clipboard ├── wlroots ├── wlsunset └── xkeyboard-config /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "kiss-repo"] 2 | path = kiss-repo 3 | url = https://github.com/kisslinux/repo.git 4 | ignore = all 5 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019-2020 Dylan Araps 2 | Copyright (c) 2020 Muhammad Herdiansyah 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a 5 | copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | This installation guide is adapted from KISS Linux's installation 2 | guidelines. It's been modified to fit Wyverkiss' whole situation. 3 | 4 | Welcome to the installation guide for Wyverkiss. 5 | 6 | The installation utilizes a tarball which is unpacked to `/`. This same 7 | tarball is also directly usable as a chroot from any Linux distribution. 8 | 9 | A live-CD from a another distribution is required to bootstrap 10 | Wyverkiss. It does not matter which distribution is used so long as it 11 | includes `tar`, `xz` and other basic utilities. 12 | 13 | The guide assumes you have booted a live-CD, are logged in as root, have 14 | your disks, partitions and filesystems setup and have an internet 15 | connection. 16 | 17 | ## The Process 18 | 19 | - [Install Wyverkiss](#install-wyverkiss) 20 | * [Download the latest release](#download-the-latest-release) 21 | * [Verify checksums (recommended)](#verify-checksums--recommended-) 22 | * [Verify signature (recommended)](#verify-signature--recommended-) 23 | * [Unpack the tarball](#unpack-the-tarball) 24 | * [Enter the chroot](#enter-the-chroot) 25 | - [Setup repositories](#setup-repositories) 26 | * [Setting KISS_PATH](#setting-kiss-path) 27 | * [Official repositories](#official-repositories) 28 | * [Universe](#universe) 29 | - [Rebuild Wyverkiss](#rebuild-wyverkiss) 30 | * [Modify compiler options (optional)](#modify-compiler-options--optional-) 31 | * [Update all base packages to the latest version](#update-all-base-packages-to-the-latest-version) 32 | * [Rebuild all packages](#rebuild-all-packages) 33 | - [Userspace tools](#userspace-tools) 34 | * [Filesystem utilities](#filesystem-utilities) 35 | * [WiFi (optional)](#wifi--optional-) 36 | * [Dynamic IP addressing (optional)](#dynamic-ip-addressing--optional-) 37 | - [The hostname](#the-hostname) 38 | - [The kernel](#the-kernel) 39 | * [Install required packages](#install-required-packages) 40 | * [Download the kernel sources and required patches](#download-the-kernel-sources-and-required-patches) 41 | * [Download firmware blobs (if required)](#download-firmware-blobs--if-required-) 42 | * [Patch the kernel](#patch-the-kernel) 43 | * [Configure the kernel](#configure-the-kernel) 44 | * [Build the kernel](#build-the-kernel) 45 | * [Install the kernel](#install-the-kernel) 46 | - [The bootloader (UNDER CONSTRUCTION)](#the-bootloader--under-construction-) 47 | - [Install init scripts](#install-init-scripts) 48 | - [Change the root password (recommended)](#change-the-root-password--recommended-) 49 | - [Add a normal user (recommended)](#add-a-normal-user--recommended-) 50 | * [Install graphical session (wayland) (optional)](#install-graphical-session--wayland---optional-) 51 | - [Further steps](#further-steps) 52 | 53 | 54 | ## Install Wyverkiss 55 | 56 | Start by declaring two variables. 57 | 58 | ```sh 59 | $ url=https://github.com/wyvertux/wyverkiss/releases/download/2021.7-3 60 | $ file=wyverkiss-2021.7-3-rootfs.tar.xz 61 | ``` 62 | 63 | 64 | ### Download the latest release 65 | 66 | ```sh 67 | $ curl -fLO "$url/$file" 68 | ``` 69 | 70 | 71 | ### Verify checksums (recommended) 72 | 73 | ```sh 74 | $ curl -fLO "$url/$file.sha256" 75 | $ sha256sum -c < "$file.sha256" 76 | ``` 77 | 78 | 79 | ### Verify signature (recommended) 80 | 81 | This step verifies that the release was signed by its creator. If the 82 | live OS of your choice does not include GPG, this step can also be done 83 | on another machine (with the same tarball). There are two ways to do 84 | this. By using minisign (or perhaps any `signify`-compatible tool), or 85 | GnuPG. Yes, I'm aware of the irony, using GNU tools to verify a 86 | self-proclaimed GNU-free KISS flavor. 87 | 88 | ```sh 89 | ## Download the armored ASCII file 90 | $ curl -fLO "$url/$file.asc" ## for GnuPG 91 | $ curl -fLO "$url/$file.minisig" ## for minisign 92 | 93 | ## The following step applies only for minisign 94 | $ minisign -Vm "$file" -P RWRX6BWR+kgO3kLVuWgBezKRR9IdFiXVabcicNlmEU+qKmYeP82ZtFMb 95 | 96 | ## The following steps apply only for GnuPG. 97 | 98 | ## Import my public key (if this fails, try another keyserver). 99 | $ gpg --keyserver keys.gnupg.net --recv-keys 100 | 101 | ## Verify the signature 102 | $ gpg --verify "$file.asc" 103 | ``` 104 | 105 | 106 | ### Unpack the tarball 107 | 108 | This step effectively installs Wyverkiss to /mnt. The tarball contains a 109 | working system minus the bootloader and kernel. 110 | 111 | ```sh 112 | $ cd /mnt 113 | $ tar xvf "$OLDPWD/$file" 114 | ``` 115 | 116 | 117 | ### Enter the chroot 118 | 119 | This is a simple script to chroot into /mnt and set up the environment. 120 | The script handles mounting pseudo filesystems (/proc, /dev, /sys, etc), 121 | enabling network inside the chroot and clean up upon exit. 122 | 123 | On execution of this step you will be running Wyverkiss! The next steps 124 | involve the kernel, software compilation and system setup. 125 | 126 | ```sh 127 | $ /mnt/bin/kiss-chroot /mnt 128 | ``` 129 | 130 | 131 | ## Setup repositories 132 | 133 | The repository system is quite different to that of other distributions. 134 | The system is controlled via an environment variable called KISS_PATH. 135 | This variable is analogous to PATH, a colon separated list of absolute 136 | paths. 137 | 138 | A repository is merely a directory (repo) containing directories 139 | (packages) and can be located anywhere on the file-system. The full path 140 | to the directory is the value to KISS_PATH. 141 | 142 | The chroot/installation tarball does not come with any repositories by 143 | default, nor does the package manager expect or assume that any exist in 144 | a given location. This is entirely up to the user. 145 | 146 | 147 | ### Setting KISS_PATH 148 | 149 | The variable can be set system-wide, per-user, per-session, per-command, 150 | and even programmatically. This guide will cover setting it for the 151 | current user with an example repository layout. 152 | 153 | Take this layout: 154 | 155 | ``` 156 | ~/repo 157 | | 158 | +- wyverkiss/ 159 | | - .git/ 160 | | - core/ 161 | | - extra/ 162 | | - wayland/ 163 | | - gnu/ 164 | | 165 | +- personal/ 166 | | - games/ 167 | | - web/ 168 | ``` 169 | 170 | - Repositories are stored in `~/repos/` which is a per-user configuration. 171 | - There is a git repository called `wyverkiss` containing four `kiss` repositories. 172 | - There is a directory called personal, not tracked by git. 173 | - The personal directory contains two `kiss` repositories. 174 | 175 | This user's `KISS_PATH` could look like this: 176 | 177 | ```sh 178 | ## This is the contents for ~/.profile, the numbers on the left indicate the line number 179 | 1 export KISS_PATH='' 180 | 2 KISS_PATH=$KISS_PATH:$HOME/repos/personal/games 181 | 3 KISS_PATH=$KISS_PATH:$HOME/repos/personal/web 182 | 4 KISS_PATH=$KISS_PATH:$HOME/repos/wyverkiss/core 183 | 5 KISS_PATH=$KISS_PATH:$HOME/repos/wyverkiss/extra 184 | 6 KISS_PATH=$KISS_PATH:$HOME/repos/wyverkiss/wayland 185 | 7 KISS_PATH=$KISS_PATH:$HOME/repos/wyverkiss/gnu 186 | ``` 187 | 188 | - All repositories are enabled. 189 | - This is a per-user configuration using `~/.profile` 190 | - The package manager will search this list in the order it is defined. 191 | 192 | TIP: Run `. ~/.profile` for changes to immediately take effect. 193 | 194 | 195 | ### Official repositories 196 | 197 | The official repositories contain everything from the base system to a 198 | working web browser (Firefox) and media player (mpv). This includes 199 | Wayland, rust, nodejs and a lot of other useful software. 200 | 201 | Clone the repository to the directory of your choosing. 202 | 203 | ```sh 204 | $ git clone https://github.com/wyvertux/wyverkiss 205 | ``` 206 | 207 | This will be cloned to a directory called `wyverkiss`. This directory 208 | contains multiple KISS repositories (core, extra, testing, wayland, and 209 | gnu). core, extra, and gnu must be enabled as this guide requires their 210 | use. Wayland is optional. 211 | 212 | 213 | ### Universe 214 | 215 | There are many more repositories in existence, each providing a unique 216 | set of software. These are all independently created and managed by 217 | users. 218 | 219 | - https://kisslinux.xyz/wiki/community/repositories 220 | - https://github.com/topics/kiss-repo 221 | 222 | It may be desirable to save this step for post-installation. 223 | 224 | Please note that all of them are probably tested against KISS Linux's 225 | repo and not Wyverkiss. While you can ask them to support Wyverkiss 226 | environment, they are under no obligation to adhere to your request. 227 | 228 | Repositories should now be setup and in functioning order. Run `kiss 229 | search \*` (notice the backslash) to print all repository packages in 230 | the search order of the package manager. 231 | 232 | #### TIP! 233 | 234 | The install guide (and all documentation) is available via `kiss help`. 235 | 236 | ```sh 237 | $ kiss help install 238 | ``` 239 | 240 | 241 | ## Rebuild Wyverkiss 242 | 243 | This step is entirely optional and can also be done post-installation. 244 | 245 | 246 | ### Modify compiler options (optional) 247 | 248 | These options have been tested and work with every package in the 249 | repositories. If you'd like to play it safe, use `-O2` or `-Os` instead 250 | of `-O3`. 251 | 252 | If your system has a low amount of memory, omit -pipe. This option 253 | speeds up compilation but may use more memory. 254 | 255 | If you intend to transfer packages between machines, omit 256 | `-march=native`. This option tells the compiler to use optimizations 257 | unique to your processor's architecture. 258 | 259 | The `-jX` option should match the number of CPU threads available. You 260 | can omit this, however builds will then be limited to a single thread. 261 | 262 | #### `CFLAGS`/`CXXFLAGS` 263 | 264 | ```sh 265 | ## NOTE: The 'O' in '-O3' is the letter O and NOT 0 (ZERO). 266 | $ export CFLAGS="-O3 -pipe -march=native" 267 | $ export CXXFLAGS="$CFLAGS" 268 | ``` 269 | 270 | #### `MAKEFLAGS` 271 | 272 | ```sh 273 | ## NOTE: '4' should be changed to match the number of threads. 274 | $ export MAKEFLAGS="-j4" 275 | ``` 276 | 277 | 278 | ### Update all base packages to the latest version 279 | 280 | This is how updates are performed on a Wyverkiss system. This command 281 | uses git to pull down changes from all enabled repositories and will 282 | then optionally handle the build/install process. 283 | 284 | ```sh 285 | $ kiss update 286 | ``` 287 | 288 | 289 | ### Rebuild all packages 290 | 291 | We simply cd to the installed packages database and use a glob to grab 292 | the name of every installed package. This glob is then passed to the 293 | package manager as a list of packages to build. 294 | 295 | 296 | ```sh 297 | $ cd /var/db/kiss/installed && kiss build * 298 | ``` 299 | 300 | 301 | ## Userspace tools 302 | 303 | Each kiss action (build, install, etc) has a shorthand alias. From now 304 | on, `kiss b` will be used in place of `kiss build` and so on. 305 | 306 | The software below is required unless stated otherwise. 307 | 308 | 309 | ### Filesystem utilities 310 | 311 | NOTE: Open an issue (in [KISS Linux](https://github.com/kisslinux/repo), 312 | not Wyverkiss) for additional filesystem support. 313 | 314 | #### EXT2, EXT3, EXT4 315 | 316 | ```sh 317 | $ kiss b e2fsprogs 318 | ``` 319 | 320 | #### FAT, VFAT 321 | 322 | ```sh 323 | $ kiss b dosfstools 324 | ``` 325 | 326 | 327 | ### WiFi (optional) 328 | 329 | ```sh 330 | $ kiss b wpa_supplicant 331 | ``` 332 | 333 | 334 | ### Dynamic IP addressing (optional) 335 | 336 | ```sh 337 | $ kiss b dhcpcd 338 | ``` 339 | 340 | 341 | ## The hostname 342 | 343 | #### Create the /etc/hostname file 344 | 345 | ```sh 346 | $ echo HOSTNAME > /etc/hostname 347 | ``` 348 | 349 | #### Update the /etc/hosts file 350 | 351 | ``` 352 | 127.0.0.1 HOSTNAME.localdomain HOSTNAME 353 | ::1 HOSTNAME.localdomain HOSTNAME ip6-localhost 354 | ``` 355 | 356 | NOTE: This step must be done every time the hostname is changed. 357 | 358 | 359 | ## The kernel 360 | 361 | This step involves configuring and building your own Linux kernel. If you have 362 | not done this before, below are a few guides to get you started. 363 | 364 | - https://wiki.gentoo.org/wiki/Kernel/Gentoo_Kernel_Configuration_Guide 365 | - https://wiki.gentoo.org/wiki/Kernel/Configuration 366 | - https://kernelnewbies.org/KernelBuild 367 | 368 | The Linux kernel is not managed by the package manager. The kernel is managed 369 | manually by the user. (Rationale: https://kisslinux.xyz/faq#5.3) 370 | 371 | KISS does not support booting using an initramfs (see 372 | https://kisslinux.xyz/faq#5.2). When configuring your kernel ensure that 373 | all required file-system, disk controller and USB drivers are built with 374 | `[*]` (=y) and not `[m]` (=m). 375 | 376 | 377 | TIP: The Wiki contains a basic kernel configuration page. 378 | See https://kisslinux.xyz/wiki/kernel/config 379 | 380 | 381 | ### Install required packages 382 | 383 | #### libelf (required in most if not all cases). 384 | 385 | ```sh 386 | $ kiss b libelf 387 | ``` 388 | 389 | #### netbsd-curses (required only for `gmake menuconfig`). 390 | 391 | ```sh 392 | $ kiss b netbsd-curses 393 | ``` 394 | 395 | #### perl (required in nearly all cases). 396 | 397 | ```sh 398 | $ kiss b perl 399 | ``` 400 | 401 | #### GNU make (might be installed already) 402 | 403 | ```sh 404 | $ kiss b gmake 405 | ``` 406 | 407 | #### GNU as (might be required if `LLVM_IAS` fails later) 408 | 409 | ```sh 410 | $ kiss b gnu-as 411 | ``` 412 | 413 | TIP: A patch can be applied to remove Perl requirement. 414 | 415 | ``` sh 416 | $ patch -p1 < /usr/share/doc/kiss/wiki/kernel/patches/kernel-no-perl.patch 417 | ``` 418 | 419 | ### Download the kernel sources and required patches 420 | 421 | Kernel releases: 422 | 423 | - https://kernel.org (vanilla) 424 | - https://www.fsfla.org (libre) 425 | 426 | A larger list of kernels can be found here: 427 | 428 | - https://wiki.archlinux.org/index.php/Kernel 429 | 430 | 431 | #### Download the kernel sources. 432 | 433 | ```sh 434 | $ curl -fLO KERNEL_SOURCE 435 | ``` 436 | 437 | #### Extract the kernel sources. 438 | 439 | ```sh 440 | $ tar xvf KERNEL_SOURCE 441 | $ cd linux-* 442 | ``` 443 | 444 | 445 | ### Download firmware blobs (if required) 446 | 447 | To keep the KISS (and subsequently, Wyverkiss) repositories entirely 448 | FOSS, the proprietary kernel firmware is omitted. This also makes sense 449 | as the kernel itself is manually managed by the user. This step is only 450 | required if your hardware needs firmware. 451 | 452 | https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git 453 | 454 | 455 | #### Download and extract the firmware. 456 | 457 | ```sh 458 | $ curl -fLO FIRMWARE_SOURCE.tar.gz 459 | $ tar xvf FIRMWARE_SOURCE.tar.gz 460 | ``` 461 | 462 | #### Copy the required drivers to `/usr/lib/firmware`. 463 | 464 | ```sh 465 | $ mkdir -p /usr/lib/firmware 466 | $ cp -R ./path/to/driver /usr/lib/firmware 467 | ``` 468 | 469 | ### Patch the kernel 470 | 471 | As of kernel 5.13, the following patches need to be applied: 472 | 473 | #### Fix `objtool` failing with musl systems 474 | 475 | ```sh 476 | $ sed 's/$(LIBELF_FLAGS)/$(LIBELF_FLAGS) -D__always_inline=inline/' tools/objtool/Makefile > _ 477 | $ mv -f _ tools/objtool/Makefile 478 | ``` 479 | 480 | #### `byacc` support 481 | 482 | ```sh 483 | $ curl -fLo byacc.patch https://patchwork.kernel.org/project/linux-kbuild/patch/20200130162314.31449-1-e5ten.arch@gmail.com/raw/ 484 | $ patch -p1 < byacc.patch 485 | ``` 486 | 487 | 488 | ### Configure the kernel 489 | 490 | You can determine which drivers you need by searching the web for your 491 | hardware and the Linux kernel. If you require firmware blobs, the 492 | drivers you enable must be enabled as `[m]` (modules). You can also 493 | optionally include the firmware in the kernel itself. 494 | 495 | #### Generate a default config with most drivers built into the kernel. 496 | 497 | ```sh 498 | $ gmake LLVM=1 LLVM_IAS=1 YACC=byacc defconfig 499 | ``` 500 | 501 | #### Open an interactive menu to edit the generated .config and enable anything extra you may need. 502 | 503 | ```sh 504 | $ gmake LLVM=1 LLVM_IAS=1 YACC=byacc menuconfig 505 | ``` 506 | 507 | #### Store the generated config for reuse later. 508 | 509 | ```sh 510 | $ cp .config /path/to/somewhere 511 | ``` 512 | 513 | TIP: The kernel can backup its own .config file. See: 514 | https://kisslinux.xyz/wiki/kernel/config#2.0 515 | 516 | 517 | ### Build the kernel 518 | 519 | This may take a while to complete. The compilation time depends on your 520 | hardware and kernel configuration. 521 | 522 | ```sh 523 | $ gmake LLVM=1 LLVM_IAS=1 YACC=byacc 524 | ``` 525 | 526 | 527 | ### Install the kernel 528 | 529 | - Install the built modules (to /usr/lib). (Ignore the GCC error). 530 | 531 | ```sh 532 | $ gmake INSTALL_MOD_STRIP=1 modules_install 533 | ``` 534 | 535 | - Install the built kernel (to /boot). (Ignore the GCC *and* LILO error). 536 | 537 | ```sh 538 | $ gmake install 539 | ``` 540 | 541 | Rename the kernel/system.map (vmlinuz -> vmlinuz-VERSION). 542 | 543 | ```sh 544 | $ mv /boot/vmlinuz /boot/vmlinuz-VERSION 545 | $ mv /boot/System.map /boot/System.map-VERSION 546 | ``` 547 | 548 | 549 | 550 | ## The bootloader (UNDER CONSTRUCTION) 551 | 552 | Since currently the only bootloader available for KISS is GNU GRUB, and 553 | I don't like most of the alternatives, we cannot use it by default 554 | although there's literally nothing preventing you to use it (we don't 555 | block it, unlike GCC). Consider using EFISTUB instead (Sorry, 556 | prefer-to-use-BIOS guys). 557 | 558 | See KISS Linux’s wiki for EFISTUB for details. 559 | 560 | - https://kisslinux.xyz/wiki/boot/efistub 561 | 562 | 563 | ## Install init scripts 564 | 565 | The default init is busybox init (though nothing ties you to it). The 566 | below commands install the bootup and shutdown scripts as well as the 567 | default inittab config. 568 | 569 | Source code: https://github.com/kisslinux/init 570 | 571 | ```sh 572 | $ kiss b baseinit 573 | ``` 574 | 575 | 576 | ## Change the root password (recommended) 577 | 578 | ```sh 579 | $ passwd root 580 | ``` 581 | 582 | 583 | ## Add a normal user (recommended) 584 | 585 | ```sh 586 | $ adduser USERNAME 587 | ``` 588 | 589 | 590 | ### Install graphical session (wayland) (optional) 591 | 592 | See: 593 | 594 | - https://kisslinux.xyz/wiki/wayland/install 595 | - https://kisslinux.xyz/wiki/wayland 596 | 597 | #### TIP! 598 | 599 | The Wiki is available offline via `kiss help wiki`. 600 | 601 | ```sh 602 | $ kiss help wiki 603 | 604 | $ kiss help wiki/wayland 605 | $ kiss help wiki/wayland/install 606 | 607 | $ kiss help wiki/software 608 | $ kiss help wiki/software/firefox 609 | ``` 610 | 611 | 612 | ## Further steps 613 | 614 | The installation is complete! 615 | 616 | If everything was done correctly, you should now be able to reboot into 617 | your Wyverkiss installation. Typical post-installation steps should 618 | follow, you can use the KISS wiki for that. 619 | 620 | If you encountered any issues or have any questions, get in touch. 621 | 622 | See: https://github.com/wyvertux/wyverkiss/issues 623 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Unfortunately, due to lack of interest of maintaining this project (the 2 | KISS original author disappeared for the second time, I got a day job, 3 | and I don't really agree with the direction taken by "the new 4 | management"), Wyverkiss and its associated projects are no longer under 5 | development of any kind. 6 | 7 | Wyverkiss was originally a realisation of a personal "what-if" 8 | situation. I've always been fascinated with how an operating system is 9 | built. I used Gentoo at first, learning about GCC, compiler flags, and 10 | so on and built an LFS system to manually build everything, and finally, 11 | after seeing Clang and other alternative compilers which the BSDs use, 12 | try to see if Clang (at that time, version 3.8) is good enough to build 13 | almost everything in the Linux land (it wasn't). This fascination 14 | somewhat waned with me graduating from high school and entering college. 15 | My interest renewed in 2019, when I had to write my bachelor's thesis. 16 | A lot of package managers are too complicated or ugly, so when Dylan 17 | came in with KISS package manager and format, I hopped on since it's 18 | simple enough and has a pretty good format. The progress in 4 years 19 | finally saw that the LLVM suite is good enough to be one of the core 20 | components of a Linux system. Curiosity satisfied, and it's good enough 21 | for my personal use. 22 | 23 | However, maintaining a whole distribution is a different ballpark, you 24 | have to keep it updated, build some infrastructure, and if you want to 25 | make it general-purpose, consider the common and somewhat uncommon use 26 | cases, and you need to have a good network, which I don't have any. 27 | Therefore, I decided to abandon this project. 28 | 29 | If you like to see a general-purpose Linux distribution with an 30 | alternative toolchain (including LLVM, musl, etc.), you can check out 31 | Chimera Linux [1], I personally regard the author as trustworthy and 32 | resourceful. and is not overly "militant" to sacrifice practicality. If 33 | you need a KISS Linux-like experience, you can try Glasnost Linux [2]. 34 | 35 | This repository is now archived. 36 | 37 | [1] https://chimera-linux.org 38 | [2] https://www.glasnost.org 39 | 40 | ------------------------------------------------------------------------ 41 | 42 | \ /\ / 43 | \/ \/yverkiss 44 | ________________________________________________________________________ 45 | 46 | Wyverkiss is an alternative rootfs for KISS Linux. If KISS goes GNU, we 47 | go the opposite. 48 | 49 | Wyverkiss (unlike Wyvertux) is supposed to closely track KISS Linux as 50 | much as possible. It means the Wyverkiss repo will only be used as an 51 | "overlay" for KISS Linux to work outside the GNU toolchain ecosystem 52 | (except for a select few programs that will be needed). The changes made 53 | in Wyverkiss will be upstreamed if possible. 54 | 55 | Ideally, this repository should be almost empty or unneeded at all. But 56 | that would be highly unrealistic. 57 | 58 | 59 | Changes 60 | ________________________________________________________________________ 61 | 62 | This table contains a summary of GNU programs replaced by its 63 | equivalents. However, it is not an exhaustive list, and some GNU 64 | programs mentioned may still be included in a separate repository, gnu/. 65 | 66 | +------------------+---------------+ 67 | | Original package | Replacement | 68 | +------------------+---------------+ 69 | | GNU gcc/g++ | Clang{,++} | 70 | | GNU libstdc++ | libc++ | 71 | | GNU make | bmake | 72 | | GNU binutils | LLVM binutils | 73 | | GNU bison | byacc | 74 | +------------------+---------------+ 75 | 76 | 77 | Disclaimer 78 | ________________________________________________________________________ 79 | 80 | Wyverkiss is not officially supported by KISS Linux. 81 | Use at your own risk. Support for certain packages are not guaranteed. 82 | -------------------------------------------------------------------------------- /core/baseinit: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/baseinit -------------------------------------------------------------------------------- /core/baselayout: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/baselayout/ -------------------------------------------------------------------------------- /core/busybox/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | for patch in patch/*.patch; do 4 | patch -p1 < "$patch" 5 | done 6 | 7 | # Remove forced gcc/g++ usage so builds work on gcc-less systems. 8 | sed -e "s#= g[c+][c+]#= $CC#g" \ 9 | -e "s#\(\$(CROSS_COMPILE)\)gcc#\1$CC#g" Makefile > _ 10 | mv -f _ Makefile 11 | 12 | case $("$CC" --version) in *clang*) 13 | # Disable UB based optimizations which are optimized out by 14 | # clang and become null pointer dereferences(?). 15 | patch -p1 < patch-clang/fix-UB.patch 16 | 17 | # Ensure that busybox's build system is aware that 'cc' may point 18 | # to clang rather than GCC. This is the case in non-GCC systems. 19 | sed "s&\(\$(CC),\)clang&\1$CC&g" Makefile.flags > _ 20 | mv -f _ Makefile.flags 21 | esac 22 | 23 | # Build and install regular busybox. 24 | # This excludes utilities which require 'suid' to function. 25 | gmake HOSTCC="$CC" 26 | gmake CONFIG_PREFIX="$1/usr" install 27 | 28 | # Rename the binary temporarily. 29 | mv "$1/usr/bin/busybox" "$1/usr/bin/busybox-nosuid" 30 | 31 | # Build and install suid busybox. 32 | # This _only_ includes utlities which require 'suid' to function. 33 | cp -f .config-suid .config 34 | gmake HOSTCC="$CC" 35 | gmake CONFIG_PREFIX="$1/usr" install 36 | 37 | # Aptly name the busybox binaries. 38 | mv -f "$1/usr/bin/busybox" "$1/usr/bin/busybox-suid" 39 | mv -f "$1/usr/bin/busybox-nosuid" "$1/usr/bin/busybox" 40 | 41 | # Install the non-suid symlinks. 42 | "$1/usr/bin/busybox" --list | while read -r bin; do 43 | ln -s busybox "$1/usr/bin/$bin" 44 | done 45 | 46 | # Install the suid symlinks. 47 | "$1/usr/bin/busybox-suid" --list | while read -r bin; do 48 | ln -s busybox-suid "$1/usr/bin/$bin" 49 | done 50 | 51 | # Set suid on busybox suid. 52 | chmod u+s "$1/usr/bin/busybox-suid" 53 | 54 | # The acpid command requires that this directory exist 55 | # and does not automatically create it.. 56 | mkdir -p "$1/etc/acpid" 57 | 58 | # Install runit services. 59 | for s in acpid crond syslogd mdev ntpd; do 60 | mkdir -p "$1/etc/sv/$s" 61 | cp -f "$s.run" "$1/etc/sv/$s/run" 62 | ln -sf "/run/runit/supervise.$s" "$1/etc/sv/$s/supervise" 63 | done 64 | 65 | cp -f mdev.conf "$1/etc/mdev.conf" 66 | -------------------------------------------------------------------------------- /core/busybox/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/busybox/checksums -------------------------------------------------------------------------------- /core/busybox/depends: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/busybox/depends -------------------------------------------------------------------------------- /core/busybox/files: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/busybox/files -------------------------------------------------------------------------------- /core/busybox/patches: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/busybox/patches/ -------------------------------------------------------------------------------- /core/busybox/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/busybox/sources -------------------------------------------------------------------------------- /core/busybox/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/busybox/version -------------------------------------------------------------------------------- /core/byacc/README: -------------------------------------------------------------------------------- 1 | Byacc 2 | ________________________________________________________________________________ 3 | 4 | Berkeley Yacc (byacc) is a Unix parser generator designed to be 5 | compatible with Yacc. 6 | 7 | Upstream: https://invisible-island.net/byacc/byacc.html 8 | 9 | 10 | [000] Index 11 | ________________________________________________________________________________ 12 | 13 | * Installation ........................................................... [001] 14 | * Usage .................................................................. [002] 15 | * References ............................................................. [003] 16 | 17 | 18 | [001] Installation 19 | ________________________________________________________________________________ 20 | 21 | +------------------------------------------------------------------------------+ 22 | | | 23 | | $ kiss b byacc | 24 | | | 25 | +------------------------------------------------------------------------------+ 26 | 27 | 28 | [002] Usage 29 | ________________________________________________________________________________ 30 | 31 | Refer to the accompanying manual pages or command help output. 32 | 33 | 34 | [003] References 35 | ________________________________________________________________________________ 36 | 37 | [0] https://en.wikipedia.org/wiki/Berkeley_Yacc 38 | -------------------------------------------------------------------------------- /core/byacc/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | ./configure \ 4 | --prefix=/usr \ 5 | --program-prefix=b \ 6 | --enable-btyacc 7 | 8 | make 9 | make DESTDIR="$1" install 10 | 11 | # Also install as yacc 12 | ln -s byacc "$1/usr/bin/yacc" 13 | -------------------------------------------------------------------------------- /core/byacc/checksums: -------------------------------------------------------------------------------- 1 | f158529be9d0594263c7f11a87616a49ea23e55ac63691252a2304fbbc7d3a83 2 | -------------------------------------------------------------------------------- /core/byacc/sources: -------------------------------------------------------------------------------- 1 | https://invisible-mirror.net/archives/byacc/byacc-VERSION.tgz 2 | -------------------------------------------------------------------------------- /core/byacc/version: -------------------------------------------------------------------------------- 1 | 20210808 1 2 | -------------------------------------------------------------------------------- /core/bzip2: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/bzip2 -------------------------------------------------------------------------------- /core/curl: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/curl -------------------------------------------------------------------------------- /core/flex/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | sed -i 's/ | \$(FLEX)$//' doc/Makefile.in 4 | 5 | ./configure \ 6 | --prefix=/usr \ 7 | ac_cv_func_malloc_0_nonnull=yes \ 8 | ac_cv_func_realloc_0_nonnull=yes 9 | 10 | make 11 | make DESTDIR="$1" install 12 | 13 | ln -s flex "$1/usr/bin/lex" 14 | 15 | # Remove READMEs and such. 16 | rm -rf "$1/usr/share/doc" 17 | -------------------------------------------------------------------------------- /core/flex/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/flex/checksums -------------------------------------------------------------------------------- /core/flex/depends: -------------------------------------------------------------------------------- 1 | byacc make 2 | m4 make 3 | -------------------------------------------------------------------------------- /core/flex/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/flex/sources -------------------------------------------------------------------------------- /core/flex/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/flex/version -------------------------------------------------------------------------------- /core/git/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export CFLAGS="$CFLAGS -static" 4 | 5 | cat > config.mak < _ 4 | mv -f _ compiler-rt/cmake/config-ix.cmake 5 | 6 | export DESTDIR="$1" 7 | cmake -B build \ 8 | -DCMAKE_C_COMPILER=clang \ 9 | -DCMAKE_CXX_COMPILER=clang++ \ 10 | -DCMAKE_INSTALL_PREFIX=/usr \ 11 | -DCMAKE_BUILD_TYPE=Release \ 12 | -DLLVM_BUILD_LLVM_DYLIB=ON \ 13 | -DLLVM_LINK_LLVM_DYLIB=ON \ 14 | -DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \ 15 | -DLLVM_ENABLE_PROJECTS="clang;compiler-rt;libunwind;libcxxabi;libcxx;lld" \ 16 | -DLLVM_ENABLE_RTTI=ON \ 17 | -DLLVM_ENABLE_EH=ON \ 18 | -DLLVM_ENABLE_TERMINFO=OFF \ 19 | -DLLVM_ENABLE_LIBXML2=OFF \ 20 | -DLLVM_ENABLE_LIBEDIT=OFF \ 21 | -DLLVM_ENABLE_ZLIB=OFF \ 22 | -DLLVM_HOST_TRIPLE="$(clang -dumpmachine)" \ 23 | -DLLVM_INCLUDE_BENCHMARKS=OFF \ 24 | -DLLVM_INCLUDE_EXAMPLES=OFF \ 25 | -DLLVM_INCLUDE_DOCS=OFF \ 26 | -DLLVM_INCLUDE_TESTS=OFF \ 27 | -DLLVM_ENABLE_LIBCXX=ON \ 28 | -DLLVM_ENABLE_LLD=ON \ 29 | -DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \ 30 | -DLIBUNWIND_USE_COMPILER_RT=ON \ 31 | -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ 32 | -DLIBCXXABI_USE_COMPILER_RT=ON \ 33 | -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON \ 34 | -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=ON \ 35 | -DLIBCXXABI_ENABLE_SHARED=OFF \ 36 | -DLIBCXX_CXX_ABI=libcxxabi \ 37 | -DLIBCXX_USE_COMPILER_RT=ON \ 38 | -DLIBCXX_HAS_MUSL_LIBC=ON \ 39 | -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \ 40 | -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=ON \ 41 | -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \ 42 | -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \ 43 | -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF \ 44 | -DCLANG_DEFAULT_CXX_STDLIB=libc++ \ 45 | -DCLANG_DEFAULT_RTLIB=compiler-rt \ 46 | -Wno-dev llvm 47 | 48 | cmake --build build 49 | cmake --install build 50 | 51 | # libc++abi header files 52 | mkdir -p "$1/usr" 53 | cp -r libcxxabi/include "$1/usr" 54 | 55 | # LLD: Replace GNU binutils 56 | ln -s ld.lld "$1/usr/bin/ld" 57 | 58 | # Clang: Some legacy programs may require cc 59 | ln -s clang "$1/usr/bin/cc" 60 | 61 | # Clang: equivalent for c++ 62 | ln -s clang++ "$1/usr/bin/c++" 63 | 64 | # Clang: equivalent for cpp 65 | ln -s clang-cpp "$1/usr/bin/cpp" 66 | 67 | # Clang: POSIX compliance 68 | cp -f c99 "$1/usr/bin/c99" 69 | 70 | # Clang: Override libexec, the path is hardcoded, unfortunately. 71 | mv -f \ 72 | "$1/usr/libexec/"*analyze* \ 73 | "$1/usr/libexec/"*intercept* \ 74 | "$1/usr/lib/clang" 75 | 76 | rmdir "$1/usr/libexec" 77 | 78 | sed "s|libexec|lib/clang|" "$1/usr/bin/scan-build" > _ 79 | mv -f _ "$1/usr/bin/scan-build" 80 | chmod +x "$1/usr/bin/scan-build" 81 | -------------------------------------------------------------------------------- /core/llvm/checksums: -------------------------------------------------------------------------------- 1 | 408d11708643ea826f519ff79761fcdfc12d641a2510229eec459e72f8163020 2 | 5d611cbb06cfb6626be46eb2f23d003b2b80f40182898daa54b1c4e8b5b9e17e 3 | 4c3602d76c7868a96b30c36165c4b7643e2a20173fced7e071b4baeb2d74db3f 4 | 36f819091216177a61da639244eda67306ccdd904c757d70d135e273278b65e1 5 | 3682f16ce33bb0a8951fc2c730af2f9b01a13b71b2b0dc1ae1e7034c7d86ca1a 6 | becd5f1cd2c03cd6187558e9b4dc8a80b6d774ff2829fede88aa1576c5234ce3 7 | 20d1900bcd64ff62047291f6edb6ba2fed34d782675ff68713bf0c2fc9e69386 8 | 765614b3396d70bca3fa0ae4a813632486c6dca320e2bd13c8c39dca52be4a4c 9 | -------------------------------------------------------------------------------- /core/llvm/depends: -------------------------------------------------------------------------------- 1 | cmake make 2 | python make 3 | zlib 4 | -------------------------------------------------------------------------------- /core/llvm/files/c99: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec cc -std=c99 "$@" 3 | -------------------------------------------------------------------------------- /core/llvm/post-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | cat < Since LLVM 12.0.1, libc++abi.so.1.0 has been removed since we're 5 | able to link them statically now (ala libstdc++ and libsupc++ I 6 | presume). 7 | 8 | You should have rebuilt ALL packages that depend on libc++ on 9 | runtime after installation of LLVM 12.0.1, otherwise you may see 10 | errors upon executing a binary such as: 11 | "Error loading shared library: libc++abi.so.1.0: No such file or 12 | directory." 13 | 14 | This notice will be removed in the next major/minor release of LLVM 15 | (LLVM 12.1.0 or LLVM 13.0.0). 16 | 17 | To see the packages that depend on libc++ (part of LLVM), run: 18 | $ kiss revdepends llvm 19 | EOF 20 | -------------------------------------------------------------------------------- /core/llvm/sources: -------------------------------------------------------------------------------- 1 | https://github.com/llvm/llvm-project/releases/download/llvmorg-VERSION/llvm-VERSION.src.tar.xz llvm/ 2 | https://github.com/llvm/llvm-project/releases/download/llvmorg-VERSION/clang-VERSION.src.tar.xz clang/ 3 | https://github.com/llvm/llvm-project/releases/download/llvmorg-VERSION/compiler-rt-VERSION.src.tar.xz compiler-rt/ 4 | https://github.com/llvm/llvm-project/releases/download/llvmorg-VERSION/libunwind-VERSION.src.tar.xz libunwind/ 5 | https://github.com/llvm/llvm-project/releases/download/llvmorg-VERSION/libcxx-VERSION.src.tar.xz libcxx/ 6 | https://github.com/llvm/llvm-project/releases/download/llvmorg-VERSION/libcxxabi-VERSION.src.tar.xz libcxxabi/ 7 | https://github.com/llvm/llvm-project/releases/download/llvmorg-VERSION/lld-VERSION.src.tar.xz lld/ 8 | files/c99 9 | -------------------------------------------------------------------------------- /core/llvm/version: -------------------------------------------------------------------------------- 1 | 13.0.0 1 2 | -------------------------------------------------------------------------------- /core/m4/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | patch -p1 < m4-hand-written-lexer.patch 4 | 5 | ./configure \ 6 | --prefix=/usr \ 7 | --mandir=/usr/share/man \ 8 | --enable-m4 \ 9 | --enable-static 10 | 11 | make -B 12 | make -B DESTDIR="$1" install 13 | -------------------------------------------------------------------------------- /core/m4/checksums: -------------------------------------------------------------------------------- 1 | 49e1b859b8be40883648c68f6e7d42a1a9eb90f563f423aa99f82ab0d712d526 2 | 265ed64e2ab2b10be8bf953d6119e81874dff166e526590e983ae11756c8c15a 3 | -------------------------------------------------------------------------------- /core/m4/depends: -------------------------------------------------------------------------------- 1 | byacc make 2 | -------------------------------------------------------------------------------- /core/m4/patches/m4-hand-written-lexer.patch: -------------------------------------------------------------------------------- 1 | From edf250c633bef40e7e37dafc9fc393dd2ad9074f Mon Sep 17 00:00:00 2001 2 | From: Michael Forney 3 | Date: Tue, 10 Apr 2018 13:37:14 -0700 4 | Subject: [PATCH] m4: Use hand-written lexer to avoid cycle in bootstrap 5 | 6 | --- 7 | tokenizer.c | 191 +++++++++++++++++++++++++++++++++++++++++ 8 | tokenizer.l | 109 ----------------------- 9 | 2 files changed, 191 insertions(+), 109 deletions(-) 10 | create mode 100644 tokenizer.c 11 | delete mode 100644 tokenizer.l 12 | 13 | diff --git a/tokenizer.c b/tokenizer.c 14 | new file mode 100644 15 | index 00000000000..fa19fc65035 16 | --- /dev/null 17 | +++ b/tokenizer.c 18 | @@ -0,0 +1,191 @@ 19 | +/* $OpenBSD: tokenizer.l,v 1.10 2017/06/17 01:55:16 bcallah Exp $ */ 20 | +/* 21 | + * Copyright (c) 2004 Marc Espie 22 | + * 23 | + * Permission to use, copy, modify, and distribute this software for any 24 | + * purpose with or without fee is hereby granted, provided that the above 25 | + * copyright notice and this permission notice appear in all copies. 26 | + * 27 | + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 28 | + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 29 | + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 30 | + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 31 | + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 32 | + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 33 | + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 34 | + */ 35 | +#include "parser.h" 36 | +#include 37 | +#include 38 | +#include 39 | +#include 40 | +#include 41 | +#include 42 | +#include 43 | +#include 44 | + 45 | +extern void m4_warnx(const char *, ...); 46 | +extern int mimic_gnu; 47 | +extern int32_t yylval; 48 | +static const char *yypos; 49 | + 50 | +void 51 | +yy_scan_string(const char *s) 52 | +{ 53 | + yypos = s; 54 | +} 55 | + 56 | +static int32_t 57 | +number(const char *yytext, size_t yylen) 58 | +{ 59 | + long l; 60 | + 61 | + errno = 0; 62 | + l = strtol(yytext, NULL, 0); 63 | + if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) || 64 | + l > INT32_MAX || l < INT32_MIN) 65 | + m4_warnx("numeric overflow in expr: %.*s", (int)yylen, yytext); 66 | + return l; 67 | +} 68 | + 69 | +static int32_t 70 | +parse_radix(const char *yytext, size_t yylen) 71 | +{ 72 | + long base; 73 | + char *next; 74 | + long l; 75 | + int d; 76 | + 77 | + l = 0; 78 | + base = strtol(yytext+2, &next, 0); 79 | + if (base > 36 || next == NULL) { 80 | + m4_warnx("error in number %.*s", (int)yylen, yytext); 81 | + } else { 82 | + next++; 83 | + while (*next != 0) { 84 | + if (*next >= '0' && *next <= '9') 85 | + d = *next - '0'; 86 | + else if (*next >= 'a' && *next <= 'z') 87 | + d = *next - 'a' + 10; 88 | + else { 89 | + assert(*next >= 'A' && *next <= 'Z'); 90 | + d = *next - 'A' + 10; 91 | + } 92 | + if (d >= base) { 93 | + m4_warnx("error in number %.*s", (int)yylen, yytext); 94 | + return 0; 95 | + } 96 | + l = base * l + d; 97 | + next++; 98 | + } 99 | + } 100 | + return l; 101 | +} 102 | + 103 | +static int 104 | +isodigit(int c) 105 | +{ 106 | + return c >= '0' && c <= '7'; 107 | +} 108 | + 109 | +int yylex(void) 110 | +{ 111 | + const char *start; 112 | + 113 | +next: 114 | + start = yypos; 115 | + switch (*yypos) { 116 | + case ' ': 117 | + case '\t': 118 | + case '\n': 119 | + ++yypos; 120 | + goto next; 121 | + case '<': 122 | + switch (yypos[1]) { 123 | + case '=': 124 | + yypos += 2; 125 | + return LE; 126 | + case '<': 127 | + yypos += 2; 128 | + return LSHIFT; 129 | + } 130 | + break; 131 | + case '>': 132 | + switch (yypos[1]) { 133 | + case '=': 134 | + yypos += 2; 135 | + return GE; 136 | + case '>': 137 | + yypos += 2; 138 | + return RSHIFT; 139 | + } 140 | + break; 141 | + case '=': 142 | + if (yypos[1] != '=') 143 | + break; 144 | + yypos += 2; 145 | + return EQ; 146 | + case '!': 147 | + if (yypos[1] != '=') 148 | + break; 149 | + yypos += 2; 150 | + return NE; 151 | + case '&': 152 | + if (yypos[1] != '&') 153 | + break; 154 | + yypos += 2; 155 | + return LAND; 156 | + case '|': 157 | + if (yypos[1] != '|') 158 | + break; 159 | + yypos += 2; 160 | + return LOR; 161 | + case '*': 162 | + if (!mimic_gnu || yypos[1] != '*') 163 | + break; 164 | + yypos += 2; 165 | + return EXPONENT; 166 | + case '0': 167 | + switch (*++yypos) { 168 | + case 'x': 169 | + case 'X': 170 | + if (!isxdigit(*++yypos)) 171 | + return ERROR; 172 | + do ++yypos; 173 | + while (isxdigit(*yypos)); 174 | + break; 175 | + case 'r': 176 | + case 'R': 177 | + if (!mimic_gnu) 178 | + break; 179 | + if (!isdigit(*++yypos)) 180 | + return ERROR; 181 | + do ++yypos; 182 | + while (isdigit(*yypos)); 183 | + if (*yypos != ':') 184 | + return ERROR; 185 | + if (!isalnum(*++yypos)) 186 | + return ERROR; 187 | + do ++yypos; 188 | + while (isalnum(*yypos)); 189 | + yylval = parse_radix(start, yypos - start); 190 | + return NUMBER; 191 | + default: 192 | + do ++yypos; 193 | + while (isodigit(*yypos)); 194 | + break; 195 | + } 196 | + yylval = number(start, yypos - start); 197 | + return NUMBER; 198 | + case '\0': 199 | + return '\0'; 200 | + } 201 | + if (isdigit(*yypos)) { 202 | + do ++yypos; 203 | + while (isdigit(*yypos)); 204 | + yylval = number(start, yypos - start); 205 | + return NUMBER; 206 | + } 207 | + 208 | + return *yypos++; 209 | +} 210 | diff --git a/tokenizer.l b/tokenizer.l 211 | deleted file mode 100644 212 | index 94f02fb6085..00000000000 213 | --- a/tokenizer.l 214 | +++ /dev/null 215 | @@ -1,109 +0,0 @@ 216 | -%{ 217 | -/* $OpenBSD: tokenizer.l,v 1.10 2017/06/17 01:55:16 bcallah Exp $ */ 218 | -/* 219 | - * Copyright (c) 2004 Marc Espie 220 | - * 221 | - * Permission to use, copy, modify, and distribute this software for any 222 | - * purpose with or without fee is hereby granted, provided that the above 223 | - * copyright notice and this permission notice appear in all copies. 224 | - * 225 | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 226 | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 227 | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 228 | - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 229 | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 230 | - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 231 | - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 232 | - */ 233 | -#include "parser.h" 234 | -#include 235 | -#include 236 | -#include 237 | -#include 238 | -#include 239 | - 240 | -extern void m4_warnx(const char *, ...); 241 | -extern int mimic_gnu; 242 | -extern int32_t yylval; 243 | - 244 | -int32_t number(void); 245 | -int32_t parse_radix(void); 246 | -%} 247 | - 248 | -delim [ \t\n] 249 | -ws {delim}+ 250 | -hex 0[xX][0-9a-fA-F]+ 251 | -oct 0[0-7]* 252 | -dec [1-9][0-9]* 253 | -radix 0[rR][0-9]+:[0-9a-zA-Z]+ 254 | - 255 | -%option noyywrap 256 | - 257 | -%% 258 | -{ws} {/* just skip it */} 259 | -{hex}|{oct}|{dec} { yylval = number(); return(NUMBER); } 260 | -{radix} { if (mimic_gnu) { 261 | - yylval = parse_radix(); return(NUMBER); 262 | - } else { 263 | - return(ERROR); 264 | - } 265 | - } 266 | -"<=" { return(LE); } 267 | -">=" { return(GE); } 268 | -"<<" { return(LSHIFT); } 269 | -">>" { return(RSHIFT); } 270 | -"==" { return(EQ); } 271 | -"!=" { return(NE); } 272 | -"&&" { return(LAND); } 273 | -"||" { return(LOR); } 274 | -"**" { if (mimic_gnu) { return (EXPONENT); } } 275 | -. { return yytext[0]; } 276 | -%% 277 | - 278 | -int32_t 279 | -number() 280 | -{ 281 | - long l; 282 | - 283 | - errno = 0; 284 | - l = strtol(yytext, NULL, 0); 285 | - if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) || 286 | - l > INT32_MAX || l < INT32_MIN) 287 | - m4_warnx("numeric overflow in expr: %s", yytext); 288 | - return l; 289 | -} 290 | - 291 | -int32_t 292 | -parse_radix() 293 | -{ 294 | - long base; 295 | - char *next; 296 | - long l; 297 | - int d; 298 | - 299 | - l = 0; 300 | - base = strtol(yytext+2, &next, 0); 301 | - if (base > 36 || next == NULL) { 302 | - m4_warnx("error in number %s", yytext); 303 | - } else { 304 | - next++; 305 | - while (*next != 0) { 306 | - if (*next >= '0' && *next <= '9') 307 | - d = *next - '0'; 308 | - else if (*next >= 'a' && *next <= 'z') 309 | - d = *next - 'a' + 10; 310 | - else { 311 | - assert(*next >= 'A' && *next <= 'Z'); 312 | - d = *next - 'A' + 10; 313 | - } 314 | - if (d >= base) { 315 | - m4_warnx("error in number %s", yytext); 316 | - return 0; 317 | - } 318 | - l = base * l + d; 319 | - next++; 320 | - } 321 | - } 322 | - return l; 323 | -} 324 | - 325 | -- 326 | 2.17.0 327 | 328 | -------------------------------------------------------------------------------- /core/m4/post-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat < _ 7 | mv -f _ boot-strap 8 | chmod +x boot-strap 9 | 10 | # Yeah, I have no idea why bmake do this. 11 | sed -e 's/-nostdinc//' mk/sys/Linux.mk > _ 12 | mv -f _ mk/sys/Linux.mk 13 | 14 | export CFLAGS="$CFLAGS -static" 15 | export LDFLAGS="$LDFLAGS -static" 16 | 17 | ./boot-strap --with-default-sys-path=/usr/share/mk op=build 18 | INSTALL=install ./boot-strap --prefix=/usr --with-mksrc=/usr/share/mk --install-destdir="$1" op=install 19 | 20 | rm -rf "$1/usr/share/man/cat1" 21 | mkdir -p "$1/usr/share/man/man1" 22 | cp bmake.1 "$1/usr/share/man/man1/bmake.1" 23 | ln -s bmake "$1/usr/bin/make" 24 | -------------------------------------------------------------------------------- /core/make/checksums: -------------------------------------------------------------------------------- 1 | 40a5860812091a0613b9542637a0f4aa05f38889e2a1f889f0e827feb41357d2 2 | -------------------------------------------------------------------------------- /core/make/post-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat <nostrip 5 | 6 | ./configure \ 7 | --prefix=/usr \ 8 | --syslibdir=/usr/lib \ 9 | # Uncomment if using valgrind or similar. 10 | # --enable-debug 11 | 12 | gmake 13 | gmake DESTDIR="$1" install 14 | 15 | mkdir -p "$1/usr/bin" 16 | ln -s /usr/lib/ld-musl-x86_64.so.1 "$1/usr/bin/ldd" 17 | 18 | # Fix incorrect symlink to libc.so. 19 | ln -sf libc.so "$1/usr/lib/ld-musl-x86_64.so.1" 20 | 21 | # Install BSD compatibility headers. 22 | cp -f cdefs.h queue.h tree.h \ 23 | "$1/usr/include/sys" 24 | 25 | # Install getconf. 26 | cc getconf.c -o "$1/usr/bin/getconf" 27 | cc getent.c -o "$1/usr/bin/getent" 28 | -------------------------------------------------------------------------------- /core/musl/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/musl/checksums -------------------------------------------------------------------------------- /core/musl/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | -------------------------------------------------------------------------------- /core/musl/files: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/musl/files -------------------------------------------------------------------------------- /core/musl/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/musl/sources -------------------------------------------------------------------------------- /core/musl/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/core/musl/version -------------------------------------------------------------------------------- /core/openssl: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/openssl/ -------------------------------------------------------------------------------- /core/pigz: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/pigz/ -------------------------------------------------------------------------------- /core/xz: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/xz -------------------------------------------------------------------------------- /core/zlib: -------------------------------------------------------------------------------- 1 | ../kiss-repo/core/zlib/ -------------------------------------------------------------------------------- /extra/adwaita-icon-theme/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | ./configure \ 4 | --prefix=/usr 5 | 6 | gmake 7 | gmake install 8 | -------------------------------------------------------------------------------- /extra/adwaita-icon-theme/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/adwaita-icon-theme/checksums -------------------------------------------------------------------------------- /extra/adwaita-icon-theme/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | -------------------------------------------------------------------------------- /extra/adwaita-icon-theme/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/adwaita-icon-theme/sources -------------------------------------------------------------------------------- /extra/adwaita-icon-theme/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/adwaita-icon-theme/version -------------------------------------------------------------------------------- /extra/alsa-lib: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/alsa-lib -------------------------------------------------------------------------------- /extra/alsa-utils/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # shellcheck disable=2016 3 | 4 | # Fix alsamixer for netbsd-curses 5 | sed -e 's/ MIN_MENU_COMMAND/REQ_LEFT_ITEM/' \ 6 | -e 's/ MAX_MENU_COMMAND/REQ_PREV_MATCH/' \ 7 | alsamixer/bindings.h > _ 8 | mv -f _ alsamixer/bindings.h 9 | 10 | # Makefile fix 11 | sed '/\$(edit)\|\.\(service\|rules\)/d' alsactl/Makefile.in > _ 12 | sed '/\$(edit)\|\.\(service\|rules\)/d' alsaucm/Makefile.in > __ 13 | mv -f _ alsactl/Makefile.in 14 | mv -f __ alsaucm/Makefile.in 15 | 16 | ./configure \ 17 | --prefix=/usr \ 18 | --sbindir=/usr/bin \ 19 | --with-udev-rules-dir=/usr/lib/udev/rules.d \ 20 | --disable-alsaconf \ 21 | --disable-bat \ 22 | --disable-xmlto \ 23 | --disable-nls 24 | 25 | make 26 | make DESTDIR="$1" install 27 | -------------------------------------------------------------------------------- /extra/alsa-utils/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/alsa-utils/checksums -------------------------------------------------------------------------------- /extra/alsa-utils/depends: -------------------------------------------------------------------------------- 1 | alsa-lib 2 | netbsd-curses 3 | -------------------------------------------------------------------------------- /extra/alsa-utils/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/alsa-utils/sources -------------------------------------------------------------------------------- /extra/alsa-utils/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/alsa-utils/version -------------------------------------------------------------------------------- /extra/atk: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/atk -------------------------------------------------------------------------------- /extra/bkeymaps: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/bkeymaps/ -------------------------------------------------------------------------------- /extra/cairo: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/cairo -------------------------------------------------------------------------------- /extra/cbindgen: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/cbindgen -------------------------------------------------------------------------------- /extra/ccache/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export DESTDIR="$1" 4 | export CFLAGS="$CFLAGS -static" 5 | export CXXFLAGS="$CXXFLAGS -static" 6 | export LDFLAGS="$LDFLAGS -lc++ -lc++abi -lunwind -static" 7 | 8 | cmake -B build \ 9 | -DCMAKE_INSTALL_PREFIX=/usr \ 10 | -DCMAKE_BUILD_TYPE=Release \ 11 | -DREDIS_STORAGE_BACKEND=OFF \ 12 | -DENABLE_TESTING=OFF \ 13 | -DZSTD_LIBRARY=/usr/lib/libzstd.a 14 | 15 | cmake --build build 16 | cmake --install build 17 | 18 | mkdir -p "$1/usr/lib/ccache/bin" 19 | 20 | for link in \ 21 | cc \ 22 | clang \ 23 | clang++ \ 24 | cpp \ 25 | c++ 26 | do 27 | ln -sf /usr/bin/ccache "$1/usr/lib/ccache/bin/$link" 28 | done 29 | -------------------------------------------------------------------------------- /extra/ccache/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/ccache/checksums -------------------------------------------------------------------------------- /extra/ccache/depends: -------------------------------------------------------------------------------- 1 | cmake make 2 | zstd make 3 | -------------------------------------------------------------------------------- /extra/ccache/post-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat < export PATH=/usr/lib/ccache/bin:\$PATH 9 | 10 | EOF 11 | -------------------------------------------------------------------------------- /extra/ccache/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/ccache/sources -------------------------------------------------------------------------------- /extra/ccache/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/ccache/version -------------------------------------------------------------------------------- /extra/cmake: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/cmake -------------------------------------------------------------------------------- /extra/dhcpcd: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/dhcpcd -------------------------------------------------------------------------------- /extra/dosfstools: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/dosfstools -------------------------------------------------------------------------------- /extra/e2fsprogs/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export LDFLAGS="$LDFLAGS -static" 4 | 5 | ./configure \ 6 | --prefix=/usr \ 7 | --sbindir=/usr/bin \ 8 | --sysconfdir=/etc \ 9 | --enable-symlink-install \ 10 | --enable-libuuid \ 11 | --enable-libblkid \ 12 | --disable-nls \ 13 | --disable-uuidd \ 14 | --disable-fsck \ 15 | --disable-elf-shlibs 16 | 17 | gmake 18 | 19 | dest=$1 20 | 21 | set -- \ 22 | DESTDIR="$dest" \ 23 | MKDIR_P="mkdir -p" \ 24 | BLKID_MAN="" \ 25 | BLKID_PROG="" \ 26 | FINDFS_LINK="" \ 27 | FINDFS_MAN="" \ 28 | UMANPAGES="chattr.1 lsattr.1" \ 29 | UPROGS="chattr lsattr" 30 | 31 | for p in \ 32 | debugfs \ 33 | e2fsck \ 34 | lib/e2p \ 35 | lib/et \ 36 | lib/ext2fs \ 37 | lib/ss \ 38 | misc \ 39 | resize \ 40 | scrub 41 | do 42 | gmake -C "$p" "$@" install 43 | done 44 | -------------------------------------------------------------------------------- /extra/e2fsprogs/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/e2fsprogs/checksums -------------------------------------------------------------------------------- /extra/e2fsprogs/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | linux-headers make 3 | pkgconf make 4 | -------------------------------------------------------------------------------- /extra/e2fsprogs/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/e2fsprogs/sources -------------------------------------------------------------------------------- /extra/e2fsprogs/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/e2fsprogs/version -------------------------------------------------------------------------------- /extra/efibootmgr/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | gmake CC="${CC:-cc}" EFIDIR=/boot/EFI efibootmgr 4 | 5 | mkdir -p \ 6 | "$1/usr/bin" \ 7 | "$1/usr/share/man/man8" 8 | 9 | cp -f src/efibootmgr "$1/usr/bin" 10 | cp -f src/efibootmgr.8 "$1/usr/share/man/man8" 11 | -------------------------------------------------------------------------------- /extra/efibootmgr/checksums: -------------------------------------------------------------------------------- 1 | 06147c05c3f15271fc74c1761eb8fdb8ed3c252786c8d0b4f514a451825ecf3e 2 | -------------------------------------------------------------------------------- /extra/efibootmgr/depends: -------------------------------------------------------------------------------- 1 | efivar 2 | gmake make 3 | linux-headers make 4 | -------------------------------------------------------------------------------- /extra/efibootmgr/sources: -------------------------------------------------------------------------------- 1 | https://github.com/rhboot/efibootmgr/archive/97668ae0bce776a36ea2001dea63d376be8274ac.tar.gz 2 | -------------------------------------------------------------------------------- /extra/efibootmgr/version: -------------------------------------------------------------------------------- 1 | 17 5 2 | -------------------------------------------------------------------------------- /extra/efivar/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # The order here matters. 4 | patch -p1 < b98ba8921010d03f46704a476c69861515deb1ca.patch 5 | patch -p1 < c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch 6 | patch -p1 < 0dad6d78a7fb5f6c5fb4a1d646040539db6cf865.patch 7 | patch -p1 < fdb803402fb32fa6d020bac57a40c7efe4aabb7d.patch 8 | patch -p1 < 4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch 9 | 10 | 11 | # Avoid repeating ourselves. 12 | mk() { 13 | gmake \ 14 | libdir=/usr/lib/ \ 15 | bindir=/usr/bin/ \ 16 | mandir=/usr/share/man/ \ 17 | includedir=/usr/include/ \ 18 | "$@" 19 | } 20 | 21 | export CC="${CC:-cc}" 22 | 23 | mk 24 | mk DESTDIR="$1" install 25 | -------------------------------------------------------------------------------- /extra/efivar/checksums: -------------------------------------------------------------------------------- 1 | 3c67feb93f901b98fbb897d5ca82931a6698b5bcd6ac34f0815f670d77747b9f efivar-37.tar.bz2 2 | 475ca086eecabeaaff6111c3e6766f7e31d88a4fb6e0d082e34201e2cfaf295a b98ba8921010d03f46704a476c69861515deb1ca.patch 3 | 7e72f92eb0d03558b9b14ede6a68e29c0051ffe745a8c7a84d06dce6af458351 c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch 4 | c3dcda97408b7d4957d440b1802081d1861a9923c7d4eb5ee6d3c9e31ae668fc 0dad6d78a7fb5f6c5fb4a1d646040539db6cf865.patch 5 | 4d53ca9f09e3704aa0cc58f36cf475f9c0e54464305930d0ea9e26e7d0461ef6 fdb803402fb32fa6d020bac57a40c7efe4aabb7d.patch 6 | bc552a018399fb9c976b0087f3407ec34004f8b64a5982af76556dcd790852aa 4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch 7 | -------------------------------------------------------------------------------- /extra/efivar/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | -------------------------------------------------------------------------------- /extra/efivar/patches/0dad6d78a7fb5f6c5fb4a1d646040539db6cf865.patch: -------------------------------------------------------------------------------- 1 | From 0dad6d78a7fb5f6c5fb4a1d646040539db6cf865 Mon Sep 17 00:00:00 2001 2 | From: Chih-Wei Huang 3 | Date: Tue, 26 Feb 2019 18:42:20 +0800 4 | Subject: [PATCH] Fix another error of -Werror=address-of-packed-member 5 | 6 | Android 9 clang complains: 7 | 8 | external/efivar/src/dp-message.c:367:24: error: taking address of packed member '' of class or structure 'efidp_infiniband' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] 9 | (efi_guid_t *)&dp->infiniband.ioc_guid); 10 | ^~~~~~~~~~~~~~~~~~~~~~~ 11 | external/efivar/src/dp.h:76:19: note: expanded from macro 'format_guid' 12 | memmove(&_guid, guid, sizeof(_guid)); \ 13 | ^~~~ 14 | 1 error generated. 15 | 16 | Since commit c3c553d the fifth parameter of format_guid() is treated as 17 | a const void *. The casting is unnecessary. 18 | 19 | Signed-off-by: Chih-Wei Huang 20 | --- 21 | src/dp-media.c | 3 +-- 22 | src/dp-message.c | 2 +- 23 | 2 files changed, 2 insertions(+), 3 deletions(-) 24 | 25 | diff --git a/src/dp-media.c b/src/dp-media.c 26 | index 96a576f..be691c4 100644 27 | --- a/src/dp-media.c 28 | +++ b/src/dp-media.c 29 | @@ -46,8 +46,7 @@ _format_media_dn(char *buf, size_t size, const_efidp dp) 30 | break; 31 | case EFIDP_HD_SIGNATURE_GUID: 32 | format(buf, size, off, "HD", "GPT,"); 33 | - format_guid(buf, size, off, "HD", 34 | - (efi_guid_t *)dp->hd.signature); 35 | + format_guid(buf, size, off, "HD", dp->hd.signature); 36 | format(buf, size, off, "HD", 37 | ",0x%"PRIx64",0x%"PRIx64")", 38 | dp->hd.start, dp->hd.size); 39 | diff --git a/src/dp-message.c b/src/dp-message.c 40 | index 9f96466..6b8e907 100644 41 | --- a/src/dp-message.c 42 | +++ b/src/dp-message.c 43 | @@ -364,7 +364,7 @@ _format_message_dn(char *buf, size_t size, const_efidp dp) 44 | dp->infiniband.port_gid[1], 45 | dp->infiniband.port_gid[0]); 46 | format_guid(buf, size, off, "Infiniband", 47 | - (efi_guid_t *)&dp->infiniband.ioc_guid); 48 | + &dp->infiniband.ioc_guid); 49 | format(buf, size, off, "Infiniband", 50 | ",%"PRIu64",%"PRIu64")", 51 | dp->infiniband.target_port_id, 52 | -------------------------------------------------------------------------------- /extra/efivar/patches/4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch: -------------------------------------------------------------------------------- 1 | From 4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e Mon Sep 17 00:00:00 2001 2 | From: Javier Martinez Canillas 3 | Date: Tue, 5 Mar 2019 17:23:32 +0100 4 | Subject: [PATCH] ucs2.h: fix logic that checks for UCS-2 string termination 5 | 6 | Currently the loop to count the lenght of the UCS-2 string ends if either 7 | of the two bytes are 0, but 0 is a valid value for UCS-2 character codes. 8 | 9 | So only break the loop when 0 is the value for both UCS-2 char bytes. 10 | 11 | Signed-off-by: Javier Martinez Canillas 12 | --- 13 | src/ucs2.h | 2 +- 14 | 1 file changed, 1 insertion(+), 1 deletion(-) 15 | 16 | diff --git a/src/ucs2.h b/src/ucs2.h 17 | index e0390c3..fd8b056 100644 18 | --- a/src/ucs2.h 19 | +++ b/src/ucs2.h 20 | @@ -29,7 +29,7 @@ ucs2len(const void *vs, ssize_t limit) 21 | const uint8_t *s8 = vs; 22 | 23 | for (i = 0; 24 | - i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0; 25 | + i < (limit >= 0 ? limit : i+1) && !(s8[0] == 0 && s8[1] == 0); 26 | i++, s8 += 2) 27 | ; 28 | return i; 29 | -------------------------------------------------------------------------------- /extra/efivar/patches/b98ba8921010d03f46704a476c69861515deb1ca.patch: -------------------------------------------------------------------------------- 1 | From b98ba8921010d03f46704a476c69861515deb1ca Mon Sep 17 00:00:00 2001 2 | From: Peter Jones 3 | Date: Mon, 7 Jan 2019 10:30:59 -0500 4 | Subject: [PATCH] dp.h: make format_guid() handle misaligned guid pointers 5 | safely. 6 | 7 | GCC 9 adds -Werror=address-of-packed-member, which causes us to see the 8 | build error reported at 9 | https://bugzilla.opensuse.org/show_bug.cgi?id=1120862 . 10 | 11 | That bug report shows us the following: 12 | 13 | In file included from dp.c:26: 14 | dp.h: In function 'format_vendor_helper': 15 | dp.h:120:37: error: taking address of packed member of 'struct ' may result in an unaligned pointer value [-Werror=address-of-packed-member] 16 | 120 | format_guid(buf, size, off, label, &dp->hw_vendor.vendor_guid); 17 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | dp.h:74:25: note: in definition of macro 'format_guid' 19 | 74 | _rc = efi_guid_to_str(guid, &_guidstr); \ 20 | | ^~~~ 21 | cc1: all warnings being treated as errors 22 | 23 | This patch makes format_guid() use a local variable as a bounce buffer 24 | in the case that the guid we're passed is aligned as chaotic neutral. 25 | 26 | Note that this only fixes this instance and there may be others that bz 27 | didn't show because it exited too soon, and I don't have a gcc 9 build 28 | in front of me right now. 29 | 30 | Signed-off-by: Peter Jones 31 | --- 32 | src/dp.h | 11 +++++++++-- 33 | 1 file changed, 9 insertions(+), 2 deletions(-) 34 | 35 | diff --git a/src/dp.h b/src/dp.h 36 | index aa4e390..20cb608 100644 37 | --- a/src/dp.h 38 | +++ b/src/dp.h 39 | @@ -70,8 +70,15 @@ 40 | #define format_guid(buf, size, off, dp_type, guid) ({ \ 41 | int _rc; \ 42 | char *_guidstr = NULL; \ 43 | - \ 44 | - _rc = efi_guid_to_str(guid, &_guidstr); \ 45 | + efi_guid_t _guid; \ 46 | + const efi_guid_t * const _guid_p = \ 47 | + likely(__alignof__(guid) == sizeof(guid)) \ 48 | + ? guid \ 49 | + : &_guid; \ 50 | + \ 51 | + if (unlikely(__alignof__(guid) == sizeof(guid))) \ 52 | + memmove(&_guid, guid, sizeof(_guid)); \ 53 | + _rc = efi_guid_to_str(_guid_p, &_guidstr); \ 54 | if (_rc < 0) { \ 55 | efi_error("could not build %s GUID DP string", \ 56 | dp_type); \ 57 | -------------------------------------------------------------------------------- /extra/efivar/patches/c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch: -------------------------------------------------------------------------------- 1 | From c3c553db85ff10890209d0fe48fb4856ad68e4e0 Mon Sep 17 00:00:00 2001 2 | From: Peter Jones 3 | Date: Thu, 21 Feb 2019 15:20:12 -0500 4 | Subject: [PATCH] Fix all the places -Werror=address-of-packed-member catches. 5 | 6 | This gets rid of all the places GCC 9's -Werror=address-of-packed-member 7 | flags as problematic. 8 | 9 | Fixes github issue #123 10 | 11 | Signed-off-by: Peter Jones 12 | --- 13 | src/dp-message.c | 6 ++++-- 14 | src/dp.h | 12 ++++-------- 15 | src/guid.c | 2 +- 16 | src/include/efivar/efivar.h | 2 +- 17 | src/ucs2.h | 27 +++++++++++++++++++-------- 18 | 5 files changed, 29 insertions(+), 20 deletions(-) 19 | 20 | diff --git a/src/dp-message.c b/src/dp-message.c 21 | index 3724e5f..9f96466 100644 22 | --- a/src/dp-message.c 23 | +++ b/src/dp-message.c 24 | @@ -620,11 +620,13 @@ _format_message_dn(char *buf, size_t size, const_efidp dp) 25 | ) / sizeof(efi_ip_addr_t); 26 | format(buf, size, off, "Dns", "Dns("); 27 | for (int i=0; i < end; i++) { 28 | - const efi_ip_addr_t *addr = &dp->dns.addrs[i]; 29 | + efi_ip_addr_t addr; 30 | + 31 | + memcpy(&addr, &dp->dns.addrs[i], sizeof(addr)); 32 | if (i != 0) 33 | format(buf, size, off, "Dns", ","); 34 | format_ip_addr(buf, size, off, "Dns", 35 | - dp->dns.is_ipv6, addr); 36 | + dp->dns.is_ipv6, &addr); 37 | } 38 | format(buf, size, off, "Dns", ")"); 39 | break; 40 | diff --git a/src/dp.h b/src/dp.h 41 | index 20cb608..1f921d5 100644 42 | --- a/src/dp.h 43 | +++ b/src/dp.h 44 | @@ -71,13 +71,9 @@ 45 | int _rc; \ 46 | char *_guidstr = NULL; \ 47 | efi_guid_t _guid; \ 48 | - const efi_guid_t * const _guid_p = \ 49 | - likely(__alignof__(guid) == sizeof(guid)) \ 50 | - ? guid \ 51 | - : &_guid; \ 52 | - \ 53 | - if (unlikely(__alignof__(guid) == sizeof(guid))) \ 54 | - memmove(&_guid, guid, sizeof(_guid)); \ 55 | + const efi_guid_t * const _guid_p = &_guid; \ 56 | + \ 57 | + memmove(&_guid, guid, sizeof(_guid)); \ 58 | _rc = efi_guid_to_str(_guid_p, &_guidstr); \ 59 | if (_rc < 0) { \ 60 | efi_error("could not build %s GUID DP string", \ 61 | @@ -86,7 +82,7 @@ 62 | _guidstr = onstack(_guidstr, \ 63 | strlen(_guidstr)+1); \ 64 | _rc = format(buf, size, off, dp_type, "%s", \ 65 | - _guidstr); \ 66 | + _guidstr); \ 67 | } \ 68 | _rc; \ 69 | }) 70 | diff --git a/src/guid.c b/src/guid.c 71 | index 306c9ff..3156b3b 100644 72 | --- a/src/guid.c 73 | +++ b/src/guid.c 74 | @@ -31,7 +31,7 @@ 75 | extern const efi_guid_t efi_guid_zero; 76 | 77 | int NONNULL(1, 2) PUBLIC 78 | -efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b) 79 | +efi_guid_cmp(const void * const a, const void * const b) 80 | { 81 | return memcmp(a, b, sizeof (efi_guid_t)); 82 | } 83 | diff --git a/src/include/efivar/efivar.h b/src/include/efivar/efivar.h 84 | index 316891c..ad6449d 100644 85 | --- a/src/include/efivar/efivar.h 86 | +++ b/src/include/efivar/efivar.h 87 | @@ -128,7 +128,7 @@ extern int efi_symbol_to_guid(const char *symbol, efi_guid_t *guid) 88 | 89 | extern int efi_guid_is_zero(const efi_guid_t *guid); 90 | extern int efi_guid_is_empty(const efi_guid_t *guid); 91 | -extern int efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b); 92 | +extern int efi_guid_cmp(const void * const a, const void * const b); 93 | 94 | /* import / export functions */ 95 | typedef struct efi_variable efi_variable_t; 96 | diff --git a/src/ucs2.h b/src/ucs2.h 97 | index dbb5900..edd8367 100644 98 | --- a/src/ucs2.h 99 | +++ b/src/ucs2.h 100 | @@ -23,16 +23,21 @@ 101 | (((val) & ((mask) << (shift))) >> (shift)) 102 | 103 | static inline size_t UNUSED 104 | -ucs2len(const uint16_t * const s, ssize_t limit) 105 | +ucs2len(const void *vs, ssize_t limit) 106 | { 107 | ssize_t i; 108 | - for (i = 0; i < (limit >= 0 ? limit : i+1) && s[i] != (uint16_t)0; i++) 109 | + const uint16_t *s = vs; 110 | + const uint8_t *s8 = vs; 111 | + 112 | + for (i = 0; 113 | + i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0; 114 | + i++, s8 += 2, s++) 115 | ; 116 | return i; 117 | } 118 | 119 | static inline size_t UNUSED 120 | -ucs2size(const uint16_t * const s, ssize_t limit) 121 | +ucs2size(const void *s, ssize_t limit) 122 | { 123 | size_t rc = ucs2len(s, limit); 124 | rc *= sizeof (uint16_t); 125 | @@ -69,10 +74,11 @@ utf8size(uint8_t *s, ssize_t limit) 126 | } 127 | 128 | static inline unsigned char * UNUSED 129 | -ucs2_to_utf8(const uint16_t * const chars, ssize_t limit) 130 | +ucs2_to_utf8(const void * const voidchars, ssize_t limit) 131 | { 132 | ssize_t i, j; 133 | unsigned char *ret; 134 | + const uint16_t * const chars = voidchars; 135 | 136 | if (limit < 0) 137 | limit = ucs2len(chars, -1); 138 | @@ -124,10 +130,12 @@ ucs2_to_utf8(const uint16_t * const chars, ssize_t limit) 139 | } 140 | 141 | static inline ssize_t UNUSED NONNULL(4) 142 | -utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8) 143 | +utf8_to_ucs2(void *ucs2void, ssize_t size, int terminate, uint8_t *utf8) 144 | { 145 | ssize_t req; 146 | ssize_t i, j; 147 | + uint16_t *ucs2 = ucs2void; 148 | + uint16_t val16; 149 | 150 | if (!ucs2 && size > 0) { 151 | errno = EINVAL; 152 | @@ -162,10 +170,13 @@ utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8) 153 | val = utf8[i] & 0x7f; 154 | i += 1; 155 | } 156 | - ucs2[j] = val; 157 | + val16 = val; 158 | + ucs2[j] = val16; 159 | + } 160 | + if (terminate) { 161 | + val16 = 0; 162 | + ucs2[j++] = val16; 163 | } 164 | - if (terminate) 165 | - ucs2[j++] = (uint16_t)0; 166 | return j; 167 | }; 168 | 169 | -------------------------------------------------------------------------------- /extra/efivar/patches/fdb803402fb32fa6d020bac57a40c7efe4aabb7d.patch: -------------------------------------------------------------------------------- 1 | From fdb803402fb32fa6d020bac57a40c7efe4aabb7d Mon Sep 17 00:00:00 2001 2 | From: Javier Martinez Canillas 3 | Date: Tue, 5 Mar 2019 17:23:24 +0100 4 | Subject: [PATCH] ucs2.h: remove unused variable 5 | 6 | The const uint16_t pointer is not used since now the two bytes of the 7 | UCS-2 chars are checked to know if is the termination of the string. 8 | 9 | Signed-off-by: Javier Martinez Canillas 10 | --- 11 | src/ucs2.h | 3 +-- 12 | 1 file changed, 1 insertion(+), 2 deletions(-) 13 | 14 | diff --git a/src/ucs2.h b/src/ucs2.h 15 | index edd8367..e0390c3 100644 16 | --- a/src/ucs2.h 17 | +++ b/src/ucs2.h 18 | @@ -26,12 +26,11 @@ static inline size_t UNUSED 19 | ucs2len(const void *vs, ssize_t limit) 20 | { 21 | ssize_t i; 22 | - const uint16_t *s = vs; 23 | const uint8_t *s8 = vs; 24 | 25 | for (i = 0; 26 | i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0; 27 | - i++, s8 += 2, s++) 28 | + i++, s8 += 2) 29 | ; 30 | return i; 31 | } 32 | -------------------------------------------------------------------------------- /extra/efivar/sources: -------------------------------------------------------------------------------- 1 | https://github.com/rhboot/efivar/releases/download/37/efivar-37.tar.bz2 2 | patches/b98ba8921010d03f46704a476c69861515deb1ca.patch 3 | patches/c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch 4 | patches/0dad6d78a7fb5f6c5fb4a1d646040539db6cf865.patch 5 | patches/fdb803402fb32fa6d020bac57a40c7efe4aabb7d.patch 6 | patches/4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch 7 | -------------------------------------------------------------------------------- /extra/efivar/version: -------------------------------------------------------------------------------- 1 | 37 3 2 | -------------------------------------------------------------------------------- /extra/eiwd/README: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/eiwd/README -------------------------------------------------------------------------------- /extra/eiwd/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | 4 | ./configure \ 5 | --prefix=/usr \ 6 | --libexecdir=/usr/bin \ 7 | --localstatedir=/var \ 8 | --disable-dbus 9 | 10 | make AM_MAKEFLAGS= 11 | make AM_MAKEFLAGS= install 12 | 13 | cp -f iwd_passphrase "$1/usr/bin" 14 | 15 | # Install runit service. 16 | mkdir -p "$1/etc/sv/eiwd" 17 | cp -f eiwd.run "$1/etc/sv/eiwd/run" 18 | ln -sf /run/runit/supervise.eiwd "$1/etc/sv/eiwd/supervise" 19 | -------------------------------------------------------------------------------- /extra/eiwd/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/eiwd/checksums -------------------------------------------------------------------------------- /extra/eiwd/depends: -------------------------------------------------------------------------------- 1 | linux-headers make 2 | -------------------------------------------------------------------------------- /extra/eiwd/files: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/eiwd/files -------------------------------------------------------------------------------- /extra/eiwd/post-install: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/eiwd/post-install -------------------------------------------------------------------------------- /extra/eiwd/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/eiwd/sources -------------------------------------------------------------------------------- /extra/eiwd/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/eiwd/version -------------------------------------------------------------------------------- /extra/expat: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/expat -------------------------------------------------------------------------------- /extra/ffmpeg/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | ./configure \ 4 | --cc="${CC:-cc}" \ 5 | --cxx="${CXX:-c++}" \ 6 | --prefix=/usr \ 7 | --enable-shared \ 8 | --disable-static \ 9 | --disable-libxcb \ 10 | --disable-libxcb-shm \ 11 | --disable-libxcb-xfixes \ 12 | --disable-libxcb-shape \ 13 | --disable-xlib \ 14 | --enable-gpl \ 15 | --enable-version3 \ 16 | --enable-nonfree \ 17 | --enable-openssl \ 18 | --enable-libass \ 19 | --enable-libmp3lame \ 20 | --enable-libopus \ 21 | --enable-libvorbis \ 22 | --enable-libvpx \ 23 | --enable-libx264 \ 24 | --enable-libx265 \ 25 | --enable-libxvid \ 26 | --enable-libwebp \ 27 | --enable-libdrm \ 28 | --x86asmexe=nasm \ 29 | --disable-debug \ 30 | --disable-libxml2 31 | 32 | gmake 33 | gmake DESTDIR="$1" install 34 | 35 | # Remove examples. 36 | rm -rf "$1/usr/share/ffmpeg/examples" 37 | -------------------------------------------------------------------------------- /extra/ffmpeg/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/ffmpeg/checksums -------------------------------------------------------------------------------- /extra/ffmpeg/depends: -------------------------------------------------------------------------------- 1 | alsa-lib 2 | gmake make 3 | lame 4 | libass 5 | libogg 6 | libvorbis 7 | libvpx 8 | libwebp 9 | linux-headers make 10 | nasm make 11 | openssl 12 | opus 13 | x264 14 | x265 15 | xvidcore 16 | -------------------------------------------------------------------------------- /extra/ffmpeg/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/ffmpeg/sources -------------------------------------------------------------------------------- /extra/ffmpeg/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/ffmpeg/version -------------------------------------------------------------------------------- /extra/firefox-privacy: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/firefox-privacy -------------------------------------------------------------------------------- /extra/firefox/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | for p in *.patch; do 4 | patch -p1 < "$p" 5 | done 6 | 7 | # X11-less webrtc patch from bugzilla. Very large so a URL is used. 8 | patch -p1 < attachment.cgi\?id=9202429 9 | 10 | 11 | # Autoconf 2.13 requires GNU m4. 12 | ( 13 | cd m4-1.4.18 14 | 15 | ./configure \ 16 | --prefix="$PWD/../junk" 17 | 18 | make 19 | make DESTDIR="" install 20 | ) 21 | 22 | export PATH="$PWD/junk/bin:$PATH" 23 | 24 | # Build autoconf 2.13 for Firefox's sole use. 25 | # See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642 26 | ( 27 | cd autoconf2.13 28 | 29 | ./configure \ 30 | --prefix="$PWD/../junk" \ 31 | --program-suffix=-2.13 32 | 33 | make 34 | make DESTDIR="" install 35 | ) 36 | 37 | # Build yasm for Firefox's sole use. Firefox is the only package which 38 | # needs it and upstream is kinda dead. 39 | ( 40 | cd yasm 41 | 42 | ./configure \ 43 | --prefix=/ 44 | 45 | make 46 | make DESTDIR="$PWD/../junk" install 47 | ) 48 | 49 | # Build zip for Firefox's sole use. 50 | for f in zip unzip; do ( 51 | cd "$f" 52 | 53 | make -B \ 54 | CC="$CC $CFLAGS $CXXFLAGS" \ 55 | -f unix/Makefile generic 56 | 57 | make -B \ 58 | prefix="$PWD/../junk" \ 59 | -f unix/Makefile install 60 | ) done 61 | 62 | # Bypass 'ccache' as it's totally useless when building 63 | # Firefox and only slows things down. 64 | export CC="${CC:-/usr/bin/cc}" 65 | export CXX="${CXX:-/usr/bin/c++}" 66 | 67 | export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox,--enable-new-dtags" 68 | export RUSTFLAGS="$RUSTFLAGS -Cdebuginfo=0" 69 | export MACH_USE_SYSTEM_PYTHON=1 70 | export MOZ_DEBUG_FLAGS=-g0 71 | export MOZ_NOSPAM=1 72 | export CXXSTDLIB=c++ 73 | 74 | cat > .mozconfig << EOF 75 | ac_add_options --enable-default-toolkit=cairo-gtk3-wayland 76 | ac_add_options --prefix=/usr 77 | ac_add_options --libdir=/usr/lib 78 | ac_add_options --enable-alsa 79 | ac_add_options --enable-strip 80 | ac_add_options --enable-release 81 | ac_add_options --enable-rust-simd 82 | ac_add_options --enable-install-strip 83 | ac_add_options --enable-official-branding 84 | ac_add_options --enable-application=browser 85 | ac_add_options --enable-optimize="${CFLAGS:-} -w" 86 | ac_add_options --with-system-libvpx 87 | ac_add_options --with-system-ffi 88 | ac_add_options --with-system-png 89 | ac_add_options --with-system-jpeg 90 | ac_add_options --with-system-zlib 91 | ac_add_options --with-system-pixman 92 | ac_add_options --without-system-nss 93 | ac_add_options --without-system-nspr 94 | ac_add_options --disable-eme 95 | ac_add_options --disable-dbus 96 | ac_add_options --disable-gold 97 | ac_add_options --disable-tests 98 | ac_add_options --disable-vtune 99 | ac_add_options --disable-updater 100 | ac_add_options --disable-jemalloc 101 | ac_add_options --disable-elf-hack 102 | ac_add_options --disable-callgrind 103 | ac_add_options --disable-profiling 104 | ac_add_options --disable-necko-wifi 105 | ac_add_options --disable-crashreporter 106 | ac_add_options --disable-pulseaudio 107 | ac_add_options --disable-accessibility 108 | ac_add_options --disable-debug 109 | ac_add_options --disable-debug-symbols 110 | ac_add_options --disable-parental-controls 111 | ac_add_options --disable-system-extension-dirs 112 | EOF 113 | 114 | ./mach build 115 | ./mach install 116 | 117 | # Remove a lot of uneeded "stuff". 118 | rm -rf \ 119 | "$1/usr/include" \ 120 | "$1/usr/lib/firefox-devel" \ 121 | "$1/usr/share/idl" \ 122 | "$1/usr/lib/firefox/browser/features/fxmonitor@mozilla.org.xpi" \ 123 | "$1/usr/lib/firefox/browser/features/screenshots@mozilla.org.xpi" \ 124 | "$1/usr/lib/firefox/browser/features/webcompat-reporter@mozilla.org.xpi" \ 125 | "$1/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi" \ 126 | "$1/usr/lib/firefox/browser/features/doh-rollout@mozilla.org.xpi" 127 | -------------------------------------------------------------------------------- /extra/firefox/checksums: -------------------------------------------------------------------------------- 1 | a78f080f5849bc284b84299f3540934a12e961a7ea368b592ae6576ea1f97102 2 | f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e 3 | f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07 4 | 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f 5 | f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 6 | 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 7 | 42b3c7a29e61905be0e7425b8786870eb1d1c9e0f74c3f0909521b2ac52ac702 8 | 2b5732c15e7eade2a01ad9794de372f25fbb75e4e2f53bce089548bcbbba20d1 9 | 4b06181475f667ae2851540552ade56d5257a03cd21da588e2eb1e538bbc8176 10 | e4a1393ae2b068cab4e1ad47aca10bdbecb5b32d66ff3a61288da8b1dab5a114 11 | 47d30d0b73d3174f8ebbb6d686892fa5435beb3355ddacded70194ef0249ba51 12 | -------------------------------------------------------------------------------- /extra/firefox/depends: -------------------------------------------------------------------------------- 1 | alsa-lib 2 | atk 3 | bzip2 4 | cairo 5 | cbindgen make 6 | expat 7 | ffmpeg 8 | fontconfig 9 | freetype-harfbuzz 10 | gdk-pixbuf 11 | glib 12 | gtk+3 13 | libdrm 14 | libffi 15 | libjpeg-turbo 16 | libpng 17 | libvpx 18 | llvm make 19 | m4 make 20 | mesa 21 | nasm make 22 | nodejs make 23 | pango 24 | perl make 25 | pixman 26 | pkgconf make 27 | python make 28 | rust make 29 | wayland 30 | wayland-protocols make 31 | zlib 32 | -------------------------------------------------------------------------------- /extra/firefox/patches/fix-clang-as.patch: -------------------------------------------------------------------------------- 1 | diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile 2 | index 0b8c6f4..e9668e1 100644 3 | --- a/security/nss/lib/freebl/Makefile 4 | +++ b/security/nss/lib/freebl/Makefile 5 | @@ -753,7 +753,6 @@ $(OBJDIR)/$(PROG_PREFIX)intel-gcm-wrap$(OBJ_SUFFIX): CFLAGS += -mssse3 6 | # .set Htbl, %rdi 7 | # So we can't use Clang's integrated assembler with intel-gcm.s. 8 | ifdef CC_IS_CLANG 9 | -$(OBJDIR)/$(PROG_PREFIX)intel-gcm$(OBJ_SUFFIX): CFLAGS += -no-integrated-as 10 | endif 11 | endif 12 | 13 | diff --git a/security/nss/lib/freebl/freebl.gyp b/security/nss/lib/freebl/freebl.gyp 14 | index e7703ba..3ee3435 100644 15 | --- a/security/nss/lib/freebl/freebl.gyp 16 | +++ b/security/nss/lib/freebl/freebl.gyp 17 | @@ -19,13 +19,10 @@ 18 | 'conditions': [ 19 | [ 'cc_is_clang==1', { 20 | 'cflags': [ 21 | - '-no-integrated-as', 22 | ], 23 | 'cflags_mozilla': [ 24 | - '-no-integrated-as', 25 | ], 26 | 'asflags_mozilla': [ 27 | - '-no-integrated-as', 28 | ], 29 | }], 30 | ], 31 | diff --git a/security/nss/lib/freebl/freebl_base.gypi b/security/nss/lib/freebl/freebl_base.gypi 32 | index afbffac..795bbd8 100644 33 | --- a/security/nss/lib/freebl/freebl_base.gypi 34 | +++ b/security/nss/lib/freebl/freebl_base.gypi 35 | @@ -74,13 +74,10 @@ 36 | 'conditions': [ 37 | [ 'cc_is_clang==1 and fuzz!=1 and coverage!=1', { 38 | 'cflags': [ 39 | - '-no-integrated-as', 40 | ], 41 | 'cflags_mozilla': [ 42 | - '-no-integrated-as', 43 | ], 44 | 'asflags_mozilla': [ 45 | - '-no-integrated-as', 46 | ], 47 | }], 48 | ], 49 | -------------------------------------------------------------------------------- /extra/firefox/patches/fix-linux-header.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2 | index 73e85c6..9eca548 100644 3 | --- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 4 | +++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 5 | @@ -31,6 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6 | */ 7 | 8 | #if defined(LINUX) 9 | +#include 10 | #include "addrs-netlink.h" 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /extra/firefox/patches/no-fribidi.patch: -------------------------------------------------------------------------------- 1 | diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild 2 | index 6e017df..7659b8e 100644 3 | --- a/config/system-headers.mozbuild 4 | +++ b/config/system-headers.mozbuild 5 | @@ -267,7 +267,6 @@ system_headers = [ 6 | 'freetype/t1tables.h', 7 | 'freetype/ttnameid.h', 8 | 'freetype/tttables.h', 9 | - 'fribidi/fribidi.h', 10 | 'FSp_fopen.h', 11 | 'fstream', 12 | 'fstream.h', 13 | -------------------------------------------------------------------------------- /extra/firefox/patches/no-x11.patch: -------------------------------------------------------------------------------- 1 | diff --git a/gfx/angle/checkout/include/EGL/eglplatform.h b/gfx/angle/checkout/include/EGL/eglplatform.h 2 | index d1cae17724..3ae13b0a5b 100644 3 | --- a/gfx/angle/checkout/include/EGL/eglplatform.h 4 | +++ b/gfx/angle/checkout/include/EGL/eglplatform.h 5 | @@ -122,7 +122,8 @@ typedef intptr_t EGLNativeDisplayType; 6 | typedef intptr_t EGLNativePixmapType; 7 | typedef intptr_t EGLNativeWindowType; 8 | 9 | -#elif defined(__unix__) || defined(USE_X11) 10 | +#elif defined(__unix__) 11 | +#if defined(USE_X11) 12 | 13 | /* X11 (tentative) */ 14 | #include 15 | @@ -131,6 +132,11 @@ typedef intptr_t EGLNativeWindowType; 16 | typedef Display *EGLNativeDisplayType; 17 | typedef Pixmap EGLNativePixmapType; 18 | typedef Window EGLNativeWindowType; 19 | +#else 20 | +typedef void *EGLNativeDisplayType; 21 | +typedef khronos_uintptr_t EGLNativePixmapType; 22 | +typedef khronos_uintptr_t EGLNativeWindowType; 23 | +#endif 24 | 25 | #elif defined(__APPLE__) 26 | 27 | diff --git a/gfx/cairo/cairo/src/cairo-features.h b/gfx/cairo/cairo/src/cairo-features.h 28 | index f7379aa895..ceae4f2d71 100644 29 | --- a/gfx/cairo/cairo/src/cairo-features.h 30 | +++ b/gfx/cairo/cairo/src/cairo-features.h 31 | @@ -55,8 +55,8 @@ 32 | #define CAIRO_HAS_PDF_SURFACE 1 33 | #endif 34 | 35 | -#ifdef MOZ_X11 36 | #define CAIRO_HAS_PS_SURFACE 1 37 | +#ifdef MOZ_X11 38 | #define CAIRO_HAS_XLIB_XRENDER_SURFACE 1 39 | #define CAIRO_HAS_XLIB_SURFACE 1 40 | #endif 41 | diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h 42 | index 12d1a497b9..bec4cd17f0 100644 43 | --- a/gfx/gl/GLContextProvider.h 44 | +++ b/gfx/gl/GLContextProvider.h 45 | @@ -55,17 +55,17 @@ namespace gl { 46 | # define GL_CONTEXT_PROVIDER_NAME GLContextProviderX11 47 | # include "GLContextProviderImpl.h" 48 | # undef GL_CONTEXT_PROVIDER_NAME 49 | -# if defined(MOZ_WAYLAND) 50 | -# define GL_CONTEXT_PROVIDER_NAME GLContextProviderWayland 51 | -# include "GLContextProviderImpl.h" 52 | -# undef GL_CONTEXT_PROVIDER_NAME 53 | -# define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderWayland 54 | -# endif 55 | # ifndef GL_CONTEXT_PROVIDER_DEFAULT 56 | # define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderX11 57 | # endif 58 | #endif 59 | 60 | +#if defined(MOZ_WAYLAND) 61 | +# define GL_CONTEXT_PROVIDER_NAME GLContextProviderWayland 62 | +# include "GLContextProviderImpl.h" 63 | +# undef GL_CONTEXT_PROVIDER_NAME 64 | +# define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderWayland 65 | +#endif 66 | #ifndef GL_CONTEXT_PROVIDER_DEFAULT 67 | # define GL_CONTEXT_PROVIDER_DEFAULT GLContextProviderEGL 68 | #endif 69 | diff --git a/gfx/gl/GLContextProviderWayland.cpp b/gfx/gl/GLContextProviderWayland.cpp 70 | index 3f1f926cd9..cd49dc5f17 100644 71 | --- a/gfx/gl/GLContextProviderWayland.cpp 72 | +++ b/gfx/gl/GLContextProviderWayland.cpp 73 | @@ -14,7 +14,6 @@ namespace mozilla::gl { 74 | using namespace mozilla::gfx; 75 | using namespace mozilla::widget; 76 | 77 | -static class GLContextProviderX11 sGLContextProviderX11; 78 | static class GLContextProviderEGL sGLContextProviderEGL; 79 | 80 | // Note that if there is no GTK display, `GdkIsX11Display` and 81 | @@ -30,41 +29,24 @@ static class GLContextProviderEGL sGLContextProviderEGL; 82 | already_AddRefed GLContextProviderWayland::CreateForCompositorWidget( 83 | CompositorWidget* aCompositorWidget, bool aHardwareWebRender, 84 | bool aForceAccelerated) { 85 | - if (GdkIsWaylandDisplay()) { 86 | return sGLContextProviderEGL.CreateForCompositorWidget( 87 | aCompositorWidget, aHardwareWebRender, aForceAccelerated); 88 | - } else { 89 | - return sGLContextProviderX11.CreateForCompositorWidget( 90 | - aCompositorWidget, aHardwareWebRender, aForceAccelerated); 91 | - } 92 | } 93 | 94 | /*static*/ 95 | already_AddRefed GLContextProviderWayland::CreateHeadless( 96 | const GLContextCreateDesc& desc, nsACString* const out_failureId) { 97 | - if (GdkIsWaylandDisplay()) { 98 | return sGLContextProviderEGL.CreateHeadless(desc, out_failureId); 99 | - } else { 100 | - return sGLContextProviderX11.CreateHeadless(desc, out_failureId); 101 | - } 102 | } 103 | 104 | /*static*/ 105 | GLContext* GLContextProviderWayland::GetGlobalContext() { 106 | - if (GdkIsWaylandDisplay()) { 107 | return sGLContextProviderEGL.GetGlobalContext(); 108 | - } else { 109 | - return sGLContextProviderX11.GetGlobalContext(); 110 | - } 111 | } 112 | 113 | /*static*/ 114 | void GLContextProviderWayland::Shutdown() { 115 | - if (GdkIsWaylandDisplay()) { 116 | sGLContextProviderEGL.Shutdown(); 117 | - } else { 118 | - sGLContextProviderX11.Shutdown(); 119 | - } 120 | } 121 | 122 | } // namespace mozilla::gl 123 | diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build 124 | index 7ac6b0753a..a817a6fb08 100644 125 | --- a/gfx/gl/moz.build 126 | +++ b/gfx/gl/moz.build 127 | @@ -13,7 +13,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": 128 | elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": 129 | gl_provider = "EAGL" 130 | elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 131 | - if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"]: 132 | + if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"] or CONFIG["MOZ_WAYLAND"]: 133 | gl_provider = "EGL" 134 | else: 135 | gl_provider = "GLX" 136 | diff --git a/gfx/layers/AnimationHelper.h b/gfx/layers/AnimationHelper.h 137 | index f5a57b9c4d..72091c3a4f 100644 138 | --- a/gfx/layers/AnimationHelper.h 139 | +++ b/gfx/layers/AnimationHelper.h 140 | @@ -7,6 +7,7 @@ 141 | #ifndef mozilla_layers_AnimationHelper_h 142 | #define mozilla_layers_AnimationHelper_h 143 | 144 | +#include "X11UndefineNone.h" 145 | #include "mozilla/dom/Nullable.h" 146 | #include "mozilla/ComputedTimingFunction.h" // for ComputedTimingFunction 147 | #include "mozilla/layers/AnimationStorageData.h" 148 | @@ -15,7 +16,6 @@ 149 | #include "mozilla/TimeStamp.h" // for TimeStamp 150 | #include "mozilla/TimingParams.h" 151 | #include "mozilla/Types.h" // for SideBits 152 | -#include "X11UndefineNone.h" 153 | #include 154 | 155 | namespace mozilla { 156 | diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp 157 | index 95fdcc6ad6..4907726773 100644 158 | --- a/gfx/thebes/gfxPlatformGtk.cpp 159 | +++ b/gfx/thebes/gfxPlatformGtk.cpp 160 | @@ -30,7 +30,9 @@ 161 | #include "mozilla/FontPropertyTypes.h" 162 | #include "mozilla/gfx/2D.h" 163 | #include "mozilla/gfx/Logging.h" 164 | +#ifdef MOZ_X11 165 | #include "mozilla/gfx/XlibDisplay.h" 166 | +#endif 167 | #include "mozilla/Monitor.h" 168 | #include "mozilla/Preferences.h" 169 | #include "mozilla/StaticPrefs_gfx.h" 170 | @@ -62,6 +64,9 @@ 171 | # include "mozilla/widget/nsWaylandDisplay.h" 172 | # include "mozilla/widget/DMABufLibWrapper.h" 173 | # include "mozilla/StaticPrefs_widget.h" 174 | +# ifdef MOZ_WIDGET_GTK 175 | +# include "mozilla/WidgetUtilsGtk.h" 176 | +# endif 177 | #endif 178 | 179 | #define GDK_PIXMAP_SIZE_MAX 32767 180 | @@ -97,7 +102,11 @@ gfxPlatformGtk::gfxPlatformGtk() { 181 | } 182 | 183 | mMaxGenericSubstitutions = UNINITIALIZED_VALUE; 184 | +#ifdef MOZ_X11 185 | mIsX11Display = gfxPlatform::IsHeadless() ? false : GdkIsX11Display(); 186 | +#else 187 | + mIsX11Display = false; 188 | +#endif 189 | if (XRE_IsParentProcess()) { 190 | InitX11EGLConfig(); 191 | if (IsWaylandDisplay() || gfxConfig::IsEnabled(Feature::X11_EGL)) { 192 | @@ -128,7 +137,7 @@ gfxPlatformGtk::gfxPlatformGtk() { 193 | 194 | // Bug 1714483: Force disable FXAA Antialiasing on NV drivers. This is a 195 | // temporary workaround for a driver bug. 196 | - PR_SetEnv("__GL_ALLOW_FXAA_USAGE=0"); 197 | + // PR_SetEnv("__GL_ALLOW_FXAA_USAGE=0"); 198 | } 199 | 200 | gfxPlatformGtk::~gfxPlatformGtk() { 201 | diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build 202 | index 3f483d180e..c3ef71a71c 100644 203 | --- a/gfx/thebes/moz.build 204 | +++ b/gfx/thebes/moz.build 205 | @@ -116,7 +116,6 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 206 | ] 207 | EXPORTS.mozilla.gfx += [ 208 | "PrintTargetPDF.h", 209 | - "PrintTargetPS.h", 210 | ] 211 | SOURCES += [ 212 | "gfxFcPlatformFontList.cpp", 213 | @@ -124,12 +123,12 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 214 | "gfxFT2Utils.cpp", 215 | "gfxPlatformGtk.cpp", 216 | "PrintTargetPDF.cpp", 217 | - "PrintTargetPS.cpp", 218 | ] 219 | 220 | if CONFIG["MOZ_X11"]: 221 | EXPORTS += [ 222 | "gfxXlibSurface.h", 223 | + "PrintTargetPS.h", 224 | ] 225 | EXPORTS.mozilla.gfx += [ 226 | "XlibDisplay.h", 227 | @@ -137,6 +136,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 228 | SOURCES += [ 229 | "gfxXlibSurface.cpp", 230 | "XlibDisplay.cpp", 231 | + "PrintTargetPS.cpp", 232 | ] 233 | 234 | elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": 235 | diff --git a/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp b/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp 236 | index b373244235..62e8251422 100644 237 | --- a/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp 238 | +++ b/gfx/webrender_bindings/RenderCompositorOGLSWGL.cpp 239 | @@ -27,7 +27,9 @@ 240 | #ifdef MOZ_WIDGET_GTK 241 | # include "mozilla/widget/GtkCompositorWidget.h" 242 | # include 243 | +# ifdef MOZ_X11 244 | # include 245 | +# endif 246 | #endif 247 | 248 | namespace mozilla { 249 | diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build 250 | index 235580d6b7..b407dce197 100644 251 | --- a/toolkit/components/remote/moz.build 252 | +++ b/toolkit/components/remote/moz.build 253 | @@ -13,12 +13,15 @@ SOURCES += [ 254 | 255 | if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 256 | SOURCES += [ 257 | - "nsGTKRemoteServer.cpp", 258 | "nsUnixRemoteServer.cpp", 259 | - "nsXRemoteClient.cpp", 260 | - "nsXRemoteServer.cpp", 261 | "RemoteUtils.cpp", 262 | ] 263 | + if CONFIG["MOZ_X11"]: 264 | + SOURCES += [ 265 | + "nsGTKRemoteServer.cpp", 266 | + "nsXRemoteClient.cpp", 267 | + "nsXRemoteServer.cpp", 268 | + ] 269 | if CONFIG["MOZ_ENABLE_DBUS"]: 270 | SOURCES += [ 271 | "nsDBusRemoteClient.cpp", 272 | diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp 273 | index 72c5a50a30..4eecad890d 100644 274 | --- a/toolkit/components/remote/nsRemoteService.cpp 275 | +++ b/toolkit/components/remote/nsRemoteService.cpp 276 | @@ -12,12 +12,18 @@ 277 | 278 | #ifdef MOZ_WIDGET_GTK 279 | # include "mozilla/WidgetUtilsGtk.h" 280 | -# include "nsGTKRemoteServer.h" 281 | -# include "nsXRemoteClient.h" 282 | +# ifdef MOZ_X11 283 | +# include "nsGTKRemoteServer.h" 284 | +# include "nsXRemoteClient.h" 285 | +# endif 286 | # ifdef MOZ_ENABLE_DBUS 287 | # include "nsDBusRemoteServer.h" 288 | # include "nsDBusRemoteClient.h" 289 | # endif 290 | +# ifdef MOZ_WAYLAND 291 | +# include 292 | +# include "nsRemoteClient.h" 293 | +# endif 294 | #elif defined(XP_WIN) 295 | # include "nsWinRemoteServer.h" 296 | # include "nsWinRemoteClient.h" 297 | @@ -112,9 +118,11 @@ RemoteResult nsRemoteService::StartClient(const char* aDesktopStartupID) { 298 | client = MakeUnique(); 299 | } 300 | # endif 301 | +#if defined(MOZ_X11) 302 | if (!client && useX11Remote) { 303 | client = MakeUnique(); 304 | } 305 | +#endif 306 | #elif defined(XP_WIN) 307 | client = MakeUnique(); 308 | #elif defined(XP_DARWIN) 309 | @@ -161,9 +169,11 @@ void nsRemoteService::StartupServer() { 310 | mRemoteServer = MakeUnique(); 311 | } 312 | # endif 313 | +#if defined(MOZ_X11) 314 | if (!mRemoteServer && useX11Remote) { 315 | mRemoteServer = MakeUnique(); 316 | } 317 | +#endif 318 | #elif defined(XP_WIN) 319 | mRemoteServer = MakeUnique(); 320 | #elif defined(XP_DARWIN) 321 | diff --git a/toolkit/moz.configure b/toolkit/moz.configure 322 | index 56dd7bd195..da3487ce0f 100644 323 | --- a/toolkit/moz.configure 324 | +++ b/toolkit/moz.configure 325 | @@ -1170,34 +1170,8 @@ set_define("MOZ_RAW", depends_if("--enable-raw")(lambda _: True)) 326 | 327 | # X11 328 | # ============================================================== 329 | -set_config("MOZ_X11", True, when=toolkit_gtk) 330 | -set_define("MOZ_X11", True, when=toolkit_gtk) 331 | - 332 | - 333 | -@depends(webrtc, when=toolkit_gtk) 334 | -def x11_libs(webrtc): 335 | - libs = [ 336 | - "x11", 337 | - "xcb", 338 | - "xcb-shm", 339 | - "x11-xcb", 340 | - "xext", 341 | - "xrender", 342 | - ] 343 | - if webrtc: 344 | - # third_party/libwebrtc/webrtc/webrtc_gn/moz.build adds those 345 | - # manually, ensure they're available. 346 | - libs += [ 347 | - "xcomposite", 348 | - "xcursor", 349 | - "xdamage", 350 | - "xfixes", 351 | - "xi", 352 | - ] 353 | - return " ".join(libs) 354 | - 355 | - 356 | -pkg_check_modules("MOZ_X11", x11_libs, when=toolkit_gtk) 357 | + 358 | + 359 | 360 | 361 | # ASan Reporter Addon 362 | diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp 363 | index bb14d84338..6353cd98a5 100644 364 | --- a/toolkit/xre/nsAppRunner.cpp 365 | +++ b/toolkit/xre/nsAppRunner.cpp 366 | @@ -321,6 +321,7 @@ nsString gProcessStartupShortcut; 367 | # endif 368 | # ifdef MOZ_X11 369 | # include 370 | +# undef None 371 | # endif /* MOZ_X11 */ 372 | # include 373 | #endif 374 | @@ -345,7 +346,6 @@ void XRE_LibFuzzerSetDriver(LibFuzzerDriver aDriver) { 375 | #endif // FUZZING 376 | 377 | // Undo X11/X.h's definition of None 378 | -#undef None 379 | 380 | namespace mozilla { 381 | int (*RunGTest)(int*, char**) = 0; 382 | diff --git a/toolkit/xre/nsGDKErrorHandler.cpp b/toolkit/xre/nsGDKErrorHandler.cpp 383 | index 421abdf12f..9335d2422c 100644 384 | --- a/toolkit/xre/nsGDKErrorHandler.cpp 385 | +++ b/toolkit/xre/nsGDKErrorHandler.cpp 386 | @@ -6,14 +6,21 @@ 387 | #include "nsGDKErrorHandler.h" 388 | 389 | #include 390 | +#ifdef MOZ_X11 391 | #include 392 | +#endif 393 | +#ifdef MOZ_WAYLAND 394 | +#include 395 | +#endif 396 | #include 397 | #include 398 | #include 399 | 400 | #include "nsDebug.h" 401 | #include "nsString.h" 402 | +#ifdef MOZ_X11 403 | #include "nsX11ErrorHandler.h" 404 | +#endif 405 | 406 | #include "prenv.h" 407 | 408 | @@ -26,6 +33,7 @@ 409 | */ 410 | static void GdkErrorHandler(const gchar* log_domain, GLogLevelFlags log_level, 411 | const gchar* message, gpointer user_data) { 412 | +#ifdef MOZ_X11 413 | if (strstr(message, "X Window System error")) { 414 | XErrorEvent event; 415 | nsDependentCString buffer(message); 416 | @@ -93,9 +101,12 @@ static void GdkErrorHandler(const gchar* log_domain, GLogLevelFlags log_level, 417 | 418 | X11Error(event.display, &event); 419 | } else { 420 | +#endif 421 | g_log_default_handler(log_domain, log_level, message, user_data); 422 | MOZ_CRASH_UNSAFE(message); 423 | +#ifdef MOZ_X11 424 | } 425 | +#endif 426 | } 427 | 428 | void InstallGdkErrorHandler() { 429 | @@ -103,7 +114,9 @@ void InstallGdkErrorHandler() { 430 | (GLogLevelFlags)(G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL | 431 | G_LOG_FLAG_RECURSION), 432 | GdkErrorHandler, nullptr); 433 | +#ifdef MOZ_X11 434 | if (PR_GetEnv("MOZ_X_SYNC")) { 435 | XSynchronize(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), X11True); 436 | } 437 | +#endif 438 | } 439 | diff --git a/widget/CompositorWidget.h b/widget/CompositorWidget.h 440 | index 20eb3634f3..10fb94a99f 100644 441 | --- a/widget/CompositorWidget.h 442 | +++ b/widget/CompositorWidget.h 443 | @@ -62,7 +62,7 @@ class CompositorWidgetDelegate { 444 | }; 445 | 446 | // Platforms that support out-of-process widgets. 447 | -#if defined(XP_WIN) || defined(MOZ_X11) 448 | +#if defined(XP_WIN) || defined(MOZ_X11) || defined(MOZ_WAYLAND) 449 | // CompositorWidgetParent should implement CompositorWidget and 450 | // PCompositorWidgetParent. 451 | class CompositorWidgetParent; 452 | diff --git a/widget/gtk/MozContainer.cpp b/widget/gtk/MozContainer.cpp 453 | index 95832dc03d..94a992beb3 100644 454 | --- a/widget/gtk/MozContainer.cpp 455 | +++ b/widget/gtk/MozContainer.cpp 456 | @@ -9,7 +9,12 @@ 457 | 458 | #include 459 | #include 460 | +#ifdef MOZ_X11 461 | #include 462 | +#endif 463 | +#ifdef MOZ_WAYLAND 464 | +#include "mozilla/WidgetUtilsGtk.h" 465 | +#endif 466 | #include 467 | #include "mozilla/WidgetUtilsGtk.h" 468 | 469 | diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp 470 | index 1ed335300e..ca80c4685b 100644 471 | --- a/widget/gtk/WindowSurfaceWayland.cpp 472 | +++ b/widget/gtk/WindowSurfaceWayland.cpp 473 | @@ -15,11 +15,13 @@ 474 | #include "mozilla/gfx/Tools.h" 475 | #include "gfx2DGlue.h" 476 | #include "gfxPlatform.h" 477 | +#include "gfxImageSurface.h" 478 | #include "MozContainer.h" 479 | #include "mozilla/ScopeExit.h" 480 | #include "mozilla/StaticPrefs_widget.h" 481 | #include "mozilla/WidgetUtils.h" 482 | #include "nsTArray.h" 483 | +#include "prenv.h" 484 | 485 | #ifdef MOZ_LOGGING 486 | # include "mozilla/Logging.h" 487 | diff --git a/widget/gtk/components.conf b/widget/gtk/components.conf 488 | index 38c07bd812..a125d8d275 100644 489 | --- a/widget/gtk/components.conf 490 | +++ b/widget/gtk/components.conf 491 | @@ -78,7 +78,7 @@ Classes = [ 492 | }, 493 | ] 494 | 495 | -if defined('MOZ_X11'): 496 | +if defined('MOZ_X11') or defined('MOZ_WAYLAND'): 497 | Classes += [ 498 | { 499 | 'js_name': 'clipboard', 500 | diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build 501 | index d7216a6927..907405006e 100644 502 | --- a/widget/gtk/moz.build 503 | +++ b/widget/gtk/moz.build 504 | @@ -102,22 +102,26 @@ if CONFIG["MOZ_WAYLAND"]: 505 | 506 | if CONFIG["MOZ_X11"]: 507 | UNIFIED_SOURCES += [ 508 | - "CompositorWidgetChild.cpp", 509 | - "CompositorWidgetParent.cpp", 510 | - "InProcessGtkCompositorWidget.cpp", 511 | "nsClipboardX11.cpp", 512 | "nsShmImage.cpp", 513 | - "nsUserIdleServiceGTK.cpp", 514 | "WindowSurfaceX11.cpp", 515 | "WindowSurfaceX11Image.cpp", 516 | "WindowSurfaceX11SHM.cpp", 517 | ] 518 | - EXPORTS.mozilla.widget += [ 519 | - "CompositorWidgetChild.h", 520 | - "CompositorWidgetParent.h", 521 | - "GtkCompositorWidget.h", 522 | - "InProcessGtkCompositorWidget.h", 523 | - ] 524 | + 525 | +UNIFIED_SOURCES += [ 526 | + "CompositorWidgetChild.cpp", 527 | + "CompositorWidgetParent.cpp", 528 | + "InProcessGtkCompositorWidget.cpp", 529 | + "nsUserIdleServiceGTK.cpp", 530 | +] 531 | + 532 | +EXPORTS.mozilla.widget += [ 533 | + "CompositorWidgetChild.h", 534 | + "CompositorWidgetParent.h", 535 | + "GtkCompositorWidget.h", 536 | + "InProcessGtkCompositorWidget.h", 537 | +] 538 | 539 | if CONFIG["NS_PRINTING"]: 540 | UNIFIED_SOURCES += [ 541 | @@ -146,7 +150,7 @@ LOCAL_INCLUDES += [ 542 | "/widget/headless", 543 | ] 544 | 545 | -if CONFIG["MOZ_X11"]: 546 | +if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]: 547 | LOCAL_INCLUDES += [ 548 | "/widget/x11", 549 | ] 550 | diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c 551 | index 677f9b3561..b8cb7de58e 100644 552 | --- a/widget/gtk/mozgtk/mozgtk.c 553 | +++ b/widget/gtk/mozgtk/mozgtk.c 554 | @@ -6,6 +6,7 @@ 555 | 556 | #include "mozilla/Types.h" 557 | 558 | +#if defined(MOZ_X11) 559 | #include 560 | // Bug 1271100 561 | // We need to trick system Cairo into not using the XShm extension due to 562 | @@ -19,3 +20,4 @@ 563 | // ever can remove this workaround for system Cairo, we'll need something 564 | // to replace it for that purpose. 565 | MOZ_EXPORT Bool XShmQueryExtension(Display* aDisplay) { return False; } 566 | +#endif 567 | diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp 568 | index 75ad319a1e..f27e1d6659 100644 569 | --- a/widget/gtk/nsClipboard.cpp 570 | +++ b/widget/gtk/nsClipboard.cpp 571 | @@ -9,7 +9,9 @@ 572 | 573 | #include "nsArrayUtils.h" 574 | #include "nsClipboard.h" 575 | +#if defined(MOZ_X11) 576 | #include "nsClipboardX11.h" 577 | +#endif 578 | #if defined(MOZ_WAYLAND) 579 | # include "nsClipboardWayland.h" 580 | # include "nsClipboardWaylandAsync.h" 581 | @@ -33,7 +35,9 @@ 582 | #include "imgIContainer.h" 583 | 584 | #include 585 | +#ifdef MOZ_X11 586 | #include 587 | +#endif 588 | 589 | #include "mozilla/Encoding.h" 590 | 591 | @@ -102,16 +106,12 @@ nsClipboard::~nsClipboard() { 592 | NS_IMPL_ISUPPORTS(nsClipboard, nsIClipboard, nsIObserver) 593 | 594 | nsresult nsClipboard::Init(void) { 595 | - if (widget::GdkIsX11Display()) { 596 | - mContext = new nsRetrievalContextX11(); 597 | -#if defined(MOZ_WAYLAND) 598 | - } else if (widget::GdkIsWaylandDisplay()) { 599 | + if (widget::GdkIsWaylandDisplay()) { 600 | if (StaticPrefs::widget_wayland_async_clipboard_enabled_AtStartup()) { 601 | mContext = new nsRetrievalContextWaylandAsync(); 602 | } else { 603 | mContext = new nsRetrievalContextWayland(); 604 | } 605 | -#endif 606 | } else { 607 | NS_WARNING("Missing nsRetrievalContext for nsClipboard!"); 608 | return NS_OK; 609 | diff --git a/widget/gtk/nsDeviceContextSpecG.cpp b/widget/gtk/nsDeviceContextSpecG.cpp 610 | index 3948c15cc5..968252b896 100644 611 | --- a/widget/gtk/nsDeviceContextSpecG.cpp 612 | +++ b/widget/gtk/nsDeviceContextSpecG.cpp 613 | @@ -6,7 +6,9 @@ 614 | #include "nsDeviceContextSpecG.h" 615 | 616 | #include "mozilla/gfx/PrintTargetPDF.h" 617 | +#ifdef MOZ_X11 618 | #include "mozilla/gfx/PrintTargetPS.h" 619 | +#endif 620 | #include "mozilla/Logging.h" 621 | #include "mozilla/Services.h" 622 | 623 | @@ -46,7 +48,9 @@ using namespace mozilla; 624 | using mozilla::gfx::IntSize; 625 | using mozilla::gfx::PrintTarget; 626 | using mozilla::gfx::PrintTargetPDF; 627 | +#ifdef MOZ_X11 628 | using mozilla::gfx::PrintTargetPS; 629 | +#endif 630 | 631 | nsDeviceContextSpecGTK::nsDeviceContextSpecGTK() 632 | : mGtkPrintSettings(nullptr), mGtkPageSetup(nullptr) {} 633 | @@ -119,12 +123,15 @@ already_AddRefed nsDeviceContextSpecGTK::MakePrintTarget() { 634 | return PrintTargetPDF::CreateOrNull(stream, size); 635 | } 636 | 637 | +#ifdef MOZ_X11 638 | int32_t orientation = mPrintSettings->GetSheetOrientation(); 639 | return PrintTargetPS::CreateOrNull( 640 | stream, size, 641 | orientation == nsIPrintSettings::kPortraitOrientation 642 | ? PrintTargetPS::PORTRAIT 643 | : PrintTargetPS::LANDSCAPE); 644 | +#endif 645 | + return nullptr; 646 | } 647 | 648 | #define DECLARE_KNOWN_MONOCHROME_SETTING(key_, value_) {"cups-" key_, value_}, 649 | diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp 650 | index 652facbe79..9ad7b37f90 100644 651 | --- a/widget/gtk/nsDragService.cpp 652 | +++ b/widget/gtk/nsDragService.cpp 653 | @@ -23,7 +23,11 @@ 654 | #include "prthread.h" 655 | #include 656 | #include 657 | +#ifdef MOZ_X11 658 | #include 659 | +#else 660 | +#include 661 | +#endif 662 | #include "nsCRT.h" 663 | #include "mozilla/BasicEvents.h" 664 | #include "mozilla/Services.h" 665 | @@ -33,7 +37,6 @@ 666 | #include "mozilla/WidgetUtilsGtk.h" 667 | #include "GRefPtr.h" 668 | 669 | -#include "gfxXlibSurface.h" 670 | #include "gfxContext.h" 671 | #include "nsImageToPixbuf.h" 672 | #include "nsPresContext.h" 673 | @@ -50,6 +53,8 @@ 674 | #ifdef MOZ_WAYLAND 675 | # include "nsClipboardWayland.h" 676 | # include "gfxPlatformGtk.h" 677 | +#else 678 | +#include "gfxXlibSurface.h" 679 | #endif 680 | 681 | using namespace mozilla; 682 | diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp 683 | index f4c7030a37..a7489daf4d 100644 684 | --- a/widget/gtk/nsGtkKeyUtils.cpp 685 | +++ b/widget/gtk/nsGtkKeyUtils.cpp 686 | @@ -12,10 +12,12 @@ 687 | #include 688 | #include 689 | #include 690 | -#include 691 | #include 692 | #include 693 | +#ifdef MOZ_X11 694 | +#include 695 | #include 696 | +#endif 697 | #include "X11UndefineNone.h" 698 | #include "IMContextWrapper.h" 699 | #include "WidgetUtils.h" 700 | @@ -51,7 +53,7 @@ LazyLogModule gKeymapWrapperLog("KeymapWrapperWidgets"); 701 | 702 | KeymapWrapper* KeymapWrapper::sInstance = nullptr; 703 | guint KeymapWrapper::sLastRepeatableHardwareKeyCode = 0; 704 | -Time KeymapWrapper::sLastRepeatableKeyTime = 0; 705 | +GTime KeymapWrapper::sLastRepeatableKeyTime = 0; 706 | KeymapWrapper::RepeatState KeymapWrapper::sRepeatState = 707 | KeymapWrapper::NOT_PRESSED; 708 | 709 | @@ -346,9 +348,11 @@ KeymapWrapper::KeymapWrapper() 710 | 711 | g_object_ref(mGdkKeymap); 712 | 713 | +#ifdef MOZ_X11 714 | if (GdkIsX11Display()) { 715 | InitXKBExtension(); 716 | } 717 | +#endif 718 | 719 | Init(); 720 | } 721 | @@ -365,16 +369,18 @@ void KeymapWrapper::Init() { 722 | mModifierKeys.Clear(); 723 | memset(mModifierMasks, 0, sizeof(mModifierMasks)); 724 | 725 | +#ifdef MOZ_X11 726 | if (GdkIsX11Display()) { 727 | InitBySystemSettingsX11(); 728 | - } 729 | + } else { 730 | +#endif 731 | #ifdef MOZ_WAYLAND 732 | - else { 733 | InitBySystemSettingsWayland(); 734 | - } 735 | #endif 736 | - 737 | +#ifdef MOZ_X11 738 | + } 739 | gdk_window_add_filter(nullptr, FilterEvents, this); 740 | +#endif 741 | 742 | MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, 743 | ("%p Init, CapsLock=0x%X, NumLock=0x%X, " 744 | @@ -387,6 +393,7 @@ void KeymapWrapper::Init() { 745 | GetModifierMask(SUPER), GetModifierMask(HYPER))); 746 | } 747 | 748 | +#ifdef MOZ_X11 749 | void KeymapWrapper::InitXKBExtension() { 750 | PodZero(&mKeyboardState); 751 | 752 | @@ -619,6 +626,7 @@ void KeymapWrapper::InitBySystemSettingsX11() { 753 | XFreeModifiermap(xmodmap); 754 | XFree(xkeymap); 755 | } 756 | +#endif 757 | 758 | #ifdef MOZ_WAYLAND 759 | void KeymapWrapper::SetModifierMask(xkb_keymap* aKeymap, 760 | @@ -776,7 +784,9 @@ void KeymapWrapper::InitBySystemSettingsWayland() { 761 | #endif 762 | 763 | KeymapWrapper::~KeymapWrapper() { 764 | +#ifdef MOZ_X11 765 | gdk_window_remove_filter(nullptr, FilterEvents, this); 766 | +#endif 767 | if (mOnKeysChangedSignalHandle) { 768 | g_signal_handler_disconnect(mGdkKeymap, mOnKeysChangedSignalHandle); 769 | } 770 | @@ -787,6 +797,7 @@ KeymapWrapper::~KeymapWrapper() { 771 | MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, ("%p Destructor", this)); 772 | } 773 | 774 | +#ifdef MOZ_X11 775 | /* static */ 776 | GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, 777 | GdkEvent* aGdkEvent, 778 | @@ -900,6 +911,7 @@ GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent, 779 | 780 | return GDK_FILTER_CONTINUE; 781 | } 782 | +#endif 783 | 784 | static void ResetBidiKeyboard() { 785 | // Reset the bidi keyboard settings for the new GdkKeymap 786 | @@ -1760,6 +1772,7 @@ void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, 787 | // state. It means if there're some pending modifier key press or 788 | // key release events, the result isn't what we want. 789 | guint modifierState = aGdkKeyEvent->state; 790 | +#ifdef MOZ_X11 791 | GdkDisplay* gdkDisplay = gdk_display_get_default(); 792 | if (aGdkKeyEvent->is_modifier && GdkIsX11Display(gdkDisplay)) { 793 | Display* display = gdk_x11_display_get_xdisplay(gdkDisplay); 794 | @@ -1777,6 +1790,7 @@ void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent, 795 | } 796 | } 797 | } 798 | +#endif 799 | InitInputEvent(aKeyEvent, modifierState); 800 | 801 | switch (aGdkKeyEvent->keyval) { 802 | @@ -2023,6 +2037,7 @@ bool KeymapWrapper::IsLatinGroup(guint8 aGroup) { 803 | return result; 804 | } 805 | 806 | +#ifdef MOZ_X11 807 | bool KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) { 808 | uint8_t indexOfArray = aHardwareKeyCode / 8; 809 | MOZ_ASSERT(indexOfArray < ArrayLength(mKeyboardState.auto_repeats), 810 | @@ -2030,6 +2045,7 @@ bool KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) { 811 | char bitMask = 1 << (aHardwareKeyCode % 8); 812 | return (mKeyboardState.auto_repeats[indexOfArray] & bitMask) != 0; 813 | } 814 | +#endif 815 | 816 | /* static */ 817 | bool KeymapWrapper::IsBasicLatinLetterOrNumeral(uint32_t aCharCode) { 818 | diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h 819 | index 07d60c27a6..43df8095fd 100644 820 | --- a/widget/gtk/nsGtkKeyUtils.h 821 | +++ b/widget/gtk/nsGtkKeyUtils.h 822 | @@ -13,7 +13,9 @@ 823 | #include "nsTArray.h" 824 | 825 | #include 826 | +#ifdef MOZ_X11 827 | #include 828 | +#endif 829 | #ifdef MOZ_WAYLAND 830 | # include 831 | # include 832 | @@ -315,7 +317,9 @@ class KeymapWrapper { 833 | * See a call of XkbSelectEventDetails() with XkbControlsNotify in 834 | * InitXKBExtension(). 835 | */ 836 | +#ifdef MOZ_X11 837 | XKeyboardState mKeyboardState; 838 | +#endif 839 | 840 | /** 841 | * Pointer of the singleton instance. 842 | @@ -326,7 +330,7 @@ class KeymapWrapper { 843 | * Auto key repeat management. 844 | */ 845 | static guint sLastRepeatableHardwareKeyCode; 846 | - static Time sLastRepeatableKeyTime; 847 | + static GTime sLastRepeatableKeyTime; 848 | enum RepeatState { NOT_PRESSED, FIRST_PRESS, REPEATING }; 849 | static RepeatState sRepeatState; 850 | 851 | diff --git a/widget/gtk/nsPrintDialogGTK.cpp b/widget/gtk/nsPrintDialogGTK.cpp 852 | index 0050af3af3..c2c02e59ff 100644 853 | --- a/widget/gtk/nsPrintDialogGTK.cpp 854 | +++ b/widget/gtk/nsPrintDialogGTK.cpp 855 | @@ -26,7 +26,11 @@ 856 | #include "nsIObserverService.h" 857 | 858 | // for gdk_x11_window_get_xid 859 | +#ifdef MOZ_X11 860 | #include 861 | +#else 862 | +#include 863 | +#endif 864 | #include 865 | #include 866 | #include 867 | @@ -525,6 +529,7 @@ static void wayland_window_handle_exported(GdkWindow* window, 868 | static gboolean window_export_handle(GtkWindow* window, 869 | GtkWindowHandleExported callback, 870 | gpointer user_data) { 871 | +#ifdef MOZ_X11 872 | if (GdkIsX11Display()) { 873 | GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window)); 874 | char* handle_str; 875 | @@ -535,8 +540,9 @@ static gboolean window_export_handle(GtkWindow* window, 876 | g_free(handle_str); 877 | return true; 878 | } 879 | +#endif 880 | #ifdef MOZ_WAYLAND 881 | - else if (GdkIsWaylandDisplay()) { 882 | + if (GdkIsWaylandDisplay()) { 883 | GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window)); 884 | WaylandWindowHandleExportedData* data; 885 | 886 | diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp 887 | index 884d52a6ca..6a05d61e7a 100644 888 | --- a/widget/gtk/nsUserIdleServiceGTK.cpp 889 | +++ b/widget/gtk/nsUserIdleServiceGTK.cpp 890 | @@ -17,6 +17,7 @@ using mozilla::LogLevel; 891 | 892 | static mozilla::LazyLogModule sIdleLog("nsIUserIdleService"); 893 | 894 | +#ifdef MOZ_X11 895 | typedef bool (*_XScreenSaverQueryExtension_fn)(Display* dpy, int* event_base, 896 | int* error_base); 897 | 898 | @@ -25,12 +26,14 @@ typedef XScreenSaverInfo* (*_XScreenSaverAllocInfo_fn)(void); 899 | typedef void (*_XScreenSaverQueryInfo_fn)(Display* dpy, Drawable drw, 900 | XScreenSaverInfo* info); 901 | 902 | -static bool sInitialized = false; 903 | static _XScreenSaverQueryExtension_fn _XSSQueryExtension = nullptr; 904 | static _XScreenSaverAllocInfo_fn _XSSAllocInfo = nullptr; 905 | static _XScreenSaverQueryInfo_fn _XSSQueryInfo = nullptr; 906 | +#endif 907 | +static bool sInitialized = false; 908 | 909 | static void Initialize() { 910 | +#ifdef MOZ_X11 911 | if (!mozilla::widget::GdkIsX11Display()) { 912 | return; 913 | } 914 | @@ -58,15 +61,22 @@ static void Initialize() { 915 | if (!_XSSQueryInfo) 916 | MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to get XSSQueryInfo!\n")); 917 | 918 | +#endif 919 | sInitialized = true; 920 | } 921 | 922 | -nsUserIdleServiceGTK::nsUserIdleServiceGTK() : mXssInfo(nullptr) { 923 | +nsUserIdleServiceGTK::nsUserIdleServiceGTK() 924 | +#ifdef MOZ_X11 925 | +: mXssInfo(nullptr) 926 | +#endif 927 | +{ 928 | Initialize(); 929 | } 930 | 931 | nsUserIdleServiceGTK::~nsUserIdleServiceGTK() { 932 | +#ifdef MOZ_X11 933 | if (mXssInfo) XFree(mXssInfo); 934 | +#endif 935 | 936 | // It is not safe to unload libXScrnSaver until each display is closed because 937 | // the library registers callbacks through XESetCloseDisplay (Bug 397607). 938 | @@ -88,6 +98,7 @@ bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { 939 | // Ask xscreensaver about idle time: 940 | *aIdleTime = 0; 941 | 942 | +#ifdef MOZ_X11 943 | // We might not have a display (cf. in xpcshell) 944 | Display* dplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); 945 | if (!dplay) { 946 | @@ -107,6 +118,7 @@ bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { 947 | *aIdleTime = mXssInfo->idle; 948 | return true; 949 | } 950 | +#endif 951 | // If we get here, we couldn't get to XScreenSaver: 952 | MOZ_LOG(sIdleLog, LogLevel::Warning, ("XSSQueryExtension returned false!\n")); 953 | return false; 954 | diff --git a/widget/gtk/nsUserIdleServiceGTK.h b/widget/gtk/nsUserIdleServiceGTK.h 955 | index 9b9ba31846..8f83aee584 100644 956 | --- a/widget/gtk/nsUserIdleServiceGTK.h 957 | +++ b/widget/gtk/nsUserIdleServiceGTK.h 958 | @@ -9,6 +9,7 @@ 959 | #define nsUserIdleServiceGTK_h__ 960 | 961 | #include "nsUserIdleService.h" 962 | +#ifdef MOZ_X11 963 | #include 964 | #include 965 | #include 966 | @@ -21,6 +22,7 @@ typedef struct { 967 | unsigned long idle; // milliseconds idle 968 | unsigned long event_mask; // event stuff 969 | } XScreenSaverInfo; 970 | +#endif 971 | 972 | class nsUserIdleServiceGTK : public nsUserIdleService { 973 | public: 974 | @@ -40,7 +42,9 @@ class nsUserIdleServiceGTK : public nsUserIdleService { 975 | 976 | private: 977 | ~nsUserIdleServiceGTK(); 978 | +#ifdef MOZ_X11 979 | XScreenSaverInfo* mXssInfo; 980 | +#endif 981 | 982 | protected: 983 | nsUserIdleServiceGTK(); 984 | diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp 985 | index d649c7e0bf..70b47d5124 100644 986 | --- a/widget/gtk/nsWidgetFactory.cpp 987 | +++ b/widget/gtk/nsWidgetFactory.cpp 988 | @@ -20,9 +20,7 @@ 989 | #include "nsHTMLFormatConverter.h" 990 | #include "HeadlessClipboard.h" 991 | #include "IMContextWrapper.h" 992 | -#ifdef MOZ_X11 993 | -# include "nsClipboard.h" 994 | -#endif 995 | +#include "nsClipboard.h" 996 | #include "TaskbarProgress.h" 997 | #include "nsFilePicker.h" 998 | #include "nsSound.h" 999 | @@ -36,7 +34,6 @@ 1000 | using namespace mozilla; 1001 | using namespace mozilla::widget; 1002 | 1003 | -#ifdef MOZ_X11 1004 | NS_IMPL_COMPONENT_FACTORY(nsIClipboard) { 1005 | nsCOMPtr inst; 1006 | if (gfxPlatform::IsHeadless()) { 1007 | @@ -51,7 +48,6 @@ NS_IMPL_COMPONENT_FACTORY(nsIClipboard) { 1008 | 1009 | return inst.forget().downcast(); 1010 | } 1011 | -#endif 1012 | 1013 | nsresult nsWidgetGtk2ModuleCtor() { return nsAppShellInit(); } 1014 | 1015 | diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp 1016 | index 378f4cd116..4bc036bbeb 100644 1017 | --- a/widget/gtk/nsWindow.cpp 1018 | +++ b/widget/gtk/nsWindow.cpp 1019 | @@ -58,7 +58,6 @@ 1020 | #include "mozilla/UniquePtrExtensions.h" 1021 | #include "mozilla/WidgetUtils.h" 1022 | #include "mozilla/WritingModes.h" 1023 | -#include "mozilla/X11Util.h" 1024 | #include "mozilla/XREAppData.h" 1025 | #include "NativeKeyBindings.h" 1026 | #include "nsAppDirectoryServiceDefs.h" 1027 | @@ -90,7 +89,6 @@ 1028 | #include "ScreenHelperGTK.h" 1029 | #include "SystemTimeConverter.h" 1030 | #include "WidgetUtilsGtk.h" 1031 | -#include "mozilla/X11Util.h" 1032 | 1033 | #ifdef ACCESSIBILITY 1034 | # include "mozilla/a11y/LocalAccessible.h" 1035 | @@ -98,18 +96,22 @@ 1036 | # include "nsAccessibilityService.h" 1037 | #endif 1038 | 1039 | +#include "GLContextEGL.h" 1040 | +#include "GtkCompositorWidget.h" 1041 | #ifdef MOZ_X11 1042 | +# include "mozilla/X11Util.h" 1043 | # include 1044 | # include 1045 | # include 1046 | # include 1047 | # include "gfxXlibSurface.h" 1048 | # include "GLContextGLX.h" // for GLContextGLX::FindVisual() 1049 | -# include "GLContextEGL.h" // for GLContextEGL::FindVisual() 1050 | # include "WindowSurfaceX11Image.h" 1051 | # include "WindowSurfaceX11SHM.h" 1052 | #endif 1053 | #ifdef MOZ_WAYLAND 1054 | +# include 1055 | +# include 1056 | # include "nsIClipboard.h" 1057 | # include "nsView.h" 1058 | #endif 1059 | @@ -119,7 +121,9 @@ using namespace mozilla::gfx; 1060 | using namespace mozilla::layers; 1061 | using namespace mozilla::widget; 1062 | using mozilla::gl::GLContextEGL; 1063 | +#ifdef MOZ_X11 1064 | using mozilla::gl::GLContextGLX; 1065 | +#endif 1066 | 1067 | // Don't put more than this many rects in the dirty region, just fluff 1068 | // out to the bounding-box if there are more 1069 | @@ -278,6 +282,7 @@ bool nsWindow::sTransparentMainWindow = false; 1070 | 1071 | namespace mozilla { 1072 | 1073 | +#ifdef MOZ_X11 1074 | class CurrentX11TimeGetter { 1075 | public: 1076 | explicit CurrentX11TimeGetter(GdkWindow* aWindow) 1077 | @@ -325,6 +330,7 @@ class CurrentX11TimeGetter { 1078 | GdkWindow* mWindow; 1079 | TimeStamp mAsyncUpdateStart; 1080 | }; 1081 | +#endif 1082 | 1083 | } // namespace mozilla 1084 | 1085 | @@ -2408,11 +2414,13 @@ void nsWindow::NativeMove() { 1086 | 1087 | LOG(("nsWindow::NativeMove [%p] %d %d\n", (void*)this, point.x, point.y)); 1088 | 1089 | +#ifdef MOZ_X11 1090 | if (GdkIsX11Display() && IsPopup() && 1091 | !gtk_widget_get_visible(GTK_WIDGET(mShell))) { 1092 | mHiddenPopupPositioned = true; 1093 | mPopupPosition = point; 1094 | } 1095 | +#endif 1096 | 1097 | if (IsWaylandPopup()) { 1098 | GdkRectangle size = DevicePixelsToGdkSizeRoundUp(mBounds.Size()); 1099 | @@ -2496,6 +2504,7 @@ void nsWindow::SetSizeMode(nsSizeMode aMode) { 1100 | } 1101 | 1102 | static bool GetWindowManagerName(GdkWindow* gdk_window, nsACString& wmName) { 1103 | +#ifdef MOZ_X11 1104 | if (!GdkIsX11Display()) { 1105 | return false; 1106 | } 1107 | @@ -2562,6 +2571,7 @@ static bool GetWindowManagerName(GdkWindow* gdk_window, nsACString& wmName) { 1108 | } 1109 | 1110 | wmName = reinterpret_cast(prop_return); 1111 | +#endif 1112 | return true; 1113 | } 1114 | 1115 | @@ -2619,6 +2629,7 @@ void nsWindow::GetWorkspaceID(nsAString& workspaceID) { 1116 | if (!GdkIsX11Display() || !mShell) { 1117 | return; 1118 | } 1119 | +#ifdef MOZ_X11 1120 | // Get the gdk window for this widget. 1121 | GdkWindow* gdk_window = gtk_widget_get_window(mShell); 1122 | if (!gdk_window) { 1123 | @@ -2647,9 +2658,11 @@ void nsWindow::GetWorkspaceID(nsAString& workspaceID) { 1124 | 1125 | workspaceID.AppendInt((int32_t)wm_desktop[0]); 1126 | g_free(wm_desktop); 1127 | +#endif 1128 | } 1129 | 1130 | void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { 1131 | +#ifdef MOZ_X11 1132 | nsresult rv = NS_OK; 1133 | int32_t workspaceID = workspaceIDStr.ToInteger(&rv); 1134 | if (NS_FAILED(rv) || !workspaceID || !GdkIsX11Display() || !mShell) { 1135 | @@ -2689,6 +2702,7 @@ void nsWindow::MoveToWorkspace(const nsAString& workspaceIDStr) { 1136 | SubstructureNotifyMask | SubstructureRedirectMask, &xevent); 1137 | 1138 | XFlush(xdisplay); 1139 | +#endif 1140 | } 1141 | 1142 | using SetUserTimeFunc = void (*)(GdkWindow*, guint32); 1143 | @@ -2729,9 +2743,13 @@ guint32 nsWindow::GetLastUserInputTime() { 1144 | // button and key releases. Therefore use the most recent of 1145 | // gdk_x11_display_get_user_time and the last time that we have seen. 1146 | GdkDisplay* gdkDisplay = gdk_display_get_default(); 1147 | +#ifdef MOZ_X11 1148 | guint32 timestamp = GdkIsX11Display(gdkDisplay) 1149 | ? gdk_x11_display_get_user_time(gdkDisplay) 1150 | : gtk_get_current_event_time(); 1151 | +#else 1152 | + guint32 timestamp = gtk_get_current_event_time(); 1153 | +#endif 1154 | 1155 | if (sLastUserInputTime != GDK_CURRENT_TIME && 1156 | TimestampIsNewerThan(sLastUserInputTime, timestamp)) { 1157 | @@ -2889,6 +2907,7 @@ void nsWindow::UpdateClientOffsetFromFrameExtents() { 1158 | return; 1159 | } 1160 | 1161 | +#ifdef MOZ_X11 1162 | GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL); 1163 | 1164 | GdkAtom type_returned; 1165 | @@ -2914,6 +2933,7 @@ void nsWindow::UpdateClientOffsetFromFrameExtents() { 1166 | 1167 | mClientOffset = nsIntPoint(left, top); 1168 | } 1169 | +#endif 1170 | 1171 | // Send a WindowMoved notification. This ensures that BrowserParent 1172 | // picks up the new client offset and sends it to the child process 1173 | @@ -2932,6 +2952,7 @@ LayoutDeviceIntPoint nsWindow::GetClientOffset() { 1174 | 1175 | gboolean nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, 1176 | GdkEventProperty* aEvent) { 1177 | +#ifdef MOZ_X11 1178 | if (aEvent->atom == gdk_atom_intern("_NET_FRAME_EXTENTS", FALSE)) { 1179 | UpdateClientOffsetFromFrameExtents(); 1180 | return FALSE; 1181 | @@ -2940,7 +2961,7 @@ gboolean nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, 1182 | if (GetCurrentTimeGetter()->PropertyNotifyHandler(aWidget, aEvent)) { 1183 | return TRUE; 1184 | } 1185 | - 1186 | +#endif 1187 | return FALSE; 1188 | } 1189 | 1190 | @@ -3078,9 +3099,11 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { 1191 | return GetToplevelWidget(); 1192 | 1193 | case NS_NATIVE_WINDOW_WEBRTC_DEVICE_ID: 1194 | +#ifdef MOZ_X11 1195 | if (GdkIsX11Display()) { 1196 | return (void*)GDK_WINDOW_XID(gdk_window_get_toplevel(mGdkWindow)); 1197 | } 1198 | +#endif 1199 | NS_WARNING( 1200 | "nsWindow::GetNativeData(): NS_NATIVE_WINDOW_WEBRTC_DEVICE_ID is not " 1201 | "handled on Wayland!"); 1202 | @@ -3100,9 +3123,11 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { 1203 | case NS_NATIVE_OPENGL_CONTEXT: 1204 | return nullptr; 1205 | case NS_NATIVE_EGL_WINDOW: { 1206 | +#ifdef MOZ_X11 1207 | if (GdkIsX11Display()) { 1208 | return mGdkWindow ? (void*)GDK_WINDOW_XID(mGdkWindow) : nullptr; 1209 | } 1210 | +#endif 1211 | #ifdef MOZ_WAYLAND 1212 | if (mContainer) { 1213 | return moz_container_wayland_get_egl_window(mContainer, 1214 | @@ -3425,8 +3450,13 @@ gboolean nsWindow::OnExposeEvent(cairo_t* cr) { 1215 | nsIWidgetListener* listener = GetListener(); 1216 | if (!listener) return FALSE; 1217 | 1218 | +#ifdef MOZ_X11 1219 | LOG(("received expose event [%p] %p 0x%lx (rects follow):\n", this, 1220 | mGdkWindow, GdkIsX11Display() ? gdk_x11_window_get_xid(mGdkWindow) : 0)); 1221 | +#else 1222 | + LOG(("received expose event [%p] %p 0x%lx (rects follow):\n", this, 1223 | + mGdkWindow, 0)); 1224 | +#endif 1225 | LayoutDeviceIntRegion exposeRegion; 1226 | if (!ExtractExposeRegion(exposeRegion, cr)) { 1227 | return FALSE; 1228 | @@ -3970,6 +4000,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { 1229 | MOZ_ASSERT(gdk_window, "gdk_window_get_toplevel should not return null"); 1230 | 1231 | bool canDrag = true; 1232 | +#ifdef MOZ_X11 1233 | if (GdkIsX11Display()) { 1234 | // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 1235 | // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. 1236 | @@ -3980,6 +4011,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { 1237 | canDrag = false; 1238 | } 1239 | } 1240 | +#endif 1241 | 1242 | if (canDrag) { 1243 | gdk_window_begin_move_drag(gdk_window, 1, aEvent->x_root, aEvent->y_root, 1244 | @@ -4428,16 +4460,20 @@ TimeStamp nsWindow::GetEventTimeStamp(guint32 aEventTime) { 1245 | int64_t tick = 1246 | BaseTimeDurationPlatformUtils::TicksFromMilliseconds(timestampTime); 1247 | eventTimeStamp = TimeStamp::FromSystemTime(tick); 1248 | - } else { 1249 | + } 1250 | +#ifdef MOZ_X11 1251 | + else { 1252 | CurrentX11TimeGetter* getCurrentTime = GetCurrentTimeGetter(); 1253 | MOZ_ASSERT(getCurrentTime, 1254 | "Null current time getter despite having a window"); 1255 | eventTimeStamp = 1256 | TimeConverter().GetTimeStampFromSystemTime(aEventTime, *getCurrentTime); 1257 | } 1258 | +#endif 1259 | return eventTimeStamp; 1260 | } 1261 | 1262 | +#ifdef MOZ_X11 1263 | mozilla::CurrentX11TimeGetter* nsWindow::GetCurrentTimeGetter() { 1264 | MOZ_ASSERT(mGdkWindow, "Expected mGdkWindow to be set"); 1265 | if (MOZ_UNLIKELY(!mCurrentTimeGetter)) { 1266 | @@ -4445,6 +4481,7 @@ mozilla::CurrentX11TimeGetter* nsWindow::GetCurrentTimeGetter() { 1267 | } 1268 | return mCurrentTimeGetter.get(); 1269 | } 1270 | +#endif 1271 | 1272 | gboolean nsWindow::OnKeyPressEvent(GdkEventKey* aEvent) { 1273 | LOG(("OnKeyPressEvent [%p]\n", (void*)this)); 1274 | @@ -5029,6 +5066,7 @@ static GdkWindow* CreateGdkWindow(GdkWindow* parent, GtkWidget* widget) { 1275 | return window; 1276 | } 1277 | 1278 | +#ifdef MOZ_X11 1279 | // Configure GL visual on X11. We add alpha silently 1280 | // if we use WebRender to workaround NVIDIA specific Bug 1663273. 1281 | bool nsWindow::ConfigureX11GLVisual(bool aUseAlpha) { 1282 | @@ -5085,6 +5123,7 @@ bool nsWindow::ConfigureX11GLVisual(bool aUseAlpha) { 1283 | 1284 | return true; 1285 | } 1286 | +#endif 1287 | 1288 | nsCString nsWindow::GetWindowNodeName() { 1289 | nsCString nodeName("Unknown"); 1290 | @@ -5667,9 +5706,15 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent, 1291 | LOG(("nsWindow [%p] type %d %s\n", (void*)this, mWindowType, 1292 | mIsPIPWindow ? "PIP window" : "")); 1293 | if (mShell) { 1294 | +#ifdef MOZ_X11 1295 | LOG(("\tmShell %p mContainer %p mGdkWindow %p XID 0x%lx\n", mShell, 1296 | mContainer, mGdkWindow, 1297 | GdkIsX11Display() ? gdk_x11_window_get_xid(mGdkWindow) : 0)); 1298 | +#else 1299 | + LOG(("\tmShell %p mContainer %p mGdkWindow %p XID 0x%lx\n", mShell, 1300 | + mContainer, mGdkWindow, 1301 | + 0)); 1302 | +#endif 1303 | } else if (mContainer) { 1304 | LOG(("\tmContainer %p mGdkWindow %p\n", mContainer, mGdkWindow)); 1305 | } else if (mGdkWindow) { 1306 | @@ -6741,6 +6786,7 @@ void nsWindow::UpdateTitlebarTransparencyBitmap() { 1307 | cairo_surface_destroy(surface); 1308 | } 1309 | 1310 | +#ifdef MOZ_X11 1311 | if (!mNeedsShow) { 1312 | Display* xDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow); 1313 | Window xDrawable = GDK_WINDOW_XID(mGdkWindow); 1314 | @@ -6763,6 +6809,7 @@ void nsWindow::UpdateTitlebarTransparencyBitmap() { 1315 | 1316 | XFreePixmap(xDisplay, maskPixmap); 1317 | } 1318 | +#endif 1319 | } 1320 | 1321 | void nsWindow::GrabPointer(guint32 aTime) { 1322 | @@ -7045,7 +7092,7 @@ static bool IsFullscreenSupported(GtkWidget* aShell) { 1323 | GdkScreen* screen = gtk_widget_get_screen(aShell); 1324 | GdkAtom atom = gdk_atom_intern("_NET_WM_STATE_FULLSCREEN", FALSE); 1325 | return gdk_x11_screen_supports_net_wm_hint(screen, atom); 1326 | -#elif 1327 | +#else 1328 | return true; 1329 | #endif 1330 | } 1331 | @@ -8318,6 +8365,7 @@ bool nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, GdkWindow** aWindow, 1332 | return false; 1333 | } 1334 | 1335 | +#ifdef MOZ_X11 1336 | if (GdkIsX11Display()) { 1337 | // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 1338 | // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. 1339 | @@ -8333,6 +8381,7 @@ bool nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, GdkWindow** aWindow, 1340 | } 1341 | } 1342 | } 1343 | +#endif 1344 | 1345 | // FIXME: It would be nice to have the widget position at the time 1346 | // of the event, but it's relatively unlikely that the widget has 1347 | @@ -9053,6 +9102,7 @@ void nsWindow::GetCompositorWidgetInitData( 1348 | mozilla::widget::CompositorWidgetInitData* aInitData) { 1349 | nsCString displayName; 1350 | 1351 | +#ifdef MOZ_X11 1352 | if (GdkIsX11Display() && mXWindow != X11None) { 1353 | // Make sure the window XID is propagated to X server, we can fail otherwise 1354 | // in GPU process (Bug 1401634). 1355 | @@ -9066,6 +9116,12 @@ void nsWindow::GetCompositorWidgetInitData( 1356 | *aInitData = mozilla::widget::GtkCompositorWidgetInitData( 1357 | (mXWindow != X11None) ? mXWindow : (uintptr_t) nullptr, displayName, 1358 | isShaped, GdkIsX11Display(), GetClientSize()); 1359 | +#else 1360 | + *aInitData = mozilla::widget::GtkCompositorWidgetInitData( 1361 | + (uintptr_t) nullptr, 1362 | + nsCString(), 0, 1363 | + 0, GetClientSize()); 1364 | +#endif 1365 | } 1366 | 1367 | #ifdef MOZ_WAYLAND 1368 | diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h 1369 | index a8ab09a441..0231377924 100644 1370 | --- a/widget/gtk/nsWindow.h 1371 | +++ b/widget/gtk/nsWindow.h 1372 | @@ -93,7 +93,9 @@ typedef struct _GdkEventTouchpadPinch GdkEventTouchpadPinch; 1373 | 1374 | namespace mozilla { 1375 | class TimeStamp; 1376 | +#ifdef MOZ_X11 1377 | class CurrentX11TimeGetter; 1378 | +#endif 1379 | 1380 | } // namespace mozilla 1381 | 1382 | @@ -274,7 +276,9 @@ class nsWindow final : public nsBaseWidget { 1383 | 1384 | WidgetEventTime GetWidgetEventTime(guint32 aEventTime); 1385 | mozilla::TimeStamp GetEventTimeStamp(guint32 aEventTime); 1386 | +#ifdef MOZ_X11 1387 | mozilla::CurrentX11TimeGetter* GetCurrentTimeGetter(); 1388 | +#endif 1389 | 1390 | virtual void SetInputContext(const InputContext& aContext, 1391 | const InputContextAction& aAction) override; 1392 | @@ -805,7 +809,9 @@ class nsWindow final : public nsBaseWidget { 1393 | */ 1394 | RefPtr mIMContext; 1395 | 1396 | +#ifdef MOZ_X11 1397 | mozilla::UniquePtr mCurrentTimeGetter; 1398 | +#endif 1399 | static GtkWindowDecoration sGtkWindowDecoration; 1400 | 1401 | static bool sTransparentMainWindow; 1402 | @@ -856,6 +862,7 @@ class nsWindow final : public nsBaseWidget { 1403 | void DispatchRestoreEventAccessible(); 1404 | #endif 1405 | 1406 | +mozilla::widget::WindowSurfaceProvider mSurfaceProvider; 1407 | #ifdef MOZ_X11 1408 | typedef enum {GTK_WIDGET_COMPOSIDED_DEFAULT = 0, 1409 | GTK_WIDGET_COMPOSIDED_DISABLED = 1, 1410 | @@ -865,7 +872,6 @@ class nsWindow final : public nsBaseWidget { 1411 | Window mXWindow; 1412 | Visual* mXVisual; 1413 | int mXDepth; 1414 | - mozilla::widget::WindowSurfaceProvider mSurfaceProvider; 1415 | 1416 | bool ConfigureX11GLVisual(bool aUseAlpha); 1417 | #endif 1418 | diff --git a/widget/moz.build b/widget/moz.build 1419 | index f5f28d2214..969ab5d003 100644 1420 | --- a/widget/moz.build 1421 | +++ b/widget/moz.build 1422 | @@ -258,7 +258,7 @@ if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]: 1423 | 1424 | EXPORTS.ipc = ["nsGUIEventIPC.h"] 1425 | 1426 | -if CONFIG["MOZ_X11"]: 1427 | +if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]: 1428 | DIRS += ["x11"] 1429 | 1430 | if toolkit in ("cocoa", "windows"): 1431 | @@ -305,7 +305,7 @@ if toolkit == "windows": 1432 | "windows/PCompositorWidget.ipdl", 1433 | "windows/PlatformWidgetTypes.ipdlh", 1434 | ] 1435 | -elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]: 1436 | +elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 1437 | IPDL_SOURCES = [ 1438 | "gtk/PCompositorWidget.ipdl", 1439 | "gtk/PlatformWidgetTypes.ipdlh", 1440 | -------------------------------------------------------------------------------- /extra/firefox/post-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat < _ 8 | mv -f _ src/meson.build 9 | 10 | # Disable gperf entirely. 11 | sed "s/find_program(\'gperf\')/find_program(\'true\')/" meson.build > _ 12 | mv -f _ meson.build 13 | 14 | meson \ 15 | --prefix=/usr \ 16 | --localstatedir=/var \ 17 | --sysconfdir=/etc \ 18 | -Ddoc=disabled \ 19 | -Dnls=disabled \ 20 | -Dtests=disabled \ 21 | . build 22 | 23 | ninja -C build 24 | ninja -C build install 25 | -------------------------------------------------------------------------------- /extra/fontconfig/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/fontconfig/checksums -------------------------------------------------------------------------------- /extra/fontconfig/depends: -------------------------------------------------------------------------------- 1 | expat 2 | freetype-harfbuzz 3 | meson make 4 | -------------------------------------------------------------------------------- /extra/fontconfig/files: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/fontconfig/files/ -------------------------------------------------------------------------------- /extra/fontconfig/post-install: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/fontconfig/post-install -------------------------------------------------------------------------------- /extra/fontconfig/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/fontconfig/sources -------------------------------------------------------------------------------- /extra/fontconfig/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/fontconfig/version -------------------------------------------------------------------------------- /extra/freetype-harfbuzz: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/freetype-harfbuzz/ -------------------------------------------------------------------------------- /extra/gdk-pixbuf: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/gdk-pixbuf -------------------------------------------------------------------------------- /extra/glib: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/glib -------------------------------------------------------------------------------- /extra/gtk+3/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export DESTDIR="$1" 4 | 5 | for patch in *.patch; do 6 | patch -p1 < "$patch" 7 | done 8 | 9 | 10 | # Remove 'atk-bridge' dependency which removes the 'dbus' dependency. 11 | sed '/atkbridge_dep/d;/atk-bridge-2.0/d' meson.build > _ 12 | mv -f _ meson.build 13 | sed '/atkbridge_dep,/d' gtk/meson.build > _ 14 | mv -f _ gtk/meson.build 15 | 16 | sed '//d;/atk_bridge_adaptor_init/d' \ 17 | gtk/a11y/gtkaccessibility.c > _ 18 | mv -f _ gtk/a11y/gtkaccessibility.c 19 | 20 | # Remove fribidi dependency. TODO: Fix the sed mess if possible. 21 | sed '/fribidi_dep/d;/fribidi_req /d;s/fribidi_req//;s/fribidi//' meson.build > _ 22 | mv -f _ meson.build 23 | sed '/fribidi_dep,/d' gtk/meson.build > _ 24 | mv -f _ gtk/meson.build 25 | sed '/fribidi_dep,/d' gdk/meson.build > _ 26 | mv -f _ gdk/meson.build 27 | 28 | 29 | # Build libepoxy for gtk+3's sole use. This is the only package that 30 | # requires the library. While the build system supports building this as 31 | # a subproject, it is broken so we must do it ourselves. 32 | ( 33 | cd libepoxy 34 | meson \ 35 | --prefix=/usr \ 36 | --sysconfdir=/etc \ 37 | --mandir=/usr/share/man \ 38 | -Ddefault_library=static \ 39 | -Dhas-dlvsym=false \ 40 | -Degl=yes \ 41 | -Dtests=false \ 42 | -Dglx=no \ 43 | -Dx11=false \ 44 | . output 45 | 46 | ninja -C output 47 | DESTDIR=$PWD ninja -C output install 48 | ) 49 | 50 | # Point gtk+3 to the vendored libepoxy. 51 | export PKG_CONFIG_PATH=$PWD/libepoxy/usr/lib/pkgconfig 52 | export CFLAGS="$CFLAGS -L$PWD/libepoxy/usr/lib" 53 | export CFLAGS="$CFLAGS -I$PWD/libepoxy/usr/include" 54 | 55 | meson \ 56 | --prefix=/usr \ 57 | --sysconfdir=/etc \ 58 | --localstatedir=/var \ 59 | -Dx11_backend=false \ 60 | -Dprint_backends=auto \ 61 | -Dwayland_backend=true \ 62 | -Dwin32_backend=false \ 63 | -Dquartz_backend=false \ 64 | -Dcolord=no \ 65 | -Ddemos=false \ 66 | -Dexamples=false \ 67 | -Dtests=false \ 68 | -Dinstalled_tests=false \ 69 | -Dgtk_doc=false \ 70 | -Dintrospection=false \ 71 | . build 72 | 73 | ninja -C build 74 | ninja -C build install 75 | 76 | 77 | # GTK+3 on Wayland requires gsettings-desktop-schemes 78 | # for gsettings to work correctly. Under X11 it made 79 | # use of xsettings but this is no longer the case. 80 | ( 81 | cd schemas 82 | 83 | meson \ 84 | --prefix=/usr \ 85 | -Dintrospection=false \ 86 | . build 87 | 88 | ninja -C build 89 | ninja -C build install 90 | ) 91 | 92 | # We don't compile with librsvg which leads to this 93 | # utility solely causing compiler errors for some 94 | # packages. It has no use at all. 95 | rm -f "$1/usr/bin/gtk-encode-symbolic-svg" 96 | rm -rf "$1/usr/share/gettext" 97 | 98 | # Remove epoxy references from installed pkg-config files. The build 99 | # system should have done this for us as it is statically linked. 100 | for f in "$1/usr/lib/pkgconfig/"*.pc; do 101 | sed 's/epoxy >= 1.4//' "$f" > _ 102 | mv -f _ "$f" 103 | done 104 | -------------------------------------------------------------------------------- /extra/gtk+3/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/gtk+3/checksums -------------------------------------------------------------------------------- /extra/gtk+3/depends: -------------------------------------------------------------------------------- 1 | atk 2 | cairo 3 | fontconfig 4 | freetype-harfbuzz 5 | gdk-pixbuf 6 | glib 7 | libxkbcommon 8 | meson make 9 | pango 10 | pkgconf make 11 | python make 12 | wayland 13 | -------------------------------------------------------------------------------- /extra/gtk+3/patches: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/gtk+3/patches/ -------------------------------------------------------------------------------- /extra/gtk+3/post-install: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/gtk+3/post-install -------------------------------------------------------------------------------- /extra/gtk+3/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/gtk+3/sources -------------------------------------------------------------------------------- /extra/gtk+3/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/gtk+3/version -------------------------------------------------------------------------------- /extra/hicolor-icon-theme: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/hicolor-icon-theme -------------------------------------------------------------------------------- /extra/intel-vaapi-driver: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/intel-vaapi-driver -------------------------------------------------------------------------------- /extra/json-c: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/json-c/ -------------------------------------------------------------------------------- /extra/kirc: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/kirc/ -------------------------------------------------------------------------------- /extra/lame: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/lame/ -------------------------------------------------------------------------------- /extra/libass: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libass -------------------------------------------------------------------------------- /extra/libelf/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | patch -p1 < musl.patch 4 | 5 | # Clang doesn't understand -Wtrampolines, -Wimplicit-fallthrough=5 6 | sed -e 's/-Wtrampolines//g' -e 's/=5//g' lib/Makefile.in > _ 7 | mv -f _ lib/Makefile.in 8 | sed -e 's/-Wtrampolines//g' -e 's/=5//g' libelf/Makefile.in > _ 9 | mv -f _ libelf/Makefile.in 10 | 11 | # Build sometimes forces -Werror. 12 | export CFLAGS="$CFLAGS -Wno-error" 13 | 14 | # Disable configure error for missing argp, fts, and obstack 15 | sed 's/as_fn_error.*\(argp\|fts\|obstack\)/: "/g' configure > _ 16 | mv -f _ configure 17 | 18 | # Don't compile two unrelated C files which require argp. 19 | sed 's/color.*printversion../#/g' lib/Makefile.in > _ 20 | mv -f _ lib/Makefile.in 21 | 22 | sh ./configure \ 23 | --prefix=/usr \ 24 | --disable-symbol-versioning \ 25 | --disable-debuginfod \ 26 | --disable-nls \ 27 | ac_cv_c99=yes 28 | 29 | # Skip the default make target and build only what we need. 30 | gmake -C lib 31 | gmake -C libelf 32 | gmake -C libelf DESTDIR="$1" install 33 | 34 | mkdir -p "$1/usr/lib/pkgconfig" 35 | cp -f config/libelf.pc "$1/usr/lib/pkgconfig/libelf.pc" 36 | -------------------------------------------------------------------------------- /extra/libelf/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libelf/checksums -------------------------------------------------------------------------------- /extra/libelf/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | pkgconf make 3 | zlib 4 | -------------------------------------------------------------------------------- /extra/libelf/patches: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libelf/patches/ -------------------------------------------------------------------------------- /extra/libelf/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libelf/sources -------------------------------------------------------------------------------- /extra/libelf/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libelf/version -------------------------------------------------------------------------------- /extra/libffi: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libffi/ -------------------------------------------------------------------------------- /extra/libjpeg-turbo: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libjpeg-turbo -------------------------------------------------------------------------------- /extra/libogg: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libogg -------------------------------------------------------------------------------- /extra/libpng: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libpng -------------------------------------------------------------------------------- /extra/libtheora: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libtheora -------------------------------------------------------------------------------- /extra/libudev-zero: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libudev-zero -------------------------------------------------------------------------------- /extra/libva: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libva -------------------------------------------------------------------------------- /extra/libva-utils: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libva-utils -------------------------------------------------------------------------------- /extra/libvorbis: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libvorbis -------------------------------------------------------------------------------- /extra/libvpx/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export CC=${CC:-cc} CXX=${CXX:-c++} 4 | 5 | # Remove the perl requirement from configure. 6 | # Also fix issue with non-GNU diff. 7 | sed 's/perl/:/g;s/diff --version/command -v diff/' configure > _ 8 | mv -f _ configure 9 | chmod +x configure 10 | 11 | ./configure \ 12 | --prefix=/usr \ 13 | --target=x86_64-linux-gcc \ 14 | --enable-vp8 \ 15 | --enable-vp9 \ 16 | --enable-experimental \ 17 | --enable-runtime-cpu-detect \ 18 | --enable-shared \ 19 | --enable-postproc \ 20 | --enable-pic \ 21 | --disable-tools \ 22 | --disable-examples \ 23 | --disable-docs \ 24 | --disable-unit-tests \ 25 | --disable-install-docs \ 26 | --disable-install-srcs \ 27 | --disable-install-bins \ 28 | --as=nasm 29 | 30 | gmake 31 | gmake DESTDIR="$1" install 32 | 33 | # ABI was bumped for command-line options. This symbolic link removes the need 34 | # for users to rebuild Firefox, etc. Will be removed as of next Firefox release 35 | # webmproject/libvpx#4ec84326cc65c5b042bf06d222d51e51d7e5461d 36 | ln -s libvpx.so.7 "$1/usr/lib/libvpx.so.6" 37 | -------------------------------------------------------------------------------- /extra/libvpx/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libvpx/checksums -------------------------------------------------------------------------------- /extra/libvpx/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | nasm make 3 | -------------------------------------------------------------------------------- /extra/libvpx/files: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libvpx/files/ -------------------------------------------------------------------------------- /extra/libvpx/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libvpx/sources -------------------------------------------------------------------------------- /extra/libvpx/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/libvpx/version -------------------------------------------------------------------------------- /extra/libwebp: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/libwebp -------------------------------------------------------------------------------- /extra/man-pages: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/man-pages/ -------------------------------------------------------------------------------- /extra/mandoc/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | patch -p1 < mandoc-no-warn.patch 4 | 5 | # Change default pager. 6 | sed 's,"more -s","less",g' main.c > _ 7 | mv -f _ main.c 8 | 9 | # Use CC rather than broken default. 10 | sed "s/CC=.*/CC=${CC:-cc}/" configure > _ 11 | mv -f _ configure 12 | 13 | cat > configure.local < netbsd-curses.patch < 8 | #endif 9 | 10 | +// #include - can't include term.h, because it defines macro columns which clashes 11 | +// with variable name used in mutt, so just define the prototype for tigetstr() 12 | +char *tigetstr(const char *capname); 13 | + 14 | #define MUTT_ENTER_C '\n' 15 | #define MUTT_ENTER_S "\n" 16 | 17 | EOF 18 | 19 | patch -p1 < netbsd-curses.patch 20 | 21 | out=$PWD/out 22 | mkdir -p out 23 | 24 | ( 25 | cd cyrus-sasl 26 | 27 | export LDFLAGS="$LDFLAGS -lssl -lcrypto" 28 | 29 | ./configure \ 30 | --prefix=/usr \ 31 | --sysconfdir=/etc \ 32 | --disable-shared \ 33 | --sbindir=/usr/bin 34 | 35 | gmake 36 | gmake DESTDIR="$out" install 37 | ) 38 | 39 | # Remove perl dependency. 40 | sed 's/ doc contrib/ contrib/g' Makefile.in > _ 41 | mv -f _ Makefile.in 42 | 43 | export LDFLAGS="$LDFLAGS -lterminfo" 44 | 45 | ./configure \ 46 | ac_cv_search_sasl_encode64=-lsasl2 \ 47 | --prefix=/usr \ 48 | --sysconfdir=/etc \ 49 | --disable-doc \ 50 | --disable-full-doc \ 51 | --enable-pop \ 52 | --enable-imap \ 53 | --enable-smtp \ 54 | --with-ssl \ 55 | --with-sasl="$out/usr" 56 | 57 | make 58 | make install-exec 59 | 60 | rm -f "$1/etc/mime.types" 61 | -------------------------------------------------------------------------------- /extra/mutt/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/mutt/checksums -------------------------------------------------------------------------------- /extra/mutt/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | netbsd-curses 3 | openssl 4 | zlib 5 | -------------------------------------------------------------------------------- /extra/mutt/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/mutt/sources -------------------------------------------------------------------------------- /extra/mutt/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/mutt/version -------------------------------------------------------------------------------- /extra/nasm/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | ./configure \ 4 | --prefix=/usr 5 | 6 | gmake 7 | gmake DESTDIR="$1" install 8 | -------------------------------------------------------------------------------- /extra/nasm/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/nasm/checksums -------------------------------------------------------------------------------- /extra/nasm/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | -------------------------------------------------------------------------------- /extra/nasm/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/nasm/sources -------------------------------------------------------------------------------- /extra/nasm/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/nasm/version -------------------------------------------------------------------------------- /extra/netbsd-curses/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | gmake 4 | gmake DESTDIR="$1" PREFIX=/usr install 5 | 6 | for libs in curses terminfo panel menu form; do 7 | chmod 755 "$1/usr/lib/lib${libs}.so" 8 | done 9 | -------------------------------------------------------------------------------- /extra/netbsd-curses/checksums: -------------------------------------------------------------------------------- 1 | 9d3ebd651e5f70b87b1327b01cbd7e0c01a0f036b4c1371f653b7704b11daf23 2 | -------------------------------------------------------------------------------- /extra/netbsd-curses/depends: -------------------------------------------------------------------------------- 1 | gmake make 2 | -------------------------------------------------------------------------------- /extra/netbsd-curses/sources: -------------------------------------------------------------------------------- 1 | https://github.com/sabotage-linux/netbsd-curses/archive/refs/tags/v0.3.2.tar.gz 2 | -------------------------------------------------------------------------------- /extra/netbsd-curses/version: -------------------------------------------------------------------------------- 1 | 0.3.2 1 2 | -------------------------------------------------------------------------------- /extra/nodejs: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/nodejs/ -------------------------------------------------------------------------------- /extra/opendoas/README: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/opendoas/README -------------------------------------------------------------------------------- /extra/opendoas/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | BINOWN="$(id -u)" \ 4 | BINGRP="$(id -g)" \ 5 | ./configure \ 6 | --prefix=/usr \ 7 | --enable-static \ 8 | --with-shadow \ 9 | --with-timestamp \ 10 | --without-pam 11 | 12 | gmake 13 | gmake DESTDIR="$1" install 14 | 15 | mkdir -p "$1/etc" 16 | cp -f doas.conf "$1/etc" 17 | chmod 600 "$1/etc/doas.conf" 18 | -------------------------------------------------------------------------------- /extra/opendoas/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/opendoas/checksums -------------------------------------------------------------------------------- /extra/opendoas/depends: -------------------------------------------------------------------------------- 1 | byacc make 2 | -------------------------------------------------------------------------------- /extra/opendoas/files: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/opendoas/files/ -------------------------------------------------------------------------------- /extra/opendoas/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/opendoas/sources -------------------------------------------------------------------------------- /extra/opendoas/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/extra/opendoas/version -------------------------------------------------------------------------------- /extra/openresolv: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/openresolv -------------------------------------------------------------------------------- /extra/openssh: -------------------------------------------------------------------------------- 1 | ../kiss-repo/extra/openssh -------------------------------------------------------------------------------- /extra/opus/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export DESTDIR="$1" 4 | 5 | [ ! -r opus_buildtype.cmake ] && \ 6 | cat > opus_buildtype.cmake <&2 5 | exit 1 6 | } 7 | 8 | case $("$CC" --version) in 9 | *clang*) 10 | # Clang requires this for PGO. 11 | export CFLAGS="$CFLAGS -Wno-ignored-optimization-argument" 12 | ;; 13 | 14 | *GCC*) 15 | # PGO with < -O3 is slow > GCC 10.1.X. 16 | export CFLAGS="$CFLAGS -O3" 17 | ;; 18 | esac 19 | 20 | mkdir -p bld/release 21 | cd bld/release 22 | 23 | meson \ 24 | --prefix=/usr \ 25 | --buildtype=release \ 26 | --force-fallback-for=fcft,tllist \ 27 | -Dime=false \ 28 | ../.. 29 | 30 | # Generate PGO data. 31 | { 32 | meson configure \ 33 | -Db_pgo=generate \ 34 | -Dterminfo=disabled 35 | 36 | ninja 37 | ninja test 38 | 39 | # Required (gives some profiling data). 40 | ./footclient --version 41 | 42 | set -- \ 43 | "$OLDPWD/scripts/generate-alt-random-writes.py" \ 44 | --scroll \ 45 | --scroll-region \ 46 | --colors-regular \ 47 | --colors-bright \ 48 | --colors-256 \ 49 | --colors-rgb \ 50 | --attr-bold \ 51 | --attr-italic \ 52 | --attr-underline \ 53 | --sixel \ 54 | .pgotmp 55 | 56 | ./foot \ 57 | --config=/dev/null \ 58 | --term=xterm \ 59 | sh -c "$* && cat .pgotmp" 60 | } 61 | 62 | # Clang requires this for PGO. 63 | case $("$CC" --version) in *clang*) 64 | llvm-profdata merge default_*profraw --output=default.profdata 65 | esac 66 | 67 | meson configure -Db_pgo=use -Dterminfo=disabled 68 | 69 | ninja 70 | ninja install 71 | 72 | rm -rf \ 73 | "$DESTDIR/usr/share/doc" \ 74 | "$DESTDIR/usr/share/zsh" \ 75 | "$DESTDIR/usr/share/fish" \ 76 | "$DESTDIR/usr/share/bash-completion" 77 | -------------------------------------------------------------------------------- /wayland/foot-pgo/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/foot-pgo/checksums -------------------------------------------------------------------------------- /wayland/foot-pgo/depends: -------------------------------------------------------------------------------- 1 | fontconfig 2 | libxkbcommon 3 | netbsd-curses make 4 | pkgconf make 5 | python make 6 | wayland 7 | wayland-protocols make 8 | -------------------------------------------------------------------------------- /wayland/foot-pgo/post-install: -------------------------------------------------------------------------------- 1 | ../foot/post-install -------------------------------------------------------------------------------- /wayland/foot-pgo/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/foot-pgo/sources -------------------------------------------------------------------------------- /wayland/foot-pgo/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/foot-pgo/version -------------------------------------------------------------------------------- /wayland/foot/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # Avoid scdoc dependency. 4 | sed "/subdir('doc')/d" meson.build > _ 5 | mv -f _ meson.build 6 | 7 | export DESTDIR="$1" 8 | 9 | meson \ 10 | --prefix=/usr \ 11 | --buildtype=release \ 12 | --force-fallback-for=fcft,tllist \ 13 | -Dterminfo=disabled \ 14 | . output 15 | 16 | ninja -C output 17 | ninja -C output install 18 | 19 | rm -rf \ 20 | "$1/usr/share/doc" \ 21 | "$1/usr/share/zsh" \ 22 | "$1/usr/share/fish" \ 23 | "$1/usr/share/bash-completion" 24 | -------------------------------------------------------------------------------- /wayland/foot/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/foot//checksums -------------------------------------------------------------------------------- /wayland/foot/depends: -------------------------------------------------------------------------------- 1 | fontconfig 2 | libxkbcommon 3 | netbsd-curses make 4 | pkgconf make 5 | python make 6 | wayland 7 | wayland-protocols make 8 | -------------------------------------------------------------------------------- /wayland/foot/post-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cat < _ 7 | mv -f _ evdev/Makefile.in 8 | 9 | export CFLAGS="$CFLAGS -fPIC" 10 | 11 | for pkg in mtdev evdev; do ( 12 | cd "$pkg" 13 | 14 | ./configure \ 15 | --prefix=/usr \ 16 | --disable-shared \ 17 | --disable-gcov 18 | 19 | make 20 | make DESTDIR="$OLDPWD" install 21 | ) done 22 | 23 | # Build fails with clang due to -Werror (forced on) and 24 | # -Wunused-command-line-argument which is triggered by. 25 | # the below CFLAGS. 26 | export CFLAGS="-Wno-unused-command-line-argument $CFLAGS" 27 | 28 | export PKG_CONFIG_PATH="$PWD/usr/lib/pkgconfig" 29 | export CFLAGS="$CFLAGS -I$PWD/usr/include -L$PWD/usr/lib" 30 | export CFLAGS="$CFLAGS -I$PWD/usr/include/libevdev-1.0" 31 | 32 | meson \ 33 | --prefix=/usr \ 34 | --sysconfdir=/etc \ 35 | --mandir=/usr/share/man \ 36 | --libexecdir=/usr/lib \ 37 | -Ddefault_library=both \ 38 | -Ddebug-gui=false \ 39 | -Ddocumentation=false \ 40 | -Dtests=false \ 41 | -Dlibwacom=false \ 42 | . output 43 | 44 | ninja -C output 45 | ninja -C output install 46 | -------------------------------------------------------------------------------- /wayland/libinput/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libinput/checksums -------------------------------------------------------------------------------- /wayland/libinput/depends: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libinput/depends -------------------------------------------------------------------------------- /wayland/libinput/patches: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libinput/patches/ -------------------------------------------------------------------------------- /wayland/libinput/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libinput/sources -------------------------------------------------------------------------------- /wayland/libinput/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libinput/version -------------------------------------------------------------------------------- /wayland/libpciaccess: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/libpciaccess -------------------------------------------------------------------------------- /wayland/libseat: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/libseat/ -------------------------------------------------------------------------------- /wayland/libxkbcommon/build: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libxkbcommon/build -------------------------------------------------------------------------------- /wayland/libxkbcommon/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libxkbcommon/checksums -------------------------------------------------------------------------------- /wayland/libxkbcommon/depends: -------------------------------------------------------------------------------- 1 | byacc make 2 | meson make 3 | pkgconf make 4 | wayland 5 | wayland-protocols make 6 | xkeyboard-config 7 | -------------------------------------------------------------------------------- /wayland/libxkbcommon/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libxkbcommon/sources -------------------------------------------------------------------------------- /wayland/libxkbcommon/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/libxkbcommon/version -------------------------------------------------------------------------------- /wayland/pixman: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/pixman -------------------------------------------------------------------------------- /wayland/slurp: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/slurp -------------------------------------------------------------------------------- /wayland/sway: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/sway -------------------------------------------------------------------------------- /wayland/sway-no-seat: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/sway-no-seat/ -------------------------------------------------------------------------------- /wayland/sway-tiny: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/sway-tiny -------------------------------------------------------------------------------- /wayland/wayland-protocols: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/wayland-protocols -------------------------------------------------------------------------------- /wayland/wayland/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export DESTDIR="$1" 4 | 5 | meson \ 6 | --prefix=/usr \ 7 | --buildtype=release \ 8 | -Ddefault_library=both \ 9 | -Ddocumentation=false \ 10 | -Ddtd_validation=false \ 11 | . build 12 | 13 | ninja -C build 14 | ninja -C build install 15 | -------------------------------------------------------------------------------- /wayland/wayland/checksums: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/wayland/checksums -------------------------------------------------------------------------------- /wayland/wayland/depends: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/wayland/depends -------------------------------------------------------------------------------- /wayland/wayland/sources: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/wayland/sources -------------------------------------------------------------------------------- /wayland/wayland/version: -------------------------------------------------------------------------------- 1 | ../../kiss-repo/wayland/wayland/version -------------------------------------------------------------------------------- /wayland/wbg: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/wbg -------------------------------------------------------------------------------- /wayland/wl-clipboard: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/wl-clipboard/ -------------------------------------------------------------------------------- /wayland/wlroots: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/wlroots/ -------------------------------------------------------------------------------- /wayland/wlsunset: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/wlsunset/ -------------------------------------------------------------------------------- /wayland/xkeyboard-config: -------------------------------------------------------------------------------- 1 | ../kiss-repo/wayland/xkeyboard-config --------------------------------------------------------------------------------