diff --git a/.gitattributes b/.gitattributes index ccd7cfa1454464c58abfd51003e01043e3fee92a..1e1b85edcddbefb9e70037db62afbe98eeba68f9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -60,3 +60,4 @@ nekovoid-beta-7.0-xorg.iso filter=lfs diff=lfs merge=lfs -text nekovoid-beta-7.1-xorg.iso filter=lfs diff=lfs merge=lfs -text nekovoid-beta-7.1-xlibre.iso filter=lfs diff=lfs merge=lfs -text 2026-05-06[[:space:]]10-22-06.mp4 filter=lfs diff=lfs merge=lfs -text +PKG/ZerotierOne-Void-Linux/zerotierone-1.16.1_1.x86_64.xbps filter=lfs diff=lfs merge=lfs -text diff --git a/PKG/Neko-Wizard/template b/PKG/Neko-Wizard/template new file mode 100644 index 0000000000000000000000000000000000000000..168c208a0df3bd2936be9157506a0b5a786e7ebc --- /dev/null +++ b/PKG/Neko-Wizard/template @@ -0,0 +1,48 @@ +# Template file for 'Neko-Wizard' +pkgname=Neko-Wizard +version=6.8 +revision=2 +build_style=meson +hostmakedepends="pkg-config meson ninja cmake" +makedepends="gtk4-devel" +short_desc="Neko Store - Aplicación GTK4 (descripción breve)" +maintainer="Tu Nombre " +license="GPL-3.0-or-later" # Verifica la licencia real del proyecto +homepage="https://codeberg.org/javiercplus/Neko-Wizard" +distfiles="https://codeberg.org/javiercplus/Neko-Wizard/archive/${version}.tar.gz" +checksum="2d6fc2a0f3bddfda32b58cb78b33ff07231d00b27ddb689024f91120558525c8" + +do_install() { + # Crear todos los directorios base necesarios primero + vmkdir usr/lib/neko-store + vmkdir usr/bin + vmkdir usr/share/applications + + # Instalar el binario compilado + vcopy build/neko-store usr/lib/neko-store/neko-store + chmod 755 "${DESTDIR}/usr/lib/neko-store/neko-store" + + # Copiar la carpeta de recursos + vcopy resources usr/lib/neko-store/resources + + # Enlace simbólico en /usr/bin (ahora el directorio existe) + ln -s ../lib/neko-store/neko-store "${DESTDIR}/usr/bin/neko-store" + + # Crear e instalar el archivo .desktop + cat > "${DESTDIR}/usr/share/applications/neko-store.desktop" << EOF +[Desktop Entry] +Type=Application +Name=Neko Wizard +Comment=Gestión de algo con Neko Wizard +Exec=neko-store +Icon=system-software-install +Categories=Utility; +Terminal=false +EOF + chmod 644 "${DESTDIR}/usr/share/applications/neko-store.desktop" + + # Instalar licencia + if [ -f LICENSE ]; then + vlicense LICENSE + fi +} diff --git a/PKG/ZerotierOne-Void-Linux/README.md b/PKG/ZerotierOne-Void-Linux/README.md new file mode 100644 index 0000000000000000000000000000000000000000..23cbf991e2eecb48df7d4d09e82fd2fbc0ff9f7c --- /dev/null +++ b/PKG/ZerotierOne-Void-Linux/README.md @@ -0,0 +1,45 @@ +ZeroTierOne for Void linux +====== + +# Install xbps package: +``` +cd $HOME +#add libs +sudo xbps-install -S openssl libstdc++ glibc libgcc wget +#download and install xbps pkg of zerotierone +wget https://codeberg.org/javiercplus/ZerotierOne-Void-Linux/raw/branch/main/zerotierone-1.16.1_1.x86_64.xbps +sudo xbps-rindex -a $HOME/zerotierone-1.16.1_1.x86_64.xbps +sudo xbps-install -R $PWD zerotierone-1.16.1_1 +#add service +sudo mkdir /etc/sv/zerotier-one +clear +echo '#!/bin/sh +exec 2>&1 +exec /usr/bin/zerotier-one -d' | sudo tee /etc/sv/zerotier-one/run > /dev/null +sudo chmod +x /etc/sv/zerotier-one/run +sudo ln -s /etc/sv/zerotier-one/ /var/service/ +``` +or ... + +# Build & install: +``` +#Download and extract source +wget https://github.com/franckey02/ZeroTierOne-Void/archive/refs/tags/1.16.1.tar.gz +tar -xzvf 1.16.1.tar.gz +#Building +cd ZeroTierOne-Void-1.16.1 +sudo xbps-install -S git make gcc linux-headers openssl-devel libffi-devel rust cargo openssl libstdc++ glibc libgcc wget +sudo xbps-install -S pkg-config +sudo xbps-install -S openssl-devel +make -j2 +#Install +sudo make install +#Add service +sudo mkdir /etc/sv/zerotier-one +clear +echo '#!/bin/sh +exec 2>&1 +exec /usr/bin/zerotier-one -d' | sudo tee /etc/sv/zerotier-one/run > /dev/null +sudo chmod +x /etc/sv/zerotier-one/run +sudo ln -s /etc/sv/zerotier-one/ /var/service/ +``` diff --git a/PKG/ZerotierOne-Void-Linux/zerotierone-1.16.1_1.x86_64.xbps b/PKG/ZerotierOne-Void-Linux/zerotierone-1.16.1_1.x86_64.xbps new file mode 100644 index 0000000000000000000000000000000000000000..1892800acd6ba323ef8ab9adba34e1ea2173ea79 --- /dev/null +++ b/PKG/ZerotierOne-Void-Linux/zerotierone-1.16.1_1.x86_64.xbps @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6375f73c1ebc4b883cf32332d2e9517d13c13bc789c1bc05df59e41af6ef55cb +size 3620042 diff --git a/PKG/ZerotierOne-Void-Linux/zerotierone/ignore.s b/PKG/ZerotierOne-Void-Linux/zerotierone/ignore.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/PKG/ZerotierOne-Void-Linux/zerotierone/template b/PKG/ZerotierOne-Void-Linux/zerotierone/template new file mode 100644 index 0000000000000000000000000000000000000000..bf42657b51501524e6c2f428d0f6df6d9ae82daf --- /dev/null +++ b/PKG/ZerotierOne-Void-Linux/zerotierone/template @@ -0,0 +1,49 @@ +# Template file for 'zerotierone' +pkgname=zerotierone +version=1.16.1 +revision=1 +build_style=none +hostmakedepends="pkg-config gcc make git" +makedepends="openssl-devel libffi-devel rust cargo linux-headers" +depends="" +short_desc="ZeroTier One - Software-defined networking platform" +maintainer="JavierC " +license="MIT" +homepage="https://www.zerotier.com/" +distfiles="https://github.com/franckey02/ZeroTierOne-Void/archive/refs/tags/${version}.tar.gz" +checksum=e0919a39c847c61dcecea7e2678e7270400a5e0f6bc0f8f8000b48d0751439c4 + +do_build() { + cd ${wrksrc} + make -j$(nproc) ZT_TARGET=linux-x86_64 +} + +do_install() { + cd ${wrksrc} + + # --- CP: Instalar el binario real --- + vbin zerotier-one # → esto pone /usr/bin/zerotier-one + + # --- LN: Crear enlaces simbólicos en /usr/bin/ (NO en /usr/sbin/) --- + # Void prefiere /usr/bin/ para binarios accesibles por usuarios + # Por eso creamos los enlaces allí, no en /usr/sbin/ + vmkdir usr/bin + ln -sf ../bin/zerotier-one ${DESTDIR}/usr/bin/zerotier-cli + ln -sf ../bin/zerotier-one ${DESTDIR}/usr/bin/zerotier-idtool + + # --- MAN PAGES --- + if [ -f doc/zerotier-one.8 ]; then + vman doc/zerotier-one.8 + fi + if [ -f doc/zerotier-cli.1 ]; then + vman doc/zerotier-cli.1 + fi + if [ -f doc/zerotier-idtool.1 ]; then + vman doc/zerotier-idtool.1 + fi + + # --- LICENCIA --- + if [ -f LICENSE ]; then + vlicense LICENSE + fi +} diff --git a/PKG/actkbd-0.2.8/AUTHORS b/PKG/actkbd-0.2.8/AUTHORS new file mode 100644 index 0000000000000000000000000000000000000000..646445ae344d33760ed026c191a0d7876a4dbae2 --- /dev/null +++ b/PKG/actkbd-0.2.8/AUTHORS @@ -0,0 +1 @@ +Theodoros V. Kalamatianos diff --git a/PKG/actkbd-0.2.8/COPYING b/PKG/actkbd-0.2.8/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..d60c31a97a544b53039088d14fe9114583c0efc3 --- /dev/null +++ b/PKG/actkbd-0.2.8/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/PKG/actkbd-0.2.8/ChangeLog b/PKG/actkbd-0.2.8/ChangeLog new file mode 100644 index 0000000000000000000000000000000000000000..9b78148c5c0d800f839c3063b5d6f2ada2ccf974 --- /dev/null +++ b/PKG/actkbd-0.2.8/ChangeLog @@ -0,0 +1,93 @@ +Fri Jul 6 00:25:10 EEST 2007 - Theodoros V. Kalamatianos + * Release 0.2.8 + * Fixed the auto-detection code so that it fails with an error when no + input devices are present at all, rather than letting actkbd attempt + to use /dev/input/event0 and fail with some misleading error message + (reported by Jerome Borme). + * Added a sample rule file for udev + * Note that a udev rule is the recommended way to launch actkbd on Linux + * Remove version.h - the version string is automatically set in the + Makefile + * Documentation updates + +Sun Aug 20 14:06:59 EEST 2006 - Theodoros V. Kalamatianos + * Release 0.2.7 + * Fixed a bug in the keyboard autodetection code, where the automatic + detection would fail if the first entry in /proc/bus/input/devices + was not a keyboard (reported by Jerome Borme). + * Improved the Linux-specific information in the README. + * Minor bugfixes + +Tue May 2 21:28:16 EEST 2006 - Theodoros V. Kalamatianos + * Release 0.2.6 + * Updated the copyright notices + * Various minor fixes + * Updated the ToDo list, dropping several items + * Minor documentation updates + +Mon Mar 13 23:38:59 EET 2006 - Theodoros V. Kalamatianos + * Release 0.2.5 + * Added the `set()' and `unset()' attributes to manipulate the internal + state mask of actkbd + * Documentation updates + * Minor code clean-ups + +Thu Mar 9 16:08:27 EET 2006 - Theodoros V. Kalamatianos + * Release 0.2.4 + * The event type field is now a bitmask, rather than a simple value, + which allows multiple event types to be handled in a single entry. + * Minor code clean-ups. + +Thu Mar 9 01:12:19 EET 2006 - Theodoros V. Kalamatianos + * Release 0.2.3 + * Added the `not' attribute + * Minor documentation updates and clean-ups + +Tue Mar 7 19:48:04 EET 2006 - Theodoros V. Kalamatianos + * Release 0.2.2 + * Added the `ledon()' and `ledoff()' attributes to control the + keyboard LEDs. + * Documentation updates + +Tue Mar 7 16:33:33 EET 2006 - Theodoros V. Kalamatianos + * Release 0.2.1 + * Added the `key()',`rel()' and `rep()' attributes that allow the + injection of keyboard events to the system input layer. + * Added the `any' and `all' attributes to fine tune key matching. + * Documentation updates + +Tue Mar 7 02:32:15 EET 2006 - Theodoros V. Kalamatianos + * Release 0.2.0 + * Added the `grab'/`ungrab' attributes that allow keyboard grabbbing + * Added the `grabbed'/`ungrabbed' attributes to fine tune the key + shortcut configuration + * Added the `exec'/`noexec' attributes to control the execution of + external commands + * Added the `ignrel'/`rcvrel'/`allrel' attributes to allow for key + combinations where the keys are pressed sequentially rather than + simultaneously. + * Fixed the -v/--verbose help message line + * Updated documentation + * Some minor Makefile fixes + * Minor fixes and clean-ups here and there + +Tue Nov 22 23:53:12 EEST 2005 - Theodoros V. Kalamatianos + * Release 0.1.2 + * Improve automatic keyboard detection + +Sat Aug 20 02:09:15 EEST 2005 - Theodoros V. Kalamatianos + * Release 0.1.1 + * Minor documentation changes + * Make the default configuration file location + follow the sysconfdir Makefile variable + +Fri Aug 19 10:53:12 EEST 2005 - Theodoros V. Kalamatianos + * Initial public release (0.1.0) + * Issue a warning (instead of error) on a missing configuration file + * Add pidfile support + * Minor bugfixes + * Minor documentation changes + +Fri Aug 19 00:48:28 EEST 2005 - Theodoros V. Kalamatianos + * Initial testing release (0.0.1) + diff --git a/PKG/actkbd-0.2.8/FAQ b/PKG/actkbd-0.2.8/FAQ new file mode 100644 index 0000000000000000000000000000000000000000..ef8ce390e974ba7a3951abbc91c56b8edd5b97a3 --- /dev/null +++ b/PKG/actkbd-0.2.8/FAQ @@ -0,0 +1,96 @@ +* Why yet another keyboard daemon ? + +Because I needed a daemon that: + +- is small and simple +- is NOT X Window based, so that it's usable even from the console +- can execute external programs +- can handle key combinations + + +* What about the other daemons ? + +I had a look at the following: + +- lineakd: + pros: modules + cons: X-based + +- pbbuttonsd: + pros: not X-based (IIRC) + cons: could not find how to execute external programs, Mac-centric, + bloated with PM and other non-keyboard stuff. + +- esekeyd + pros: not X-based, executes external programs, keyboard detection + cons: does not support key combinations + + I used a modified (i.e. with limited combination support) esekeyd + for quite some time, until I decided to write my own daemon. + +- keyed + pros: not X-based, executes external programs + cons: no repeat/release event support, no device detection + +- evkeyd + pros: not X-based + cons: no external program execution, no key combinations + + +* What does the name mean ? + +Simply that actkbd ACTs on KeyBoarD events. Or maybe that it is an ACTing +KeyBoard Daemon. Or... + + +* Does it work ? + +It is now launched at boot time on my system and it seems to work without any +problems. I will still have to receive quite a bit of feedback before I mark it +as stable, though. + + +* How does it work ? + +To find out read the `Internals' section in the README. Then read the source +code itself for details. + + +* Are release events useful ? + +Yes, I think so. A common example could be that of a battery monitor. You want +it to appear when you press a key and then disappear (i.e. be terminated) when +you release it, without having to manually kill it each time. + + +* I found a bug ! + +Good! Now report it at ... or even better fix it and +send a patch! + + +* How can I help ? + +- Test it. +- Report any bugs. +- Ideas, suggestions e.t.c. are welcome. Patches even more! +- Occasionally you may drop a line to say that it worked for you. Positive + feedback is just as important. + + +* I don't like your coding style + +I don't like yours either. + + +* Who wrote it ? + +Me, Theodoros Kalamatianos, a student at the department of Electric and Computer +Engineering of the National Technical University of Athens. For purposes related +to actkbd I may be reached at . + + +* Under what license is it released ? + +Naturally, the GNU General Public License. The full text of the GPL is included +in the actkbd tarball. diff --git a/PKG/actkbd-0.2.8/Makefile b/PKG/actkbd-0.2.8/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..6ff035abddfbce884586aee051fbe68a975e60cd --- /dev/null +++ b/PKG/actkbd-0.2.8/Makefile @@ -0,0 +1,43 @@ +# +# actkbd - A keyboard shortcut daemon +# +# Copyright (c) 2005-2006 Theodoros V. Kalamatianos +# +# 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. +# + +prefix := /usr/local +sbindir := $(prefix)/sbin +sysconfdir := /etc + +# Yes, I am lazy... +VER := $(shell head -n 1 NEWS | cut -d : -f 1) + + + +DEBUG := +CFLAGS := -O2 -Wall $(DEBUG) +CPPFLAGS := -DVERSION=\"$(VER)\" -DCONFIG=\"$(sysconfdir)/actkbd.conf\" + + + +all: actkbd + +actkbd: actkbd.o mask.o config.o linux.o + +actkbd.o : actkbd.h +mask.o : actkbd.h + +config.o : actkbd.h config.c + +linux.o : actkbd.h + +install: all + install -D -m755 actkbd $(sbindir)/actkbd + install -d -m755 $(sysconfdir) + echo "# actkbd configuration file" > $(sysconfdir)/actkbd.conf + +clean: + rm -f actkbd *.o diff --git a/PKG/actkbd-0.2.8/NEWS b/PKG/actkbd-0.2.8/NEWS new file mode 100644 index 0000000000000000000000000000000000000000..771667b70807c20eb1a1e9b6ddeb052ad85a740b --- /dev/null +++ b/PKG/actkbd-0.2.8/NEWS @@ -0,0 +1,10 @@ +0.2.8: + * Fixed the auto-detection code so that it fails with an error when no + input devices are present at all, rather than letting actkbd attempt + to use /dev/input/event0 and fail with some misleading error message + (reported by Jerome Borme). + * Added a sample rule file for udev + * Note that a udev rule is the recommended way to launch actkbd on Linux + * Remove version.h - the version string is automatically set in the + Makefile + * Documentation updates diff --git a/PKG/actkbd-0.2.8/README b/PKG/actkbd-0.2.8/README new file mode 100644 index 0000000000000000000000000000000000000000..c4fe349a7fbcaa8016314b5638554600c143c958 --- /dev/null +++ b/PKG/actkbd-0.2.8/README @@ -0,0 +1,331 @@ +actkbd - A keyboard shortcut daemon + + + +Contents: + + 1. Introduction + 2. Platforms + 2.1. Platform-specific information + 3. Setup + 3.1. Compilation + 3.2. Installation + 3.3. Configuration + 3.3.1. Supported command attributes + 3.4. Running + 4. Internals + 5. License + 6. Authors + + +1. Introduction + +actkbd is a simple daemon that binds actions to keyboard events. It recognises +key combinations and can handle press, repeat and release events. Currently it +only supports the linux-2.6 evdev interface, but the platform-specific code is +well-contained, so that support for additional platforms can be added with no or +minimal changes to the rest of the code. + +It uses a plain-text configuration file which contains all the bindings. Its +file format has some prediction for command attributes, which allow the user to +perform some common actions (e.g. eject the CD-ROM or change the volume) without +having to call external commands. Currently, though, actkbd can only execute +external commands, as the supported attributes only serve configuration purposes. + +Please keep in mind that the manual creation of a configuration file can be very +complex, especially if some of the more advanced features are required. Unless +you enjoy mind games, you might wish to stick to the more simple configuration +rules... + + + +2. Platforms + +Currently only the following platforms are supported: + +* Linux 2.6.x + +The following platforms will probably never be supported: + +* Windows - no POSIX, no support +* MacOS - contrary to MacOS X, MacOS has no POSIX subsystem +* BeOS - unless someone can resurrect it + + +2.1. Platform-specific information + +* Linux 2.6.x + +To run actkbd under Linux 2.6.x you need to have the event interface available. +In most cases, loading the `evdev' kernel module will be sufficient: + +# modprobe evdev + +On Linux it is recommended that actkbd is launched using udev rules. This allows +the administrator to use a different configuration for each keyboard, as long as +udev can tell the devices apart. This method is far more reliable and flexible +than using an init script, as it allows for proper support of hotplug events and +removes the probability of the auto-detection code getting confused and causing +problems. + +In most Linux systems the device nodes to use are named /dev/input/eventX, where +X is a decimal unsigned number, e.g. /dev/input/event0. If the /proc filesystem +is mounted and accessible, actkbd should be able to detect a usable keyboard +device. You should not need to manually specify one, unless there are multiple +keyboards present. + +Update: On newer kernels several special buttons (like the Power switch) may +appear as input devices as well. There is no way for the auto-detection code to +tell them apart and it is quite possible that the actual keyboard will not be +the one actkbd will select. Using udev to start actkbd is the best way to avoid +this problem. + + + +3. Setup + +3.1. Compilation + +A simple call to `make' is normally all you need to compile actkbd: + +$ make + +To change the default location of the configuration file, you have to override +the sysconfdir Makefile variable. You can also override the CFLAGS variable to +provide optimisation flags e.t.c. The DEBUG variable can be used to enable +debugging - if you are using gcc, setting DEBUG to "-g" would probably do. + + +3.2. Installation + +First verify with `make -n install' the installation paths. By default, the +installation prefix is /usr/local and the actkbd daemon binary is installed in +$(prefix)/sbin. A configuration placeholder is placed in $(sysconfdir), which by +default is /etc. You can set the prefix, sbindir and sysconfdir variables to +override these defaults. Then run `make install' as root to perform the actual +installation: + +# make install + +Bear in mind that currently the location of the configuration file must be +explicitly specified (-c) in the actkbd command line options if the default +($(sysconfdir)/actkbd.conf) location is not valid. + + +3.3. Configuration + +The default configuration file resides in $(sysconfdir)/actkbd.conf. It is a +plain-text file with each line being an entry. A proper entry has the following +format: + +::: + +The field is a series of numeric keycodes, separated by the `+' +character. `actkbd -n -s' can be used to find out any keycodes you need, as it +will report all key presses without executing any commands. + +The string field is a comma or whitespace separated list of the +`key' (key press event), `rep' (key repeat event) and `rel' (key release event) +strings. This field indicates which keyboard events this entry corresponds to. +If left empty, it defaults to `key'. + +The field contains an optional comma or whitespace separated list +of attributes. The listed attributes can modify the execution of the supplied +command or change the state of actkbd in order to perform complex actions. The +attribute actions are executed in the listed order. If no attribute has been +specified actkbd falls back on to calling system(). + +The field is the executed command that will be passed to system(). +Note that in order to have non-blocking behaviour, you have to append the `&' +character to the command, so that /bin/sh will execute it in the background. +Also keep in mind that the listed command attributes can affect the way the +command is executed, if at all. Currently system() is the only interpretter +for commands, but in the future there may be command attributes that use the +contents of this field differently, e.g. to set a sound mixer. + +Lines starting with '#' are considered comments. Invalid lines are silently +ignored, unless a high enough verbosity level has been specified. + +Note that when actkbd searches for an entry to execute, only the first matching +entry is used. Therefore always make sure that the entries in the configuration +file are ordered properly. + +A sample actkbd.conf file is included in the actkbd distribution. + + +3.3.1. Supported command attributes + +The supported attributes are: + +* `grab': This grabs the keyboard device to block other applications from + receiving the subsequent events. This allows the user to bind commands + to keys that are not normally usable because they produce symbols that + mess with regular keyboard operation (letters, numbers e.t.c.). + +* `ungrab': This releases a grabbed device, so that other programs may get the + key events. Please note that at least some versions of the X keyboard + driver (and possibly other programs) will interpret a key release event + as a full key press/release sequence even if the press event was never + received (why?). Therefore you may prefer to use the `ungrab' attribute + in release event bindings, rather than keypress ones, to ensure correct + operation. + +WARNING: Using the `grab' attribute without a well thought way to invoke the + `ungrab' command can easily leave your keyboard unusable for all other + applications with no way out. You may want to invoke something like the + following: + + # sleep 120; killall -9 actkbd + + in a different console, while testing you configuration, to be able to + reclaim your keyboard even if the configuration file is not correct. + +* `grabbed': This instructs actkbd to execute the specified command only if the + keyboard has been grabbed. This can be used to allow a key to act as an + extra Function key that adds extra functionality to the other keys. + +* `ungrabbed': This instructs actkbd to execute the specified command only if + the keyboard has not been grabbed. + +NOTE: If none of the `grabbed'/`ungrabbed' attributes has been used, the command + is always executed if the key mask matches. If both are specified then + the command is never executed - obviously the keyboard cannot be grabbed + and ungrabbed at the same time. + +* `noexec': Do not call system() to run an external command. Useful for entries + that only serve configuration purposes. + +* `exec': Use system() to run an external command here and now. Allows specific + ordering of the attribute actions with regard to the system() call. + +NOTE: If none of the `noexec'/`exec' attributes has been specified, or if the + attribute list is empty, an `exec' call is implied at the end of the + list. Always use `noexec' for entries with empty/invalid commands. + +* `ignrel': When changing the internal state of actkbd, ignore release events + for the keys that are currently pressed. This allows more complex key + combinations where the shortcut keys are pressed sequentially, rather + than simultaneously. When the key combination is completed, the `allrel' + and `rcvrel' attributes should be used to clear the key mask and to + resume the proper reception of release events. + +* `allrel': Clear the pressed key mask. It is the equivalent of releasing all + pressed keys, but is not affected by the `ignrel' attribute. + +* `rcvrel': Restore proper reception of key release events. + +* `key(X)': Send a key X press event to the input layer of the system. + +* `rel(X)': Send a key X release event to the input layer of the system. + +* `rep(X)': Send a key X repeat event to the input layer of the system. + +WARNING: Note that the careless use of the key event injection commands can make + your life really adventurous - or just difficult. For example injecting + a `return' key press/release sequence after the `r' key is a way to make + logging on locally as "root" really, really difficult. Of course you may + still be able to login using a user without an "r" in their username and + password and issuing `su', but you'd still need a root password without + an "r" in it... + +WARNING: The `key()', `rel()' and `rep()' attributes, if used without caution, + may cause event loops that can bring the system to its knees. Also, it + seems that continuous event loops can cause actkbd to miss some events, + or even block the event interface, with various dire results. Use with + extreme caution. + +* `set(X)': Manipulate the internal actkbd state, by setting the key X status to + `pressed'. + +* `unset(X)': Manipulate the internal actkbd state, by setting the key X status + to `released'. + +NOTE: `set()' and `unset()' supersede the normal operations associated with the + received events, if they are in conflict. + +NOTE: By using `set()' and `unset()' with key values that are not producable by + your keyboard, but are still valid, you can create complex configuration + schemes by using those key values as status variables. + +NOTE: An empty value for the `key()', `rel()', `rep()', `set()' and `unset()' + attributes instructs actkbd to use the key value that triggered the + current rule. + +* `not': Indicates that the current entry will match when any key except for the + listed ones is received. This attribute can be used along with an empty + field to match all events, regardless of the keycode. + +* `all': Indicates that the current entry will match when all of the listed keys + are pressed, without caring about the state of any other keys. + +* `any': Indicates that the current entry will match when any of the listed keys + is pressed. Not very sure what this can be used for, but it seemed nice + to have :-) + +NOTE: The `not', `all' and `any' attributes are checked in this exact order and + if more than one have been specified, the one with the highest priority + supersedes all others. If none of these attributes has been specified, + then actkbd will require an exact match between the listed keys and the + active key mask in order to execute the entry. + +* `ledon(X)': Switches on the keyboard LED X. + +* `ledoff(X)': Switches off the keyboard LED X. + +NOTE: actkbd does not check which LEDs actually exist on the keyboard, but this + does not cause any problems as invalid LED values are simply ignored. + +NOTE: Setting the LEDs this way is not permanent. Any operation that affects + a LED (e.g. pressing the Caps Lock key) can affect one or even all + LEDs, thus nullifying the operations from actkbd. + +NOTE: You will have to use some other way to find what LED codes your keyboard + supports. On Linux the /proc/bus/input/devices file can supply this + information: the LED= field is a bitwise mask of the present LEDs. For + example, if it's 7 (binary: 111), all first three LEDs are available. + + +3.4. Running + +Run `actkbd --help' to see the various command line options. actkbd is normally +able to auto-detect your keyboard device, therefore you do not need to specify +it. For the most common case - a daemon with the default configuration file in +$(sysconfdir) - the following command should suffice: + +# actkbd -D -q + +Note that sending the HUP signal (kill -HUP) to actkbd will cause it to reload +its configuration file. + + +4. Internals + +The most interesting/messy part of actkbd is the code that keeps track of which +keys are pressed each moment. It uses a bitmask with one bit for each available +key. When press/repeat events are received, the corresponding bit is set and it +becomes unset when a release event is received for that key. To match key events +with the corresponding actions, each valid configuration file entry has its key +field transformed to a bitmask. After that, whenever a new event is received, +the status bitmask is matched against all configuration entry bitmasks and the +first one to match (if any) is used and the corresponding command is executed. + +Please note that the platform specific code is contained in .c (.e.g. +linux.c). This file implements a generic interface to keyboard events, hiding +each system's intricacies from the rest of code. It is also the file that has to +be written/ported to add support for a new platform. + +For any additional details the best documentation is probalby the source code +itself. + + +5. License + +actkbd is released under the GNU General Public License version 2. The full text +of the license can be found in the COPYING file that should be included in the +actkbd distribution. + + +6. Authors + +Original author: + Theodoros V. Kalamatianos diff --git a/PKG/actkbd-0.2.8/TODO b/PKG/actkbd-0.2.8/TODO new file mode 100644 index 0000000000000000000000000000000000000000..7e714bcd3094459e13196294adc4f7e8e203f238 --- /dev/null +++ b/PKG/actkbd-0.2.8/TODO @@ -0,0 +1,80 @@ +1. Items in the ToDo list: + +* Perform some testing on non-IA32 platforms, especially on 64-bit and + big-endian CPUs - some external feedback is welcome. + +* Implement the module subsystem. Modules to control sound mixers e.t.c. could + be built. + UPDATE: The attribute infrastructure introduced in actkbd-0.2.0 is the core + of the module subsystem. Now we are just missing the modules... + +* Support additional platforms. To do this, alternatives to linux.c must be + written and the build system must become smarter (autotools ?). I would + also need maintainers for any platform apart from Linux, since I do not + see myself installing another OS any time soon. + +* Find out if there are any good reasons (security ?) to replace the call + to system(). + +* Add support for symbolic key names in the configuration file. Can we do + do this while still keeping the code relatively portable and without using + huge fixed keymaps ? + +* Create manual pages: actkbd.1, actkbd.conf.5 + +* A scripted (Python?) GUI configuration tool - the configuration file syntax + has become so complicated that it is starting to resemble a full programming + language... + +* Autotools ? + + + +2. Completed + +* Research and update the documentation with information on how to couple actkbd + with the hotplug subsystem, so that multiple keyboards can be supported. Any + takers ? + UPDATE: A sample udev file is now provided. Pretty simple, actually... + +* Find out what happens if the keyboard device suddenly disappears - I have + to find a USB keyboard to test this. Make sure we handle this gracefully - + no a SIGSEGV is NOT graceful. + UPDATE: actkbd acts as it should. Users using hotplugged devices can just + ignore the error message when they remove the keyboard. + + + +3. Features that will probably never be added: + +* Check/Implement support for linux-2.4 kernels. I can't even remember whether + those had a proper event interface... + RATIONALE: If someone still uses a linux-2.4 kernel, well, here's one more + reason to upgrade :-). linux-2.4 will probably not run on my development + system anyway... + +* Multiple keyboard support. + RATIONALE: After careful consideration, it was determined that using a single + daemon to handle multiple, possibly very different, keyboards is not a + very good idea. The one prominent category of people that regularly use + multiple keyboards, namely the laptop owners, will usually need totally + different configuration settings for each keyboard, as the external one + will have many more keys and might be missing others (the WLAN switch + comes to mind). It would be simpler and much more efficient to setup the + hotplug scripts to launch multiple actkbd instances, each with its own + configuration file. + UPDATE: There is now a sample udev rule file that can be adapted for multiple + keyboards. + +* Use select() to handle multiple keyboards, instead of just the first one, + and get a USB keyboard to test it. + RATIONALE: Multiple keyboard support will not be added at all, so... + +* Dynamically attach to new keyboards - the select() infrastrusture is a + prerequisite for this - can we do this without periodically reading the + /proc/bus/input/devices file ? Perhaps, with some help from hotplug... + RATIONALE: Multiple keyboard support will not be added at all, so... + +* Per-keyboard configuration - this may never be implemented since it would + complicate the code. Perhaps a hotplug script could handle this better. + RATIONALE: Multiple keyboard support will not be added at all, so... diff --git a/PKG/actkbd-0.2.8/actkbd b/PKG/actkbd-0.2.8/actkbd new file mode 100644 index 0000000000000000000000000000000000000000..98524dd3bc4716d3d29c7a04f70ea1f7fddc2873 Binary files /dev/null and b/PKG/actkbd-0.2.8/actkbd differ diff --git a/PKG/actkbd-0.2.8/actkbd.c b/PKG/actkbd-0.2.8/actkbd.c new file mode 100644 index 0000000000000000000000000000000000000000..0d71eaa01877e7a5c177c6a5011876194c9bbe2f --- /dev/null +++ b/PKG/actkbd-0.2.8/actkbd.c @@ -0,0 +1,453 @@ +/* + * actkbd - A keyboard shortcut daemon + * + * Copyright (c) 2005-2006 Theodoros V. Kalamatianos + * + * 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. + */ + +#include "actkbd.h" + + +/* Verbosity level */ +int verbose = 0; + +/* Daemon mode */ +int detach = 0; + +/* Console message suppression */ +int quiet = 0; + +/* Syslog logging */ +int uselog = 0; + +/* Maximum number of keys */ +int maxkey = 0; + +/* Device grab state */ +int grabbed = 0; + +/* Ignore release events */ +int ignrel = 0; + +/* Keyboard device name */ +char *device = NULL; + +/* Configuration file name */ +char *config = NULL; + +/* PID file name */ +char *pidfile = NULL; + + +static int usage() { + lprintf( + "actkbd Version %s\n" + "Usage: actkbd [options]\n" + " Options are as follows:\n" + " -c, --config Specify the configuration file to use\n" + " -D, --daemon Launch in daemon mode\n" + " -d, --device Specify the device to use\n" + " -h, --help Show this help text\n" + " -n, --noexec Do not execute any commands\n" + " -p, --pidfile Use a file to store the PID\n" + " -q, --quiet Suppress all console messages\n" + " -v[level]\n" + " --verbose=[level] Specify the verbosity level (0-9)\n" + " -V, --version Show version information\n" + " -x, --showexec Report executed commands\n" + " -s, --showkey Report key presses\n" + " -l, --syslog Use the syslog facilities for logging\n" + , VERSION); + + return OK; +} + + +/* Allow SIGHUP to cause reconfiguration */ +void on_hup(int signum) { + int ret; + + if ((verbose > 0) || detach) + lprintf("Reconfiguration requested\n"); + + if (verbose > 1) + lprintf("Discarding old configuration\n"); + + close_config(); + free_key_mask(); + free_ign_mask(); + + if (verbose > 1) + lprintf("Reading new configuration\n"); + + if ((ret = open_config()) != OK) + exit(ret); + if ((ret = init_key_mask()) != OK) + exit(ret); + if ((ret = init_ign_mask()) != OK) + exit(ret); + + if (verbose > 1) + lprintf("Reconfiguration complete\n"); + + return; +} + + +/* Allow SIGTERM to cause graceful termination */ +void on_term(int signum) { + close_config(); + close_dev(); + free_key_mask(); + free_ign_mask(); + + if (detach) + lprintf("actkbd %s terminating for %s\n", VERSION, device); + + closelog(); + + if (pidfile != NULL) + unlink(pidfile); + + exit(OK); + + return; +} + + +/* PID file creation */ +static int write_pid() { + FILE *fp; + + fp = fopen(pidfile, "w"); + if (fp == NULL) { + lprintf("Error: could not write the PID file %s: %s\n", pidfile, strerror(errno)); + return PIDERR; + } + + fprintf(fp, "%i\n", getpid()); + + if (verbose > 2) + lprintf("Wrote PID file %s\n", pidfile); + + fclose(fp); + + return OK; +} + + +/* External command execution */ +static int ext_exec(char *cmd, int noexec, int showexec) { + if ((verbose > 0) || showexec) + lprintf("Executing: %s\n", cmd); + if (!noexec) + return system(cmd); + + return 0; +} + + +int main(int argc, char **argv) { + int ret, key, type; + key_cmd *cmd; + + /* Options */ + int help = 0, noexec = 0, version = 0, showexec = 0, showkey = 0; + + struct option options[] = { + { "config", required_argument, 0, 'c' }, + { "daemon", no_argument, 0, 'D' }, + { "device", required_argument, 0, 'd' }, + { "help", no_argument, 0, 'h' }, + { "noexec", no_argument, 0, 'n' }, + { "pidfile", required_argument, 0, 'p' }, + { "quiet", no_argument, 0, 'q' }, + { "verbose", optional_argument, 0, 'v' }, + { "version", no_argument, 0, 'V' }, + { "showexec", no_argument, 0, 'x' }, + { "showkey", no_argument, 0, 's' }, + { "syslog", no_argument, 0, 'l' }, + { 0, 0, 0, 0 } + }; + + while (1) { + int c, option_index = 0; + + c = getopt_long (argc, argv, "c:Dd:hp:qnv::Vxsl", options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'c': + if (optarg) { + config = strdup(optarg); + } else { + usage(); + return USAGE; + } + break; + case 'D': + detach = 1; + break; + case 'd': + if (optarg) { + device = strdup(optarg); + } else { + usage(); + return USAGE; + } + break; + case 'h': + help = 1; + break; + case 'n': + noexec = 1; + break; + case 'p': + if (optarg) { + pidfile = strdup(optarg); + } else { + usage(); + return USAGE; + } + break; + case 'q': + quiet = 1; + break; + case 'v': + if (optarg) { + verbose = optarg[0] - '0'; + if ((verbose < 0) || (verbose > 9)) { + usage(); + return USAGE; + } + } else { + verbose = 1; + } + break; + case 'V': + version = 1; + break; + case 'x': + showexec = 1; + break; + case 's': + showkey = 1; + break; + case 'l': + uselog = 1; + break; + default: + usage(); + return USAGE; + } + } + + if (help) + return usage(); + if (version) { + lprintf( + "actkbd Version %s\n\n" + "Copyright (c) 2005-2006 Theodoros V. Kalamatianos \n\n" + "This program is free software; you can redistribute it and/or modify it\n" + "under the terms of the GNU General Public License version 2 as published by\n" + "the Free Software Foundation.\n\n" + "This program is distributed in the hope that it will be useful, but WITHOUT\n" + "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" + "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" + , VERSION); + return OK; + } + if (quiet && !detach) { + fclose(stdin); + fclose(stdout); + fclose(stderr); + } + + /* Open the syslog facility */ + if (uselog) { + openlog("actkbd", LOG_PID, LOG_DAEMON); + uselog = 2; + } + + /* Initialise the keyboard */ + if ((ret = init_dev()) != OK) + return ret; + + /* Process the configuration file */ + if ((ret = open_config()) != OK) + return ret; + + if ((ret = init_key_mask()) != OK) + return ret; + + if ((ret = init_ign_mask()) != OK) + return ret; + + if ((ret = open_dev()) != OK) + return ret; + + /* Verbosity levels over 2 make showkey redundant */ + if (verbose > 2) + showkey = 0; + + if (detach) { + switch (daemon(0, 0)) + { + case 0: + break; + default: + lprintf("%s: fork() error: %s\n", argv[0], strerror(errno)); + return FORKERR; + } + lprintf("actkbd %s launched for %s\n", VERSION, device); + } + + if (pidfile != NULL) + if ((ret = write_pid()) != OK) + return ret; + + /* Setup the signal handlers */ + signal(SIGHUP, on_hup); + signal(SIGTERM, on_term); + + while (get_key(&key, &type) == OK) { + int tmp, exec_ok = 0, norel = 0; + + if ((type & (KEY | REP)) != 0) + set_key_bit(key, 1); + + if (verbose > 2) { + lprintf("Event: "); + lprint_key_mask(); + lprintf(":%s\n", (type == KEY)?"key":((type == REP)?"rep":"rel")); + } + if ((type == KEY) && showkey) { + lprintf("Keys: "); + lprint_key_mask(); + lprintf("\n"); + } + + ret = match_key(type, &cmd); + if (ret == OK) { + attr_t *attr; + + /* Attribute implementation */ + attr = cmd->attrs; + while (attr != NULL) { + char *str, opt[32] = { '\0' }; + int out_type = INVALID; + switch (attr->type) { + case ATTR_EXEC: + str = "exec"; + ext_exec(cmd->command, noexec, showexec); + exec_ok = 1; + break; + case ATTR_GRAB: + str = "grab"; + grab_dev(); + break; + case ATTR_UNGRAB: + str = "ungrab"; + ungrab_dev(); + break; + case ATTR_IGNREL: + str = "ignrel"; + copy_key_to_ign_mask(); + ignrel = 1; + break; + case ATTR_RCVREL: + str = "rcvrel"; + ignrel = 0; + break; + case ATTR_ALLREL: + str = "allrel"; + clear_key_mask(); + break; + case ATTR_KEY: + str = "key"; + out_type = KEY; + break; + case ATTR_REL: + str = "rel"; + out_type = REL; + break; + case ATTR_REP: + str = "rep"; + out_type = REP; + break; + case ATTR_SET: + str = "set"; + tmp = (int)(attr->opt); + if (tmp < 0) + tmp = key; + if (tmp == key) + norel = 1; + snprintf(opt, 32, "%i", tmp); + set_key_bit(tmp, 1); + break; + case ATTR_UNSET: + str = "unset"; + tmp = (((int)(attr->opt)) >= 0)?(int)(attr->opt):key; + snprintf(opt, 32, "%i", tmp); + set_key_bit(tmp, 0); + break; + case ATTR_LEDON: + str = "ledon"; + snprintf(opt, 32, "%i", (int)(attr->opt)); + set_led((int)(attr->opt), 1); + break; + case ATTR_LEDOFF: + str = "ledoff"; + snprintf(opt, 32, "%i", (int)(attr->opt)); + set_led((int)(attr->opt), 0); + break; + default: + str = "unknown"; + break; + } + + if (out_type != INVALID) { + tmp = (((int)(attr->opt)) >= 0)?(int)(attr->opt):key; + snprintf(opt, 32, "%i", tmp); + snd_key(tmp, out_type); + } + + if ((verbose > 0) || showexec) + lprintf("Attribute: %s(%s)\n", str, opt); + + attr = attr->next; + } + + /* Fall back on command execution */ + if ((!exec_ok) && ((cmd->attr_bits & BIT_ATTR_NOEXEC) == 0)) { + ext_exec(cmd->command, noexec, showexec); + exec_ok = 1; + } + } + + if ((type == REL) && (!norel) && ((!ignrel) || (get_ign_bit(key) == 0))) + set_key_bit(key, 0); + } + + return OK; +} + + +/* Logging function */ +int lprintf(const char *fmt, ...) { + va_list args; + int ret = 0; + + va_start(args, fmt); + if (!quiet) + ret = vfprintf(stderr, fmt, args); + if (uselog == 2) + vsyslog(LOG_NOTICE, fmt, args); + va_end(args); + + return ret; +} diff --git a/PKG/actkbd-0.2.8/actkbd.h b/PKG/actkbd-0.2.8/actkbd.h new file mode 100644 index 0000000000000000000000000000000000000000..835ca590327c4758d25bfc4d13769c164a0dffa7 --- /dev/null +++ b/PKG/actkbd-0.2.8/actkbd.h @@ -0,0 +1,169 @@ +/* + * actkbd - A keyboard shortcut daemon + * + * Copyright (c) 2005-2006 Theodoros V. Kalamatianos + * + * 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. + */ + +#ifndef _ACTKBD_H_ +#define _ACTKBD_H_ + +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define UNUSED 0 + + +/* Event types */ +#define INVALID 0 +#define KEY (1<<0) +#define REP (1<<1) +#define REL (1<<2) + + +/* Return values */ +enum { OK, USAGE, MEMERR, HOSTFAIL, DEVFAIL, READERR, WRITEERR, EVERR, CONFERR, + FORKERR, INTERR, PIDERR, NOMATCH }; + + +/* Verbosity level */ +extern int verbose; + +/* Maximum number of keys */ +extern int maxkey; + +/* Device grab state */ +extern int grabbed; + +/* The device name */ +extern char *device; + +/* The configuration file name */ +extern char *config; + + +/* Logging function */ +int lprintf(const char *fmt, ...); + +/* Device initialisation */ +int init_dev(); + +/* Device open function */ +int open_dev(); + +/* Device close function */ +int close_dev(); + +/* Device grab function */ +int grab_dev(); + +/* Device un-grab function */ +int ungrab_dev(); + +/* Keyboard event receiver function */ +int get_key(int *key, int *type); + +/* Send an event to the input layer */ +int snd_key(int key, int type); + +/* Set a keyboard LED */ +int set_led(int led, int on); + + +/* Key mask handling */ +int get_masksize(); +int init_mask(unsigned char **mask); +void free_mask(unsigned char **mask); +int lprint_mask(unsigned char *mask); +int strmask(unsigned char **mask, char *keys); + +/* The active key mask */ +int init_key_mask(); +void free_key_mask(); +void clear_key_mask(); +int set_key_bit(int bit, int val); +int get_key_bit(int bit); +int cmp_key_mask(unsigned char *mask0, unsigned int attr); +int lprint_key_mask_delim(char c); +int lprint_key_mask(); +unsigned char *get_key_mask(); + +/* The ignored key mask */ +int init_ign_mask(); +void free_ign_mask(); +void clear_ign_mask(); +int set_ign_bit(int bit, int val); +int get_ign_bit(int bit); +int cmp_ign_mask(unsigned char *mask0, unsigned int attr); +int lprint_ign_mask_delim(char c); +int lprint_ign_mask(); +unsigned char *get_ign_mask(); +void copy_key_to_ign_mask(); + + +/* The attribute node struct */ +typedef struct _attr_t attr_t; +struct _attr_t { + int type; /* Attribute type */ + void *opt; /* Options for this attribute */ + attr_t *next; /* The next node */ +}; + +/* Supported attributes */ +#define ATTR_EXEC 0 +#define ATTR_GRAB 1 +#define ATTR_UNGRAB 2 +#define ATTR_IGNREL 3 +#define ATTR_RCVREL 4 +#define ATTR_ALLREL 5 +#define ATTR_KEY 6 +#define ATTR_REL 7 +#define ATTR_REP 8 +#define ATTR_LEDON 9 +#define ATTR_LEDOFF 10 +#define ATTR_SET 11 +#define ATTR_UNSET 12 + + +/* The key_cmd struct */ +typedef struct { + unsigned char *keys; /* The key mask */ + int type; /* The event type */ + char *command; /* The command to execute */ + + unsigned int attr_bits; /* Bitwise attributes */ + + attr_t *attrs; /* The attribute list */ +} key_cmd; + +/* The bitwise attribute values */ +#define BIT_ATTR_NOEXEC (1<<0) /* Do not call system() */ +#define BIT_ATTR_GRABBED (1<<1) /* Match only when the device is grabbed */ +#define BIT_ATTR_UNGRABBED (1<<2) /* Match only when the device is not grabbed */ +#define BIT_ATTR_NOT (1<<3) /* Match any key except for the specified ones */ +#define BIT_ATTR_ALL (1<<4) /* Match if all of the specified keys is pressed */ +#define BIT_ATTR_ANY (1<<5) /* Match if any of the specified keys is pressed */ + + +/* Configuration file processing */ +int open_config(); +int close_config(); +int match_key(int type, key_cmd **command); + + +#endif /* _ACTKBD_H_ */ diff --git a/PKG/actkbd-0.2.8/actkbd.o b/PKG/actkbd-0.2.8/actkbd.o new file mode 100644 index 0000000000000000000000000000000000000000..13e35c2788a54da764fcc598cec6fc95c83e8ae7 Binary files /dev/null and b/PKG/actkbd-0.2.8/actkbd.o differ diff --git a/PKG/actkbd-0.2.8/config.c b/PKG/actkbd-0.2.8/config.c new file mode 100644 index 0000000000000000000000000000000000000000..f764baba59bdef65355479a43f6380190d3e3207 --- /dev/null +++ b/PKG/actkbd-0.2.8/config.c @@ -0,0 +1,481 @@ +/* + * actkbd - A keyboard shortcut daemon + * + * Copyright (c) 2005-2006 Theodoros V. Kalamatianos + * + * 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. + */ + +#include "actkbd.h" + + +#ifndef CONFIG +#define CONFIG "/etc/actkbd.conf" +#endif + + +static int strtolower(char *str) { + int i, l; + + if (str == NULL) + return INTERR; + + l = strlen(str); + for (i = 0; i < l; ++i) + str[i] = tolower(str[i]); + + return OK; +} + + +static int proc_config(int lineno, char *line, key_cmd **cmd) { + int i, l, f = 1, etype = INVALID, ret = CONFERR; + char *event = NULL, *attrs = NULL, *command = NULL; + char *dup = NULL, *err = NULL, *tmp = NULL; + unsigned char *keys; + unsigned int attr_bits = 0; + attr_t *attrlst = NULL, *attr = NULL, *attr_last = NULL; + + l = strlen(line); + for (i = 0; i <= l; ++i) { + if (((line[i] == '#') || (line[i] == '\n') || (line[i] == '\0')) && (f < 4)) { + err = "missing fields"; + goto ERROR; + } + if ((line[i] == ':') && (f < 4)) { + switch (f) { + case 1: + event = line + i + 1; + break; + case 2: + attrs = line + i + 1; + break; + case 3: + command = line + i + 1; + break; + } + ++f; + } + } + + /* Keep a copy of the line */ + dup = strdup(line); + if (dup == NULL) { + lprintf("Error: memory allocation failed\n"); + ret = MEMERR; + goto ERROR; + } + + /* Set the field boundaries */ + *(event - 1) = '\0'; + *(attrs - 1) = '\0'; + *(command - 1) = '\0'; + if (line[l - 1] == '\n') + line[l - 1] = '\0'; + + /* Set the event type */ + strtolower(event); + while ((tmp = strsep(&event, ", \t")) != NULL) { + if (strlen(tmp) == 0) + continue; + + if (strcmp(tmp, "key") == 0) { + etype |= KEY; + } else if (strcmp(tmp, "rep") == 0) { + etype |= REP; + } else if (strcmp(tmp, "rel") == 0) { + etype |= REL; + } else { + err = "invalid event type"; + goto ERROR; + } + } + + /* If no event type was specified, fall back to `key' */ + if (etype == INVALID) + etype = KEY; + + /* The keys are always at the beginning of the line */ + if (strmask(&keys, line) != OK) { + err = "invalid field"; + goto ERROR; + } + + /* Set the attribute list */ + strtolower(attrs); + while ((tmp = strsep(&attrs, ", \t")) != NULL) { + int type = -1; + void *opt = NULL; + char *num = NULL; + + if (strlen(tmp) == 0) + continue; + + if (strcmp(tmp, "noexec") == 0) { + attr_bits |= BIT_ATTR_NOEXEC; + } else if (strcmp(tmp, "grabbed") == 0) { + attr_bits |= BIT_ATTR_GRABBED; + } else if (strcmp(tmp, "ungrabbed") == 0) { + attr_bits |= BIT_ATTR_UNGRABBED; + } else if (strcmp(tmp, "not") == 0) { + attr_bits |= BIT_ATTR_NOT; + } else if (strcmp(tmp, "all") == 0) { + attr_bits |= BIT_ATTR_ALL; + } else if (strcmp(tmp, "any") == 0) { + attr_bits |= BIT_ATTR_ANY; + } else if (strcmp(tmp, "exec") == 0) { + type = ATTR_EXEC; + } else if (strcmp(tmp, "grab") == 0) { + type = ATTR_GRAB; + } else if (strcmp(tmp, "ungrab") == 0) { + type = ATTR_UNGRAB; + } else if (strcmp(tmp, "ignrel") == 0) { + type = ATTR_IGNREL; + } else if (strcmp(tmp, "rcvrel") == 0) { + type = ATTR_RCVREL; + } else if (strcmp(tmp, "allrel") == 0) { + type = ATTR_ALLREL; + } else if (strncmp(tmp, "key(", 4) == 0) { + type = ATTR_KEY; + tmp += 4; + num = (void *)1; + } else if (strncmp(tmp, "rel(", 4) == 0) { + type = ATTR_REL; + tmp += 4; + num = (void *)1; + } else if (strncmp(tmp, "rep(", 4) == 0) { + type = ATTR_REP; + tmp += 4; + num = (void *)1; + } else if (strncmp(tmp, "set(", 4) == 0) { + type = ATTR_SET; + tmp += 4; + num = (void *)1; + } else if (strncmp(tmp, "unset(", 6) == 0) { + type = ATTR_UNSET; + tmp += 6; + num = (void *)1; + } else if (strncmp(tmp, "ledon(", 6) == 0) { + type = ATTR_LEDON; + tmp += 6; + num = (void *)1; + } else if (strncmp(tmp, "ledoff(", 7) == 0) { + type = ATTR_LEDOFF; + tmp += 7; + num = (void *)1; + } else { + lprintf("Warning: unknown attribute %s\n", tmp); + } + + if (num == (void *)1) { + num = strsep(&tmp, "()"); + + errno = 0; + if (strlen(num) > 0) { + opt = (void *)((int)strtol(num, (char **)NULL, 10)); + } else { + opt = (void *)((int)(-1)); + } + + if (((int)opt < 0) && + ((type == ATTR_LEDON) || (type == ATTR_LEDOFF))) + errno = EINVAL; + + if (errno != 0) { + err = "invalid attribute argument"; + goto ERROR; + } + } + + if (type != -1) { + attr = (attr_t *)(malloc(sizeof(attr_t))); + if (attr == NULL) { + lprintf("Error: memory allocation failed\n"); + ret = MEMERR; + goto ERROR; + } + + attr->type = type; + attr->opt = opt; + attr->next = NULL; + + if (attrlst == NULL) { + attrlst = attr; + attr_last = attr; + } else { + attr_last->next = attr; + attr_last = attr; + } + } + } + + *cmd = (key_cmd *)(malloc(sizeof(key_cmd))); + if (*cmd == NULL) { + lprintf("Error: memory allocation failed\n"); + ret = MEMERR; + goto ERROR; + } else { + (*cmd)->keys = keys; + (*cmd)->type = etype; + (*cmd)->command = strdup(command); + (*cmd)->attr_bits = attr_bits; + (*cmd)->attrs = attrlst; + } + + /* Destroy the line copy */ + free(dup); + + return OK; + + /* Error handler */ +ERROR: + if ((verbose > 1) && (err != NULL)) + lprintf("Warning: %s in configuration line %i\n", err, lineno); + if (verbose > 0) + lprintf("Warning: discarding configuration line %i:\n\t%s%c", lineno, + (dup != NULL)?dup:line, + (((dup != NULL)?dup:line)[l - 1] == '\n')?'\0':'\n'); + + *cmd = NULL; + + /* Free the attribute list */ + while (attrlst != NULL) { + attr = attrlst; + attrlst = attrlst->next; + free(attr); + } + + if (dup != NULL) + free(dup); + + return ret; +} + + +typedef struct _confentry { + key_cmd *cmd; + struct _confentry *next; +} confentry; + + +static confentry *list = NULL; + + +static void print_etype(int type) { + char *sep = ""; + + if ((type & KEY) > 0) { + lprintf("%skey", sep); + sep = ","; + } + if ((type & REP) > 0) { + lprintf("%srep", sep); + sep = ","; + } + if ((type & REL) > 0) { + lprintf("%srel", sep); + sep = ","; + } +} + + +static void print_attrs(key_cmd *cmd) { + attr_t *attr; + char *sep = ""; + + if (cmd == NULL) + return; + + if ((cmd->attr_bits & BIT_ATTR_NOEXEC) > 0) { + lprintf("%snoexec", sep); + sep = ","; + } + if ((cmd->attr_bits & BIT_ATTR_GRABBED) > 0) { + lprintf("%sgrabbed", sep); + sep = ","; + } + if ((cmd->attr_bits & BIT_ATTR_UNGRABBED) > 0) { + lprintf("%sungrabbed", sep); + sep = ","; + } + if ((cmd->attr_bits & BIT_ATTR_NOT) > 0) { + lprintf("%snot", sep); + sep = ","; + } + if ((cmd->attr_bits & BIT_ATTR_ALL) > 0) { + lprintf("%sall", sep); + sep = ","; + } + if ((cmd->attr_bits & BIT_ATTR_ANY) > 0) { + lprintf("%sany", sep); + sep = ","; + } + + attr = cmd->attrs; + while (attr != NULL) { + char *str = ""; + char opt[32] = { '\0' }; + switch (attr->type) { + case ATTR_EXEC: + str = "exec"; + break; + case ATTR_GRAB: + str = "grab"; + break; + case ATTR_UNGRAB: + str = "ungrab"; + break; + case ATTR_IGNREL: + str = "ignrel"; + break; + case ATTR_RCVREL: + str = "rcvrel"; + break; + case ATTR_ALLREL: + str = "allrel"; + break; + case ATTR_KEY: + snprintf(opt, 32, "key(%i)", (int)(attr->opt)); + break; + case ATTR_REL: + snprintf(opt, 32, "rel(%i)", (int)(attr->opt)); + break; + case ATTR_REP: + snprintf(opt, 32, "rep(%i)", (int)(attr->opt)); + break; + case ATTR_SET: + snprintf(opt, 32, "set(%i)", (int)(attr->opt)); + break; + case ATTR_UNSET: + snprintf(opt, 32, "unset(%i)", (int)(attr->opt)); + break; + case ATTR_LEDON: + snprintf(opt, 32, "ledon(%i)", (int)(attr->opt)); + break; + case ATTR_LEDOFF: + snprintf(opt, 32, "ledoff(%i)", (int)(attr->opt)); + break; + default: + str = "unknown"; + break; + } + lprintf("%s%s%s", sep, str, opt); + attr = attr->next; + sep = ","; + } +} + + +int open_config() { + FILE *fp = NULL; + char *line; + key_cmd *cmd; + confentry *lastnode = NULL, *newnode = NULL; + int lineno = 1, ret = 0; + size_t n = 0; + + /* Allow the configuration file to be overridden */ + if (!config) + config = CONFIG; + + fp = fopen(config, "r"); + if (fp == NULL) { + lprintf("Warning: could not open the configuration file %s: %s\n", config, strerror(errno)); + return OK; + } + if (verbose > 1) + lprintf("Using configuration file %s\n", config); + + while (!feof(fp) && (ret >=0)) { + line = NULL; + ret = getline(&line, &n, fp); + if ((ret > 0) && (proc_config(lineno, line, &cmd) == OK)) { + newnode = (confentry *)(malloc(sizeof(confentry))); + if (newnode == NULL) { + lprintf("Error: memory allocation failed\n"); + close_config(); + free(line); + return MEMERR; + } + + newnode->cmd = cmd; + newnode->next = NULL; + + if (list == NULL) { + list = newnode; + } else { + lastnode->next = newnode; + } + lastnode = newnode; + + if (verbose > 1) { + lprintf("Config: "); + lprint_mask(cmd->keys); + lprintf(" -:- "); + print_etype(cmd->type); + lprintf(" -:- "); + print_attrs(cmd); + lprintf(" -:- %s\n", cmd->command); + } + } + free(line); + ++lineno; + } + + fclose(fp); + + return OK; +} + + +int close_config() { + confentry *node = list; + void *tmp; + attr_t *attr; + + while (node != NULL) { + free_mask(&(node->cmd->keys)); + free(node->cmd->command); + + /* Free the attribute list */ + attr = node->cmd->attrs; + while (attr != NULL) { + tmp = attr; + attr = attr->next; + free(tmp); + } + + free(node->cmd); + tmp = node->next; + free(node); + node = tmp; + } + list = NULL; + + return OK; +} + + +int match_key(int type, key_cmd **command) { + confentry *node = list; + + *command = NULL; + + while (node != NULL) { + if (((node->cmd->type & type) == 0) || + (((node->cmd->attr_bits & BIT_ATTR_GRABBED) > 0) && (!grabbed)) || + (((node->cmd->attr_bits & BIT_ATTR_UNGRABBED) > 0) && (grabbed))) { + node = node->next; + continue; + } + if (cmp_key_mask(node->cmd->keys, node->cmd->attr_bits)) { + *command = node->cmd; + return OK; + } + node = node->next; + } + + return NOMATCH; +} diff --git a/PKG/actkbd-0.2.8/config.o b/PKG/actkbd-0.2.8/config.o new file mode 100644 index 0000000000000000000000000000000000000000..2a3ad46b2aa27cee094b577cb2b2722686aeb8f9 Binary files /dev/null and b/PKG/actkbd-0.2.8/config.o differ diff --git a/PKG/actkbd-0.2.8/linux.c b/PKG/actkbd-0.2.8/linux.c new file mode 100644 index 0000000000000000000000000000000000000000..51e3529f687f930b5a42b47dc44a7bd2f79300b8 --- /dev/null +++ b/PKG/actkbd-0.2.8/linux.c @@ -0,0 +1,234 @@ +/* + * actkbd - A keyboard shortcut daemon + * + * Copyright (c) 2005-2006 Theodoros V. Kalamatianos + * + * 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. + */ + +#include "actkbd.h" + +#include +#include + +#include + +#define PROCFS "/proc/" +#define HANDLERS "bus/input/handlers" +#define DEVICES "bus/input/devices" +#define DEVNODE "/dev/input/event" + + +/* The device node */ +static char devnode[32]; + +/* The device file pointer */ +static FILE *dev; + + +int init_dev() { + FILE *fp = NULL; + int ret; + unsigned int u0, u1; + regex_t preg; + regmatch_t pmatch[4]; + + maxkey = KEY_MAX; + + fp = fopen(PROCFS HANDLERS, "r"); + if (fp == NULL) { + lprintf("Error: could not open " PROCFS HANDLERS ": %s\n", strerror(errno)); + return HOSTFAIL; + } + do { + ret = fscanf(fp, "N: Number=%u Name=evdev Minor=%u", &u0, &u1); + fscanf(fp, "%*s\n"); + } while ((!feof(fp)) && (ret < 2)); + if (ret < 2) { + lprintf("Error: event interface not available\n"); + return HOSTFAIL; + } + if (verbose > 1) + lprintf("Event interface present (handler %u)\n", u0); + fclose(fp); + + /* Skip auto-detection when the device has been specified */ + if (device) + return OK; + + fp = fopen(PROCFS DEVICES, "r"); + if (fp == NULL) { + lprintf("Error: could not open " PROCFS DEVICES ": %s\n", strerror(errno)); + return HOSTFAIL; + } + + /* Compile the regular expression and scan for it */ + ret = -1; + regcomp(&preg, "^H: Handlers=(.* )?kbd (.* )?event([0-9]+)", REG_EXTENDED); + do { + char l[128] = ""; + void *str = fgets(l, 128, fp); + if (str == NULL) + break; + ret = regexec(&preg, l, 4, pmatch, 0); + if (ret == 0) { + l[pmatch[3].rm_eo] = '\0'; + ret = sscanf(l + pmatch[3].rm_so, "%u", &u0); + } else { + ret = -1; + } + } while ((!feof(fp)) && (ret < 1)); + regfree(&preg); + + if (ret < 1) { + lprintf("Error: could not detect a usable keyboard device\n"); + return HOSTFAIL; + } + if (verbose > 1) + lprintf("Detected a usable keyboard device (event%u)\n", u0); + + fclose(fp); + sprintf(devnode, DEVNODE "%u", u0); + device = devnode; + + return OK; +} + + +int open_dev() { + dev = fopen(device, "a+"); + if (dev == NULL) { + lprintf("Error: could not open %s: %s\n", device, strerror(errno)); + return DEVFAIL; + } + return OK; +} + + +int close_dev() { + fclose(dev); + return OK; +} + + +int grab_dev() { + int ret; + + if (grabbed) + return 0; + + ret = ioctl(fileno(dev), EVIOCGRAB, (void *)1); + if (ret == 0) + grabbed = 1; + else + lprintf("Error: could not grab %s: %s\n", device, strerror(errno)); + + return ret; +} + + +int ungrab_dev() { + int ret; + + if (!grabbed) + return 0; + + ret = ioctl(fileno(dev), EVIOCGRAB, (void *)0); + if (ret == 0) + grabbed = 0; + else + lprintf("Error: could not ungrab %s: %s\n", device, strerror(errno)); + + return ret; +} + + +int get_key(int *key, int *type) { + struct input_event ev; + int ret; + + do { + ret = fread(&ev, sizeof(ev), 1, dev); + if (ret < 1) { + lprintf("Error: failed to read event from %s: %s", device, strerror(errno)); + return READERR; + } + } while (ev.type != EV_KEY); + + *key = ev.code; + + switch (ev.value) { + case 0: + *type = REL; + break; + case 1: + *type = KEY; + break; + case 2: + *type = REP; + break; + default: + *type = INVALID; + } + + if (*key > KEY_MAX) + *type = INVALID; + + if (*type == INVALID) { + lprintf("Error: invalid event read from %s: code = %u, value = %u", device, ev.code, ev.value); + return EVERR; + } + + return OK; +} + + +int snd_key(int key, int type) { + struct input_event ev; + int ret; + + ev.type = EV_KEY; + ev.code = key; + + switch (type) { + case KEY: + ev.value = 1; + break; + case REL: + ev.value = 0; + break; + case REP: + ev.value = 2; + break; + default: + return EINVAL; + } + + ret = fwrite(&ev, sizeof(ev), 1, dev); + if (ret < 1) { + lprintf("Error: failed to send event to %s: %s", device, strerror(errno)); + return WRITEERR; + } + + return OK; +} + + +int set_led(int led, int on) { + struct input_event ev; + int ret; + + ev.type = EV_LED; + ev.code = led; + ev.value = (on > 0); + + ret = fwrite(&ev, sizeof(ev), 1, dev); + if (ret < 1) { + lprintf("Error: failed to set LED at %s: %s", device, strerror(errno)); + return WRITEERR; + } + + return OK; +} diff --git a/PKG/actkbd-0.2.8/linux.o b/PKG/actkbd-0.2.8/linux.o new file mode 100644 index 0000000000000000000000000000000000000000..e0d3c1504629c23c8a1de208e90c39e6ae0402a6 Binary files /dev/null and b/PKG/actkbd-0.2.8/linux.o differ diff --git a/PKG/actkbd-0.2.8/mask.c b/PKG/actkbd-0.2.8/mask.c new file mode 100644 index 0000000000000000000000000000000000000000..e81801db17a5bdabacc5ef17c2feee2a513f9ea8 --- /dev/null +++ b/PKG/actkbd-0.2.8/mask.c @@ -0,0 +1,268 @@ +/* + * actkbd - A keyboard shortcut daemon + * + * Copyright (c) 2005-2006 Theodoros V. Kalamatianos + * + * 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. + */ + +#include "actkbd.h" + + +/* Active key mask */ +static unsigned char *mask = NULL; + +/* Ignored key mask */ +static unsigned char *ignmask = NULL; + +/* Key mask size */ +static int masksize = 0; + + +int get_masksize() { + return masksize; +} + + +/* Mask initialisation */ +int init_mask(unsigned char **mask) { + /* Calculate the key mask size */ + masksize = (maxkey + 1) / 8; + if (((maxkey + 1) % 8) > 0) + ++masksize; + + /* Allocate the key mask space */ + *mask = (unsigned char *)(malloc(masksize)); + + memset(*mask, 0, masksize); + + return OK; +} + + +/* Mask deallocation */ +void free_mask(unsigned char **mask) { + free(*mask); + *mask = NULL; +} + +/* Mask zeroing */ +static void clear_mask(unsigned char **mask) { + memset(*mask, 0, masksize); +} + + +/* Mask comparison */ +static int cmp_mask(unsigned char *mask0, unsigned char* mask1, unsigned int attr) { + int i; + + /* Require that at least one mask0 bit is not set in mask1 */ + if ((attr & BIT_ATTR_NOT) != 0) { + for (i = 0; i < masksize; ++i) + if ((mask0[i] & ~mask1[i]) != 0) + return 1; + return 0; + } + + /* Require that all mask1 bits are present in mask0 */ + if ((attr & BIT_ATTR_ALL) != 0) { + for (i = 0; i < masksize; ++i) + if ((mask0[i] & mask1[i]) != mask1[i]) + return 0; + return 1; + } + + /* True if any mask1 bits are present in mask0 */ + if ((attr & BIT_ATTR_ANY) != 0) { + for (i = 0; i < masksize; ++i) + if ((mask0[i] & mask1[i]) != 0) + return 1; + return 0; + } + + /* Require an exact match */ + return (memcmp(mask0, mask1, masksize) == 0); +} + + +/* Set a bit */ +static int set_bit(unsigned char *mask, int bit, int val) { + unsigned char byte = 1; + + if ((bit < 0) || (bit > maxkey) || (val < 0) || (val > 1)) { + if (verbose > 1) + lprintf("Error: invalid set_bit arguments %i, %i\n", bit, val); + return INTERR; + } + + byte = byte << (bit % 8); + + if (val == 0) + mask[bit / 8] = mask[bit / 8] & (~byte); + else + mask[bit / 8] = mask[bit / 8] | byte; + + return OK; +} + +/* Get a bit */ +static int get_bit(unsigned char *mask, int bit) { + unsigned char byte = 1; + + if ((bit < 0) || (bit > maxkey)) { + lprintf("Error: invalid get_bit argument %i\n", bit); + return -1; + } + + byte = byte << (bit % 8); + return ((mask[bit / 8] & byte) > 0); +} + + +/* Print a key mask */ +static int lprint_mask_delim(unsigned char *mask, char d) { + int i = 0, c = 0; + + if (mask == NULL) { + lprintf("Error: attempt to dereference NULL mask pointer\n"); + return INTERR; + } + + for (i = 0; i <= maxkey; ++i) { + if (get_bit(mask, i)) { + ++c; + if (c > 1) + lprintf("%c%i", d, i); + else + lprintf("%i", i); + } + } + return OK; +} + +int lprint_mask(unsigned char *mask) { + return lprint_mask_delim(mask, '+'); +} + + +/* Use a A+B+N... string to initialise a key mask */ +int strmask(unsigned char **mask, char *keys) { + int l, i, k; + + /* Default mask pointer */ + *mask = NULL; + + l = strlen(keys); + + /* Clean up the input */ + for (i = 0; i < l; ++i) { + if ((keys[i] == '+') || (keys[i] == '-') || (keys[i] == ',')) + keys[i] = ' '; + if (isspace(keys[i])) + keys[i] = '\n'; + if ((!isdigit(keys[i])) && (keys[i] != '\n')) + return CONFERR; + } + + init_mask(mask); + + /* Set the key mask */ + i = 0; + while (i < l) { + if (isdigit(keys[i])) { + sscanf(keys + i, "%i", &k); + if (set_bit(*mask, k, 1) != OK) { + free(*mask); + return CONFERR; + } + while (isdigit(keys[i])) + ++i; + } else { + ++i; + } + } + + return OK; +} + + +/* The active key mask */ +int init_key_mask() { + return init_mask(&mask); +} + +void free_key_mask() { + free_mask(&mask); +} + +void clear_key_mask() { + clear_mask(&mask); +} + +int set_key_bit(int bit, int val) { + return set_bit(mask, bit, val); +} + +#if UNUSED +int get_key_bit(int bit) { + return get_bit(mask, bit); +} +#endif + +int cmp_key_mask(unsigned char *mask0, unsigned int attr) { + return cmp_mask(mask, mask0, attr); +} + +#if UNUSED +int lprint_key_mask_delim(char d) { + return lprint_mask_delim(mask, d); +} +#endif + +int lprint_key_mask() { + return lprint_mask(mask); +} + + +/* The ignored key mask */ +int init_ign_mask() { + return init_mask(&ignmask); +} + +void free_ign_mask() { + free_mask(&ignmask); +} + +#if UNUSED +void clear_ign_mask() { + clear_mask(&ignmask); +} + +int set_ign_bit(int bit, int val) { + return set_bit(ignmask, bit, val); +} +#endif + +int get_ign_bit(int bit) { + return get_bit(ignmask, bit); +} + +#if UNUSED +int cmp_ign_mask(unsigned char *mask0, unsigned int attr) { + return cmp_mask(ignmask, mask0, attr); +} + +int lprint_ign_mask_delim(char d) { + return lprint_mask_delim(ignmask, d); +} + +int lprint_ign_mask() { + return lprint_mask(ignmask); +} +#endif + +void copy_key_to_ign_mask() { + memcpy(ignmask, mask, masksize); +} diff --git a/PKG/actkbd-0.2.8/mask.o b/PKG/actkbd-0.2.8/mask.o new file mode 100644 index 0000000000000000000000000000000000000000..d654392a36f6f0fe965e0e4023f46e57949e1ddd Binary files /dev/null and b/PKG/actkbd-0.2.8/mask.o differ diff --git a/PKG/actkbd-0.2.8/samples/actkbd.conf b/PKG/actkbd-0.2.8/samples/actkbd.conf new file mode 100644 index 0000000000000000000000000000000000000000..73cf5d8d77a0d911ec5e190426a2a3f445e58635 --- /dev/null +++ b/PKG/actkbd-0.2.8/samples/actkbd.conf @@ -0,0 +1,85 @@ +# The keycodes on a PC are usually: +# +# Left Shift = 42 +# Left Ctrl = 29 +# Left Alt = 56 +# Right Alt = 100 +# Right Ctrl = 97 +# Right Shift = 54 +# +# Mute = 113 +# Volume Down = 114 +# Volume Up = 115 +# Eject = 161 +# +# The LED codes on a PC are usually: +# +# Num Lock = 0 +# Caps Lock = 1 +# Scroll Lock = 2 + + +# Some simple examples +114:key::echo volume.down press +114:rep::echo volume.down repeat +114:rel::echo volume.down release + +56+114:::echo left.alt+volume.down press + + +# Use the `mute' key as a 'function' key +113:key:ungrabbed,grab:echo keyboard grab +113:rel:grabbed,ungrab:echo keyboard ungrab + +# This allows the `a' key to be binded to a command +# To use: press mute, press a, release in any order +113+30::grabbed:echo alpha + +# Same thing with the `b' key +113+48::grabbed:echo beta + + +# Act if any of the `a'/`b'/`c' keys match +30,48,46::any:echo A/B/C + +# Act if both the `alt' and `f' keys match - ignore the other keys +56+33::all:echo alt+f+... + + +# A real world example... +# When the `eject' key is pressed, wait for one of the `e'/`m'/`u' keys: +161::ungrabbed,grab,noexec,ignrel: +161:rel:grabbed,noexec: + +# The `e' key : eject +161+18::grabbed:echo eject +161+18:rel:grabbed,noexec,ungrab,rcvrel,allrel: + +# The `m' key : mount +161+50::grabbed:echo mount +161+50:rel:grabbed,noexec,ungrab,rcvrel,allrel: + +# The `u' key : umount +161+22::grabbed:echo umount +161+22:rel:grabbed,noexec,ungrab,rcvrel,allrel: + +# Any other key escapes this mode +161::grabbed,all,noexec: +161:rel:grabbed,all,noexec,ungrab,rcvrel,allrel: + + +# Produce an `a' key press and release whenever +# the `left.ctrl'+`volume.up' keys are pressed +29+115::key(30),rel(30),noexec: + + +# Pressing the `1' key switches on the first LED (usually the Num Lock LED) +2::ledon(0),noexec: + +# Pressing the `0' key switches it off +11::ledoff(0),noexec: + + +# This entry is triggered by any key press or release +# that has not matched with one of the entries above +:key,rel:not:echo '*' diff --git a/PKG/actkbd-0.2.8/samples/udev.rules b/PKG/actkbd-0.2.8/samples/udev.rules new file mode 100644 index 0000000000000000000000000000000000000000..59b2e8a9e54a6d011ca11f11b1ab9eb9eea836c3 --- /dev/null +++ b/PKG/actkbd-0.2.8/samples/udev.rules @@ -0,0 +1,22 @@ +# udev rules for keyboards +ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-9]*", GOTO="_INPUT_" +GOTO="_END_" + + +LABEL="_INPUT_" + +# AT keyboard +DRIVERS=="atkbd", ENV{__CFG}="/etc/actkbd/actkbd.atkbd.conf", GOTO="_KBD_" + +GOTO="_END_" + + +# Keyboards +LABEL="_KBD_" + +# Launch actkbd +RUN+="/usr/sbin/actkbd -q -D -c %E{__CFG}" + + +# End +LABEL="_END_" diff --git a/PKG/brave-bin/template b/PKG/brave-bin/template new file mode 100644 index 0000000000000000000000000000000000000000..ba7f97a6854df31ab6380a84f2e14754aa71667c --- /dev/null +++ b/PKG/brave-bin/template @@ -0,0 +1,35 @@ +# Template file for 'brave-bin' +pkgname=brave-bin +version=1.89.137 +revision=1 +only_for_archs="x86_64" +short_desc="Secure, fast and private web browser with ad blocker" +maintainer="Soanvig " +hostmakedepends="tar xz" # need gtk+3! +license="Mozilla Public License Version 2.0" +homepage="https://brave.com" +distfiles="https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb" +checksum=0456f1fc4c781dd685a5f63600a737c8068ca7a3e26300bf92610817459d7305 +nostrip=yes + +do_extract() { + mkdir -p ${DESTDIR} + ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/brave-browser_${version}_amd64.deb +} + +do_install() { + tar xf data.tar.xz -C ${DESTDIR} + + # Install the icons + for size in 24 32 48 64 128 256; do + # Create the brave browser xdg directory + mkdir -p ${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps + + # Copy the brave browser icon + mv ${DESTDIR}/opt/brave.com/brave/product_logo_${size}.png ${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/brave-browser.png + done + + # Remove the Debian/Ubuntu crontab + rm -rf ${DESTDIR}/etc + rm -rf ${DESTDIR}/opt/brave.com/brave/cron +} diff --git a/PKG/faugus-launcher/template b/PKG/faugus-launcher/template new file mode 100644 index 0000000000000000000000000000000000000000..2358a2cf06fd3ddaa636ccf56a307a85f2e77f3f --- /dev/null +++ b/PKG/faugus-launcher/template @@ -0,0 +1,19 @@ +# Template file for 'faugus-launcher' +pkgname=faugus-launcher +version=1.14.4 +revision=1 +build_style=meson +hostmakedepends="pkg-config python3 gettext glib-devel desktop-file-utils ImageMagick" +makedepends="python3-devel libadwaita-devel libayatana-appindicator-devel" +depends="python3-gobject python3-Pillow python3-yaml libadwaita python3-requests + python3-filelock python3-psutil ImageMagick python3-icoextract python3-vdf libayatana-appindicator" +short_desc="Simple and lightweight app for running Windows games using UMU-Launcher" +maintainer="Tu Nombre " +license="MIT" +homepage="https://github.com/Faugus/faugus-launcher" +distfiles="https://github.com/Faugus/faugus-launcher/archive/refs/tags/${version}.tar.gz" +checksum=98ecefb29c1cd9ae939a9db5cd13bd3e5dcaa47aad17d476663453f8231bb64a + +post_install() { + vlicense LICENSE +} diff --git a/PKG/heroic-games/template b/PKG/heroic-games/template new file mode 100644 index 0000000000000000000000000000000000000000..65d95775113940d00254a28edfe0b81eccaeb50c --- /dev/null +++ b/PKG/heroic-games/template @@ -0,0 +1,47 @@ +# Template file for 'heroic-games-launcher-bin' +pkgname=heroic-games +version=2.20.1 +revision=1 +archs="x86_64" +build_style=fetch +short_desc="Open Source Launcher for GOG, Epic Games and Amazon Games" +maintainer="Javiercplus" +license="GPL-3.0-only" +homepage="https://heroicgameslauncher.com" +distfiles="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v${version}/Heroic-${version}-linux-amd64.deb" +checksum=4e9957436bc270318b00a1107910a3c7d30ad72da530af4dee5c2860866a6272 + +# Dependencias mapeadas de Debian a Void Linux +depends="gtk+3 libnotify nss libXScrnSaver libXtst xdg-utils at-spi2-core libuuid libsecret" + +# Evita que XBPS intente modificar los binarios ya compilados +nostrip=yes + +do_install() { + vextract "Heroic-${version}-linux-amd64.deb" + + # 1. Instalación del núcleo de la aplicación + vmkdir opt + cp -R opt/Heroic "${DESTDIR}/opt/" + + # 2. Enlace simbólico para ejecución global + vmkdir usr/bin + ln -sf /opt/Heroic/heroic "${DESTDIR}/usr/bin/heroic" + + # 3. Archivos Desktop e Iconos + vmkdir usr/share/applications + vcopy "usr/share/applications/*.desktop" usr/share/applications + + vmkdir usr/share/icons + vcopy "usr/share/icons/*" usr/share/icons + + # 4. Seguridad (Chrome Sandbox) + # Se aplica el permiso SUID para asegurar el aislamiento de procesos de Electron + chmod 4755 "${DESTDIR}/opt/Heroic/chrome-sandbox" + + # 5. Perfil de AppArmor (Opcional pero incluido por trazabilidad) + if [ -f "opt/Heroic/resources/apparmor-profile" ]; then + vmkdir etc/apparmor.d + vcopy "opt/Heroic/resources/apparmor-profile" etc/apparmor.d/heroic + fi +} diff --git a/PKG/kernel-neko-rt/template b/PKG/kernel-neko-rt/template new file mode 100644 index 0000000000000000000000000000000000000000..05a8773b7f33f41749a40a1b7bb818146b1238e2 --- /dev/null +++ b/PKG/kernel-neko-rt/template @@ -0,0 +1,19 @@ +pkgname=kernel-neko-rt +version=6.18.0 +revision=1 +short_desc="Custom RT kernel rt-rt3-neko+ precompiled for Void Linux" +maintainer="JavierC" +license="GPL-2.0-only" +homepage="https://github.com/franckey02/kernel-neko-void" +distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-rt/neko-kernel-void-6.18.0-rt-rt3-neko+.tar.gz" +checksum="1f7ae08037f4b14d10d0e9c69b8a03f93392710ea3cf50aa01ca9f2eda9d9bc5" +create_wrksrc=yes +triggers="kernel-hooks" +kernel_hooks_version="6.18.0-rt-rt3-neko+" +do_install() { + vmkdir boot + vmkdir usr/lib/modules + + cp -a boot/* ${DESTDIR}/boot/ + cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/ +} \ No newline at end of file diff --git a/PKG/kernel-neko-void/.github/workflows/realtime.yml b/PKG/kernel-neko-void/.github/workflows/realtime.yml new file mode 100644 index 0000000000000000000000000000000000000000..addbb521f427b58eeada13bccb2634717e2ba1be --- /dev/null +++ b/PKG/kernel-neko-void/.github/workflows/realtime.yml @@ -0,0 +1,150 @@ +name: Compilar Neko Void Kernel (con RT sobre RC) + +on: + push: + branches: [ main ] + workflow_dispatch: + +env: + KERNEL_REVISION: 1 # Ya no se usa directamente, pero se puede dejar + +jobs: + build-kernel: + runs-on: ubuntu-latest + container: + image: ghcr.io/void-linux/void-glibc-full:latest + options: --user root + + steps: + - name: 1. Instalar dependencias del sistema + run: | + xbps-install -Syu xbps -y + xbps-install -Syu base-devel git bc kmod elfutils-devel bash cpio xz lz4 zstd flex bison openssl-devel curl pahole tar python3 patch wget rsync -y + + - name: 2. Checkout del repositorio (para scripts personalizados si los hay) + uses: actions/checkout@v4 + with: + path: repo + + - name: 3. Clonar fuentes del kernel (v6.18-rc4) y modificar EXTRAVERSION a -rt + run: | + git clone --depth 1 --branch v6.18-rc4 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-src + cd linux-src + # Cambiar EXTRAVERSION de -rc4 a -rt + sed -i 's/^EXTRAVERSION =.*/EXTRAVERSION = -rt/' Makefile + cd .. + + - name: 4. Obtener configuración base de Void y establecer como .config + run: | + cd linux-src + wget -O .config https://github.com/void-linux/void-packages/raw/refs/heads/master/srcpkgs/linux6.18/files/x86_64-dotconfig + cd .. + + - name: 5. Aplicar parche de Void (fixdep-largefile) + run: | + cd linux-src + wget -O fixdep-largefile.patch https://github.com/void-linux/void-packages/raw/refs/heads/master/srcpkgs/linux6.18/patches/fixdep-largefile.patch + patch -p1 -N --batch < fixdep-largefile.patch + cd .. + + - name: 6. Aplicar parche RT (PREEMPT_RT para 6.18-rc4) + run: | + cd linux-src + wget https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.18/patch-6.18-rc4-rt3.patch.xz + xzcat patch-6.18-rc4-rt3.patch.xz | patch -p1 -N --batch + cd .. + + - name: 7. Ajustar configuración (Hz, optimizaciones, RT, debug, nombre) + run: | + cd linux-src + # Desactivar la generación automática de versión git para evitar -dirty + scripts/config --disable CONFIG_LOCALVERSION_AUTO + # Establecer LOCALVERSION con el identificador deseado (ej: -neko) + scripts/config --set-str CONFIG_LOCALVERSION "-neko" + + # Frecuencia de reloj 1000 Hz + scripts/config -d CONFIG_HZ_300 -e CONFIG_HZ_1000 --set-val CONFIG_HZ 1000 + scripts/config -d CONFIG_HZ_PERIODIC -d CONFIG_NO_HZ_IDLE -e CONFIG_NO_HZ_FULL -e CONFIG_NO_HZ + + # Compresión ZSTD para módulos + scripts/config -e CONFIG_MODULE_COMPRESS_ZSTD + + # Hugepages always (mejor rendimiento) + scripts/config -d CONFIG_TRANSPARENT_HUGEPAGE_MADVISE -e CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS + + # Activar RT (PREEMPT_RT) + scripts/config -d CONFIG_PREEMPT_VOLUNTARY + scripts/config -d CONFIG_PREEMPT_LL + scripts/config -d CONFIG_PREEMPT_NONE + scripts/config -e CONFIG_PREEMPT_RT + + # Desactivar debug masivo + scripts/config --disable CONFIG_DEBUG_INFO \ + --disable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \ + --disable CONFIG_DEBUG_INFO_REDUCED \ + --disable CONFIG_DEBUG_INFO_BTF \ + --disable CONFIG_DEBUG_VM \ + --disable CONFIG_DEBUG_KERNEL \ + --disable CONFIG_PROVE_LOCKING \ + --disable CONFIG_LOCK_STAT \ + --disable CONFIG_LATENCYTOP + + # Desactivar firma de módulos (evita problemas con certificados) + scripts/config --disable CONFIG_MODULE_SIG + scripts/config --set-str CONFIG_SYSTEM_TRUSTED_KEYS "" + + # Actualizar configuración (incorpora nuevas opciones de los parches) + make olddefconfig + cd .. + + - name: 8. Compilar el kernel y módulos (con logs detallados) + run: | + cd linux-src + export KBUILD_BUILD_TIMESTAMP=$(date -u -d @0 +"%Y-%m-%d %H:%M:%S") + export KBUILD_BUILD_USER=voidlinux + export KBUILD_BUILD_HOST=voidlinux + export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt + + # Compilar con V=1 para logs detallados + make -j$(nproc) prepare V=1 + make -j$(nproc) bzImage modules V=1 2>&1 | tee ../build.log + cd .. + + - name: 9. Subir logs de compilación (incluso si falla) + if: always() + uses: actions/upload-artifact@v4 + with: + name: build-logs + path: build.log + + - name: 10. Instalar kernel, módulos y config (solo si la compilación fue exitosa) + if: success() + run: | + cd linux-src + KERNEL_RELEASE=$(make kernelrelease) + echo "KERNEL_RELEASE=${KERNEL_RELEASE}" >> $GITHUB_ENV + + make INSTALL_MOD_PATH=$GITHUB_WORKSPACE/modules modules_install + + mkdir -p $GITHUB_WORKSPACE/pkg/boot + cp arch/x86/boot/bzImage $GITHUB_WORKSPACE/pkg/boot/vmlinuz-${KERNEL_RELEASE} + cp System.map $GITHUB_WORKSPACE/pkg/boot/System.map-${KERNEL_RELEASE} + cp .config $GITHUB_WORKSPACE/pkg/boot/config-${KERNEL_RELEASE} + + mkdir -p $GITHUB_WORKSPACE/pkg/lib/modules + mv $GITHUB_WORKSPACE/modules/lib/modules/${KERNEL_RELEASE} $GITHUB_WORKSPACE/pkg/lib/modules/ + cd .. + + - name: 11. Empaquetar artefactos + if: success() + run: | + cd $GITHUB_WORKSPACE/pkg + tar -czf ../neko-kernel-void-${KERNEL_RELEASE}.tar.gz . + cd .. + + - name: 12. Subir resultado + if: success() + uses: actions/upload-artifact@v4 + with: + name: neko-kernel-void-rt-rc + path: neko-kernel-void-*.tar.gz diff --git a/PKG/kernel-neko-void/.github/workflows/zen.yml b/PKG/kernel-neko-void/.github/workflows/zen.yml new file mode 100644 index 0000000000000000000000000000000000000000..8239cd7dbc93b9cc432948b9b4c9b1599dcd60b3 --- /dev/null +++ b/PKG/kernel-neko-void/.github/workflows/zen.yml @@ -0,0 +1,117 @@ +name: Compilar Zen Kernel (lqx1) para Void Linux + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build-kernel: + runs-on: ubuntu-latest + container: + image: ghcr.io/void-linux/void-glibc-full:latest + options: --user root + + steps: + - name: 1. Instalar dependencias del sistema + run: | + xbps-install -Syu xbps -y + xbps-install -Syu base-devel git bc kmod elfutils-devel bash cpio xz lz4 zstd flex bison openssl-devel curl pahole tar python3 patch wget rsync -y + + - name: 2. Checkout de TU repositorio (para scripts personalizados si los hay) + uses: actions/checkout@v4 + with: + path: repo + + - name: 3. Clonar fuentes del Zen Kernel (v6.18.12-lqx1) + run: | + git clone --depth 1 --branch v6.18.12-lqx1 https://github.com/zen-kernel/zen-kernel.git linux-src + + - name: 4. Obtener configuración base de Void (linux6.18) + run: | + cd linux-src + wget -O .config https://github.com/void-linux/void-packages/raw/refs/heads/master/srcpkgs/linux6.18/files/x86_64-dotconfig || \ + wget -O .config https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/linux6.12/files/x86_64-dotconfig + cd .. + + - name: 5. Ajustar configuración (nombre, optimizaciones, debug) + run: | + cd linux-src + # Evitar sufijo -dirty (por si acaso) + scripts/config --disable CONFIG_LOCALVERSION_AUTO + # Añadir identificador personal (el nombre final será algo como 6.18.12-lqx1-neko) + scripts/config --set-str CONFIG_LOCALVERSION "-neko" + + # Optimizaciones + scripts/config --enable CONFIG_CC_OPTIMIZE_FOR_SIZE + scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTD + + # Desactivar debug masivo + scripts/config --disable CONFIG_DEBUG_INFO \ + --disable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \ + --disable CONFIG_DEBUG_INFO_REDUCED \ + --disable CONFIG_DEBUG_INFO_BTF \ + --disable CONFIG_DEBUG_VM \ + --disable CONFIG_DEBUG_KERNEL \ + --disable CONFIG_PROVE_LOCKING \ + --disable CONFIG_LOCK_STAT \ + --disable CONFIG_LATENCYTOP + + # Desactivar firma de módulos + scripts/config --disable CONFIG_MODULE_SIG + scripts/config --set-str CONFIG_SYSTEM_TRUSTED_KEYS "" + + # Actualizar configuración (incorpora nuevas opciones) + make olddefconfig + cd .. + + - name: 6. Compilar kernel y módulos (con logs detallados) + run: | + cd linux-src + export KBUILD_BUILD_TIMESTAMP=$(date -u -d @0 +"%Y-%m-%d %H:%M:%S") + export KBUILD_BUILD_USER=voidlinux + export KBUILD_BUILD_HOST=voidlinux + export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt + + make -j$(nproc) prepare + make -j$(nproc) bzImage modules V=1 2>&1 | tee ../build.log + cd .. + + - name: 7. Subir logs de compilación (incluso si falla) + if: always() + uses: actions/upload-artifact@v4 + with: + name: build-logs + path: build.log + + - name: 8. Instalar kernel, módulos y config (solo si la compilación fue exitosa) + if: success() + run: | + cd linux-src + KERNEL_RELEASE=$(make kernelrelease) + echo "KERNEL_RELEASE=${KERNEL_RELEASE}" >> $GITHUB_ENV + + make INSTALL_MOD_PATH=$GITHUB_WORKSPACE/modules modules_install + + mkdir -p $GITHUB_WORKSPACE/pkg/boot + cp arch/x86/boot/bzImage $GITHUB_WORKSPACE/pkg/boot/vmlinuz-${KERNEL_RELEASE} + cp System.map $GITHUB_WORKSPACE/pkg/boot/System.map-${KERNEL_RELEASE} + cp .config $GITHUB_WORKSPACE/pkg/boot/config-${KERNEL_RELEASE} + + mkdir -p $GITHUB_WORKSPACE/pkg/lib/modules + mv $GITHUB_WORKSPACE/modules/lib/modules/${KERNEL_RELEASE} $GITHUB_WORKSPACE/pkg/lib/modules/ + cd .. + + - name: 9. Empaquetar artefactos + if: success() + run: | + cd $GITHUB_WORKSPACE/pkg + tar -czf ../zen-kernel-void-${KERNEL_RELEASE}.tar.gz . + cd .. + + - name: 10. Subir resultado + if: success() + uses: actions/upload-artifact@v4 + with: + name: zen-kernel-void-lqx1 + path: zen-kernel-void-*.tar.gz diff --git a/PKG/kernel-neko-void/README.md b/PKG/kernel-neko-void/README.md new file mode 100644 index 0000000000000000000000000000000000000000..62f541a7969a211870ef7d85245e8b8625e180cb --- /dev/null +++ b/PKG/kernel-neko-void/README.md @@ -0,0 +1,2 @@ +# kernel-neko-void +Workflows of Neko VOid diff --git a/PKG/kernel-neko-void/kernel-neko-rt/template b/PKG/kernel-neko-void/kernel-neko-rt/template new file mode 100644 index 0000000000000000000000000000000000000000..05a8773b7f33f41749a40a1b7bb818146b1238e2 --- /dev/null +++ b/PKG/kernel-neko-void/kernel-neko-rt/template @@ -0,0 +1,19 @@ +pkgname=kernel-neko-rt +version=6.18.0 +revision=1 +short_desc="Custom RT kernel rt-rt3-neko+ precompiled for Void Linux" +maintainer="JavierC" +license="GPL-2.0-only" +homepage="https://github.com/franckey02/kernel-neko-void" +distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-rt/neko-kernel-void-6.18.0-rt-rt3-neko+.tar.gz" +checksum="1f7ae08037f4b14d10d0e9c69b8a03f93392710ea3cf50aa01ca9f2eda9d9bc5" +create_wrksrc=yes +triggers="kernel-hooks" +kernel_hooks_version="6.18.0-rt-rt3-neko+" +do_install() { + vmkdir boot + vmkdir usr/lib/modules + + cp -a boot/* ${DESTDIR}/boot/ + cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/ +} \ No newline at end of file diff --git a/PKG/kernel-neko-void/kernel-neko-zen/INSTALL b/PKG/kernel-neko-void/kernel-neko-zen/INSTALL new file mode 100644 index 0000000000000000000000000000000000000000..4840a214cf42c07f80d24fc8844d847612c9c09f --- /dev/null +++ b/PKG/kernel-neko-void/kernel-neko-zen/INSTALL @@ -0,0 +1,15 @@ +# Archivo INSTALL para kernel-neko-zen +case "$ACTION" in +post) + # Registrar los módulos del kernel + depmod 6.18.12-lqx1-neko + + # Generar initramfs con dracut + dracut --force /boot/initramfs-6.18.12-lqx1-neko.img 6.18.12-lqx1-neko + + # Actualizar la configuración de GRUB (si se usa) + if command -v grub-mkconfig >/dev/null 2>&1; then + grub-mkconfig -o /boot/grub/grub.cfg + fi + ;; +esac \ No newline at end of file diff --git a/PKG/kernel-neko-void/kernel-neko-zen/template b/PKG/kernel-neko-void/kernel-neko-zen/template new file mode 100644 index 0000000000000000000000000000000000000000..2d7f861871114d6a1f96b2368d34c2fc212cdd8e --- /dev/null +++ b/PKG/kernel-neko-void/kernel-neko-zen/template @@ -0,0 +1,18 @@ +pkgname=kernel-neko-zen +version=6.18.12 +revision=1 +short_desc="Custom Zen kernel lqx1-neko precompiled for Void Linux" +maintainer="JavierC" +license="GPL-2.0-only" +homepage="https://github.com/franckey02/kernel-neko-void" +distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-lxq1/zen-kernel-void-${version}-lqx1-neko.tar.gz" +checksum="2264ae86edd992b91dbe222581a455d921a0f2643c55646f4798f548ad084174" +create_wrksrc=yes + +do_install() { + vmkdir boot + vmkdir usr/lib/modules + + cp -a boot/* ${DESTDIR}/boot/ + cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/ +} \ No newline at end of file diff --git a/PKG/kernel-neko-zen/INSTALL b/PKG/kernel-neko-zen/INSTALL new file mode 100644 index 0000000000000000000000000000000000000000..4840a214cf42c07f80d24fc8844d847612c9c09f --- /dev/null +++ b/PKG/kernel-neko-zen/INSTALL @@ -0,0 +1,15 @@ +# Archivo INSTALL para kernel-neko-zen +case "$ACTION" in +post) + # Registrar los módulos del kernel + depmod 6.18.12-lqx1-neko + + # Generar initramfs con dracut + dracut --force /boot/initramfs-6.18.12-lqx1-neko.img 6.18.12-lqx1-neko + + # Actualizar la configuración de GRUB (si se usa) + if command -v grub-mkconfig >/dev/null 2>&1; then + grub-mkconfig -o /boot/grub/grub.cfg + fi + ;; +esac \ No newline at end of file diff --git a/PKG/kernel-neko-zen/template b/PKG/kernel-neko-zen/template new file mode 100644 index 0000000000000000000000000000000000000000..2d7f861871114d6a1f96b2368d34c2fc212cdd8e --- /dev/null +++ b/PKG/kernel-neko-zen/template @@ -0,0 +1,18 @@ +pkgname=kernel-neko-zen +version=6.18.12 +revision=1 +short_desc="Custom Zen kernel lqx1-neko precompiled for Void Linux" +maintainer="JavierC" +license="GPL-2.0-only" +homepage="https://github.com/franckey02/kernel-neko-void" +distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-lxq1/zen-kernel-void-${version}-lqx1-neko.tar.gz" +checksum="2264ae86edd992b91dbe222581a455d921a0f2643c55646f4798f548ad084174" +create_wrksrc=yes + +do_install() { + vmkdir boot + vmkdir usr/lib/modules + + cp -a boot/* ${DESTDIR}/boot/ + cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/ +} \ No newline at end of file diff --git a/PKG/librewolf/files/librewolf.desktop b/PKG/librewolf/files/librewolf.desktop new file mode 100644 index 0000000000000000000000000000000000000000..aa22fd9dfacfe544155dd4807abf3699a496ba5b --- /dev/null +++ b/PKG/librewolf/files/librewolf.desktop @@ -0,0 +1,386 @@ +[Desktop Entry] +Version=1.0 +Name=LibreWolf +Name[ar]=متصفح الويب فَيَرفُكْس +Name[ast]=Restolador web LibreWolf +Name[bn]=ফায়ারফক্স ওয়েব ব্রাউজার +Name[ca]=Navegador web LibreWolf +Name[cs]=LibreWolf Webový prohlížeč +Name[da]=LibreWolf - internetbrowser +Name[el]=Περιηγητής LibreWolf +Name[es]=Navegador web LibreWolf +Name[et]=LibreWolfi veebibrauser +Name[fa]=مرورگر اینترنتی LibreWolf +Name[fi]=LibreWolf-selain +Name[fr]=Navigateur Web LibreWolf +Name[gl]=Navegador web LibreWolf +Name[he]=דפדפן האינטרנט LibreWolf +Name[hr]=LibreWolf web preglednik +Name[hu]=LibreWolf webböngésző +Name[it]=LibreWolf Browser Web +Name[ja]=LibreWolf ウェブ・ブラウザ +Name[ko]=LibreWolf 웹 브라우저 +Name[ku]=Geroka torê LibreWolf +Name[lt]=LibreWolf interneto naršyklė +Name[nb]=LibreWolf Nettleser +Name[nl]=LibreWolf webbrowser +Name[nn]=LibreWolf Nettlesar +Name[no]=LibreWolf Nettleser +Name[pl]=Przeglądarka WWW LibreWolf +Name[pt]=LibreWolf Navegador Web +Name[pt_BR]=Navegador Web LibreWolf +Name[ro]=LibreWolf – Navigator Internet +Name[ru]=Веб-браузер LibreWolf +Name[sk]=LibreWolf - internetový prehliadač +Name[sl]=LibreWolf spletni brskalnik +Name[sv]=LibreWolf webbläsare +Name[tr]=LibreWolf Web Tarayıcısı +Name[ug]=LibreWolf توركۆرگۈ +Name[uk]=Веб-браузер LibreWolf +Name[vi]=Trình duyệt web LibreWolf +Name[zh_CN]=LibreWolf 网络浏览器 +Name[zh_TW]=LibreWolf 網路瀏覽器 +Comment=Browse the World Wide Web +Comment[ar]=تصفح الشبكة العنكبوتية العالمية +Comment[ast]=Restola pela Rede +Comment[bn]=ইন্টারনেট ব্রাউজ করুন +Comment[ca]=Navegueu per la web +Comment[cs]=Prohlížení stránek World Wide Webu +Comment[da]=Surf på internettet +Comment[de]=Im Internet surfen +Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web) +Comment[es]=Navegue por la web +Comment[et]=Lehitse veebi +Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید +Comment[fi]=Selaa Internetin WWW-sivuja +Comment[fr]=Naviguer sur le Web +Comment[gl]=Navegar pola rede +Comment[he]=גלישה ברחבי האינטרנט +Comment[hr]=Pretražite web +Comment[hu]=A világháló böngészése +Comment[it]=Esplora il web +Comment[ja]=ウェブを閲覧します +Comment[ko]=웹을 돌아 다닙니다 +Comment[ku]=Li torê bigere +Comment[lt]=Naršykite internete +Comment[nb]=Surf på nettet +Comment[nl]=Verken het internet +Comment[nn]=Surf på nettet +Comment[no]=Surf på nettet +Comment[pl]=Przeglądanie stron WWW +Comment[pt]=Navegue na Internet +Comment[pt_BR]=Navegue na Internet +Comment[ro]=Navigați pe Internet +Comment[ru]=Доступ в Интернет +Comment[sk]=Prehliadanie internetu +Comment[sl]=Brskajte po spletu +Comment[sv]=Surfa på webben +Comment[tr]=İnternet'te Gezinin +Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ +Comment[uk]=Перегляд сторінок Інтернету +Comment[vi]=Để duyệt các trang web +Comment[zh_CN]=浏览互联网 +Comment[zh_TW]=瀏覽網際網路 +GenericName=Web Browser +GenericName[ar]=متصفح ويب +GenericName[ast]=Restolador Web +GenericName[bn]=ওয়েব ব্রাউজার +GenericName[ca]=Navegador web +GenericName[cs]=Webový prohlížeč +GenericName[da]=Webbrowser +GenericName[el]=Περιηγητής διαδικτύου +GenericName[es]=Navegador web +GenericName[et]=Veebibrauser +GenericName[fa]=مرورگر اینترنتی +GenericName[fi]=WWW-selain +GenericName[fr]=Navigateur Web +GenericName[gl]=Navegador Web +GenericName[he]=דפדפן אינטרנט +GenericName[hr]=Web preglednik +GenericName[hu]=Webböngésző +GenericName[it]=Browser web +GenericName[ja]=ウェブ・ブラウザ +GenericName[ko]=웹 브라우저 +GenericName[ku]=Geroka torê +GenericName[lt]=Interneto naršyklė +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[nn]=Nettlesar +GenericName[no]=Nettleser +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador Web +GenericName[ro]=Navigator Internet +GenericName[ru]=Веб-браузер +GenericName[sk]=Internetový prehliadač +GenericName[sl]=Spletni brskalnik +GenericName[sv]=Webbläsare +GenericName[tr]=Web Tarayıcı +GenericName[ug]=توركۆرگۈ +GenericName[uk]=Веб-браузер +GenericName[vi]=Trình duyệt Web +GenericName[zh_CN]=网络浏览器 +GenericName[zh_TW]=網路瀏覽器 +Keywords=Internet;WWW;Browser;Web;Explorer +Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب +Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador +Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer +Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer +Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet +Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen +Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;LibreWolf;Φιρεφοχ;Ιντερνετ +Keywords[es]=Explorador;Internet;WWW +Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa +Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur +Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה; +Keywords[hr]=Internet;WWW;preglednik;Web +Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer +Keywords[it]=Internet;WWW;Browser;Web;Navigatore +Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk +Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ +Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside +Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online +Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador +Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador +Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис +Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer +Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet +Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara +Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд +Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web +Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;LibreWolf;ff;互联网;网站; +Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐 +Exec=librewolf %u +Icon=librewolf +Terminal=false +X-MultipleArgs=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json; +StartupNotify=true +StartupWMClass=LibreWolf +Categories=Network;WebBrowser; +Actions=new-window;new-private-window;profile-manager-window; + +[Desktop Action new-window] +Name=Open a New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn_BD]=নতুন উইন্ডো (N) +Name[bn_IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en_GB]=New Window +Name[en_US]=New Window +Name[en_ZA]=New Window +Name[eo]=Nova fenestro +Name[es_AR]=Nueva ventana +Name[es_CL]=Nueva ventana +Name[es_ES]=Nueva ventana +Name[es_MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy_NL]=Nij finster +Name[ga_IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu_IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi_IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy_AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ja_JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួចថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb_NO]=Nytt vindu +Name[ne_NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn_NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt_BR]=Nova janela +Name[pt_PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv_SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh_CN]=新建窗口 +Name[zh_TW]=開新視窗 +Exec=librewolf --new-window %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Name[ach]=Dirica manyen me mung +Name[af]=Nuwe privaatvenster +Name[an]=Nueva finestra privada +Name[ar]=نافذة خاصة جديدة +Name[as]=নতুন ব্যক্তিগত উইন্ডো +Name[ast]=Ventana privada nueva +Name[az]=Yeni Məxfi Pəncərə +Name[be]=Новае акно адасаблення +Name[bg]=Нов прозорец за поверително сърфиране +Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' +Name[bs]=Novi privatni prozor +Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch +Name[cs]=Nové anonymní okno +Name[cy]=Ffenestr Breifat Newydd +Name[da]=Nyt privat vindue +Name[de]=Neues privates Fenster +Name[dsb]=Nowe priwatne wokno +Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en_GB]=New Private Window +Name[en_US]=New Private Window +Name[en_ZA]=New Private Window +Name[eo]=Nova privata fenestro +Name[es_AR]=Nueva ventana privada +Name[es_CL]=Nueva ventana privada +Name[es_ES]=Nueva ventana privada +Name[es_MX]=Nueva ventana privada +Name[et]=Uus privaatne aken +Name[eu]=Leiho pribatu berria +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere +Name[fi]=Uusi yksityinen ikkuna +Name[fr]=Nouvelle fenêtre de navigation privée +Name[fy_NL]=Nij priveefinster +Name[ga_IE]=Fuinneog Nua Phríobháideach +Name[gd]=Uinneag phrìobhaideach ùr +Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu +Name[gu_IN]=નવી ખાનગી વિન્ડો +Name[he]=חלון פרטי חדש +Name[hi_IN]=नयी निजी विंडो +Name[hr]=Novi privatni prozor +Name[hsb]=Nowe priwatne wokno +Name[hu]=Új privát ablak +Name[hy_AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi +Name[it]=Nuova finestra anonima +Name[ja]=新しいプライベートウィンドウ +Name[ja_JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა +Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួចឯកជនថ្មី +Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو +Name[lij]=Nêuvo barcón privòu +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец +Name[ml]=പുതിയ സ്വകാര്യ ജാലകം +Name[mr]=नवीन वैयक्तिक पटल +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window +Name[nb_NO]=Nytt privat vindu +Name[ne_NP]=नयाँ निजी सञ्झ्याल +Name[nl]=Nieuw privévenster +Name[nn_NO]=Nytt privat vindauge +Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pl]=Nowe okno prywatne +Name[pt_BR]=Nova janela privativa +Name[pt_PT]=Nova janela privada +Name[rm]=Nova fanestra privata +Name[ro]=Fereastră privată nouă +Name[ru]=Новое приватное окно +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) +Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sl]=Novo zasebno okno +Name[son]=Sutura zanfun taaga +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор +Name[sv_SE]=Nytt privat fönster +Name[ta]=புதிய தனிப்பட்ட சாளரம் +Name[te]=కొత్త ఆంతరంగిక విండో +Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tr]=Yeni gizli pencere +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna +Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees +Name[xh]=Ifestile yangasese entsha +Name[zh_CN]=新建隐私浏览窗口 +Name[zh_TW]=新增隱私視窗 +Exec=librewolf --private-window %u + +[Desktop Action profile-manager-window] +Name=Open the Profile Manager +Name[cs]=Správa profilů +Name[de]=Profilverwaltung öffnen +Name[es]=Abrir el Gestor de Perfiles +Name[fr]=Ouvrir le gestionnaire de profils +Exec=librewolf --ProfileManager %u diff --git a/PKG/librewolf/files/stab.h b/PKG/librewolf/files/stab.h new file mode 100644 index 0000000000000000000000000000000000000000..6f70af39897aab1a344974a28d24a2b9ff75655a --- /dev/null +++ b/PKG/librewolf/files/stab.h @@ -0,0 +1,71 @@ +/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */ +/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */ + +/*- + * Copyright (c) 1991 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)stab.h 5.2 (Berkeley) 4/4/91 + */ + +#ifndef _STAB_H_ +#define _STAB_H_ + +/* + * The following are symbols used by various debuggers and by the Pascal + * compiler. Each of them must have one (or more) of the bits defined by + * the N_STAB mask set. + */ + +#define N_GSYM 0x20 /* global symbol */ +#define N_FNAME 0x22 /* F77 function name */ +#define N_FUN 0x24 /* procedure name */ +#define N_STSYM 0x26 /* data segment variable */ +#define N_LCSYM 0x28 /* bss segment variable */ +#define N_MAIN 0x2a /* main function name */ +#define N_PC 0x30 /* global Pascal symbol */ +#define N_RSYM 0x40 /* register variable */ +#define N_SLINE 0x44 /* text segment line number */ +#define N_DSLINE 0x46 /* data segment line number */ +#define N_BSLINE 0x48 /* bss segment line number */ +#define N_SSYM 0x60 /* structure/union element */ +#define N_SO 0x64 /* main source file name */ +#define N_LSYM 0x80 /* stack variable */ +#define N_BINCL 0x82 /* include file beginning */ +#define N_SOL 0x84 /* included source file name */ +#define N_PSYM 0xa0 /* parameter variable */ +#define N_EINCL 0xa2 /* include file end */ +#define N_ENTRY 0xa4 /* alternate entry point */ +#define N_LBRAC 0xc0 /* left bracket */ +#define N_EXCL 0xc2 /* deleted include file */ +#define N_RBRAC 0xe0 /* right bracket */ +#define N_BCOMM 0xe2 /* begin common */ +#define N_ECOMM 0xe4 /* end common */ +#define N_ECOML 0xe8 /* end common (local name) */ +#define N_LENG 0xfe /* length of preceding entry */ + +#endif /* !_STAB_H_ */ diff --git a/PKG/librewolf/files/vendor.js b/PKG/librewolf/files/vendor.js new file mode 100644 index 0000000000000000000000000000000000000000..1b0273175a52ecbdcff01ec40937e976438607b0 --- /dev/null +++ b/PKG/librewolf/files/vendor.js @@ -0,0 +1,11 @@ +// Use LANG environment variable to choose locale +pref("intl.locale.requested", ""); + +// Disable default browser checking. +pref("browser.shell.checkDefaultBrowser", false); + +// Don't disable our bundled extensions in the application directory +pref("extensions.autoDisableScopes", 11); + +// The default is google and we don't have api keys for it. +pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); diff --git a/PKG/librewolf/patches/big-endian-image-decoders.patch b/PKG/librewolf/patches/big-endian-image-decoders.patch new file mode 100644 index 0000000000000000000000000000000000000000..bd2f925c917e21dc5e0bd8af379e25e0b6cd7000 --- /dev/null +++ b/PKG/librewolf/patches/big-endian-image-decoders.patch @@ -0,0 +1,88 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=1626236 +https://bug1626236.bmoattachments.org/attachment.cgi?id=9137096 + +# HG changeset patch +# User msirringhaus@suse.de +# Date 1582805876 -3600 +# Thu Feb 27 13:17:56 2020 +0100 +# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158 +# Parent 9cd90914846f667f18babc491a74c164ae5d6e9f +imported patch decoder_workaround.patch + +diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp +--- a/image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100 ++++ b/image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100 +@@ -422,6 +422,9 @@ + MOZ_ASSERT(mSwizzleFn); + uint8_t* data = reinterpret_cast(aColormap); + mSwizzleFn(data, data, aColors); ++#if MOZ_BIG_ENDIAN() ++ SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors); ++#endif + } + + LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator, +diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp +--- a/image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 ++++ b/image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 +@@ -263,6 +263,9 @@ + case JCS_YCbCr: + // By default, we will output directly to BGRA. If we need to apply + // special color transforms, this may change. ++#if MOZ_BIG_ENDIAN() ++ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB; ++#else + switch (SurfaceFormat::OS_RGBX) { + case SurfaceFormat::B8G8R8X8: + mInfo.out_color_space = JCS_EXT_BGRX; +@@ -277,6 +280,7 @@ + mState = JPEG_ERROR; + return Transition::TerminateFailure(); + } ++#endif + break; + case JCS_CMYK: + case JCS_YCCK: +diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp +--- a/image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 ++++ b/image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 +@@ -361,7 +361,7 @@ + IResumable* aOnResume) { + MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!"); + +- return mLexer.Lex(aIterator, aOnResume, ++ LexerResult res = mLexer.Lex(aIterator, aOnResume, + [=](State aState, const char* aData, size_t aLength) { + switch (aState) { + case State::PNG_DATA: +@@ -371,6 +371,14 @@ + } + MOZ_CRASH("Unknown State"); + }); ++ ++#if MOZ_BIG_ENDIAN() ++ if(res.is() && res.as() == TerminalState::SUCCESS) { ++ NativeEndian::swapToLittleEndianInPlace((uint32_t*)(mImageData), mImageDataLength / 4); ++ } ++#endif ++ ++ return res; + } + + LexerTransition nsPNGDecoder::ReadPNGData( +diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp +--- a/image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 ++++ b/image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 +@@ -237,7 +237,12 @@ + // WebP doesn't guarantee that the alpha generated matches the hint in the + // header, so we always need to claim the input is BGRA. If the output is + // BGRX, swizzling will mask off the alpha channel. ++#if MOZ_BIG_ENDIAN() ++ mBuffer.colorspace = MODE_ARGB; ++ SurfaceFormat inFormat = mFormat; ++#else + SurfaceFormat inFormat = SurfaceFormat::OS_RGBA; ++#endif + + SurfacePipeFlags pipeFlags = SurfacePipeFlags(); + if (mFormat == SurfaceFormat::OS_RGBA && diff --git a/PKG/librewolf/patches/clang-sysroot-toolchain-fix.patch b/PKG/librewolf/patches/clang-sysroot-toolchain-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..898603f529316c280f9ee3255be29f12da508c0d --- /dev/null +++ b/PKG/librewolf/patches/clang-sysroot-toolchain-fix.patch @@ -0,0 +1,18 @@ +We need to pass --sysroot and --gcc-toolchain explicitly for cross compiling with glibc +because when the lld tries to link libc, it will read the gcc libc linker script which +includes absolute paths to actual libc files and without the sysroot argument it picks +the host ones, even though it discovered the linker script in the sysroot already. +linker-script = /usr/aarch64-linux-gnu/lib64/libc.so +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -725,6 +725,10 @@ + flags.append("--target=%s" % toolchain) + has_target = True + ++ if info.type == "clang" and not target.os == "WASI" and (info.cpu != target.cpu): ++ flags.append("--sysroot=/usr/%s" % toolchain) ++ flags.append("--gcc-toolchain=/usr") ++ + if not has_target and (not info.cpu or info.cpu != target.cpu): + same_arch = same_arch_different_bits() + if (target.cpu, info.cpu) in same_arch: diff --git a/PKG/librewolf/patches/firefox-146-musl-linux-sys-prctl-conflict.patch b/PKG/librewolf/patches/firefox-146-musl-linux-sys-prctl-conflict.patch new file mode 100644 index 0000000000000000000000000000000000000000..94a4f5bdd45c1d9e1ff168af8e4c7d699c4011bc --- /dev/null +++ b/PKG/librewolf/patches/firefox-146-musl-linux-sys-prctl-conflict.patch @@ -0,0 +1,14 @@ +Including linux/prrctl.h and sys/prctl.h with musl results in the redifinition +of `struct prctl_mm_map`. +--- a/third_party/libwebrtc/rtc_base/platform_thread_types.cc ++++ b/third_party/libwebrtc/rtc_base/platform_thread_types.cc +@@ -12,7 +12,9 @@ + + // IWYU pragma: begin_keep + #if defined(WEBRTC_LINUX) ++#if defined(__GLIBC__) + #include ++#endif + #include + #include + diff --git a/PKG/librewolf/patches/fix-fortify-system-wrappers.patch b/PKG/librewolf/patches/fix-fortify-system-wrappers.patch new file mode 100644 index 0000000000000000000000000000000000000000..614ff3921872d71aafd4f2361d1f69e56e424858 --- /dev/null +++ b/PKG/librewolf/patches/fix-fortify-system-wrappers.patch @@ -0,0 +1,12 @@ +diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild +index 07d48e7f97..d2ce2b2489 100644 +--- a/config/system-headers.mozbuild ++++ b/config/system-headers.mozbuild +@@ -225,7 +225,6 @@ system_headers = [ + "execinfo.h", + "extras.h", + "fcntl.h", +- "features.h", + "fenv.h", + "ffi.h", + "fibdef.h", diff --git a/PKG/librewolf/patches/fix-i686-ppc-musl.patch b/PKG/librewolf/patches/fix-i686-ppc-musl.patch new file mode 100644 index 0000000000000000000000000000000000000000..38a85b5922cdc93ef7a2db914085b5e443c4db5b --- /dev/null +++ b/PKG/librewolf/patches/fix-i686-ppc-musl.patch @@ -0,0 +1,11 @@ +--- a/mozglue/misc/StackWalk.cpp 2021-11-05 15:55:03.614609706 +0000 ++++ b/mozglue/misc/StackWalk.cpp 2021-10-28 19:03:47.000000000 +0100 +@@ -45,7 +45,7 @@ + # define MOZ_STACKWALK_SUPPORTS_MACOSX 0 + #endif + +-#if (defined(linux) && \ ++#if defined(__GLIBC__) && (defined(linux) && \ + ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \ + defined(HAVE__UNWIND_BACKTRACE))) + # define MOZ_STACKWALK_SUPPORTS_LINUX 1 diff --git a/PKG/librewolf/patches/lto-thin.patch b/PKG/librewolf/patches/lto-thin.patch new file mode 100644 index 0000000000000000000000000000000000000000..8cc8e99fd6622947783e6dbf66a798c6065e698e --- /dev/null +++ b/PKG/librewolf/patches/lto-thin.patch @@ -0,0 +1,14 @@ +diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk +index efbe482738..c5d125b10d 100644 +--- a/config/makefiles/rust.mk ++++ b/config/makefiles/rust.mk +@@ -92,7 +92,8 @@ ifndef rustflags_sancov + # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045. + ifndef MOZ_CODE_COVERAGE + ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE))) +-cargo_rustc_flags += -Clto$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat) ++cargo_rustc_flags += -Clto=thin ++export CARGO_PROFILE_RELEASE_LTO=thin + endif + # We need -Cembed-bitcode=yes for all crates when using -Clto. + RUSTFLAGS += -Cembed-bitcode=yes diff --git a/PKG/librewolf/patches/mallinfo.patch b/PKG/librewolf/patches/mallinfo.patch new file mode 100644 index 0000000000000000000000000000000000000000..0d704301f39f0d53f0e65663a20ad0d72443f030 --- /dev/null +++ b/PKG/librewolf/patches/mallinfo.patch @@ -0,0 +1,34 @@ +--- a/xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:12:20.844810044 +0100 ++++ b/xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:13:32.505133615 +0100 +@@ -123,6 +123,7 @@ + return GetProcSelfSmapsPrivate(aN); + } + ++#ifdef __GLIBC__ + # ifdef HAVE_MALLINFO + # define HAVE_SYSTEM_HEAP_REPORTER 1 + static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) { +@@ -142,6 +143,7 @@ + return NS_OK; + } + # endif ++#endif // __GLIBC__ + + #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__OpenBSD__) || defined(__FreeBSD_kernel__) +@@ -642,6 +644,7 @@ + return NS_OK; + } + ++#ifdef __GLIBC__ + # define HAVE_SYSTEM_HEAP_REPORTER 1 + // Windows can have multiple separate heaps. During testing there were multiple + // heaps present but the non-default ones had sizes no more than a few 10s of +@@ -698,6 +701,7 @@ + *aSizeOut = heapsSize; + return NS_OK; + } ++#endif // __GLIBC__ + + struct SegmentKind { + DWORD mState; diff --git a/PKG/librewolf/patches/ppc32-fix-build.patch b/PKG/librewolf/patches/ppc32-fix-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..b26a46cfe835a3318cacd247df0cd15d37630644 --- /dev/null +++ b/PKG/librewolf/patches/ppc32-fix-build.patch @@ -0,0 +1,36 @@ +This is not a complete/correct patch, but it makes firefox build. For now +mostly for tracking, so a real fix can be made, but right now it still +segfaults on start. + +Ref: https://hg.mozilla.org/mozilla-central/rev/08339a56f3ae +Ref: https://hg.mozilla.org/mozilla-central/rev/d16fcad6aa60 +Ref: https://hg.mozilla.org/mozilla-central/rev/ab87611d012e +Ref: https://hg.mozilla.org/mozilla-central/file/tip/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_linux.cpp + +--- a/xpcom/reflect/xptcall/xptcall.h ++++ b/xpcom/reflect/xptcall/xptcall.h +@@ -71,6 +71,11 @@ struct nsXPTCVariant { + ExtendedVal ext; + }; + ++#if defined(__powerpc__) && !defined(__powerpc64__) ++ // this field is still necessary on ppc32, as an address ++ // to it is taken certain places in xptcall ++ void *ptr; ++#endif + nsXPTType type; + uint8_t flags; + +@@ -91,7 +96,12 @@ struct nsXPTCVariant { + }; + + void ClearFlags() { flags = 0; } ++#if defined(__powerpc__) && !defined(__powerpc64__) ++ void SetIndirect() { ptr = &val; flags |= IS_INDIRECT; } ++ bool IsPtrData() const { return IsIndirect(); } ++#else + void SetIndirect() { flags |= IS_INDIRECT; } ++#endif + + bool IsIndirect() const { return 0 != (flags & IS_INDIRECT); } + diff --git a/PKG/librewolf/patches/rust-configure.patch b/PKG/librewolf/patches/rust-configure.patch new file mode 100644 index 0000000000000000000000000000000000000000..1e1123d000d5ea777afb3241802a1286604c07b0 --- /dev/null +++ b/PKG/librewolf/patches/rust-configure.patch @@ -0,0 +1,68 @@ +Mozilla rustc check does not support crossbuild: let's remove it +Remove calls to unwrap_rustup, they fail if rustup isn't present + +Do not try to figure out the rust target as it is broken on musl +instead use what is set in RUST_TARGET + +Skip extra checks on cross builds (broken for arm*) + +--- a/build/moz.configure/rust.configure 2020-12-12 01:35:33.000000000 +0100 ++++ b/build/moz.configure/rust.configure 2020-12-15 19:45:16.467750787 +0100 +@@ -91,9 +91,6 @@ + return unwrap + + +-rustc = unwrap_rustup(rustc, "rustc") +-cargo = unwrap_rustup(cargo, "cargo") +- + + set_config("CARGO", cargo) + set_config("RUSTC", rustc) +@@ -260,7 +257,9 @@ + data.setdefault(key, []).append(namespace(rust_target=t, target=info)) + return data + +- ++@imports('os') ++@imports(_from='mozbuild.util', _import='ensure_unicode') ++@imports(_from='mozbuild.util', _import='system_encoding') + def detect_rustc_target( + host_or_target, compiler_info, arm_target, rust_supported_targets + ): +@@ -382,12 +381,12 @@ + + return None + +- rustc_target = find_candidate(candidates) ++ rustc_target = os.environ['RUST_TARGET'] + + if rustc_target is None: + die("Don't know how to translate {} for rustc".format(host_or_target.alias)) + +- return rustc_target ++ return ensure_unicode(rustc_target, system_encoding) + + + @imports("os") +@@ -486,6 +485,7 @@ + host, compiler_info, arm_target, rust_supported_targets + ) + if rustc_target != rustc_host: ++ return rustc_host + if host.alias == rustc_target: + configure_host = host.alias + else: +@@ -507,7 +507,6 @@ + ) + ) + ) +- assert_rust_compile(host, rustc_target, rustc) + return rustc_target + + +@@ -521,7 +520,6 @@ + rustc_target = detect_rustc_target( + target, compiler_info, arm_target, rust_supported_targets + ) +- assert_rust_compile(target, rustc_target, rustc) + return rustc_target diff --git a/PKG/librewolf/patches/sandbox-sched_setscheduler.patch b/PKG/librewolf/patches/sandbox-sched_setscheduler.patch new file mode 100644 index 0000000000000000000000000000000000000000..5b3598f3f1c778b72bcbb270a053deb807b49bf6 --- /dev/null +++ b/PKG/librewolf/patches/sandbox-sched_setscheduler.patch @@ -0,0 +1,45 @@ +upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849 +diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp +index ed958bc..9824433 100644 +--- firefox-142.0.1/security/sandbox/linux/SandboxFilter.cpp 2025-08-27 05:19:55.000000000 +0200 ++++ - 2025-08-27 13:34:45.154107444 +0200 +@@ -1884,10 +1884,16 @@ + return Allow(); + case __NR_sched_get_priority_min: + case __NR_sched_get_priority_max: ++#ifndef __GLIBC__ ++ case __NR_sched_setscheduler: ++#endif + return Allow(); + case __NR_sched_getparam: + case __NR_sched_getscheduler: +- case __NR_sched_setscheduler: { ++#ifdef __GLIBC__ ++ case __NR_sched_setscheduler: ++#endif ++ { + Arg pid(0); + return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr)); + } +@@ -2077,13 +2083,21 @@ + case __NR_sched_getparam: + case __NR_sched_setparam: + case __NR_sched_getscheduler: ++#ifdef __GLIBC__ + case __NR_sched_setscheduler: ++#endif + case __NR_sched_getattr: + case __NR_sched_setattr: { + Arg pid(0); + return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr)); + } + ++#ifndef __GLIBC__ ++ // sched_setscheduler gets special treatment here (bug 1657849): ++ case __NR_sched_setscheduler: ++ return Allow(); ++#endif ++ + // The priority bounds are also used, sometimes (bug 1838675): + case __NR_sched_get_priority_min: + case __NR_sched_get_priority_max: diff --git a/PKG/librewolf/patches/sqlite-ppc.patch b/PKG/librewolf/patches/sqlite-ppc.patch new file mode 100644 index 0000000000000000000000000000000000000000..09f6e0568ca33a6d09d6c903fd077911a71526ac --- /dev/null +++ b/PKG/librewolf/patches/sqlite-ppc.patch @@ -0,0 +1,31 @@ +diff --git a/third_party/sqlite3/src/sqlite3.c b/third_party/sqlite3/src/sqlite3.c +index 9443127f46..c1e62086d2 100644 +--- a/third_party/sqlite3/src/sqlite3.c ++++ b/third_party/sqlite3/src/sqlite3.c +@@ -14875,7 +14875,7 @@ typedef INT16_TYPE LogEst; + # elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ + defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ +- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) ++ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(_M_ARM64) + # define SQLITE_BYTEORDER 1234 + # elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) + # define SQLITE_BYTEORDER 4321 +@@ -36338,7 +36338,7 @@ SQLITE_PRIVATE int sqlite3VListNameToNum(VList *pIn, const char *zName, int nNam + return (sqlite_uint64)hi << 32 | lo; + } + +-#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__)) ++#elif 0 + + __inline__ sqlite_uint64 sqlite3Hwtime(void){ + unsigned long long retval; +@@ -207003,7 +207003,7 @@ struct RtreeMatchArg { + # elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ + defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ +- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) ++ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(_M_ARM64) + # define SQLITE_BYTEORDER 1234 + # elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) + # define SQLITE_BYTEORDER 4321 diff --git a/PKG/librewolf/template b/PKG/librewolf/template new file mode 100644 index 0000000000000000000000000000000000000000..60d0a0f12054399a487c8d7466b2355c8caf2993 --- /dev/null +++ b/PKG/librewolf/template @@ -0,0 +1,285 @@ +# Template file for 'librewolf' +pkgname=librewolf +version=147.0.1 +revision=1 +_rev=3 +wrksrc=${pkgname}-${version}-${_rev} +build_helper="rust" +short_desc="LibreWolf web browser" +maintainer="index " +license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0" +homepage="https://librewolf.net/" +distfiles="https://codeberg.org/api/packages/librewolf/generic/librewolf-source/${version}-${_rev}/${pkgname}-${version}-${_rev}.source.tar.gz" +checksum=ec53e549d9165772bec73d127564098055c414bdab05261e282bfb7d9ba1c1f5 + +lib32disabled=yes + +_llvmver=21 +hostmakedepends="unzip zip pkg-config perl python3 yasm rust + cargo llvm${_llvmver} clang${_llvmver} lld${_llvmver} nodejs cbindgen nasm which + tar xz $(vopt_if pgo 'xvfb-run dbus mesa-dri vulkan-loader pciutils') + $(vopt_if wasi wasi-sdk)" +makedepends="nss-devel libjpeg-turbo-devel gtk+3-devel + pixman-devel libevent-devel libnotify-devel libvpx-devel libwebp-devel + libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std + libXdamage-devel freetype-devel $(vopt_if wasi wasi-sdk) + $(vopt_if alsa alsa-lib-devel) $(vopt_if dbus dbus-glib-devel) + $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if xscreensaver libXScrnSaver-devel) + $(vopt_if sndio sndio-devel) $(vopt_if jack jack-devel)" +depends="nss>=3.72 nspr>=4.32 desktop-file-utils hicolor-icon-theme pciutils" + +build_options="alsa jack dbus pulseaudio xscreensaver sndio wayland lto pgo clang wasi debug" +build_options_default="alsa jack dbus pulseaudio xscreensaver sndio wayland clang wasi" + +if [ "$XBPS_WORDSIZE" != "32" ]; then + build_options_default+=" debug" +fi + +desc_option_lto="Enable Link Time Optimization" +desc_option_pgo="Enable Profile-guided Optimization" +desc_option_clang="Build with clang" +desc_option_wasi="Build wasm sandboxed libraries" + +case $XBPS_TARGET_MACHINE in + armv[56]*) broken="required NEON extensions are not supported on armv6" ;; + ppc64*) ;; + ppc*) broken="xptcall bitrot" ;; +esac + +if [ "$CROSS_BUILD" -a "$build_option_pgo" ]; then + broken="pgo can't be enabled for cross-compilation" +fi + +# we need this because cargo verifies checksums of all files in vendor +# crates when it builds and gives us no way to override or update the +# file sanely... so just clear out the file list +_clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json +} + +post_extract() { + case "$XBPS_TARGET_MACHINE" in + *-musl) + cp "${FILESDIR}/stab.h" toolkit/crashreporter/google-breakpad/src/ + ;; + esac + + # Mozilla API keys (see https://location.services.mozilla.com/api) + # Note: This is for Void Linux use ONLY. + echo -n "cd894504-7a2a-4263-abff-ff73ee89ffca" > mozilla-api-key +} + +post_patch() { + : # _clear_vendor_checksums num-traits + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + vsed -e '\;sys/single_threaded.h;d' -i config/system-headers.mozbuild + fi +} + +do_build() { + export AS="${CC}" + export CFLAGS="-O2" + export CXXFLAGS="-O2" + unset HOST_CFLAGS + unset HOST_CXXFLAGS + export LDFLAGS="-Wl,-rpath=/usr/lib/librewolf" + # export LDFLAGS+="-Wl,--threads=${XBPS_MAKEJOBS}" + + if [ "$build_option_clang" ]; then + export CC=clang + export CXX=clang++ + export AR=llvm-ar + export NM=llvm-nm + export HOST_CC=clang + export HOST_CXX=clang++ + fi + + disable_jemalloc() { + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + echo "ac_add_options --disable-jemalloc" + fi + } + + disable_elfhack() { + case "$XBPS_TARGET_MACHINE" in + x86_64*|i686*|arm*|aarch64*) echo "ac_add_options --disable-elf-hack" ;; + esac + } + + disable_webrtc() { + # it seems mozilla has started catching up with google's webrtc + # and this newly involves introducing several megabytes of generated + # json junk that we just cannot maintain in-tree, additionally they + # have indicated that they will be re-generating these frequently + # + # it is unacceptable to keep a 7MB patch downstream, so disable it + # + # https://phabricator.services.mozilla.com/D134738 + # + case "$XBPS_TARGET_MACHINE" in + armv7l*) echo "ac_add_options --disable-webrtc" ;; + esac + + # third_party/libwebrtc/common_audio/wav_file.cc:93:2: error: + # #error "Need to convert samples to big-endian when reading from WAV file" + if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then + echo "ac_add_options --disable-webrtc" + fi + } + + disable_wasi() { + if [ "$build_option_wasi" ]; then + echo "ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot" + else + echo "ac_add_options --without-wasm-sandboxed-libraries" + fi + } + + cat <<-! >mozconfig + ac_add_options --prefix=/usr + ac_add_options --libdir=/usr/lib + ac_add_options --host=${XBPS_TRIPLET} + ac_add_options --target=${XBPS_CROSS_TRIPLET:-${XBPS_TRIPLET}} + ac_add_options --enable-linker=$(vopt_if clang lld bfd) + ac_add_options --disable-bootstrap + $(vopt_if lto 'ac_add_options --enable-lto=cross') + $(vopt_if clang 'ac_add_options --with-libclang-path=/usr/lib') + + ac_add_options --enable-application=browser + ac_add_options --enable-release + ac_add_options --enable-hardening + ac_add_options --enable-optimize="\${CFLAGS}" + ac_add_options --enable-path-remapping=c,rust + ac_add_options --enable-packed-relative-relocs + ac_add_options --disable-cargo-incremental + ac_add_options --disable-tests + ac_add_options --disable-crashreporter + ac_add_options --disable-updater + ac_add_options --disable-install-strip + ac_add_options --disable-strip + ac_add_options --disable-profiling + $(disable_jemalloc) + $(disable_elfhack) + $(disable_webrtc) + $(disable_wasi) + ac_add_options --with-mozilla-api-keyfile="${wrksrc}/mozilla-api-key" + ac_add_options --enable-system-pixman + ac_add_options --with-system-ffi + ac_add_options --with-system-jpeg + ac_add_options --with-system-libevent + ac_add_options --with-system-libvpx + ac_add_options --with-system-nspr + ac_add_options --with-system-nss + ac_add_options --with-system-webp + ac_add_options --with-system-zlib + # XXX: the system's libpng doesn't have APNG support + ac_add_options --without-system-png + ac_add_options --with-unsigned-addon-scopes=app,system + ac_add_options --allow-addon-sideload + ac_add_options $(vopt_enable dbus) + ac_add_options $(vopt_enable dbus necko-wifi) + ac_add_options --disable-audio-backends + ac_add_options $(vopt_enable alsa) + ac_add_options $(vopt_enable jack) + ac_add_options $(vopt_enable pulseaudio) + ac_add_options $(vopt_enable sndio) + ac_add_options --enable-default-toolkit=$(vopt_if wayland 'cairo-gtk3-wayland' 'cairo-gtk3') + + mk_add_options MOZ_OBJDIR="${wrksrc}/obj" + + # LibreWolf + MOZ_APP_REMOTINGNAME=librewolf + ac_add_options --disable-debug + ac_add_options --disable-default-browser-agent + # ac_add_options --enable-rust-simd + + ac_add_options --with-app-name=librewolf + ac_add_options --with-branding=browser/branding/librewolf + ac_add_options --with-l10n-base=$PWD/lw/l10n + + export MOZ_REQUIRE_SIGNING= + + mk_add_options MOZ_CRASHREPORTER=0 + mk_add_options MOZ_DATA_REPORTING=0 + mk_add_options MOZ_SERVICES_HEALTHREPORT=0 + mk_add_options MOZ_TELEMETRY_REPORTING=0 + ! + + # XXX: setting --enable-debug/--enable-debug-symbols explicitly + # seems to result in a laggy/crashy firefox. + if [ -z "$build_option_debug" ]; then + echo "ac_add_options --disable-debug-symbols" >>mozconfig + echo "ac_add_options --disable-debug" >>mozconfig + fi + + # work around large debug symbols on 32-bit hosts + if [ "$XBPS_WORDSIZE" = "32" ]; then + echo "ac_add_options --disable-debug-symbols" >>mozconfig + echo "ac_add_options --disable-debug" >>mozconfig + export LDFLAGS+=" -Wl,--no-keep-memory" + fi + + if [ "$SOURCE_DATE_EPOCH" ]; then + export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S") + fi + + export MOZ_MAKE_FLAGS="${makejobs}" + export MOZ_NOSPAM=1 + export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild" + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system + + rm -f old-configure + + if [ "$build_option_pgo" ]; then + cp mozconfig{,.orig} + echo "ac_add_options --enable-profile-generate=cross" >> mozconfig + + ./mach build + ./mach package + LLVM_PROFDATA=llvm-profdata \ + JARLOG_FILE="$PWD/jarlog" \ + GDK_BACKEND=x11 \ + LD_LIBRARY_PATH="$PWD/obj/dist/firefox" \ + XDG_RUNTIME_DIR="$(mktemp -d "${wrksrc}/pgo-runtime-XXXXXX")" \ + MOZ_ENABLE_WAYLAND=0 \ + xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \ + dbus-run-session -- ./mach python build/pgo/profileserver.py + + test -s merged.profdata + test -s jarlog + + ./mach clobber objdir + + cp mozconfig{.orig,} + cat <<-! >>mozconfig + ac_add_options --enable-lto=cross,full + ac_add_options --enable-profile-use=cross + ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata + ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog + ! + fi + + ./mach build +} + +do_install() { + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system + export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild" + DESTDIR="$DESTDIR" ./mach install + + vinstall ${FILESDIR}/vendor.js 644 usr/lib/librewolf/browser/defaults/preferences + vinstall ${FILESDIR}/librewolf.desktop 644 /usr/share/applications/ + + for i in 16x16 32x32 48x48 64x64 128x128; do + vinstall ${wrksrc}/browser/branding/librewolf/default${i%x*}.png 644 \ + usr/share/icons/hicolor/${i}/apps librewolf.png + done + + # We don't want the development stuff + rm -rf ${DESTDIR}/usr/{include,lib/firefox-devel,share/idl} + + # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 + ln -sf librewolf ${DESTDIR}/usr/lib/librewolf/librewolf-bin + + ln -sf librewolf ${DESTDIR}/usr/bin/librewolf-wayland +} \ No newline at end of file diff --git a/PKG/ncurses/files/base-files b/PKG/ncurses/files/base-files new file mode 100644 index 0000000000000000000000000000000000000000..995639ab95e84301185a7e957016b9698d77c6ce --- /dev/null +++ b/PKG/ncurses/files/base-files @@ -0,0 +1,110 @@ +/usr/share/terminfo/A/Apple_Terminal +/usr/share/terminfo/E/Eterm +/usr/share/terminfo/E/Eterm-256color +/usr/share/terminfo/E/Eterm-88color +/usr/share/terminfo/E/Eterm-color +/usr/share/terminfo/a/ansi +/usr/share/terminfo/a/ansi80x25 +/usr/share/terminfo/a/ansis +/usr/share/terminfo/c/cons25 +/usr/share/terminfo/c/cygwin +/usr/share/terminfo/d/dumb +/usr/share/terminfo/g/gnome +/usr/share/terminfo/g/gnome-2007 +/usr/share/terminfo/g/gnome-256color +/usr/share/terminfo/g/gnome-fc5 +/usr/share/terminfo/g/gnome-rh62 +/usr/share/terminfo/g/gnome-rh72 +/usr/share/terminfo/g/gnome-rh80 +/usr/share/terminfo/g/gnome-rh90 +/usr/share/terminfo/h/hurd +/usr/share/terminfo/j/jfbterm +/usr/share/terminfo/k/kon +/usr/share/terminfo/k/kon2 +/usr/share/terminfo/l/linux +/usr/share/terminfo/m/mach +/usr/share/terminfo/m/mach-bold +/usr/share/terminfo/m/mach-color +/usr/share/terminfo/m/mlterm +/usr/share/terminfo/m/mrxvt +/usr/share/terminfo/n/nsterm +/usr/share/terminfo/n/nxterm +/usr/share/terminfo/p/pcansi +/usr/share/terminfo/p/putty +/usr/share/terminfo/p/putty-256color +/usr/share/terminfo/p/putty-vt100 +/usr/share/terminfo/r/rxvt +/usr/share/terminfo/r/rxvt-16color +/usr/share/terminfo/r/rxvt-256color +/usr/share/terminfo/r/rxvt-88color +/usr/share/terminfo/r/rxvt-basic +/usr/share/terminfo/r/rxvt-color +/usr/share/terminfo/r/rxvt-cygwin +/usr/share/terminfo/r/rxvt-cygwin-native +/usr/share/terminfo/r/rxvt-xpm +/usr/share/terminfo/s/screen +/usr/share/terminfo/s/screen-16color +/usr/share/terminfo/s/screen-16color-bce +/usr/share/terminfo/s/screen-16color-bce-s +/usr/share/terminfo/s/screen-16color-s +/usr/share/terminfo/s/screen-256color +/usr/share/terminfo/s/screen-256color-bce +/usr/share/terminfo/s/screen-256color-bce-s +/usr/share/terminfo/s/screen-256color-s +/usr/share/terminfo/s/screen-bce +/usr/share/terminfo/s/screen-s +/usr/share/terminfo/s/screen-w +/usr/share/terminfo/s/screen.linux +/usr/share/terminfo/s/screen.mlterm +/usr/share/terminfo/s/screen.rxvt +/usr/share/terminfo/s/screen.teraterm +/usr/share/terminfo/s/screen.xterm-new +/usr/share/terminfo/s/screen.xterm-r6 +/usr/share/terminfo/s/screen.xterm-xfree86 +/usr/share/terminfo/s/sun +/usr/share/terminfo/s/sun1 +/usr/share/terminfo/s/sun2 +/usr/share/terminfo/t/teraterm +/usr/share/terminfo/v/vs100 +/usr/share/terminfo/v/vt100 +/usr/share/terminfo/v/vt100-am +/usr/share/terminfo/v/vt100-nav +/usr/share/terminfo/v/vt102 +/usr/share/terminfo/v/vt200 +/usr/share/terminfo/v/vt220 +/usr/share/terminfo/v/vt52 +/usr/share/terminfo/w/wsvt25 +/usr/share/terminfo/w/wsvt25m +/usr/share/terminfo/x/xfce +/usr/share/terminfo/x/xterm +/usr/share/terminfo/x/xterm-1002 +/usr/share/terminfo/x/xterm-1003 +/usr/share/terminfo/x/xterm-16color +/usr/share/terminfo/x/xterm-24 +/usr/share/terminfo/x/xterm-256color +/usr/share/terminfo/x/xterm-88color +/usr/share/terminfo/x/xterm-8bit +/usr/share/terminfo/x/xterm-basic +/usr/share/terminfo/x/xterm-bold +/usr/share/terminfo/x/xterm-color +/usr/share/terminfo/x/xterm-hp +/usr/share/terminfo/x/xterm-new +/usr/share/terminfo/x/xterm-nic +/usr/share/terminfo/x/xterm-noapp +/usr/share/terminfo/x/xterm-old +/usr/share/terminfo/x/xterm-pcolor +/usr/share/terminfo/x/xterm-r5 +/usr/share/terminfo/x/xterm-r6 +/usr/share/terminfo/x/xterm-sco +/usr/share/terminfo/x/xterm-sun +/usr/share/terminfo/x/xterm-vt220 +/usr/share/terminfo/x/xterm-vt52 +/usr/share/terminfo/x/xterm-xf86-v32 +/usr/share/terminfo/x/xterm-xf86-v33 +/usr/share/terminfo/x/xterm-xf86-v333 +/usr/share/terminfo/x/xterm-xf86-v40 +/usr/share/terminfo/x/xterm-xf86-v43 +/usr/share/terminfo/x/xterm-xf86-v44 +/usr/share/terminfo/x/xterm-xfree86 +/usr/share/terminfo/x/xterm-xi +/usr/share/terminfo/x/xterms diff --git a/PKG/ncurses/template b/PKG/ncurses/template new file mode 100644 index 0000000000000000000000000000000000000000..9b4a8314d9c8addc7f464f15d2f1fd29ba3dfe3d --- /dev/null +++ b/PKG/ncurses/template @@ -0,0 +1,177 @@ +# Template file for 'ncurses' +pkgname=ncurses +version=6.6 +revision=1 +bootstrap=yes +configure_args="--enable-big-core" +short_desc="System V Release 4.0 curses emulation library" +maintainer="Enno Boland " +license="MIT" +homepage="https://invisible-island.net/ncurses/" +changelog="https://invisible-island.net/ncurses/announce.html" +distfiles="https://invisible-island.net/archives/ncurses/ncurses-${version}.tar.gz" +checksum=355b4cbbed880b0381a04c46617b7656e362585d52e9cf84a67e2009b749ff11 + +depends="ncurses-base-${version}_${revision}" + +do_configure() { + export CFLAGS="$CFLAGS -fPIC" + export BUILD_CFLAGS="$BUILD_CFLAGS -fPIC" + + mkdir -p ncurses-build ncursesw-build + + cd ${wrksrc}/ncursesw-build + # widec build + ../configure ${configure_args} \ + --with-shared --without-debug \ + --with-manpage-symlinks --with-manpage-format=normal \ + --without-ada --enable-ext-colors --with-xterm-kbs=del \ + --without-tests --enable-pc-files \ + --with-pkg-config-libdir=/usr/lib/pkgconfig \ + ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config \ + PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig \ + BUILD_CFLAGS="$BUILD_CFLAGS" + + cd ${wrksrc}/ncurses-build + # non-widec build + ../configure ${configure_args} --with-shared \ + --disable-widec --without-debug --without-ada --without-tests --with-xterm-kbs=del \ + --enable-pc-files --with-pkg-config-libdir=/usr/lib/pkgconfig \ + ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config \ + PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig \ + BUILD_CFLAGS="$BUILD_CFLAGS" +} + +do_build() { + cd ${wrksrc}/ncursesw-build + make ${makejobs} + + cd ${wrksrc}/ncurses-build + make ${makejobs} +} + +do_install() { + vlicense COPYING + + cd ${wrksrc}/ncursesw-build + make DESTDIR=${DESTDIR} install + + # Fool packages looking to link to non-wide-character ncurses libraries + for lib in curses ncurses form panel menu; do + rm -f ${DESTDIR}/usr/lib/lib${lib}.so + echo "INPUT(-l${lib}w)" >${DESTDIR}/usr/lib/lib${lib}.so + chmod 755 ${DESTDIR}/usr/lib/lib${lib}.so + ln -sf lib${lib}w.a ${DESTDIR}/usr/lib/lib${lib}.a + done + ln -sf libncurses++w.a ${DESTDIR}/usr/lib/libncurses++.a + + # Some packages look for -lcurses during build + rm -f ${DESTDIR}/usr/lib/libcursesw.so + echo "INPUT(-lncursesw)" >${DESTDIR}/usr/lib/libcursesw.so + chmod 755 ${DESTDIR}/usr/lib/libcursesw.so + ln -sf libncurses.so ${DESTDIR}/usr/lib/libcurses.so + ln -sf libncursesw.a ${DESTDIR}/usr/lib/libcursesw.a + ln -sf libncurses.a ${DESTDIR}/usr/lib/libcurses.a + + # non-widec compatibility library + cd ${wrksrc}/ncurses-build + install -Dm755 lib/libncurses.so.${version} \ + ${DESTDIR}/usr/lib/libncurses.so.${version} + ln -sf libncurses.so.${version} \ + ${DESTDIR}/usr/lib/libncurses.so.${version:0:1} + + # Create libtinfo symlinks. + ln -sfr ${DESTDIR}/usr/lib/libncursesw.so \ + ${DESTDIR}/usr/lib/libtinfo.so + ln -sfr ${DESTDIR}/usr/lib/libncursesw.so.${version} \ + ${DESTDIR}/usr/lib/libtinfo.so.${version} + ln -sfr ${DESTDIR}/usr/lib/libtinfo.so.${version} \ + ${DESTDIR}/usr/lib/libtinfo.so.${version:0:1} + ln -sfr ${DESTDIR}/usr/lib/pkgconfig/ncursesw.pc \ + ${DESTDIR}/usr/lib/pkgconfig/tinfo.pc + + # Remove broken symlink. + rm -f ${DESTDIR}/usr/lib/terminfo + + if [ "$CROSS_BUILD" ]; then + sed -i -e "s,-L$XBPS_CROSS_BASE,-L,g" ${DESTDIR}/usr/bin/ncursesw6-config + fi +} + +post_install() { + # resolve conflict with *-terminfo packages + rm ${DESTDIR}/usr/share/terminfo/a/alacritty{,-direct} + rm ${DESTDIR}/usr/share/terminfo/c/contour{,-direct,-latest} + rm ${DESTDIR}/usr/share/terminfo/d/dvtm{,-256color} + rm ${DESTDIR}/usr/share/terminfo/s/st{,-256color} + rm ${DESTDIR}/usr/share/terminfo/f/foot{,-direct,+base} + rm ${DESTDIR}/usr/share/terminfo/r/rio{,-direct} + rm ${DESTDIR}/usr/share/terminfo/w/wezterm +} + +ncurses-libs_package() { + short_desc+=" -- shared libraries" + pkg_install() { + vmove "usr/lib/libform*.so.*" + vmove "usr/lib/libmenu*.so.*" + vmove "usr/lib/libncurses*.so.*" + vmove "usr/lib/libpanel*.so.*" + } +} +ncurses-devel_package() { + depends="ncurses-libs-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove "usr/bin/ncurses*-config" + vmove usr/include + vmove usr/lib/pkgconfig/ncursesw.pc + vmove usr/lib/pkgconfig/formw.pc + vmove usr/lib/pkgconfig/menuw.pc + vmove usr/lib/pkgconfig/ncurses++w.pc + vmove usr/lib/pkgconfig/panelw.pc + vmove "usr/lib/*.a" + vmove "usr/lib/libcurses*.so" + vmove "usr/lib/libform*.so" + vmove "usr/lib/libmenu*.so" + vmove "usr/lib/libncurses*.so" + vmove "usr/lib/libpanel*.so" + vmove usr/share/man/man3 + vmove usr/share/man/man1/ncursesw6-config.1 + } +} +ncurses-base_package() { + short_desc+=" - base terminfo files" + pkg_install() { + cat ${FILESDIR}/base-files | while read line; do + vmove ${line} + done + } +} +ncurses-term_package() { + depends="ncurses-base-${version}_${revision}" + short_desc+=" - full terminal descriptions" + pkg_install() { + vmove usr/share/tabset + vmove usr/share/terminfo + } +} + +ncurses-libtinfo-libs_package() { + depends="ncurses-libs-${version}_${revision}" + short_desc+=" - libtinfo.so symlink" + shlib_provides="libtinfo.so.6" + pkg_install() { + vmove "usr/lib/libtinfo*.so.*" + } +} + +ncurses-libtinfo-devel_package() { + lib32mode=full + depends="ncurses-devel-${version}_${revision}" + depends+=" ncurses-libtinfo-libs-${version}_${revision}" + short_desc+=" - libtinfo.so symlink - development files" + pkg_install() { + vmove usr/lib/libtinfo.so + vmove "usr/lib/pkgconfig/tinfo.pc" + } +} diff --git a/PKG/neko-backgrounds/template b/PKG/neko-backgrounds/template new file mode 100644 index 0000000000000000000000000000000000000000..2229c53beed749a4f68ef46f37ebc7c34db283ca --- /dev/null +++ b/PKG/neko-backgrounds/template @@ -0,0 +1,16 @@ +# Template file for 'neko-backgrounds' +pkgname=neko-backgrounds +version=6.5 +revision=1 +archs=x86_64 +wrksrc="neko-backgrounds" +short_desc="Colección de fondos de pantalla Neko" +maintainer="JavierC" +license="GPL-3.0-or-later" +homepage="https://codeberg.org/javiercplus/neko-backgrounds" +distfiles="https://codeberg.org/javiercplus/neko-backgrounds/archive/${version}.tar.gz" +checksum=f53f4ab3815a6bd2aa73fc7ea682fdd1387e3cc8bff6c8dc2995a4e626540417 + +do_install() { + vcopy usr/share usr +} diff --git a/PKG/neko-icons/template b/PKG/neko-icons/template new file mode 100644 index 0000000000000000000000000000000000000000..9d85f433dd57a41e2208547f92fa2e32b2b25687 --- /dev/null +++ b/PKG/neko-icons/template @@ -0,0 +1,16 @@ +# Template file for 'neko-icons' +pkgname=neko-icons +version=6.5 +revision=1 +archs=x86_64 +wrksrc="neko-icons" +short_desc="Colección de iconos Neko" +maintainer="JavierC" +license="GPL-3.0-or-later" +homepage="https://codeberg.org/javiercplus/icons" +distfiles="https://codeberg.org/javiercplus/neko-icons/archive/${version}.tar.gz" +checksum=24aaa777f9d88aecea3e9fc01175f9e6f1c8e05126f331635c9cb925f7431a1e + +do_install() { + vcopy usr/share usr +} diff --git a/PKG/neko-themes/template b/PKG/neko-themes/template new file mode 100644 index 0000000000000000000000000000000000000000..3e8716e3e8e04f24c879f0ec91e0523ebf1ec96a --- /dev/null +++ b/PKG/neko-themes/template @@ -0,0 +1,16 @@ +# Template file for 'neko-themes' +pkgname=neko-themes +version=6.5 +revision=1 +archs=x86_64 +wrksrc="neko-themes" +short_desc="Colección de temas" +maintainer="JavierC" +license="GPL-3.0-or-later" +homepage="https://codeberg.org/javiercplus/neko-themes" +distfiles="https://codeberg.org/javiercplus/neko-themes/archive/${version}.tar.gz" +checksum=471c385228d26e8a4b3e993f4de0374020c752dd4f0b9a7d1e5e972510919606 + +do_install() { + vcopy usr/share usr +} diff --git a/PKG/portproton-void/README.md b/PKG/portproton-void/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9f71315a2ee5c58eb9f59ef5eb13c08cf1e9d659 --- /dev/null +++ b/PKG/portproton-void/README.md @@ -0,0 +1,95 @@ +# PortProton for Void Linux + +**PortProton** is an advanced graphical tool for installing and running Windows games and applications on Linux, using optimized Wine, Proton, and GE-Proton runtimes. Designed to be intuitive yet powerful, it manages multiple compatibility layers without interfering with your system packages. + +## 🌟 Features + +- ✅ Automatic installation of Wine/Proton/GE-Proton from official repositories +- ✅ Independent Wine prefix management per application +- ✅ Support for Steam, Epic, GOG games and `.exe`/`.msi` installers +- ✅ Graphical configuration of Wine options (DXVK, VKD3D, esync, fsync) +- ✅ Desktop integration (application menu, icons, MIME associations) +- ✅ **No system Wine dependency** – uses self-contained runtimes +- ✅ Optimized for modern hardware (Vulkan, Wayland/X11) + +## 📦 Installation on Void Linux + +### Option 1: with package .xbps +```bash +cd $HOME +wget https://codeberg.org/javiercplus/portproton-void/releases/download/1.7.5/portproton-1.7.5_1.x86_64.xbps +sudo xbps-rindex -a $HOME/portproton-1.7.5_1.x86_64.xbps +sudo xbps-install -R $PWD portproton + +``` + +### Option 2: Build from source (recommended currently) + +1. Clone the void-packages repository: +```bash +git clone https://github.com/void-linux/void-packages.git +cd void-packages +``` + +2. Initialize the build environment: +```bash +./xbps-src binary-bootstrap +``` + +3. Create the PortProton template: +```bash +mkdir -p srcpkgs/portproton +``` + +Save the following as `srcpkgs/portproton/template` (**critical fixes applied**): + + +4. Build and install: +```bash +./xbps-src pkg portproton +sudo xbps-install --repository=hostdir/binpkgs portproton +``` + +## ⚙️ System Requirements + +While PortProton **does not require system Wine** (it downloads its own runtimes), it needs multimedia and graphics libraries: + +| Component | Required Void Packages | +|-----------|------------------------| +| **Graphics** | `mesa`, `vulkan-loader`, `libglvnd` (+ `-32bit` variants on x86_64) | +| **Audio** | `libpulseaudio` or `pipewire`, `alsa-lib`, `libopenal` (+ `-32bit`) | +| **Multimedia** | `gstreamer1`, `gst-plugins-base1` (+ `-32bit`) | +| **USB/Hardware** | `usbutils`, `libusb`, `v4l-utils` | +| **GUI** | `gtk+3`, `yad`, `dbus` | + +> 💡 **x86_64 users**: 32-bit games require multilib support. Void provides this via `-32bit` packages (already included in the template). + +## 🚀 First Run Guide + +1. Launch PortProton: + ```bash + portproton + ``` + Or find "PortProton" in your application menu. + +2. **On first launch**: + - Select a runtime version (recommended: `GE-Proton` for gaming) + - PortProton will download ~2-5 GB of runtimes to `~/.portproton/` + - **No root access required** – everything stays in your home directory + + +- **Storage note**: All runtimes and prefixes live in `~/.portproton/` (user-writable, no root needed). + +## 🌐 Resources + +- [Official Repository](https://github.com/Castro-Fidel/PortProton_ALT) +- [Upstream Documentation](https://github.com/Castro-Fidel/PortProton_ALT/wiki) +- [Void Linux Packages](https://github.com/void-linux/void-packages) +- [Void Linux Handbook](https://docs.voidlinux.org/) +- [r/voidlinux Community](https://www.reddit.com/r/voidlinux/) + +--- + +> ℹ️ **Note**: PortProton is third-party software not officially maintained by Void Linux. Please report bugs upstream first, then to your packaging repository. + +✨ Happy gaming on Void Linux with PortProton! ✨ \ No newline at end of file diff --git a/PKG/portproton-void/portproton/ignore.ig b/PKG/portproton-void/portproton/ignore.ig new file mode 100644 index 0000000000000000000000000000000000000000..a96aa0ea9d8c443416d31c3a85dbe928f120cc23 --- /dev/null +++ b/PKG/portproton-void/portproton/ignore.ig @@ -0,0 +1 @@ +.. \ No newline at end of file diff --git a/PKG/portproton-void/portproton/template b/PKG/portproton-void/portproton/template new file mode 100644 index 0000000000000000000000000000000000000000..f85ecf25c32681a99688fa4b510abd2de9a17623 --- /dev/null +++ b/PKG/portproton-void/portproton/template @@ -0,0 +1,164 @@ +# Template file for 'portproton' +pkgname=portproton +version=1.7.5 +revision=1 +archs="x86_64" +short_desc="PortProton - a tool for installing Windows games and software on Linux" +maintainer="JavierC" +license="GPL-3.0-or-later" +homepage="https://codeberg.org/javiercplus/PortProton_ALT-void-patch" +distfiles="https://codeberg.org/javiercplus/PortProton_ALT-void-patch/archive/${version}.tar.gz" +checksum="2ab0e2b18a5e8467286bede2f22b2f43f2ff49196b589a49a2c7698d58b46c2f" + +hostmakedepends="desktop-file-utils gtk-update-icon-cache" +depends=" + cabextract + p7zip + curl + jq + yad + xdpyinfo + xrandr + setxkbmap + xterm + Vulkan-Tools + mesa-demos + usbutils + hwids + exiftool + squashfs-tools + ocl-icd + vulkan-loader + libpulseaudio + gstreamer1 + gst-plugins-base1 + alsa-lib + dbus + freetype + libpng + libjpeg-turbo + tiff + lcms2 + libgphoto2 + libxcb + libXext + libXfixes + libXrender + libXrandr + libXinerama + libXcursor + libXi + libXcomposite + libXdamage + libXtst + libXScrnSaver + libXxf86vm + libXv + libxkbcommon + libdrm + libglvnd + mesa + libpciaccess + libusb + v4l-utils + libsamplerate + libsndfile + audiofile + libopenal + zlib + ncurses + glib + gtk+3 + cairo + fontconfig + libICE + libSM + libXft + pcre2 + libvorbis + samba + perl +" + +if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then + depends+=" + vulkan-loader-32bit + libpulseaudio-32bit + gstreamer1-32bit + gst-plugins-base1-32bit + alsa-lib-32bit + freetype-32bit + libpng-32bit + libjpeg-turbo-32bit + tiff-32bit + lcms2-32bit + libgphoto2-32bit + libxcb-32bit + libX11-32bit + libXext-32bit + libXfixes-32bit + libXrender-32bit + libXrandr-32bit + libXinerama-32bit + libXcursor-32bit + libXi-32bit + libXcomposite-32bit + libXdamage-32bit + libXtst-32bit + libXScrnSaver-32bit + libXxf86vm-32bit + libXv-32bit + libxkbcommon-32bit + libdrm-32bit + libglvnd-32bit + mesa-32bit + libpciaccess-32bit + libusb-32bit + v4l-utils-32bit + libsamplerate-32bit + libsndfile-32bit + audiofile-32bit + libopenal-32bit + zlib-32bit + glib-32bit + gtk+3-32bit + cairo-32bit + fontconfig-32bit + libICE-32bit + libSM-32bit + libXft-32bit + libvorbis-32bit + " +fi + +do_install() { + # Crear estructura de directorios + vmkdir usr/lib/portproton + vmkdir usr/bin + vmkdir usr/share/applications + vmkdir usr/share/icons/hicolor/scalable/apps + vmkdir usr/share/metainfo + vmkdir usr/share/licenses/portproton + + # Copiar contenido + cp -r ${wrksrc}/* ${DESTDIR}/usr/lib/portproton/ + + # Hacer ejecutable el script principal + chmod +x ${DESTDIR}/usr/lib/portproton/portproton + chmod +x ${DESTDIR}/usr/lib/portproton/portprotonvoid + # Crear enlace simbólico + ln -sf /usr/lib/portproton/portproton ${DESTDIR}/usr/bin/portproton + ln -sf /usr/lib/portproton/portprotonvoid ${DESTDIR}/usr/bin/portprotonvoid + + # Instalar archivos + vinstall ${wrksrc}/ru.linux_gaming.PortProton.desktop 644 usr/share/applications + vinstall ${wrksrc}/ru.linux_gaming.PortProton.svg 644 usr/share/icons/hicolor/scalable/apps + vinstall ${wrksrc}/ru.linux_gaming.PortProton.metainfo.xml 644 usr/share/metainfo + vinstall ${wrksrc}/LICENSE 644 usr/share/licenses/portproton +} + +post_install() { + # Actualizar cachés + gtk-update-icon-cache -qf usr/share/icons/hicolor 2>/dev/null || true + update-desktop-database -q usr/share/applications 2>/dev/null || true +} \ No newline at end of file diff --git a/PKG/portproton/template b/PKG/portproton/template new file mode 100644 index 0000000000000000000000000000000000000000..f85ecf25c32681a99688fa4b510abd2de9a17623 --- /dev/null +++ b/PKG/portproton/template @@ -0,0 +1,164 @@ +# Template file for 'portproton' +pkgname=portproton +version=1.7.5 +revision=1 +archs="x86_64" +short_desc="PortProton - a tool for installing Windows games and software on Linux" +maintainer="JavierC" +license="GPL-3.0-or-later" +homepage="https://codeberg.org/javiercplus/PortProton_ALT-void-patch" +distfiles="https://codeberg.org/javiercplus/PortProton_ALT-void-patch/archive/${version}.tar.gz" +checksum="2ab0e2b18a5e8467286bede2f22b2f43f2ff49196b589a49a2c7698d58b46c2f" + +hostmakedepends="desktop-file-utils gtk-update-icon-cache" +depends=" + cabextract + p7zip + curl + jq + yad + xdpyinfo + xrandr + setxkbmap + xterm + Vulkan-Tools + mesa-demos + usbutils + hwids + exiftool + squashfs-tools + ocl-icd + vulkan-loader + libpulseaudio + gstreamer1 + gst-plugins-base1 + alsa-lib + dbus + freetype + libpng + libjpeg-turbo + tiff + lcms2 + libgphoto2 + libxcb + libXext + libXfixes + libXrender + libXrandr + libXinerama + libXcursor + libXi + libXcomposite + libXdamage + libXtst + libXScrnSaver + libXxf86vm + libXv + libxkbcommon + libdrm + libglvnd + mesa + libpciaccess + libusb + v4l-utils + libsamplerate + libsndfile + audiofile + libopenal + zlib + ncurses + glib + gtk+3 + cairo + fontconfig + libICE + libSM + libXft + pcre2 + libvorbis + samba + perl +" + +if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then + depends+=" + vulkan-loader-32bit + libpulseaudio-32bit + gstreamer1-32bit + gst-plugins-base1-32bit + alsa-lib-32bit + freetype-32bit + libpng-32bit + libjpeg-turbo-32bit + tiff-32bit + lcms2-32bit + libgphoto2-32bit + libxcb-32bit + libX11-32bit + libXext-32bit + libXfixes-32bit + libXrender-32bit + libXrandr-32bit + libXinerama-32bit + libXcursor-32bit + libXi-32bit + libXcomposite-32bit + libXdamage-32bit + libXtst-32bit + libXScrnSaver-32bit + libXxf86vm-32bit + libXv-32bit + libxkbcommon-32bit + libdrm-32bit + libglvnd-32bit + mesa-32bit + libpciaccess-32bit + libusb-32bit + v4l-utils-32bit + libsamplerate-32bit + libsndfile-32bit + audiofile-32bit + libopenal-32bit + zlib-32bit + glib-32bit + gtk+3-32bit + cairo-32bit + fontconfig-32bit + libICE-32bit + libSM-32bit + libXft-32bit + libvorbis-32bit + " +fi + +do_install() { + # Crear estructura de directorios + vmkdir usr/lib/portproton + vmkdir usr/bin + vmkdir usr/share/applications + vmkdir usr/share/icons/hicolor/scalable/apps + vmkdir usr/share/metainfo + vmkdir usr/share/licenses/portproton + + # Copiar contenido + cp -r ${wrksrc}/* ${DESTDIR}/usr/lib/portproton/ + + # Hacer ejecutable el script principal + chmod +x ${DESTDIR}/usr/lib/portproton/portproton + chmod +x ${DESTDIR}/usr/lib/portproton/portprotonvoid + # Crear enlace simbólico + ln -sf /usr/lib/portproton/portproton ${DESTDIR}/usr/bin/portproton + ln -sf /usr/lib/portproton/portprotonvoid ${DESTDIR}/usr/bin/portprotonvoid + + # Instalar archivos + vinstall ${wrksrc}/ru.linux_gaming.PortProton.desktop 644 usr/share/applications + vinstall ${wrksrc}/ru.linux_gaming.PortProton.svg 644 usr/share/icons/hicolor/scalable/apps + vinstall ${wrksrc}/ru.linux_gaming.PortProton.metainfo.xml 644 usr/share/metainfo + vinstall ${wrksrc}/LICENSE 644 usr/share/licenses/portproton +} + +post_install() { + # Actualizar cachés + gtk-update-icon-cache -qf usr/share/icons/hicolor 2>/dev/null || true + update-desktop-database -q usr/share/applications 2>/dev/null || true +} \ No newline at end of file diff --git a/PKG/protonup-qt/template b/PKG/protonup-qt/template new file mode 100644 index 0000000000000000000000000000000000000000..1582f82b2034ab5256822ddbbfe585861ef140b3 --- /dev/null +++ b/PKG/protonup-qt/template @@ -0,0 +1,29 @@ +# Template file for 'protonup-qt' +pkgname=protonup-qt +version=2.15.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel" +depends="python3-pyside6 python3-pyside6-gui python3-pyside6-widgets python3-pyside6-network python3-pyside6-ui-tools python3-pyside6-dbus python3-requests python3-vdf python3-inputs python3-xdg python3-steam python3-yaml python3-zstandard" +short_desc="Install and manage GE-Proton and Luxtorpeda for Steam and Wine-GE" +maintainer="JavierC" +license="GPL-3.0-or-later" +homepage="https://davidotek.github.io/protonup-qt" +changelog="https://raw.githubusercontent.com/DavidoTek/ProtonUp-Qt/main/CHANGELOG.md" +distfiles="https://github.com/DavidoTek/ProtonUp-Qt/archive/refs/tags/v${version}.tar.gz" +checksum=d06fae6748c811ac942e3cd2a1d3de3efbf330b442323580ebe9b581f39546da + +post_patch() { + # Corregir dependencias y el comando del ejecutable en el .desktop + vsed -i 's/PySide6-Essentials/PySide6/g' requirements.txt setup.py setup.cfg pyproject.toml 2>/dev/null || true + vsed -i 's/Exec=net.davidotek.pupgui2/Exec=protonup-qt/g' share/applications/net.davidotek.pupgui2.desktop +} + +post_install() { + # Instalamos el lanzador y la metadata + vinstall share/applications/net.davidotek.pupgui2.desktop 644 usr/share/applications + vinstall share/metainfo/net.davidotek.pupgui2.appdata.xml 644 usr/share/metainfo + + # Copiamos toda la carpeta de iconos hicolor a usr/share/icons/ + vcopy share/icons/hicolor usr/share/icons +} diff --git a/PKG/protonup-qtvoid/protonup-qt/template b/PKG/protonup-qtvoid/protonup-qt/template new file mode 100644 index 0000000000000000000000000000000000000000..1582f82b2034ab5256822ddbbfe585861ef140b3 --- /dev/null +++ b/PKG/protonup-qtvoid/protonup-qt/template @@ -0,0 +1,29 @@ +# Template file for 'protonup-qt' +pkgname=protonup-qt +version=2.15.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel" +depends="python3-pyside6 python3-pyside6-gui python3-pyside6-widgets python3-pyside6-network python3-pyside6-ui-tools python3-pyside6-dbus python3-requests python3-vdf python3-inputs python3-xdg python3-steam python3-yaml python3-zstandard" +short_desc="Install and manage GE-Proton and Luxtorpeda for Steam and Wine-GE" +maintainer="JavierC" +license="GPL-3.0-or-later" +homepage="https://davidotek.github.io/protonup-qt" +changelog="https://raw.githubusercontent.com/DavidoTek/ProtonUp-Qt/main/CHANGELOG.md" +distfiles="https://github.com/DavidoTek/ProtonUp-Qt/archive/refs/tags/v${version}.tar.gz" +checksum=d06fae6748c811ac942e3cd2a1d3de3efbf330b442323580ebe9b581f39546da + +post_patch() { + # Corregir dependencias y el comando del ejecutable en el .desktop + vsed -i 's/PySide6-Essentials/PySide6/g' requirements.txt setup.py setup.cfg pyproject.toml 2>/dev/null || true + vsed -i 's/Exec=net.davidotek.pupgui2/Exec=protonup-qt/g' share/applications/net.davidotek.pupgui2.desktop +} + +post_install() { + # Instalamos el lanzador y la metadata + vinstall share/applications/net.davidotek.pupgui2.desktop 644 usr/share/applications + vinstall share/metainfo/net.davidotek.pupgui2.appdata.xml 644 usr/share/metainfo + + # Copiamos toda la carpeta de iconos hicolor a usr/share/icons/ + vcopy share/icons/hicolor usr/share/icons +} diff --git a/PKG/protonup-qtvoid/python3-inputs/template b/PKG/protonup-qtvoid/python3-inputs/template new file mode 100644 index 0000000000000000000000000000000000000000..6ecd4aab5a17cfa33aedb67f973020758450a809 --- /dev/null +++ b/PKG/protonup-qtvoid/python3-inputs/template @@ -0,0 +1,13 @@ +# Template file for 'python3-inputs' +pkgname=python3-inputs +version=0.5 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel" +depends="python3" +short_desc="Cross-platform Python support for keyboards, mice and gamepads" +maintainer="Javierc" +license="MIT" +homepage="https://github.com/zeth/inputs" +distfiles="https://github.com/zeth/inputs/archive/refs/tags/v${version}.tar.gz" +checksum=d8e8a4b54747e102c4ab27f9eff0e6d64207690d7dbc75d2f6c6364881066fee diff --git a/PKG/protonup-qtvoid/python3-steam/template b/PKG/protonup-qtvoid/python3-steam/template new file mode 100644 index 0000000000000000000000000000000000000000..e15f3d1f289c246379a5cfaf3111685055bb87d2 --- /dev/null +++ b/PKG/protonup-qtvoid/python3-steam/template @@ -0,0 +1,14 @@ +# Template file for 'python3-steam' +pkgname=python3-steam +version=2.0.0alpha1 +revision=1 +build_style=python3-pep517 +_tag="v2.0.0-alpha1" +hostmakedepends="python3-setuptools python3-wheel" +depends="python3-pycryptodomex python3-requests python3-cachetools python3-vdf python3-gevent python3-protobuf python3-gevent python3-wsproto python3-zstandard" +short_desc="Python package for interacting with Steam (Solstice fork)" +maintainer="Tu Nombre " +license="MIT" +homepage="https://github.com/solsticegamestudios/steam" +distfiles="https://github.com/solsticegamestudios/steam/archive/refs/tags/${_tag}.tar.gz" +checksum=6447a3c97248885b44b73fec3bdcaee0421fe3e6e062d1bb195b9de3acc7eb0a diff --git a/PKG/protonup-qtvoid/python3-vdf-dev/template b/PKG/protonup-qtvoid/python3-vdf-dev/template new file mode 100644 index 0000000000000000000000000000000000000000..bae55f88fb92026ca9011177b2086f7a0451c6ea --- /dev/null +++ b/PKG/protonup-qtvoid/python3-vdf-dev/template @@ -0,0 +1,13 @@ +# Template file for 'python3-vdf-dev' +pkgname=python3-vdf-dev +version=4.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel" +depends="python3" +short_desc="Library for working with Valve VDF text format (Solstice fork)" +maintainer="Tu Nombre " +license="MIT" +homepage="https://github.com/solsticegamestudios/vdf" +distfiles="https://github.com/solsticegamestudios/vdf/archive/refs/tags/v${version}.tar.gz" +checksum=1d778663f1158be0f70aa1cdd5b2685ae6eee14e4d11a0d96684b7ed86e89c93 diff --git a/PKG/spicetify/template b/PKG/spicetify/template new file mode 100644 index 0000000000000000000000000000000000000000..1a333b18d42368a0b65a3381d3280a73990b97bc --- /dev/null +++ b/PKG/spicetify/template @@ -0,0 +1,25 @@ +# Template file for 'spicetify' +pkgname=spicetify +version=2.42.11 +revision=1 +build_style=go +go_import_path="github.com/spicetify/cli" +hostmakedepends="go" +short_desc="Command-line tool to customize Spotify client" +maintainer="JavierC" +license="LGPL-2.1-only" +homepage="https://spicetify.app/" +distfiles="https://github.com/spicetify/cli/archive/refs/tags/v${version}.tar.gz" +checksum=f1b8fc1ed32a128d9d432971085c6d698eaf31f70d8294c349607eba74a3108f + +post_install() { + # Instalamos los activos necesarios en una ruta global compartida + vmkdir usr/share/spicetify-cli + for d in Themes Extensions CustomApps jsHelper css-map.json globals.d.ts; do + vcopy "$d" usr/share/spicetify-cli + done + + # El sistema de construcción de Go genera el binario como 'cli' + # Lo renombramos a 'spicetify' para que sea el comando estándar + mv ${DESTDIR}/usr/bin/cli ${DESTDIR}/usr/bin/spicetify +} diff --git a/PKG/steam-bin/template b/PKG/steam-bin/template new file mode 100644 index 0000000000000000000000000000000000000000..62adec03c26e851f0792315377eedc2f3cf6fbaf --- /dev/null +++ b/PKG/steam-bin/template @@ -0,0 +1,50 @@ +pkgname=steam-bin +version=1.0.0.82 +revision=1 +archs="x86_64" +create_wrksrc=yes +short_desc="Digital distribution platform by Valve (binary version)" +maintainer="Javiercplus" +license="custom:Valve-EULA" +homepage="https://store.steampowered.com/about/" +distfiles="https://codeberg.org/javiercplus/STEAM-ALT-VOID/raw/branch/main/steam_latest.deb" +checksum=b44634a6a604ca7c8b23809d0f2a921a0348bb2081c8cb8944116d0799872b70 + +hostmakedepends="tar xz" + +depends="desktop-file-utils hicolor-icon-theme xdg-utils zenity + libgcc-32bit libstdc++-32bit libdrm-32bit libglvnd-32bit libibus libibus-32bit + mesa-vulkan-intel-32bit mesa-vulkan-radeon-32bit vulkan-loader-32bit + libopenal-32bit libXrandr-32bit libnm-32bit dbus-glib libXtst libdrm + libpciaccess libxshmfence nss-32bit nss p11-kit p11-kit-32bit gtk+-32bit gdk-pixbuf-32bit libcurl + gtk+-32bit libpipewire-32bit libva-32bit libvdpau-32bit libvdpau mesa-dri mesa-dri-32bit steam-udev-rules SDL2 SDL2-32bit" + +conflicts="steam" +provides="steam-${version}_${revision}" + +do_extract() { + # Al tener create_wrksrc=yes, ya estamos dentro de la carpeta correcta. + # Usamos 'ar' del sistema (que viene en el bootstrap) + ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/steam_latest.deb + tar xf data.tar.xz +} + +do_install() { + vmkdir usr/lib + cp -a usr/lib/steam ${DESTDIR}/usr/lib/ + + vmkdir usr/bin + cp -a usr/bin/* ${DESTDIR}/usr/bin/ + + vmkdir usr/share + for dir in applications doc icons man metainfo pixmaps; do + if [ -d usr/share/$dir ]; then + cp -a usr/share/$dir ${DESTDIR}/usr/share/ + fi + done + + vmkdir usr/lib/udev/rules.d + cp -a lib/udev/rules.d/*.rules ${DESTDIR}/usr/lib/udev/rules.d/ + + vlicense usr/share/doc/steam-launcher/copyright +} diff --git a/PKG/ungoogled-chromium-void/.github/PULL_REQUEST_TEMPLATE.md b/PKG/ungoogled-chromium-void/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000000000000000000000000000000..0c124af0b8fd47bedc0ccb70f196cb59699ff0ad --- /dev/null +++ b/PKG/ungoogled-chromium-void/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,6 @@ +**Checklist** +- [ ] Void template release ([Release](//github.com/void-linux/void-packages/tree/master/srcpkgs/chromium)) +- [ ] ungoogled-chromium release ([Release](//github.com/Eloston/ungoogled-chromium/releases)) +- Build + - [ ] x86-64 + - [ ] x86-64-musl \ No newline at end of file diff --git a/PKG/ungoogled-chromium-void/.github/workflows/create-release.yml b/PKG/ungoogled-chromium-void/.github/workflows/create-release.yml new file mode 100644 index 0000000000000000000000000000000000000000..40638a01e4bc1d1fbb07c114236555aaa3e42aaf --- /dev/null +++ b/PKG/ungoogled-chromium-void/.github/workflows/create-release.yml @@ -0,0 +1,143 @@ +name: Create release + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: false + +on: + workflow_dispatch: + push: + branches: + - master + paths: + - 'void-packages/srcpkgs/ungoogled-chromium/**' + +jobs: + Fetch: + if: github.repository == 'DAINRA/ungoogled-chromium-void' + runs-on: self-hosted + outputs: + ver: ${{ steps.version.outputs.ver }} + rev: ${{ steps.version.outputs.rev }} + skip_ci: ${{ steps.ci_skip_check.outputs.skip_ci }} + environment: + name: release + steps: + - name: Check for [ci-skip] in commit message + id: ci_skip_check + run: | + if echo "${{ github.event.head_commit.message }}" | grep -iqE '\[ci-skip\]|\[skip ci\]'; then + echo "CI skip detected. Skipping further steps." + echo "skip_ci=true" >> $GITHUB_OUTPUT + else + echo "skip_ci=false" >> $GITHUB_OUTPUT + fi + shell: bash + + - name: Fetch repository + if: steps.ci_skip_check.outputs.skip_ci == 'false' + uses: actions/checkout@v4 + with: + path: master + + - name: Fetch void-packages + if: steps.ci_skip_check.outputs.skip_ci == 'false' + uses: actions/checkout@v4 + with: + repository: void-linux/void-packages + path: void-packages + + - name: Configure void-packages + if: steps.ci_skip_check.outputs.skip_ci == 'false' + run: | + cp -r master/void-packages ./ 2>/dev/null + + - id: version + if: steps.ci_skip_check.outputs.skip_ci == 'false' + run: | + echo "ver=$( grep -m 1 'version=' master/void-packages/srcpkgs/ungoogled-chromium/template | awk -F '=' '{ print $2 }' )" >> $GITHUB_OUTPUT + echo "rev=$( grep -m 1 'revision=' master/void-packages/srcpkgs/ungoogled-chromium/template | awk -F '=' '{ print $2 }' )" >> $GITHUB_OUTPUT + + Bootstrap: + needs: [Fetch] + if: needs.Fetch.outputs.skip_ci == 'false' + strategy: + max-parallel: 1 + matrix: + arch: [x86_64, x86_64-musl] + runs-on: self-hosted + steps: + - name: Bootstrap ${{ matrix.arch }} + run: | + cd void-packages + ./xbps-src -H /repository -A ${{ matrix.arch }} binary-bootstrap + ./xbps-src -H /repository -A ${{ matrix.arch }} fetch ungoogled-chromium + + Configure: + needs: [Bootstrap] + if: needs.Fetch.outputs.skip_ci == 'false' + strategy: + max-parallel: 1 + matrix: + arch: [x86_64, x86_64-musl] + runs-on: self-hosted + steps: + - name: Configure ${{ matrix.arch }} + run: | + cd void-packages + ./xbps-src -H /repository -A ${{ matrix.arch }} -C configure ungoogled-chromium + + Build: + needs: [Fetch, Configure] + if: needs.Fetch.outputs.skip_ci == 'false' + strategy: + max-parallel: 1 + matrix: + arch: [x86_64, x86_64-musl] + runs-on: self-hosted + timeout-minutes: 1440 + env: + XBPS_TARGET_ARCH: ${{ matrix.arch }} + XBPS_PASSPHRASE: ${{ secrets.SUPERBIA }} + steps: + - name: Build ${{ matrix.arch }} + run: | + cd void-packages + ./xbps-src -H /repository -A ${{ matrix.arch }} -C pkg ungoogled-chromium + + - name: Sign ${{ matrix.arch }} package + run: | + cd /repository/binpkgs + rm -f ${{ matrix.arch }}-repodata + xbps-rindex -a ungoogled-chromium-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps + xbps-rindex -a ungoogled-chromium-qt6-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps + xbps-rindex --sign --signedby "Shiraori archive" --privkey /repository/shiraori.pem $PWD + xbps-rindex --sign-pkg --privkey /repository/shiraori.pem ungoogled-chromium-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps + xbps-rindex --sign-pkg --privkey /repository/shiraori.pem ungoogled-chromium-qt6-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps + + - name: Release ${{ matrix.arch }} assets + uses: softprops/action-gh-release@v2 + with: + body: | + Chromium release: ${{ needs.Fetch.outputs.ver }} + Ungoogled Chromium release: ${{ needs.Fetch.outputs.ver }}-${{ needs.Fetch.outputs.rev }} + files: | + /repository/binpkgs/ungoogled-chromium-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps + /repository/binpkgs/ungoogled-chromium-qt6-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps + /repository/binpkgs/ungoogled-chromium-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps.sig2 + /repository/binpkgs/ungoogled-chromium-qt6-${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }}.${{ matrix.arch }}.xbps.sig2 + /repository/binpkgs/${{ matrix.arch }}-repodata + tag_name: ${{ needs.Fetch.outputs.ver }}_${{ needs.Fetch.outputs.rev }} + + Cleanup: + needs: [Build] + if: needs.Fetch.outputs.skip_ci == 'false' + runs-on: self-hosted + steps: + - name: Cleanup old release files + uses: dev-drprasad/delete-older-releases@v0.3.3 + with: + keep_latest: 5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/PKG/ungoogled-chromium-void/LICENSE b/PKG/ungoogled-chromium-void/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5085022aa1cbd6b2604cc3d885cd9af3bdeb8ceb --- /dev/null +++ b/PKG/ungoogled-chromium-void/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, DAINRA +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/PKG/ungoogled-chromium-void/README.md b/PKG/ungoogled-chromium-void/README.md new file mode 100644 index 0000000000000000000000000000000000000000..af103bbe99b5dc975c12a455851e24acfba3db39 --- /dev/null +++ b/PKG/ungoogled-chromium-void/README.md @@ -0,0 +1,132 @@ +# Ungoogled Chromium for Void Linux +Ungoogled Chromium template and builds for Void Linux, based on the void-packages [chromium][1] template. + + +| **Component** | **Version** | +|-----------------------------------------------|--------------------| +| **[Chromium (google)](https://chromium.googlesource.com/chromium/src)** | `145.0.7632.116` | +| **[ungoogled-chromium (ungoogled-software)](https://github.com/ungoogled-software/ungoogled-chromium)** | `145.0.7632.116` | +| **[ungoogled-chromium-void (DAINRA)](https://github.com/DAINRA/ungoogled-chromium-void)** | `145.0.7632.116` | + +***Updated: 2026-02-25 22:22:13 UTC*** + + +## Content Overview + +- [**Building from sources**](#building-from-source) +- [**Binary release**](#binary-release) + - [Available builds](#available-builds) + - [Installing the binary package](#installing-the-binary-package) +- [**Troubleshooting**](#troubleshooting) + - [Musl crashes mitigation](#musl-crashes-mitigation) + - [General tweaks](#general-tweaks) +- [**Credits**](#credits) + +## Building from source + +> **Note** +> +> *Consult void-packages [documentation][2] for more information about setting it up.* +> +> [*Quick start*][2a] +> +> [*Building packages natively for the musl C library*][2b] + +Clone and setup the void-packages repository in a work directory and: + +```shell +git clone --depth=1 https://github.com/DAINRA/ungoogled-chromium-void.git +[[ -d void-packages/srcpkgs/ungoogled-chromium ]] && rm -r void-packages/srcpkgs/ungoogled-chromium +cp -r ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium void-packages/srcpkgs/ +cd void-packages +./xbps-src pkg ungoogled-chromium +``` + +## Binary release + +```shell +./xbps-src show-options ungoogled-chromium +=> ungoogled-chromium-142.0.7444.59_1: the following build options are set: + clang: Use clang to build (ON) + libcxx: Use bundled libc++ (ON) + pipewire: Enable support for screen sharing for WebRTC via PipeWire (ON) + pulseaudio: Enable support for the PulseAudio sound server (ON) + qt6: Enable support for qt6 (ON) + vaapi: Enable support for VA-API (ON) + debug: Build with debug symbols (OFF) + drumbrake: WebAssembly Interpreter (OFF) + lto: Enable Link Time Optimization (OFF) + sndio: Enable support for the sndio sound server (OFF) +``` + +### Available builds + +You can check the workflow file for the available builds: + +https://github.com/DAINRA/ungoogled-chromium-void/blob/17c6b58ef263d3dc2868102a0b9b6398de140c92/.github/workflows/create-release.yml#L35-L40 + +and the Actions tab for current [build progress](//github.com/DAINRA/ungoogled-chromium-void/actions/workflows/create-release.yml). + +### Installing the binary package + +#### Method 1 - manual update + +Download the `xbps` package from the [releases](//github.com/DAINRA/ungoogled-chromium-void/releases) page, index and install the package: + +```shell +xbps-rindex -a *.xbps +sudo xbps-install -vR $PWD ungoogled-chromium +``` + +#### Method 2 - updates handled by xbps-install + +Add the releases page as a repository: + +```shell +cat << EOF > /etc/xbps.d/20-ungoogled-chromium.conf +repository=https://github.com/DAINRA/ungoogled-chromium-void/releases/latest/download/ +EOF +xbps-install -Su ungoogled-chromium +``` + +First `xbps-install -S` run it will ask to import the repository key, same as [91:aa:05:51:81:3f:38:b6:6a:74:af:3f:40:2d:08:c3.plist](void-packages/common/repo-keys/91:aa:05:51:81:3f:38:b6:6a:74:af:3f:40:2d:08:c3.plist). + +## Troubleshooting + +- Although it is not included in the run dependencies, `gtk+3` package must be installed. +- To enable VAAPI add `--enable-features=VaapiVideoDecoder` to `CHROME_FLAGS` [environment variable][3]. + More info [vaapi.md][4]. Also check [Void Handbook][5] in case of problems. +- For VAAPI `--disable-features=UseChromeOSDirectVideoDecoder` might also be needed. + Check in `chrome://gpu` if `Video Decode: Hardware accelerated`. + +### Musl crashes mitigation + +- Make sure you have `dbus` running (on glibc it doesn't matter). + Symptoms: crashes, pages stalling and refusing to load until browser restart, plugin crashes. +- Try adding `--js-flags=--jitless` to `CHROME_FLAGS`. If nothing else, it's a security hardening option. + +### General tweaks + +- Lower ram usage: `--renderer-process-limit=2` [renderer-process-limit][6]. +- Reduce disk activity: `--disk-cache-size=1 --v8-cache-options=none` [disk-cache-size][7], [v8-cache-options][8]. +- Dark Mode: `chrome://flags/#enable-force-dark`. +- Global media controls can cause crashes either by opening or closing it, as described in this [issue][9]. + Either avoid using the feature or disable it completely (`--disable-features=GlobalMediaControls`). + +## Credits + +- [Ungoogled Chromium](//github.com/ungoogled-software/ungoogled-chromium) +- [The Void source packages collection](//github.com/void-linux/void-packages) +- [The Void (Linux) distribution](//voidlinux.org/) + +[1]: //github.com/void-linux/void-packages/blob/master/srcpkgs/chromium +[2]: //github.com/void-linux/void-packages/#readme +[2a]: //github.com/void-linux/void-packages/#quick-start +[2b]: //github.com/void-linux/void-packages/#building-for-musl +[3]: //wiki.archlinux.org/title/Environment_variables +[4]: //chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/gpu/vaapi.md +[5]: //docs.voidlinux.org/config/graphical-session/graphics-drivers/intel.html +[6]: //peter.sh/experiments/chromium-command-line-switches/#renderer-process-limit +[7]: //peter.sh/experiments/chromium-command-line-switches/#disk-cache-size +[8]: //peter.sh/experiments/chromium-command-line-switches/#v8-cache-options +[9]: //bugs.chromium.org/p/chromium/issues/detail?id=1314342 diff --git a/PKG/ungoogled-chromium-void/void-packages/common/repo-keys/91:aa:05:51:81:3f:38:b6:6a:74:af:3f:40:2d:08:c3.plist b/PKG/ungoogled-chromium-void/void-packages/common/repo-keys/91:aa:05:51:81:3f:38:b6:6a:74:af:3f:40:2d:08:c3.plist new file mode 100644 index 0000000000000000000000000000000000000000..a803950bf840312aebd8e56650ae294146a6bc87 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/common/repo-keys/91:aa:05:51:81:3f:38:b6:6a:74:af:3f:40:2d:08:c3.plist @@ -0,0 +1,12 @@ + + + + + public-key + LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUE3UFN1cDRvTnVSZy93SHhRVUZsaQpISWRlNDBQMnB2bzV6WEl1K1k2VGQ2TlFXQXpiVVh3NUVueFltWkwzb1Z6THpCSUMrU1IwSytzSDlmZHR5dGc3Cm9xalJ2aVp1Zm5nMkdyQXJQVlB4eTlNeXRTRU8yMFlya052OWVJQk9UOXVwTW9BMUViclpUSjVpU1V1OXQxb1gKVi9oanBIcVduUHU4MGgySkxnTWdvUzRrb0lSREhKbWdtazhFaXpDai9WUzFYQk9Ja29UREo5VUJKRkF2OVpIeQowOVFZZDNFY1RDMHUwR1JrY2thdE9jaE82Yk1OL3Fudmc5V1k4Zk53RHVRREhnYkFDTjNVc3cwVGVaLzFXV3ZDCmY4UmZpa1kvZFZuNk5EampTK3BHNHFHLytFUEZ3OWErdVJtb0ZNbW5hNGZmK3EvcUhjaWtyWEx3OUNFSTJ6bGMKYXdISUUrVTE3cy94NGV6UE9HK05naFBLMkFzWFgwTDZkWmZ5TzFsNWY1bi9Sc2ozT1AzTHJFc2pSdzl0TFAybApBcWRVNThEaVNkZ1FwY1VyUnl4YzJsaWd0WCtXb2lkUmtNSEM1eC9zcGxxT1NRbG4wOXlDM1ZYbHFvOUd0OFdQCnJMVlNUaEFkQUF1VU44dlNWNU1RZ25abS9iV2tMa0NBZTYyWkNMbjFsN1FXZC9qSmwxVEVLSElwTGplVFp4eGsKc0RzREVRMitLNndEYVA5MG14aTNvT0c4ZDNKeUw0aU9XSmhHK3B0dFg4eVlsU2lUQ05JQmVlckVzdWN5cDZlUApNVkZwTVlSbmhwTnpmaHRIRFF5YVlOOVoydUpKcGlSMWRUWDVWN0ZDUHlVZ1EwbVovOVFXM2lFNjZja0JUVDc5ClI0UUF5Rm1Nb2FaZ2dBT2xFMGZNT1pFQ0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo= + public-key-size + 4096 + signature-by + Shiraori archive + + diff --git a/PKG/ungoogled-chromium-void/void-packages/etc/conf b/PKG/ungoogled-chromium-void/void-packages/etc/conf new file mode 100644 index 0000000000000000000000000000000000000000..a2ab65d8d0f45acf4d06a869646c950616b165e4 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/etc/conf @@ -0,0 +1,3 @@ +XBPS_CCACHE=yes +XBPS_MAKEJOBS=26 +# XBPS_MIRROR=https://mirrors.dotsrc.org/voidlinux/current diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/chromium.sh b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/chromium.sh new file mode 100644 index 0000000000000000000000000000000000000000..6f4625c3c8be2235bfa06207ab23d13338199e64 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/chromium.sh @@ -0,0 +1,5 @@ +#!/bin/sh +export CHROME_WRAPPER=/usr/lib/ungoogled-chromium/ungoogled-chromium +export CHROME_DESKTOP=ungoogled-chromium.desktop +CHROME_FLAGS="--enable-gpu-rasterization $CHROME_FLAGS" +exec /usr/lib/ungoogled-chromium/ungoogled-chromium $CHROME_FLAGS "$@" diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/libc++-musl.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/libc++-musl.patch new file mode 100644 index 0000000000000000000000000000000000000000..11de10fc77db08b62717117dea554bfd7a1b58a8 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/libc++-musl.patch @@ -0,0 +1,11 @@ +--- a/buildtools/third_party/libc++/__config_site ++++ b/buildtools/third_party/libc++/__config_site +@@ -25,7 +25,7 @@ + #define _LIBCPP_HAS_THREADS 1 + #define _LIBCPP_HAS_MONOTONIC_CLOCK 1 + #define _LIBCPP_HAS_TERMINAL 1 +-#define _LIBCPP_HAS_MUSL_LIBC 0 ++#define _LIBCPP_HAS_MUSL_LIBC 1 + + #ifdef _WIN32 + #define _LIBCPP_HAS_THREAD_API_PTHREAD 0 diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/musl-sandbox.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/musl-sandbox.patch new file mode 100644 index 0000000000000000000000000000000000000000..f318e21a104ba42ea4becea6db85335bb4e1589a --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/musl-sandbox.patch @@ -0,0 +1,125 @@ +Source: https://git.alpinelinux.org/aports/tree/community/chromium/musl-sandbox.patch +musl uses different syscalls from glibc for some functions, so the sandbox has +to account for that +-- +diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +index ff5a1c0..da56b9b 100644 +--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +@@ -139,21 +139,11 @@ namespace sandbox { + // present (as in newer versions of posix_spawn). + ResultExpr RestrictCloneToThreadsAndEPERMFork() { + const Arg flags(0); +- +- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2. +- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES | +- CLONE_SIGHAND | CLONE_THREAD | +- CLONE_SYSVSEM; +- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED; +- +- const uint64_t kGlibcPthreadFlags = +- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | +- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID; +- const BoolExpr glibc_test = flags == kGlibcPthreadFlags; +- +- const BoolExpr android_test = +- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask, +- flags == kGlibcPthreadFlags); ++ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | ++ CLONE_THREAD | CLONE_SYSVSEM; ++ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | ++ CLONE_DETACHED; ++ const BoolExpr thread_clone_ok = (flags&~safe)==required; + + // The following two flags are the two important flags in any vfork-emulating + // clone call. EPERM any clone call that contains both of them. +@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() { + AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0, + (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags); + +- return If(IsAndroid() ? android_test : glibc_test, Allow()) ++ return If(thread_clone_ok, Allow()) + .ElseIf(is_fork_or_clone_vfork, Error(EPERM)) + .Else(CrashSIGSYSClone()); + } +diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +index d9d1882..0567557 100644 +--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -392,6 +392,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { + #if defined(__i386__) + case __NR_waitpid: + #endif ++ case __NR_set_tid_address: + return true; + case __NR_clone: // Should be parameter-restricted. + case __NR_setns: // Privileged. +@@ -404,7 +405,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) + case __NR_set_thread_area: + #endif +- case __NR_set_tid_address: + case __NR_unshare: + #if !defined(__mips__) && !defined(__aarch64__) + case __NR_vfork: +@@ -514,6 +514,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { + case __NR_munlock: + case __NR_munmap: + case __NR_mseal: ++ case __NR_mremap: ++ case __NR_membarrier: + return true; + case __NR_madvise: + case __NR_mincore: +@@ -531,7 +533,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { + case __NR_modify_ldt: + #endif + case __NR_mprotect: +- case __NR_mremap: + case __NR_msync: + case __NR_munlockall: + case __NR_readahead: +diff --git a/sandbox/linux/system_headers/linux_syscalls.h ./sandbox/linux/system_headers/linux_syscalls.h +index 2b78a0c..b6fedb5 100644 +--- a/sandbox/linux/system_headers/linux_syscalls.h ++++ b/sandbox/linux/system_headers/linux_syscalls.h +@@ -10,6 +10,7 @@ + #define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ + + #include "build/build_config.h" ++#include + + #if defined(__x86_64__) + #include "sandbox/linux/system_headers/x86_64_linux_syscalls.h" +--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc ++++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc +@@ -94,6 +94,9 @@ + case __NR_pwrite64: + case __NR_sched_get_priority_max: + case __NR_sched_get_priority_min: ++ case __NR_sched_getparam: ++ case __NR_sched_getscheduler: ++ case __NR_sched_setscheduler: + case __NR_sysinfo: + case __NR_times: + case __NR_uname: +--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +@@ -225,10 +225,15 @@ + if (sysno == __NR_getpriority || sysno ==__NR_setpriority) + return RestrictGetSetpriority(current_pid); + ++ // XXX: hacks for musl sandbox, calls needed? ++ if (sysno == __NR_sched_getparam || sysno == __NR_sched_getscheduler || ++ sysno == __NR_sched_setscheduler) { ++ return Allow(); ++ } ++ + // The scheduling syscalls are used in threading libraries and also heavily in + // abseil. See for example https://crbug.com/1370394. +- if (sysno == __NR_sched_getaffinity || sysno == __NR_sched_getparam || +- sysno == __NR_sched_getscheduler || sysno == __NR_sched_setscheduler) { ++ if (sysno == __NR_sched_getaffinity) { + return RestrictSchedTarget(current_pid, sysno); + } + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/no-res-ninit-nclose.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/no-res-ninit-nclose.patch new file mode 100644 index 0000000000000000000000000000000000000000..6884039efb884ceec577f5c32ad4ccb65df063be --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/files/musl-patches/no-res-ninit-nclose.patch @@ -0,0 +1,33 @@ +Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-res-ninit-nclose.patch +similar to dns-resolver.patch, musl doesn't have res_ninit and so on +-- +--- a/net/dns/public/scoped_res_state.cc ++++ b/net/dns/public/scoped_res_state.cc +@@ -13,7 +13,7 @@ + namespace net { + + ScopedResState::ScopedResState() { +-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) ++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || defined(_GNU_SOURCE) + // Note: res_ninit in glibc always returns 0 and sets RES_INIT. + // res_init behaves the same way. + memset(&_res, 0, sizeof(_res)); +@@ -25,16 +25,8 @@ + } + + ScopedResState::~ScopedResState() { +-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) +- +- // Prefer res_ndestroy where available. +-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) +- res_ndestroy(&res_); +-#else +- res_nclose(&res_); +-#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) +- +-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) ++ // musl res_init() doesn't actually do anything ++ // no destruction is necessary as no memory has been allocated + } + + bool ScopedResState::IsValid() const { diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/aarch64-musl-no-memory-tagging.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/aarch64-musl-no-memory-tagging.patch new file mode 100644 index 0000000000000000000000000000000000000000..3142e42d9dfb22e00a8815cdd6faaeb0e7925b05 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/aarch64-musl-no-memory-tagging.patch @@ -0,0 +1,22 @@ +--- a/base/allocator/partition_allocator/partition_alloc.gni ++++ b/base/allocator/partition_allocator/partition_alloc.gni +@@ -90,7 +90,7 @@ + use_large_empty_slot_span_ring = true + + has_memory_tagging = current_cpu == "arm64" && is_clang && !is_asan && +- !is_hwasan && (is_linux || is_android) ++ !is_hwasan && (is_linux || is_android) && !is_musl + + declare_args() { + # Debug configuration. +--- a/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h ++++ b/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h +@@ -10,7 +10,7 @@ + #include "partition_alloc/build_config.h" + #include "partition_alloc/buildflags.h" + +-#if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX) ++#if PA_BUILDFLAG(IS_ANDROID) || (PA_BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) + #define HAS_HW_CAPS + #endif + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/angle-wayland-include.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/angle-wayland-include.patch new file mode 100644 index 0000000000000000000000000000000000000000..65770b9439c5946f27f304104cd14aa89b4faddf --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/angle-wayland-include.patch @@ -0,0 +1,39 @@ +Patch-Source: https://github.com/archlinux/svntogit-packages/blob/a353833a5a731abfaa465b658f61894a516aa49b/trunk/angle-wayland-include-protocol.patch +diff -upr third_party/angle.orig/BUILD.gn third_party/angle/BUILD.gn +--- a/third_party/angle.orig/BUILD.gn 2022-08-17 19:38:11.000000000 +0000 ++++ b/third_party/angle/BUILD.gn 2022-08-18 11:04:09.061751111 +0000 +@@ -489,6 +489,12 @@ config("angle_vulkan_wayland_config") { + if (angle_enable_vulkan && angle_use_wayland && + defined(vulkan_wayland_include_dirs)) { + include_dirs = vulkan_wayland_include_dirs ++ } else if (angle_enable_vulkan && angle_use_wayland) { ++ include_dirs = [ ++ "$wayland_gn_dir/src/src", ++ "$wayland_gn_dir/include/src", ++ "$wayland_gn_dir/include/protocol", ++ ] + } + } + +@@ -1073,6 +1079,7 @@ if (angle_use_wayland) { + include_dirs = [ + "$wayland_dir/egl", + "$wayland_dir/src", ++ "$wayland_gn_dir/include/protocol", + ] + } + +diff -upr third_party/angle.orig/src/third_party/volk/BUILD.gn third_party/angle/src/third_party/volk/BUILD.gn +--- a/third_party/angle.orig/src/third_party/volk/BUILD.gn 2022-08-17 19:38:12.000000000 +0000 ++++ b/third_party/angle/src/third_party/volk/BUILD.gn 2022-08-18 11:04:36.499828006 +0000 +@@ -21,6 +21,9 @@ source_set("volk") { + configs += [ "$angle_root:angle_no_cfi_icall" ] + public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ] + if (angle_use_wayland) { +- include_dirs = [ "$wayland_dir/src" ] ++ include_dirs = [ ++ "$wayland_dir/src", ++ "$wayland_gn_dir/include/protocol", ++ ] + } + } diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-117-string-convert.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-117-string-convert.patch new file mode 100644 index 0000000000000000000000000000000000000000..cb48e4b21a617d9de0de7d13313e32e39e3a920c --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-117-string-convert.patch @@ -0,0 +1,21 @@ +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h +--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200 ++++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200 +@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final + } + + bool operator()(const Key& lhs, const KeyRef& rhs) const { ++ const std::string rhs_domain_name{rhs.domain_name}; + return std::tie(lhs.domain_name, lhs.network_anonymization_key) < +- std::tie(rhs.domain_name, *rhs.network_anonymization_key); ++ std::tie(rhs_domain_name, *rhs.network_anonymization_key); + } + + bool operator()(const KeyRef& lhs, const Key& rhs) const { +- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) < ++ const std::string lhs_domain_name{lhs.domain_name}; ++ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) < + std::tie(rhs.domain_name, rhs.network_anonymization_key); + } + }; diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-124-iwyu-sys-select-dawn-terminal.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-124-iwyu-sys-select-dawn-terminal.patch new file mode 100644 index 0000000000000000000000000000000000000000..cc7299aafffc39b2f2be929f0016e31559d434a5 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-124-iwyu-sys-select-dawn-terminal.patch @@ -0,0 +1,24 @@ +From cf993f56ce699ca0ed66ca5a6b88fe7b31c03a75 Mon Sep 17 00:00:00 2001 +From: "lauren n. liberda" +Date: Fri, 5 Apr 2024 06:08:21 +0200 +Subject: [PATCH] iwyu: sys/select.h in terminal utils + +required for fd_set. fixes building on musl libc + +Change-Id: I5c03d58c8337c1af871024a436b09117ad9206d4 +--- + src/tint/utils/system/terminal_posix.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/third_party/dawn/src/tint/utils/system/terminal_posix.cc b/third_party/dawn/src/tint/utils/system/terminal_posix.cc +index e820774244..a97eab7db8 100644 +--- a/third_party/dawn/src/tint/utils/system/terminal_posix.cc ++++ b/third_party/dawn/src/tint/utils/system/terminal_posix.cc +@@ -27,6 +27,7 @@ + + // GEN_BUILD:CONDITION(tint_build_is_linux || tint_build_is_mac) + ++#include + #include + + #include diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-138-rust-clang_lib.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-138-rust-clang_lib.patch new file mode 100644 index 0000000000000000000000000000000000000000..5b82bc880b0fcfdf230a1b37004550ae3ef01085 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-138-rust-clang_lib.patch @@ -0,0 +1,22 @@ +--- a/build/config/clang/BUILD.gn ++++ b/build/config/clang/BUILD.gn +@@ -208,14 +208,15 @@ + assert(false) # Unhandled cpu type + } + } else if (is_linux || is_chromeos) { ++ _dir = "linux" + if (current_cpu == "x64") { +- _dir = "x86_64-unknown-linux-gnu" ++ _suffix = "-x86_64" + } else if (current_cpu == "x86") { +- _dir = "i386-unknown-linux-gnu" ++ _suffix = "-i386" + } else if (current_cpu == "arm") { +- _dir = "armv7-unknown-linux-gnueabihf" ++ _suffix = "-armhf" + } else if (current_cpu == "arm64") { +- _dir = "aarch64-unknown-linux-gnu" ++ _suffix = "-aarch64" + } else if (current_cpu == "loong64") { + _dir = "loongarch64-unknown-linux-gnu" + } else { diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-138-rust-musl-targets.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-138-rust-musl-targets.patch new file mode 100644 index 0000000000000000000000000000000000000000..e57cc03218ff75446503765e3b959e7f8f235568 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-138-rust-musl-targets.patch @@ -0,0 +1,47 @@ +--- a/build/config/rust.gni ++++ b/build/config/rust.gni +@@ -196,7 +196,18 @@ + # a cargo project that dumps the `CARGO_CFG_TARGET_ABI` from its build.rs. See + # https://issues.chromium.org/u/1/issues/372512092#comment5 for an example. + rust_abi_target = "" +-if (is_linux || is_chromeos) { ++if (is_musl) { ++ if (current_cpu == "arm64") { ++ rust_abi_target = "aarch64-unknown-linux-musl" ++ cargo_target_abi = "" ++ } else if (current_cpu == "x86") { ++ rust_abi_target = "i686-unknown-linux-musl" ++ cargo_target_abi = "" ++ } else if (current_cpu == "x64") { ++ rust_abi_target = "x86_64-unknown-linux-musl" ++ cargo_target_abi = "" ++ } ++} else if (is_linux || is_chromeos) { + if (current_cpu == "arm64") { + rust_abi_target = "aarch64-unknown-linux-gnu" + cargo_target_abi = "" +--- a/build/rust/known-target-triples.txt ++++ b/build/rust/known-target-triples.txt +@@ -17,6 +17,7 @@ + aarch64-pc-windows-msvc + aarch64-unknown-fuchsia + aarch64-unknown-linux-gnu ++aarch64-unknown-linux-musl + arm64e-apple-ios + arm-unknown-linux-gnueabi + arm-unknown-linux-gnueabihf +@@ -28,6 +29,7 @@ + i686-linux-android + i686-pc-windows-msvc + i686-unknown-linux-gnu ++i686-unknown-linux-musl + loongarch64-unknown-linux-gnu + riscv64-linux-android + riscv64gc-unknown-linux-gnu +@@ -41,5 +43,6 @@ + x86_64-pc-windows-msvc + x86_64-unknown-fuchsia + x86_64-unknown-linux-gnu ++x86_64-unknown-linux-musl + powerpc64le-unknown-linux-gnu + s390x-unknown-linux-gnu diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-8393b61.patch.args b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-8393b61.patch.args new file mode 100644 index 0000000000000000000000000000000000000000..17c58043add91b66e6c9ffabd091774c4017a4ee --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-8393b61.patch.args @@ -0,0 +1 @@ +-d chromium-145.0.7632.116 -Np1 -R diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-musl-prctl.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-musl-prctl.patch new file mode 100644 index 0000000000000000000000000000000000000000..124b4c74281e24870a7ab5ca37533025da94c9ed --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-musl-prctl.patch @@ -0,0 +1,25 @@ +From 98338d64fff786f366b209c14735ff73b2c353bd Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Tue, 2 Sep 2025 23:49:49 +0200 +Subject: [PATCH] musl/linux: Don't import conflicting libc and kernel headers + +/usr/include/sys/prctl.h:88:8: error: redefinition of 'prctl_mm_map' +/usr/include/linux/prctl.h:134:8: note: previous definition is here +--- + rtc_base/platform_thread_types.cc | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/third_party/webrtc/rtc_base/platform_thread_types.cc b/third_party/webrtcrtc_base/platform_thread_types.cc +index 20bf4afc44..5b26c120e4 100644 +--- a/third_party/webrtc/rtc_base/platform_thread_types.cc ++++ b/third_party/webrtcrtc_base/platform_thread_types.cc +@@ -12,7 +12,9 @@ + + // IWYU pragma: begin_keep + #if defined(WEBRTC_LINUX) ++#if defined(__GLIBC__) + #include ++#endif + #include + #include + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-musl-toolchain.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-musl-toolchain.patch new file mode 100644 index 0000000000000000000000000000000000000000..38cfb223a5bb1f7cd0606b1aee3100961fb4fd14 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-140-musl-toolchain.patch @@ -0,0 +1,63 @@ +--- a/build/toolchain/toolchain.gni ++++ b/build/toolchain/toolchain.gni +@@ -51,6 +51,10 @@ + } + } + ++declare_args() { ++ is_musl = false ++} ++ + # Extension for shared library files (including leading dot). + if (is_apple) { + shlib_extension = ".dylib" +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -1282,8 +1282,13 @@ + # simplicity we always explicitly set the architecture. + if (current_cpu == "x64") { + if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) { +- cflags += [ "--target=x86_64-unknown-linux-gnu" ] +- ldflags += [ "--target=x86_64-unknown-linux-gnu" ] ++ if (is_musl) { ++ cflags += [ "--target=x86_64-unknown-linux-musl" ] ++ ldflags += [ "--target=x86_64-unknown-linux-musl" ] ++ } else { ++ cflags += [ "--target=x86_64-unknown-linux-gnu" ] ++ ldflags += [ "--target=x86_64-unknown-linux-gnu" ] ++ } + } else { + cflags += [ "-m64" ] + ldflags += [ "-m64" ] +@@ -1291,8 +1296,13 @@ + cflags += [ "-msse3" ] + } else if (current_cpu == "x86") { + if (is_clang && !is_android && !is_chromeos_device) { +- cflags += [ "--target=i386-unknown-linux-gnu" ] +- ldflags += [ "--target=i386-unknown-linux-gnu" ] ++ if (is_musl) { ++ cflags += [ "--target=i386-unknown-linux-musl" ] ++ ldflags += [ "--target=i386-unknown-linux-musl" ] ++ } else { ++ cflags += [ "--target=i386-unknown-linux-gnu" ] ++ ldflags += [ "--target=i386-unknown-linux-gnu" ] ++ } + } else { + cflags += [ "-m32" ] + ldflags += [ "-m32" ] +@@ -1315,8 +1325,13 @@ + } + } else if (current_cpu == "arm64") { + if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) { +- cflags += [ "--target=aarch64-linux-gnu" ] +- ldflags += [ "--target=aarch64-linux-gnu" ] ++ if (is_musl) { ++ cflags += [ "--target=aarch64-linux-musl" ] ++ ldflags += [ "--target=aarch64-linux-musl" ] ++ } else { ++ cflags += [ "--target=aarch64-linux-gnu" ] ++ ldflags += [ "--target=aarch64-linux-gnu" ] ++ } + } + } else if (current_cpu == "mipsel") { + ldflags += [ "-Wl,--hash-style=sysv" ] diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-141-cross-toolchain.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-141-cross-toolchain.patch new file mode 100644 index 0000000000000000000000000000000000000000..a27850471d4ef30b86ab6e1663bb19dc5c22f2d8 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-141-cross-toolchain.patch @@ -0,0 +1,112 @@ +--- a/build/toolchain/linux/unbundle/BUILD.gn.orig ++++ b/build/toolchain/linux/unbundle/BUILD.gn +@@ -39,3 +39,22 @@ + current_os = host_os + } + } ++ ++gcc_toolchain("v8_snapshot_cross") { ++ cc = getenv("BUILD_CC") ++ cxx = getenv("BUILD_CXX") ++ ar = getenv("BUILD_AR") ++ nm = getenv("BUILD_NM") ++ ld = cxx ++ ++ extra_cflags = getenv("BUILD_CFLAGS") ++ extra_cppflags = getenv("BUILD_CPPFLAGS") ++ extra_cxxflags = getenv("BUILD_CXXFLAGS") ++ extra_ldflags = getenv("BUILD_LDFLAGS") ++ ++ toolchain_args = { ++ current_cpu = host_cpu ++ current_os = host_os ++ v8_current_cpu = target_cpu ++ } ++} +--- a/build/config/clang/BUILD.gn ++++ b/build/config/clang/BUILD.gn +@@ -215,7 +215,11 @@ + assert(false) # Unhandled target platform + } + +- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" ++ if (current_cpu != target_cpu) { ++ _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" ++ } else { ++ _clang_lib_dir = "$clang_cross_path/lib/clang/$clang_version/lib" ++ } + _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" + libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] + } +--- a/build/config/clang/clang.gni ++++ b/build/config/clang/clang.gni +@@ -36,6 +36,7 @@ + is_mac || is_ios || is_chromeos) + + clang_base_path = default_clang_base_path ++ clang_cross_path = default_clang_base_path + + # Specifies whether or not bitcode should be embedded during compilation. + # This is used for creating a MLGO corpus from Chromium in the non-ThinLTO case. +--- a/build/rust/std/find_std_rlibs.py ++++ b/build/rust/std/find_std_rlibs.py +@@ -26,6 +26,7 @@ + help="Path to Rust binaries", + required=True), + parser.add_argument("--target", help="Rust target triple", required=False), ++ parser.add_argument("--sysroot", help="Rust sysroot", required=False), + parser.add_argument("--output", + help="Path to rlibs without suffixes", + required=True) +@@ -50,6 +51,8 @@ + rustc_args = [rustc, "--print", "target-libdir"] + if args.target: + rustc_args.extend(["--target", args.target]) ++ if args.sysroot: ++ rustc_args.extend(["--sysroot", args.sysroot]) + rustlib_dir = subprocess.check_output(rustc_args).rstrip().decode() + + # Copy the rlibs to a predictable location. Whilst we're doing so, +--- a/build/config/rust.gni ++++ b/build/config/rust.gni +@@ -60,6 +60,7 @@ + # a Rust sysroot, which will have a 'bin' directory and others. Commonly + # /.rustup/toolchains/nightly-- + rust_sysroot_absolute = "" ++ rust_cross_sysroot_absolute = "" + + # Directory under which to find `bin/bindgen` (a `bin` directory containing + # the bindgen exectuable). +--- a/build/rust/std/BUILD.gn ++++ b/build/rust/std/BUILD.gn +@@ -62,7 +62,7 @@ + # When building proc macros, include the proc_macro crate in what should be + # copied with find_stdlib. Otherwise it is not copied since it will be + # unused. +- stdlib_files += [ "proc_macro" ] ++ stdlib_files += [ "proc_macro", "rustc_literal_escaper" ] + } + + # Different Rust toolchains may add or remove files relative to the above +@@ -294,6 +294,13 @@ + rust_abi_target, + ] + ++ if (current_cpu == target_cpu && rust_cross_sysroot_absolute != "") { ++ args += [ ++ "--sysroot", ++ rust_cross_sysroot_absolute, ++ ] ++ } ++ + outputs = [] + foreach(lib, all_stdlibs_to_copy) { + outputs += [ "$target_out_dir/lib$lib.rlib" ] +@@ -351,6 +358,7 @@ + group("std") { + all_dependent_configs = [ + ":prebuilt_stdlib_libs", ++ ":prebuilt_stdlib_sysroot", + ":stdlib_public_dependent_libs", + ] + deps = [ ":prebuilt_rustc_copy_to_sysroot" ] diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-141-cssstylesheet-iwyu.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-141-cssstylesheet-iwyu.patch new file mode 100644 index 0000000000000000000000000000000000000000..2152cd4ca563ba8153bdbb698bbe883a8812eea3 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-141-cssstylesheet-iwyu.patch @@ -0,0 +1,45 @@ +From f71f01773e427aaaf76563f1f2d24ee6ece2dce9 Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Tue, 9 Sep 2025 12:44:09 +1000 +Subject: [PATCH 1/2] IWYU css_style_sheet.h + +issues.chromium.org/issues/429365675 replaces a bunch of includes with +forward declarations. These builds clearly work with "normal" builds, which +likely use C++ modules or precompiled headers, but break if your workflow +does not use those features. + +Add appropriate includes to fix the build on Linux platforms. + +Signed-off-by: Matt Jolly +--- a/third_party/blink/renderer/core/css/css_style_declaration.h ++++ b/third_party/blink/renderer/core/css/css_style_declaration.h +@@ -23,6 +23,7 @@ + + #include "third_party/blink/renderer/core/core_export.h" + #include "third_party/blink/renderer/core/css/css_property_names.h" ++#include "third_party/blink/renderer/core/css/css_style_sheet.h" + #include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h" + #include "third_party/blink/renderer/platform/bindings/script_wrappable.h" + #include "third_party/blink/renderer/platform/bindings/v8_binding.h" +-- +2.50.1 + + +From 0a1de20a85504ed8cb40961f76631c1430ed634c Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Tue, 9 Sep 2025 12:56:38 +1000 +Subject: [PATCH 2/2] IWYU css_style_sheet.h in generator + +Signed-off-by: Matt Jolly +--- a/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py ++++ b/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py +@@ -434,6 +434,7 @@ def generate_observable_array(observable_array_identifier): + component_export_header(api_component, for_testing), + "third_party/blink/renderer/bindings/core/v8/idl_types.h", + "third_party/blink/renderer/platform/bindings/observable_array.h", ++ "third_party/blink/renderer/core/css/css_style_sheet.h", + ]) + source_node.accumulator.add_include_headers([ + "third_party/blink/renderer/bindings/core/v8/generated_code_helper.h", +-- +2.50.1 diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-142-reenable-i686.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-142-reenable-i686.patch new file mode 100644 index 0000000000000000000000000000000000000000..4be57cdfa49836e28e607f3ee8c520fc19cd0c25 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-142-reenable-i686.patch @@ -0,0 +1,24 @@ +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -1503,21 +1503,6 @@ + } + } + +-# While linux-x86 is unsupported, chromeos-x86 is not, and since ChromeOS uses +-# the linux sysroot (and thus linux modulemaps), generating chromeos-x86 +-# modulemaps requires building targets on linux-x86 +-if (!running_modularize) { +- # TODO(cassew): Add more OS's that don't support x86. +- is_valid_x86_target = +- target_os != "ios" && target_os != "mac" && +- (target_os != "linux" || use_libfuzzer || !build_with_chromium) +- +- # Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing. +- assert( +- is_valid_x86_target || target_cpu != "x86" || v8_target_cpu == "arm", +- "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.") +-} +- + group("chromium_builder_perf") { + testonly = true + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-142-revert-e33287758f2.patch.args b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-142-revert-e33287758f2.patch.args new file mode 100644 index 0000000000000000000000000000000000000000..17c58043add91b66e6c9ffabd091774c4017a4ee --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-142-revert-e33287758f2.patch.args @@ -0,0 +1 @@ +-d chromium-145.0.7632.116 -Np1 -R diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143--libsync-__BEGIN_DECLS.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143--libsync-__BEGIN_DECLS.patch new file mode 100644 index 0000000000000000000000000000000000000000..1a9ddfaae969f2a3a7c6ac86dd0d0e71f67b8bb4 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143--libsync-__BEGIN_DECLS.patch @@ -0,0 +1,31 @@ +From 4ea5b1d3b27539e8a11d7e7ef974075cf1f7e390 Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Tue, 4 Nov 2025 14:57:33 +0100 +Subject: [PATCH] Fix undefined __BEGIN_DECLS define. + +Not sure how this worked in the first place. +--- + include/ndk/sync.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/third_party/libsync/src/include/ndk/sync.h b/third_party/libsync/src/include/ndk/sync.h +index a786d3e..2a31df6 100644 +--- a/third_party/libsync/src/include/ndk/sync.h ++++ b/third_party/libsync/src/include/ndk/sync.h +@@ -30,6 +30,16 @@ + + #include + ++#if !defined(__BEGIN_DECLS) && !defined(__END_DECLS) ++#ifdef __cplusplus ++#define __BEGIN_DECLS extern "C" { ++#define __END_DECLS } ++#else ++#define __BEGIN_DECLS ++#define __END_DECLS ++#endif ++#endif ++ + __BEGIN_DECLS + + #if __ANDROID_API__ >= __ANDROID_API_O__ diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143-revert-libpng_for_testonly.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143-revert-libpng_for_testonly.patch new file mode 100644 index 0000000000000000000000000000000000000000..7ece43c88efd5a2a40738dbd21181567a338e99a --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143-revert-libpng_for_testonly.patch @@ -0,0 +1,137 @@ +commit 4f7637304eca894adf2e70078a55654a88224a30 +Author: Lukasz Anforowicz +Date: Tue Sep 30 07:08:03 2025 -0700 + + [rust png] Reland: Reinforce `testonly`-ness of some users of `libpng`. + + This reverts commit 7fa4c2d7ab42a48247ce8e0290cbb7e854990f1e and + effectively relands https://crrev.com/c/6976870. The reland is + attempted after using wildcards to cover extra gni-generated targets. + `Cq-Include-Trybots` directives in the CL description should verify + correctness of the reland. Original CL description follows: + + This CL extracts a separate `third_party/libpng:libpng_for_testonly` + target which: + + 1) Is a `group` that proxies/forwards to the `libpng` target by listing + it as its `public_deps` + 2) Has limited visibility (based on the new `libpng_testonly_visibility` + introduced in the refactored `third_party/libpng/visibility.gni`). + The new visibility is almost unchanged, except for explicitly + spelling out some targets instead of using wildcards + 3) Is marked as `testonly` + + Bug: 443128323 + Change-Id: If7ba0d184324a5c662aaf2d52122994ea778d452 + Cq-Include-Trybots: luci.chromium.try:ios-catalyst + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6991491 + Auto-Submit: Łukasz Anforowicz + Commit-Queue: Łukasz Anforowicz + Reviewed-by: Nico Weber + Cr-Commit-Position: refs/heads/main@{#1522830} + +diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn +index a4703c3692d..2d70f7a5fe9 100644 +--- a/chrome/test/BUILD.gn ++++ b/chrome/test/BUILD.gn +@@ -11152,7 +11152,7 @@ if (!is_android) { + "//testing/gtest", + "//third_party/hunspell", + "//third_party/icu", +- "//third_party/libpng", ++ "//third_party/libpng:libpng_for_testonly", + "//ui/base:test_support", + "//ui/events:test_support", + "//ui/ozone", +@@ -11512,7 +11512,7 @@ if (!is_android && !is_chromeos_device) { + "//testing/gtest", + "//third_party/hunspell", + "//third_party/icu", +- "//third_party/libpng", ++ "//third_party/libpng:libpng_for_testonly", + "//ui/base:base_interactive_ui_tests", + "//ui/base:ozone_buildflags", + "//ui/base:test_support", +@@ -12470,7 +12470,7 @@ if (!is_android) { + "//testing/gtest", + "//third_party/hunspell", + "//third_party/icu", +- "//third_party/libpng", ++ "//third_party/libpng:libpng_for_testonly", + "//ui/base:test_support", + "//ui/resources:ui_test_pak", + "//ui/views", +diff --git a/testing/libfuzzer/fuzzers/BUILD.gn b/testing/libfuzzer/fuzzers/BUILD.gn +index 7d242e177f0..1c67eee1598 100644 +--- a/testing/libfuzzer/fuzzers/BUILD.gn ++++ b/testing/libfuzzer/fuzzers/BUILD.gn +@@ -104,7 +104,7 @@ fuzzer_test("libpng_progressive_read_fuzzer") { + sources = [ "libpng_read_fuzzer.cc" ] + deps = [ + "//base", +- "//third_party/libpng", ++ "//third_party/libpng:libpng_for_testonly", + ] + dict = "dicts/png.dict" + seed_corpuses = libpng_seed_corpuses +diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn +index d4bdea1e33c..3e31348b94f 100644 +--- a/third_party/libpng/BUILD.gn ++++ b/third_party/libpng/BUILD.gn +@@ -130,6 +130,14 @@ if (is_win) { + } + } + ++group("libpng_for_testonly") { ++ testonly = true ++ public_deps = [ ":libpng" ] ++ ++ visibility = [] ++ visibility = libpng_testonly_visibility ++} ++ + if (build_with_chromium) { + libpng_ossfuzz_seed_corpuses = [ + "//components/test/data/viz", +diff --git a/tools/imagediff/BUILD.gn b/tools/imagediff/BUILD.gn +index d56651bedc7..2b5f3d38488 100644 +--- a/tools/imagediff/BUILD.gn ++++ b/tools/imagediff/BUILD.gn +@@ -34,6 +34,7 @@ if (target_os == "win" && host_os != "win") { + # If the current toolchain is the test host toolchain, build the tool. + if (current_toolchain == imagediff_toolchain) { + executable("imagediff") { ++ testonly = true + output_name = "image_diff" # Different than dir name for historical + # reasons. + sources = [ +@@ -47,7 +48,7 @@ if (current_toolchain == imagediff_toolchain) { + deps = [ + "//base", + "//build/win:default_exe_manifest", +- "//third_party/libpng", ++ "//third_party/libpng:libpng_for_testonly", + "//third_party/zlib", + ] + } +@@ -60,6 +61,7 @@ if (current_toolchain == imagediff_toolchain) { + } else if (current_toolchain == default_toolchain && + default_toolchain != imagediff_toolchain) { + binary_symlink("imagediff") { ++ testonly = true + binary_label = ":$target_name($imagediff_toolchain)" + binary_output_name = "image_diff" + +diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn +index f6a40abfe99..83d8f55027a 100644 +--- a/ui/gfx/BUILD.gn ++++ b/ui/gfx/BUILD.gn +@@ -906,7 +906,7 @@ test("gfx_unittests") { + "//skia:skcms", + "//testing/gtest", + "//third_party/icu:icuuc", +- "//third_party/libpng", ++ "//third_party/libpng:libpng_for_testonly", + "//third_party/zlib", + "//ui/base", + "//ui/gfx/animation", diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143-revert-libpng_for_testonly.patch.args b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143-revert-libpng_for_testonly.patch.args new file mode 100644 index 0000000000000000000000000000000000000000..4c5431eb01da62e042615db349762d4a27cdbea5 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-143-revert-libpng_for_testonly.patch.args @@ -0,0 +1 @@ +-d chromium-145.0.7632.116 -R -Np1 diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-144-no-esbuild.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-144-no-esbuild.patch new file mode 100644 index 0000000000000000000000000000000000000000..0a3c89bb988fd1a1be950ace210fdd361e4a4e9a --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-144-no-esbuild.patch @@ -0,0 +1,348 @@ +From b7cd840a320e3f7f38fc80edefcd29bd88cb54a6 Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Thu, 5 Feb 2026 05:26:48 +0100 +Subject: [PATCH] Revert "[M144][build] Minify release builds with esbuild + instead of rollup" + +This reverts commit f130475580017f9f87502343dbcfc0c76dccefe8. +--- + DEPS | 2 +- + front_end/models/ai_assistance/injected.ts | 29 ++++-- + front_end/panels/application/BUILD.gn | 1 - + .../InterestGroupStorageView.test.ts | 13 ++- + .../SharedStorageEventsView.test.ts | 9 +- + scripts/build/esbuild.js | 5 +- + scripts/build/ninja/bundle.gni | 92 +++++++++++++------ + 7 files changed, 97 insertions(+), 54 deletions(-) + +diff --git a/third_party/devtools-frontend/src/DEPS b/third_party/devtools-frontend/src/DEPS +index f9caf8874d..7003edcf0b 100644 +--- a/third_party/devtools-frontend/src/DEPS ++++ b/third_party/devtools-frontend/src/DEPS +@@ -145,7 +145,7 @@ deps = { + 'url': Var('build_url') + '@' + Var('build_revision'), + 'condition': 'build_with_chromium == False', + }, +- 'third_party/siso/cipd': { ++ 'third_party/siso': { + 'packages': [ + { + 'package': 'build/siso/${{platform}}', +diff --git a/third_party/devtools-frontend/src/front_end/models/ai_assistance/injected.ts b/third_party/devtools-frontend/src/front_end/models/ai_assistance/injected.ts +index cff188cbba..af9c3c14e6 100644 +--- a/third_party/devtools-frontend/src/front_end/models/ai_assistance/injected.ts ++++ b/third_party/devtools-frontend/src/front_end/models/ai_assistance/injected.ts +@@ -9,6 +9,10 @@ + * They need remain isolated for importing other function so + * bundling them for production does not create issues. + */ ++/* eslint-disable @devtools/no-adopted-style-sheets -- ++ * The scripts in this file aren't executed as part of DevTools front-end, ++ * but are injected into the page. ++ **/ + + export const AI_ASSISTANCE_CSS_CLASS_NAME = 'ai-style-change'; + export const FREESTYLER_WORLD_NAME = 'DevTools AI Assistance'; +@@ -96,9 +100,19 @@ export const PAGE_EXPOSED_FUNCTIONS = ['setElementStyles']; + /** + * Please see fileoverview + */ +-const setupSetElementStyles = `function setupSetElementStyles(prefix) { +- const global = globalThis; +- async function setElementStyles(el, styles) { ++function setupSetElementStyles(prefix: typeof AI_ASSISTANCE_CSS_CLASS_NAME): void { ++ // Executed in another world ++ const global = globalThis as unknown as { ++ freestyler: FreestylerBinding, ++ setElementStyles: unknown, ++ }; ++ async function setElementStyles( ++ el: HTMLElement&{ ++ // eslint-disable-next-line ++ __freestylerClassName?: `${typeof AI_ASSISTANCE_CSS_CLASS_NAME}-${number}`, ++ }, ++ styles: Record, ++ ): Promise { + let selector = el.tagName.toLowerCase(); + if (el.id) { + selector = '#' + el.id; +@@ -117,7 +131,7 @@ const setupSetElementStyles = `function setupSetElementStyles(prefix) { + + // __freestylerClassName is not exposed to the page due to this being + // run in the isolated world. +- const className = el.__freestylerClassName ?? \`\${prefix}-\${global.freestyler.id}\`; ++ const className = el.__freestylerClassName ?? `${prefix}-${global.freestyler.id}`; + el.__freestylerClassName = className; + el.classList.add(className); + +@@ -126,6 +140,7 @@ const setupSetElementStyles = `function setupSetElementStyles(prefix) { + // if it's kebab case. + el.style.removeProperty(key); + // If it's camel case. ++ // @ts-expect-error this won't throw if wrong + el.style[key] = ''; + } + +@@ -153,7 +168,7 @@ const setupSetElementStyles = `function setupSetElementStyles(prefix) { + continue; + } + +- hasAiStyleChange = rule.selectorText.startsWith(\`.\${prefix}\`); ++ hasAiStyleChange = rule.selectorText.startsWith(`.${prefix}`); + if (hasAiStyleChange) { + stylesheet = sheet; + break; +@@ -168,6 +183,6 @@ const setupSetElementStyles = `function setupSetElementStyles(prefix) { + } + + global.setElementStyles = setElementStyles; +-}`; ++} + +-export const injectedFunctions = `(${setupSetElementStyles})('${AI_ASSISTANCE_CSS_CLASS_NAME}')`; ++export const injectedFunctions = `(${String(setupSetElementStyles)})('${AI_ASSISTANCE_CSS_CLASS_NAME}')`; +diff --git a/third_party/devtools-frontend/src/front_end/panels/application/BUILD.gn b/third_party/devtools-frontend/src/front_end/panels/application/BUILD.gn +index 20b81546d8..b0be3bdbc4 100644 +--- a/third_party/devtools-frontend/src/front_end/panels/application/BUILD.gn ++++ b/third_party/devtools-frontend/src/front_end/panels/application/BUILD.gn +@@ -178,7 +178,6 @@ devtools_ui_module("unittests") { + "../../core/sdk:bundle", + "../../testing", + "../../ui/components/render_coordinator:bundle", +- "../../ui/legacy:bundle", + "./components", + "./preloading/components", + ] +diff --git a/third_party/devtools-frontend/src/front_end/panels/application/InterestGroupStorageView.test.ts b/third_party/devtools-frontend/src/front_end/panels/application/InterestGroupStorageView.test.ts +index f2e31be0f0..70e1011ee4 100644 +--- a/third_party/devtools-frontend/src/front_end/panels/application/InterestGroupStorageView.test.ts ++++ b/third_party/devtools-frontend/src/front_end/panels/application/InterestGroupStorageView.test.ts +@@ -6,7 +6,6 @@ import * as Protocol from '../../generated/protocol.js'; + import {raf} from '../../testing/DOMHelpers.js'; + import {expectCall} from '../../testing/ExpectStubCall.js'; + import {describeWithMockConnection} from '../../testing/MockConnection.js'; +-import * as UI from '../../ui/legacy/legacy.js'; + + import * as Resources from './application.js'; + +@@ -67,7 +66,7 @@ describeWithMockConnection('InterestGroupStorageView', () => { + + it('initially has placeholder sidebar', () => { + const view = new View.InterestGroupStorageView(new InterestGroupDetailsGetter()); +- assert.notInstanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.notDeepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + + const placeholder = view.sidebarWidget()?.contentElement; + assert.deepEqual( +@@ -87,7 +86,7 @@ describeWithMockConnection('InterestGroupStorageView', () => { + grid.dispatchEvent(new CustomEvent('select', {detail: events[0]})); + await raf(); + sinon.assert.calledOnce(spy); +- assert.instanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.deepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + }); + + it('Clears sidebarWidget upon receiving cellFocusedEvent on an additionalBid-type events', async function() { +@@ -110,7 +109,7 @@ describeWithMockConnection('InterestGroupStorageView', () => { + grid.dispatchEvent(new CustomEvent('select', {detail: {...events[0], type: eventType}})); + await sideBarUpdateDone; + sinon.assert.calledOnce(spy); +- assert.notInstanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.notDeepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + assert.isTrue(view.sidebarWidget()?.contentElement.firstChild?.textContent?.includes('No details')); + } + }); +@@ -131,7 +130,7 @@ describeWithMockConnection('InterestGroupStorageView', () => { + grid.dispatchEvent(new CustomEvent('select', {detail: events[0]})); + await raf(); + sinon.assert.calledOnce(spy); +- assert.notInstanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.notDeepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + assert.isTrue(view.sidebarWidget()?.contentElement.firstChild?.textContent?.includes('No details')); + }); + +@@ -146,10 +145,10 @@ describeWithMockConnection('InterestGroupStorageView', () => { + grid.dispatchEvent(new CustomEvent('select', {detail: events[0]})); + await raf(); + sinon.assert.calledOnce(spy); +- assert.instanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.deepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + view.clearEvents(); + sinon.assert.calledTwice(spy); +- assert.notInstanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.notDeepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + assert.isTrue(view.sidebarWidget()?.contentElement.textContent?.includes( + 'No interest group selectedSelect any interest group event to display the group\'s current state')); + }); +diff --git a/third_party/devtools-frontend/src/front_end/panels/application/SharedStorageEventsView.test.ts b/third_party/devtools-frontend/src/front_end/panels/application/SharedStorageEventsView.test.ts +index d06dfa17f8..7c7b95ad16 100644 +--- a/third_party/devtools-frontend/src/front_end/panels/application/SharedStorageEventsView.test.ts ++++ b/third_party/devtools-frontend/src/front_end/panels/application/SharedStorageEventsView.test.ts +@@ -5,7 +5,6 @@ + import * as Protocol from '../../generated/protocol.js'; + import {raf} from '../../testing/DOMHelpers.js'; + import {describeWithMockConnection} from '../../testing/MockConnection.js'; +-import * as UI from '../../ui/legacy/legacy.js'; + + import * as Resources from './application.js'; + +@@ -179,7 +178,7 @@ describeWithMockConnection('SharedStorageEventsView', () => { + + it('initially has placeholder sidebar', () => { + const view = new View.SharedStorageEventsView(); +- assert.notInstanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.notDeepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + assert.deepEqual(view.sidebarWidget()?.contentElement.firstChild?.textContent, 'No shared storage event selected'); + }); + +@@ -197,7 +196,7 @@ describeWithMockConnection('SharedStorageEventsView', () => { + grid.onSelect(EVENTS[0]); + await raf(); + sinon.assert.calledOnce(spy); +- assert.instanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.deepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + }); + + it('clears sidebarWidget upon clearEvents', async () => { +@@ -214,10 +213,10 @@ describeWithMockConnection('SharedStorageEventsView', () => { + grid.onSelect(EVENTS[0]); + await raf(); + sinon.assert.calledOnce(spy); +- assert.instanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.deepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + view.clearEvents(); + sinon.assert.calledTwice(spy); +- assert.notInstanceOf(view.sidebarWidget(), UI.SearchableView.SearchableView); ++ assert.notDeepEqual(view.sidebarWidget()?.constructor.name, 'SearchableView'); + assert.deepEqual(view.sidebarWidget()?.contentElement.firstChild?.textContent, 'No shared storage event selected'); + }); + +diff --git a/third_party/devtools-frontend/src/scripts/build/esbuild.js b/third_party/devtools-frontend/src/scripts/build/esbuild.js +index 708f79d35e..096edc81b9 100644 +--- a/third_party/devtools-frontend/src/scripts/build/esbuild.js ++++ b/third_party/devtools-frontend/src/scripts/build/esbuild.js +@@ -25,9 +25,7 @@ const esbuild = require('esbuild'); + + const entryPoints = [process.argv[2]]; + const outfile = process.argv[3]; +-const additionalArgs = process.argv.slice(4); +-const useSourceMaps = additionalArgs.includes('--configSourcemaps'); +-const minify = additionalArgs.includes('--minify'); ++const useSourceMaps = process.argv.slice(4).includes('--configSourcemaps'); + + const outdir = path.dirname(outfile); + +@@ -48,7 +46,6 @@ esbuild + platform: 'browser', + plugins: [plugin], + sourcemap: useSourceMaps, +- minify, + }) + .catch(err => { + console.error('Failed to run esbuild:', err); +diff --git a/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni b/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni +index 7d8fee3433..9b44b1f1b5 100644 +--- a/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni ++++ b/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni +@@ -10,38 +10,72 @@ template("bundle") { + assert(defined(invoker.entrypoint), + "You must define the 'entrypoint' for a bundle target") + +- node_action(target_name) { +- script = "scripts/build/esbuild.js" +- forward_variables_from(invoker, +- [ +- "visibility", +- "deps", +- "public_deps", +- ]) +- +- inputs = [ +- invoker.entrypoint, +- devtools_location_prepend + "scripts/build/devtools_plugin.js", +- devtools_location_prepend + "scripts/devtools_paths.js", +- ] +- +- _esbuild = devtools_location_prepend + "third_party/esbuild/esbuild" +- if (host_os == "win") { +- inputs += [ _esbuild + ".exe" ] +- } else { +- inputs += [ _esbuild ] +- } ++ _fast_bundle = is_debug || devtools_skip_typecheck ++ assert(!is_official_build || !_fast_bundle, ++ "Fast bundling is disallowed for official builds.") ++ ++ if (_fast_bundle) { ++ node_action(target_name) { ++ script = "scripts/build/esbuild.js" ++ forward_variables_from(invoker, ++ [ ++ "visibility", ++ "deps", ++ "public_deps", ++ ]) ++ ++ inputs = [ ++ invoker.entrypoint, ++ devtools_location_prepend + "scripts/build/devtools_plugin.js", ++ devtools_location_prepend + "scripts/devtools_paths.js", ++ ] ++ ++ _esbuild = devtools_location_prepend + "third_party/esbuild/esbuild" ++ if (host_os == "win") { ++ inputs += [ _esbuild + ".exe" ] ++ } else { ++ inputs += [ _esbuild ] ++ } + +- args = [ +- rebase_path(invoker.entrypoint, root_build_dir), +- rebase_path(invoker.output_file_location, root_build_dir), +- "--configSourcemaps", +- ] ++ args = [ ++ rebase_path(invoker.entrypoint, root_build_dir), ++ rebase_path(invoker.output_file_location, root_build_dir), ++ "--configSourcemaps", ++ ] + +- if (!is_debug) { +- args += [ "--minify" ] ++ outputs = [ invoker.output_file_location ] + } ++ } else { ++ node_action(target_name) { ++ script = "node_modules/@rollup/wasm-node/dist/bin/rollup" + +- outputs = [ invoker.output_file_location ] ++ forward_variables_from(invoker, ++ [ ++ "visibility", ++ "deps", ++ "public_deps", ++ ]) ++ ++ inputs = [ ++ invoker.entrypoint, ++ devtools_location_prepend + "scripts/build/rollup.config.mjs", ++ devtools_location_prepend + "scripts/build/devtools_plugin.js", ++ devtools_location_prepend + "scripts/devtools_paths.js", ++ ] ++ ++ args = [ ++ "--config", ++ rebase_path( ++ devtools_location_prepend + "scripts/build/rollup.config.mjs", ++ root_build_dir), ++ "--input", ++ rebase_path(invoker.entrypoint, root_build_dir), ++ "--file", ++ rebase_path(invoker.output_file_location, root_build_dir), ++ "--configSourcemaps", ++ ] ++ ++ outputs = [ invoker.output_file_location ] ++ } + } + } diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-144-rust-nightly-capable.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-144-rust-nightly-capable.patch new file mode 100644 index 0000000000000000000000000000000000000000..aec8b869f9df2ccf2cc5e15d62b4490cd7b626e8 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-144-rust-nightly-capable.patch @@ -0,0 +1,14 @@ +We have been using nightly features, switching back requries to change +patches again and since its not really supported by them anyways, just +stick to using nightly. +--- a/build/config/rust.gni ++++ b/build/config/rust.gni +@@ -112,7 +113,7 @@ + # `rustc_nightly_capability = false` will make the build avoid the use of + # Rust nightly features. There are no bots that test this and there is no + # guarantee it will work, but we accept patches for this configuration. +-rustc_nightly_capability = use_chromium_rust_toolchain ++rustc_nightly_capability = true + + # Platform support for the Rust toolchain. + chromium_toolchain_supports_platform = !is_wasm diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-iwyu-dev_t.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-iwyu-dev_t.patch new file mode 100644 index 0000000000000000000000000000000000000000..97477cfa7e59d6fba6d238a39c6377159f6bfabb --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-iwyu-dev_t.patch @@ -0,0 +1,21 @@ +From 075e6f5c4f754b5babc038a2ae55638fdb6cd4c7 Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Mon, 19 Jan 2026 23:27:31 +0100 +Subject: [PATCH] IWYU: add missing header for dev_t + +--- + modules/desktop_capture/linux/wayland/egl_dmabuf.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h b/third_party/webrtcmodules/desktop_capture/linux/wayland/egl_dmabuf.h +index ee32f96b52..b442b673a6 100644 +--- a/third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h ++++ b/third_party/webrtcmodules/desktop_capture/linux/wayland/egl_dmabuf.h +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-rollup-as-rollup.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-rollup-as-rollup.patch new file mode 100644 index 0000000000000000000000000000000000000000..0066ff0bfe4c76543e0e5d7360e8464af0f5e38e --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-rollup-as-rollup.patch @@ -0,0 +1,26 @@ +From 354850338d29df5f9b538de29aae182c7298ce43 Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Mon, 9 Feb 2026 05:08:49 +0100 +Subject: [PATCH] Use rollup from rollup instead of @rollup/wasm-node + +cr145-rollup-wasm.patch installs it as rollup and it's annoying to change +that, as either something has to be installed as rollup to satisfy peer +dependencies, or legacy-peer-deps=true has to be used. Both make diff +even bigger than already is. +--- + scripts/build/ninja/bundle.gni | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni b/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni +index 9b44b1f1b5..b11164a3e0 100644 +--- a/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni ++++ b/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni +@@ -47,7 +47,7 @@ template("bundle") { + } + } else { + node_action(target_name) { +- script = "node_modules/@rollup/wasm-node/dist/bin/rollup" ++ script = "node_modules/rollup/dist/bin/rollup" + + forward_variables_from(invoker, + [ diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-rollup-wasm.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-rollup-wasm.patch new file mode 100644 index 0000000000000000000000000000000000000000..69516cea92ddc2460f347171bbc4cdff9becdf35 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-145-rollup-wasm.patch @@ -0,0 +1,695 @@ +From 6e327ef71f7ae53665aa96f5e3adf546f637297c Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Tue, 20 Jan 2026 06:34:37 +0100 +Subject: [PATCH] Use wasm rollup + +"Error: Cannot find module @rollup/rollup-linux-x64-musl." +After applying, reload: + cd third_party/devtools-frontend/src + npm ci --ignore-scripts +--- + package-lock.json | 424 ++-------------------------------------------- + package.json | 2 +- + 2 files changed, 14 insertions(+), 412 deletions(-) + +diff --git a/third_party/devtools-frontend/src/package-lock.json b/third_party/devtools-frontend/src/package-lock.json +index d1ed2d9f77..39f062e6ec 100644 +--- a/third_party/devtools-frontend/src/package-lock.json ++++ b/third_party/devtools-frontend/src/package-lock.json +@@ -54,7 +54,7 @@ + "ora": "9.0.0", + "postcss": "8.5.6", + "puppeteer-core": "24.30.0", +- "rollup": "4.22.4", ++ "rollup": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.22.4.tgz", + "rollup-plugin-sourcemaps2": "0.5.4", + "sinon": "21.0.0", + "source-map-support": "0.5.21", +@@ -107,7 +107,6 @@ + "version": "7.26.10", + "dev": true, + "license": "MIT", +- "peer": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.2", +@@ -342,7 +341,6 @@ + } + ], + "license": "MIT", +- "peer": true, + "engines": { + "node": ">=18" + }, +@@ -366,7 +364,6 @@ + } + ], + "license": "MIT", +- "peer": true, + "engines": { + "node": ">=18" + } +@@ -1412,230 +1409,6 @@ + "url": "https://github.com/sponsors/jonschlinkert" + } + }, +- "node_modules/@rollup/rollup-android-arm-eabi": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", +- "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", +- "cpu": [ +- "arm" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "android" +- ] +- }, +- "node_modules/@rollup/rollup-android-arm64": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", +- "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "android" +- ] +- }, +- "node_modules/@rollup/rollup-darwin-arm64": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", +- "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "darwin" +- ] +- }, +- "node_modules/@rollup/rollup-darwin-x64": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", +- "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "darwin" +- ] +- }, +- "node_modules/@rollup/rollup-linux-arm-gnueabihf": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", +- "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", +- "cpu": [ +- "arm" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-arm-musleabihf": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", +- "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", +- "cpu": [ +- "arm" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-arm64-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", +- "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-arm64-musl": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", +- "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", +- "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", +- "cpu": [ +- "ppc64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-riscv64-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", +- "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", +- "cpu": [ +- "riscv64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-s390x-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", +- "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", +- "cpu": [ +- "s390x" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-x64-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", +- "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-linux-x64-musl": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", +- "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "linux" +- ] +- }, +- "node_modules/@rollup/rollup-win32-arm64-msvc": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", +- "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", +- "cpu": [ +- "arm64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "win32" +- ] +- }, +- "node_modules/@rollup/rollup-win32-ia32-msvc": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", +- "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", +- "cpu": [ +- "ia32" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "win32" +- ] +- }, +- "node_modules/@rollup/rollup-win32-x64-msvc": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", +- "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", +- "cpu": [ +- "x64" +- ], +- "dev": true, +- "license": "MIT", +- "optional": true, +- "os": [ +- "win32" +- ] +- }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "dev": true, +@@ -1970,7 +1743,6 @@ + "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", + "dev": true, + "license": "MIT", +- "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.47.0", + "@typescript-eslint/types": "8.47.0", +@@ -2296,7 +2068,6 @@ + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", +- "peer": true, + "bin": { + "acorn": "bin/acorn" + }, +@@ -2839,7 +2610,6 @@ + } + ], + "license": "MIT", +- "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", +@@ -2997,7 +2767,6 @@ + "version": "4.3.4", + "dev": true, + "license": "MIT", +- "peer": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", +@@ -3678,8 +3447,7 @@ + "resolved": "https://npm.skia.org/chrome-devtools/devtools-protocol/-/devtools-protocol-0.0.1521046.tgz", + "integrity": "sha512-vhE6eymDQSKWUXwwA37NtTTVEzjtGVfDr3pRbsWEQ5onH/Snp2c+2xZHWJJawG/0hCCJLRGt4xVtEVUVILol4w==", + "dev": true, +- "license": "BSD-3-Clause", +- "peer": true ++ "license": "BSD-3-Clause" + }, + "node_modules/dezalgo": { + "version": "1.0.3", +@@ -4143,7 +3911,6 @@ + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", + "dev": true, + "license": "MIT", +- "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", +@@ -6264,7 +6031,6 @@ + "version": "6.4.4", + "dev": true, + "license": "MIT", +- "peer": true, + "dependencies": { + "@colors/colors": "1.5.0", + "body-parser": "^1.19.0", +@@ -7677,7 +7443,6 @@ + } + ], + "license": "MIT", +- "peer": true, + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", +@@ -8126,7 +7891,6 @@ + "version": "7.1.0", + "dev": true, + "license": "MIT", +- "peer": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" +@@ -8656,12 +8420,12 @@ + } + }, + "node_modules/rollup": { ++ "name": "@rollup/wasm-node", + "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/rollup/-/rollup-4.22.4.tgz", +- "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", ++ "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.22.4.tgz", ++ "integrity": "sha512-2AXpNT2gtSyGangSWTwmspOnu0wVMBLC6U/wJ8fs58JhtlAy+B3jNOuaN+7x9blilAoiwBk9187ybhrs7kaCpg==", + "dev": true, + "license": "MIT", +- "peer": true, + "dependencies": { + "@types/estree": "1.0.5" + }, +@@ -8673,22 +8437,6 @@ + "npm": ">=8.0.0" + }, + "optionalDependencies": { +- "@rollup/rollup-android-arm-eabi": "4.22.4", +- "@rollup/rollup-android-arm64": "4.22.4", +- "@rollup/rollup-darwin-arm64": "4.22.4", +- "@rollup/rollup-darwin-x64": "4.22.4", +- "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", +- "@rollup/rollup-linux-arm-musleabihf": "4.22.4", +- "@rollup/rollup-linux-arm64-gnu": "4.22.4", +- "@rollup/rollup-linux-arm64-musl": "4.22.4", +- "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", +- "@rollup/rollup-linux-riscv64-gnu": "4.22.4", +- "@rollup/rollup-linux-s390x-gnu": "4.22.4", +- "@rollup/rollup-linux-x64-gnu": "4.22.4", +- "@rollup/rollup-linux-x64-musl": "4.22.4", +- "@rollup/rollup-win32-arm64-msvc": "4.22.4", +- "@rollup/rollup-win32-ia32-msvc": "4.22.4", +- "@rollup/rollup-win32-x64-msvc": "4.22.4", + "fsevents": "~2.3.2" + } + }, +@@ -9004,7 +8752,6 @@ + "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", + "dev": true, + "license": "BSD-3-Clause", +- "peer": true, + "dependencies": { + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^13.0.5", +@@ -10175,7 +9922,6 @@ + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", +- "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" +@@ -10921,7 +10667,6 @@ + "@babel/core": { + "version": "7.26.10", + "dev": true, +- "peer": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.2", +@@ -11070,15 +10815,13 @@ + "resolved": "https://npm.skia.org/chrome-devtools/@csstools%2fcss-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "dev": true, +- "peer": true, + "requires": {} + }, + "@csstools/css-tokenizer": { + "version": "3.0.4", + "resolved": "https://npm.skia.org/chrome-devtools/@csstools%2fcss-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", +- "dev": true, +- "peer": true ++ "dev": true + }, + "@csstools/media-query-list-parser": { + "version": "4.0.3", +@@ -11617,118 +11360,6 @@ + } + } + }, +- "@rollup/rollup-android-arm-eabi": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", +- "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-android-arm64": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", +- "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-darwin-arm64": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", +- "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-darwin-x64": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", +- "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-arm-gnueabihf": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", +- "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-arm-musleabihf": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", +- "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-arm64-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", +- "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-arm64-musl": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", +- "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-powerpc64le-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", +- "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-riscv64-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", +- "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-s390x-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", +- "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-x64-gnu": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", +- "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-linux-x64-musl": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", +- "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-win32-arm64-msvc": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", +- "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-win32-ia32-msvc": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", +- "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", +- "dev": true, +- "optional": true +- }, +- "@rollup/rollup-win32-x64-msvc": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/@rollup%2frollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", +- "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", +- "dev": true, +- "optional": true +- }, + "@rtsao/scc": { + "version": "1.1.0", + "dev": true +@@ -11985,7 +11616,6 @@ + "resolved": "https://npm.skia.org/chrome-devtools/@typescript-eslint%2fparser/-/parser-8.47.0.tgz", + "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", + "dev": true, +- "peer": true, + "requires": { + "@typescript-eslint/scope-manager": "8.47.0", + "@typescript-eslint/types": "8.47.0", +@@ -12174,8 +11804,7 @@ + "version": "8.15.0", + "resolved": "https://npm.skia.org/chrome-devtools/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", +- "dev": true, +- "peer": true ++ "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", +@@ -12510,7 +12139,6 @@ + "resolved": "https://npm.skia.org/chrome-devtools/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", + "dev": true, +- "peer": true, + "requires": { + "baseline-browser-mapping": "2.8.25", + "caniuse-lite": "1.0.30001754", +@@ -12606,7 +12234,6 @@ + "chai": { + "version": "4.3.4", + "dev": true, +- "peer": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", +@@ -13036,8 +12663,7 @@ + "version": "0.0.1521046", + "resolved": "https://npm.skia.org/chrome-devtools/devtools-protocol/-/devtools-protocol-0.0.1521046.tgz", + "integrity": "sha512-vhE6eymDQSKWUXwwA37NtTTVEzjtGVfDr3pRbsWEQ5onH/Snp2c+2xZHWJJawG/0hCCJLRGt4xVtEVUVILol4w==", +- "dev": true, +- "peer": true ++ "dev": true + }, + "dezalgo": { + "version": "1.0.3", +@@ -13368,7 +12994,6 @@ + "resolved": "https://npm.skia.org/chrome-devtools/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", + "dev": true, +- "peer": true, + "requires": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", +@@ -14688,7 +14313,6 @@ + "karma": { + "version": "6.4.4", + "dev": true, +- "peer": true, + "requires": { + "@colors/colors": "1.5.0", + "body-parser": "^1.19.0", +@@ -15598,7 +15222,6 @@ + "resolved": "https://npm.skia.org/chrome-devtools/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, +- "peer": true, + "requires": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", +@@ -15851,7 +15474,6 @@ + "postcss-selector-parser": { + "version": "7.1.0", + "dev": true, +- "peer": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" +@@ -16188,28 +15810,10 @@ + } + }, + "rollup": { +- "version": "4.22.4", +- "resolved": "https://npm.skia.org/chrome-devtools/rollup/-/rollup-4.22.4.tgz", +- "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", +- "dev": true, +- "peer": true, +- "requires": { +- "@rollup/rollup-android-arm-eabi": "4.22.4", +- "@rollup/rollup-android-arm64": "4.22.4", +- "@rollup/rollup-darwin-arm64": "4.22.4", +- "@rollup/rollup-darwin-x64": "4.22.4", +- "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", +- "@rollup/rollup-linux-arm-musleabihf": "4.22.4", +- "@rollup/rollup-linux-arm64-gnu": "4.22.4", +- "@rollup/rollup-linux-arm64-musl": "4.22.4", +- "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", +- "@rollup/rollup-linux-riscv64-gnu": "4.22.4", +- "@rollup/rollup-linux-s390x-gnu": "4.22.4", +- "@rollup/rollup-linux-x64-gnu": "4.22.4", +- "@rollup/rollup-linux-x64-musl": "4.22.4", +- "@rollup/rollup-win32-arm64-msvc": "4.22.4", +- "@rollup/rollup-win32-ia32-msvc": "4.22.4", +- "@rollup/rollup-win32-x64-msvc": "4.22.4", ++ "version": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.22.4.tgz", ++ "integrity": "sha512-2AXpNT2gtSyGangSWTwmspOnu0wVMBLC6U/wJ8fs58JhtlAy+B3jNOuaN+7x9blilAoiwBk9187ybhrs7kaCpg==", ++ "dev": true, ++ "requires": { + "@types/estree": "1.0.5", + "fsevents": "~2.3.2" + }, +@@ -16410,7 +16014,6 @@ + "resolved": "https://npm.skia.org/chrome-devtools/sinon/-/sinon-21.0.0.tgz", + "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", + "dev": true, +- "peer": true, + "requires": { + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^13.0.5", +@@ -17179,8 +16782,7 @@ + "version": "5.9.3", + "resolved": "https://npm.skia.org/chrome-devtools/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", +- "dev": true, +- "peer": true ++ "dev": true + }, + "typescript-eslint": { + "version": "8.47.0", +diff --git a/third_party/devtools-frontend/src/package.json b/third_party/devtools-frontend/src/package.json +index d6f2a22e05..b75fd7948b 100644 +--- a/third_party/devtools-frontend/src/package.json ++++ b/third_party/devtools-frontend/src/package.json +@@ -80,7 +80,7 @@ + "ora": "9.0.0", + "postcss": "8.5.6", + "puppeteer-core": "24.30.0", +- "rollup": "4.22.4", ++ "rollup": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.22.4.tgz", + "rollup-plugin-sourcemaps2": "0.5.4", + "sinon": "21.0.0", + "source-map-support": "0.5.21", diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-system-nodejs.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-system-nodejs.patch new file mode 100644 index 0000000000000000000000000000000000000000..78c3e965c16427c73be25d74a446ae885e32d90a --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/chromium-system-nodejs.patch @@ -0,0 +1,21 @@ +--- a/third_party/node/node.py ++++ b/third_party/node/node.py +@@ -11,17 +11,7 @@ + + + def GetBinaryPath(): +- if platform.machine() == 'arm64': +- darwin_path = 'mac_arm64' +- darwin_name = 'node-darwin-arm64' +- else: +- darwin_path = 'mac' +- darwin_name = 'node-darwin-x64' +- return os_path.join(os_path.dirname(__file__), *{ +- 'Darwin': (darwin_path, darwin_name, 'bin', 'node'), +- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), +- 'Windows': ('win', 'node.exe'), +- }[platform.system()]) ++ return "/usr/bin/node" + + + def RunNode(cmd_parts, stdout=None): diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/cr138-node-version-check.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/cr138-node-version-check.patch new file mode 100644 index 0000000000000000000000000000000000000000..74fa68c0a5add3af137935b25d6f3eafc497f89f --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/cr138-node-version-check.patch @@ -0,0 +1,67 @@ +From 41bd9e8e46a97cfe8a0dfd2c2626aa7d4809ed4d Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Wed, 28 May 2025 12:10:07 +0200 +Subject: [PATCH] Allow to disable the Node.js version check with a build arg + +For distributions building Chromium with their own Node.js binaries, +version mismatches are expected. Keep the check on by default, +but allow to opt-out of it. + +Bug: 401522564 +Change-Id: I211279a607b5b5fefd13614b177e55e57ba804c1 +--- + third_party/node/BUILD.gn | 40 ++++++++++++++++++++++++--------------- + 1 file changed, 25 insertions(+), 15 deletions(-) + +diff --git a/third_party/node/BUILD.gn b/third_party/node/BUILD.gn +index 1741e14401c8c..75631fac8b462 100644 +--- a/third_party/node/BUILD.gn ++++ b/third_party/node/BUILD.gn +@@ -4,22 +4,32 @@ + + import("//third_party/node/node.gni") + +-node("check_version") { +- script = "check_version.py" ++declare_args() { ++ # Check the version of the Node.js binary. ++ node_version_check = true ++} ++ ++if (node_version_check) { ++ node("check_version") { ++ script = "check_version.py" + +- expected_version_file = "update_node_binaries" +- inputs = [ +- expected_version_file, +- "check_version.js", +- ] ++ expected_version_file = "update_node_binaries" ++ inputs = [ ++ expected_version_file, ++ "check_version.js", ++ ] + +- out_file = "${target_gen_dir}/check_version_result.txt" +- outputs = [ out_file ] ++ out_file = "${target_gen_dir}/check_version_result.txt" ++ outputs = [ out_file ] + +- args = [ +- "--expected_version_file", +- rebase_path(expected_version_file, root_build_dir), +- "--out_file", +- rebase_path(out_file, root_build_dir), +- ] ++ args = [ ++ "--expected_version_file", ++ rebase_path(expected_version_file, root_build_dir), ++ "--out_file", ++ rebase_path(out_file, root_build_dir), ++ ] ++ } ++} else { ++ group("check_version") { ++ } + } diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-aarch64-musl-memory-tagging-macros.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-aarch64-musl-memory-tagging-macros.patch new file mode 100644 index 0000000000000000000000000000000000000000..b3dd2c33f0f2191329e5fa7cfc6efedbc4ef679c --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-aarch64-musl-memory-tagging-macros.patch @@ -0,0 +1,29 @@ +--- a/base/allocator/partition_allocator/src/partition_alloc/tagging.cc ++++ b/base/allocator/partition_allocator/src/partition_alloc/tagging.cc +@@ -28,13 +28,25 @@ + #endif + #endif + +-#ifndef HAS_PR_MTE_MACROS ++#ifndef PR_MTE_TCF_SHIFT + #define PR_MTE_TCF_SHIFT 1 ++#endif ++#ifndef PR_MTE_TCF_NONE + #define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT) ++#endif ++#ifndef PR_MTE_TCF_SYNC + #define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT) ++#endif ++#ifndef PR_MTE_TCF_ASYNC + #define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT) ++#endif ++#ifndef PR_MTE_TCF_MASK + #define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT) ++#endif ++#ifndef PR_MTE_TAG_SHIFT + #define PR_MTE_TAG_SHIFT 3 ++#endif ++#ifndef PR_MTE_TAG_MASK + #define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT) + #endif + #endif diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-argument_spec-isnan-isinf.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-argument_spec-isnan-isinf.patch new file mode 100644 index 0000000000000000000000000000000000000000..837a0312dcbca1fcb3144f4faeb86bb72583c5f6 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-argument_spec-isnan-isinf.patch @@ -0,0 +1,11 @@ +--- a/extensions/renderer/bindings/argument_spec.cc ++++ b/extensions/renderer/bindings/argument_spec.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include ++ + #include "extensions/renderer/bindings/argument_spec.h" + + #include "base/check.h" diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-missing-TEMP_FAILURE_RETRY-macro.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-missing-TEMP_FAILURE_RETRY-macro.patch new file mode 100644 index 0000000000000000000000000000000000000000..b56717b9ce32ed9dc5da5e5976dae48d05755d5e --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-missing-TEMP_FAILURE_RETRY-macro.patch @@ -0,0 +1,21 @@ +This macro is defined in glibc, but not musl. + +--- a/sandbox/linux/suid/process_util.h.orig ++++ b/sandbox/linux/suid/process_util.h +@@ -11,6 +11,16 @@ + #include + #include + ++// Some additional functions ++#if !defined(TEMP_FAILURE_RETRY) ++# define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ + // This adjusts /proc/process/oom_score_adj so the Linux OOM killer + // will prefer certain process types over others. The range for the + // adjustment is [-1000, 1000], with [0, 1000] being user accessible. diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-missing-cstdint-include-musl.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-missing-cstdint-include-musl.patch new file mode 100644 index 0000000000000000000000000000000000000000..6ca2897f3dd2940a7196645dca77d34249ce8bd8 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-missing-cstdint-include-musl.patch @@ -0,0 +1,10 @@ +--- a/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h ++++ b/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h +@@ -3,6 +3,7 @@ + + #include + ++#include + #include + + #include "quiche/common/platform/api/quiche_export.h" diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-musl-missing-unistd_h-include.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-musl-missing-unistd_h-include.patch new file mode 100644 index 0000000000000000000000000000000000000000..e14d009a9e0ba7f71b85a04a90591adc59440025 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-musl-missing-unistd_h-include.patch @@ -0,0 +1,10 @@ +--- a/sandbox/linux/services/credentials.h ++++ b/sandbox/linux/services/credentials.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "sandbox/linux/system_headers/capability.h" + #include "sandbox/sandbox_export.h" diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-perfetto-GetThreadName-musl.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-perfetto-GetThreadName-musl.patch new file mode 100644 index 0000000000000000000000000000000000000000..4014d1ee5e69133743924da78699048ec81f4580 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-perfetto-GetThreadName-musl.patch @@ -0,0 +1,22 @@ +--- a/third_party/perfetto/include/perfetto/ext/base/thread_utils.h ++++ b/third_party/perfetto/include/perfetto/ext/base/thread_utils.h +@@ -30,7 +30,8 @@ + #include + #endif + +-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) ++#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ ++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__)) + #include + #endif + +@@ -58,7 +59,8 @@ + + inline bool GetThreadName(std::string& out_result) { + char buf[16] = {}; +-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) ++#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ ++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__)) + if (prctl(PR_GET_NAME, buf) != 0) + return false; + #else diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-swiftshader-llvm-musl-config.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/fix-swiftshader-llvm-musl-config.patch new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/libc_malloc.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/libc_malloc.patch new file mode 100644 index 0000000000000000000000000000000000000000..414f28765d69c59356136584e03f06cef0715616 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/libc_malloc.patch @@ -0,0 +1,34 @@ +--- a/base/process/memory_linux.cc ++++ b/base/process/memory_linux.cc +@@ -18,6 +18,13 @@ + #include "base/threading/thread_restrictions.h" + #include "build/build_config.h" + ++#if defined(LIBC_GLIBC) ++extern "C" { ++extern void *__libc_malloc(size_t size); ++extern void *__libc_free(void *ptr); ++} ++#endif ++ + namespace base { + + namespace { +@@ -111,7 +118,7 @@ + #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC) + *result = malloc(size); + #elif defined(LIBC_GLIBC) +- *result = __libc_malloc(size); ++ *result = ::__libc_malloc(size); + #endif + return *result != nullptr; + } +@@ -122,7 +129,7 @@ + #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC) + free(ptr); + #elif defined(LIBC_GLIBC) +- __libc_free(ptr); ++ ::__libc_free(ptr); + #endif + } + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/llvm19.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/llvm19.patch new file mode 100644 index 0000000000000000000000000000000000000000..f298f543c39b055c11c467a8ec1c9ac2c5a54599 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/llvm19.patch @@ -0,0 +1,13 @@ +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -328,6 +328,10 @@ + configs -= [ ":clang_warning_suppression" ] + } + ++ if (clang_version == "19") { ++ configs -= [ ":clang_warning_suppression" ] ++ } ++ + # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr + # operations (e.g. dereferencing) into defined behavior. This avoids deletion + # of some security-critical code: see https://crbug.com/1139129. diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-execinfo.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-execinfo.patch new file mode 100644 index 0000000000000000000000000000000000000000..12064bad0a31bf142d1384282339af6d587c0174 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-execinfo.patch @@ -0,0 +1,68 @@ +musl does not have execinfo.h, and hence no implementation of +. backtrace() +. backtrace_symbols() +for discussion about this, see https://www.openwall.com/lists/musl/2021/07/16/1 +-- +--- a/v8/src/codegen/external-reference-table.cc ++++ b/v8/src/codegen/external-reference-table.cc +@@ -11,7 +11,9 @@ + + #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) + #define SYMBOLIZE_FUNCTION ++#if defined(__GLIBC__) + #include ++#endif + + #include + +@@ -96,7 +98,7 @@ + } + + const char* ExternalReferenceTable::ResolveSymbol(void* address) { +-#ifdef SYMBOLIZE_FUNCTION ++#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__) + char** names = backtrace_symbols(&address, 1); + const char* name = names[0]; + // The array of names is malloc'ed. However, each name string is static +--- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h ++++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h +@@ -58,7 +58,7 @@ + #define HAVE_ERRNO_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_EXECINFO_H 1 ++/* #define HAVE_EXECINFO_H 1 */ + + /* Define to 1 if you have the header file. */ + #define HAVE_FCNTL_H 1 +--- a/base/debug/stack_trace.cc ++++ b/base/debug/stack_trace.cc +@@ -311,7 +311,7 @@ + + std::string StackTrace::ToStringWithPrefix(cstring_view prefix_string) const { + std::stringstream stream; +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + OutputToStreamWithPrefix(&stream, prefix_string); + #endif + return stream.str(); +@@ -335,7 +335,7 @@ + } + + std::ostream& operator<<(std::ostream& os, const StackTrace& s) { +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + s.OutputToStream(&os); + #else + os << "StackTrace::OutputToStream not implemented."; +--- a/base/debug/stack_trace_unittest.cc ++++ b/base/debug/stack_trace_unittest.cc +@@ -33,7 +33,7 @@ + typedef testing::Test StackTraceTest; + #endif + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__) + // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX. + // See https://crbug.com/706728 + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-mallinfo.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-mallinfo.patch new file mode 100644 index 0000000000000000000000000000000000000000..a495859b0b39464ea56bbc5ff38e96fe6e5fa82d --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-mallinfo.patch @@ -0,0 +1,125 @@ +Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-mallinfo.patch +musl does not implement mallinfo()/mallinfo2() +(or rather, malloc-ng, musl's allocator, doesn't) +-- +--- a/base/trace_event/malloc_dump_provider.cc ++++ b/base/trace_event/malloc_dump_provider.cc +@@ -185,7 +185,6 @@ + #define MALLINFO2_FOUND_IN_LIBC + struct mallinfo2 info = mallinfo2(); + #endif +-#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ) + #if !defined(MALLINFO2_FOUND_IN_LIBC) + struct mallinfo info = mallinfo(); + #endif +@@ -205,6 +204,7 @@ + sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize, + MemoryAllocatorDump::kUnitsBytes, info.uordblks); + } ++#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ) + } + #endif + +@@ -339,7 +340,7 @@ + &allocated_objects_count); + #elif BUILDFLAG(IS_FUCHSIA) + // TODO(fuchsia): Port, see https://crbug.com/706592. +-#else ++#elif defined(__GLIBC__) + ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, + &allocated_objects_size, &allocated_objects_count); + #endif +--- a/base/process/process_metrics_posix.cc ++++ b/base/process/process_metrics_posix.cc +@@ -105,7 +105,7 @@ + + #endif // !BUILDFLAG(IS_FUCHSIA) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + namespace { + + size_t GetMallocUsageMallinfo() { +@@ -123,7 +123,7 @@ + } + + } // namespace +-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || ++#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) + + size_t ProcessMetrics::GetMallocUsage() { +@@ -131,9 +131,9 @@ + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + return GetMallocUsageMallinfo(); +-#elif BUILDFLAG(IS_FUCHSIA) ++#else + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif +--- ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc.orig ++++ ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc +@@ -35,7 +35,7 @@ + + MemoryUsage GetMemoryUsage() { + MemoryUsage result; +-#ifdef __linux__ ++#if defined(__linux__) && defined(__GLIBC__) + rusage res; + if (getrusage(RUSAGE_SELF, &res) == 0) { + result.max_rss_kb = res.ru_maxrss; +--- ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc ++++ ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc.orig +@@ -86,11 +86,11 @@ + } + + size_t Process::GetMallocUsage() { +-#if defined(HAVE_MALLINFO2) ++#if defined(HAVE_MALLINFO2) && defined(__GLIBC__) + struct mallinfo2 mi; + mi = ::mallinfo2(); + return mi.uordblks; +-#elif defined(HAVE_MALLINFO) ++#elif defined(HAVE_MALLINFO) && defined(__GLIBC__) + struct mallinfo mi; + mi = ::mallinfo(); + return mi.uordblks; + +--- ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig 2019-09-30 13:03:42.556880537 -0400 ++++ ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h 2019-09-30 13:07:27.989821227 -0400 +@@ -122,7 +122,9 @@ + /* #undef HAVE_MALLCTL */ + + /* Define to 1 if you have the `mallinfo' function. */ ++#if defined(__GLIBC__) + #define HAVE_MALLINFO 1 ++#endif + + /* Define to 1 if you have the header file. */ + #define HAVE_MALLOC_H 1 +--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc ++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +@@ -660,7 +660,7 @@ + + #endif // !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_ANDROID) + +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if (PA_BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || PA_BUILDFLAG(IS_CHROMEOS) + SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW { + partition_alloc::SimplePartitionStatsDumper allocator_dumper; + Allocator()->DumpStats("malloc", true, &allocator_dumper); +--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc ++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc +@@ -29,7 +29,7 @@ + #if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + + // Platforms on which we override weak libc symbols. +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if (PA_BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || PA_BUILDFLAG(IS_CHROMEOS) + + PA_NOINLINE void FreeForTest(void* data) { + free(data); diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-sandbox-settls.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-sandbox-settls.patch new file mode 100644 index 0000000000000000000000000000000000000000..5d24cbac259fa982a1982b13f88fb756825721d0 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-no-sandbox-settls.patch @@ -0,0 +1,15 @@ +Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/chromium/no-sandbox-settls.patch +this optimisation of CLONE_SETTLS is not valid used like this, and future musl +clone(3) will EINVAL on this use +-- +--- a/sandbox/linux/services/credentials.cc ++++ b/sandbox/linux/services/credentials.cc +@@ -89,7 +89,7 @@ + + int clone_flags = CLONE_FS | LINUX_SIGCHLD; + void* tls = nullptr; +-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \ ++#if defined(__GLIBC__) && (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \ + !defined(MEMORY_SANITIZER) + // Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables. + // Since clone writes to the new child's TLS before returning, we must set a diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-partition-atfork.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-partition-atfork.patch new file mode 100644 index 0000000000000000000000000000000000000000..598efe2476263c0befc6ee76304d5a647bddfc46 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-partition-atfork.patch @@ -0,0 +1,11 @@ +--- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc ++++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc +@@ -239,7 +239,7 @@ + if (!g_global_init_called.compare_exchange_strong(expected, true)) + return; + +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if (PA_BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || PA_BUILDFLAG(IS_CHROMEOS) + // When fork() is called, only the current thread continues to execute in the + // child process. If the lock is held, but *not* by this thread when fork() is + // called, we have a deadlock. diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-tid-caching.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-tid-caching.patch new file mode 100644 index 0000000000000000000000000000000000000000..296c47530d6b992b780ed88cbf1bdc42d670efa0 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/musl-tid-caching.patch @@ -0,0 +1,90 @@ +Source: https://git.alpinelinux.org/aports/plain/community/chromium/musl-tid-caching.patch +the sandbox caching of thread id's only works with glibc +see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32356 +see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579 +-- +--- a/sandbox/linux/services/namespace_sandbox.cc ++++ b/sandbox/linux/services/namespace_sandbox.cc +@@ -209,6 +209,72 @@ + return base::LaunchProcess(argv, launch_options_copy); + } + ++#if !defined(LIBC_GLIBC) ++#if defined(__aarch64__) ++#define TLS_ABOVE_TP ++#endif ++ ++struct musl_pthread ++{ ++ /* Part 1 -- these fields may be external or ++ * internal (accessed via asm) ABI. Do not change. */ ++ struct pthread *self; ++#ifndef TLS_ABOVE_TP ++ uintptr_t *dtv; ++#endif ++ struct pthread *prev, *next; /* non-ABI */ ++ uintptr_t sysinfo; ++#ifndef TLS_ABOVE_TP ++#ifdef CANARY_PAD ++ uintptr_t canary_pad; ++#endif ++ uintptr_t canary; ++#endif ++ ++/* Part 2 -- implementation details, non-ABI. */ ++ int tid; ++ int errno_val; ++ volatile int detach_state; ++ volatile int cancel; ++ volatile unsigned char canceldisable, cancelasync; ++ unsigned char tsd_used:1; ++ unsigned char dlerror_flag:1; ++ unsigned char *map_base; ++ size_t map_size; ++ void *stack; ++ size_t stack_size; ++ size_t guard_size; ++ void *result; ++ struct __ptcb *cancelbuf; ++ void **tsd; ++ struct { ++ volatile void *volatile head; ++ long off; ++ volatile void *volatile pending; ++ } robust_list; ++ int h_errno_val; ++ volatile int timer_id; ++ locale_t locale; ++ volatile int killlock[1]; ++ char *dlerror_buf; ++ void *stdio_locks; ++ ++ /* Part 3 -- the positions of these fields relative to ++ * the end of the structure is external and internal ABI. */ ++#ifdef TLS_ABOVE_TP ++ uintptr_t canary; ++ uintptr_t *dtv; ++#endif ++}; ++ ++void MaybeUpdateMuslTidCache() ++{ ++ pid_t real_tid = sys_gettid(); ++ pid_t* cached_tid_location = &reinterpret_cast(pthread_self())->tid; ++ *cached_tid_location = real_tid; ++} ++#endif ++ + // static + pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) { + const pid_t pid = +@@ -226,6 +292,8 @@ + #if defined(LIBC_GLIBC) + MaybeUpdateGlibcTidCache(); +-#endif ++#else ++ MaybeUpdateMuslTidCache(); ++#endif + return 0; + } + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/no-getcontext.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/no-getcontext.patch new file mode 100644 index 0000000000000000000000000000000000000000..f9bc2e02d24561c3e7dd0c24daeffb45cc377b4e --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/no-getcontext.patch @@ -0,0 +1,27 @@ +--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 09:59:55.554536646 +0100 ++++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 10:01:16.818238035 +0100 +@@ -477,7 +477,9 @@ bool ExceptionHandler::SimulateSignalDel + siginfo.si_code = SI_USER; + siginfo.si_pid = getpid(); + ucontext_t context; ++#if defined(__GLIBC__) + getcontext(&context); ++#endif + return HandleSignal(sig, &siginfo, &context); + } + +@@ -647,9 +649,14 @@ bool ExceptionHandler::WriteMinidump() { + sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); + + CrashContext context; ++ ++#if defined(__GLIBC__) + int getcontext_result = getcontext(&context.context); + if (getcontext_result) + return false; ++#else ++ return false; ++#endif + + #if defined(__i386__) + // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/node-do-not-check-version.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/node-do-not-check-version.patch new file mode 100644 index 0000000000000000000000000000000000000000..3faf41731c81d8e84bcf9a85efff53b332f9781d --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/node-do-not-check-version.patch @@ -0,0 +1,19 @@ +--- a/third_party/node/node.gni ++++ b/third_party/node/node.gni +@@ -35,16 +35,5 @@ + inputs += [ "//third_party/node/mac/node-darwin-x64/bin/node" ] + } + } +- +- # Automatically add a dependency to ":check_version" to ensure NodeJS is +- # always running the expected version, except when the ':check_version' +- # target itself is running in which case it shouldn't depend on itself. +- if (get_label_info(":" + target_name, "label_no_toolchain") != +- "//third_party/node:check_version") { +- if (!defined(deps)) { +- deps = [] +- } +- deps += [ "//third_party/node:check_version" ] +- } + } + } diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/remove-sys-cdefs-includes.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/remove-sys-cdefs-includes.patch new file mode 100644 index 0000000000000000000000000000000000000000..e285f07f1a63a305844b68ea892e22b43cdefa3b --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/remove-sys-cdefs-includes.patch @@ -0,0 +1,11 @@ +--- a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h ++++ b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h +@@ -17,8 +17,6 @@ + + #include_next + +-#include +- + // https://sourceware.org/bugzilla/show_bug.cgi?id=22433 + #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \ + defined(__GLIBC__) diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/sandbox-membarrier.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/sandbox-membarrier.patch new file mode 100644 index 0000000000000000000000000000000000000000..55ef2516194a28115934c2d3d21a0ad12fa375d1 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/sandbox-membarrier.patch @@ -0,0 +1,10 @@ +--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -370,6 +370,7 @@ + switch (sysno) { + case __NR_exit: + case __NR_exit_group: ++ case __NR_membarrier: + case __NR_wait4: + case __NR_waitid: + #if defined(__i386__) diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/sndio.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/sndio.patch new file mode 100644 index 0000000000000000000000000000000000000000..b240ac3fed1fd5e52577352398a92d9d3057f989 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/sndio.patch @@ -0,0 +1,875 @@ +diff -Naur chromium-83.0.4103.97.orig/media/BUILD.gn chromium-83.0.4103.97/media/BUILD.gn +--- a/media/BUILD.gn ++++ b/media/BUILD.gn +@@ -69,6 +69,7 @@ + "USE_PROPRIETARY_CODECS=$proprietary_codecs", + "ENABLE_GPU_CHANNEL_MEDIA_CAPTURE=$enable_gpu_channel_media_capture", + "USE_OPENSLES=$media_use_opensles", ++ "USE_SNDIO=$use_sndio", + ] + + if (enable_library_cdms) { +diff -Naur chromium-83.0.4103.97.orig/media/audio/BUILD.gn chromium-83.0.4103.97/media/audio/BUILD.gn +--- a/media/audio/BUILD.gn 2020-06-03 20:39:37.000000000 +0200 ++++ b/media/audio/BUILD.gn 2020-06-13 17:32:28.511395969 +0200 +@@ -236,6 +236,17 @@ + sources += [ "linux/audio_manager_linux.cc" ] + } + ++ if (use_sndio) { ++ libs += [ "sndio" ] ++ sources += [ ++ "sndio/audio_manager_sndio.cc", ++ "sndio/sndio_input.cc", ++ "sndio/sndio_input.h", ++ "sndio/sndio_output.cc", ++ "sndio/sndio_output.h" ++ ] ++ } ++ + if (use_alsa) { + libs += [ "asound" ] + sources += [ +diff -Naur chromium-83.0.4103.97.orig/media/audio/linux/audio_manager_linux.cc chromium-83.0.4103.97/media/audio/linux/audio_manager_linux.cc +--- a/media/audio/linux/audio_manager_linux.cc 2020-06-03 20:39:37.000000000 +0200 ++++ b/media/audio/linux/audio_manager_linux.cc 2020-06-13 18:09:43.623333167 +0200 +@@ -19,6 +19,11 @@ + #include "media/audio/pulse/audio_manager_pulse.h" + #include "media/audio/pulse/pulse_util.h" + #endif ++#if defined(USE_SNDIO) ++#include "media/audio/sndio/audio_manager_sndio.h" ++#include "media/audio/sndio/sndio_input.h" ++#include "media/audio/sndio/sndio_output.h" ++#endif + + namespace media { + + std::unique_ptr CreateAudioManager( +@@ -39,6 +45,16 @@ + audio_log_factory); + } + ++#if defined(USE_SNDIO) ++ struct sio_hdl *hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0); ++ if (hdl != NULL) { ++ sio_close(hdl); ++ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax + 1); ++ return std::make_unique(std::move(audio_thread), ++ audio_log_factory); ++ } ++#endif ++ + #if defined(USE_CRAS) + if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseCras)) { + UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax + 1); +diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.cc chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.cc +--- a/media/audio/sndio/audio_manager_sndio.cc 1970-01-01 01:00:00.000000000 +0100 ++++ b/media/audio/sndio/audio_manager_sndio.cc 2020-06-13 17:32:28.511395969 +0200 +@@ -0,0 +1,148 @@ ++// Copyright (c) 2012 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "media/audio/sndio/audio_manager_sndio.h" ++ ++#include "base/metrics/histogram_macros.h" ++#include "base/memory/ptr_util.h" ++#include "media/audio/audio_device_description.h" ++#include "media/audio/audio_output_dispatcher.h" ++#include "media/audio/sndio/sndio_input.h" ++#include "media/audio/sndio/sndio_output.h" ++#include "media/base/limits.h" ++#include "media/base/media_switches.h" ++ ++namespace media { ++ ++ ++// Maximum number of output streams that can be open simultaneously. ++static const int kMaxOutputStreams = 4; ++ ++// Default sample rate for input and output streams. ++static const int kDefaultSampleRate = 48000; ++ ++void AddDefaultDevice(AudioDeviceNames* device_names) { ++ DCHECK(device_names->empty()); ++ device_names->push_front(AudioDeviceName::CreateDefault()); ++} ++ ++bool AudioManagerSndio::HasAudioOutputDevices() { ++ return true; ++} ++ ++bool AudioManagerSndio::HasAudioInputDevices() { ++ return true; ++} ++ ++void AudioManagerSndio::GetAudioInputDeviceNames( ++ AudioDeviceNames* device_names) { ++ DCHECK(device_names->empty()); ++ AddDefaultDevice(device_names); ++} ++ ++void AudioManagerSndio::GetAudioOutputDeviceNames( ++ AudioDeviceNames* device_names) { ++ AddDefaultDevice(device_names); ++} ++ ++const char* AudioManagerSndio::GetName() { ++ return "SNDIO"; ++} ++ ++AudioParameters AudioManagerSndio::GetInputStreamParameters( ++ const std::string& device_id) { ++ static const int kDefaultInputBufferSize = 1024; ++ ++ int user_buffer_size = GetUserBufferSize(); ++ int buffer_size = user_buffer_size ? ++ user_buffer_size : kDefaultInputBufferSize; ++ ++ return AudioParameters( ++ AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, ++ kDefaultSampleRate, buffer_size); ++} ++ ++AudioManagerSndio::AudioManagerSndio(std::unique_ptr audio_thread, ++ AudioLogFactory* audio_log_factory) ++ : AudioManagerBase(std::move(audio_thread), ++ audio_log_factory) { ++ DLOG(WARNING) << "AudioManagerSndio"; ++ SetMaxOutputStreamsAllowed(kMaxOutputStreams); ++} ++ ++AudioManagerSndio::~AudioManagerSndio() { ++ Shutdown(); ++} ++ ++AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream( ++ const AudioParameters& params, ++ const LogCallback& log_callback) { ++ DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); ++ return MakeOutputStream(params); ++} ++ ++AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream( ++ const AudioParameters& params, ++ const std::string& device_id, ++ const LogCallback& log_callback) { ++ DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; ++ DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); ++ return MakeOutputStream(params); ++} ++ ++AudioInputStream* AudioManagerSndio::MakeLinearInputStream( ++ const AudioParameters& params, ++ const std::string& device_id, ++ const LogCallback& log_callback) { ++ DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); ++ return MakeInputStream(params); ++} ++ ++AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream( ++ const AudioParameters& params, ++ const std::string& device_id, ++ const LogCallback& log_callback) { ++ DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); ++ return MakeInputStream(params); ++} ++ ++AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters( ++ const std::string& output_device_id, ++ const AudioParameters& input_params) { ++ // TODO(tommi): Support |output_device_id|. ++ DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!"; ++ static const int kDefaultOutputBufferSize = 2048; ++ ++ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO; ++ int sample_rate = kDefaultSampleRate; ++ int buffer_size = kDefaultOutputBufferSize; ++ if (input_params.IsValid()) { ++ sample_rate = input_params.sample_rate(); ++ channel_layout = input_params.channel_layout(); ++ buffer_size = std::min(buffer_size, input_params.frames_per_buffer()); ++ } ++ ++ int user_buffer_size = GetUserBufferSize(); ++ if (user_buffer_size) ++ buffer_size = user_buffer_size; ++ ++ return AudioParameters( ++ AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, ++ sample_rate, buffer_size); ++} ++ ++AudioInputStream* AudioManagerSndio::MakeInputStream( ++ const AudioParameters& params) { ++ DLOG(WARNING) << "MakeInputStream"; ++ return new SndioAudioInputStream(this, ++ AudioDeviceDescription::kDefaultDeviceId, params); ++} ++ ++AudioOutputStream* AudioManagerSndio::MakeOutputStream( ++ const AudioParameters& params) { ++ DLOG(WARNING) << "MakeOutputStream"; ++ return new SndioAudioOutputStream(params, this); ++} ++ ++} // namespace media +diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.h chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.h +--- a/media/audio/sndio/audio_manager_sndio.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/media/audio/sndio/audio_manager_sndio.h 2020-06-13 17:32:28.511395969 +0200 +@@ -0,0 +1,65 @@ ++// Copyright (c) 2012 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_ ++#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_ ++ ++#include ++ ++#include "base/compiler_specific.h" ++#include "base/macros.h" ++#include "base/memory/ref_counted.h" ++#include "base/threading/thread.h" ++#include "media/audio/audio_manager_base.h" ++ ++namespace media { ++ ++class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase { ++ public: ++ AudioManagerSndio(std::unique_ptr audio_thread, ++ AudioLogFactory* audio_log_factory); ++ ~AudioManagerSndio() override; ++ ++ // Implementation of AudioManager. ++ bool HasAudioOutputDevices() override; ++ bool HasAudioInputDevices() override; ++ void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override; ++ void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override; ++ AudioParameters GetInputStreamParameters( ++ const std::string& device_id) override; ++ const char* GetName() override; ++ ++ // Implementation of AudioManagerBase. ++ AudioOutputStream* MakeLinearOutputStream( ++ const AudioParameters& params, ++ const LogCallback& log_callback) override; ++ AudioOutputStream* MakeLowLatencyOutputStream( ++ const AudioParameters& params, ++ const std::string& device_id, ++ const LogCallback& log_callback) override; ++ AudioInputStream* MakeLinearInputStream( ++ const AudioParameters& params, ++ const std::string& device_id, ++ const LogCallback& log_callback) override; ++ AudioInputStream* MakeLowLatencyInputStream( ++ const AudioParameters& params, ++ const std::string& device_id, ++ const LogCallback& log_callback) override; ++ ++ protected: ++ AudioParameters GetPreferredOutputStreamParameters( ++ const std::string& output_device_id, ++ const AudioParameters& input_params) override; ++ ++ private: ++ // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. ++ AudioOutputStream* MakeOutputStream(const AudioParameters& params); ++ AudioInputStream* MakeInputStream(const AudioParameters& params); ++ ++ DISALLOW_COPY_AND_ASSIGN(AudioManagerSndio); ++}; ++ ++} // namespace media ++ ++#endif // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_ +diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.cc chromium-83.0.4103.97/media/audio/sndio/sndio_input.cc +--- a/media/audio/sndio/sndio_input.cc 1970-01-01 01:00:00.000000000 +0100 ++++ b/media/audio/sndio/sndio_input.cc 2020-06-13 17:32:28.511395969 +0200 +@@ -0,0 +1,200 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "base/bind.h" ++#include "base/logging.h" ++#include "base/macros.h" ++#include "media/base/audio_timestamp_helper.h" ++#include "media/audio/sndio/audio_manager_sndio.h" ++#include "media/audio/audio_manager.h" ++#include "media/audio/sndio/sndio_input.h" ++ ++namespace media { ++ ++static const SampleFormat kSampleFormat = kSampleFormatS16; ++ ++void SndioAudioInputStream::OnMoveCallback(void *arg, int delta) ++{ ++ SndioAudioInputStream* self = static_cast(arg); ++ ++ self->hw_delay += delta; ++} ++ ++void *SndioAudioInputStream::ThreadEntry(void *arg) { ++ SndioAudioInputStream* self = static_cast(arg); ++ ++ self->ThreadLoop(); ++ return NULL; ++} ++ ++SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager, ++ const std::string& device_name, ++ const AudioParameters& params) ++ : manager(manager), ++ params(params), ++ audio_bus(AudioBus::Create(params)), ++ state(kClosed) { ++} ++ ++SndioAudioInputStream::~SndioAudioInputStream() { ++ if (state != kClosed) ++ Close(); ++} ++ ++bool SndioAudioInputStream::Open() { ++ struct sio_par par; ++ int sig; ++ ++ if (state != kClosed) ++ return false; ++ ++ if (params.format() != AudioParameters::AUDIO_PCM_LINEAR && ++ params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) { ++ LOG(WARNING) << "Unsupported audio format."; ++ return false; ++ } ++ ++ sio_initpar(&par); ++ par.rate = params.sample_rate(); ++ par.rchan = params.channels(); ++ par.bits = SampleFormatToBitsPerChannel(kSampleFormat); ++ par.bps = par.bits / 8; ++ par.sig = sig = par.bits != 8 ? 1 : 0; ++ par.le = SIO_LE_NATIVE; ++ par.appbufsz = params.frames_per_buffer(); ++ ++ hdl = sio_open(SIO_DEVANY, SIO_REC, 0); ++ ++ if (hdl == NULL) { ++ LOG(ERROR) << "Couldn't open audio device."; ++ return false; ++ } ++ ++ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) { ++ LOG(ERROR) << "Couldn't set audio parameters."; ++ goto bad_close; ++ } ++ ++ if (par.rate != (unsigned int)params.sample_rate() || ++ par.rchan != (unsigned int)params.channels() || ++ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) || ++ par.sig != (unsigned int)sig || ++ (par.bps > 1 && par.le != SIO_LE_NATIVE) || ++ (par.bits != par.bps * 8)) { ++ LOG(ERROR) << "Unsupported audio parameters."; ++ goto bad_close; ++ } ++ state = kStopped; ++ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)]; ++ sio_onmove(hdl, &OnMoveCallback, this); ++ return true; ++bad_close: ++ sio_close(hdl); ++ return false; ++} ++ ++void SndioAudioInputStream::Start(AudioInputCallback* cb) { ++ ++ StartAgc(); ++ ++ state = kRunning; ++ hw_delay = 0; ++ callback = cb; ++ sio_start(hdl); ++ if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) { ++ LOG(ERROR) << "Failed to create real-time thread for recording."; ++ sio_stop(hdl); ++ state = kStopped; ++ } ++} ++ ++void SndioAudioInputStream::Stop() { ++ ++ if (state == kStopped) ++ return; ++ ++ state = kStopWait; ++ pthread_join(thread, NULL); ++ sio_stop(hdl); ++ state = kStopped; ++ ++ StopAgc(); ++} ++ ++void SndioAudioInputStream::Close() { ++ ++ if (state == kClosed) ++ return; ++ ++ if (state == kRunning) ++ Stop(); ++ ++ state = kClosed; ++ delete [] buffer; ++ sio_close(hdl); ++ ++ manager->ReleaseInputStream(this); ++} ++ ++double SndioAudioInputStream::GetMaxVolume() { ++ // Not supported ++ return 0.0; ++} ++ ++void SndioAudioInputStream::SetVolume(double volume) { ++ // Not supported. Do nothing. ++} ++ ++double SndioAudioInputStream::GetVolume() { ++ // Not supported. ++ return 0.0; ++} ++ ++bool SndioAudioInputStream::IsMuted() { ++ // Not supported. ++ return false; ++} ++ ++void SndioAudioInputStream::SetOutputDeviceForAec( ++ const std::string& output_device_id) { ++ // Not supported. ++} ++ ++void SndioAudioInputStream::ThreadLoop(void) { ++ size_t todo, n; ++ char *data; ++ unsigned int nframes; ++ double normalized_volume = 0.0; ++ ++ nframes = audio_bus->frames(); ++ ++ while (state == kRunning && !sio_eof(hdl)) { ++ ++ GetAgcVolume(&normalized_volume); ++ ++ // read one block ++ todo = nframes * params.GetBytesPerFrame(kSampleFormat); ++ data = buffer; ++ while (todo > 0) { ++ n = sio_read(hdl, data, todo); ++ if (n == 0) ++ return; // unrecoverable I/O error ++ todo -= n; ++ data += n; ++ } ++ hw_delay -= nframes; ++ ++ // convert frames count to TimeDelta ++ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, ++ params.sample_rate()); ++ ++ // push into bus ++ audio_bus->FromInterleaved(reinterpret_cast(buffer), nframes); ++ ++ // invoke callback ++ callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.); ++ } ++} ++ ++} // namespace media +diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.h chromium-83.0.4103.97/media/audio/sndio/sndio_input.h +--- a/media/audio/sndio/sndio_input.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/media/audio/sndio/sndio_input.h 2020-06-13 17:32:28.511395969 +0200 +@@ -0,0 +1,91 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ ++#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ ++ ++#include ++#include ++#include ++ ++#include "base/compiler_specific.h" ++#include "base/macros.h" ++#include "base/memory/weak_ptr.h" ++#include "base/time/time.h" ++#include "media/audio/agc_audio_stream.h" ++#include "media/audio/audio_io.h" ++#include "media/audio/audio_device_description.h" ++#include "media/base/audio_parameters.h" ++ ++namespace media { ++ ++class AudioManagerBase; ++ ++// Implementation of AudioOutputStream using sndio(7) ++class SndioAudioInputStream : public AgcAudioStream { ++ public: ++ // Pass this to the constructor if you want to attempt auto-selection ++ // of the audio recording device. ++ static const char kAutoSelectDevice[]; ++ ++ // Create a PCM Output stream for the SNDIO device identified by ++ // |device_name|. If unsure of what to use for |device_name|, use ++ // |kAutoSelectDevice|. ++ SndioAudioInputStream(AudioManagerBase* audio_manager, ++ const std::string& device_name, ++ const AudioParameters& params); ++ ++ ~SndioAudioInputStream() override; ++ ++ // Implementation of AudioInputStream. ++ bool Open() override; ++ void Start(AudioInputCallback* callback) override; ++ void Stop() override; ++ void Close() override; ++ double GetMaxVolume() override; ++ void SetVolume(double volume) override; ++ double GetVolume() override; ++ bool IsMuted() override; ++ void SetOutputDeviceForAec(const std::string& output_device_id) override; ++ ++ private: ++ ++ enum StreamState { ++ kClosed, // Not opened yet ++ kStopped, // Device opened, but not started yet ++ kRunning, // Started, device playing ++ kStopWait // Stopping, waiting for the real-time thread to exit ++ }; ++ ++ // C-style call-backs ++ static void OnMoveCallback(void *arg, int delta); ++ static void* ThreadEntry(void *arg); ++ ++ // Continuously moves data from the device to the consumer ++ void ThreadLoop(); ++ // Our creator, the audio manager needs to be notified when we close. ++ AudioManagerBase* manager; ++ // Parameters of the source ++ AudioParameters params; ++ // We store data here for consumer ++ std::unique_ptr audio_bus; ++ // Call-back that consumes recorded data ++ AudioInputCallback* callback; // Valid during a recording session. ++ // Handle of the audio device ++ struct sio_hdl* hdl; ++ // Current state of the stream ++ enum StreamState state; ++ // High priority thread running ThreadLoop() ++ pthread_t thread; ++ // Number of frames buffered in the hardware ++ int hw_delay; ++ // Temporary buffer where data is stored sndio-compatible format ++ char* buffer; ++ ++ DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream); ++}; ++ ++} // namespace media ++ ++#endif // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ +diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.cc chromium-83.0.4103.97/media/audio/sndio/sndio_output.cc +--- a/media/audio/sndio/sndio_output.cc 1970-01-01 01:00:00.000000000 +0100 ++++ b/media/audio/sndio/sndio_output.cc 2020-06-13 17:32:28.511395969 +0200 +@@ -0,0 +1,183 @@ ++// Copyright (c) 2012 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "base/logging.h" ++#include "base/time/time.h" ++#include "base/time/default_tick_clock.h" ++#include "media/audio/audio_manager_base.h" ++#include "media/base/audio_timestamp_helper.h" ++#include "media/audio/sndio/sndio_output.h" ++ ++namespace media { ++ ++static const SampleFormat kSampleFormat = kSampleFormatS16; ++ ++void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) { ++ SndioAudioOutputStream* self = static_cast(arg); ++ ++ self->hw_delay -= delta; ++} ++ ++void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) { ++ SndioAudioOutputStream* self = static_cast(arg); ++ ++ self->vol = vol; ++} ++ ++void *SndioAudioOutputStream::ThreadEntry(void *arg) { ++ SndioAudioOutputStream* self = static_cast(arg); ++ ++ self->ThreadLoop(); ++ return NULL; ++} ++ ++SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params, ++ AudioManagerBase* manager) ++ : manager(manager), ++ params(params), ++ audio_bus(AudioBus::Create(params)), ++ state(kClosed), ++ mutex(PTHREAD_MUTEX_INITIALIZER) { ++} ++ ++SndioAudioOutputStream::~SndioAudioOutputStream() { ++ if (state != kClosed) ++ Close(); ++} ++ ++bool SndioAudioOutputStream::Open() { ++ struct sio_par par; ++ int sig; ++ ++ if (params.format() != AudioParameters::AUDIO_PCM_LINEAR && ++ params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) { ++ LOG(WARNING) << "Unsupported audio format."; ++ return false; ++ } ++ sio_initpar(&par); ++ par.rate = params.sample_rate(); ++ par.pchan = params.channels(); ++ par.bits = SampleFormatToBitsPerChannel(kSampleFormat); ++ par.bps = par.bits / 8; ++ par.sig = sig = par.bits != 8 ? 1 : 0; ++ par.le = SIO_LE_NATIVE; ++ par.appbufsz = params.frames_per_buffer(); ++ ++ hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0); ++ if (hdl == NULL) { ++ LOG(ERROR) << "Couldn't open audio device."; ++ return false; ++ } ++ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) { ++ LOG(ERROR) << "Couldn't set audio parameters."; ++ goto bad_close; ++ } ++ if (par.rate != (unsigned int)params.sample_rate() || ++ par.pchan != (unsigned int)params.channels() || ++ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) || ++ par.sig != (unsigned int)sig || ++ (par.bps > 1 && par.le != SIO_LE_NATIVE) || ++ (par.bits != par.bps * 8)) { ++ LOG(ERROR) << "Unsupported audio parameters."; ++ goto bad_close; ++ } ++ state = kStopped; ++ volpending = 0; ++ vol = 0; ++ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)]; ++ sio_onmove(hdl, &OnMoveCallback, this); ++ sio_onvol(hdl, &OnVolCallback, this); ++ return true; ++ bad_close: ++ sio_close(hdl); ++ return false; ++} ++ ++void SndioAudioOutputStream::Close() { ++ if (state == kClosed) ++ return; ++ if (state == kRunning) ++ Stop(); ++ state = kClosed; ++ delete [] buffer; ++ sio_close(hdl); ++ manager->ReleaseOutputStream(this); // Calls the destructor ++} ++ ++void SndioAudioOutputStream::Start(AudioSourceCallback* callback) { ++ state = kRunning; ++ hw_delay = 0; ++ source = callback; ++ sio_start(hdl); ++ if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) { ++ LOG(ERROR) << "Failed to create real-time thread."; ++ sio_stop(hdl); ++ state = kStopped; ++ } ++} ++ ++void SndioAudioOutputStream::Stop() { ++ if (state == kStopped) ++ return; ++ state = kStopWait; ++ pthread_join(thread, NULL); ++ sio_stop(hdl); ++ state = kStopped; ++} ++ ++void SndioAudioOutputStream::SetVolume(double v) { ++ pthread_mutex_lock(&mutex); ++ vol = v * SIO_MAXVOL; ++ volpending = 1; ++ pthread_mutex_unlock(&mutex); ++} ++ ++void SndioAudioOutputStream::GetVolume(double* v) { ++ pthread_mutex_lock(&mutex); ++ *v = vol * (1. / SIO_MAXVOL); ++ pthread_mutex_unlock(&mutex); ++} ++ ++// This stream is always used with sub second buffer sizes, where it's ++// sufficient to simply always flush upon Start(). ++void SndioAudioOutputStream::Flush() {} ++ ++void SndioAudioOutputStream::ThreadLoop(void) { ++ int avail, count, result; ++ ++ while (state == kRunning) { ++ // Update volume if needed ++ pthread_mutex_lock(&mutex); ++ if (volpending) { ++ volpending = 0; ++ sio_setvol(hdl, vol); ++ } ++ pthread_mutex_unlock(&mutex); ++ ++ // Get data to play ++ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, ++ params.sample_rate()); ++ count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get()); ++ audio_bus->ToInterleaved(count, reinterpret_cast(buffer)); ++ if (count == 0) { ++ // We have to submit something to the device ++ count = audio_bus->frames(); ++ memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat)); ++ LOG(WARNING) << "No data to play, running empty cycle."; ++ } ++ ++ // Submit data to the device ++ avail = count * params.GetBytesPerFrame(kSampleFormat); ++ result = sio_write(hdl, buffer, avail); ++ if (result == 0) { ++ LOG(WARNING) << "Audio device disconnected."; ++ break; ++ } ++ ++ // Update hardware pointer ++ hw_delay += count; ++ } ++} ++ ++} // namespace media +diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.h chromium-83.0.4103.97/media/audio/sndio/sndio_output.h +--- a/media/audio/sndio/sndio_output.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/media/audio/sndio/sndio_output.h 2020-06-13 17:32:28.511395969 +0200 +@@ -0,0 +1,86 @@ ++// Copyright (c) 2012 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_ ++#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_ ++ ++#include ++#include ++ ++#include "base/time/tick_clock.h" ++#include "base/time/time.h" ++#include "media/audio/audio_io.h" ++ ++namespace media { ++ ++class AudioManagerBase; ++ ++// Implementation of AudioOutputStream using sndio(7) ++class SndioAudioOutputStream : public AudioOutputStream { ++ public: ++ // The manager is creating this object ++ SndioAudioOutputStream(const AudioParameters& params, ++ AudioManagerBase* manager); ++ virtual ~SndioAudioOutputStream(); ++ ++ // Implementation of AudioOutputStream. ++ bool Open() override; ++ void Close() override; ++ void Start(AudioSourceCallback* callback) override; ++ void Stop() override; ++ void SetVolume(double volume) override; ++ void GetVolume(double* volume) override; ++ void Flush() override; ++ ++ friend void sndio_onmove(void *arg, int delta); ++ friend void sndio_onvol(void *arg, unsigned int vol); ++ friend void *sndio_threadstart(void *arg); ++ ++ private: ++ enum StreamState { ++ kClosed, // Not opened yet ++ kStopped, // Device opened, but not started yet ++ kRunning, // Started, device playing ++ kStopWait // Stopping, waiting for the real-time thread to exit ++ }; ++ ++ // C-style call-backs ++ static void OnMoveCallback(void *arg, int delta); ++ static void OnVolCallback(void *arg, unsigned int vol); ++ static void* ThreadEntry(void *arg); ++ ++ // Continuously moves data from the producer to the device ++ void ThreadLoop(void); ++ ++ // Our creator, the audio manager needs to be notified when we close. ++ AudioManagerBase* manager; ++ // Parameters of the source ++ AudioParameters params; ++ // Source stores data here ++ std::unique_ptr audio_bus; ++ // Call-back that produces data to play ++ AudioSourceCallback* source; ++ // Handle of the audio device ++ struct sio_hdl* hdl; ++ // Current state of the stream ++ enum StreamState state; ++ // High priority thread running ThreadLoop() ++ pthread_t thread; ++ // Protects vol, volpending and hw_delay ++ pthread_mutex_t mutex; ++ // Current volume in the 0..SIO_MAXVOL range ++ int vol; ++ // Set to 1 if volumes must be refreshed in the realtime thread ++ int volpending; ++ // Number of frames buffered in the hardware ++ int hw_delay; ++ // Temporary buffer where data is stored sndio-compatible format ++ char* buffer; ++ ++ DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream); ++}; ++ ++} // namespace media ++ ++#endif // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_ +diff -Naur chromium-83.0.4103.97.orig/media/media_options.gni chromium-83.0.4103.97/media/media_options.gni +--- a/media/media_options.gni ++++ b/media/media_options.gni +@@ -158,6 +158,9 @@ + # Enables runtime selection of ALSA library for audio. + use_alsa = false + ++ # Enable runtime selection of sndio(7) ++ use_sndio = false ++ + # Alsa should be used on all non-Android, non-Mac POSIX systems - with the + # exception of CastOS desktop builds. + # diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/systypes.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/systypes.patch new file mode 100644 index 0000000000000000000000000000000000000000..1ccebbd2f2b3182cd754fb95743df13ee8e1df29 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/systypes.patch @@ -0,0 +1,11 @@ +--- a/base/third_party/symbolize/symbolize.h ++++ b/base/third_party/symbolize/symbolize.h +@@ -58,6 +58,8 @@ + #include "config.h" + #include "glog/logging.h" + ++#include ++ + #ifdef HAVE_SYMBOLIZE + + #if defined(__ELF__) // defined by gcc diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/unbundled-cross-toolchain.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/unbundled-cross-toolchain.patch new file mode 100644 index 0000000000000000000000000000000000000000..c3f2294ac4b2cb109fc710f7e051f807d80b77e7 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/unbundled-cross-toolchain.patch @@ -0,0 +1,12 @@ +--- a/build/toolchain/linux/unbundle/BUILD.gn.orig ++++ b/build/toolchain/linux/unbundle/BUILD.gn +@@ -35,7 +35,7 @@ + extra_ldflags = getenv("BUILD_LDFLAGS") + + toolchain_args = { +- current_cpu = current_cpu +- current_os = current_os ++ current_cpu = host_cpu ++ current_os = host_os + } + } diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/webrtc-size_t.patch b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/webrtc-size_t.patch new file mode 100644 index 0000000000000000000000000000000000000000..dd46fe14cd2b1c426e50cdf573bc74f0f6940ec1 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/patches/webrtc-size_t.patch @@ -0,0 +1,10 @@ +--- a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-08-10 20:42:29.000000000 +0200 ++++ b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-09-04 12:47:07.014833633 +0200 +@@ -12,6 +12,7 @@ + #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_ + + #include ++#include + + namespace webrtc { + diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/template b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/template new file mode 100644 index 0000000000000000000000000000000000000000..b238ebdef76874857ec0061fa2524f2d7d229fbc --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/template @@ -0,0 +1,434 @@ +# Template file for 'ungoogled-chromium' +pkgname=ungoogled-chromium +# See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version +version=145.0.7632.116 +revision=1 +archs="i686* x86_64* aarch64* armv7l*" +_llvmver=21 +hostmakedepends=" + $(vopt_if clang "clang${_llvmver} lld${_llvmver} llvm${_llvmver} compiler-rt${_llvmver}") + bison git gperf hwids ninja nodejs perl pkg-config python3 + libepoxy-devel libglib-devel rust rust-bindgen + gn $(vopt_if qt6 qt6-base)" +makedepends=" + alsa-lib-devel libdav1d-devel brotli-devel cups-devel elfutils-devel + fontconfig-devel freetype-devel gtk+3-devel libXScrnSaver-devel + libXcomposite-devel libXcursor-devel libXdamage-devel libXi-devel libXrandr-devel + libavif-devel libcap-devel libcurl-devel libdrm-devel + libexif-devel libflac-devel libgcrypt-devel libjpeg-turbo-devel libmtp-devel + libpng-devel libva-devel libwebp-devel libxml2-devel libxshmfence-devel + libxslt-devel minizip-devel mit-krb5-devel nss-devel opus-devel + pciutils-devel snappy-devel speech-dispatcher-devel speex-devel + xcb-proto zlib-devel libaom-devel libffi-devel libevdev-devel + compiler-rt${_llvmver} rust-std + $(vopt_if pipewire pipewire-devel) + $(vopt_if pulseaudio pulseaudio-devel) + $(vopt_if sndio sndio-devel) + $(vopt_if qt6 qt6-base-devel)" +depends="desktop-file-utils hicolor-icon-theme hwids xdg-utils" +short_desc="Google Chromium, sans integration with Google" +maintainer="Dainra " +license="BSD-3-Clause" +homepage="https://github.com/ungoogled-software/ungoogled-chromium" +_commit_id="" #cachegen +# distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${version}.tar.xz +# distfiles="https://chromium-tarballs.distfiles.gentoo.org/chromium-${version}.tar.xz +# distfiles="https://chromium.googlesource.com/chromium/src.git/+archive/refs/tags/${version}.tar.gz +distfiles="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${version}/chromium-${version}-linux.tar.xz + ${homepage}/archive/$( [[ -n "${_commit_id:-}" ]] && echo "${_commit_id}.tar.gz" || echo "refs/tags/${version}-${revision}.tar.gz" )" +checksum="84eb04b8263fdabf805269fb1cc7e17301cebeb286bdbf7cdceb5083a5aaa428 + 27c1d35574fb7833ccf72583848e5a558ed4b8d69c582618887d76931a196217" + +lib32disabled=yes + +create_wrksrc=yes +build_wrksrc="chromium-${version}" +patch_args="-d ${build_wrksrc} -Np1" + +build_options="clang libcxx debug vaapi pulseaudio sndio pipewire lto drumbrake qt6" +build_options_default="clang libcxx vaapi pulseaudio pipewire qt6" +desc_option_clang="Use clang to build" +desc_option_libcxx="Use bundled libc++" +desc_option_debug="Build with debug symbols" +desc_option_lto="Enable Link Time Optimization" +desc_option_pipewire="Enable support for screen sharing for WebRTC via PipeWire" +desc_option_drumbrake="WebAssembly Interpreter" + +if [ "$XBPS_LIBC" = musl ]; then + hostmakedepends+=" musl-legacy-compat" +fi + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + makedepends+=" musl-legacy-compat" +fi + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" libX11-devel libxcb-devel pciutils-devel libXext-devel libglvnd-devel + libjpeg-turbo-devel libXi-devel nss-devel libpng-devel libwebp-devel + libxml2-devel $(vopt_if pulseaudio pulseaudio-devel) libxslt-devel libxkbcommon-devel + $(vopt_if pipewire pipewire-devel) opus-devel pango-devel libva-devel + libcurl-devel snappy-devel libXrandr-devel libXcomposite-devel cups-devel + mit-krb5-devel alsa-lib-devel libXdamage-devel libepoxy-devel libevdev-devel + libavif-devel libaom-devel libdav1d-devel libflac-devel + libdrm-devel libgbm-devel $(vopt_if qt6 qt6-base-devel)" +fi + +if [ ! "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then + broken="chromium (v8) can only be cross compiled if word size matches" +fi + +if [ "$CROSS_BUILD" ]; then + case "${XBPS_TARGET_MACHINE}" in + aarch64*) ;; + *) nocross="chromium can not be cross compiled for this architecture" ;; + esac +fi + +pre_patch() { [ -n "${_commit_id:-}" ] && [ -d "../${pkgname}-${_commit_id}" ] && mv "../${pkgname}-${_commit_id}" "../${pkgname}-${version}-${revision}"; true; } + +subpackages="" # xbps-src does not reset the variable +if [ "$build_option_qt6" ]; then + subpackages+=" ungoogled-chromium-qt6" +fi + +post_patch() { + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + for f in "${FILESDIR}"/musl-patches/*.patch; do + echo "Applying $f" + patch -Np1 -i "$f" + done + fi + + # prevent annoying errors when regenerating gni + vsed -i 's,^update_readme$,#update_readme,' \ + third_party/libvpx/generate_gni.sh + + # allow system dependencies in "official builds" + vsed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ + tools/generate_shim_headers/generate_shim_headers.py + + # Ungoogled Chromium prune, patch, domain substitution + msg_normal "Applying Feng Shui Shaders ...\n" + local ucdir="../${pkgname}-${version}-${revision}" + # Remove conflicting patches + msg_normal "Reverse Engineering Image Consultant ...\n" + # Rather than removing 3 patches from the void package remove build-with-wasm-rollup.patch + sed -i '\|^core/ungoogled-chromium/build-with-wasm-rollup\.patch$|d' ${ucdir}/patches/series + msg_normal "Binding Sapling Root System ...\n" + $ucdir/utils/prune_binaries.py . $ucdir/pruning.list + msg_normal "Calculating Inverse Probability Matrices ...\n" + $ucdir/utils/patches.py apply . $ucdir/patches + msg_normal "Calculating Llama Expectoration Trajectory ...\n" + $ucdir/utils/domain_substitution.py apply -r $ucdir/domain_regex.list -f $ucdir/domain_substitution.list -c build/domsubcache.tar.gz . + + mkdir -p third_party/node/linux/node-linux-x64/bin + rm -f third_party/node/linux/node-linux-x64/bin/node + ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ + + ( + cd third_party/devtools-frontend/src + npm ci --ignore-scripts + ) +} + +_setup_clang() { + export CC=clang + export CXX=clang++ + export AR=llvm-ar + export NM=llvm-nm + export CFLAGS="-Wno-unknown-warning-option -fdebug-prefix-map=$wrksrc=." + export CXXFLAGS="-Wno-unknown-warning-option -fdebug-prefix-map=$wrksrc=." + export LDFLAGS="" + export BUILD_CC=clang + export BUILD_CXX=clang++ + export BUILD_AR=llvm-ar + export BUILD_NM=llvm-nm + export BUILD_CFLAGS="-Wno-unknown-warning-option" + export BUILD_CXXFLAGS="-Wno-unknown-warning-option" + if [[ -n "$CROSS_BUILD" ]]; then + CFLAGS+=" --sysroot=${XBPS_CROSS_BASE}" + CXXFLAGS+=" --sysroot=${XBPS_CROSS_BASE}" + LDFLAGS+=" --sysroot=${XBPS_CROSS_BASE}" + if [[ -z "$build_option_libcxx" ]]; then + local gcc_version=$(gcc -dumpversion) + local clang_version=$(clang -dumpversion) + CFLAGS+=" --gcc-toolchain=/usr" + CFLAGS+=" -nostdinc" + CFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include" + CFLAGS+=" -isystem /usr/lib/clang/${clang_version}/include" + CXXFLAGS+=" --gcc-toolchain=/usr" + CXXFLAGS+=" -nostdinc++" + CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}" + CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/${XBPS_CROSS_TRIPLET}" + CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/backward" + CXXFLAGS+=" -nostdinc" + CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include" + CXXFLAGS+=" -isystem /usr/lib/clang/${clang_version}/include" + LDFLAGS+=" --gcc-toolchain=/usr" + fi + fi +} + +_setup_toolchain() { + if [ "$build_option_clang" ]; then + _setup_clang + fi +} + +do_configure() { + local system=() conf=() + + if false; then + # compile gn early, so it can be used to generate gni stuff + AR="ar" CC=$CC_FOR_BUILD CXX=$CXX_FOR_BUILD LD=$CXX_FOR_BUILD \ + CFLAGS=$CFLAGS_FOR_BUILD CXXFLAGS=$CXXFLAGS_FOR_BUILD LDFLAGS=$LDFLAGS_FOR_BUILD \ + tools/gn/bootstrap/bootstrap.py ${makejobs} --skip-generate-buildfiles + fi + + # Use system-provided libraries. + # TODO: use_system_hunspell (upstream changes needed). + # TODO: use_system_libsrtp. + # TODO: use_system_libusb (http://crbug.com/266149). + # TODO: use_system_ssl (http://crbug.com/58087). + # TODO: use_system_sqlite (http://crbug.com/22208). + # TODO: use_system_icu (segfaults) + # use_system_protobuf + # use_system_v8=1 + # bzip2 xdg_utils speex + # XXX: harfbuzz-ng use builtin one until system-wide is updated >=3.0.0 + # libcxx https://github.com/llvm/llvm-project/issues/61705: + # snappy + # ffmpeg: system ffmpeg is too old and makes the ffmpeg update not require + # rebuilding chromium + system=( + flac + fontconfig + freetype + libdrm + libjpeg + libpng + libwebp + libxml + libxslt + opus + ) + + # remove build scripts for system provided dependencies - basically does the + # same as the bundeled script to remove bundeled libs, but this way we don't + # have to list the remaining libs + for LIB in "${system[@]}" libjpeg_turbo; do + find "third_party/$LIB" -type f \ + \! -path "third_party/$LIB/chromium/*" \ + \! -path "third_party/$LIB/google/*" \ + \! -path './base/third_party/icu/*' \ + \! -path './third_party/harfbuzz-ng/utils/hb_scoped.h' \ + \! -regex '.*\.\(gn\|gni\|isolate\)' \ + -delete || : + done + + # switch to system provided dependencies + build/linux/unbundle/replace_gn_files.py --system-libraries "${system[@]}" + + third_party/libaddressinput/chromium/tools/update-strings.py + + local clang_version="$(clang -dumpversion)" + conf=( + 'use_sysroot=false' + + 'host_pkg_config="/usr/bin/pkg-config"' + + "is_clang=$(vopt_if clang true false)" + "use_lld=$(vopt_if clang true false)" + 'clang_use_chrome_plugins=false' + 'clang_base_path="/usr"' + "clang_cross_path=\"${XBPS_CROSS_BASE}\"" + "clang_version=\"${clang_version%%.*}\"" + 'use_clang_modules=false' # not yet supported with void's libcxx + + "use_custom_libcxx=$(vopt_if libcxx true false)" # https://github.com/llvm/llvm-project/issues/61705 + + 'enable_rust=true' + 'rust_sysroot_absolute="/usr"' + "rust_cross_sysroot_absolute=\"${XBPS_CROSS_BASE}\"" + 'rust_bindgen_root="/usr"' + "rustc_version=\"$(rustc --version)\"" + + 'node_version_check=false' + + # is_debug makes the build a debug build, changes some things. + # might be useful for real debugging vs just debug symbols. + "is_debug=false" + "blink_symbol_level=$(vopt_if debug 1 0)" + "symbol_level=$(vopt_if debug 1 0)" + + 'icu_use_data_file=true' + + 'enable_widevine=true' + 'enable_hangout_services_extension=true' + + 'use_system_harfbuzz=false' + 'use_system_libffi=true' + + 'use_qt5=false' + "use_qt6=$(vopt_if qt6 true false)" + + 'use_cups=true' + + "use_vaapi=$(vopt_if vaapi true false)" + + "use_pulseaudio=$(vopt_if pulseaudio true false)" + "link_pulseaudio=$(vopt_if pulseaudio true false)" + + "rtc_use_pipewire=$(vopt_if pipewire true false)" + + "use_sndio=$(vopt_if sndio true false)" + + "v8_enable_drumbrake=$(vopt_if drumbrake true false)" + + # Always support proprietary codecs. + # Enable H.264 support in bundled ffmpeg. + 'proprietary_codecs=true' + 'ffmpeg_branding="Chrome"' + + # Make sure that -Werror doesn't get added to CFLAGS by the build system. + # Depending on GCC version the warnings are different and we don't want + # the build to fail because of that. + 'treat_warnings_as_errors=false' + 'fatal_linker_warnings=false' + + # Save space by removing DLOG and DCHECK messages (about 6% reduction). + # 'logging_like_official_build=true' + 'disable_fieldtrial_testing_config=true' + + 'is_official_build=true' + + # segfaults with llvm-12.0.1 + 'is_cfi=false' + 'use_cfi_icall=false' + + "use_thin_lto=$(vopt_if lto true false)" + 'chrome_pgo_phase=0' + ) + + # Append Ungoogled Chromium flags.gn + # https://github.com/ungoogled-software/ungoogled-chromium/blob/master/flags.gn + msg_normal "Obfuscating Quigley Matrix ...\n" + local ucdir="../${pkgname}-${version}-${revision}" + readarray -t -O ${#conf[@]} conf < "${ucdir}/flags.gn" + + if [ "$build_option_qt6" ];then + conf+=('moc_qt6_path="/usr/lib/qt6/libexec"') + fi + + if [ "$CROSS_BUILD" ]; then + conf+=( + 'custom_toolchain="//build/toolchain/linux/unbundle:default"' + 'host_toolchain="//build/toolchain/linux/unbundle:host"' + 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:v8_snapshot_cross"' + ) + else + conf+=( + 'custom_toolchain="//build/toolchain/linux/unbundle:default"' + 'host_toolchain="//build/toolchain/linux/unbundle:default"' + ) + fi + + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + conf+=( 'is_musl=true' ) + fi + + case "${XBPS_TARGET_MACHINE}" in + x86_64*) conf+=( 'target_cpu="x64"' ) ;; + i686*) conf+=( 'target_cpu="x86"' ) ;; + arm*) conf+=( 'target_cpu="arm"' ) ;; + aarch64*) conf+=( 'target_cpu="arm64"' ) ;; + esac + + if [ "$CROSS_BUILD" ]; then + case "${XBPS_MACHINE}" in + x86_64*) conf+=( 'host_cpu="x64"' ) ;; + i686*) conf+=( 'host_cpu="x86"' ) ;; + arm*) conf+=( 'host_cpu="arm"' ) ;; + aarch64*) conf+=( 'host_cpu="arm64"' ) ;; + esac + fi + _setup_toolchain + if false; then + out/Release/gn gen out/Release --args="${conf[*]}" + else + gn gen out/Release --args="${conf[*]}" + fi +} + +do_build() { + # XXX: need for error: the option `Z` is only accepted on the nightly compiler + export RUSTC_BOOTSTRAP=1 + + _setup_toolchain + msg_normal "Zeroing Crime Network ...\n" + ccache -z + CCACHE_SLOPPINESS=include_file_mtime ninja -C out/Release ${makejobs} chrome chrome_sandbox chromedriver chrome_crashpad_handler + msg_normal "Inserting Sublimated Messages ...\n" + ccache -s +} + +do_install() { + vinstall out/Release/chrome 755 usr/lib/${pkgname} ${pkgname} + vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} chrome-sandbox + vinstall out/Release/chrome_crashpad_handler 755 usr/lib/${pkgname} chrome_crashpad_handler + vinstall out/Release/chromedriver 755 usr/lib/${pkgname} chromedriver + vinstall out/Release/libEGL.so 755 usr/lib/${pkgname} libEGL.so + vinstall out/Release/libGLESv2.so 755 usr/lib/${pkgname} libGLESv2.so + vinstall out/Release/libvk_swiftshader.so 755 usr/lib/${pkgname} libvk_swiftshader.so + vinstall out/Release/vk_swiftshader_icd.json 755 usr/lib/${pkgname} vk_swiftshader_icd.json + if [ $build_option_qt6 ]; then + vinstall out/Release/libqt6_shim.so 755 usr/lib/${pkgname} libqt6_shim.so + fi + + vcopy "out/Release/*.bin" usr/lib/${pkgname} + vcopy "out/Release/*.pak" usr/lib/${pkgname} + + vmkdir usr/lib/${pkgname}/locales + vcopy "out/Release/locales/*.pak" usr/lib/${pkgname}/locales + + + vinstall out/Release/icudtl.dat 0644 usr/lib/${pkgname} + + for size in 24 48 64 128 256; do + vinstall "chrome/app/theme/chromium/product_logo_${size}.png" \ + 644 \ + usr/share/icons/hicolor/${size}x${size}/apps ${pkgname}.png + done + for size in 16 32; do + vinstall "chrome/app/theme/default_100_percent/chromium/product_logo_${size}.png" \ + 644 \ + usr/share/icons/hicolor/${size}x${size}/apps ${pkgname}.png + done + + vbin ${FILESDIR}/chromium.sh ${pkgname} + vlicense LICENSE + ln -sf /usr/lib/${pkgname}/chromedriver ${DESTDIR}/usr/bin/chromedriver + + vinstall chrome/installer/linux/common/desktop.template 644 usr/share/applications ${pkgname}.desktop + vman chrome/app/resources/manpage.1.in ${pkgname}.1 + + sed -i \ + -e 's/@@MENUNAME/Ungoogled-Chromium/g' \ + -e 's/@@PACKAGE/ungoogled-chromium/g' \ + -e 's/@@usr_bin_symlink_name/ungoogled-chromium/g' \ + -e '/@@uri_scheme/d' \ + -e '/@@extra_desktop_entries/d' \ + ${DESTDIR}/usr/share/man/man1/${pkgname}.1 \ + ${DESTDIR}/usr/share/applications/${pkgname}.desktop + if grep '@@' "${DESTDIR}/usr/share/applications/${pkgname}.desktop"; then + msg_error "missing substitution" + fi +} + +ungoogled-chromium-qt6_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - Qt6 integration" + pkg_install() { + vmove usr/lib/${sourcepkg}/libqt6_shim.so + } +} diff --git a/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/update b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/update new file mode 100644 index 0000000000000000000000000000000000000000..af42867275488c5816b0ba1543769d5c39fca6b0 --- /dev/null +++ b/PKG/ungoogled-chromium-void/void-packages/srcpkgs/ungoogled-chromium/update @@ -0,0 +1,2 @@ +site='https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Linux&num=1&offset=0' +pattern='"version":\s*"\K[^,]+(?=")' diff --git a/PKG/vesktop/template b/PKG/vesktop/template new file mode 100644 index 0000000000000000000000000000000000000000..bd75785d8b38fa29390254f61eadf747dce88bbb --- /dev/null +++ b/PKG/vesktop/template @@ -0,0 +1,36 @@ +pkgname=vesktop +version=1.6.5 +revision=1 +archs="x86_64" +short_desc="Custom Discord desktop client" +maintainer="Wizzard " +license="GPL-3.0-or-later" +homepage="https://github.com/Vencord/Vesktop" +distfiles="https://github.com/Vencord/Vesktop/releases/download/v${version}/vesktop_${version}_amd64.deb" +checksum=2d4c97abe4810703561d59c63cb12b1926f591fe1fe2bf9e914db66c6cc31cf5 +hostmakedepends="binutils tar xz" +depends="gtk+3 libnotify nss libXScrnSaver libXtst xdg-utils at-spi2-core util-linux-libs libsecret" + +do_extract() { + ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/vesktop_${version}_amd64.deb + mkdir -p ${wrksrc} + tar xf data.tar.xz -C ${wrksrc} +} + +do_install() { + vmkdir usr/share/applications + vmkdir usr/share/icons + vmkdir usr/share/doc/vesktop + vmkdir opt/Vesktop + vcopy usr/share/applications/vesktop.desktop /usr/share/applications/ + vcopy usr/share/icons /usr/share/ + vcopy usr/share/doc/vesktop/* /usr/share/doc/vesktop/ + vcopy opt/Vesktop/* /opt/Vesktop/ + if [ -f ${DESTDIR}/opt/Vesktop/chrome-sandbox ]; then + chmod 4755 ${DESTDIR}/opt/Vesktop/chrome-sandbox + fi + vmkdir usr/bin + ln -sf /opt/Vesktop/vesktop ${DESTDIR}/usr/bin/vesktop + vlicense opt/Vesktop/LICENSE.electron.txt + vlicense opt/Vesktop/LICENSES.chromium.html +} diff --git a/PKG/waterfox/files/waterfox.desktop b/PKG/waterfox/files/waterfox.desktop new file mode 100644 index 0000000000000000000000000000000000000000..6f0224fe97a9f648b77b1a8c7755ba0b963f9823 --- /dev/null +++ b/PKG/waterfox/files/waterfox.desktop @@ -0,0 +1,271 @@ +[Desktop Entry] +Version=1.0 +Name=Waterfox +Comment=Browse the World Wide Web +Comment[ar]=تصفح الشبكة العنكبوتية العالمية +Comment[ast]=Restola pela Rede +Comment[bn]=ইন্টারনেট ব্রাউজ করুন +Comment[ca]=Navegueu per la web +Comment[cs]=Prohlížení stránek World Wide Webu +Comment[da]=Surf på internettet +Comment[de]=Im Internet surfen +Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web) +Comment[es]=Navegue por la web +Comment[et]=Lehitse veebi +Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید +Comment[fi]=Selaa Internetin WWW-sivuja +Comment[fr]=Naviguer sur le Web +Comment[gl]=Navegar pola rede +Comment[he]=גלישה ברחבי האינטרנט +Comment[hr]=Pretražite web +Comment[hu]=A világháló böngészése +Comment[it]=Esplora il web +Comment[ja]=ウェブを閲覧します +Comment[ko]=웹을 돌아 다닙니다 +Comment[ku]=Li torê bigere +Comment[lt]=Naršykite internete +Comment[nb]=Surf på nettet +Comment[nl]=Verken het internet +Comment[nn]=Surf på nettet +Comment[no]=Surf på nettet +Comment[pl]=Przeglądaj strony WWW +Comment[pt]=Explorar a Internet com o Waterfox +Comment[pt_BR]=Navegue na Internet +Comment[ro]=Navigați pe Internet +Comment[ru]=Доступ в Интернет +Comment[sk]=Prehliadanie internetu +Comment[sl]=Brskajte po spletu +Comment[sv]=Surfa på webben +Comment[tr]=İnternet'te Gezinin +Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ +Comment[uk]=Перегляд сторінок Інтернету +Comment[vi]=Để duyệt các trang web +Comment[zh_CN]=浏览互联网 +Comment[zh_TW]=瀏覽網際網路 +GenericName=Web Browser +GenericName[ar]=متصفح ويب +GenericName[ast]=Restolador Web +GenericName[bn]=ওয়েব ব্রাউজার +GenericName[ca]=Navegador web +GenericName[cs]=Webový prohlížeč +GenericName[da]=Webbrowser +GenericName[el]=Περιηγητής διαδικτύου +GenericName[es]=Navegador web +GenericName[et]=Veebibrauser +GenericName[fa]=مرورگر اینترنتی +GenericName[fi]=WWW-selain +GenericName[fr]=Navigateur Web +GenericName[gl]=Navegador Web +GenericName[he]=דפדפן אינטרנט +GenericName[hr]=Web preglednik +GenericName[hu]=Webböngésző +GenericName[it]=Browser web +GenericName[ja]=ウェブ・ブラウザ +GenericName[ko]=웹 브라우저 +GenericName[ku]=Geroka torê +GenericName[lt]=Interneto naršyklė +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[nn]=Nettlesar +GenericName[no]=Nettleser +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador web +GenericName[pt_BR]=Navegador Web +GenericName[ro]=Navigator Internet +GenericName[ru]=Веб-браузер +GenericName[sk]=Internetový prehliadač +GenericName[sl]=Spletni brskalnik +GenericName[sv]=Webbläsare +GenericName[tr]=Web Tarayıcı +GenericName[ug]=توركۆرگۈ +GenericName[uk]=Веб-браузер +GenericName[vi]=Trình duyệt Web +GenericName[zh_CN]=网络浏览器 +GenericName[zh_TW]=網路瀏覽器 +Keywords=Internet;WWW;Browser;Web;Explorer; +Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب; +Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador; +Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer; +Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer; +Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet; +Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen; +Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Waterfox;Φιρεφοχ;Ιντερνετ; +Keywords[es]=Explorador;Internet;WWW; +Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa; +Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur; +Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה; +Keywords[hr]=Internet;WWW;preglednik;Web; +Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer; +Keywords[it]=Internet;WWW;Browser;Web;Navigatore; +Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk; +Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ; +Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside; +Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online; +Keywords[pl]=Internet;WWW;Przeglądarka;Sieć;Surfowanie;Strona internetowa;Strona;Przeglądanie; +Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador; +Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador; +Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис; +Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer; +Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet; +Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara; +Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд; +Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web; +Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;水狐;Waterfox;wf;互联网;网站; +Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;水狐; +Exec=waterfox %u +Terminal=false +X-MuiltpleArgs=false +Type=Application +Icon=waterfox +Categories=Network;WebBrowser; +MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;application/vnd.mozilla.xul+xml;text/mml +StartupNotify=true +Actions=NewTab;NewWindow;NewPrivateWindow; + +[Desktop Action NewTab] +Name=Open new tab +Name[ach]=Yab dirica matidi manyen +Name[af]=Open nuwe oortjie +Name[an]=Ubrir una pestanya nueva +Name[ar]=افتح لسانًا جديدًا +Name[as]=নতুন টেব খোলক +Name[ast]=Abrir llingüeta nueva +Name[az]=Yeni vərəq aç +Name[be]=Адкрыць новую ўстаўку +Name[bg]=Отваряне на нов подпрозорец +Name[bn_BD]=নতুন ট্যাব খুলুন +Name[bn_IN]=নতুন ট্যাব খুলুন +Name[br]=Digeriñ un ivinell nevez +Name[bs]=Otvori novi tab +Name[ca]=Obre una pestanya nova +Name[cs]=Otevřít nový panel +Name[cy]=Agor tab newydd +Name[da]=Åbn nyt faneblad +Name[de]=Neuen Tab öffnen +Name[dsb]=Nowy rejtark wócyniś +Name[el]=Άνοιγμα νέας καρτέλας +Name[eo]=Malfermi novan langeton +Name[es_AR]=Abrir nueva pestaña +Name[es_CL]=Abrir nueva pestaña +Name[es_ES]=Abrir pestaña nueva +Name[es_MX]=Abrir una pestaña nueva +Name[et]=Ava uus kaart +Name[eu]=Ireki fitxa berria +Name[ff]=Uddit tabbere hesere +Name[fi]=Avaa uusi välilehti +Name[fr]=Ouvrir un nouvel onglet +Name[fy_NL]=Iepenje nij ljepblêd +Name[ga_IE]=Oscail i gcluaisín nua +Name[gd]=Fosgail taba ùr +Name[gl]=Abrir unha nova lapela +Name[gu_IN]=નવી ટૅબને ખોલો +Name[he]=פתיחת לשונית חדשה +Name[hi_IN]=नया टैब खोलें +Name[hr]=Otvori novu karticu +Name[hsb]=Nowy rajtark wočinić +Name[hu]=Új lap megnyitása +Name[hy_AM]=Բացել նոր ներդիր +Name[id]=Buka tab baru +Name[is]=Opna nýjan flipa +Name[it]=Apri nuova scheda +Name[ja]=新しいタブ +Name[kk]=Жаңа бетті ашу +Name[kn]=ಹೊಸ ಹಾಳೆಯನ್ನು ತೆರೆ +Name[ko]=새 탭 열기 +Name[lij]=Àrvi nêuvo féuggio +Name[lt]=Atverti naują kortelę +Name[mai]=नव टैब खोलू +Name[mk]=Отвори ново јазиче +Name[ml]=പുതിയ റ്റാബ് തുറക്കുക +Name[mr]=नवीन टॅब उघडा +Name[ms]=Buka tab baru +Name[nb_NO]=Åpne ny fane +Name[nl]=Nieuw tabblad openen +Name[nn_NO]=Opna ny fane +Name[or]=ନୂତନ ଟ୍ୟାବ ଖୋଲନ୍ତୁ +Name[pa_IN]=ਨਵੀਂ ਟੈਬ ਖੋਲ੍ਹੋ +Name[pl]=Otwórz nową kartę +Name[pt_BR]=Nova aba +Name[pt_PT]=Abrir novo separador +Name[rm]=Avrir in nov tab +Name[ro]=Deschide o filă nouă +Name[ru]=Открыть новую вкладку +Name[si]=නව ටැබය විවෘත කරන්න +Name[sk]=Otvoriť novú kartu +Name[sl]=Odpri nov zavihek +Name[son]=Nor loku taaga feeri +Name[sq]=Hap skedë të re +Name[sr]=Отвори нови језичак +Name[sv_SE]=Öppna ny flik +Name[ta]=புதிய கீற்றைத் திற +Name[te]=కొత్త టాబ్ తెరువుము +Name[th]=เปิดแท็บใหม่ +Name[tr]=Yeni sekme aç +Name[uk]=Відкрити нову вкладку +Name[uz]=Yangi ichki oyna ochish +Name[vi]=Mở thẻ mới +Name[xh]=Vula ithebhu entsha +Name[zh_CN]=打开新标签页 +Name[zh_TW]=開啟新分頁 +Exec=waterfox -new-tab about:newtab + +[Desktop Action NewWindow] +Name=Open a New Window +Name[ar]=افتح نافذة جديدة +Name[ast]=Abrir una ventana nueva +Name[bn]=Abrir una ventana nueva +Name[ca]=Obre una finestra nova +Name[cs]=Otevřít nové okno +Name[da]=Åbn et nyt vindue +Name[de]=Ein neues Fenster öffnen +Name[el]=Άνοιγμα νέου παραθύρου +Name[es]=Abrir una ventana nueva +Name[fi]=Avaa uusi ikkuna +Name[fr]=Ouvrir une nouvelle fenêtre +Name[gl]=Abrir unha nova xanela +Name[he]=פתיחת חלון חדש +Name[hr]=Otvori novi prozor +Name[hu]=Új ablak nyitása +Name[it]=Apri una nuova finestra +Name[ja]=新しいウィンドウを開く +Name[ko]=새 창 열기 +Name[ku]=Paceyeke nû veke +Name[lt]=Atverti naują langą +Name[nb]=Åpne et nytt vindu +Name[nl]=Nieuw venster openen +Name[pl]=Otwórz nowe okno +Name[pt]=Abrir uma nova janela +Name[pt_BR]=Abrir nova janela +Name[ro]=Deschide o fereastră nouă +Name[ru]=Новое окно +Name[sk]=Otvoriť nové okno +Name[sl]=Odpri novo okno +Name[sv]=Öppna ett nytt fönster +Name[tr]=Yeni pencere aç +Name[ug]=يېڭى كۆزنەك ئېچىش +Name[uk]=Відкрити нове вікно +Name[vi]=Mở cửa sổ mới +Name[zh_CN]=新建窗口 +Name[zh_TW]=開啟新視窗 +Exec=waterfox -new-window + +[Desktop Action NewPrivateWindow] +Name=Open a New Private Window +Name[ar]=افتح نافذة جديدة للتصفح الخاص +Name[ca]=Obre una finestra nova en mode d'incògnit +Name[de]=Ein neues privates Fenster öffnen +Name[es]=Abrir una ventana privada nueva +Name[fi]=Avaa uusi yksityinen ikkuna +Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée +Name[he]=פתיחת חלון גלישה פרטית חדש +Name[hu]=Új privát ablak nyitása +Name[it]=Apri una nuova finestra anonima +Name[nb]=Åpne et nytt privat vindu +Name[pl]=Otwórz nowe okno prywatne +Name[pt]=Abrir uma nova janela privada +Name[ru]=Новое приватное окно +Name[sl]=Odpri novo okno zasebnega brskanja +Name[tr]=Yeni bir pencere aç +Name[uk]=Відкрити нове вікно у потайливому режимі +Name[zh_TW]=開啟新隱私瀏覽視窗 +Exec=waterfox -private-window diff --git a/PKG/waterfox/template b/PKG/waterfox/template new file mode 100644 index 0000000000000000000000000000000000000000..d407e4507415373d8c645d1c294ba9acc6a92f48 --- /dev/null +++ b/PKG/waterfox/template @@ -0,0 +1,28 @@ +# Template file for 'waterfox' +pkgname=waterfox +version=6.6.9 +revision=1 +archs="x86_64" +short_desc="Fast and Private Web Browser" +maintainer="Seremegu " +license="MPL-2.0" +homepage="https://www.waterfox.net/" +changelog="https://www.waterfox.net/docs/releases/G${version}/?update" +distfiles="https://cdn1.waterfox.net/waterfox/releases/${version}/Linux_x86_64/waterfox-${version}.tar.bz2" +checksum=ae6d2c7323a404b2973ed1f7b53c78c81c17fecc0d18666559e434d330c9400c +nopie=yes + + +do_install() { + vmkdir opt/waterfox + vcopy "*" opt/waterfox + # Create symlink in path + vmkdir usr/bin + ln -s /opt/waterfox/waterfox "${DESTDIR}/usr/bin/waterfox" + # Copy icon and .desktop file + vmkdir usr/share/pixmaps + vinstall "${DESTDIR}/opt/waterfox/browser/chrome/icons/default/default128.png" 644 \ +usr/share/pixmaps/ waterfox.png + vmkdir usr/share/applications + vinstall "${FILESDIR}/waterfox.desktop" 644 usr/share/applications/ +} diff --git a/PKG/windscribe-desktop/INSTALL b/PKG/windscribe-desktop/INSTALL new file mode 100644 index 0000000000000000000000000000000000000000..553edf97b1ce97c90632a9a70e442cfd7f4d5d65 --- /dev/null +++ b/PKG/windscribe-desktop/INSTALL @@ -0,0 +1,28 @@ +#!/bin/sh + +# Crear grupo windscribe si no existe +if ! getent group windscribe >/dev/null 2>&1; then + groupadd --system windscribe +fi + +# Configurar servicio runit +mkdir -p /etc/sv/windscribe-helper +cat > /etc/sv/windscribe-helper/run <<'EOF' +#!/bin/sh +exec 2>&1 +exec /opt/windscribe/helper +EOF +chmod +x /etc/sv/windscribe-helper/run + +# Habilitar servicio +if [ ! -e /var/service/windscribe-helper ]; then + ln -sf /etc/sv/windscribe-helper /var/service/ +fi + +# Permisos para GUI +setcap cap_setgid+ep /opt/windscribe/Windscribe 2>/dev/null || true + +# Actualizar .desktop +if command -v update-desktop-database >/dev/null; then + update-desktop-database +fi \ No newline at end of file diff --git a/PKG/windscribe-desktop/REMOVE b/PKG/windscribe-desktop/REMOVE new file mode 100644 index 0000000000000000000000000000000000000000..acddba97072586c978bd21d97ce9ac14db595b55 --- /dev/null +++ b/PKG/windscribe-desktop/REMOVE @@ -0,0 +1,17 @@ +#!/bin/sh + +# Detener y deshabilitar servicio +if [ -e /var/service/windscribe-helper ]; then + rm -f /var/service/windscribe-helper + sv down windscribe-helper 2>/dev/null || true + sleep 1 + rm -rf /etc/sv/windscribe-helper +fi + +# Eliminar grupo (opcional: solo si no hay otros usuarios) +# groupdel windscribe 2>/dev/null || true + +# Actualizar .desktop +if command -v update-desktop-database >/dev/null; then + update-desktop-database +fi \ No newline at end of file diff --git a/PKG/windscribe-desktop/template b/PKG/windscribe-desktop/template new file mode 100644 index 0000000000000000000000000000000000000000..f067996ea78638f6ede42f3dfa9529e5861a3a64 --- /dev/null +++ b/PKG/windscribe-desktop/template @@ -0,0 +1,48 @@ +# Template file for 'windscribe-desktop' +pkgname=windscribe-desktop +version=2.19.7 +revision=1 +archs="x86_64" +build_style=fetch +short_desc="Windscribe Desktop VPN Client (proprietary)" +maintainer="Javiercplus" +license="custom:proprietary" +homepage="https://windscribe.com" +distfiles="https://codeberg.org/javiercplus/Windscribe-void/raw/branch/main/windscribe_${version}_amd64.deb" +checksum=6b1c0027a3d8ff1603064b5dfcef47eb91a2f9af3cbd06549fe1155abf15128e +nostrip_files=" + /opt/windscribe/Windscribe + /opt/windscribe/helper + /opt/windscribe/windscribectrld + /opt/windscribe/windscribe-cli + /opt/windscribe/windscribe-authhelper + /opt/windscribe/windscribeopenvpn + /opt/windscribe/windscribewireguard + /opt/windscribe/windscribewstunnel +" +do_install() { + # Extraer el .deb directamente en ${DESTDIR} + vextract -C "${DESTDIR}" "windscribe_${version}_amd64.deb" + + # 1. Eliminar artefactos de systemd (no usados en Void) + rm -rf "${DESTDIR}/usr/lib/systemd" + + # 2. Eliminar autostart legacy (no compatible con runit) + rm -rf "${DESTDIR}/etc/windscribe/autostart" + + # 3. Hacer el CLI accesible globalmente + vmkdir usr/bin + ln -sf /opt/windscribe/windscribe-cli "${DESTDIR}/usr/bin/windscribe" + + # 4. Ajustar el lanzador .desktop + sed -i 's|^Exec=.*|Exec=/opt/windscribe/Windscribe|' \ + "${DESTDIR}/usr/share/applications/windscribe.desktop" + + # 5. Normalizar nombres de íconos (minúsculas) + for size in 16 24 32 48 64 128 256; do + if [ -f "${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/Windscribe.png" ]; then + mv "${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/Windscribe.png" \ + "${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/windscribe.png" + fi + done +} diff --git a/PKG/zerotierone/template b/PKG/zerotierone/template new file mode 100644 index 0000000000000000000000000000000000000000..bf42657b51501524e6c2f428d0f6df6d9ae82daf --- /dev/null +++ b/PKG/zerotierone/template @@ -0,0 +1,49 @@ +# Template file for 'zerotierone' +pkgname=zerotierone +version=1.16.1 +revision=1 +build_style=none +hostmakedepends="pkg-config gcc make git" +makedepends="openssl-devel libffi-devel rust cargo linux-headers" +depends="" +short_desc="ZeroTier One - Software-defined networking platform" +maintainer="JavierC " +license="MIT" +homepage="https://www.zerotier.com/" +distfiles="https://github.com/franckey02/ZeroTierOne-Void/archive/refs/tags/${version}.tar.gz" +checksum=e0919a39c847c61dcecea7e2678e7270400a5e0f6bc0f8f8000b48d0751439c4 + +do_build() { + cd ${wrksrc} + make -j$(nproc) ZT_TARGET=linux-x86_64 +} + +do_install() { + cd ${wrksrc} + + # --- CP: Instalar el binario real --- + vbin zerotier-one # → esto pone /usr/bin/zerotier-one + + # --- LN: Crear enlaces simbólicos en /usr/bin/ (NO en /usr/sbin/) --- + # Void prefiere /usr/bin/ para binarios accesibles por usuarios + # Por eso creamos los enlaces allí, no en /usr/sbin/ + vmkdir usr/bin + ln -sf ../bin/zerotier-one ${DESTDIR}/usr/bin/zerotier-cli + ln -sf ../bin/zerotier-one ${DESTDIR}/usr/bin/zerotier-idtool + + # --- MAN PAGES --- + if [ -f doc/zerotier-one.8 ]; then + vman doc/zerotier-one.8 + fi + if [ -f doc/zerotier-cli.1 ]; then + vman doc/zerotier-cli.1 + fi + if [ -f doc/zerotier-idtool.1 ]; then + vman doc/zerotier-idtool.1 + fi + + # --- LICENCIA --- + if [ -f LICENSE ]; then + vlicense LICENSE + fi +}