diff --git a/AGENTS.md b/AGENTS.md index ac275dd..07c66b2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,7 +34,7 @@ and §7.9 (Messaging) and §8.1 (the frozen one). | `tests//main.cpp` | One test per directory, declared in `project.cpp`. | | `utilities/` | `fake-imsd.py`: imsd's Messaging interface on the session bus, for benches. | | `assets/` | The bundled font (Noto Sans, OFL 1.1). | -| `packaging/` | The desktop entry and the icon. | +| `packaging/` | The desktop entry, metainfo and icon; the flatpak's sysroot and build scripts and licence texts it ships (`licenses/`; §4 has the whole set). | ## 3. Building and testing @@ -52,7 +52,47 @@ The build takes Crafter.DB and Crafter.Graphics from the forge at the commits `project.cpp` pins; `crafter-build -- --local` builds them from sibling checkouts in `../Crafter/` instead. -## 4. Making changes +## 4. The flatpak + +The app ships as the aarch64 flatpak `net.catcrafts.ImsdMessages` on +org.freedesktop.Platform 26.08. crafter-build cross-compiles it; there is no +flatpak-builder manifest: + +```sh +packaging/make-flatpak-sysroot.sh # the sysroot; kept until the Sdk or the recipe changes +packaging/build-flatpak.sh dist/repo # the executable, assembled into an OSTree repo (branch master) +flatpak build-bundle --arch=aarch64 dist/repo dist/imsd-messages.flatpak net.catcrafts.ImsdMessages master +``` + +The sysroot is the aarch64 Freedesktop Sdk with LLVM's libc++ of the +release crafter-build carries, whose std module source crafter-build +ships. The Platform has no libc++, so the flatpak +bundles libc++, libc++abi and libunwind in `/app/lib`; the build fails when +a library the executable needs is in neither the Platform nor `/app/lib`, or +when the executable or a library in `/app/lib` links the Platform's +libunwind 8 beside LLVM's. Both scripts +keep their state under `imsd-messages/flatpak` in `$XDG_CACHE_HOME` +(`~/.cache` when unset; `IMSD_MESSAGES_FLATPAK_CACHE` names another +directory) and run the crafter-build that `CRAFTER_REF` names +(`net.catcrafts.CrafterBuild//stable` by default). + +The flatpak carries the licences of what it ships under +`/app/share/licenses/net.catcrafts.ImsdMessages/`: `LICENSE`, +`assets/OFL.txt`, the texts in `packaging/licenses/` (its `NOTICE` names +what each covers) and LLVM's runtime licences, which +make-flatpak-sysroot.sh keeps beside libc++. The texts in +`packaging/licenses/` follow what the pinned Crafter.Graphics carries and +compiles in: a new pin checks them again. + +The sandbox has Wayland, the GPU, `net.catcrafts.IMS1` on the system bus +and `org.freedesktop.Notifications` on the session bus. When `FLATPAK_ID` +is the app's own id, as inside its flatpak, the instance asks the +Background portal when it starts (not for `--send` or `--headless`) to +start `imsd-messages --daemon` at login (`ImsdMessages.Bus:Background`); +the portal writes the login entry again at each request while the +background permission allows it. + +## 5. Making changes - Commit messages: subject `area: what changes`, the body says why; no AI attribution trailers; every commit GPG-signed with the repository's @@ -61,4 +101,5 @@ sibling checkouts in `../Crafter/` instead. the fp6 project's `/prepush` gates. - Every source file starts with the two SPDX lines and a blank line — after a shebang or an XML declaration where the file has one, as `#` comments in - a desktop entry. + a desktop entry; the metainfo carries AppStream's single CC0-1.0 line + instead. diff --git a/interfaces/ImsdMessages-Model.cppm b/interfaces/ImsdMessages-Model.cppm index d3995fb..fb1c823 100644 --- a/interfaces/ImsdMessages-Model.cppm +++ b/interfaces/ImsdMessages-Model.cppm @@ -13,9 +13,9 @@ import :Number; import :Time; export namespace ImsdMessages { - // The app's version: the one source for --version, the metainfo and the - // package. A bump is a commit that changes only this line. - inline constexpr std::string_view version = "0.1.0"; + // The app's version, for --version. A release bumps it and adds its + // to the metainfo, whose newest entry names this version. + inline constexpr std::string_view version = "0.0.0"; enum class Direction : std::uint8_t { Incoming, Outgoing }; diff --git a/packaging/build-flatpak.sh b/packaging/build-flatpak.sh new file mode 100755 index 0000000..7c9a961 --- /dev/null +++ b/packaging/build-flatpak.sh @@ -0,0 +1,110 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-3.0-only +# SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® + +# build-flatpak.sh — the aarch64 flatpak of imsd-messages, into an OSTree +# repository. crafter-build cross-compiles the executable against the +# sysroot of packaging/make-flatpak-sysroot.sh (run that first), and +# flatpak's build commands assemble it on org.freedesktop.Platform 26.08, +# with the libc++ it was linked against in /app/lib. +# +# packaging/build-flatpak.sh [branch] # branch: master by default +# +# The repository is created when it does not exist; `flatpak build-bundle` +# makes a single-file bundle out of it. The cache and $CRAFTER_REF are +# make-flatpak-sysroot.sh's. Needs flatpak, flock, readelf and +# appstreamcli. +set -eu + +REPO=${1:?usage: build-flatpak.sh [branch]} +BRANCH=${2:-master} +APP_ID=net.catcrafts.ImsdMessages +ARCH=aarch64 +TRIPLE=aarch64-unknown-linux-gnu +MULTIARCH=aarch64-linux-gnu +RUNTIME_VERSION=26.08 +CRAFTER_REF=${CRAFTER_REF:-net.catcrafts.CrafterBuild//stable} +CACHE=${IMSD_MESSAGES_FLATPAK_CACHE:-${XDG_CACHE_HOME:-$HOME/.cache}/imsd-messages/flatpak} +INSTALLATION="$CACHE/installation" +SYSROOT="$CACHE/sysroot-$ARCH" +LIBCXX="$CACHE/libcxx-$ARCH" +SRC=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) +# flatpak commands that need the aarch64 Sdk and Platform see their +# installation; crafter-build runs from wherever it is installed. +withsdk() { FLATPAK_USER_DIR="$INSTALLATION" "$@"; } + +command -v readelf >/dev/null 2>&1 || { echo "readelf (binutils) is needed: the NEEDED checks below run on it" >&2; exit 1; } +# One build at a time on this cache: the build directory is removed and +# made again by every run. +mkdir -p "$CACHE" +exec 9>"$CACHE/lock"; flock 9 +[ -f "$SYSROOT/.made-from" ] || { echo "no sysroot at $SYSROOT: run packaging/make-flatpak-sysroot.sh first" >&2; exit 1; } # under the lock: a sysroot being made is not missing + +echo ">> the executable for $TRIPLE" +# Generic armv8-a: a flatpak is for any aarch64 machine, not one SoC. The +# output directory's name ends in a hash of the configuration (the sysroot, +# --debug, --local), and an older variant left in bin/ would be a second +# match below: this run's is the only one. +rm -rf "$SRC/bin/imsd-messages-$TRIPLE-armv8-a-generic-"* +(cd "$SRC" && flatpak run "$CRAFTER_REF" --march=armv8-a --mtune=generic -- --target="$TRIPLE" --sysroot="$SYSROOT") +set -- "$SRC/bin/imsd-messages-$TRIPLE-armv8-a-generic-"*/ +[ $# = 1 ] && [ -x "$1/imsd-messages" ] || { echo "expected one output directory with an executable under $SRC/bin for $TRIPLE, found: $*" >&2; exit 1; } +bin=$1 + +echo ">> $APP_ID from $bin" +build="$CACHE/build-$ARCH" +rm -rf "$build" +withsdk flatpak build-init --arch="$ARCH" "$build" "$APP_ID" org.freedesktop.Sdk org.freedesktop.Platform "$RUNTIME_VERSION" +files="$build/files" +# The executable finds its shaders and font beside its real path. +mkdir -p "$files/bin" "$files/lib/imsd-messages" +cp -a "$bin". "$files/lib/imsd-messages/" +ln -s ../lib/imsd-messages/imsd-messages "$files/bin/imsd-messages" +cp -a "$LIBCXX/usr/lib/"libc++.so.1* "$LIBCXX/usr/lib/"libc++abi.so.1* "$LIBCXX/usr/lib/"libunwind.so.1* "$files/lib/" +install -Dm644 "$SRC/packaging/$APP_ID.desktop" "$files/share/applications/$APP_ID.desktop" +install -Dm644 "$SRC/packaging/icons/$APP_ID.svg" "$files/share/icons/hicolor/scalable/apps/$APP_ID.svg" +install -Dm644 "$SRC/packaging/$APP_ID.metainfo.xml" "$files/share/metainfo/$APP_ID.metainfo.xml" +# The licences of what the flatpak carries; packaging/licenses/NOTICE names +# what each text covers. +licenses="$files/share/licenses/$APP_ID" +install -Dm644 "$SRC/LICENSE" "$licenses/LICENSE" +install -Dm644 "$SRC/assets/OFL.txt" "$licenses/OFL.txt" +install -Dm644 -t "$licenses" "$SRC"/packaging/licenses/* "$LIBCXX"/licenses/* + +# Every library the executable and the bundled ones need is in the Platform +# or in /app/lib, or the first start would fail on the phone. +platform=$(withsdk flatpak --user info --show-location --arch="$ARCH" "org.freedesktop.Platform//$RUNTIME_VERSION")/files +missing=0 +for elf in "$files/lib/imsd-messages/imsd-messages" "$files/lib/"lib*.so.1; do + for lib in $(readelf -d "$elf" | sed -n 's/.*(NEEDED).*\[\(.*\)\]/\1/p'); do + if [ ! -e "$platform/lib/$MULTIARCH/$lib" ] && [ ! -e "$platform/lib/$lib" ] && [ ! -e "$files/lib/$lib" ]; then + echo "$(basename "$elf") needs $lib, which neither the Platform nor /app/lib has" >&2 + missing=1 + fi + done +done +# One unwinder: LLVM's libunwind, which the bundled libc++abi uses, never +# the Platform's libunwind 8 beside it. +for elf in "$files/lib/imsd-messages/imsd-messages" "$files/lib/"lib*.so.1; do + if readelf -d "$elf" | grep -q 'NEEDED.*\[libunwind\.so\.8\]'; then + echo "$(basename "$elf") links libunwind 8, not LLVM's libunwind" >&2 + missing=1 + fi +done +[ "$missing" = 0 ] || exit 1 + +# The AppStream catalogue entry software centres list the app by, with PNG +# icons: appstreamcli's default, JPEG XL, is not read by older clients. +appstreamcli compose --prefix=/ --origin="$APP_ID" --image-format=png \ + --result-root="$files" --data-dir="$files/share/app-info/xmls" \ + --icons-dir="$files/share/app-info/icons/flatpak" "$files" + +# The phone's compositor, its GPU, imsd on the system bus and the desktop's +# notifications; the portals need no permission. +withsdk flatpak build-finish "$build" --command=imsd-messages \ + --socket=wayland --device=dri \ + --system-talk-name=net.catcrafts.IMS1 \ + --talk-name=org.freedesktop.Notifications +mkdir -p "$(dirname "$REPO")" +withsdk flatpak build-export --arch="$ARCH" "$REPO" "$build" "$BRANCH" +echo ">> done: app/$APP_ID/$ARCH/$BRANCH in $REPO" diff --git a/packaging/licenses/Crafter-LGPL-3.0-only.txt b/packaging/licenses/Crafter-LGPL-3.0-only.txt new file mode 100644 index 0000000..0a04128 --- /dev/null +++ b/packaging/licenses/Crafter-LGPL-3.0-only.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/packaging/licenses/NOTICE b/packaging/licenses/NOTICE new file mode 100644 index 0000000..bd258a4 --- /dev/null +++ b/packaging/licenses/NOTICE @@ -0,0 +1,26 @@ +/app/share/licenses/net.catcrafts.ImsdMessages in the flatpak holds the +licences of what it carries: + +- LICENSE: imsd-messages (GPL-3.0-only). +- OFL.txt: the Noto Sans font (the SIL Open Font License 1.1). +- Crafter-LGPL-3.0-only.txt: the Crafter libraries, linked in statically + (Crafter.Graphics with Crafter.Event, Crafter.Math and Crafter.Asset, + and Crafter.DB): the GNU LGPL version 3, which adds its permissions to + the GPL in LICENSE. Their source: + https://forgejo.catcrafts.net/Catcrafts/. +- stb-LICENSE.txt: stb_truetype and stb_image_write, which + Crafter.Graphics carries and compiles in. +- wayland-protocols-NOTICE.txt: the code wayland-scanner generated for + the xdg-shell, xdg-decoration-unstable-v1, fractional-scale-v1, + viewporter and text-input-unstable-v3 protocols, which Crafter.Graphics + carries and compiles in. +- Vulkan-Utility-Libraries-Apache-2.0.txt: vk_enum_string_helper.h of the + Vulkan Utility Libraries (Copyright 2023-2025 The Khronos Group Inc., + Valve Corporation, LunarG, Inc.), which Crafter.Graphics compiles in: + the Apache License 2.0. +- libevdev-COPYING.txt: libevdev, which Crafter.Graphics carries and + builds as a static library (MIT). +- libcxx-LICENSE.TXT, libcxxabi-LICENSE.TXT and libunwind-LICENSE.TXT: + LLVM's libc++, libc++abi and libunwind in /app/lib (the Apache License + 2.0 with LLVM Exceptions, and for older code the University of + Illinois/NCSA licence). diff --git a/packaging/licenses/Vulkan-Utility-Libraries-Apache-2.0.txt b/packaging/licenses/Vulkan-Utility-Libraries-Apache-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/packaging/licenses/Vulkan-Utility-Libraries-Apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packaging/licenses/libevdev-COPYING.txt b/packaging/licenses/libevdev-COPYING.txt new file mode 100644 index 0000000..1974905 --- /dev/null +++ b/packaging/licenses/libevdev-COPYING.txt @@ -0,0 +1,32 @@ +SPDX-License-Identifier: MIT + +Copyright © 2013 Red Hat, Inc. +Copyright © 2013 David Herrmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +The following license is from a Linux kernel header file and there is no GPL +code this package links to. + +Copyright (c) 1999-2002 Vojtech Pavlik + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License version 2 as published by +the Free Software Foundation. diff --git a/packaging/licenses/stb-LICENSE.txt b/packaging/licenses/stb-LICENSE.txt new file mode 100644 index 0000000..a5be839 --- /dev/null +++ b/packaging/licenses/stb-LICENSE.txt @@ -0,0 +1,47 @@ +stb_truetype.h v1.26, Sean Barrett (lib/stb_truetype.h of Crafter.Graphics): + +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ + +stb_image_write.h v1.02, Sean Barrett (lib/stb_image_write.h of Crafter.Graphics): + +This software is dual-licensed to the public domain and under the following +license: you are granted a perpetual, irrevocable license to copy, modify, +publish, and distribute this file as you see fit. diff --git a/packaging/licenses/wayland-protocols-NOTICE.txt b/packaging/licenses/wayland-protocols-NOTICE.txt new file mode 100644 index 0000000..d192753 --- /dev/null +++ b/packaging/licenses/wayland-protocols-NOTICE.txt @@ -0,0 +1,127 @@ +The copyright and permission notices of the Wayland protocols whose +wayland-scanner code Crafter.Graphics carries and compiles in. + +xdg-shell: + +Copyright © 2008-2013 Kristian Høgsberg +Copyright © 2013 Rafael Antognolli +Copyright © 2013 Jasper St. Pierre +Copyright © 2010-2013 Intel Corporation +Copyright © 2015-2017 Samsung Electronics Co., Ltd +Copyright © 2015-2017 Red Hat Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +xdg-decoration-unstable-v1: + +Copyright © 2018 Simon Ser + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +fractional-scale-v1: + +Copyright © 2022 Kenny Levinsen + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +viewporter: + +Copyright © 2013-2016 Collabora, Ltd. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +text-input-unstable-v3: + +Copyright © 2012, 2013 Intel Corporation +Copyright © 2015, 2016 Jan Arne Petersen +Copyright © 2017, 2018 Red Hat, Inc. +Copyright © 2018 Purism SPC + +Permission to use, copy, modify, distribute, and sell this +software and its documentation for any purpose is hereby granted +without fee, provided that the above copyright notice appear in +all copies and that both that copyright notice and this permission +notice appear in supporting documentation, and that the name of +the copyright holders not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no +representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied +warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/packaging/make-flatpak-sysroot.sh b/packaging/make-flatpak-sysroot.sh new file mode 100755 index 0000000..b3a4986 --- /dev/null +++ b/packaging/make-flatpak-sysroot.sh @@ -0,0 +1,153 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-3.0-only +# SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® + +# make-flatpak-sysroot.sh — what the flatpak's aarch64 executable is +# cross-compiled against: the Freedesktop Sdk for aarch64 (glibc, GLib, +# Wayland, xkbcommon, udev and the Vulkan loader, the libraries the Platform +# runtime has at run time) plus LLVM's libc++ of the release crafter-build +# itself carries, built for aarch64, which the runtime does not have. +# +# packaging/make-flatpak-sysroot.sh +# +# Everything goes under $IMSD_MESSAGES_FLATPAK_CACHE (default +# ${XDG_CACHE_HOME:-~/.cache}/imsd-messages/flatpak), outside /tmp, which +# the crafter-build sandbox does not share: +# installation/ a flatpak installation of the aarch64 Sdk and Platform +# (packaging/build-flatpak.sh builds the app on it) +# sysroot-aarch64/ the Sdk's files as usr/, with libc++ added +# libcxx-aarch64/ libc++, libc++abi and libunwind as installed, which +# the flatpak bundles in /app/lib +# A sysroot made from the same Sdk commit, LLVM release and recipe is kept. +# +# Needs flatpak, flock, curl, tar, xz and sha256sum; crafter-build +# ($CRAFTER_REF, the Crafter.Build Flatpak) provides clang, cmake and ninja. +# Network: Flathub and the LLVM release on GitHub. +set -eu + +ARCH=aarch64 +TRIPLE=aarch64-unknown-linux-gnu +MULTIARCH=aarch64-linux-gnu +MARCH=armv8-a +RUNTIME_VERSION=26.08 +# The LLVM release crafter-build itself carries, whose std module source it +# ships. The tarball and hash are the ones Crafter.Build's manifest builds +# that LLVM from. +LLVM_VERSION=23.1.2 +LLVM_SHA256=c98bbef08a2b4c2613cd50e9aa9ae7b69b1fe6c16b2c40373bc0ab6116fdf78a +CRAFTER_REF=${CRAFTER_REF:-net.catcrafts.CrafterBuild//stable} +CACHE=${IMSD_MESSAGES_FLATPAK_CACHE:-${XDG_CACHE_HOME:-$HOME/.cache}/imsd-messages/flatpak} + +INSTALLATION="$CACHE/installation" +SYSROOT="$CACHE/sysroot-$ARCH" +LIBCXX="$CACHE/libcxx-$ARCH" +# The Sdk and the Platform for aarch64 go into a flatpak installation of +# their own; crafter-build is run from wherever it is installed. +sdkpak() { FLATPAK_USER_DIR="$INSTALLATION" flatpak --user "$@"; } +# Flathub's CDN answers 502 now and then, and flatpak reports a summary it +# could not fetch as a runtime that does not exist. +retry() { + for attempt in 1 2 3 4 5; do + "$@" && return 0 + echo "attempt $attempt of 5 failed: $*" >&2 + [ "$attempt" = 5 ] || sleep 30 + done + return 1 +} + +mkdir -p "$CACHE" +# One run at a time on this cache: the sysroot and the LLVM build are +# removed and made again by a run that finds them stale. +exec 9>"$CACHE/lock"; flock 9 +echo ">> the $ARCH Sdk and Platform $RUNTIME_VERSION into $INSTALLATION" +retry sdkpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +retry sdkpak install -y --noninteractive --no-related --arch="$ARCH" flathub \ + "org.freedesktop.Sdk//$RUNTIME_VERSION" "org.freedesktop.Platform//$RUNTIME_VERSION" +retry sdkpak update -y --noninteractive --no-related --arch="$ARCH" +sdk=$(sdkpak info --show-location --arch="$ARCH" "org.freedesktop.Sdk//$RUNTIME_VERSION") +sdk_commit=$(sdkpak info --show-commit --arch="$ARCH" "org.freedesktop.Sdk//$RUNTIME_VERSION") +# A sysroot is kept while the Sdk commit, the LLVM release and this recipe +# stay the same. +stamp="sdk $sdk_commit llvm $LLVM_VERSION recipe $(sha256sum "$0" | cut -c1-16)" +if [ -f "$SYSROOT/.made-from" ] && [ "$(cat "$SYSROOT/.made-from")" = "$stamp" ] && [ -f "$LIBCXX/usr/lib/libc++.so.1" ]; then + echo ">> $SYSROOT is current ($stamp)" + exit 0 +fi + +echo ">> $SYSROOT from the Sdk at $sdk_commit" +rm -rf "$SYSROOT" "$LIBCXX" +mkdir -p "$SYSROOT" +# A copy: libc++ is installed into it, and the installation's files are +# hard links into its object store. +cp -a --reflink=auto "$sdk/files" "$SYSROOT/usr" +# Linker scripts and the dynamic linker's path name /lib. +ln -s usr/lib "$SYSROOT/lib" +# libc++'s linker script adds -lunwind, which would find the Sdk's +# libunwind 8 (in the multiarch directory, searched first) beside the LLVM +# libunwind its libc++abi uses: without the Sdk's link name it finds LLVM's. +rm "$SYSROOT/usr/lib/$MULTIARCH/libunwind.so" + +src="$CACHE/llvm-project-$LLVM_VERSION.src" +tarball="$CACHE/llvm-project-$LLVM_VERSION.src.tar.xz" +if [ ! -d "$src/runtimes" ] || [ ! -d "$src/libc/shared" ]; then + echo ">> LLVM $LLVM_VERSION's runtimes source" + retry curl -fsSL -o "$tarball" "https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/llvm-project-$LLVM_VERSION.src.tar.xz" + got=$(sha256sum "$tarball" | cut -d' ' -f1) + [ "$got" = "$LLVM_SHA256" ] || { echo "llvm-project-$LLVM_VERSION.src.tar.xz: sha256 $got, expected $LLVM_SHA256" >&2; exit 1; } + rm -rf "$src" "$src.part" + mkdir -p "$src.part" + # Only part of the tree is unpacked; libc is among it because libc++'s + # from_chars parses floating point with LLVM libc's shared headers. It + # lands under $src only once complete: a tar cut short leaves nothing + # a later run would take for the source. + tar -xJf "$tarball" -C "$src.part" --strip-components=1 \ + "llvm-project-$LLVM_VERSION.src/runtimes" "llvm-project-$LLVM_VERSION.src/libcxx" \ + "llvm-project-$LLVM_VERSION.src/libcxxabi" "llvm-project-$LLVM_VERSION.src/libunwind" \ + "llvm-project-$LLVM_VERSION.src/cmake" "llvm-project-$LLVM_VERSION.src/llvm/cmake" \ + "llvm-project-$LLVM_VERSION.src/llvm/utils" "llvm-project-$LLVM_VERSION.src/third-party" \ + "llvm-project-$LLVM_VERSION.src/libc" + mv "$src.part" "$src" + rm -f "$tarball" +fi + +echo ">> libc++, libc++abi and libunwind $LLVM_VERSION for $TRIPLE" +build="$CACHE/libcxx-build-$ARCH" +rm -rf "$build" +# The classic layout (include/c++/v1, lib/) is where crafter-build looks in +# a sysroot. libc++abi unwinds with LLVM's libunwind, as crafter-build's own +# libc++ does. Programs come from the sandbox, never from the sysroot: the +# Sdk's own ninja and tools are aarch64 binaries. The C++ compiler cannot +# link a test program before there is a libc++ to link (Crafter.Build's +# WASI sysroot build skips the same check); the C compiler's still runs. +flatpak run --command=sh "$CRAFTER_REF" -eu -c ' + cmake -S "$1/runtimes" -B "$2" -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR="$3" \ + -DCMAKE_SYSROOT="$4" \ + -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \ + -DCMAKE_C_COMPILER=/app/bin/clang -DCMAKE_CXX_COMPILER=/app/bin/clang++ -DCMAKE_ASM_COMPILER=/app/bin/clang \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_C_COMPILER_TARGET="$5" -DCMAKE_CXX_COMPILER_TARGET="$5" -DCMAKE_ASM_COMPILER_TARGET="$5" \ + -DCMAKE_AR=/app/bin/llvm-ar -DCMAKE_RANLIB=/app/bin/llvm-ranlib -DCMAKE_NM=/app/bin/llvm-nm \ + -DCMAKE_C_FLAGS="-march=$6" -DCMAKE_CXX_FLAGS="-march=$6" \ + -DCMAKE_INSTALL_PREFIX="$7/usr" \ + "-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind" \ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \ + -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ + -DLIBCXX_INSTALL_MODULES=ON \ + -DLLVM_INCLUDE_TESTS=OFF -DLIBCXX_INCLUDE_TESTS=OFF -DLIBCXXABI_INCLUDE_TESTS=OFF \ + -DLIBUNWIND_INCLUDE_TESTS=OFF -DLIBCXX_INCLUDE_BENCHMARKS=OFF + ninja -C "$2" install +' sh "$src" "$build" "$ARCH" "$SYSROOT" "$TRIPLE" "$MARCH" "$LIBCXX" +rm -rf "$build" + +grep -q "_LIBCPP_VERSION 230102" "$LIBCXX/usr/include/c++/v1/__config" || { echo "the installed libc++ headers are not $LLVM_VERSION" >&2; exit 1; } +# Their licences go with the runtime libraries into the flatpak. +for component in libcxx libcxxabi libunwind; do + install -Dm644 "$src/$component/LICENSE.TXT" "$LIBCXX/licenses/$component-LICENSE.TXT" +done +cp -a "$LIBCXX/usr/." "$SYSROOT/usr/" +echo "$stamp" > "$SYSROOT/.made-from" +echo ">> done: $SYSROOT ($stamp)" diff --git a/packaging/net.catcrafts.ImsdMessages.metainfo.xml b/packaging/net.catcrafts.ImsdMessages.metainfo.xml new file mode 100644 index 0000000..82ba1e5 --- /dev/null +++ b/packaging/net.catcrafts.ImsdMessages.metainfo.xml @@ -0,0 +1,46 @@ + + + + + net.catcrafts.ImsdMessages + Messages + Text messages through imsd + CC0-1.0 + GPL-3.0-only AND OFL-1.1 + + Catcrafts + + +

+ Sends and receives SMS on a phone whose texts go through imsd, the IMS + daemon of the Fairphone 6 on postmarketOS. Texts are grouped into + conversations by number and show whether they were sent and + delivered. +

+
+ net.catcrafts.ImsdMessages.desktop + https://forgejo.catcrafts.net/Catcrafts/imsd-messages + https://forgejo.catcrafts.net/Catcrafts/imsd-messages/issues + https://forgejo.catcrafts.net/Catcrafts/imsd-messages + + touch + pointing + keyboard + + + 360 + + + intense + + + + +

New

+
    +
  • The first release: sends and receives SMS through imsd, groups texts into conversations by number and shows whether each was sent and delivered.
  • +
+
+
+
+