diff --git a/packages/.vscode/settings.json b/packages/.vscode/settings.json deleted file mode 100644 index 7feba4b7..00000000 --- a/packages/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "git.alwaysSignOff": true -} \ No newline at end of file diff --git a/packages/CONTRIBUTING.md b/packages/CONTRIBUTING.md deleted file mode 100644 index 4c0d0d4b..00000000 --- a/packages/CONTRIBUTING.md +++ /dev/null @@ -1,220 +0,0 @@ -# Contributing Guidelines - -Ref: for overall format and construction - -## Basic guidelines - -All packages you commit or submit by pull-request should follow these simple -guidelines: - -- Package a version which is still maintained by the upstream author and will - be updated regularly with supported versions. -- Have no dependencies outside the OpenWrt core packages or this repository - feed. -- Have been tested to compile with the correct includes and dependencies. - Please also test with "Compile with full language support" found under - "General Build Settings" set if language support is relevant to your package. -- Best of all -- it works as expected! - -## Package Sources (archives and repositories) - -- PKG_SOURCE should reference the smallest available archive. In order of - preference: xz (most compressed), bzip2, gz and zip. As a last resort, - downloads from source repositories can be used. -- PKG_SOURCE_URL should link to an official release archive. Use of HTTPS: - is preferred. If a source archive is not available, a locally generated - archive fetched using git, svn, cvs or in rare circumstances, hg or bzr. -- Convenience macros for popular mirrors are defined. Using these macros will - make your package downloads more robust by mapping to a list of possible - source mirrors for archive availability. - - @SF - SourceForge (downloads.sourceforge.net) with 5 retries due to - re-directs - - @GITHUB - GitHub (raw.githubusercontent.com) with 5 retries due to - re-directs - - @GNU - 8 regional servers - - @GNOME - 8 regional servers - - @SAVANNAH - 8 regional servers - - @APACHE - 8 regional servers - - @KERNEL - Linux kernel archives & mirrors -- Please _DO NOT_ use an archive which changes over time. A version labeled - "latest" is not constant each download. Also, using the head of a branch will - create unpredictable results which can be different each build. - -### Makefile contents should contain - -- Provide an up-to-date Copyright notice or **none**. Copyright should not be - assigned to OpenWrt unless you are explicitly requested by or working under - contract to OpenWrt. Assigning a Copyright to yourself or organization you - represent is acceptable. -- A (PKG\_)MAINTAINER definition listing either yourself and/or another person - responsible for this package (E.g.: PKG_MAINTAINER:= Joe D. Hacker - `). Listing multiple maintainers is encouraged in - order to keep the package active and up-to-date. Leaving this blank will also - be accepted, however the review process may not be as quick as one with a - maintainer. -- A PKG_LICENSE tag declaring the main license of the package. (E.g.: - PKG_LICENSE:=GPL-2.0-or-later) Please use SPDX identifiers if possible (see - list at the bottom). -- An optional PKG_LICENSE_FILES tag including the filenames of the - license-files in the source-package. (E.g.: PKG_LICENSE_FILES:=COPYING) -- PKG_RELEASE should be initially set to 1 or reset to 1 if the software - version is changed. You should increment it if the package itself has - changed. For example, modifying a support script, changing configure options - like --disable_ or --enable\_ switches, or if you changed something in the - package which causes the resulting binaries to be different. Changes like - correcting md5sums, changing mirror URLs, adding a maintainer field or updating - a comment or copyright year in a Makefile do not require a change to - PKG_RELEASE. -- Avoid reuse of PKG_NAME in call, define and eval lines to improve - readability. - -### Commits in your pull-requests should - -- Have a useful commit subject prefixed with the package name (E.g.: "foopkg: - Add libzot dependency"). -- Include Signed-off-by tag in the commit comments. See: [Sign your - work](https://openwrt.org/submitting-patches#sign_your_work) -- Author and sign-off must match and be a real name or known identity and - a real email address. GitHub private email addresses will not be accepted. -- Follow all [Submission Guidelines](https://openwrt.org/submitting-patches#submission_guidelines) - requirements, including maximum characters per line. - -## Advice on pull requests - -Pull requests are the easiest way to contribute changes to git repos at GitHub. -They are the preferred contribution method, as they offer a nice way for -commenting and amending the proposed changes. - -- You need a local "fork" of the GitHub repo. - -- Use a "feature branch" for your changes. That separates the changes in the - pull request from your other changes and makes it easy to edit/amend commits - in the pull request. Workflow using "feature_x" as the example: - - Update your local git fork to the tip (of the master, usually) - - Create the feature branch with `git checkout -b feature_x` - - Edit changes and commit them locally - - Push them to your GitHub fork by `git push -u origin feature_x`. That - creates the "feature_x" branch at your GitHub fork and sets it as the - remote of this branch - - When you now visit GitHub, you should see a proposal to create a pull - request - -- If you later need to add new commits to the pull request, you can simply - commit the changes to the local branch and then use `git push` to - automatically update the pull request. - -- If you need to change something in the existing pull request (e.g. to add a - missing signed-off-by line to the commit message), you can use `git push -f` - to overwrite the original commits. That is easy and safe when using a feature - branch. Example workflow: - - Checkout the feature branch by `git checkout feature_x` - - Edit changes and commit them locally. If you are just updating the commit - message in the last commit, you can use `git commit --amend` to do that - - If you added several new commits or made other changes that require - cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to - edit) to possibly squash some commits - - Push the changed commits to GitHub with `git push -f` to overwrite the - original commits in the "feature_x" branch with the new ones. The pull - request gets automatically updated - -## If you have commit access - -- Do NOT use git push --force. -- Do NOT commit to other maintainer's packages without their consent. -- Use Pull Requests if you are unsure and to suggest changes to other - maintainers. - -### Gaining commit access - -- We will gladly grant commit access to responsible contributors who have made - useful pull requests and / or feedback or patches to this repository or - OpenWrt in general. Please include your request for commit access in your next - pull request or ticket. - -## Release Branches - -- Old stable branches were named after the following pattern "for-XX.YY" (e.g. - for-14.07) before the LEDE split. During the LEDE split there was only one - release branch with the name "lede-17.01". After merging the LEDE fork with - OpenWrt the release branches are named according to the following pattern - "openwrt-XX.YY" (e.g. openwrt-18.06). -- These branches are built with the respective OpenWrt release and are created - during the release stabilisation phase. -- Please ONLY cherry-pick or commit security and bug-fixes to these branches. -- Do NOT add new packages and do NOT do major upgrades of packages here. -- If you are unsure if your change is suitable, please use a pull request. - -## Common LICENSE tags (short list) - -(Complete list can be found at: ) - -| Full Name | Identifier | -| ------------------------------------------------ | :----------------------- | -| Apache License 1.0 | Apache-1.0 | -| Apache License 1.1 | Apache-1.1 | -| Apache License 2.0 | Apache-2.0 | -| Artistic License 1.0 | Artistic-1.0 | -| Artistic License 1.0 w/clause 8 | Artistic-1.0-cl8 | -| Artistic License 1.0 (Perl) | Artistic-1.0-Perl | -| Artistic License 2.0 | Artistic-2.0 | -| BSD 2-Clause "Simplified" License | BSD-2-Clause | -| BSD 2-Clause FreeBSD License | BSD-2-Clause-FreeBSD | -| BSD 2-Clause NetBSD License | BSD-2-Clause-NetBSD | -| BSD 3-Clause "New" or "Revised" License | BSD-3-Clause | -| BSD with attribution | BSD-3-Clause-Attribution | -| BSD 3-Clause Clear License | BSD-3-Clause-Clear | -| BSD 4-Clause "Original" or "Old" License | BSD-4-Clause | -| BSD-4-Clause (University of California-Specific) | BSD-4-Clause-UC | -| BSD Protection License | BSD-Protection | -| GNU General Public License v1.0 only | GPL-1.0-only | -| GNU General Public License v1.0 or later | GPL-1.0-or-later | -| GNU General Public License v2.0 only | GPL-2.0-only | -| GNU General Public License v2.0 or later | GPL-2.0-or-later | -| GNU General Public License v3.0 only | GPL-3.0-only | -| GNU General Public License v3.0 or later | GPL-3.0-or-later | -| GNU Lesser General Public License v2.1 only | LGPL-2.1-only | -| GNU Lesser General Public License v2.1 or later | LGPL-2.1-or-later | -| GNU Lesser General Public License v3.0 only | LGPL-3.0-only | -| GNU Lesser General Public License v3.0 or later | LGPL-3.0-or-later | -| GNU Library General Public License v2 only | LGPL-2.0-only | -| GNU Library General Public License v2 or later | LGPL-2.0-or-later | -| Fair License | Fair | -| ISC License | ISC | -| MIT License | MIT | -| No Limit Public License | NLPL | -| OpenSSL License | OpenSSL | -| X11 License | X11 | -| zlib License | Zlib | - -## Continuous Integration - -To simplify review and require less human resources, a CI tests all packages. -Passing CI tests are not a hard requirement but a good indicator what the -Buildbots will think about the proposed patch. - -The CI builds modified packages for multiple architectures using the latest -snapshot SDK. For supported architectures (`aarch64_generic`, -`arm_cortex-a15_neon-vfpv4`, `i386_pentium4` and `x86_64`) an additional -runtime test is executed. A running OpenWrt is simulated which tries to install -created packages and runs a script called `test.sh` located next to the package -Makefile. The script is executed with the two arguments `PKG_NAME` and -`PKG_VERSION`. The `PKG_NAME` can be used to distinguish package variants, e.g. -`foobar` vs. `foobar-full`. The `PKG_VERSION` can be used for a trivial test -checking if `foobar --version` prints the correct version. - -The following snippet shows a script that tests different binaries depending on -what IPK package was installed. The `gpsd` Makefile produces both a `gpsd` and -a `gpsd-clients` IPK packages. - -```shell - #!/bin/sh - -case "$1" in - "gpsd") - gpsd -V 2>&1 | grep "$2" - ;; - "gpsd-clients") - cgps -V 2>&1 | grep "$2" - ;; -esac -``` diff --git a/packages/LICENSE b/packages/LICENSE deleted file mode 100644 index d60c31a9..00000000 --- a/packages/LICENSE +++ /dev/null @@ -1,340 +0,0 @@ - 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/packages/README.md b/packages/README.md deleted file mode 100644 index 4b8b9e94..00000000 --- a/packages/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# OpenWrt packages feed - -## Description - -This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt. - -Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](https://openwrt.org/docs/guide-developer/using_the_sdk) on a build system. - -## Usage - -This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) on the OpenWrt support site. - -This feed is enabled by default. To install all its package definitions, run: -``` -./scripts/feeds update packages -./scripts/feeds install -a -p packages -``` - -## License - -See [LICENSE](LICENSE) file. - -## Package Guidelines - -See [CONTRIBUTING.md](CONTRIBUTING.md) file. - diff --git a/packages/admin/atop/Makefile b/packages/admin/atop/Makefile deleted file mode 100644 index f9df24d1..00000000 --- a/packages/admin/atop/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/nls.mk - -PKG_NAME:=atop -PKG_RELEASE:=1 -PKG_VERSION:=2.11.0 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.atoptool.nl/download/ -PKG_HASH:=9b94c666602efff7bf402ecce706c347f38c39cb63498f9d39626861e5646e20 - -PKG_MAINTAINER:=Toni Uhlig -PKG_LICENSE:=GPL-2.0-or-later -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:atop_project:atop - -include $(INCLUDE_DIR)/package.mk - -define Package/atop - SECTION:=admin - CATEGORY:=Administration - TITLE:=System and process monitor for Linux - DEPENDS:=+zlib +libncurses +glib2 - URL:=https://www.atoptool.nl/ -endef - -define Package/atop/description - Atop is an ASCII full-screen performance monitor for - Linux that is capable of reporting the activity of all - processes (even if processes have finished during the - interval), daily logging of system and process activity - for long-term analysis, highlighting overloaded system - resources by using colors, etcetera. At regular - intervals, it shows system-level activity related to the - CPU, memory, swap, disks (including LVM) and network - layers, and for every process (and thread) it shows e.g. - the CPU utilization, memory growth, disk utilization, - priority, username, state, and exit code. In combination - with the optional kernel module netatop, it even shows - network activity per process/thread. -endef - -define Package/atop/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/atop $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,atop)) diff --git a/packages/admin/backuppc/Makefile b/packages/admin/backuppc/Makefile deleted file mode 100644 index 1217eb27..00000000 --- a/packages/admin/backuppc/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (C) 2018 OpenWrt -# -# Ideas used from the backuppc packaging in Debian GNU/Linux -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=backuppc -PKG_VERSION:=3.3.2 -PKG_RELEASE:=3 - -PKG_SOURCE:=BackupPC-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/backuppc -PKG_HASH:=fbade2c8d8039297e826a75d2c39d5ac9a6f66e0c84c0cf8c4cef0bcf64d2152 -PKG_BUILD_DIR:=$(BUILD_DIR)/BackupPC-$(PKG_VERSION) - -PKG_MAINTAINER:=Carsten Wolff -PKG_LICENSE:=GPL-2.0-or-later -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/backuppc - SECTION:=admin - CATEGORY:=Administration - TITLE:=high-performance, enterprise-grade system for backing up PCs - URL:=https://sourceforge.net/projects/backuppc/ - DEPENDS:=+perl +perl-www +perl-cgi +perlbase-digest +perlbase-compress +perlbase-archive +perlbase-data +perlbase-storable +perlbase-getopt +perl-file-rsyncp +openssh-client +tar +bzip2 +samba4-client +rsync +iputils-ping -endef - -define Package/backuppc/description - BackupPC is a disk based backup system featuring a clever pooling scheme and - compression to minimize disk storage and disk I/O. It can use SMB, rsync or tar - to access the clients without any additional client software and offers a - powerful http/cgi user interface. -endef - -define Build/Configure - true -endef - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -Wall -o $(PKG_BUILD_DIR)/BackupPC_Admin ./files/setuidwrapper.c -endef - -define Package/backuppc/install - $(INSTALL_DIR) $(strip $(1))/etc/init.d - $(INSTALL_BIN) ./files/backuppc.init $(strip $(1))/etc/init.d/backuppc - cd $(PKG_BUILD_DIR) && ./configure.pl --batch --html-dir-url=/backuppc/ \ - --html-dir=/www/backuppc/ --cgi-dir=/www/cgi-bin/ --no-fhs --uid-ignore \ - --dest-dir=$(strip $(1)) --install-dir /usr/share/backuppc \ - --hostname=XXXXXX --data-dir=/data/backuppc --log-dir=/data/backuppc/log \ - --bin-path perl=/usr/bin/perl --bin-path tar=/bin/tar \ - --bin-path smbclient=/usr/sbin/smbclient --bin-path nmblookup=/usr/sbin/nmblookup \ - --bin-path rsync=/usr/bin/rsync --bin-path ping=/usr/bin/ping --bin-path df=/bin/df \ - --bin-path ssh=/usr/bin/ssh --bin-path gzip=/bin/gzip \ - --bin-path sendmail=/usr/sbin/sendmail --bin-path bzip2=/usr/bin/bzip2 \ - --bin-path par2= - $(INSTALL_DIR) $(strip $(1))/usr/share/backuppc/conf - chmod 755 $(strip $(1))/data - mv $(strip $(1))/data/backuppc/conf/config.pl $(strip $(1))/usr/share/backuppc/conf/config.pl - patch --no-backup-if-mismatch $(strip $(1))/usr/share/backuppc/conf/config.pl ./files/fixup-config-pl.patch - mv $(strip $(1))/www/cgi-bin/BackupPC_Admin $(strip $(1))/usr/share/backuppc/bin/BackupPC_Admin_real - $(INSTALL_BIN) $(PKG_BUILD_DIR)/BackupPC_Admin $(strip $(1))/www/cgi-bin/BackupPC_Admin - $(INSTALL_DIR) $(strip $(1))/lib/upgrade/keep.d - $(INSTALL_DATA) files/backuppc.upgrade $(strip $(1))/lib/upgrade/keep.d/backuppc -endef - -$(eval $(call BuildPackage,backuppc)) diff --git a/packages/admin/backuppc/files/backuppc.init b/packages/admin/backuppc/files/backuppc.init deleted file mode 100644 index d8aaa377..00000000 --- a/packages/admin/backuppc/files/backuppc.init +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh /etc/rc.common - -. /lib/functions.sh - -START=95 -STOP=10 - -USE_PROCD=1 -BACKUPPC_BIN="/usr/share/backuppc/bin/BackupPC" -BACKUPPC_USER=backuppc - -# it would be better if it was possible to do this at install time, but we -# can't, because in case of an openwrt image bundled with backuppc, all -# ownerships other than root are lost. -preconfigure() { - # create backuppc group and user if needed - if ! group_exists backuppc; then - group_add backuppc 864 - fi - if ! user_exists backuppc; then - user_add backuppc 864 864 "BackupPC user" /data/backuppc /bin/sh - fi - # install default config if none exists, yet - if [ ! -e /data/backuppc/conf/config.pl ]; then - cp /usr/share/backuppc/conf/config.pl /data/backuppc/conf/config.pl - fi - # ensure proper ownerships and rights - chown backuppc:backuppc /data/backuppc /data/backuppc/* \ - /www/cgi-bin/BackupPC_Admin - chmod 750 /data/backuppc /data/backuppc/* - chmod 755 /usr/share/backuppc/bin/BackupPC_Admin_real - # The CGI needs to be world-executable, because uhttpd-cgi.c:386 checks - # for exactly that. We don't want that, but can't avoid it, currently. - chmod 6751 /www/cgi-bin/BackupPC_Admin - chown -R :backuppc /data/backuppc/conf - chmod 2770 /data/backuppc/conf - # protect webinterface with a random password by default - if [ -x /usr/sbin/uhttpd ] && ! grep -q backuppc /etc/httpd.conf >/dev/null 2>&1; then - PASS=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..8)') - PASSHASH=$(/usr/sbin/uhttpd -m "${PASS}") - echo "/cgi-bin/BackupPC_Admin:backuppc:${PASSHASH}" >> /etc/httpd.conf - uci set uhttpd.main.config=/etc/httpd.conf - /etc/init.d/uhttpd restart - # inform user - echo - echo "To protect access to the backuppc web interface, HTTP basic authentication in" - echo "uhttpd for http://$(/sbin/uci get "system.@system[0].hostname")/cgi-bin/BackupPC_Admin has been configured:" - echo "user: backuppc" - echo "pass: ${PASS}" - echo - echo "It is also recommended to follow the steps in" - echo "https://openwrt.org/docs/guide-user/services/webserver/uhttpd#securing_uhttpd" - echo "to secure access to uhttpd." - fi -} - -start_service() { - # don't run preconfigure steps if called during image build - if [ -z "${IPKG_INSTROOT}" ]; then - preconfigure - fi - procd_open_instance - procd_set_param user $BACKUPPC_USER - procd_set_param reload_signal 1 - procd_set_param command $BACKUPPC_BIN -} diff --git a/packages/admin/backuppc/files/backuppc.upgrade b/packages/admin/backuppc/files/backuppc.upgrade deleted file mode 100644 index aaf016f5..00000000 --- a/packages/admin/backuppc/files/backuppc.upgrade +++ /dev/null @@ -1,2 +0,0 @@ -/etc/httpd.conf -/data/backuppc/conf/ diff --git a/packages/admin/backuppc/files/fixup-config-pl.patch b/packages/admin/backuppc/files/fixup-config-pl.patch deleted file mode 100644 index 2fa567c6..00000000 --- a/packages/admin/backuppc/files/fixup-config-pl.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- config.pl 2018-03-11 09:30:28.000000000 +0100 -+++ config.pl.new 2018-04-05 08:40:29.180000000 +0200 -@@ -41,7 +41,10 @@ - # - # Host name on which the BackupPC server is running. - # --$Conf{ServerHost} = 'XXXXXX'; -+$ENV{'PATH'} = '/bin:/usr/bin'; -+delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; -+$Conf{ServerHost} = $ENV{'HOSTNAME'}; -+chomp($Conf{ServerHost}); - - # - # TCP port number on which the BackupPC server listens for and accepts -@@ -223,7 +226,7 @@ - # - # Full path to various commands for archiving - # --$Conf{SplitPath} = '/usr/bin/split'; -+$Conf{SplitPath} = '/usr/bin/split' if ( -x '/usr/bin/split' ); - $Conf{ParPath} = ''; - $Conf{CatPath} = '/bin/cat'; - $Conf{GzipPath} = '/bin/gzip'; -@@ -1572,7 +1575,7 @@ - # Full path for ssh. Security caution: normal users should not - # allowed to write to this file or directory. - # --$Conf{SshPath} = '/usr/bin/ssh'; -+$Conf{SshPath} = '/usr/bin/ssh' if ( -x '/usr/bin/ssh' ); - - # - # Full path for nmblookup. Security caution: normal users should not -@@ -1874,7 +1877,7 @@ - # Full path to the sendmail command. Security caution: normal users - # should not allowed to write to this file or directory. - # --$Conf{SendmailPath} = '/usr/sbin/sendmail'; -+$Conf{SendmailPath} = '/usr/sbin/sendmail' if ( -x '/usr/sbin/sendmail' ); - - # - # Minimum period between consecutive emails to a single user. -@@ -2028,13 +2031,13 @@ - # $Conf{CgiAdminUsers} = 'craig celia'; - # --> administrative users are only craig and celia'. - # --$Conf{CgiAdminUserGroup} = ''; --$Conf{CgiAdminUsers} = ''; -+$Conf{CgiAdminUserGroup} = 'backuppc'; -+$Conf{CgiAdminUsers} = 'backuppc'; - - # - # URL of the BackupPC_Admin CGI script. Used for email messages. - # --$Conf{CgiURL} = 'http://XXXXXX/cgi-bin//BackupPC_Admin'; -+$Conf{CgiURL} = 'http://' . $Conf{ServerHost} . '/cgi-bin//BackupPC_Admin'; - - # - # Language to use. See lib/BackupPC/Lang for the list of supported -@@ -2076,7 +2079,7 @@ - # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero - # for international dates (DD/MM). - # --$Conf{CgiDateFormatMMDD} = 1; -+$Conf{CgiDateFormatMMDD} = 2; - - # - # If set, the complete list of hosts appears in the left navigation diff --git a/packages/admin/backuppc/files/setuidwrapper.c b/packages/admin/backuppc/files/setuidwrapper.c deleted file mode 100644 index b4496ffd..00000000 --- a/packages/admin/backuppc/files/setuidwrapper.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main(int argc, char* argv[]) -{ - execv("/usr/share/backuppc/bin/BackupPC_Admin_real", argv); - return 0; -} - diff --git a/packages/admin/backuppc/patches/001-debian-fixes.patch b/packages/admin/backuppc/patches/001-debian-fixes.patch deleted file mode 100644 index cd7de576..00000000 --- a/packages/admin/backuppc/patches/001-debian-fixes.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- a/bin/BackupPC_archive -+++ b/bin/BackupPC_archive -@@ -299,7 +299,7 @@ sub ArchiveCleanup - if ( $NeedPostCmd ) { - UserCommandRun("ArchivePostUserCmd"); - if ( $? && $Conf{UserCmdCheckStatus} ) { -- $stat{hostError} = "RestorePreUserCmd returned error status $?"; -+ $stat{hostError} = "ArchivePostUserCmd returned error status $?"; - $stat{xferOK} = 0; - } - } ---- a/bin/BackupPC_dump -+++ b/bin/BackupPC_dump -@@ -1067,7 +1067,7 @@ sub catch_signal - # Send ALRMs to BackupPC_tarExtract if we are using it - # - if ( $tarPid > 0 ) { -- kill($bpc->sigName2num("ARLM"), $tarPid); -+ kill($bpc->sigName2num("ALRM"), $tarPid); - } - - # ---- a/configure.pl -+++ b/configure.pl -@@ -333,7 +333,10 @@ while ( 1 ) { - $Conf{BackupPCUser} || "backuppc", - "backuppc-user"); - if ( $opts{"set-perms"} ) { -- ($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser}); -+ #($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser}); -+ $name = 'backuppc'; -+ $Uid=`id -u`; -+ $Gid=`id -g`; - last if ( $name ne "" ); - print </ -+ || $s =~ /^tar:\d+\s/ -+ || $s =~ /^ NTLMSSP_/ -+ || $s =~ /^GENSEC backend / -+ || $s =~ /^doing parameter / - || $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/ - || $s =~ /^tar: dumped \d+ files/ - || $s =~ /^\s*added interface/i ---- a/lib/BackupPC/Lib.pm -+++ b/lib/BackupPC/Lib.pm -@@ -512,7 +512,8 @@ sub dirRead - } - if ( $IODirentOk ) { - @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh)); -- map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric -+ #map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric -+ map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types - } else { - @entries = map { { name => $_} } readdir($fh); - } ---- a/lib/BackupPC/Xfer/Smb.pm -+++ b/lib/BackupPC/Xfer/Smb.pm -@@ -219,7 +219,7 @@ sub readOutput - # - # MAKSYM 14082016: The next regex will never match on Samba-4.3, as - # smbclient doesn't produce output required; keeping it for older Sambas -- if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) { -+ if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) { - my $sambaFileSize = $1; - my $pcFileName = $2; - (my $fileName = $pcFileName) =~ s/\\/\//g; -@@ -281,6 +281,9 @@ sub readOutput - } elsif ( /smb: \\>/ - || /^\s*tar:\d+/ # MAKSYM 14082016: ignoring 2 more Samba-4.3 specific lines - || /^\s*WARNING:/i -+ || /^ NTLMSSP_/ -+ || /^GENSEC backend / -+ || /^doing parameter / - || /^\s*added interface/i - || /^\s*tarmode is now/i - || /^\s*Total bytes written/i diff --git a/packages/admin/bottom/Makefile b/packages/admin/bottom/Makefile deleted file mode 100644 index 6bd7d92e..00000000 --- a/packages/admin/bottom/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2023 Luca Barbato - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bottom -PKG_VERSION:=0.9.7 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/ClementTsang/bottom/tar.gz/$(PKG_VERSION)? -PKG_HASH:=29c3f75323ae0245576ea23268bb0956757352bf3b16d05f511357655b9cc71e - -PKG_MAINTAINER:=Luca Barbato -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=rust/host -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk -include ../../lang/rust/rust-package.mk - -define Package/bottom - SECTION:=admin - CATEGORY:=Administration - TITLE:=Interactive processes viewer - DEPENDS:=$(RUST_ARCH_DEPENDS) - URL:=https://github.com/ClementTsang/bottom -endef - -define Package/bottom/description - A customizable cross-platform graphical process/system monitor - for the terminal. -endef - -$(eval $(call RustBinPackage,bottom)) -$(eval $(call BuildPackage,bottom)) diff --git a/packages/admin/btop/Makefile b/packages/admin/btop/Makefile deleted file mode 100644 index 75c04e41..00000000 --- a/packages/admin/btop/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=btop -PKG_VERSION:=1.4.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL=https://codeload.github.com/aristocratos/btop/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=ac0d2371bf69d5136de7e9470c6fb286cbee2e16b4c7a6d2cd48a14796e86650 - -PKG_MAINTAINER:=Tianling Shen -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_FLAGS:=no-lto -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/btop - SECTION:=admin - CATEGORY:=Administration - TITLE:=A monitor of resources - URL:=https://github.com/aristocratos/btop - DEPENDS:=+libstdcpp -endef - -define Package/btop/description - Resource monitor that shows usage and stats for processor, memory, - disks, network and processes. - - C++ version and continuation of bashtop and bpytop. -endef - -BTOP_LDFLAGS:=-pthread -DFMT_HEADER_ONLY -D_FILE_OFFSET_BITS=64 -MAKE_FLAGS+= \ - PLATFORM=Linux \ - OPTFLAGS="$(TARGET_CXXFLAGS)" \ - LDCXXFLAGS="$(TARGET_LDFLAGS) $(BTOP_LDFLAGS)" - -define Package/btop/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/btop $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/local/share/btop $(1)/usr/share/ - - $(INSTALL_DIR) $(1)/etc/profile.d - $(CP) $(CURDIR)/files/btop.sh $(1)/etc/profile.d/ -endef - -$(eval $(call BuildPackage,btop)) diff --git a/packages/admin/btop/files/btop.sh b/packages/admin/btop/files/btop.sh deleted file mode 100644 index d7aa4476..00000000 --- a/packages/admin/btop/files/btop.sh +++ /dev/null @@ -1 +0,0 @@ -alias btop="btop --utf-force" diff --git a/packages/admin/btop/test.sh b/packages/admin/btop/test.sh deleted file mode 100644 index b7b21ab7..00000000 --- a/packages/admin/btop/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -btop --version | grep "$PKG_VERSION" diff --git a/packages/admin/debian-archive-keyring/Makefile b/packages/admin/debian-archive-keyring/Makefile deleted file mode 100644 index 305176d5..00000000 --- a/packages/admin/debian-archive-keyring/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=debian-archive-keyring -PKG_VERSION:=2023.4 -PKG_HASH:=6e93a87b9e50bd81518880ec07a62f95d7d8452f4aa703f5b0a3076439f1022c -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_all.deb -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/$(PKG_NAME)/ -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=Unique -PKG_LICENSE_FILES:=usr/share/doc/debian-archive-keyring/copyright - -include $(INCLUDE_DIR)/package.mk - -define Package/debian-archive-keyring - SECTION:=admin - CATEGORY:=Administration - TITLE:=Debian Archive keyring - URL:=https://salsa.debian.org/release-team/debian-archive-keyring - PKGARCH:=all -endef - -define Build/Prepare - $(AR) p $(DL_DIR)/$(PKG_SOURCE) data.tar.xz | $(TAR) -xJC $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/debian-archive-keyring/install - $(INSTALL_DIR) $(1)/usr/share/keyrings - $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/keyrings/*.gpg $(1)/usr/share/keyrings -endef - -$(eval $(call BuildPackage,debian-archive-keyring)) diff --git a/packages/admin/debootstrap/Makefile b/packages/admin/debootstrap/Makefile deleted file mode 100644 index 8bd3b47e..00000000 --- a/packages/admin/debootstrap/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2010 Gianluigi Tiesi -# Copyright (C) 2011-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=debootstrap -PKG_REAL_VERSION:=1.0.128+nmu2+deb12u1 -PKG_VERSION:=1.0.128.2~deb121 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_REAL_VERSION)_all.udeb -PKG_SOURCE_URL:=@DEBIAN/pool/main/d/debootstrap -PKG_HASH:=4fa4ec7c144ed047c47d0d8eb9b91b56eaa9b2db2b52510777abbabf5965d268 - -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=Unique -PKG_LICENSE_FILES:=debian/copyright - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REAL_VERSION) - -UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.xz | xzcat | tar -C $(1) -xf - - -include $(INCLUDE_DIR)/package.mk - -define Package/debootstrap - SECTION:=admin - CATEGORY:=Administration - TITLE:=Bootstrap a basic Debian system - URL:=https://wiki.debian.org/Debootstrap - DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz-utils +xz -endef - -define Package/debootstrap/description - debootstrap is used to create a Debian base system from scratch, without - requiring the availability of dpkg or apt. It does this by downloading .deb - files from a mirror site, and carefully unpacking them into a directory which - can eventually be chrooted into. -endef - -define Build/Compile -# file pkgdetails.c was imported from debian package base-installer version 1.130 - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails -endef - -define Package/debootstrap/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin - $(INSTALL_DIR) $(1)/usr/share/debootstrap - $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap - $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap - $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts - $(CP) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts -endef - -$(eval $(call BuildPackage,debootstrap)) diff --git a/packages/admin/debootstrap/files/pkgdetails.c b/packages/admin/debootstrap/files/pkgdetails.c deleted file mode 100644 index 7de6731d..00000000 --- a/packages/admin/debootstrap/files/pkgdetails.c +++ /dev/null @@ -1,348 +0,0 @@ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include - -#define MAX_LINE 1000 -#define MAX_PKGS 100 - -char *checksum_field=NULL; - -static void oom_die(void) -{ - fputs("Out of memory!\n", stderr); - exit(1); -} - -static char *xvasprintf(const char *fmt, va_list ap) { - char *ret; - - if (vasprintf (&ret, fmt, ap) < 0) { - if (errno == ENOMEM) - oom_die(); - return NULL; - } - return ret; -} - -static char *xasprintf(const char *fmt, ...) { - va_list ap; - char *ret; - - va_start(ap, fmt); - ret = xvasprintf(fmt, ap); - va_end(ap); - return ret; -} - -static char *fieldcpy(char *dst, char *fld) { - while (*fld && *fld != ':') - fld++; - if (!*(fld++)) - return NULL; - while (isspace(*fld)) fld++; - return strcpy(dst, fld); -} - -static void outputdeps(char *deps) { - char *pch = deps; - - while (1) { - while (isspace(*pch)) pch++; - if (!*pch) break; - - while (*pch && *pch != '(' && *pch != '|' && *pch != ',' - && !isspace(*pch)) - { - fputc(*pch++, stdout); - } - fputc('\n', stdout); - while (*pch && *pch++ != ',') (void)NULL; - } -} - -static void dogetdeps(char *pkgsfile, char **in_pkgs, int pkgc) { - char buf[MAX_LINE]; - char cur_pkg[MAX_LINE]; - char cur_deps[MAX_LINE]; - char cur_predeps[MAX_LINE]; - char prev_pkg[MAX_LINE]; - char *pkgs[MAX_PKGS]; - int i; - int skip; - FILE *f; - int output_pkg = -1; - - cur_pkg[0] = cur_deps[0] = cur_predeps[0] = prev_pkg[0] = '\0'; - - for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; - - f = fopen(pkgsfile, "r"); - if (f == NULL) { - perror(pkgsfile); - exit(1); - } - - skip = 1; - while (fgets(buf, sizeof(buf), f)) { - if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; - if (strncasecmp(buf, "Package:", 8) == 0) { - int any = 0; - skip = 1; - fieldcpy(cur_pkg, buf); - if (strcmp(cur_pkg, prev_pkg) != 0) { - if (output_pkg != -1) - pkgs[output_pkg] = NULL; - if (cur_deps[0]) - outputdeps(cur_deps); - if (cur_predeps[0]) - outputdeps(cur_predeps); - strcpy(prev_pkg, cur_pkg); - } - cur_deps[0] = cur_predeps[0] = '\0'; - output_pkg = -1; - for (i = 0; i < pkgc; i++) { - if (!pkgs[i]) continue; - any = 1; - if (strcmp(cur_pkg, pkgs[i]) == 0) { - skip = 0; - output_pkg = i; - break; - } - } - if (!any) break; - } else if (!skip && strncasecmp(buf, "Depends:", 8) == 0) - fieldcpy(cur_deps, buf); - else if (!skip && strncasecmp(buf, "Pre-Depends:", 12) == 0) - fieldcpy(cur_predeps, buf); - } - if (cur_deps[0]) - outputdeps(cur_deps); - if (cur_predeps[0]) - outputdeps(cur_predeps); - fclose(f); -} - -static void dopkgmirrorpkgs(int uniq, char *mirror, char *pkgsfile, - char *fieldname, char **in_pkgs, int pkgc) -{ - char buf[MAX_LINE]; - char cur_field[MAX_LINE]; - char cur_pkg[MAX_LINE]; - char cur_ver[MAX_LINE]; - char cur_arch[MAX_LINE]; - char cur_size[MAX_LINE]; - char cur_checksum[MAX_LINE]; - char cur_filename[MAX_LINE]; - char prev_pkg[MAX_LINE]; - char *pkgs[MAX_PKGS]; - int i; - FILE *f; - char *output = NULL; - int output_pkg = -1; - - cur_field[0] = cur_pkg[0] = cur_ver[0] = cur_arch[0] = cur_filename[0] = prev_pkg[0] = '\0'; - - for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; - - f = fopen(pkgsfile, "r"); - if (f == NULL) { - perror(pkgsfile); - exit(1); - } - while (fgets(buf, sizeof(buf), f)) { - if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; - if (strncasecmp(buf, fieldname, strlen(fieldname)) == 0) { - fieldcpy(cur_field, buf); - } - if (strncasecmp(buf, "Package:", 8) == 0) { - fieldcpy(cur_pkg, buf); - if (strcmp(cur_pkg, prev_pkg) != 0) { - if (output) - fputs(output, stdout); - if (uniq && output_pkg != -1) - pkgs[output_pkg] = NULL; - strcpy(prev_pkg, cur_pkg); - } - free(output); - output = NULL; - output_pkg = -1; - } else if (strncasecmp(buf, "Version:", 8) == 0) { - fieldcpy(cur_ver, buf); - } else if (strncasecmp(buf, "Architecture:", 13) == 0) { - fieldcpy(cur_arch, buf); - } else if (strncasecmp(buf, "Size:", 5) == 0) { - fieldcpy(cur_size, buf); - } else if (strncasecmp(buf, checksum_field, strlen(checksum_field)) == 0 - && buf[strlen(checksum_field)] == ':') { - fieldcpy(cur_checksum, buf); - } else if (strncasecmp(buf, "Filename:", 9) == 0) { - fieldcpy(cur_filename, buf); - } else if (!*buf) { - int any = 0; - for (i = 0; i < pkgc; i++) { - if (!pkgs[i]) continue; - any = 1; - if (strcmp(cur_field, pkgs[i]) == 0) { - free(output); - output = xasprintf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_checksum, cur_size); - output_pkg = i; - break; - } - } - if (!any) break; - cur_field[0] = '\0'; - } - } - if (output) - fputs(output, stdout); - if (uniq && output_pkg != -1) - pkgs[output_pkg] = NULL; - fclose(f); - - /* any that weren't found are returned as "pkg -" */ - if (uniq) { - for (i = 0; i < pkgc; i++) { - if (pkgs[i]) { - printf("%s -\n", pkgs[i]); - } - } - } -} - -static void dopkgstanzas(char *pkgsfile, char **pkgs, int pkgc) -{ - char buf[MAX_LINE]; - char *accum; - size_t accum_size = 0, accum_alloc = MAX_LINE * 2; - char cur_pkg[MAX_LINE]; - FILE *f; - - accum = malloc(accum_alloc); - if (!accum) - oom_die(); - - f = fopen(pkgsfile, "r"); - if (f == NULL) { - perror(pkgsfile); - free(accum); - exit(1); - } - while (fgets(buf, sizeof(buf), f)) { - if (*buf) { - size_t len = strlen(buf); - if (accum_size + len + 1 > accum_alloc) { - accum_alloc = (accum_size + len + 1) * 2; - accum = realloc(accum, accum_alloc); - if (!accum) - oom_die(); - } - strcpy(accum + accum_size, buf); - accum_size += len; - } - if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; - if (strncasecmp(buf, "Package:", 8) == 0) { - fieldcpy(cur_pkg, buf); - } else if (!*buf) { - int i; - for (i = 0; i < pkgc; i++) { - if (!pkgs[i]) continue; - if (strcmp(cur_pkg, pkgs[i]) == 0) { - fputs(accum, stdout); - if (accum[accum_size - 1] != '\n') - fputs("\n\n", stdout); - else if (accum[accum_size - 2] != '\n') - fputc('\n', stdout); - break; - } - } - *accum = '\0'; - accum_size = 0; - } - } - fclose(f); - - free(accum); -} - -static int dotranslatewgetpercent(int low, int high, int end, char *str) { - int ch; - int val, lastval; - - /* print out anything that looks like a % on its own line, appropriately - * scaled */ - - lastval = val = 0; - while ( (ch = getchar()) != EOF ) { - if (isdigit(ch)) { - val *= 10; val += ch - '0'; - } else if (ch == '%') { - float f = (float) val / 100.0 * (high - low) + low; - if (str) { - printf("P: %d %d %s\n", (int) f, end, str); - } else { - printf("P: %d %d\n", (int) f, end); - } - lastval = val; - } else { - val = 0; - } - } - return lastval == 100; -} - -int main(int argc, char *argv[]) { - checksum_field=getenv("DEBOOTSTRAP_CHECKSUM_FIELD"); - if (checksum_field == NULL) { - checksum_field="MD5sum"; - } - - if ((argc == 6 || argc == 5) && strcmp(argv[1], "WGET%") == 0) { - if (dotranslatewgetpercent(atoi(argv[2]), atoi(argv[3]), - atoi(argv[4]), argc == 6 ? argv[5] : NULL)) - { - exit(0); - } else { - exit(1); - } - } else if (argc >= 4 && strcmp(argv[1], "GETDEPS") == 0) { - int i; - for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { - dogetdeps(argv[2], argv+i, MAX_PKGS); - } - dogetdeps(argv[2], argv+i, argc-i); - exit(0); - } else if (argc >= 5 && strcmp(argv[1], "PKGS") == 0) { - int i; - for (i = 4; argc - i > MAX_PKGS; i += MAX_PKGS) { - dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, MAX_PKGS); - } - dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, argc-i); - exit(0); - } else if (argc >= 6 && strcmp(argv[1], "FIELD") == 0) { - int i; - for (i = 5; argc - i > MAX_PKGS; i += MAX_PKGS) { - dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, MAX_PKGS); - } - dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, argc-i); - exit(0); - } else if (argc >= 4 && strcmp(argv[1], "STANZAS") == 0) { - int i; - for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { - dopkgstanzas(argv[2], argv+i, MAX_PKGS); - } - dopkgstanzas(argv[2], argv+i, argc-i); - exit(0); - } else { - fprintf(stderr, "usage: %s PKGS mirror packagesfile pkgs..\n", argv[0]); - fprintf(stderr, " or: %s FIELD field mirror packagesfile pkgs..\n", - argv[0]); - fprintf(stderr, " or: %s GETDEPS packagesfile pkgs..\n", argv[0]); - fprintf(stderr, " or: %s STANZAS packagesfile pkgs..\n", argv[0]); - fprintf(stderr, " or: %s WGET%% low high end reason\n", argv[0]); - exit(1); - } -} diff --git a/packages/admin/debootstrap/patches/010-no-nvswitch.patch b/packages/admin/debootstrap/patches/010-no-nvswitch.patch deleted file mode 100644 index 698126a5..00000000 --- a/packages/admin/debootstrap/patches/010-no-nvswitch.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/usr/share/debootstrap/functions -+++ b/usr/share/debootstrap/functions -@@ -78,7 +78,6 @@ progress_next () { - } - - wgetprogress () { -- [ ! "$VERBOSE" ] && NVSWITCH="-nv" - local ret=0 - if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then - # The exit status of a pipeline is that of the last command in diff --git a/packages/admin/fluent-bit/Makefile b/packages/admin/fluent-bit/Makefile deleted file mode 100644 index a4c2e5a4..00000000 --- a/packages/admin/fluent-bit/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=fluent-bit -PKG_VERSION:=3.1.3 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git -PKG_SOURCE_VERSION=v$(PKG_VERSION) -PKG_MIRROR_HASH:=85b861693a9ed597e4e55e30330dd2fb96daa997eb71424a55ccc28de92eef78 - -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/fluent-bit - SECTION:=admin - CATEGORY:=Administration - TITLE:=Fast and Lightweight Logs and Metrics processor - URL:=https://fluentbit.io/ - DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison -endef - -define Package/fluent-bit/description - Fluent Bit is a super fast, lightweight, and highly scalable logging - and metrics processor and forwarder. -endef - -define Package/fluent-bit/conffiles -/etc/fluent-bit/parsers.conf -endef - -TARGET_LDFLAGS +=-lfts -latomic - -CMAKE_OPTIONS+= \ - -DFLB_RELEASE=Yes \ - -DEXCLUDE_FROM_ALL=true \ - -DFLB_EXAMPLES=No \ - -DFLB_CHUNK_TRACE=No \ - -DFLB_BACKTRACE=No \ - -DFLB_WASM=No \ - -DFLB_LUAJIT=No \ - -DWITH_SASL=No \ - -DWITH_ZLIB=No \ - -DWITH_ZSTD=No - -define Package/fluent-bit/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/fluent-bit $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/etc/fluent-bit - $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/parsers.conf $(1)/etc/fluent-bit/parsers.conf -endef - -$(eval $(call BuildPackage,fluent-bit)) diff --git a/packages/admin/gkrellmd/Makefile b/packages/admin/gkrellmd/Makefile deleted file mode 100644 index dbccd784..00000000 --- a/packages/admin/gkrellmd/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2007-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gkrellmd -PKG_VERSION:=2.3.11 -PKG_RELEASE:=1 - -PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://gkrellm.srcbox.net/releases -PKG_HASH:=1ee0643ed9ed99f88c1504c89d9ccb20780cf29319c904b68e80a8e7c8678c06 -PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION) - -PKG_MAINTAINER:=Peter Denison -PKG_LICENSE:=GPL-2.0-or-later -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/gkrellmd - SECTION:=admin - CATEGORY:=Administration - DEPENDS:=+glib2 - TITLE:=The GNU Krell Monitors Server - URL:=http://gkrellm.net/ -endef - -define Package/gkrellmd/description - Gkrellmd listens for connections from gkrellm clients. When - a gkrellm client connects to a gkrellmd server all builtin - monitors collect their data from the server. -endef - -define Package/gkrellmd/conffiles -/etc/$(PKG_NAME).conf -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/server \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS) " \ - without-libsensors="yes" -endef - -define Package/gkrellmd/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) -endef - -$(eval $(call BuildPackage,gkrellmd)) diff --git a/packages/admin/gkrellmd/files/gkrellmd.init b/packages/admin/gkrellmd/files/gkrellmd.init deleted file mode 100644 index 5bd88a94..00000000 --- a/packages/admin/gkrellmd/files/gkrellmd.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007 OpenWrt.org - -START=60 -BIN=gkrellmd -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid - -start() { - mkdir -p $RUN_D - $BIN $OPTIONS -} - -stop() { - [ -f $PID_F ] && kill $(cat $PID_F) -} diff --git a/packages/admin/gkrellmd/patches/100-conf.patch b/packages/admin/gkrellmd/patches/100-conf.patch deleted file mode 100644 index 8716a31a..00000000 --- a/packages/admin/gkrellmd/patches/100-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/server/gkrellmd.conf -+++ b/server/gkrellmd.conf -@@ -4,7 +4,7 @@ - # the client update frequency. Values may be from 1 to 10 and should be - # smaller values to reduce network traffic. - # --#update-hz 3 -+update-hz 10 - - # Limit number of simultaneous clients allowed to connect. - # -@@ -30,18 +30,18 @@ - # Drop privileges after startup (you must start gkrellmd as root to do it). - # NOTE: Option ignored on Windows - # --#user nobody -+user nobody - #group proc - - # Create a PID file for the running gkrellmd. Default is no PID file. - # NOTE: Option ignored on Windows - # --#pidfile /var/run/gkrellmd.pid -+pidfile /var/run/gkrellmd.pid - - # Run in background and detach from the controlling terminal - # NOTE: Option ignored on Windows - # --#detach -+detach - - # Enable writing logging message to the system syslog file - # NOTE: On windows this enables logging to the windows event log diff --git a/packages/admin/gotop/Makefile b/packages/admin/gotop/Makefile deleted file mode 100644 index 000fecfe..00000000 --- a/packages/admin/gotop/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-only -# -# Copyright (C) 2021 ImmortalWrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gotop -PKG_VERSION:=4.2.0 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/xxxserxxx/gotop/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=e9d9041903acb6bd3ffe94e0a02e69eea53f1128274da1bfe00fe44331ccceb1 - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Tianling Shen - -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -GO_PKG:=github.com/xxxserxxx/gotop -GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../../lang/golang/golang-package.mk - -define Package/gotop - SECTION:=admin - CATEGORY:=Administration - TITLE:=A terminal based graphical activity monitor - URL:=https://github.com/xxxserxxx/gotop - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/gotop/description - Another terminal based graphical activity monitor. -endef - -$(eval $(call GoBinPackage,gotop)) -$(eval $(call BuildPackage,gotop)) diff --git a/packages/admin/gotop/patches/010-Fix-build-failure-on-riscv64-caused-by-missing-syscall.patch b/packages/admin/gotop/patches/010-Fix-build-failure-on-riscv64-caused-by-missing-syscall.patch deleted file mode 100644 index 222586e4..00000000 --- a/packages/admin/gotop/patches/010-Fix-build-failure-on-riscv64-caused-by-missing-syscall.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 658926bd0fa8e15c75c4db1426f2b20307312870 Mon Sep 17 00:00:00 2001 -From: Camber Huang -Date: Mon, 9 May 2022 14:04:06 +0800 -Subject: [PATCH] Fix build failure on riscv64 caused by missing syscall - -On RISC-V 64-bit linux systems, syscall `dup2()` is not available, therefore -syscall.Dup2 will be undefined and gotop will fail to be built from soure. -This patch updates building target of logging/logging_{other,arm64} and -renames them based on syscall used. ---- - logging/{logging_other.go => logging_dup2.go} | 2 +- - logging/{logging_arm64.go => logging_dup3.go} | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - rename logging/{logging_other.go => logging_dup2.go} (67%) - rename logging/{logging_arm64.go => logging_dup3.go} (73%) - ---- a/logging/logging_other.go -+++ /dev/null -@@ -1,12 +0,0 @@ --// +build linux,!arm64 openbsd,!arm64 freebsd darwin -- --package logging -- --import ( -- "os" -- "syscall" --) -- --func stderrToLogfile(logfile *os.File) { -- syscall.Dup2(int(logfile.Fd()), 2) --} ---- /dev/null -+++ b/logging/logging_dup2.go -@@ -0,0 +1,12 @@ -+// +build linux,!arm64,!riscv64 openbsd,!arm64 freebsd darwin -+ -+package logging -+ -+import ( -+ "os" -+ "syscall" -+) -+ -+func stderrToLogfile(logfile *os.File) { -+ syscall.Dup2(int(logfile.Fd()), 2) -+} ---- a/logging/logging_arm64.go -+++ /dev/null -@@ -1,12 +0,0 @@ --// +build !freebsd,!darwin,arm64 -- --package logging -- --import ( -- "os" -- "syscall" --) -- --func stderrToLogfile(logfile *os.File) { -- syscall.Dup3(int(logfile.Fd()), 2, 0) --} ---- /dev/null -+++ b/logging/logging_dup3.go -@@ -0,0 +1,12 @@ -+// +build !freebsd,!darwin,arm64 linux,riscv64 -+ -+package logging -+ -+import ( -+ "os" -+ "syscall" -+) -+ -+func stderrToLogfile(logfile *os.File) { -+ syscall.Dup3(int(logfile.Fd()), 2, 0) -+} diff --git a/packages/admin/htop/Makefile b/packages/admin/htop/Makefile deleted file mode 100644 index d7591bc3..00000000 --- a/packages/admin/htop/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=htop -PKG_VERSION:=3.3.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/htop-dev/htop/tar.gz/$(PKG_VERSION)? -PKG_HASH:=1e5cc328eee2bd1acff89f860e3179ea24b85df3ac483433f92a29977b14b045 - -PKG_LICENSE:=GPL-2.0-or-later -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:htop:htop - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_CONFIG_DEPENDS:= CONFIG_HTOP_LMSENSORS -PKG_BUILD_DEPENDS:= HTOP_LMSENSORS:lm-sensors - -include $(INCLUDE_DIR)/package.mk - -define Package/htop - SECTION:=admin - CATEGORY:=Administration - TITLE:=Interactive processes viewer - DEPENDS:=+libncurses - URL:=https://hisham.hm/htop/ - MAINTAINER:=Etienne CHAMPETIER -endef - -define Package/htop/description - Htop is an ncursed-based process viewer similar to top, but - it allows to scroll the list vertically and horizontally to - see all processes and their full command lines. -endef - -define Package/htop/config - config HTOP_LMSENSORS - bool "Compile Htop with lm-sensors support" - depends on PACKAGE_htop - default y - help - Build htop with lm-sensors support. - This increases the binary by approx 5 kB. - Users wanting this functionality need to - install libsensors. -endef - -CONFIGURE_ARGS += \ - --$(if $(CONFIG_HTOP_LMSENSORS),en,dis)able-sensors \ - --enable-affinity \ - --disable-capabilities \ - --disable-delayacct \ - --disable-unicode \ - --disable-unwind \ - --disable-hwloc - -CONFIGURE_VARS += \ - ac_cv_file__proc_stat=yes \ - ac_cv_file__proc_meminfo=yes - -define Package/htop/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,htop)) diff --git a/packages/admin/ipmitool/Makefile b/packages/admin/ipmitool/Makefile deleted file mode 100644 index 1fc6dfec..00000000 --- a/packages/admin/ipmitool/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2017 Alexander Couzens -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ipmitool -PKG_VERSION:=1.8.18 -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01 -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:ipmitool_project:ipmitool - -include $(INCLUDE_DIR)/package.mk - -define Package/ipmitool - SECTION:=admin - CATEGORY:=Administration - DEPENDS:=+libopenssl +libncurses +libreadline - TITLE:=Command-line interface to IPMI-enabled devices - URL:=https://github.com/ipmitool/ipmitool - MAINTAINER:=Alexander Couzens -endef - -define Package/ipmitool/Default/description - Command-line interface to IPMI-enabled devices -endef - -define Package/ipmitool/install - $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ipmievd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ipmitool $(1)/usr/sbin/ -endef - -CONFIGURE_ARGS += \ - --enable-intf-lan \ - --enable-intf-lanplus \ - --enable-intf-serial \ - --enable-intf-free \ - --enable-intf-open \ - --enable-intf-imb \ - --enable-ipmishell - -$(eval $(call BuildPackage,ipmitool)) diff --git a/packages/admin/ipmitool/patches/0001-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch b/packages/admin/ipmitool/patches/0001-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch deleted file mode 100644 index 582e17d4..00000000 --- a/packages/admin/ipmitool/patches/0001-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch +++ /dev/null @@ -1,99 +0,0 @@ -From b57487e360916ab3eaa50aa6d021c73b6337a4a0 Mon Sep 17 00:00:00 2001 -From: Dennis Schridde -Date: Wed, 30 Nov 2016 17:33:00 +0100 -Subject: [PATCH 1/4] ID:461 - OpenSSL 1.1 compatibility - "error: storage size - of 'ctx' isn't known" - -In OpenSSL 1.1 EVP_CIPHER_CTX became opaque, cf. `man 3ssl EVP_EncryptInit` - -Fixes: ID:461 ---- - src/plugins/lanplus/lanplus_crypt_impl.c | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - ---- a/src/plugins/lanplus/lanplus_crypt_impl.c -+++ b/src/plugins/lanplus/lanplus_crypt_impl.c -@@ -164,10 +164,10 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - uint8_t * output, - uint32_t * bytes_written) - { -- EVP_CIPHER_CTX ctx; -- EVP_CIPHER_CTX_init(&ctx); -- EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv); -- EVP_CIPHER_CTX_set_padding(&ctx, 0); -+ EVP_CIPHER_CTX* ctx; -+ EVP_CIPHER_CTX_init(ctx); -+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -+ EVP_CIPHER_CTX_set_padding(ctx, 0); - - - *bytes_written = 0; -@@ -191,7 +191,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0); - - -- if(!EVP_EncryptUpdate(&ctx, output, (int *)bytes_written, input, input_length)) -+ if(!EVP_EncryptUpdate(ctx, output, (int *)bytes_written, input, input_length)) - { - /* Error */ - *bytes_written = 0; -@@ -201,7 +201,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - { - uint32_t tmplen; - -- if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen)) -+ if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) - { - *bytes_written = 0; - return; /* Error */ -@@ -210,7 +210,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - { - /* Success */ - *bytes_written += tmplen; -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_cleanup(ctx); - } - } - } -@@ -239,10 +239,10 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - uint8_t * output, - uint32_t * bytes_written) - { -- EVP_CIPHER_CTX ctx; -- EVP_CIPHER_CTX_init(&ctx); -- EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv); -- EVP_CIPHER_CTX_set_padding(&ctx, 0); -+ EVP_CIPHER_CTX* ctx; -+ EVP_CIPHER_CTX_init(ctx); -+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -+ EVP_CIPHER_CTX_set_padding(ctx, 0); - - - if (verbose >= 5) -@@ -266,7 +266,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0); - - -- if (!EVP_DecryptUpdate(&ctx, output, (int *)bytes_written, input, input_length)) -+ if (!EVP_DecryptUpdate(ctx, output, (int *)bytes_written, input, input_length)) - { - /* Error */ - lprintf(LOG_DEBUG, "ERROR: decrypt update failed"); -@@ -277,7 +277,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - { - uint32_t tmplen; - -- if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen)) -+ if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) - { - char buffer[1000]; - ERR_error_string(ERR_get_error(), buffer); -@@ -290,7 +290,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - { - /* Success */ - *bytes_written += tmplen; -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_cleanup(ctx); - } - } - diff --git a/packages/admin/ipmitool/patches/0002-ID-461-Make-compiler-happier-about-changes-related-t.patch b/packages/admin/ipmitool/patches/0002-ID-461-Make-compiler-happier-about-changes-related-t.patch deleted file mode 100644 index 9690d879..00000000 --- a/packages/admin/ipmitool/patches/0002-ID-461-Make-compiler-happier-about-changes-related-t.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 77fe5635037ebaf411cae46cf5045ca819b5c145 Mon Sep 17 00:00:00 2001 -From: Zdenek Styblik -Date: Sun, 15 Jan 2017 15:11:25 +0100 -Subject: [PATCH 2/4] ID:461 - Make compiler happier about changes related to - OpenSSL 1.1 - -Complaint was that ctx isn't initialized. ---- - src/plugins/lanplus/lanplus_crypt_impl.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/src/plugins/lanplus/lanplus_crypt_impl.c -+++ b/src/plugins/lanplus/lanplus_crypt_impl.c -@@ -164,7 +164,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - uint8_t * output, - uint32_t * bytes_written) - { -- EVP_CIPHER_CTX* ctx; -+ EVP_CIPHER_CTX *ctx = NULL; - EVP_CIPHER_CTX_init(ctx); - EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); - EVP_CIPHER_CTX_set_padding(ctx, 0); -@@ -239,7 +239,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - uint8_t * output, - uint32_t * bytes_written) - { -- EVP_CIPHER_CTX* ctx; -+ EVP_CIPHER_CTX *ctx = NULL; - EVP_CIPHER_CTX_init(ctx); - EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); - EVP_CIPHER_CTX_set_padding(ctx, 0); diff --git a/packages/admin/ipmitool/patches/0003-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch b/packages/admin/ipmitool/patches/0003-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch deleted file mode 100644 index db388e4e..00000000 --- a/packages/admin/ipmitool/patches/0003-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f004b4b7197fc83e7d47ec8cbcaefffa9a922717 Mon Sep 17 00:00:00 2001 -From: Zdenek Styblik -Date: Sun, 12 Mar 2017 14:00:35 +0100 -Subject: [PATCH 3/4] ID:480 - ipmitool coredumps in EVP_CIPHER_CTX_init - -IPMI tool coredumps due to changes introduced in ID:461. This shouldn't be -surprise as a NULL pointer is passed to init. Commit addresses this issue by -calling EVP_CIPHER_CTX_new() instead of EVP_CIPHER_CTX_init(), which is -deprecated, and by checking return value of call to former function. ---- - src/plugins/lanplus/lanplus_crypt_impl.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - ---- a/src/plugins/lanplus/lanplus_crypt_impl.c -+++ b/src/plugins/lanplus/lanplus_crypt_impl.c -@@ -165,10 +165,13 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - uint32_t * bytes_written) - { - EVP_CIPHER_CTX *ctx = NULL; -- EVP_CIPHER_CTX_init(ctx); -+ ctx = EVP_CIPHER_CTX_new(); -+ if (ctx == NULL) { -+ *bytes_written = 0; -+ return; -+ } - EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); - EVP_CIPHER_CTX_set_padding(ctx, 0); -- - - *bytes_written = 0; - -@@ -240,11 +243,14 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - uint32_t * bytes_written) - { - EVP_CIPHER_CTX *ctx = NULL; -- EVP_CIPHER_CTX_init(ctx); -+ ctx = EVP_CIPHER_CTX_new(); -+ if (ctx == NULL) { -+ *bytes_written = 0; -+ return; -+ } - EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); - EVP_CIPHER_CTX_set_padding(ctx, 0); - -- - if (verbose >= 5) - { - printbuf(iv, 16, "decrypting with this IV"); diff --git a/packages/admin/ipmitool/patches/0004-ID-480-Call-EVP_CIPHER_CTX_free-instead-of-EVP_CIPHE.patch b/packages/admin/ipmitool/patches/0004-ID-480-Call-EVP_CIPHER_CTX_free-instead-of-EVP_CIPHE.patch deleted file mode 100644 index c081cc53..00000000 --- a/packages/admin/ipmitool/patches/0004-ID-480-Call-EVP_CIPHER_CTX_free-instead-of-EVP_CIPHE.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 1664902525a1c3771b4d8b3ccab7ea1ba6b2bdd1 Mon Sep 17 00:00:00 2001 -From: Holger Liebig -Date: Tue, 4 Apr 2017 20:43:05 +0200 -Subject: [PATCH 4/4] ID:480 - Call EVP_CIPHER_CTX_free() instead of - EVP_CIPHER_CTX_cleanup() - -Call EVP_CIPHER_CTX_free() instead of EVP_CIPHER_CTX_cleanup() to fix memory -leak. ---- - src/plugins/lanplus/lanplus_crypt_impl.c | 44 +++++++++++++++++--------------- - 1 file changed, 23 insertions(+), 21 deletions(-) - ---- a/src/plugins/lanplus/lanplus_crypt_impl.c -+++ b/src/plugins/lanplus/lanplus_crypt_impl.c -@@ -165,13 +165,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - uint32_t * bytes_written) - { - EVP_CIPHER_CTX *ctx = NULL; -- ctx = EVP_CIPHER_CTX_new(); -- if (ctx == NULL) { -- *bytes_written = 0; -- return; -- } -- EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -- EVP_CIPHER_CTX_set_padding(ctx, 0); - - *bytes_written = 0; - -@@ -185,6 +178,14 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - printbuf(input, input_length, "encrypting this data"); - } - -+ ctx = EVP_CIPHER_CTX_new(); -+ if (ctx == NULL) { -+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); -+ return; -+ } -+ EVP_CIPHER_CTX_init(ctx); -+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -+ EVP_CIPHER_CTX_set_padding(ctx, 0); - - /* - * The default implementation adds a whole block of padding if the input -@@ -198,7 +199,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - { - /* Error */ - *bytes_written = 0; -- return; - } - else - { -@@ -206,16 +206,17 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - - if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) - { -+ /* Error */ - *bytes_written = 0; -- return; /* Error */ - } - else - { - /* Success */ - *bytes_written += tmplen; -- EVP_CIPHER_CTX_cleanup(ctx); - } - } -+ /* performs cleanup and free */ -+ EVP_CIPHER_CTX_free(ctx); - } - - -@@ -243,13 +244,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - uint32_t * bytes_written) - { - EVP_CIPHER_CTX *ctx = NULL; -- ctx = EVP_CIPHER_CTX_new(); -- if (ctx == NULL) { -- *bytes_written = 0; -- return; -- } -- EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -- EVP_CIPHER_CTX_set_padding(ctx, 0); - - if (verbose >= 5) - { -@@ -258,12 +252,20 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - printbuf(input, input_length, "decrypting this data"); - } - -- - *bytes_written = 0; - - if (input_length == 0) - return; - -+ ctx = EVP_CIPHER_CTX_new(); -+ if (ctx == NULL) { -+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); -+ return; -+ } -+ EVP_CIPHER_CTX_init(ctx); -+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -+ EVP_CIPHER_CTX_set_padding(ctx, 0); -+ - /* - * The default implementation adds a whole block of padding if the input - * data is perfectly aligned. We would like to keep that from happening. -@@ -277,7 +279,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - /* Error */ - lprintf(LOG_DEBUG, "ERROR: decrypt update failed"); - *bytes_written = 0; -- return; - } - else - { -@@ -285,20 +286,21 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - - if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) - { -+ /* Error */ - char buffer[1000]; - ERR_error_string(ERR_get_error(), buffer); - lprintf(LOG_DEBUG, "the ERR error %s", buffer); - lprintf(LOG_DEBUG, "ERROR: decrypt final failed"); - *bytes_written = 0; -- return; /* Error */ - } - else - { - /* Success */ - *bytes_written += tmplen; -- EVP_CIPHER_CTX_cleanup(ctx); - } - } -+ /* performs cleanup and free */ -+ EVP_CIPHER_CTX_free(ctx); - - if (verbose >= 5) - { diff --git a/packages/admin/ipmitool/patches/0005-ipmitool-Fix-compile-with-deprecated-APIs-disabled.patch b/packages/admin/ipmitool/patches/0005-ipmitool-Fix-compile-with-deprecated-APIs-disabled.patch deleted file mode 100644 index 30807918..00000000 --- a/packages/admin/ipmitool/patches/0005-ipmitool-Fix-compile-with-deprecated-APIs-disabled.patch +++ /dev/null @@ -1,42 +0,0 @@ -From cf39da53236abf02d39c6a98a645488933f3e861 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Tue, 21 Aug 2018 19:29:07 -0700 -Subject: [PATCH] ipmitool: Fix compile with deprecated APIs disabled. - -From the man page: - -EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0. As a result, -EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared. -EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset(). - -Signed-off-by: Rosen Penev ---- - src/plugins/lanplus/lanplus_crypt_impl.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/src/plugins/lanplus/lanplus_crypt_impl.c -+++ b/src/plugins/lanplus/lanplus_crypt_impl.c -@@ -183,7 +183,11 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); - return; - } -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - EVP_CIPHER_CTX_init(ctx); -+#else -+ EVP_CIPHER_CTX_reset(ctx); -+#endif - EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); - EVP_CIPHER_CTX_set_padding(ctx, 0); - -@@ -262,7 +266,11 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); - return; - } -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - EVP_CIPHER_CTX_init(ctx); -+#else -+ EVP_CIPHER_CTX_reset(ctx); -+#endif - EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); - EVP_CIPHER_CTX_set_padding(ctx, 0); - diff --git a/packages/admin/ipmitool/patches/0006-CVE-2020-5208-fru-Fix-buffer-overflow-vulnerabilities.patch b/packages/admin/ipmitool/patches/0006-CVE-2020-5208-fru-Fix-buffer-overflow-vulnerabilities.patch deleted file mode 100644 index 17341c98..00000000 --- a/packages/admin/ipmitool/patches/0006-CVE-2020-5208-fru-Fix-buffer-overflow-vulnerabilities.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 960dbb956d9f9cb05b719087faed53c88dc80956 Mon Sep 17 00:00:00 2001 -From: Chrostoper Ertl -Date: Thu, 28 Nov 2019 16:33:59 +0000 -Subject: [PATCH 06/11] fru: Fix buffer overflow vulnerabilities - -Partial fix for CVE-2020-5208, see -https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp - -The `read_fru_area_section` function only performs size validation of -requested read size, and falsely assumes that the IPMI message will not -respond with more than the requested amount of data; it uses the -unvalidated response size to copy into `frubuf`. If the response is -larger than the request, this can result in overflowing the buffer. - -The same issue affects the `read_fru_area` function. ---- - lib/ipmi_fru.c | 33 +++++++++++++++++++++++++++++++-- - 1 file changed, 31 insertions(+), 2 deletions(-) - ---- a/lib/ipmi_fru.c -+++ b/lib/ipmi_fru.c -@@ -615,7 +615,10 @@ int - read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, - uint32_t offset, uint32_t length, uint8_t *frubuf) - { -- uint32_t off = offset, tmp, finish; -+ uint32_t off = offset; -+ uint32_t tmp; -+ uint32_t finish; -+ uint32_t size_left_in_buffer; - struct ipmi_rs * rsp; - struct ipmi_rq req; - uint8_t msg_data[4]; -@@ -628,10 +631,12 @@ read_fru_area(struct ipmi_intf * intf, s - - finish = offset + length; - if (finish > fru->size) { -+ memset(frubuf + fru->size, 0, length - fru->size); - finish = fru->size; - lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " - "Adjusting to %d", - offset + length, finish - offset); -+ length = finish - offset; - } - - memset(&req, 0, sizeof(req)); -@@ -667,6 +672,7 @@ read_fru_area(struct ipmi_intf * intf, s - } - } - -+ size_left_in_buffer = length; - do { - tmp = fru->access ? off >> 1 : off; - msg_data[0] = id; -@@ -707,9 +713,18 @@ read_fru_area(struct ipmi_intf * intf, s - } - - tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; -+ if(rsp->data_len < 1 -+ || tmp > rsp->data_len - 1 -+ || tmp > size_left_in_buffer) -+ { -+ printf(" Not enough buffer size"); -+ return -1; -+ } -+ - memcpy(frubuf, rsp->data + 1, tmp); - off += tmp; - frubuf += tmp; -+ size_left_in_buffer -= tmp; - /* sometimes the size returned in the Info command - * is too large. return 0 so higher level function - * still attempts to parse what was returned */ -@@ -742,7 +757,9 @@ read_fru_area_section(struct ipmi_intf * - uint32_t offset, uint32_t length, uint8_t *frubuf) - { - static uint32_t fru_data_rqst_size = 20; -- uint32_t off = offset, tmp, finish; -+ uint32_t off = offset; -+ uint32_t tmp, finish; -+ uint32_t size_left_in_buffer; - struct ipmi_rs * rsp; - struct ipmi_rq req; - uint8_t msg_data[4]; -@@ -755,10 +772,12 @@ read_fru_area_section(struct ipmi_intf * - - finish = offset + length; - if (finish > fru->size) { -+ memset(frubuf + fru->size, 0, length - fru->size); - finish = fru->size; - lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " - "Adjusting to %d", - offset + length, finish - offset); -+ length = finish - offset; - } - - memset(&req, 0, sizeof(req)); -@@ -773,6 +792,8 @@ read_fru_area_section(struct ipmi_intf * - if (fru->access && fru_data_rqst_size > 16) - #endif - fru_data_rqst_size = 16; -+ -+ size_left_in_buffer = length; - do { - tmp = fru->access ? off >> 1 : off; - msg_data[0] = id; -@@ -804,8 +825,16 @@ read_fru_area_section(struct ipmi_intf * - } - - tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; -+ if(rsp->data_len < 1 -+ || tmp > rsp->data_len - 1 -+ || tmp > size_left_in_buffer) -+ { -+ printf(" Not enough buffer size"); -+ return -1; -+ } - memcpy((frubuf + off)-offset, rsp->data + 1, tmp); - off += tmp; -+ size_left_in_buffer -= tmp; - - /* sometimes the size returned in the Info command - * is too large. return 0 so higher level function diff --git a/packages/admin/ipmitool/patches/0007-CVE-2020-5208-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch b/packages/admin/ipmitool/patches/0007-CVE-2020-5208-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch deleted file mode 100644 index 2656dfcc..00000000 --- a/packages/admin/ipmitool/patches/0007-CVE-2020-5208-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 910e5782b7d9f222d4e34d3505d0d636ff757103 Mon Sep 17 00:00:00 2001 -From: Chrostoper Ertl -Date: Thu, 28 Nov 2019 16:44:18 +0000 -Subject: [PATCH 07/11] fru: Fix buffer overflow in ipmi_spd_print_fru - -Partial fix for CVE-2020-5208, see -https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp - -The `ipmi_spd_print_fru` function has a similar issue as the one fixed -by the previous commit in `read_fru_area_section`. An initial request is -made to get the `fru.size`, which is used as the size for the allocation -of `spd_data`. Inside a loop, further requests are performed to get the -copy sizes which are not checked before being used as the size for a -copy into the buffer. ---- - lib/dimm_spd.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - ---- a/lib/dimm_spd.c -+++ b/lib/dimm_spd.c -@@ -1621,7 +1621,7 @@ ipmi_spd_print_fru(struct ipmi_intf * in - struct ipmi_rq req; - struct fru_info fru; - uint8_t *spd_data, msg_data[4]; -- int len, offset; -+ uint32_t len, offset; - - msg_data[0] = id; - -@@ -1697,6 +1697,13 @@ ipmi_spd_print_fru(struct ipmi_intf * in - } - - len = rsp->data[0]; -+ if(rsp->data_len < 1 -+ || len > rsp->data_len - 1 -+ || len > fru.size - offset) -+ { -+ printf(" Not enough buffer size"); -+ return -1; -+ } - memcpy(&spd_data[offset], rsp->data + 1, len); - offset += len; - } while (offset < fru.size); diff --git a/packages/admin/ipmitool/patches/0008-CVE-2020-5208-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch b/packages/admin/ipmitool/patches/0008-CVE-2020-5208-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch deleted file mode 100644 index 00ecd427..00000000 --- a/packages/admin/ipmitool/patches/0008-CVE-2020-5208-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4f7778ed232a92bde388f38917b94f458a82c78e Mon Sep 17 00:00:00 2001 -From: Chrostoper Ertl -Date: Thu, 28 Nov 2019 16:51:49 +0000 -Subject: [PATCH 08/11] session: Fix buffer overflow in ipmi_get_session_info - -Partial fix for CVE-2020-5208, see -https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp - -The `ipmi_get_session_info` function does not properly check the -response `data_len`, which is used as a copy size, allowing stack buffer -overflow. ---- - lib/ipmi_session.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - ---- a/lib/ipmi_session.c -+++ b/lib/ipmi_session.c -@@ -309,8 +309,10 @@ ipmi_get_session_info(struct ipmi_intf - } - else - { -- memcpy(&session_info, rsp->data, rsp->data_len); -- print_session_info(&session_info, rsp->data_len); -+ memcpy(&session_info, rsp->data, -+ __min(rsp->data_len, sizeof(session_info))); -+ print_session_info(&session_info, -+ __min(rsp->data_len, sizeof(session_info))); - } - break; - -@@ -341,8 +343,10 @@ ipmi_get_session_info(struct ipmi_intf - break; - } - -- memcpy(&session_info, rsp->data, rsp->data_len); -- print_session_info(&session_info, rsp->data_len); -+ memcpy(&session_info, rsp->data, -+ __min(rsp->data_len, sizeof(session_info))); -+ print_session_info(&session_info, -+ __min(rsp->data_len, sizeof(session_info))); - - } while (i <= session_info.session_slot_count); - break; diff --git a/packages/admin/ipmitool/patches/0009-CVE-2020-5208-channel-Fix-buffer-overflow.patch b/packages/admin/ipmitool/patches/0009-CVE-2020-5208-channel-Fix-buffer-overflow.patch deleted file mode 100644 index e4ea7734..00000000 --- a/packages/admin/ipmitool/patches/0009-CVE-2020-5208-channel-Fix-buffer-overflow.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 743dd4faa302f22950e4438cf684e1e398eb47eb Mon Sep 17 00:00:00 2001 -From: Chrostoper Ertl -Date: Thu, 28 Nov 2019 16:56:38 +0000 -Subject: [PATCH 09/11] channel: Fix buffer overflow -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Partial fix for CVE-2020-5208, see -https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp - -The `ipmi_get_channel_cipher_suites` function does not properly check -the final response’s `data_len`, which can lead to stack buffer overflow -on the final copy. ---- - lib/ipmi_channel.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/lib/ipmi_channel.c -+++ b/lib/ipmi_channel.c -@@ -413,7 +413,10 @@ ipmi_get_channel_cipher_suites(struct ip - lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites"); - return -1; - } -- if (rsp->ccode > 0) { -+ if (rsp->ccode -+ || rsp->data_len < 1 -+ || rsp->data_len > sizeof(uint8_t) + 0x10) -+ { - lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s", - val2str(rsp->ccode, completion_code_vals)); - return -1; diff --git a/packages/admin/ipmitool/patches/0010-CVE-2020-5208-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch b/packages/admin/ipmitool/patches/0010-CVE-2020-5208-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch deleted file mode 100644 index cf33f9d9..00000000 --- a/packages/admin/ipmitool/patches/0010-CVE-2020-5208-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch +++ /dev/null @@ -1,83 +0,0 @@ -From e048e9c65a52f0879d482531e70735c1d314d43a Mon Sep 17 00:00:00 2001 -From: Chrostoper Ertl -Date: Thu, 28 Nov 2019 17:06:39 +0000 -Subject: [PATCH 10/11] lanp: Fix buffer overflows in get_lan_param_select -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Partial fix for CVE-2020-5208, see -https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp - -The `get_lan_param_select` function is missing a validation check on the -response’s `data_len`, which it then returns to caller functions, where -stack buffer overflow can occur. ---- - lib/ipmi_lanp.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - ---- a/lib/ipmi_lanp.c -+++ b/lib/ipmi_lanp.c -@@ -1809,7 +1809,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in - if (p == NULL) { - return (-1); - } -- memcpy(data, p->data, p->data_len); -+ memcpy(data, p->data, __min(p->data_len, sizeof(data))); - /* set new ipaddr */ - memcpy(data+3, temp, 4); - printf("Setting LAN Alert %d IP Address to %d.%d.%d.%d\n", alert, -@@ -1824,7 +1824,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in - if (p == NULL) { - return (-1); - } -- memcpy(data, p->data, p->data_len); -+ memcpy(data, p->data, __min(p->data_len, sizeof(data))); - /* set new macaddr */ - memcpy(data+7, temp, 6); - printf("Setting LAN Alert %d MAC Address to " -@@ -1838,7 +1838,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in - if (p == NULL) { - return (-1); - } -- memcpy(data, p->data, p->data_len); -+ memcpy(data, p->data, __min(p->data_len, sizeof(data))); - - if (strncasecmp(argv[1], "def", 3) == 0 || - strncasecmp(argv[1], "default", 7) == 0) { -@@ -1864,7 +1864,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in - if (p == NULL) { - return (-1); - } -- memcpy(data, p->data, p->data_len); -+ memcpy(data, p->data, __min(p->data_len, sizeof(data))); - - if (strncasecmp(argv[1], "on", 2) == 0 || - strncasecmp(argv[1], "yes", 3) == 0) { -@@ -1889,7 +1889,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in - if (p == NULL) { - return (-1); - } -- memcpy(data, p->data, p->data_len); -+ memcpy(data, p->data, __min(p->data_len, sizeof(data))); - - if (strncasecmp(argv[1], "pet", 3) == 0) { - printf("Setting LAN Alert %d destination to PET Trap\n", alert); -@@ -1917,7 +1917,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in - if (p == NULL) { - return (-1); - } -- memcpy(data, p->data, p->data_len); -+ memcpy(data, p->data, __min(p->data_len, sizeof(data))); - - if (str2uchar(argv[1], &data[2]) != 0) { - lprintf(LOG_ERR, "Invalid time: %s", argv[1]); -@@ -1933,7 +1933,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in - if (p == NULL) { - return (-1); - } -- memcpy(data, p->data, p->data_len); -+ memcpy(data, p->data, __min(p->data_len, sizeof(data))); - - if (str2uchar(argv[1], &data[3]) != 0) { - lprintf(LOG_ERR, "Invalid retry: %s", argv[1]); diff --git a/packages/admin/ipmitool/patches/0011-CVE-2020-5208-fru-sdr-Fix-id_string-buffer-overflows.patch b/packages/admin/ipmitool/patches/0011-CVE-2020-5208-fru-sdr-Fix-id_string-buffer-overflows.patch deleted file mode 100644 index 2fd34d18..00000000 --- a/packages/admin/ipmitool/patches/0011-CVE-2020-5208-fru-sdr-Fix-id_string-buffer-overflows.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 98b47424cf548f58c4d295fa8235210406ea85ca Mon Sep 17 00:00:00 2001 -From: Chrostoper Ertl -Date: Thu, 28 Nov 2019 17:13:45 +0000 -Subject: [PATCH 11/11] fru, sdr: Fix id_string buffer overflows - -Final part of the fixes for CVE-2020-5208, see -https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp - -9 variants of stack buffer overflow when parsing `id_string` field of -SDR records returned from `CMD_GET_SDR` command. - -SDR record structs have an `id_code` field, and an `id_string` `char` -array. - -The length of `id_string` is calculated as `(id_code & 0x1f) + 1`, -which can be larger than expected 16 characters (if `id_code = 0xff`, -then length will be `(0xff & 0x1f) + 1 = 32`). - -In numerous places, this can cause stack buffer overflow when copying -into fixed buffer of size `17` bytes from this calculated length. ---- - lib/ipmi_fru.c | 2 +- - lib/ipmi_sdr.c | 40 ++++++++++++++++++++++++---------------- - 2 files changed, 25 insertions(+), 17 deletions(-) - ---- a/lib/ipmi_fru.c -+++ b/lib/ipmi_fru.c -@@ -3062,7 +3062,7 @@ ipmi_fru_print(struct ipmi_intf * intf, - return 0; - - memset(desc, 0, sizeof(desc)); -- memcpy(desc, fru->id_string, fru->id_code & 0x01f); -+ memcpy(desc, fru->id_string, __min(fru->id_code & 0x01f, sizeof(desc))); - desc[fru->id_code & 0x01f] = 0; - printf("FRU Device Description : %s (ID %d)\n", desc, fru->device_id); - ---- a/lib/ipmi_sdr.c -+++ b/lib/ipmi_sdr.c -@@ -2084,7 +2084,7 @@ ipmi_sdr_print_sensor_eventonly(struct i - return -1; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (sensor->id_code & 0x1f) + 1, sensor->id_string); - - if (verbose) { - printf("Sensor ID : %s (0x%x)\n", -@@ -2135,7 +2135,7 @@ ipmi_sdr_print_sensor_mc_locator(struct - return -1; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (mc->id_code & 0x1f) + 1, "%s", mc->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (mc->id_code & 0x1f) + 1, mc->id_string); - - if (verbose == 0) { - if (csv_output) -@@ -2228,7 +2228,7 @@ ipmi_sdr_print_sensor_generic_locator(st - char desc[17]; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (dev->id_code & 0x1f) + 1, "%s", dev->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (dev->id_code & 0x1f) + 1, dev->id_string); - - if (!verbose) { - if (csv_output) -@@ -2285,7 +2285,7 @@ ipmi_sdr_print_sensor_fru_locator(struct - char desc[17]; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (fru->id_code & 0x1f) + 1, "%s", fru->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (fru->id_code & 0x1f) + 1, fru->id_string); - - if (!verbose) { - if (csv_output) -@@ -2489,35 +2489,43 @@ ipmi_sdr_print_name_from_rawentry(struct - - int rc =0; - char desc[17]; -+ const char *id_string; -+ uint8_t id_code; - memset(desc, ' ', sizeof (desc)); - - switch ( type) { - case SDR_RECORD_TYPE_FULL_SENSOR: - record.full = (struct sdr_record_full_sensor *) raw; -- snprintf(desc, (record.full->id_code & 0x1f) +1, "%s", -- (const char *)record.full->id_string); -+ id_code = record.full->id_code; -+ id_string = record.full->id_string; - break; -+ - case SDR_RECORD_TYPE_COMPACT_SENSOR: - record.compact = (struct sdr_record_compact_sensor *) raw ; -- snprintf(desc, (record.compact->id_code & 0x1f) +1, "%s", -- (const char *)record.compact->id_string); -+ id_code = record.compact->id_code; -+ id_string = record.compact->id_string; - break; -+ - case SDR_RECORD_TYPE_EVENTONLY_SENSOR: - record.eventonly = (struct sdr_record_eventonly_sensor *) raw ; -- snprintf(desc, (record.eventonly->id_code & 0x1f) +1, "%s", -- (const char *)record.eventonly->id_string); -- break; -+ id_code = record.eventonly->id_code; -+ id_string = record.eventonly->id_string; -+ break; -+ - case SDR_RECORD_TYPE_MC_DEVICE_LOCATOR: - record.mcloc = (struct sdr_record_mc_locator *) raw ; -- snprintf(desc, (record.mcloc->id_code & 0x1f) +1, "%s", -- (const char *)record.mcloc->id_string); -+ id_code = record.mcloc->id_code; -+ id_string = record.mcloc->id_string; - break; -+ - default: - rc = -1; -- break; -- } -+ } -+ if (!rc) { -+ snprintf(desc, sizeof(desc), "%.*s", (id_code & 0x1f) + 1, id_string); -+ } - -- lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); -+ lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); - return rc; - } - diff --git a/packages/admin/ipmitool/patches/0012-gcc10.patch b/packages/admin/ipmitool/patches/0012-gcc10.patch deleted file mode 100644 index 1fba0b79..00000000 --- a/packages/admin/ipmitool/patches/0012-gcc10.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c3939dac2c060651361fc71516806f9ab8c38901 Mon Sep 17 00:00:00 2001 -From: Vaclav Dolezal -Date: Thu, 23 Jan 2020 11:26:32 +0100 -Subject: [PATCH] hpmfwupg: move variable definition to .c file - -Signed-off-by: Vaclav Dolezal ---- - include/ipmitool/ipmi_hpmfwupg.h | 2 +- - lib/ipmi_hpmfwupg.c | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - ---- a/include/ipmitool/ipmi_hpmfwupg.h -+++ b/include/ipmitool/ipmi_hpmfwupg.h -@@ -800,7 +800,7 @@ typedef struct _VERSIONINFO { - char descString[HPMFWUPG_DESC_STRING_LENGTH + 1]; - }VERSIONINFO, *PVERSIONINFO; - --VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX]; -+extern VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX]; - - #define TARGET_VER (0x01) - #define ROLLBACK_VER (0x02) ---- a/lib/ipmi_hpmfwupg.c -+++ b/lib/ipmi_hpmfwupg.c -@@ -58,6 +58,8 @@ ipmi_intf_get_max_request_data_size(stru - - extern int verbose; - -+VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX]; -+ - int HpmfwupgUpgrade(struct ipmi_intf *intf, char *imageFilename, - int activate, int, int); - int HpmfwupgValidateImageIntegrity(struct HpmfwupgUpgradeCtx *pFwupgCtx); diff --git a/packages/admin/monit/Makefile b/packages/admin/monit/Makefile deleted file mode 100644 index dd97f312..00000000 --- a/packages/admin/monit/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=monit -PKG_VERSION:=5.34.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://bitbucket.org/tildeslash/monit/downloads/ -PKG_HASH:=37f514cd8973bbce104cb8517ff3fc504052a083703eee0d0e873db26b919820 - -PKG_MAINTAINER:=Yaroslav Petrov -PKG_LICENSE:=AGPL-3.0 -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:tildeslash:monit - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/monit/Default - SECTION:=admin - CATEGORY:=Administration - DEPENDS:= +libpthread +zlib - TITLE:=System services monitoring utility - URL:=https://mmonit.com/monit/ -endef - -define Package/monit/Default/description - An utility for monitoring services on a Unix system -endef - -define Package/monit -$(call Package/monit/Default) - DEPENDS+= +libopenssl - TITLE+= (with SSL support) - VARIANT:=ssl -endef - -define Package/monit/description -$(call Package/monit/Default/description) - This package is built with SSL support. -endef - -define Package/monit-nossl -$(call Package/monit/Default) - TITLE+= (without SSL support) - VARIANT:=nossl -endef - -define Package/monit-nossl/description -$(call Package/monit/Default/description) - This package is built without SSL support. -endef - -CONFIGURE_ARGS += \ - --with-piddir="/var/run" \ - --without-pam \ - ac_cv_ipv6=$(if $(CONFIG_IPV6),yes,no) \ - libmonit_cv_setjmp_available=yes \ - libmonit_cv_vsnprintf_c99_conformant=yes - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-ssl \ - --with-ssl-dir="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --without-ssl -endif - -define Build/Prepare - $(Build/Prepare/Default) - (cd $(PKG_BUILD_DIR) && ./bootstrap) -endef - -define Package/monit/conffiles -/etc/monitrc -endef - -define Package/monit/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/ -endef - -Package/monit-nossl/conffiles = $(Package/monit/conffiles) -Package/monit-nossl/install = $(Package/monit/install) - -$(eval $(call BuildPackage,monit)) -$(eval $(call BuildPackage,monit-nossl)) diff --git a/packages/admin/monit/files/monit.init b/packages/admin/monit/files/monit.init deleted file mode 100644 index 2bb36092..00000000 --- a/packages/admin/monit/files/monit.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=60 -USE_PROCD=1 -PROG=/usr/bin/monit - -start_service() { - [ -f /etc/monitrc ] || { echo "monit: /etc/monitrc is missing"; return 1; } - chmod 0600 /etc/monitrc - procd_open_instance - # -I runs in foreground, as procd requires - procd_set_param command "$PROG" -I - procd_close_instance -} diff --git a/packages/admin/muninlite/Makefile b/packages/admin/muninlite/Makefile deleted file mode 100644 index d7f0918b..00000000 --- a/packages/admin/muninlite/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=muninlite -PKG_VERSION:=2.1.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/munin-monitoring/$(PKG_NAME)/releases/download/$(PKG_VERSION)/ -PKG_HASH:=5a49da30944f3b85a0030b661a27e84c06c7f640050802e799304b11cc635ffc - -PKG_MAINTAINER:=Jonathan McCrohan -PKG_LICENSE:=GPL-2.0-or-later -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/muninlite - SECTION:=admin - CATEGORY:=Administration - DEPENDS:=+xinetd - TITLE:=Munin node implemented in shell - URL:=https://github.com/munin-monitoring/muninlite -endef - -define Package/muninlite/Default/description - Munin node implemented in shell. - Munin is a monitoring system for Unix networks. -endef - -define Package/muninlite/install - $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/muninlite $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/xinetd.d - $(INSTALL_DATA) ./files/etc/xinetd.d/muninlite $(1)/etc/xinetd.d/ - $(INSTALL_DIR) $(1)/etc/munin/plugins -endef - -define Package/muninlite/conffiles -/etc/xinetd.d/muninlite -endef - -$(eval $(call BuildPackage,muninlite)) diff --git a/packages/admin/muninlite/files/etc/xinetd.d/muninlite b/packages/admin/muninlite/files/etc/xinetd.d/muninlite deleted file mode 100644 index 450a80d3..00000000 --- a/packages/admin/muninlite/files/etc/xinetd.d/muninlite +++ /dev/null @@ -1,10 +0,0 @@ -service munin -{ - socket_type = stream - protocol = tcp - wait = no - user = root - group = root - server = /usr/sbin/muninlite - disable = no -} diff --git a/packages/admin/netatop/Makefile b/packages/admin/netatop/Makefile deleted file mode 100644 index aca607d8..00000000 --- a/packages/admin/netatop/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=netatop -PKG_RELEASE:=1 -PKG_VERSION:=3.1 -PKG_LICENSE:=GPL-2.0 -PKG_SOURCE_URL:=https://www.atoptool.nl/download/ -PKG_HASH:=736f43572c31a90748f023f0a5a814bff58d44c0c3f060d776cfd6e6e8435c62 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MAINTAINER:=Toni Uhlig - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/kernel.mk - -define KernelPackage/netatop - URL:=https://www.atoptool.nl/ - CATEGORY:=Kernel modules - SUBMENU:=Netfilter Extensions - TITLE:=netatop netfilter module - FILES:= \ - $(PKG_BUILD_DIR)/module/netatop.$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoProbe,netatop) -endef - -define KernelPackage/netatop/description - The optional kernel module netatop can be loaded to gather statistics about - the TCP and UDP packets that have been transmitted/received per process and - per thread. As soon as atop discovers that this module is active, it shows - the columns SNET and RNET in the generic screen for the number of transmitted - and received packets per process. When the 'n' key is pressed, it shows - detailed counters about the number packets transmitted/received via TCP and - UDP, the average sizes of these packets, and the total bandwidth consumed - for input and output per process/thread. -endef - -define Package/netatop - SECTION:=admin - CATEGORY:=Administration - TITLE:=network counter for atop - DEPENDS:=+zlib +kmod-netatop - URL:=https://www.atoptool.nl/ -endef - -define Package/netatop/description - The daemon netatopd is packaged with the netatop kernel module. This - daemon takes care that information is gathered about processes that are - finished. For every finished process that has transferred network packets, - a binary record is written to a dedicated logfile. The added records in the - logfile are read by atop with every sample to show information about the - network activity of finished processes as well. -endef - -NETATOP_KMOD_MAKEOPTS= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - KERNDIR="$(LINUX_DIR)" -NETATOP_DAEMON_MAKEOPTS= \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" - -define Build/Compile/netatop - $(MAKE) -C $(PKG_BUILD_DIR)/module \ - $(NETATOP_KMOD_MAKEOPTS) \ - netatop.$(LINUX_KMOD_SUFFIX) - $(MAKE) -C $(PKG_BUILD_DIR)/daemon \ - $(NETATOP_DAEMON_MAKEOPTS) \ - all -endef - -define Build/Compile - $(call Build/Compile/netatop) -endef - -define Package/netatop/install - $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon/netatopd $(1)/usr/sbin/ -endef - -$(eval $(call KernelPackage,netatop)) -$(eval $(call BuildPackage,netatop)) diff --git a/packages/admin/netatop/patches/010-daemon-makefile-ldflags.patch b/packages/admin/netatop/patches/010-daemon-makefile-ldflags.patch deleted file mode 100644 index 5a9adc50..00000000 --- a/packages/admin/netatop/patches/010-daemon-makefile-ldflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/daemon/Makefile -+++ b/daemon/Makefile -@@ -6,7 +6,7 @@ THISDIR = $(shell pwd) - all: netatopd - - netatopd: netatopd.o Makefile -- $(CC) netatopd.o -o netatopd -lz -+ $(CC) $(LDFLAGS) netatopd.o -o netatopd -lz - - clean: - rm -f *.o netatopd diff --git a/packages/admin/netatop/patches/100-fix-compilation-warning-fallthrough.patch b/packages/admin/netatop/patches/100-fix-compilation-warning-fallthrough.patch deleted file mode 100644 index 65de31e1..00000000 --- a/packages/admin/netatop/patches/100-fix-compilation-warning-fallthrough.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/module/netatop.c -+++ b/module/netatop.c -@@ -1617,7 +1617,7 @@ getsockopt(struct sock *sk, int cmd, void __user *user, int *len) - - case NETATOP_GETCNT_TGID: - tasktype = 'g'; -- // fall through -+ fallthrough; - case NETATOP_GETCNT_PID: - if (*len < sizeof(pid_t)) - return -EINVAL; diff --git a/packages/admin/netdata/Makefile b/packages/admin/netdata/Makefile deleted file mode 100644 index 1f07ddd9..00000000 --- a/packages/admin/netdata/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=netdata -PKG_VERSION:=1.38.1 -PKG_RELEASE:=3 - -PKG_MAINTAINER:=Josef Schlehofer , Daniel Engberg -PKG_LICENSE:=GPL-3.0-or-later -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:my-netdata:netdata - -PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION) -PKG_HASH:=e32a5427f0c00550210dbbf0046c2621313955256edf836db686e2bc270b8d10 -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=protobuf/host -PKG_FIXUP:=autoreconf -PKG_BUILD_FLAGS:=no-mips16 gc-sections - -include $(INCLUDE_DIR)/package.mk - -define Package/netdata - SECTION:=admin - CATEGORY:=Administration - DEPENDS:=+zlib +libuuid +libuv +libmnl +libjson-c +libopenssl \ - +libstdcpp +libatomic +protobuf +openssl-util +curl +bash - TITLE:=Real-time performance monitoring tool - URL:=https://www.netdata.cloud/ -endef - -define Package/netdata/description - netdata is a highly optimized Linux daemon providing real-time performance - monitoring for Linux systems, applications and SNMP devices over the web. - - If you want to use Python plugins install python3, python3-yaml and - python3-urllib3 -endef - -TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 - -CONFIGURE_ARGS += \ - --with-zlib \ - --with-math \ - --disable-x86-sse \ - --enable-lto \ - --disable-ebpf \ - --without-libcap \ - --disable-dbengine \ - --disable-compression \ - --disable-plugin-nfacct \ - --disable-plugin-freeipmi \ - --disable-plugin-cups \ - --disable-plugin-xenstat \ - --disable-exporting-prometheus-remote-write \ - --disable-unit-tests \ - --disable-ml - -define Build/Configure - $(SED) 's/m4_esyscmd(\[git describe .*\])/$(PKG_VERSION)/' $(PKG_BUILD_DIR)/configure.ac - $(Build/Configure/Default) -endef - -define Package/netdata/conffiles -/etc/netdata/ -endef - -define Package/netdata/install - $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d - $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc - $(CP) ./files/netdata.conf $(1)/etc/netdata - touch $(1)/etc/netdata/.opt-out-from-anonymous-statistics - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib - $(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc - $(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdatacli $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata-claim.sh $(1)/usr/sbin - $(INSTALL_DIR) $(1)/usr/share/netdata - $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share - rm $(1)/usr/share/netdata/web/demo*html - rm $(1)/usr/share/netdata/web/fonts/*.svg - rm $(1)/usr/share/netdata/web/fonts/*.ttf - rm $(1)/usr/share/netdata/web/fonts/*.woff - rm $(1)/usr/share/netdata/web/images/*.png - rm $(1)/usr/share/netdata/web/images/*.gif - rm $(1)/usr/share/netdata/web/images/*.ico - rm -rf $(1)/usr/share/netdata/web/old - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata -endef - -$(eval $(call BuildPackage,netdata)) diff --git a/packages/admin/netdata/files/netdata.conf b/packages/admin/netdata/files/netdata.conf deleted file mode 100644 index 4a247daa..00000000 --- a/packages/admin/netdata/files/netdata.conf +++ /dev/null @@ -1,32 +0,0 @@ -# Full configuration can be retrieved from the running -# server at http://localhost:19999/netdata.conf -# -# Example: -# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf -# - -[global] - update every = 2 - memory deduplication (ksm) = no - debug log = syslog - error log = syslog - access log = none - run as user = root - -[web] - allow connections from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.* - allow dashboard from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.* - -[plugins] - cgroups = no - apps = no - charts.d = no - fping = no - node.d = no - python.d = no - -[health] - enabled = no - -[plugin:proc:ipc] - shared memory totals = no diff --git a/packages/admin/netdata/files/netdata.init b/packages/admin/netdata/files/netdata.init deleted file mode 100644 index 06ef6e8b..00000000 --- a/packages/admin/netdata/files/netdata.init +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -USE_PROCD=1 - -APPBINARY=/usr/sbin/netdata -CONFIGFILE=/etc/netdata/netdata.conf - -start_service() { - local cloud_claim_token cloud_claim_rooms - config_get cloud_claim_token "config" "cloud_claim_token" - config_get cloud_claim_rooms "config" "cloud_claim_rooms" - - mkdir -m 0755 -p /var/cache/netdata - chown nobody /var/cache/netdata - mkdir -m 0755 -p /var/lib/netdata - chown nobody /var/lib/netdata - mkdir -m 0755 -p /var/log/netdata - chown nobody /var/log/netdata - - procd_open_instance - procd_set_param command $APPBINARY -D -c $CONFIGFILE - if [ -n "$cloud_claim_token" ] && [ -n "$cloud_claim_rooms" ]; then - procd_append_param command -W "claim -token=$cloud_claim_token -rooms=$cloud_claim_rooms" - fi - procd_set_param file $CONFIGFILE - procd_set_param respawn - procd_close_instance -} diff --git a/packages/admin/netdata/patches/001-disable-plugins-by-default.patch b/packages/admin/netdata/patches/001-disable-plugins-by-default.patch deleted file mode 100644 index a55670b6..00000000 --- a/packages/admin/netdata/patches/001-disable-plugins-by-default.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/collectors/charts.d.plugin/charts.d.conf -+++ b/collectors/charts.d.plugin/charts.d.conf -@@ -30,7 +30,7 @@ - - # the default enable/disable for all charts.d collectors - # the default is "yes" --# enable_all_charts="yes" -+enable_all_charts="no" - - # BY DEFAULT ENABLED MODULES - # ap=yes ---- a/collectors/python.d.plugin/python.d.conf -+++ b/collectors/python.d.plugin/python.d.conf -@@ -7,7 +7,7 @@ - # - - # Enable / disable the whole python.d.plugin (all its modules) --enabled: yes -+enabled: no - - # ---------------------------------------------------------------------- - # Enable / Disable python.d.plugin modules diff --git a/packages/admin/netdata/patches/002-patch-collectors_python.d.plugin_Makefile.am.patch b/packages/admin/netdata/patches/002-patch-collectors_python.d.plugin_Makefile.am.patch deleted file mode 100644 index 29cc33e0..00000000 --- a/packages/admin/netdata/patches/002-patch-collectors_python.d.plugin_Makefile.am.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- a/collectors/python.d.plugin/Makefile.am -+++ b/collectors/python.d.plugin/Makefile.am -@@ -124,109 +124,3 @@ dist_third_party_DATA = \ - python_modules/third_party/monotonic.py \ - python_modules/third_party/filelock.py \ - $(NULL) -- --pythonyaml2dir=$(pythonmodulesdir)/pyyaml2 --dist_pythonyaml2_DATA = \ -- python_modules/pyyaml2/__init__.py \ -- python_modules/pyyaml2/composer.py \ -- python_modules/pyyaml2/constructor.py \ -- python_modules/pyyaml2/cyaml.py \ -- python_modules/pyyaml2/dumper.py \ -- python_modules/pyyaml2/emitter.py \ -- python_modules/pyyaml2/error.py \ -- python_modules/pyyaml2/events.py \ -- python_modules/pyyaml2/loader.py \ -- python_modules/pyyaml2/nodes.py \ -- python_modules/pyyaml2/parser.py \ -- python_modules/pyyaml2/reader.py \ -- python_modules/pyyaml2/representer.py \ -- python_modules/pyyaml2/resolver.py \ -- python_modules/pyyaml2/scanner.py \ -- python_modules/pyyaml2/serializer.py \ -- python_modules/pyyaml2/tokens.py \ -- $(NULL) -- --pythonyaml3dir=$(pythonmodulesdir)/pyyaml3 --dist_pythonyaml3_DATA = \ -- python_modules/pyyaml3/__init__.py \ -- python_modules/pyyaml3/composer.py \ -- python_modules/pyyaml3/constructor.py \ -- python_modules/pyyaml3/cyaml.py \ -- python_modules/pyyaml3/dumper.py \ -- python_modules/pyyaml3/emitter.py \ -- python_modules/pyyaml3/error.py \ -- python_modules/pyyaml3/events.py \ -- python_modules/pyyaml3/loader.py \ -- python_modules/pyyaml3/nodes.py \ -- python_modules/pyyaml3/parser.py \ -- python_modules/pyyaml3/reader.py \ -- python_modules/pyyaml3/representer.py \ -- python_modules/pyyaml3/resolver.py \ -- python_modules/pyyaml3/scanner.py \ -- python_modules/pyyaml3/serializer.py \ -- python_modules/pyyaml3/tokens.py \ -- $(NULL) -- --python_urllib3dir=$(pythonmodulesdir)/urllib3 --dist_python_urllib3_DATA = \ -- python_modules/urllib3/__init__.py \ -- python_modules/urllib3/_collections.py \ -- python_modules/urllib3/connection.py \ -- python_modules/urllib3/connectionpool.py \ -- python_modules/urllib3/exceptions.py \ -- python_modules/urllib3/fields.py \ -- python_modules/urllib3/filepost.py \ -- python_modules/urllib3/response.py \ -- python_modules/urllib3/poolmanager.py \ -- python_modules/urllib3/request.py \ -- $(NULL) -- --python_urllib3_utildir=$(python_urllib3dir)/util --dist_python_urllib3_util_DATA = \ -- python_modules/urllib3/util/__init__.py \ -- python_modules/urllib3/util/connection.py \ -- python_modules/urllib3/util/request.py \ -- python_modules/urllib3/util/response.py \ -- python_modules/urllib3/util/retry.py \ -- python_modules/urllib3/util/selectors.py \ -- python_modules/urllib3/util/ssl_.py \ -- python_modules/urllib3/util/timeout.py \ -- python_modules/urllib3/util/url.py \ -- python_modules/urllib3/util/wait.py \ -- $(NULL) -- --python_urllib3_packagesdir=$(python_urllib3dir)/packages --dist_python_urllib3_packages_DATA = \ -- python_modules/urllib3/packages/__init__.py \ -- python_modules/urllib3/packages/ordered_dict.py \ -- python_modules/urllib3/packages/six.py \ -- $(NULL) -- --python_urllib3_backportsdir=$(python_urllib3_packagesdir)/backports --dist_python_urllib3_backports_DATA = \ -- python_modules/urllib3/packages/backports/__init__.py \ -- python_modules/urllib3/packages/backports/makefile.py \ -- $(NULL) -- --python_urllib3_ssl_match_hostnamedir=$(python_urllib3_packagesdir)/ssl_match_hostname --dist_python_urllib3_ssl_match_hostname_DATA = \ -- python_modules/urllib3/packages/ssl_match_hostname/__init__.py \ -- python_modules/urllib3/packages/ssl_match_hostname/_implementation.py \ -- $(NULL) -- --python_urllib3_contribdir=$(python_urllib3dir)/contrib --dist_python_urllib3_contrib_DATA = \ -- python_modules/urllib3/contrib/__init__.py \ -- python_modules/urllib3/contrib/appengine.py \ -- python_modules/urllib3/contrib/ntlmpool.py \ -- python_modules/urllib3/contrib/pyopenssl.py \ -- python_modules/urllib3/contrib/securetransport.py \ -- python_modules/urllib3/contrib/socks.py \ -- $(NULL) -- --python_urllib3_securetransportdir=$(python_urllib3_contribdir)/_securetransport --dist_python_urllib3_securetransport_DATA = \ -- python_modules/urllib3/contrib/_securetransport/__init__.py \ -- python_modules/urllib3/contrib/_securetransport/bindings.py \ -- python_modules/urllib3/contrib/_securetransport/low_level.py \ -- $(NULL) diff --git a/packages/admin/netdata/patches/003-patch-collectors_python.d.plugin_python__modules_bases_loaders.py.patch b/packages/admin/netdata/patches/003-patch-collectors_python.d.plugin_python__modules_bases_loaders.py.patch deleted file mode 100644 index 6a686df7..00000000 --- a/packages/admin/netdata/patches/003-patch-collectors_python.d.plugin_python__modules_bases_loaders.py.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/collectors/python.d.plugin/python_modules/bases/loaders.py -+++ b/collectors/python.d.plugin/python_modules/bases/loaders.py -@@ -10,9 +10,9 @@ PY_VERSION = version_info[:2] - - try: - if PY_VERSION > (3, 1): -- from pyyaml3 import SafeLoader as YamlSafeLoader -+ from yaml import SafeLoader as YamlSafeLoader - else: -- from pyyaml2 import SafeLoader as YamlSafeLoader -+ from yaml import SafeLoader as YamlSafeLoader - except ImportError: - from yaml import SafeLoader as YamlSafeLoader - diff --git a/packages/admin/netdata/patches/004-fix-libjudy-compile.patch b/packages/admin/netdata/patches/004-fix-libjudy-compile.patch deleted file mode 100644 index 4a4c6645..00000000 --- a/packages/admin/netdata/patches/004-fix-libjudy-compile.patch +++ /dev/null @@ -1,387 +0,0 @@ ---- a/.gitignore -+++ b/.gitignore -@@ -227,7 +227,3 @@ Session.*.vim - - # Jupyter notebook checkpoints - .ipynb_checkpoints -- --# Judy stuff --JudyLTables.c --judyltablesgen ---- a/Makefile.am -+++ b/Makefile.am -@@ -503,15 +503,10 @@ libjudy_a_SOURCES = libnetdata/libjudy/s - libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c \ - libnetdata/libjudy/src/JudyL/JudyLPrev.c \ - libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c \ -+ libnetdata/libjudy/src/JudyL/JudyLTables.c \ - libnetdata/libjudy/src/JudyHS/JudyHS.c \ - $(NULL) - --nodist_libjudy_a_SOURCES = JudyLTables.c -- --BUILT_SOURCES += JudyLTables.c -- --CLEANFILES += JudyLTables.c -- - libjudy_a_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough - - libnetdata/libjudy/src/JudyL/libjudy_a-JudyLPrev.$(OBJEXT) : CFLAGS += -DJUDYPREV -@@ -521,16 +516,6 @@ libnetdata/libjudy/src/JudyL/libjudy_a-J - libnetdata/libjudy/src/JudyL/libjudy_a-JudyLByCount.$(OBJEXT) : CFLAGS += -DNOSMARTJBB -DNOSMARTJBU -DNOSMARTJLB - libnetdata/libjudy/src/JudyL/libjudy_a-j__udyLGet.$(OBJEXT) : CFLAGS += -DJUDYGETINLINE - --noinst_PROGRAMS = judyltablesgen -- --judyltablesgen_SOURCES = libnetdata/libjudy/src/JudyL/JudyLTablesGen.c --judyltablesgen_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough -- --$(builddir)/judyltablesgen$(EXEEXT) : CFLAGS += -Wno-format -Wno-format-security -- --JudyLTables.c: $(abs_top_srcdir)/libnetdata/libjudy/src/JudyL/JudyLTablesGen.c $(builddir)/judyltablesgen$(EXEEXT) -- $(builddir)/judyltablesgen$(EXEEXT) -- - libjudy_a-JudyLTables.$(OBJEXT) : CFLAGS += -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyL - - if ENABLE_DBENGINE ---- /dev/null -+++ b/libnetdata/libjudy/src/JudyL/JudyLTables.c -@@ -0,0 +1,338 @@ -+// @(#) From generation tool: $Revision: 4.37 $ $Source: /judy/src/JudyCommon/JudyTables.c $ -+// Pregenerated and modified by hand. Do not overwrite! -+ -+#include "JudyL.h" -+// Leave the malloc() sizes readable in the binary (via strings(1)): -+#ifdef JU_64BIT -+const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 13"; -+#else // JU_32BIT -+const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 25"; -+#endif // JU_64BIT -+ -+#ifdef JU_64BIT -+// object uses 64 words -+// cJU_BITSPERSUBEXPB = 32 -+const uint8_t -+j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] = -+{ -+ 0, -+ 3, 5, 7, 11, 11, 15, 15, 23, -+ 23, 23, 23, 32, 32, 32, 32, 32, -+ 47, 47, 47, 47, 47, 47, 47, 64, -+ 64, 64, 64, 64, 64, 64, 64, 64 -+}; -+ -+// object uses 15 words -+// cJL_LEAF1_MAXPOP1 = 13 -+const uint8_t -+j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 3, 5, 5, 7, 7, 11, 11, -+ 11, 15, 15, 15, 15 -+}; -+const uint8_t -+j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 1, 1, 1, 1, 1, 2, 2, -+ 2, 2, 2, 2, 2 -+}; -+ -+// object uses 64 words -+// cJL_LEAF2_MAXPOP1 = 51 -+const uint8_t -+j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 3, 5, 5, 7, 11, 11, 11, -+ 15, 15, 15, 15, 23, 23, 23, 23, -+ 23, 23, 32, 32, 32, 32, 32, 32, -+ 32, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47, 47, 47, 47, 64, 64, 64, -+ 64, 64, 64, 64, 64, 64, 64, 64, -+ 64, 64, 64 -+}; -+const uint8_t -+j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 1, 1, 1, 2, 3, 3, 3, -+ 3, 3, 3, 3, 5, 5, 5, 5, -+ 5, 5, 7, 7, 7, 7, 7, 7, -+ 7, 10, 10, 10, 10, 10, 10, 10, -+ 10, 10, 10, 10, 10, 13, 13, 13, -+ 13, 13, 13, 13, 13, 13, 13, 13, -+ 13, 13, 13 -+}; -+ -+// object uses 64 words -+// cJL_LEAF3_MAXPOP1 = 46 -+const uint8_t -+j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 3, 5, 7, 7, 11, 11, 11, -+ 15, 15, 23, 23, 23, 23, 23, 23, -+ 32, 32, 32, 32, 32, 32, 32, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47, 64, 64, 64, 64, 64, 64, -+ 64, 64, 64, 64, 64, 64 -+}; -+const uint8_t -+j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 1, 2, 2, 2, 3, 3, 3, -+ 4, 4, 6, 6, 6, 6, 6, 6, -+ 9, 9, 9, 9, 9, 9, 9, 13, -+ 13, 13, 13, 13, 13, 13, 13, 13, -+ 13, 13, 18, 18, 18, 18, 18, 18, -+ 18, 18, 18, 18, 18, 18 -+}; -+ -+// object uses 63 words -+// cJL_LEAF4_MAXPOP1 = 42 -+const uint8_t -+j__L_Leaf4PopToWords[cJL_LEAF4_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 3, 5, 7, 11, 11, 11, 15, -+ 15, 15, 23, 23, 23, 23, 23, 32, -+ 32, 32, 32, 32, 32, 47, 47, 47, -+ 47, 47, 47, 47, 47, 47, 47, 63, -+ 63, 63, 63, 63, 63, 63, 63, 63, -+ 63, 63 -+}; -+const uint8_t -+j__L_Leaf4Offset[cJL_LEAF4_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 1, 2, 2, 4, 4, 4, 5, -+ 5, 5, 8, 8, 8, 8, 8, 11, -+ 11, 11, 11, 11, 11, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 21, -+ 21, 21, 21, 21, 21, 21, 21, 21, -+ 21, 21 -+}; -+ -+// object uses 64 words -+// cJL_LEAF5_MAXPOP1 = 39 -+const uint8_t -+j__L_Leaf5PopToWords[cJL_LEAF5_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 5, 5, 7, 11, 11, 15, 15, -+ 15, 23, 23, 23, 23, 23, 32, 32, -+ 32, 32, 32, 47, 47, 47, 47, 47, -+ 47, 47, 47, 47, 64, 64, 64, 64, -+ 64, 64, 64, 64, 64, 64, 64 -+}; -+const uint8_t -+j__L_Leaf5Offset[cJL_LEAF5_MAXPOP1 + 1] = -+{ -+ 0, -+ 2, 2, 2, 3, 4, 4, 6, 6, -+ 6, 9, 9, 9, 9, 9, 12, 12, -+ 12, 12, 12, 18, 18, 18, 18, 18, -+ 18, 18, 18, 18, 25, 25, 25, 25, -+ 25, 25, 25, 25, 25, 25, 25 -+}; -+ -+// object uses 63 words -+// cJL_LEAF6_MAXPOP1 = 36 -+const uint8_t -+j__L_Leaf6PopToWords[cJL_LEAF6_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 5, 7, 7, 11, 11, 15, 15, -+ 23, 23, 23, 23, 23, 32, 32, 32, -+ 32, 32, 47, 47, 47, 47, 47, 47, -+ 47, 47, 63, 63, 63, 63, 63, 63, -+ 63, 63, 63, 63 -+}; -+const uint8_t -+j__L_Leaf6Offset[cJL_LEAF6_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 3, 3, 3, 5, 5, 6, 6, -+ 10, 10, 10, 10, 10, 14, 14, 14, -+ 14, 14, 20, 20, 20, 20, 20, 20, -+ 20, 20, 27, 27, 27, 27, 27, 27, -+ 27, 27, 27, 27 -+}; -+ -+// object uses 64 words -+// cJL_LEAF7_MAXPOP1 = 34 -+const uint8_t -+j__L_Leaf7PopToWords[cJL_LEAF7_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 5, 7, 11, 11, 15, 15, 15, -+ 23, 23, 23, 23, 32, 32, 32, 32, -+ 32, 47, 47, 47, 47, 47, 47, 47, -+ 47, 64, 64, 64, 64, 64, 64, 64, -+ 64, 64 -+}; -+const uint8_t -+j__L_Leaf7Offset[cJL_LEAF7_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 3, 3, 5, 5, 7, 7, 7, -+ 11, 11, 11, 11, 15, 15, 15, 15, -+ 15, 22, 22, 22, 22, 22, 22, 22, -+ 22, 30, 30, 30, 30, 30, 30, 30, -+ 30, 30 -+}; -+ -+// object uses 63 words -+// cJL_LEAFW_MAXPOP1 = 31 -+const uint8_t -+j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 5, 7, 11, 11, 15, 15, 23, -+ 23, 23, 23, 32, 32, 32, 32, 47, -+ 47, 47, 47, 47, 47, 47, 47, 63, -+ 63, 63, 63, 63, 63, 63, 63 -+}; -+const uint8_t -+j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] = -+{ -+ 0, -+ 2, 3, 4, 6, 6, 8, 8, 12, -+ 12, 12, 12, 16, 16, 16, 16, 24, -+ 24, 24, 24, 24, 24, 24, 24, 32, -+ 32, 32, 32, 32, 32, 32, 32 -+}; -+ -+// object uses 64 words -+// cJU_BITSPERSUBEXPL = 64 -+const uint8_t -+j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] = -+{ -+ 0, -+ 3, 3, 3, 5, 5, 7, 7, 11, -+ 11, 11, 11, 15, 15, 15, 15, 23, -+ 23, 23, 23, 23, 23, 23, 23, 32, -+ 32, 32, 32, 32, 32, 32, 32, 32, -+ 47, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47, 47, 47, 47, 47, 47, 64, -+ 64, 64, 64, 64, 64, 64, 64, 64, -+ 64, 64, 64, 64, 64, 64, 64, 64 -+}; -+#else // JU_32BIT -+// object uses 64 words -+// cJU_BITSPERSUBEXPB = 32 -+const uint8_t -+j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] = -+{ -+ 0, -+ 3, 5, 7, 11, 11, 15, 15, 23, -+ 23, 23, 23, 32, 32, 32, 32, 32, -+ 47, 47, 47, 47, 47, 47, 47, 64, -+ 64, 64, 64, 64, 64, 64, 64, 64 -+}; -+ -+// object uses 32 words -+// cJL_LEAF1_MAXPOP1 = 25 -+const uint8_t -+j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 3, 5, 5, 7, 11, 11, 11, -+ 15, 15, 15, 15, 23, 23, 23, 23, -+ 23, 23, 32, 32, 32, 32, 32, 32, -+ 32 -+}; -+const uint8_t -+j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 1, 1, 1, 2, 3, 3, 3, -+ 3, 3, 3, 3, 5, 5, 5, 5, -+ 5, 5, 7, 7, 7, 7, 7, 7, -+ 7 -+}; -+ -+// object uses 63 words -+// cJL_LEAF2_MAXPOP1 = 42 -+const uint8_t -+j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 3, 5, 7, 11, 11, 11, 15, -+ 15, 15, 23, 23, 23, 23, 23, 32, -+ 32, 32, 32, 32, 32, 47, 47, 47, -+ 47, 47, 47, 47, 47, 47, 47, 63, -+ 63, 63, 63, 63, 63, 63, 63, 63, -+ 63, 63 -+}; -+const uint8_t -+j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 1, 2, 2, 4, 4, 4, 5, -+ 5, 5, 8, 8, 8, 8, 8, 11, -+ 11, 11, 11, 11, 11, 16, 16, 16, -+ 16, 16, 16, 16, 16, 16, 16, 21, -+ 21, 21, 21, 21, 21, 21, 21, 21, -+ 21, 21 -+}; -+ -+// object uses 63 words -+// cJL_LEAF3_MAXPOP1 = 36 -+const uint8_t -+j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 5, 7, 7, 11, 11, 15, 15, -+ 23, 23, 23, 23, 23, 32, 32, 32, -+ 32, 32, 47, 47, 47, 47, 47, 47, -+ 47, 47, 63, 63, 63, 63, 63, 63, -+ 63, 63, 63, 63 -+}; -+const uint8_t -+j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] = -+{ -+ 0, -+ 1, 3, 3, 3, 5, 5, 6, 6, -+ 10, 10, 10, 10, 10, 14, 14, 14, -+ 14, 14, 20, 20, 20, 20, 20, 20, -+ 20, 20, 27, 27, 27, 27, 27, 27, -+ 27, 27, 27, 27 -+}; -+ -+// object uses 63 words -+// cJL_LEAFW_MAXPOP1 = 31 -+const uint8_t -+j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] = -+{ -+ 0, -+ 3, 5, 7, 11, 11, 15, 15, 23, -+ 23, 23, 23, 32, 32, 32, 32, 47, -+ 47, 47, 47, 47, 47, 47, 47, 63, -+ 63, 63, 63, 63, 63, 63, 63 -+}; -+const uint8_t -+j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] = -+{ -+ 0, -+ 2, 3, 4, 6, 6, 8, 8, 12, -+ 12, 12, 12, 16, 16, 16, 16, 24, -+ 24, 24, 24, 24, 24, 24, 24, 32, -+ 32, 32, 32, 32, 32, 32, 32 -+}; -+ -+// object uses 32 words -+// cJU_BITSPERSUBEXPL = 32 -+const uint8_t -+j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] = -+{ -+ 0, -+ 3, 3, 3, 5, 5, 7, 7, 11, -+ 11, 11, 11, 15, 15, 15, 15, 23, -+ 23, 23, 23, 23, 23, 23, 23, 32, -+ 32, 32, 32, 32, 32, 32, 32, 32 -+}; -+#endif // JU_64BIT diff --git a/packages/admin/netdata/root/etc/config/netdata b/packages/admin/netdata/root/etc/config/netdata deleted file mode 100644 index ba7d544e..00000000 --- a/packages/admin/netdata/root/etc/config/netdata +++ /dev/null @@ -1,3 +0,0 @@ -config netdata 'config' - option cloud_claim_token '' - option cloud_claim_rooms '' diff --git a/packages/admin/nload/Makefile b/packages/admin/nload/Makefile deleted file mode 100644 index 77abc29c..00000000 --- a/packages/admin/nload/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# SPDX-Identifier-License: GPL-2.0-only - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nload -PKG_VERSION:=0.7.4 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/rolandriegel/nload/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=a73b3a75356776860fc4c40daebce04c5022f73d39704a12fb0aeb88a751216a - -PKG_MAINTAINER:=Jacky Guo -PKG_LICENSE:=GPL-2.0-only -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/nload - SECTION:=admin - CATEGORY:=Administration - TITLE:=A network traffic monitor - DEPENDS:=+libncurses +libstdcpp - URL:=https://github.com/rolandriegel/nload -endef - -define Package/nload/description - Monitors network traffic and bandwidth usage. -endef - -define Package/nload/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nload $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,nload)) diff --git a/packages/admin/nload/test.sh b/packages/admin/nload/test.sh deleted file mode 100644 index 9fbe7902..00000000 --- a/packages/admin/nload/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -nload -h | grep "$PKG_VERSION" diff --git a/packages/admin/nyx/Makefile b/packages/admin/nyx/Makefile deleted file mode 100644 index 1b023337..00000000 --- a/packages/admin/nyx/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=nyx -PKG_VERSION:=2.1.0 -PKG_RELEASE:=3 - -PYPI_NAME:=nyx -PKG_HASH:=88521488d1c9052e457b9e66498a4acfaaa3adf3adc5a199892632f129a5390b - -PKG_MAINTAINER:=Javier Marcet -PKG_LICENSE:=GPL-3.0-only -PKG_LICENSE_FILES:=LICENSE - -include ../../lang/python/pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../../lang/python/python3-package.mk - -define Package/nyx - SECTION:=admin - CATEGORY:=Administration - URL:=https://nyx.torproject.org/ - TITLE:=Terminal status monitor for Tor - DEPENDS:=+python3 +python3-stem -endef - -define Package/nyx/description - Nyx is a command-line monitor for Tor. With this you can get detailed real-time - information about your relay such as bandwidth usage, connections, logs, and - much more. -endef - -$(eval $(call Py3Package,nyx)) -$(eval $(call BuildPackage,nyx)) -$(eval $(call BuildPackage,nyx-src)) diff --git a/packages/admin/nyx/patches/01-python311.patch b/packages/admin/nyx/patches/01-python311.patch deleted file mode 100644 index 36b34932..00000000 --- a/packages/admin/nyx/patches/01-python311.patch +++ /dev/null @@ -1,32 +0,0 @@ -From dcaddf2ab7f9d2ef8649f98bb6870995ebe0b893 Mon Sep 17 00:00:00 2001 -From: Juan Orti Alcaine -Date: Mon, 27 Jun 2022 19:38:34 +0200 -Subject: [PATCH] Replace inspect.getargspec usage to support python 3.11 - ---- - nyx/panel/__init__.py | 2 +- - test/__init__.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/nyx/panel/__init__.py -+++ b/nyx/panel/__init__.py -@@ -78,7 +78,7 @@ class KeyHandler(collections.namedtuple( - is_match = self._key_func(key) if self._key_func else key.match(self.key) - - if is_match: -- if inspect.getargspec(self._action).args == ['key']: -+ if inspect.getfullargspec(self._action).args == ['key']: - self._action(key) - else: - self._action() ---- a/test/__init__.py -+++ b/test/__init__.py -@@ -94,7 +94,7 @@ def render(func, *args, **kwargs): - nyx.curses.CURSES_SCREEN.erase() - start_time = time.time() - -- func_args = inspect.getargspec(func).args -+ func_args = inspect.getfullargspec(func).args - - if func_args[:1] == ['subwindow'] or func_args[:2] == ['self', 'subwindow']: - def _draw(subwindow): diff --git a/packages/admin/openwisp-config/Makefile b/packages/admin/openwisp-config/Makefile deleted file mode 100644 index aadd5fe6..00000000 --- a/packages/admin/openwisp-config/Makefile +++ /dev/null @@ -1,106 +0,0 @@ -# SPDX-Identifier-License: GPL-3.0-only -# -# openwisp.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openwisp-config -PKG_VERSION:=1.1.0 -PKG_RELEASE:=2 - -PKG_MAINTAINER:=Federico Capoano -PKG_LICENSE:=GPL-3.0-or-later - -PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git -PKG_MIRROR_HASH:=c78dc17353c642a6f998531f18e20f0651f946d665506a000308e77c02324a79 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/openwisp-config - TITLE:=Remote configuration management agent - CATEGORY:=Administration - SECTION:=admin - SUBMENU:=openwisp - DEPENDS:=+curl \ - +lua \ - +libuci-lua \ - +luafilesystem \ - +luci-lib-nixio \ - +ca-certificates - PKGARCH:=all - URL:=https://openwisp.org -endef - -define Build/Compile -endef - -define Package/openwisp-config/conffiles -/etc/config/openwisp -/etc/openwisp/ -endef - -define Package/openwisp-config/install - $(INSTALL_DIR) \ - $(1)/usr/sbin \ - $(1)/etc/init.d \ - $(1)/etc/config \ - $(1)/usr/lib/openwisp-config \ - $(1)/usr/lib/lua/openwisp - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \ - $(1)/usr/sbin/openwisp-config - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \ - $(1)/etc/init.d/openwisp-config - - $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.config \ - $(1)/etc/config/openwisp - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \ - $(1)/usr/sbin/openwisp-reload-config - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \ - $(1)/usr/lib/lua/openwisp/utils.lua - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/net.lua \ - $(1)/usr/lib/lua/openwisp/net.lua - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \ - $(1)/usr/sbin/openwisp-store-unmanaged - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \ - $(1)/usr/sbin/openwisp-restore-unmanaged - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \ - $(1)/usr/sbin/openwisp-remove-default-wifi - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \ - $(1)/usr/sbin/openwisp-uci-autoname - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \ - $(1)/usr/sbin/openwisp-update-config - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-get-address.lua \ - $(1)/usr/sbin/openwisp-get-address - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-get-random-number.lua \ - $(1)/usr/sbin/openwisp-get-random-number - - $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/usr/lib/openwisp-config/ -endef - -$(eval $(call BuildPackage,openwisp-config)) diff --git a/packages/admin/openwisp-monitoring/Config.in b/packages/admin/openwisp-monitoring/Config.in deleted file mode 100644 index 5b5bf37f..00000000 --- a/packages/admin/openwisp-monitoring/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -menu "netjson-monitoring Configuration" - -config NETJSON_MONITORING_IWINFO - bool "Enable rpcd-mod-iwinfo" - default y - help - Whether to include the rpcd-mod-iwinfo dependency (enabled by default). - -endmenu diff --git a/packages/admin/openwisp-monitoring/Makefile b/packages/admin/openwisp-monitoring/Makefile deleted file mode 100644 index 64aea233..00000000 --- a/packages/admin/openwisp-monitoring/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -# SPDX-Identifier-License: GPL-3.0-only -# -# openwisp.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openwisp-monitoring -PKG_VERSION:=0.2.0 -PKG_RELEASE:=2 - -PKG_MAINTAINER:=Federico Capoano -PKG_LICENSE:=GPL-3.0-or-later -PKG_LICENSE_FILES:=LICENSE - -PKG_SOURCE_URL:=https://github.com/openwisp/openwrt-openwisp-monitoring.git -PKG_MIRROR_HASH:=6baad2b319cdc072a83547593b447e2c93c42fcdda386f5993c22b88ad991cdd -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKGARCH:=all - -include $(INCLUDE_DIR)/package.mk - -define Package/openwisp-monitoring - TITLE:=OpenWISP Monitoring agent - CATEGORY:=Administration - SECTION:=admin - SUBMENU:=openwisp - DEPENDS:=+netjson-monitoring +openwisp-config - URL:=http://openwisp.org -endef - -define Package/netjson-monitoring - TITLE:=NetJSON Monitoring - CATEGORY:=Administration - SECTION:=admin - SUBMENU:=openwisp - DEPENDS:=+libubus-lua +lua-cjson +rpcd - DEPENDS+=+NETJSON_MONITORING_IWINFO:rpcd-mod-iwinfo - URL:=http://openwisp.org -endef - -define Package/netjson-monitoring/config - source "$(SOURCE)/Config.in" -endef - -define Build/Compile -endef - -define Package/openwisp-monitoring/conffiles -/etc/config/openwisp-monitoring -endef - -define Package/netjson-monitoring/install - $(INSTALL_DIR) \ - $(1)/usr/sbin \ - $(1)/usr/libexec \ - $(1)/usr/lib/lua/openwisp-monitoring \ - $(1)/usr/lib/openwisp-monitoring - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/sbin/netjson-monitoring.lua \ - $(1)/usr/libexec/netjson-monitoring - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/netjson-monitoring \ - $(1)/usr/sbin/netjson-monitoring - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/dhcp.lua \ - $(1)/usr/lib/lua/openwisp-monitoring/dhcp.lua - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/interfaces.lua \ - $(1)/usr/lib/lua/openwisp-monitoring/interfaces.lua - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/monitoring.lua \ - $(1)/usr/lib/lua/openwisp-monitoring/monitoring.lua - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/utils.lua \ - $(1)/usr/lib/lua/openwisp-monitoring/utils.lua - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/neighbors.lua \ - $(1)/usr/lib/lua/openwisp-monitoring/neighbors.lua - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/resources.lua \ - $(1)/usr/lib/lua/openwisp-monitoring/resources.lua - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/wifi.lua \ - $(1)/usr/lib/lua/openwisp-monitoring/wifi.lua - -# Iwinfo is enabled by default unless specified otherwise -ifeq ($(CONFIG_NETJSON_MONITORING_IWINFO), y) - $(CP) $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/iwinfo.lua $(1)/usr/lib/lua/openwisp-monitoring/iwinfo.lua -endif - - $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/usr/lib/openwisp-monitoring/ - -endef - -define Package/openwisp-monitoring/install - $(INSTALL_DIR) \ - $(1)/usr/sbin \ - $(1)/etc/init.d \ - $(1)/etc/config \ - $(1)/usr/lib/openwisp-monitoring \ - $(1)/etc/hotplug.d/openwisp - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.agent \ - $(1)/usr/sbin/openwisp-monitoring - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.init \ - $(1)/etc/init.d/openwisp-monitoring - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/openwisp-monitoring.hotplug \ - $(1)/etc/hotplug.d/openwisp/openwisp-monitoring - - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.config \ - $(1)/etc/config/openwisp-monitoring - -endef - -$(eval $(call BuildPackage,openwisp-monitoring)) -$(eval $(call BuildPackage,netjson-monitoring)) diff --git a/packages/admin/qbee-agent/Makefile b/packages/admin/qbee-agent/Makefile deleted file mode 100755 index 21f8f2a8..00000000 --- a/packages/admin/qbee-agent/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=qbee-agent -PKG_VERSION:=2024.36 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/qbee-io/qbee-agent.git -PKG_SOURCE_VERSION:=d52fb5e69b479550636570a2db6cebe06f5f129b -PKG_MIRROR_HASH:=58b4e7b741754bf86d315eb32e43d4a8b80c8b8f5a95cf94b77f48c193385d60 - -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jon Henrik Bjørnstad - -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_FLAGS:=no-mips16 -PKG_BUILD_PARALLEL:=1 - -GO_PKG:=go.qbee.io/agent -GO_PKG_LDFLAGS_X:= \ - $(GO_PKG)/app.Version=$(PKG_VERSION) \ - $(GO_PKG)/app.Commit=$(PKG_SOURCE_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../../lang/golang/golang-package.mk - -define Package/qbee-agent - SECTION:=admin - CATEGORY:=Administration - TITLE:=qbee.io fleet management agent - URL:=https://qbee.io - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/qbee-agent/description - qbee.io is a SaaS provided fleet management solution. This package - provides the agent that runs on the device and communicates with - the qbee.io server. -endef - -define Package/qbee-agent/install - $(INSTALL_DIR) $(1)/etc/qbee/ppkeys - $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/share/ssl/ca.cert $(1)/etc/qbee/ppkeys/ca.cert - - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/agent $(1)/usr/bin/qbee-agent - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/qbee-agent.init $(1)/etc/init.d/qbee-agent -endef - -$(eval $(call BuildPackage,qbee-agent)) diff --git a/packages/admin/qbee-agent/files/qbee-agent.init b/packages/admin/qbee-agent/files/qbee-agent.init deleted file mode 100755 index c28265cc..00000000 --- a/packages/admin/qbee-agent/files/qbee-agent.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -STOP=11 -USE_PROCD=1 - -ARGS="start" - -start_service() { - if [ ! -f /etc/qbee/qbee-agent.json ]; then - echo "Device seems to not have been bootstrapped. Please run 'qbee-agent bootstrap -k ' as root to bootstrap." - return 0 - fi - - procd_open_instance qbee-agent - procd_set_param command /usr/bin/qbee-agent $ARGS - procd_set_param respawn 3600 60 0 - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_set_param pidfile /var/run/qbee-agent.pid - procd_set_param term_timeout 600 - procd_close_instance -} diff --git a/packages/admin/rsyslog/Config.in b/packages/admin/rsyslog/Config.in deleted file mode 100644 index 6e6b70e4..00000000 --- a/packages/admin/rsyslog/Config.in +++ /dev/null @@ -1,62 +0,0 @@ -if PACKAGE_rsyslog - config RSYSLOG_gssapi_krb5 - bool "Enable GSSAPI Kerberos 5 support" - default n - help - Enable GSSAPI Kerberos 5 support in rsyslog - config RSYSLOG_mysql - bool "Enable MySQL support" - default n - help - Enable MySQL support in rsyslog - config RSYSLOG_pgsql - bool "Enable PostgreSQL support" - default n - help - Enable PostgreSQL support in rsyslog - config RSYSLOG_libdbi - bool "Enable libdbi support" - default n - help - Enable libdbi support in rsyslog - config RSYSLOG_elasticsearch - bool "Enable ElasticSearch module support" - default n - help - Enable ElasticSearch output module in rsyslog - config RSYSLOG_omhttp - bool "Enable HTTP output module support" - default n - help - Enable HTTP output module in rsyslog - config RSYSLOG_openssl - bool "Enable OpenSSL support" - default n - help - Enable OpenSSL support in rsyslog - config RSYSLOG_gnutls - bool "Enable GnuTLS support" - default n - help - Enable GnuTLS support in rsyslog - config RSYSLOG_mail - bool "Enable Mail support" - default n - help - Enable mail support in rsyslog - config RSYSLOG_mmjsonparse - bool "Enable JSON parsing module support" - default n - help - Enable JSON parsing support in rsyslog - config RSYSLOG_mmdblookup - bool "Enable MaxMind DB lookup helper support" - default n - help - Enable MaxMind DB lookup helper support in rsyslog - config RSYSLOG_imfile - bool "Enable file input module support" - default n - help - Enable input file module in rsyslog -endif diff --git a/packages/admin/rsyslog/Makefile b/packages/admin/rsyslog/Makefile deleted file mode 100644 index 1470ce6b..00000000 --- a/packages/admin/rsyslog/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rsyslog -PKG_VERSION:=8.2408.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= \ - https://fossies.org/linux/misc \ - https://www.rsyslog.com/files/download/rsyslog -PKG_HASH:=8bb2f15f9bf9bb7e635182e3d3e370bfc39d08bf35a367dce9714e186f787206 - -PKG_MAINTAINER:= -PKG_LICENSE:=GPL-3.0-or-later -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:rsyslog:rsyslog - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/rsyslog - SECTION:=admin - CATEGORY:=Administration - TITLE:=Enhanced system logging and kernel message trapping daemons - URL:=https://www.rsyslog.com/ - DEPENDS:= \ - +RSYSLOG_gssapi_krb5:krb5-libs +RSYSLOG_elasticsearch:libcurl \ - +RSYSLOG_libdbi:libdbi +libestr +libfastjson +RSYSLOG_gnutls:libgnutls \ - +RSYSLOG_mmdblookup:libmaxminddb +RSYSLOG_mysql:libmysqlclient \ - +RSYSLOG_omhttp:libcurl +RSYSLOG_openssl:libopenssl \ - +RSYSLOG_pgsql:libpq +libuuid +zlib - MENU:=1 -endef - -define Package/rsyslog/conffiles -/etc/rsyslog.conf -endef - -CONFIGURE_ARGS+= \ - --disable-libgcrypt \ - --disable-fmhttp \ - --disable-default-tests \ - --disable-libsystemd \ - $(if $(CONFIG_RSYSLOG_gssapi_krb5),--enable-gssapi-krb5) \ - $(if $(CONFIG_RSYSLOG_mysql),--enable-mysql) \ - $(if $(CONFIG_RSYSLOG_pgsql),--enable-pgsql) \ - $(if $(CONFIG_RSYSLOG_libdbi),--enable-libdbi) \ - $(if $(CONFIG_RSYSLOG_elasticsearch),--enable-elasticsearch) \ - $(if $(CONFIG_RSYSLOG_omhttp),--enable-omhttp) \ - $(if $(CONFIG_RSYSLOG_openssl),--enable-openssl) \ - $(if $(CONFIG_RSYSLOG_gnutls),--enable-gnutls) \ - $(if $(CONFIG_RSYSLOG_mail),--enable-mail) \ - $(if $(CONFIG_RSYSLOG_mmjsonparse),--enable-mmjsonparse) \ - $(if $(CONFIG_RSYSLOG_mmdblookup),--enable-mmdblookup) \ - $(if $(CONFIG_RSYSLOG_imfile),--enable-imfile) - -define Package/rsyslog/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rsyslogd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/lib/rsyslog - $(CP) $(PKG_INSTALL_DIR)/usr/lib/rsyslog/* $(1)/usr/lib/rsyslog/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/rsyslog.conf $(1)/etc - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/rsyslog.init $(1)/etc/init.d/rsyslog - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_CONF) ./files/20_rsyslog $(1)/etc/uci-defaults -endef - -define Package/rsyslog/config - source "$(SOURCE)/Config.in" -endef - -$(eval $(call BuildPackage,rsyslog)) diff --git a/packages/admin/rsyslog/files/20_rsyslog b/packages/admin/rsyslog/files/20_rsyslog deleted file mode 100644 index 50fdbaab..00000000 --- a/packages/admin/rsyslog/files/20_rsyslog +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -grep -qv -e '^\s*#' -e '^\s*$' /etc/rsyslog.conf 2>/dev/null && exit 0 -[ "$(uci -q get rsyslog.syslog)" == "syslog" ] && exit 0 - -uci -q import rsyslog << EOI -config syslog 'syslog' - option tcp_input_port '514' - option udp_input '1' - option tcp_input '0' - option udp_input_port '514' - option default_template 'RSYSLOG_TraditionalFileFormat' - list modules 'imuxsock' - list modules 'imklog' - -config selector - option source '*.info;mail.none;authpriv.none;cron.none' - option destination '/var/log/messages' - -config selector - option source 'authpriv.*' - option destination '/var/log/secure' - -config selector - option source 'mail.*' - option destination '/var/log/maillog' - -config selector - option source 'cron.*' - option destination '/var/log/cron' - -config selector - option source 'local7.*' - option destination '/var/log/boot.log' -EOI diff --git a/packages/admin/rsyslog/files/rsyslog.conf b/packages/admin/rsyslog/files/rsyslog.conf deleted file mode 100644 index 0381b3e6..00000000 --- a/packages/admin/rsyslog/files/rsyslog.conf +++ /dev/null @@ -1,18 +0,0 @@ -# -# The preferred way to configure rsyslogd is now UCI. -# -# This file can be still used and will be included -# on top of the final configuration inside /var/etc/rsyslog.conf -# -# Example of default configuration: -# -# module(load="imuxsock") -# module(load="imklog") -# module(load="imudp") -# input(type="imudp" port="514") -# $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat -# *.info;mail.none;authpriv.none;cron.none /var/log/messages -# authpriv.* /var/log/secure -# mail.* /var/log/maillog -# cron.* /var/log/cron -# local7.* /var/log/boot.log diff --git a/packages/admin/rsyslog/files/rsyslog.init b/packages/admin/rsyslog/files/rsyslog.init deleted file mode 100644 index 77a9fc70..00000000 --- a/packages/admin/rsyslog/files/rsyslog.init +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -# shellcheck disable=SC3043 -# shellcheck disable=SC2034 -# shellcheck disable=SC3037 -# shellcheck disable=SC2154 -# shellcheck disable=SC2129 - -START=20 - -USE_PROCD=1 - -UCI_CONF="rsyslog" -CONFIG_FILE="/var/etc/rsyslog.conf" -BASE_CONFIG_FILE="/etc/rsyslog.conf" - -modules="" -selectors="" -forwarders="" - -handle_selector() { - local config="$1" - local src - local dst - - config_get src "${config}" source - config_get dst "${config}" destination - if [ "${src}" != "" ] && [ "$dst" != "" ]; then - selectors="${selectors}\n${src}\t${dst}\n" - fi -} - -handle_forwarder() { - local config="$1" - local src - local target - local protocol - local port - local rfc - local opts - - config_get src "${config}" source - config_get target "${config}" target - config_get protocol "${config}" protocol "udp" - config_get port "${config}" port "514" - config_get rfc "${config}" rfc "3164" - - if [ "$rfc" = "5424" ]; then - opts='Template="RSYSLOG_SyslogProtocol23Format" TCP_Framing="octet-counted"' - fi - - if [ "${src}" != "" ] && [ "${target}" != "" ]; then - action="action(type=\"omfwd\" target=\"$target\" port=\"$port\" protocol=\"$protocol\" $opts action.resumeRetryCount=\"100\" queue.type=\"linkedList\" queue.size=\"10000\")" - forwarders="${forwarders}\n${src}\t${action}\n" - fi -} - - -expand_config() { - local input_t="" - local input_u="" - - config_load "${UCI_CONF}" - config_list_foreach syslog modules handle_module - config_get_bool tcp_input syslog tcp_input - if [ "${tcp_input}" -eq 1 ]; then - modules="${modules} imtcp" - config_get tcp_port syslog tcp_input_port - input_t="input(type=\"imtcp\" port=\"${tcp_port}\")" - fi - - config_get_bool udp_input syslog udp_input - if [ "${udp_input}" -eq 1 ]; then - modules="${modules} imudp" - config_get udp_port syslog udp_input_port - input_u="input(type=\"imudp\" port=\"${udp_port}\")" - - fi - config_get template syslog default_template - config_foreach handle_selector selector - config_foreach handle_forwarder forwarder - - mkdir -p "$(dirname ${CONFIG_FILE})" - # shellcheck disable=SC2188 - > ${CONFIG_FILE} - echo "include(file=\"${BASE_CONFIG_FILE}\" mode=\"optional\")" >> ${CONFIG_FILE} - for m in ${modules}; do - echo "module(load=\"${m}\")" >> ${CONFIG_FILE} - done - echo "${input_t}" >> ${CONFIG_FILE} - echo "${input_u}" >> ${CONFIG_FILE} - echo "\$ActionFileDefaultTemplate ${template}" >> ${CONFIG_FILE} - echo -e "${selectors}" >> ${CONFIG_FILE} - echo -e "${forwarders}" >> ${CONFIG_FILE} -} - -handle_module() { - local module="$1" - modules="${modules} $module" -} - -start_service() { - expand_config - procd_open_instance - procd_set_param command /usr/sbin/rsyslogd -f ${CONFIG_FILE} -n - procd_close_instance -} - - -service_triggers() -{ - procd_add_reload_trigger ${UCI_CONF} -} diff --git a/packages/admin/schroot/Config.in b/packages/admin/schroot/Config.in deleted file mode 100644 index 3a1cdb14..00000000 --- a/packages/admin/schroot/Config.in +++ /dev/null @@ -1,23 +0,0 @@ -menu "Configuration" - -config SCHROOT_BTRFS - bool "Enable support for btrfs snapshots" - select PACKAGE_btrfs-progs - default n - -config SCHROOT_LOOPBACK - bool "Enable support for loopback mounts" - select PACKAGE_losetup - default n - -config SCHROOT_LVM - bool "Enable support for LVM snapshots" - select PACKAGE_lvm2 - default n - -config SCHROOT_UUID - bool "Enable support for UUIDs" - select PACKAGE_libuuid - default n - -endmenu diff --git a/packages/admin/schroot/Makefile b/packages/admin/schroot/Makefile deleted file mode 100644 index 1d175bd6..00000000 --- a/packages/admin/schroot/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=reschroot -PKG_VERSION:=1.6.13 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeberg.org/shelter/reschroot/archive/release -PKG_HASH:=c05d6a1bb0210d401e6522eee2c465e0b43c6c98f7101d671f9e9ef88b3accf5 - -PKG_MAINTAINER:=Javier Marcet -PKG_LICENSE:=GPL-3.0-only -PKG_LICENSE_FILES:=COPYING - -CMAKE_INSTALL:=1 - -CMAKE_BINARY_SUBDIR:=build -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/schroot - SECTION:=admin - CATEGORY:=Administration - TITLE:=Securely enter a chroot and run a command or login shell. - DEPENDS:=$(ICONV_DEPENDS) \ - +boost +boost-filesystem +boost-iostreams +boost-program_options +boost-regex \ - +SCHROOT_BTRFS:btrfs-progs \ - +SCHROOT_LOOPBACK:losetup \ - +SCHROOT_LVM:lvm2 \ - +SCHROOT_UUID:libuuid \ - $(INTL_DEPENDS) - URL:=https://codeberg.org/shelter/reschroot -endef - -define Package/schroot/description - Securely enter a chroot and run a command or login shell. -endef - -define Package/schroot/conffiles -/etc/schroot/ -endef - -define Package/schroot/config - source "$(SOURCE)/Config.in" -endef - -PKG_CONFIG_DEPENDS := \ - CONFIG_SCHROOT_BTRFS \ - CONFIG_SCHROOT_LOOPBACK \ - CONFIG_SCHROOT_LVM \ - CONFIG_SCHROOT_UUID - -CMAKE_OPTIONS += \ - -Dbtrfs-snapshot=$(if $(CONFIG_SCHROOT_BTRFS),ON,OFF) \ - -Dloopback=$(if $(CONFIG_SCHROOT_LOOPBACK),ON,OFF) \ - -Dlvm-snapshot=$(if $(CONFIG_SCHROOT_LVM),ON,OFF) \ - -Duuid=$(if $(CONFIG_SCHROOT_UUID),ON,OFF) \ - -Dblock-device=ON \ - -Dunion=ON \ - -Ddhcroot=OFF \ - -Ddchroot-dsa=OFF \ - -Ddebug=OFF \ - -Ddoxygen=OFF \ - -Dpam=OFF \ - -Dtest=OFF \ - -Duuid=OFF \ - -Dzfs-snapshot=OFF - -define Package/schroot/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/bin/schroot $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/schroot - $(CP) -R $(PKG_INSTALL_DIR)/etc/schroot/* $(1)/etc/schroot - $(INSTALL_DIR) $(1)/usr/lib/schroot - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libsbuild.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/libexec/schroot - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/schroot/schroot-* $(1)/usr/libexec/schroot/ - $(INSTALL_DIR) $(1)/usr/share/schroot - $(CP) -R $(PKG_INSTALL_DIR)/usr/share/schroot/* $(1)/usr/share/schroot/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/schroot.init $(1)/etc/init.d/schroot -endef - -$(eval $(call BuildPackage,schroot)) diff --git a/packages/admin/schroot/files/schroot.init b/packages/admin/schroot/files/schroot.init deleted file mode 100755 index d02e4d77..00000000 --- a/packages/admin/schroot/files/schroot.init +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=94 - -start() { - [ -d /var/lib/schroot ] || { - mkdir -p /var/lib/schroot/session /var/lib/schroot/unpack /var/lib/schroot/union/overlay /var/lib/schroot/union/underlay - chmod 0700 /var/lib/schroot - } -} diff --git a/packages/admin/schroot/patches/01-openwrt.patch b/packages/admin/schroot/patches/01-openwrt.patch deleted file mode 100644 index f26e290c..00000000 --- a/packages/admin/schroot/patches/01-openwrt.patch +++ /dev/null @@ -1,169 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -210,8 +210,8 @@ endif(BUILD_PAM) - set(BLOCKDEV_DEFAULT ON) - - # LVM snapshot mount feature --find_program(LVCREATE_EXECUTABLE lvcreate PATHS /sbin /usr/sbin /usr/local/sbin) --find_program(LVREMOVE_EXECUTABLE lvremove PATHS /sbin /usr/sbin /usr/local/sbin) -+#find_program(LVCREATE_EXECUTABLE lvcreate PATHS /sbin /usr/sbin /usr/local/sbin) -+#find_program(LVREMOVE_EXECUTABLE lvremove PATHS /sbin /usr/sbin /usr/local/sbin) - set(LVMSNAP_DEFAULT OFF) - if (LVCREATE_EXECUTABLE AND LVREMOVE_EXECUTABLE) - set (LVMSNAP_DEFAULT ON) -@@ -224,7 +224,7 @@ if (lvm-snapshot) - endif(lvm-snapshot) - - # ZFS snapshot mount feature --find_program(ZFS_EXECUTABLE zfs PATHS /sbin /usr/sbin /usr/local/sbin) -+#find_program(ZFS_EXECUTABLE zfs PATHS /sbin /usr/sbin /usr/local/sbin) - set(ZFSSNAP_DEFAULT OFF) - if (ZFS_EXECUTABLE) - set (ZFSSNAP_DEFAULT ON) -@@ -237,7 +237,7 @@ if (zfs-snapshot) - endif(zfs-snapshot) - - # Btrfs snapshot mount feature --find_program(BTRFS_EXECUTABLE btrfs PATHS /sbin /usr/sbin /usr/local/sbin) -+#find_program(BTRFS_EXECUTABLE btrfs PATHS /sbin /usr/sbin /usr/local/sbin) - set(BTRFSSNAP_DEFAULT OFF) - if (BTRFS_EXECUTABLE) - set (BTRFSSNAP_DEFAULT ON) -@@ -310,15 +310,9 @@ include_directories(${PROJECT_BINARY_DIR - ${PROJECT_BINARY_DIR} - ${PROJECT_SOURCE_DIR}) - --enable_testing() -- - add_subdirectory(sbuild) - add_subdirectory(bin) --add_subdirectory(test) --add_subdirectory(doc) - add_subdirectory(etc) --add_subdirectory(po) --add_subdirectory(man) - - add_custom_target(check-news - COMMAND if grep -q "Welcome to ${CMAKE_PROJECT_NAME} ${GIT_RELEASE_VERSION}" "${PROJECT_SOURCE_DIR}/NEWS" \; then echo "NEWS current version ${GIT_RELEASE_VERSION}" \; else echo "NEWS current version does not match release version ${GIT_RELEASE_VERSION}" \; exit 1 \; fi ---- a/bin/schroot-base/schroot-base-run.h -+++ b/bin/schroot-base/schroot-base-run.h -@@ -61,8 +61,8 @@ namespace schroot_base - std::cout.imbue(std::locale()); - std::cerr.imbue(std::locale()); - -- bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR); -- textdomain (SBUILD_MESSAGE_CATALOGUE); -+ //bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR); -+ //textdomain (SBUILD_MESSAGE_CATALOGUE); - - typename options_type::ptr opts(new options_type); - main_type kit(opts); ---- a/sbuild/sbuild-feature.h -+++ b/sbuild/sbuild-feature.h -@@ -24,6 +24,7 @@ - #include - - #include -+#include - - namespace sbuild - { ---- a/etc/setup.d/20copyfiles -+++ b/etc/setup.d/20copyfiles -@@ -39,9 +39,9 @@ copy_file() - if [ -e "$2" ]; then - - # Device and inode -- da=$(/usr/bin/stat --format="%d %i" "$1") -+ da=$(/bin/stat --format="%d %i" "$1") - # This one can fail since it might not exist yet -- db=$(/usr/bin/stat --format="%d %i" "$2" 2>/dev/null || :) -+ db=$(/bin/stat --format="%d %i" "$2" 2>/dev/null || :) - - if [ "$da" = "$db" ]; then - COPY="false" ---- a/etc/setup.d/20nssdatabases -+++ b/etc/setup.d/20nssdatabases -@@ -29,7 +29,7 @@ set -e - dup_nss() - { - info "Copying $1 database to $2" -- getent "$1" > "$2" -+ cat "/etc/$1" > "$2" - } - - if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then -@@ -42,9 +42,9 @@ if [ $STAGE = "setup-start" ] || [ $STAG - fi - - # Device and inode -- dr=$(/usr/bin/stat --format="%d %i" "/etc/$db") -+ dr=$(/bin/stat --format="%d %i" "/etc/$db") - # This one can fail since it might not exist yet -- dc=$(/usr/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) -+ dc=$(/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) - - # If the database inside and outside the chroot is the - # same, it's very likely that dup_nss would blank the ---- a/etc/profile-templates/all/all/nssdatabases -+++ b/etc/profile-templates/all/all/nssdatabases -@@ -3,5 +3,5 @@ - # - passwd - shadow --group --gshadow -+#group -+#gshadow ---- a/etc/profile-templates/buildd/all/nssdatabases -+++ b/etc/profile-templates/buildd/all/nssdatabases -@@ -3,5 +3,5 @@ - # - passwd - shadow --group --gshadow -+#group -+#gshadow ---- a/etc/profile-templates/default/all/nssdatabases -+++ b/etc/profile-templates/default/all/nssdatabases -@@ -1,4 +1,4 @@ - services - protocols --networks -+#networks - hosts ---- a/etc/profile-templates/desktop/all/nssdatabases -+++ b/etc/profile-templates/desktop/all/nssdatabases -@@ -1,4 +1,4 @@ - services - protocols --networks -+#networks - hosts ---- a/etc/profile-templates/default/linux/fstab -+++ b/etc/profile-templates/default/linux/fstab -@@ -7,7 +7,7 @@ - # to run additional services in the chroot. However, note that this - # may potentially cause undesirable behaviour on upgrades, such as - # killing services on the host. --#/run /run none rw,bind 0 0 -+/run /run none rw,bind 0 0 - #/run/lock /run/lock none rw,bind 0 0 --#/dev/shm /dev/shm none rw,bind 0 0 --#/run/shm /run/shm none rw,bind 0 0 -+/tmp/shm /dev/shm none rw,bind 0 0 -+/tmp/shm /run/shm none rw,bind 0 0 ---- a/etc/profile-templates/desktop/linux/fstab -+++ b/etc/profile-templates/desktop/linux/fstab -@@ -12,7 +12,7 @@ - # to run additional services in the chroot. However, note that this - # may potentially cause undesirable behaviour on upgrades, such as - # killing services on the host. --#/run /run none rw,bind 0 0 -+/run /run none rw,bind 0 0 - #/run/lock /run/lock none rw,bind 0 0 --#/dev/shm /dev/shm none rw,bind 0 0 --#/run/shm /run/shm none rw,bind 0 0 -+/tmp/shm /dev/shm none rw,bind 0 0 -+/tmp/shm /run/shm none rw,bind 0 0 diff --git a/packages/admin/schroot/patches/020-gcc14.patch b/packages/admin/schroot/patches/020-gcc14.patch deleted file mode 100644 index 23a57ac1..00000000 --- a/packages/admin/schroot/patches/020-gcc14.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -310,6 +310,8 @@ include_directories(${PROJECT_BINARY_DIR - ${PROJECT_BINARY_DIR} - ${PROJECT_SOURCE_DIR}) - -+find_package(Intl) -+ - add_subdirectory(sbuild) - add_subdirectory(bin) - add_subdirectory(etc) ---- a/sbuild/CMakeLists.txt -+++ b/sbuild/CMakeLists.txt -@@ -208,6 +208,7 @@ add_library(sbuild STATIC - ${public_chroot_facet_cc_sources}) - target_link_libraries(sbuild - PRIVATE -+ Intl::Intl - ${CMAKE_THREAD_LIBS_INIT} - ${PAM_LIBRARY} - ${UUID_LIBRARY} ---- a/sbuild/sbuild-basic-keyfile.tcc -+++ b/sbuild/sbuild-basic-keyfile.tcc -@@ -214,7 +214,7 @@ sbuild::basic_keyfile::get_locale_ - } - catch (std::runtime_error const& e) // Invalid locale - { -- localename = std::locale::classic(); -+ localename = std::locale::classic().name(); - } - std::string::size_type pos; - bool status = false; diff --git a/packages/admin/schroot/patches/030-boost-1.85.patch b/packages/admin/schroot/patches/030-boost-1.85.patch deleted file mode 100644 index 6272c910..00000000 --- a/packages/admin/schroot/patches/030-boost-1.85.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/sbuild/sbuild-chroot-config.cc -+++ b/sbuild/sbuild-chroot-config.cc -@@ -31,6 +31,7 @@ - #include - #include - -+#include - #include - - #include ---- a/sbuild/sbuild-run-parts.cc -+++ b/sbuild/sbuild-run-parts.cc -@@ -29,6 +29,7 @@ - #include - - #include -+#include - #include - - using boost::format; ---- a/sbuild/sbuild-util.cc -+++ b/sbuild/sbuild-util.cc -@@ -35,8 +35,6 @@ - #include - #endif - --#include -- - using namespace sbuild; - - namespace diff --git a/packages/admin/sudo/Makefile b/packages/admin/sudo/Makefile deleted file mode 100644 index 9d67bd04..00000000 --- a/packages/admin/sudo/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (C) 2006-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sudo -PKG_REALVERSION:=1.9.15p5 -PKG_VERSION:=$(subst p,_p,$(PKG_REALVERSION)) -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_REALVERSION).tar.gz -PKG_SOURCE_URL:=https://www.sudo.ws/dist -PKG_HASH:=558d10b9a1991fb3b9fa7fa7b07ec4405b7aefb5b3cb0b0871dbc81e3a88e558 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REALVERSION) - -PKG_MAINTAINER:=Alexandru Ardelean - -PKG_LICENSE:=ISC -PKG_LICENSE_FILES:=doc/LICENSE -PKG_CPE_ID:=cpe:/a:sudo_project:sudo - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/sudo - SECTION:=admin - CATEGORY:=Administration - TITLE:=Delegate authority to run commands - URL:=https://www.sudo.ws/ -endef - -define Package/sudo/description - Sudo (su "do") allows a system administrator to delegate authority to - give certain users (or groups of users) the ability to run some (or - all) commands as root or another user while providing an audit trail of - the commands and their arguments. -endef - -define Package/sudo/conffiles -/etc/sudoers -/etc/sudoers.d/ -endef - -CONFIGURE_ARGS += \ - --without-pam \ - --disable-pam-session \ - --with-editor=/bin/vi \ - --without-lecture \ - --disable-zlib \ - --disable-openssl \ - --with-rundir=/var/lib/sudo \ - --with-vardir=/var/lib/sudo - -CONFIGURE_VARS += \ - sudo_cv_uid_t_len=10 \ - sudo_cv_func_unsetenv_void=no - -define Package/sudo/install - $(INSTALL_DIR) \ - $(1)/etc/{init.d,sudoers.d} \ - $(1)/usr/{bin,sbin} \ - $(1)/usr/lib/sudo - - $(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/ - chmod 4755 $(1)/usr/bin/sudo - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/ - chmod 0440 $(1)/etc/sudoers - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo/*.so* $(1)/usr/lib/sudo/ - $(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo -endef - -define Package/sudo/postinst -#!/bin/sh - -[ -n "$$IPKG_INSTROOT" ] || { - /etc/init.d/sudo enable - /etc/init.d/sudo start -} -endef - -$(eval $(call BuildPackage,sudo)) diff --git a/packages/admin/sudo/files/sudo.init b/packages/admin/sudo/files/sudo.init deleted file mode 100755 index 705fe841..00000000 --- a/packages/admin/sudo/files/sudo.init +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=99 - -start() { - [ -d /var/lib/sudo ] || { - mkdir -m 0755 -p /var/lib/sudo - chmod 0700 /var/lib/sudo - } -} diff --git a/packages/admin/sudo/patches/020-no-owner-change.patch b/packages/admin/sudo/patches/020-no-owner-change.patch deleted file mode 100644 index 1bd30066..00000000 --- a/packages/admin/sudo/patches/020-no-owner-change.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -75,7 +75,7 @@ EGREP = @EGREP@ - SED = @SED@ - - INSTALL = $(SHELL) $(scriptdir)/install-sh -c --INSTALL_OWNER = -o $(install_uid) -g $(install_gid) -+INSTALL_OWNER = - - ECHO_N = @ECHO_N@ - ECHO_C = @ECHO_C@ diff --git a/packages/admin/sudo/test.sh b/packages/admin/sudo/test.sh deleted file mode 100644 index da24851f..00000000 --- a/packages/admin/sudo/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -case "$1" in - sudo) - sudo --version | grep "${2//_p/p}" - ;; -esac diff --git a/packages/admin/syslog-ng/Makefile b/packages/admin/syslog-ng/Makefile deleted file mode 100644 index f366dcfc..00000000 --- a/packages/admin/syslog-ng/Makefile +++ /dev/null @@ -1,159 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=syslog-ng -PKG_VERSION:=4.7.1 -PKG_RELEASE:=1 - -PKG_MAINTAINER:=Josef Schlehofer -PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later -PKG_LICENSE_FILES:=COPYING LGPL.txt GPL.txt -PKG_CPE_ID:=cpe:/a:balabit:syslog-ng - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/syslog-ng/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ -PKG_HASH:=5477189a2d12325aa4faebfcf59f5bdd9084234732f0c3ec16dd253847dacf1c - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_BUILD_DEPENDS:= \ - HOST_OS_MACOS:fakeuname/host \ - -PKG_CONFIG_DEPENDS:= \ - CONFIG_IPV6 \ - CONFIG_LIBCURL_ZLIB - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -ifeq ($(CONFIG_HOST_OS_MACOS),y) - include ../../utils/fakeuname/fakeuname.mk -endif - -define Package/syslog-ng - SECTION:=admin - CATEGORY:=Administration - TITLE:=A powerful syslog daemon - URL:=https://www.syslog-ng.com/products/open-source-log-management/ - DEPENDS:=+libpcre2 +glib2 +libopenssl +libpthread +librt +libdbi +libjson-c +libcurl +libuuid +SYSLOGNG_LOGROTATE:logrotate +LIBCURL_ZLIB:zlib -endef - -define Package/syslog-ng/description - syslog-ng reads and logs messages to the system console, log - files, other machines and/or users as specified by its - configuration file. -endef - -define Package/syslog-ng/conffiles -/etc/syslog-ng.conf -/etc/syslog-ng.d/ -/etc/scl.conf -endef - -define Package/syslog-ng/config -config SYSLOGNG_LOGROTATE - bool "Logrotate support" - depends on PACKAGE_syslog-ng - default n - help - It adds support for logrotate functionality. - -config SYSLOGNG_LOGROTATE_MAXSIZE - string "Maximum size of /var/log/messages log file" - depends on SYSLOGNG_LOGROTATE - default "1M" - help - Log files are rotated when they grow bigger than defined size bytes. - -config SYSLOGNG_LOGROTATE_ROTATE_COUNT - int "Maximum rotation count for /var/log/messages log file" - depends on SYSLOGNG_LOGROTATE - default 1 - help - Log files are rotated count times before being removed or mailed to - the address specified in a mail directive. If count is 0, old - versions are removed rather than rotated. -endef - -define Build/Configure - $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure - $(Build/Configure/Default) -endef - -LOGROTATE_MAXSIZE:=$(call qstrip,$(CONFIG_SYSLOGNG_LOGROTATE_MAXSIZE)) -LOGROTATE_ROTATE:=$(call qstrip,$(CONFIG_SYSLOGNG_LOGROTATE_ROTATE_COUNT)) - -CONFIGURE_ARGS += \ - --disable-afsnmp \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - --disable-tcp-wrapper \ - --disable-spoof-source \ - --disable-sql \ - --disable-linux-caps \ - --with-jsonc=system \ - --enable-cpp=no \ - --enable-json=yes \ - $(if $(CONFIG_LIBCURL_ZLIB),--enable-http=yes,--enable-http=no) \ - --disable-smtp \ - --disable-mqtt \ - --disable-redis \ - --disable-dependency-tracking \ - --disable-python \ - --disable-geoip2 \ - --disable-java \ - --disable-java-modules \ - --with-librabbitmq-client=no \ - --with-mongoc=no - -CONFIGURE_VARS += \ - $(if $(CONFIG_HOST_OS_MACOS),PATH=$(FAKEUNAME_PATH):$(PATH)) \ - LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include" - -define Package/syslog-ng/install - cd $(PKG_BUILD_DIR); make DESTDIR=$(1) install - - $(call libtool_remove_files,$(1)) # This removes .la files in folder (including subfolders) /usr/lib - rm -rf $(1)/usr/lib/pkgconfig \ - $(1)/usr/lib/*.a \ - $(1)/usr/include \ - $(1)/var - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng - $(INSTALL_DIR) $(1)/etc/syslog-ng.d - $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc - touch $(1)/etc/syslog-ng.d/.keep - - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) ./files/logread $(1)/sbin - - $(INSTALL_DIR) $(1)/usr/share/syslog-ng/include/ - $(CP) -r ./files/scl $(1)/usr/share/syslog-ng/include/ - -ifneq ($(strip $(CONFIG_SYSLOGNG_LOGROTATE)),) - $(INSTALL_DIR) $(1)/etc/logrotate.d - sed \ - -e 's#@MAXSIZE@#$(LOGROTATE_MAXSIZE)#g' \ - -e 's#@ROTATE@#$(LOGROTATE_ROTATE)#g' \ - ./files/syslog-ng.logrotate > $(1)/etc/logrotate.d/syslog-ng.conf -endif -endef - -define Package/syslog-ng/postinst -#!/bin/sh - -[ -n "$$IPKG_INSTROOT" ] || { -/etc/init.d/syslog-ng enable -/etc/init.d/syslog-ng restart -} -endef - -define Package/syslog-ng/prerm -#!/bin/sh - -[ -n "$$IPKG_INSTROOT" ] || { -/etc/init.d/syslog-ng disable -/etc/init.d/syslog-ng stop -} -endef - -$(eval $(call BuildPackage,syslog-ng)) diff --git a/packages/admin/syslog-ng/files/logread b/packages/admin/syslog-ng/files/logread deleted file mode 100644 index 9dfe357d..00000000 --- a/packages/admin/syslog-ng/files/logread +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -# Shell script compatibility wrapper for /sbin/logread -# -# Copyright (C) 2019 Dirk Brenken -# -# 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 -# - -logfile="/var/log/messages" - -if [ ! -f "${logfile}" ] -then - printf "%s\n" "Error: logfile not found!" - exit 2 -fi - -usage() -{ - printf "%s\n" "Usage: logread [options]" - printf "%s\n" "Options:" - printf "%5s %-10s%s\n" "-l" "" "Got only the last 'count' messages" - printf "%5s %-10s%s\n" "-e" "" "Filter messages with a regexp" - printf "%5s %-10s%s\n" "-f" "" "Follow log messages" - printf "%5s %-10s%s\n" "-h" "" "Print this help message" -} - -if [ -z "${1}" ] -then - cat "${logfile}" - exit 0 -else - while [ "${1}" ] - do - case "${1}" in - -l) - shift - count="${1//[^0-9]/}" - tail -n "${count:-50}" "${logfile}" - exit 0 - ;; - -e) - shift - pattern="${1}" - grep -E "${pattern}" "${logfile}" - exit 0 - ;; - -f) - tail -f "${logfile}" - exit 0 - ;; - -fe) - shift - pattern="${1}" - tail -f "${logfile}" | grep -E "${pattern}" - exit 0 - ;; - -h|*) - usage - exit 1 - ;; - esac - shift - done -fi diff --git a/packages/admin/syslog-ng/files/scl/network_localhost/detect.sh b/packages/admin/syslog-ng/files/scl/network_localhost/detect.sh deleted file mode 100755 index acfb4070..00000000 --- a/packages/admin/syslog-ng/files/scl/network_localhost/detect.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -if [ "$(sysctl -n net.ipv6.conf.lo.disable_ipv6)" = "0" ]; then - echo 'network(ip("::1") port(514) transport(udp) ip-protocol(6) )' -else - echo 'network(ip("127.0.0.1") port(514) transport(udp) ip-protocol(4) )' -fi diff --git a/packages/admin/syslog-ng/files/scl/network_localhost/plugin.conf b/packages/admin/syslog-ng/files/scl/network_localhost/plugin.conf deleted file mode 100644 index b2789424..00000000 --- a/packages/admin/syslog-ng/files/scl/network_localhost/plugin.conf +++ /dev/null @@ -1 +0,0 @@ -@module confgen context(source) name(network_localhost) exec("`scl-root`/network_localhost/detect.sh") diff --git a/packages/admin/syslog-ng/files/syslog-ng.conf b/packages/admin/syslog-ng/files/syslog-ng.conf deleted file mode 100644 index dafef7b7..00000000 --- a/packages/admin/syslog-ng/files/syslog-ng.conf +++ /dev/null @@ -1,62 +0,0 @@ -# Collect all local logs into a single file /var/log/messages. -# See https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition - -@version: 4.7 -@include "scl.conf" - -options { - chain_hostnames(no); # Enable or disable the chained hostname format. - create_dirs(yes); - keep_hostname(yes); # Enable or disable hostname rewriting. - log_fifo_size(256); # The number of messages that the output queue can store. - log_msg_size(1024); # Maximum length of a message in bytes. - stats(freq(0)); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds. - flush_lines(0); # How many lines are flushed to a destination at a time. - use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname. -}; - -# syslog-ng gets messages from syslog-ng (internal) and from /dev/log - -source src { - internal(); - unix-dgram("/dev/log"); -}; - -source net { - network_localhost(); -}; - -source s_network { - default-network-drivers( - # NOTE: TLS support - # - # the default-network-drivers() source driver opens the TLS - # enabled ports as well, however without an actual key/cert - # pair they will not operate and syslog-ng would display a - # warning at startup. - # - #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert")) - ); -}; - -source kernel { - file("/proc/kmsg" program_override("kernel")); -}; - -destination messages { - file("/var/log/messages"); -}; - -log { - source(src); - source(net); - source(kernel); - destination(messages); - - # uncomment this line to open port 514 to receive messages - #source(s_network); -}; - -# Include any user settings last so that s/he can override or -# supplement all "canned" settings inherited from the distribution. -@include "/etc/syslog-ng.d/" # Put any customization files in this directory diff --git a/packages/admin/syslog-ng/files/syslog-ng.init b/packages/admin/syslog-ng/files/syslog-ng.init deleted file mode 100644 index 5ca2d2aa..00000000 --- a/packages/admin/syslog-ng/files/syslog-ng.init +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2019 OpenWrt.org - -START=50 - -USE_PROCD=1 - -start_service() { - [ -f /etc/syslog-ng.conf ] || return 1 - procd_open_instance - procd_set_param command /usr/sbin/syslog-ng --foreground - procd_close_instance -} - -reload_service() { - /usr/sbin/syslog-ng-ctl reload -} diff --git a/packages/admin/syslog-ng/files/syslog-ng.logrotate b/packages/admin/syslog-ng/files/syslog-ng.logrotate deleted file mode 100644 index 75a9a07f..00000000 --- a/packages/admin/syslog-ng/files/syslog-ng.logrotate +++ /dev/null @@ -1,12 +0,0 @@ -/var/log/messages { - compress - copytruncate - delaycompress - notifempty - maxsize @MAXSIZE@ - missingok - postrotate - /usr/sbin/syslog-ng-ctl reload > /dev/null - endscript - rotate @ROTATE@ -} diff --git a/packages/admin/zabbix/Makefile b/packages/admin/zabbix/Makefile deleted file mode 100644 index 52f52112..00000000 --- a/packages/admin/zabbix/Makefile +++ /dev/null @@ -1,460 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=zabbix -PKG_VERSION:=7.0.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://cdn.zabbix.com/zabbix/sources/stable/$(basename $(PKG_VERSION))/ \ - https://cdn.zabbix.com/zabbix/sources/oldstable/$(basename $(PKG_VERSION))/ -PKG_HASH:=520641483223f680ef6e685284b556ba34a496d886a38dc3bca085cde21031b1 - -PKG_MAINTAINER:=Etienne CHAMPETIER -PKG_LICENSE:=AGPL-3.0-only -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:zabbix:zabbix - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -PKG_CONFIG_DEPENDS:= \ - CONFIG_ZABBIX_MYSQL \ - CONFIG_ZABBIX_POSTGRESQL \ - CONFIG_ZABBIX_SQLITE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/zabbix-proxy/config -comment "Database Software" - -choice - prompt "Selected Database Software" - default ZABBIX_POSTGRESQL - - config ZABBIX_MYSQL - bool "MySQL/MariaDB" - - config ZABBIX_POSTGRESQL - bool "PostgreSQL" - - config ZABBIX_SQLITE - bool "SQLite" -endchoice -endef - -define Package/zabbix/Default - SECTION:=admin - CATEGORY:=Administration - SUBMENU:=Zabbix - TITLE:=Zabbix - URL:=https://www.zabbix.com/ - USERID:=zabbix=53:zabbix=53 - DEPENDS+=$(ICONV_DEPENDS) +libpcre2 +zlib -endef - -define Package/zabbix-agentd - $(call Package/zabbix/Default) - TITLE+= agentd - DEPENDS+= +libevent2-pthreads - PROVIDES:=zabbix-agentd - VARIANT:=nossl - DEFAULT_VARIANT:=1 -endef - -define Package/zabbix-agentd-openssl - $(call Package/zabbix/Default) - TITLE+= agentd (with OpenSSL) - DEPENDS+= +libevent2-pthreads +libopenssl - PROVIDES:=zabbix-agentd - VARIANT:=openssl -endef - -define Package/zabbix-agentd-gnutls - $(call Package/zabbix/Default) - TITLE+= agentd (with GnuTLS) - DEPENDS+= +libevent2-pthreads +libgnutls - PROVIDES:=zabbix-agentd - VARIANT:=gnutls -endef - -define Package/zabbix-extra-mac80211 - $(call Package/zabbix/Default) - TITLE+= discovery/userparameters for mac80211 - DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS -endef - -define Package/zabbix-extra-network - $(call Package/zabbix/Default) - TITLE+= discovery/userparameters for network - DEPENDS = +zabbix-agentd +libubus-lua +lua -endef - -define Package/zabbix-extra-wifi - $(call Package/zabbix/Default) - TITLE+= discovery/userparameters for wifi - DEPENDS = +zabbix-agentd +libiwinfo-lua +libubus-lua +lua -endef - -define Package/zabbix-sender - $(call Package/zabbix/Default) - TITLE+= sender - PROVIDES:=zabbix-sender - VARIANT:=nossl - DEFAULT_VARIANT:=1 -endef - -define Package/zabbix-sender-openssl - $(call Package/zabbix/Default) - TITLE+= sender (with OpenSSL) - DEPENDS+= +libopenssl - PROVIDES:=zabbix-sender - VARIANT:=openssl -endef - -define Package/zabbix-sender-gnutls - $(call Package/zabbix/Default) - TITLE+= sender (with GnuTLS) - DEPENDS+= +libgnutls - PROVIDES:=zabbix-sender - VARIANT:=gnutls -endef - -define Package/zabbix-get - $(call Package/zabbix/Default) - TITLE+= get - PROVIDES:=zabbix-get - VARIANT:=nossl - DEFAULT_VARIANT:=1 -endef - -define Package/zabbix-get-openssl - $(call Package/zabbix/Default) - TITLE+= get (with OpenSSL) - DEPENDS+= +libopenssl - PROVIDES:=zabbix-get - VARIANT:=openssl -endef - -define Package/zabbix-get-gnutls - $(call Package/zabbix/Default) - TITLE+= get (with GnuTLS) - DEPENDS+= +libgnutls - PROVIDES:=zabbix-get - VARIANT:=gnutls -endef - -define Package/zabbix-server/Default - $(call Package/zabbix/Default) - TITLE+= server - DEPENDS += +ZABBIX_POSTGRESQL:libpq \ - +ZABBIX_MYSQL:libmariadbclient \ - @(!ZABBIX_SQLITE) \ - +libevent2 \ - +libevent2-pthreads \ - +fping -endef - -define Package/zabbix-server - $(call Package/zabbix-server/Default) - PROVIDES:=zabbix-server - VARIANT:=nossl - DEFAULT_VARIANT:=1 -endef - -define Package/zabbix-server-openssl - $(call Package/zabbix-server/Default) - TITLE+= (with OpenSSL) - PROVIDES:=zabbix-server - DEPENDS+= +libopenssl - VARIANT:=openssl -endef - -define Package/zabbix-server-gnutls - $(call Package/zabbix-server/Default) - TITLE+= (with GnuTLS) - PROVIDES:=zabbix-server - DEPENDS+= +libgnutls - VARIANT:=gnutls -endef - -define Package/zabbix-server-frontend - $(call Package/zabbix/Default) - TITLE+= server-frontend - DEPENDS += +php8 \ - +php8-cgi \ - +php8-mod-gd \ - +php8-mod-bcmath \ - +php8-mod-ctype \ - +php8-mod-xmlreader \ - +php8-mod-xmlwriter \ - +php8-mod-session \ - +php8-mod-sockets \ - +php8-mod-mbstring \ - +php8-mod-gettext \ - +ZABBIX_POSTGRESQL:php8-mod-pgsql \ - +ZABBIX_MYSQL:php8-mod-mysqli \ - @(!ZABBIX_SQLITE) -endef - -define Package/zabbix-proxy/Default - $(call Package/zabbix/Default) - TITLE+= proxy - DEPENDS += +ZABBIX_POSTGRESQL:libpq \ - +ZABBIX_MYSQL:libmariadbclient \ - +ZABBIX_SQLITE:libsqlite3 \ - +libevent2 \ - +libevent2-pthreads \ - +fping -endef - -define Package/zabbix-proxy - $(call Package/zabbix-proxy/Default) - PROVIDES:=zabbix-proxy - VARIANT:=nossl - DEFAULT_VARIANT:=1 -endef - -define Package/zabbix-proxy-openssl - $(call Package/zabbix-proxy/Default) - TITLE+= (with OpenSSL) - PROVIDES:=zabbix-proxy - DEPENDS+= +libopenssl - VARIANT:=openssl -endef - -define Package/zabbix-proxy-gnutls - $(call Package/zabbix-proxy/Default) - TITLE+= (with GnuTLS) - PROVIDES:=zabbix-proxy - DEPENDS+= +libgnutls - VARIANT:=gnutls -endef - -define Package/zabbix-extra-mac80211/description -An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters. -It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root. -See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. -endef - -define Package/zabbix-extra-network/description -An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces. -The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0) -See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. -endef - -define Package/zabbix-extra-wifi/description -An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters. -As it uses libiwinfo, it works with all wifi devices supported by openwrt. -See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. -endef - -CONFIGURE_ARGS+= \ - --enable-agent \ - $(if $(CONFIG_ZABBIX_SQLITE),--disable-server,--enable-server) \ - --enable-proxy \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - --disable-java \ - $(if $(CONFIG_ZABBIX_MYSQL),--with-mysql) \ - $(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \ - $(if $(CONFIG_ZABBIX_SQLITE),--with-sqlite3=$(STAGING_DIR)/usr) \ - --with-libevent=$(STAGING_DIR)/usr/include \ - --with-libpcre2=$(STAGING_DIR)/usr/include \ - --with-zlib=$(STAGING_DIR)/usr/include - -ifeq ($(BUILD_VARIANT),openssl) - CONFIGURE_ARGS+= --with-openssl="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),gnutls) - CONFIGURE_ARGS+= --with-gnutls="$(STAGING_DIR)/usr" -endif - -CONFIGURE_VARS += \ - ac_cv_header_sys_sysinfo_h=no - -MAKE_FLAGS += ARCH="linux" - -define Package/zabbix/install/sbin - $(INSTALL_DIR) \ - $(1)/usr/sbin - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/sbin/zabbix_$(2) \ - $(1)/usr/sbin/ -endef - -define Package/zabbix/install/bin - $(INSTALL_DIR) \ - $(1)/usr/bin - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/zabbix_$(2) \ - $(1)/usr/bin/ -endef - -define Package/zabbix/install/etc - $(INSTALL_DIR) \ - $(1)/etc - - $(INSTALL_CONF) \ - $(PKG_INSTALL_DIR)/etc/zabbix_$(2).conf \ - $(1)/etc/ -endef - -define Package/zabbix/install/init.d - $(INSTALL_DIR) \ - $(1)/etc/init.d - - $(INSTALL_BIN) \ - ./files/zabbix_$(2).init \ - $(1)/etc/init.d/zabbix_$(2) -endef - -define Package/zabbix/install/zabbix.conf.d - $(INSTALL_DIR) \ - $(1)/etc/zabbix_agentd.conf.d - - $(INSTALL_BIN) \ - ./files/$(2) \ - $(1)/etc/zabbix_agentd.conf.d/$(2) -endef - -define Package/zabbix-agentd/conffiles -/etc/zabbix_agentd.conf -endef -Package/zabbix-agentd-openssl/conffiles = $(Package/zabbix-agentd/conffiles) -Package/zabbix-agentd-gnutls/conffiles = $(Package/zabbix-agentd/conffiles) - -define Package/zabbix-server/conffiles -/etc/zabbix_server.conf -endef -Package/zabbix-server-openssl/conffiles = $(Package/zabbix-server/conffiles) -Package/zabbix-server-gnutls/conffiles = $(Package/zabbix-server/conffiles) - -define Package/zabbix-proxy/conffiles -/etc/zabbix_proxy.conf -endef -Package/zabbix-proxy-openssl/conffiles = $(Package/zabbix-proxy/conffiles) -Package/zabbix-proxy-gnutls/conffiles = $(Package/zabbix-proxy/conffiles) - -ifdef CONFIG_PACKAGE_zabbix-extra-mac80211 -define Build/Prepare/zabbix-extra-mac80211 - mkdir -p $(PKG_BUILD_DIR)/zabbix-extra-mac80211 - $(CP) ./files/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/ -endef - -define Build/Compile/zabbix-extra-mac80211 - $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211.c -o $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211 -endef -endif - -define Build/Prepare - $(call Build/Prepare/Default) - $(call Build/Prepare/zabbix-extra-mac80211) -endef - -define Build/Compile - $(call Build/Compile/Default) - $(call Build/Compile/zabbix-extra-mac80211) -endef - -define Package/zabbix-agentd/install - $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d - $(call Package/zabbix/install/sbin,$(1),agentd) - $(call Package/zabbix/install/etc,$(1),agentd) - $(call Package/zabbix/install/init.d,$(1),agentd) -endef -Package/zabbix-agentd-openssl/install = $(Package/zabbix-agentd/install) -Package/zabbix-agentd-gnutls/install = $(Package/zabbix-agentd/install) - -define Package/zabbix-extra-mac80211/install - $(call Package/zabbix/install/zabbix.conf.d,$(1),mac80211) - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211 $(1)/usr/bin/ - chmod 4755 $(1)/usr/bin/zabbix_helper_mac80211 -endef - -define Package/zabbix-extra-network/install - $(call Package/zabbix/install/zabbix.conf.d,$(1),network) - $(INSTALL_DIR) $(1)/usr/share/acl.d - $(INSTALL_DATA) ./files/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json -endef - -define Package/zabbix-extra-network/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - killall -s HUP ubusd -fi -endef - -define Package/zabbix-extra-wifi/install - $(call Package/zabbix/install/zabbix.conf.d,$(1),wifi) - $(INSTALL_DIR) $(1)/usr/share/acl.d - $(INSTALL_DATA) ./files/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json -endef - -define Package/zabbix-extra-wifi/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - killall -s HUP ubusd -fi -endef - -define Package/zabbix-sender/install - $(call Package/zabbix/install/bin,$(1),sender) -endef -Package/zabbix-sender-openssl/install = $(Package/zabbix-sender/install) -Package/zabbix-sender-gnutls/install = $(Package/zabbix-sender/install) - -define Package/zabbix-get/install - $(call Package/zabbix/install/bin,$(1),get) -endef -Package/zabbix-get-openssl/install = $(Package/zabbix-get/install) -Package/zabbix-get-gnutls/install = $(Package/zabbix-get/install) - -define Package/zabbix-server/install - $(call Package/zabbix/install/sbin,$(1),server) - $(call Package/zabbix/install/etc,$(1),server) -endef -Package/zabbix-server-openssl/install = $(Package/zabbix-server/install) -Package/zabbix-server-gnutls/install = $(Package/zabbix-server/install) - -define Package/zabbix-server-frontend/install - $(INSTALL_DIR) $(1)/www/zabbix - $(CP) $(PKG_BUILD_DIR)/ui/* $(1)/www/zabbix -endef - -define Package/zabbix-proxy/install - $(call Package/zabbix/install/sbin,$(1),proxy) - $(call Package/zabbix/install/etc,$(1),proxy) -endef -Package/zabbix-proxy-openssl/install = $(Package/zabbix-proxy/install) -Package/zabbix-proxy-gnutls/install = $(Package/zabbix-proxy/install) - -$(eval $(call BuildPackage,zabbix-agentd)) -$(eval $(call BuildPackage,zabbix-agentd-openssl)) -$(eval $(call BuildPackage,zabbix-agentd-gnutls)) -$(eval $(call BuildPackage,zabbix-extra-mac80211)) -$(eval $(call BuildPackage,zabbix-extra-network)) -$(eval $(call BuildPackage,zabbix-extra-wifi)) -$(eval $(call BuildPackage,zabbix-sender)) -$(eval $(call BuildPackage,zabbix-sender-openssl)) -$(eval $(call BuildPackage,zabbix-sender-gnutls)) -$(eval $(call BuildPackage,zabbix-server)) -$(eval $(call BuildPackage,zabbix-server-openssl)) -$(eval $(call BuildPackage,zabbix-server-gnutls)) -$(eval $(call BuildPackage,zabbix-server-frontend)) -$(eval $(call BuildPackage,zabbix-proxy)) -$(eval $(call BuildPackage,zabbix-proxy-openssl)) -$(eval $(call BuildPackage,zabbix-proxy-gnutls)) -$(eval $(call BuildPackage,zabbix-get)) -$(eval $(call BuildPackage,zabbix-get-openssl)) -$(eval $(call BuildPackage,zabbix-get-gnutls)) diff --git a/packages/admin/zabbix/files/mac80211 b/packages/admin/zabbix/files/mac80211 deleted file mode 100644 index fe3024c4..00000000 --- a/packages/admin/zabbix/files/mac80211 +++ /dev/null @@ -1,29 +0,0 @@ -#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates - -# If you want to know the exact meaning of an UserParameter, you can search in the ieee80211 standard: -# https://standards.ieee.org/getieee802/download/802.11-2012.pdf -# example: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145) - -# mac80211 phy discovery (like 'phy0') -# example: {"data":[{"{#PHY}":"phy0"}]} -# -UserParameter=mac80211.phydiscovery,zabbix_helper_mac80211 discovery - -#phy statistics (you need {#PHY} as parameter) -# -UserParameter=mac80211.ACKFailureCount[*],zabbix_helper_mac80211 $1 dot11ACKFailureCount -UserParameter=mac80211.FCSErrorCount[*],zabbix_helper_mac80211 $1 dot11FCSErrorCount -UserParameter=mac80211.RTSFailureCount[*],zabbix_helper_mac80211 $1 dot11RTSFailureCount -UserParameter=mac80211.RTSSuccessCount[*],zabbix_helper_mac80211 $1 dot11RTSSuccessCount - -# hidden behind MAC80211_DEBUG_COUNTERS -UserParameter=mac80211.FailedCount[*],zabbix_helper_mac80211 $1 dot11FailedCount -UserParameter=mac80211.FrameDuplicateCount[*],zabbix_helper_mac80211 $1 dot11FrameDuplicateCount -UserParameter=mac80211.MulticastReceivedFrameCount[*],zabbix_helper_mac80211 $1 dot11MulticastReceivedFrameCount -UserParameter=mac80211.MulticastTransmittedFrameCount[*],zabbix_helper_mac80211 $1 dot11MulticastTransmittedFrameCount -UserParameter=mac80211.MultipleRetryCount[*],zabbix_helper_mac80211 $1 dot11MultipleRetryCount -UserParameter=mac80211.ReceivedFragmentCount[*],zabbix_helper_mac80211 $1 dot11ReceivedFragmentCount -UserParameter=mac80211.RetryCount[*],zabbix_helper_mac80211 $1 dot11RetryCount -UserParameter=mac80211.TransmittedFragmentCount[*],zabbix_helper_mac80211 $1 dot11TransmittedFragmentCount -UserParameter=mac80211.TransmittedFrameCount[*],zabbix_helper_mac80211 $1 dot11TransmittedFrameCount - diff --git a/packages/admin/zabbix/files/network b/packages/admin/zabbix/files/network deleted file mode 100644 index 96bf194f..00000000 --- a/packages/admin/zabbix/files/network +++ /dev/null @@ -1,6 +0,0 @@ -#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates - -# network interface discovery -# example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]} -# -UserParameter=netowrt.discovery,lua -l ubus -e 'u=ubus.connect();list="{\"data\":[";dump=u:call("network.interface", "dump", {});for _, intf in ipairs(dump.interface) do list=list.."{\"{#IF}\":\""..(intf.device or intf.l3_device).."\", \"{#NET}\":\""..intf.interface.."\"},";end;list=string.gsub(list,",$","");print(list.."]}")' diff --git a/packages/admin/zabbix/files/wifi b/packages/admin/zabbix/files/wifi deleted file mode 100644 index e79d375d..00000000 --- a/packages/admin/zabbix/files/wifi +++ /dev/null @@ -1,24 +0,0 @@ -#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates - -# wifi interface discovery -# example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]} -UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")' - - -#iwinfo info (you need {#IF} as parameter, like 'wlan0') -UserParameter=wifi.iwinfo.channel[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].channel('$1'))" -UserParameter=wifi.iwinfo.frequency[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].frequency('$1'))" -UserParameter=wifi.iwinfo.txpower[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].txpower('$1'))" -UserParameter=wifi.iwinfo.bitrate[*],lua -l iwinfo -e "b = iwinfo[iwinfo.type('$1')].bitrate('$1'); print(b or '0')" -UserParameter=wifi.iwinfo.signal[*],lua -l iwinfo -e "s = iwinfo[iwinfo.type('$1')].signal('$1'); print(s or '-255')" -UserParameter=wifi.iwinfo.noise[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].noise('$1'))" -UserParameter=wifi.iwinfo.quality[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality('$1'))" -UserParameter=wifi.iwinfo.quality_max[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality_max('$1'))" -UserParameter=wifi.iwinfo.mode[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].mode('$1'))" -UserParameter=wifi.iwinfo.ssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].ssid('$1'))" -UserParameter=wifi.iwinfo.bssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].bssid('$1'))" -UserParameter=wifi.iwinfo.country[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].country('$1'))" -UserParameter=wifi.iwinfo.nbusers[*],lua -l iwinfo -e "n = 0; for _,_ in pairs(iwinfo[iwinfo.type('$1')].assoclist('$1')) do n = n + 1 end; print(n)" -UserParameter=wifi.iwinfo.encryption[*],lua -l iwinfo -e "e = iwinfo[iwinfo.type('$1')].encryption('$1'); print(e and e.description or 'None')" -UserParameter=wifi.iwinfo.hwmode[*],lua -l iwinfo -e "x=iwinfo[iwinfo.type('$1')].hwmodelist('$1'); print((x.a and 'a' or '')..(x.b and 'b' or '')..(x.g and 'g' or '')..(x.n and 'n' or ''))" - diff --git a/packages/admin/zabbix/files/zabbix-network-ubus-acl.json b/packages/admin/zabbix/files/zabbix-network-ubus-acl.json deleted file mode 100644 index f19f51b1..00000000 --- a/packages/admin/zabbix/files/zabbix-network-ubus-acl.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "user": "zabbix", - "access": { - "network.interface": { - "methods": [ "dump" ] - } - } -} diff --git a/packages/admin/zabbix/files/zabbix-wifi-ubus-acl.json b/packages/admin/zabbix/files/zabbix-wifi-ubus-acl.json deleted file mode 100644 index 9d9b093c..00000000 --- a/packages/admin/zabbix/files/zabbix-wifi-ubus-acl.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "user": "zabbix", - "access": { - "network.wireless": { - "methods": [ "status" ] - } - } -} diff --git a/packages/admin/zabbix/files/zabbix_agentd.init b/packages/admin/zabbix/files/zabbix_agentd.init deleted file mode 100755 index ea886346..00000000 --- a/packages/admin/zabbix/files/zabbix_agentd.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2011 OpenWrt.org - -START=60 - -USE_PROCD=1 -PROG=/usr/sbin/zabbix_agentd -CONFIG=/etc/zabbix_agentd.conf - -start_service() { - # Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf - [ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG} - - [ -f ${CONFIG} ] || return 1 - - procd_open_instance - procd_set_param command ${PROG} -c ${CONFIG} -f - procd_set_param respawn - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_close_instance -} - diff --git a/packages/admin/zabbix/files/zabbix_helper_mac80211.c b/packages/admin/zabbix/files/zabbix_helper_mac80211.c deleted file mode 100644 index e03c46c3..00000000 --- a/packages/admin/zabbix/files/zabbix_helper_mac80211.c +++ /dev/null @@ -1,78 +0,0 @@ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include - -int discovery() -{ - DIR *dir; - struct dirent *ent; - bool comma = false; - if ((dir = opendir ("/sys/kernel/debug/ieee80211/")) != NULL) { - printf("{\"data\":["); - while ((ent = readdir (dir)) != NULL) { - if (strcmp(".", ent->d_name) && strcmp("..", ent->d_name)) { - if (comma) - printf(","); - printf("{\"{#PHY}\":\"%s\"}", ent->d_name); - comma = true; - } - } - printf("]}\n"); - closedir(dir); - } else { - perror(""); - return EXIT_FAILURE; - } - return EXIT_SUCCESS; -} - -int get_param(char *phy, char *stat) -{ - char *filename = NULL; - FILE *f = NULL; - phy = basename(phy); - stat = basename(stat); - if (asprintf(&filename, "/sys/kernel/debug/ieee80211/%s/statistics/%s", phy, stat) > 0) - f = fopen(filename, "r"); - - if (f != NULL) { - char temp[256]; - while (fgets(temp, 256, f) != NULL) - printf("%s",temp); - - fclose(f); - } else { - perror(""); - return EXIT_FAILURE; - } - free(filename); - return EXIT_SUCCESS; -} - -int usage(char *name) -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s discovery\n", name); - fprintf(stderr, " => print mac80211.phydiscovery discovery rule\n"); - fprintf(stderr, " %s PHY STAT\n", name); - fprintf(stderr, " => cat /sys/kernel/debug/ieee80211/PHY/statistics/STAT as root\n"); - return EXIT_FAILURE; -} - -int main(int argc, char *argv[]) -{ - - switch (argc) { - case 2: - return discovery(); - case 3: - return get_param(argv[1], argv[2]); - default: - return usage(argv[0]); - } -} diff --git a/packages/admin/zabbix/patches/010-change-agentd-config.patch b/packages/admin/zabbix/patches/010-change-agentd-config.patch deleted file mode 100644 index 73291135..00000000 --- a/packages/admin/zabbix/patches/010-change-agentd-config.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- a/conf/zabbix_agentd.conf -+++ b/conf/zabbix_agentd.conf -@@ -3,12 +3,11 @@ - - ############ GENERAL PARAMETERS ################# - --### Option: PidFile --# Name of PID file. --# --# Mandatory: no --# Default: --# PidFile=/tmp/zabbix_agentd.pid -+# We do not need PidFile with procd -+# PidFile=/var/run/zabbix_agentd.pid -+ -+# use syslog -+LogType=system - - ### Option: LogType - # Specifies where log messages are written to: -@@ -27,8 +26,6 @@ - # Default: - # LogFile= - --LogFile=/tmp/zabbix_agentd.log -- - ### Option: LogFileSize - # Maximum size of log file in MB. - # 0 - disable automatic log rotation. -@@ -136,6 +133,7 @@ Server=127.0.0.1 - # Range: 0-100 - # Default: - # StartAgents=10 -+StartAgents=1 - - ##### Active checks related - -@@ -164,8 +162,6 @@ Server=127.0.0.1 - # Default: - # ServerActive= - --ServerActive=127.0.0.1 -- - ### Option: Hostname - # List of comma delimited unique, case sensitive hostnames. - # Required for active checks and must match hostnames as configured on the server. -@@ -175,8 +171,6 @@ ServerActive=127.0.0.1 - # Default: - # Hostname= - --Hostname=Zabbix server -- - ### Option: HostnameItem - # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. - # Does not support UserParameters or aliases. -@@ -326,8 +320,8 @@ Hostname=Zabbix server - # Include= - - # Include=/usr/local/etc/zabbix_agentd.userparams.conf --# Include=/usr/local/etc/zabbix_agentd.conf.d/ - # Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf -+Include=/etc/zabbix_agentd.conf.d/ - - ####### USER-DEFINED MONITORED PARAMETERS ####### - diff --git a/packages/admin/zabbix/patches/110-reproducible-builds.patch b/packages/admin/zabbix/patches/110-reproducible-builds.patch deleted file mode 100644 index 76c24921..00000000 --- a/packages/admin/zabbix/patches/110-reproducible-builds.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/libs/zbxcommon/misc.c -+++ b/src/libs/zbxcommon/misc.c -@@ -223,7 +223,7 @@ static const char copyright_message[] = - void zbx_print_version(const char *title_message) - { - printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION); -- printf("Revision %s %s, compilation time: %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE, __DATE__, __TIME__); -+ printf("Revision %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE); - puts(copyright_message); - } - diff --git a/packages/devel/autoconf/Makefile b/packages/devel/autoconf/Makefile deleted file mode 100644 index c9208e87..00000000 --- a/packages/devel/autoconf/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=autoconf -PKG_VERSION:=2.72 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=@GNU/autoconf -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a - -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0-or-later -PKG_LICENSE_FILES:=COPYINGv3 COPYING.EXCEPTION - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/autoconf - SECTION:=devel - CATEGORY:=Development - TITLE:=autoconf - URL:=https://www.gnu.org/software/autoconf/ - DEPENDS:=+m4 +perl +perlbase-data +perlbase-file +perlbase-getopt \ - +perlbase-dynaloader +perlbase-text -endef - -define Package/autoconf/description - Autoconf is an extensible package of M4 macros that produce shell scripts to - automatically configure software source code packages. -endef - -CONFIGURE_VARS += M4=m4 EMACS=no - -FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g' - -define Package/autoconf/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - grep -rEl "#\!.*perl" $(1)/usr/bin/ | xargs $(FIX_PATHS) - $(INSTALL_DIR) $(1)/usr/share/autoconf - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/INSTALL \ - $(1)/usr/share/autoconf/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autom4te.cfg \ - $(1)/usr/share/autoconf/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/Autom4te - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/Autom4te/* \ - $(1)/usr/share/autoconf/Autom4te/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/autoconf - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoconf/* \ - $(1)/usr/share/autoconf/autoconf/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/autoscan - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoscan/* \ - $(1)/usr/share/autoconf/autoscan/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/autotest - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autotest/* \ - $(1)/usr/share/autoconf/autotest/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/m4sugar - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/m4sugar/* \ - $(1)/usr/share/autoconf/m4sugar/ -endef - -$(eval $(call BuildPackage,autoconf)) diff --git a/packages/devel/autoconf/test.sh b/packages/devel/autoconf/test.sh deleted file mode 100644 index 6a3b9505..00000000 --- a/packages/devel/autoconf/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -autoconf --version | grep $2 && \ -autoheader --version | grep $2 && \ -autom4te --version | grep $2 && \ -autoreconf --version | grep $2 && \ -autoscan --version | grep $2 && \ -autoupdate --version | grep $2 && \ -ifnames --version | grep $2 diff --git a/packages/devel/automake/Makefile b/packages/devel/automake/Makefile deleted file mode 100644 index f2eb6b80..00000000 --- a/packages/devel/automake/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=automake -PKG_VERSION:=1.16.5 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=@GNU/automake -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469 - -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-2.0-or-later -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:gnu:automake - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/automake - SECTION:=devel - CATEGORY:=Development - TITLE:=automake - URL:=https://www.gnu.org/software/automake/ - DEPENDS:=+autoconf +perlbase-thread +perlbase-attributes -endef - -define Package/automake/description - Automake is a tool for automatically generating Makefile.in files compliant - with the GNU Coding Standards. -endef - -FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g' - -AM_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION))) - -define Package/automake/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(AM_VERSION) \ - $(1)/usr/bin/automake-$(AM_VERSION) - $(LN) automake-$(AM_VERSION) $(1)/usr/bin/automake - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(AM_VERSION) \ - $(1)/usr/bin/aclocal-$(AM_VERSION) - $(LN) aclocal-$(AM_VERSION) $(1)/usr/bin/aclocal - $(FIX_PATHS) $(1)/usr/bin/automake-$(AM_VERSION) - $(FIX_PATHS) $(1)/usr/bin/aclocal-$(AM_VERSION) - $(INSTALL_DIR) $(1)/usr/share/automake-$(AM_VERSION) - - for dir in \ - automake-$(AM_VERSION) automake-$(AM_VERSION)/Automake \ - automake-$(AM_VERSION)/am aclocal \ - aclocal-$(AM_VERSION) aclocal-$(AM_VERSION)/internal \ - ; do \ - $(INSTALL_DIR) $(1)/usr/share/$$$$dir; \ - for file in $$$$(cd $(PKG_INSTALL_DIR) && \ - find usr/share/$$$$dir -maxdepth 1 -type f); do \ - $(INSTALL_DATA) $$(PKG_INSTALL_DIR)/$$$$file \ - $(1)/$$$$file; \ - done; \ - done -endef - -$(eval $(call BuildPackage,automake)) diff --git a/packages/devel/bison/Makefile b/packages/devel/bison/Makefile deleted file mode 100644 index b97bdcb5..00000000 --- a/packages/devel/bison/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-Identifier-License: GPL-2.0-only -# -# Copyright (C) 2022 W. Michael Petullo - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bison -PKG_VERSION:=3.8.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2 - -PKG_MAINTAINER:=W. Michael Petullo -PKG_LICENSE:=GPL-3.0-or-later -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:gnu:bison - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/bison - SECTION:=devel - CATEGORY:=Development - TITLE:=bison - URL:=http://www.gnu.org/software/bison/ -endef - -define Package/bison/description - Bison is a general-purpose parser generator -endef - -CONFIGURE_ARGS += --enable-threads=posix --disable-nls - -define Package/bison/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/bin/bison \ - $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,bison)) diff --git a/packages/devel/cargo-c/Makefile b/packages/devel/cargo-c/Makefile deleted file mode 100644 index 85f1ee12..00000000 --- a/packages/devel/cargo-c/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2024 Luca Barbato - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cargo-c -PKG_VERSION:=0.9.32 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/lu-zero/cargo-c/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=a96f3cc6c63d9901c9583083338d50b0132504bb067f68accc17f4116ed01f72 - -PKG_MAINTAINER:=Luca Barbato -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -HOST_BUILD_DEPENDS:=rust/host -HOST_BUILD_PARALLEL:=1 -PKG_HOST_ONLY:=1 - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk -include ../../lang/rust/rust-host-build.mk - -define Package/cargo-c - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Rust - TITLE:=Build and install rust crates as C libraries - DEPENDS:=$(RUST_ARCH_DEPENDS) - URL:=https://github.com/lu-zero/cargo-c - BUILDONLY:=1 -endef - -define Package/cargo-c/description - Build and install crates with C bindings so they appear as normal - C libraries. -endef - -$(eval $(call RustBinHostBuild)) -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,cargo-c)) diff --git a/packages/devel/delve/Makefile b/packages/devel/delve/Makefile deleted file mode 100644 index 4b00638a..00000000 --- a/packages/devel/delve/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=delve -PKG_VERSION:=1.22.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/go-delve/delve/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=fe6f0d97c233d4f0f1ed422c11508cc57c14e9e0915f9a258f1912c46824cbfb - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:= - -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -GO_PKG:=github.com/go-delve/delve/ -GO_PKG_BUILD_PKG:=github.com/go-delve/delve/cmd/dlv/ -GO_PKG_LDFLAGS_X:=main.Build=$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../../lang/golang/golang-package.mk - -# this is a subset of $(GO_ARCH_DEPENDS) as delve does not support all -# architectures, see build constraints in -# https://github.com/go-delve/delve/blob/v$(PKG_VERSION)/pkg/proc/native/support_sentinel.go -DELVE_GO_ARCH_DEPENDS:=@(aarch64||i386||x86_64) - -define Package/delve - SECTION:=devel - CATEGORY:=Development - TITLE:=Debugger for the Go programming language - URL:=https://github.com/go-delve/delve - DEPENDS:=$(DELVE_GO_ARCH_DEPENDS) -endef - -define Package/delve/description - Delve is a debugger for the Go programming language. The goal of the - project is to provide a simple, full featured debugging tool for Go. - Delve should be easy to invoke and easy to use. Chances are if you're - using a debugger, things aren't going your way. With that in mind, - Delve should stay out of your way as much as possible. -endef - -$(eval $(call GoBinPackage,delve)) -$(eval $(call BuildPackage,delve)) diff --git a/packages/devel/diffutils/Makefile b/packages/devel/diffutils/Makefile deleted file mode 100644 index dfd5e0f7..00000000 --- a/packages/devel/diffutils/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=diffutils -PKG_VERSION:=3.10 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/diffutils -PKG_HASH:=90e5e93cc724e4ebe12ede80df1634063c7a855692685919bfe60b556c9bd09e - -PKG_MAINTAINER:=Roger D -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:gnu:diffutils - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/diffutils - SECTION:=devel - CATEGORY:=Development - DEPENDS:=+USE_GLIBC:librt - TITLE:=diffutils - URL:=https://www.gnu.org/software/diffutils/ - ALTERNATIVES:=\ - 200:/usr/bin/cmp:/usr/libexec/cmp-gnu \ - 200:/usr/bin/diff:/usr/libexec/diff-gnu -endef - -define Package/diffutils/description - The Diffutils package contains programs that show the differences between - files or directories. -endef - -CONFIGURE_VARS += \ - gl_cv_func_getopt_gnu=yes \ - ac_cv_func_mempcpy=n - -define Package/diffutils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3} $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/libexec - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/diff $(1)/usr/libexec/diff-gnu - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmp $(1)/usr/libexec/cmp-gnu -endef - -$(eval $(call BuildPackage,diffutils)) diff --git a/packages/devel/diffutils/patches/010-ppc.patch b/packages/devel/diffutils/patches/010-ppc.patch deleted file mode 100644 index f2b55a58..00000000 --- a/packages/devel/diffutils/patches/010-ppc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/lib/sigsegv.c -+++ b/lib/sigsegv.c -@@ -244,8 +244,8 @@ int libsigsegv_version = LIBSIGSEGV_VERS - /* Assume the structure of ucontext_t in - glibc/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h. */ - /* Because of the union, both definitions should be equivalent. */ --# if 0 --# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] -+# ifndef __GLIBC__ -+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1] - # else - # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] - # endif diff --git a/packages/devel/flex/Makefile b/packages/devel/flex/Makefile deleted file mode 100644 index a61d9535..00000000 --- a/packages/devel/flex/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# SPDX-Identifier-License: GPL-2.0-only -# -# Copyright (C) 2022 W. Michael Petullo - -include $(TOPDIR)/rules.mk - -PKG_NAME:=flex -PKG_VERSION:=2.6.4 -PKG_RELEASE:=4 -PKG_CPE_ID:=cpe:/a:flex_project:flex - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/westes/flex/releases/download/v$(PKG_VERSION)/ -PKG_HASH:=e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995 - -PKG_FIXUP:=autoreconf gettext-version - -PKG_MAINTAINER:=W. Michael Petullo -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/flex - SECTION:=devel - CATEGORY:=Development - TITLE:=flex - URL:=https://github.com/westes/flex -endef - -define Package/flex/description - flex is a tool for generating scanners: programs which recognize lexical patterns in text -endef - -CONFIGURE_ARGS += --disable-shared --disable-bootstrap - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ -endef - -define Package/flex/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/bin/flex \ - $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,flex)) diff --git a/packages/devel/flex/patches/100-disable-all-dirs-except-src.patch b/packages/devel/flex/patches/100-disable-all-dirs-except-src.patch deleted file mode 100644 index e4e72358..00000000 --- a/packages/devel/flex/patches/100-disable-all-dirs-except-src.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -42,12 +42,7 @@ EXTRA_DIST = \ - autogen.sh - - SUBDIRS = \ -- src \ -- doc \ -- examples \ -- po \ -- tests \ -- tools -+ src - - # Create the ChangeLog, but only if we're inside a git working directory - diff --git a/packages/devel/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/packages/devel/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch deleted file mode 100644 index 7c3645c4..00000000 --- a/packages/devel/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 24fd0551333e7eded87b64dd36062da3df2f6380 Mon Sep 17 00:00:00 2001 -From: Explorer09 -Date: Mon, 4 Sep 2017 10:47:33 +0800 -Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac. - -This would, e.g. define _GNU_SOURCE in config.h, enabling the -reallocarray() prototype in glibc 2.26+ on Linux systems with that -version of glibc. - -Fixes #241. ---- - configure.ac | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/configure.ac -+++ b/configure.ac -@@ -25,8 +25,10 @@ - # autoconf requirements and initialization - - AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex]) -+AC_PREREQ([2.60]) - AC_CONFIG_SRCDIR([src/scan.l]) - AC_CONFIG_AUX_DIR([build-aux]) -+AC_USE_SYSTEM_EXTENSIONS - LT_INIT - AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects]) - AC_CONFIG_HEADER([src/config.h]) diff --git a/packages/devel/gcc/Config.in b/packages/devel/gcc/Config.in deleted file mode 100644 index f435b456..00000000 --- a/packages/devel/gcc/Config.in +++ /dev/null @@ -1,34 +0,0 @@ -# gcc library configuration -menu "Libraries" - depends on PACKAGE_gcc - config INCLUDE_STATIC_LIBC - bool "Include static libc on target" - help - Copies libc.a to target device - Increases the size of an already - very large package - default n - config INCLUDE_STATIC_LIBPTHREAD - bool "Include static libptread on target" - help - Copies libpthread.a to target device - Increases the size of an already - very large package - default n - config INCLUDE_STATIC_LIBSTDC - bool "Include static libstdc++ on target" - help - Copies libstdc++.a to target device - Increases the size of an already - very large package - default n - config INCLUDE_STATIC_LINK_SPEC - depends on INCLUDE_STATIC_LIBSTDC - bool "Generate spec file for easy static c++ linking on target" - help - Creates a spec file for gcc to eliminate the need for - -lstdc++, libgcc_pic and -static-libstdc flags when - statically linking c++ programs - default n -endmenu - diff --git a/packages/devel/gcc/Makefile b/packages/devel/gcc/Makefile deleted file mode 100644 index 2e8bbaa5..00000000 --- a/packages/devel/gcc/Makefile +++ /dev/null @@ -1,260 +0,0 @@ -# -# Copyright (C) 2002-2003 Erik Andersen -# Copyright (C) 2004 Manuel Novoa III -# Copyright (C) 2005-2006 Felix Fietkau -# Copyright (C) 2006-2014 OpenWrt.org -# -# 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 - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gcc -GCC_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION)) -PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION))) -GCC_MAJOR_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION))) -PKG_RELEASE:=7 -GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_INSTALL:=1 -PKG_FIXUP:=libtool -PKG_BUILD_PARALLEL:=1 - -PKG_CPE_ID:=cpe:/a:gnu:gcc - -ifeq ($(PKG_VERSION),8.4.0) - PKG_HASH:=e30a6e52d10e1f27ed55104ad233c30bd1e99cfb5ff98ab022dc941edd1b2dd4 -endif - -ifeq ($(PKG_VERSION),10.3.0) - PKG_HASH:=64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344 -endif - -ifeq ($(PKG_VERSION),11.3.0) - PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39 -endif - -ifeq ($(PKG_VERSION),12.3.0) - PKG_HASH:=949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b -endif - -ifeq ($(PKG_VERSION),13.3.0) - PKG_HASH:=0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083 -endif - -ifeq ($(PKG_VERSION),14.2.0) - PKG_HASH:=a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9 -endif - -PATCH_DIR:=patches-$(GCC_MAJOR_VERSION).x - -include $(INCLUDE_DIR)/package.mk - -define Package/gcc - SECTION:=devel - CATEGORY:=Development - TITLE:=gcc - MAINTAINER:=W. Michael Petullo - DEPENDS:= +binutils +libstdcpp +libzstd @!arc - MENU:=1 -endef - -define Package/gcc/config - source "$(SOURCE)/Config.in" -endef - -ifeq ($(CONFIG_INCLUDE_STATIC_LIBC),y) - COPY_STATIC_LIBC=cp -a $(TOOLCHAIN_ROOT_DIR)/lib/libc.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) -endif - -ifeq ($(CONFIG_INCLUDE_STATIC_LIBPTHREAD),y) - COPY_STATIC_LIBPTHREAD=cp -a $(TOOLCHAIN_ROOT_DIR)/lib/libpthread.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) -endif - -ifeq ($(CONFIG_INCLUDE_STATIC_LIBSTDC),y) - COPY_STATIC_LIBSTDC=cp -a $(TOOLCHAIN_ROOT_DIR)/lib/libstdc++.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) -endif - -ifeq ($(CONFIG_INCLUDE_STATIC_LINK_SPEC),y) - INSTALL_STATIC_SPEC=g++ -dumpspecs |sed s/--start-group}\ %G\ %L\ /--start-group}\ %G\ %L\ -lstdc++\ -lgcc_pic\ / >/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/specs - REMOVE_STATIC_SPEC=rm /usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/specs -endif - -TARGET_LANGUAGES:="c,c++" -BUGURL=https://dev.openwrt.org/ -PKGVERSION=OpenWrt GCC $(PKG_VERSION) -TARGET_CPPFLAGS += -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS - -# not using sstrip here as this messes up the .so's somehow -STRIP:=$(firstword $(TOOLCHAIN_BIN_DIRS))/$(TARGET_CROSS)strip -RSTRIP:= \ - NM="$(firstword $(TOOLCHAIN_BIN_DIRS))/$(TARGET_CROSS)nm" \ - STRIP="$(STRIP)" \ - STRIP_KMOD="$(STRIP) --strip-debug" \ - $(SCRIPT_DIR)/rstrip.sh - -ifneq ($(CONFIG_SOFT_FLOAT),y) - ifeq ($(CONFIG_arm),y) - ARM_FLOAT_OPTION:= --with-float=hard - endif -endif - -GMPSRC=gmp-6.1.0 - -define Download/gmp - URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ - FILE:=$(GMPSRC).tar.bz2 - HASH:=498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8 -endef -$(eval $(call Download,gmp)) - -MPCSRC=mpc-1.0.3 - -define Download/mpc - URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ - FILE:=$(MPCSRC).tar.gz - HASH:=617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3 -endef -$(eval $(call Download,mpc)) - -MPFRSRC=mpfr-3.1.4 - -define Download/mpfr - URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ - FILE:=$(MPFRSRC).tar.bz2 - HASH:=d3103a80cdad2407ed581f3618c4bed04e0c92d1cf771a65ead662cc397f7775 -endef -$(eval $(call Download,mpfr)) - -define Build/Prepare - $(PKG_UNPACK) -# we have to download and unpack additional stuff before patching - tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(GMPSRC).tar.bz2 - ln -sf $(PKG_BUILD_DIR)/$(GMPSRC) $(PKG_BUILD_DIR)/gmp - tar -C $(PKG_BUILD_DIR) -xvzf $(DL_DIR)/$(MPCSRC).tar.gz - ln -sf $(PKG_BUILD_DIR)/$(MPCSRC) $(PKG_BUILD_DIR)/mpc - tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(MPFRSRC).tar.bz2 - ln -sf $(PKG_BUILD_DIR)/$(MPFRSRC) $(PKG_BUILD_DIR)/mpfr - $(Build/Patch) -# poor man's fix for `none-openwrt-linux' not recognized when building with musl - cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpfr/ - cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/gmp/ - chmod u+w $(PKG_BUILD_DIR)/mpc/config.sub - cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpc/ -endef - -CONFIGURE_ARGS += CXXFLAGS_FOR_TARGET="-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS" - -define Build/Configure - (cd $(PKG_BUILD_DIR); rm -f config.cache; \ - SHELL="$(BASH)" \ - $(TARGET_CONFIGURE_OPTS) \ - $(PKG_BUILD_DIR)/configure \ - $(CONFIGURE_ARGS) \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(TARGET_LANGUAGES) \ - --with-bugurl=$(BUGURL) \ - --with-pkgversion="$(PKGVERSION)" \ - --enable-shared \ - $(if $(CONFIG_LIBC_USE_GLIBC),--enable,--disable)-__cxa_atexit \ - --with-default-libstdcxx-abi=gcc4-compatible \ - --enable-target-optspace \ - --with-gnu-ld \ - --disable-nls \ - --disable-libsanitizer \ - --disable-libvtv \ - --disable-libcilkrts \ - --disable-libmudflap \ - --disable-libmpx \ - --disable-multilib \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libssp \ - --disable-decimal-float \ - --disable-libstdcxx-pch \ - --with-host-libstdcxx=-lstdc++ \ - --prefix=/usr \ - --libexecdir=/usr/lib \ - --with-local-prefix=/usr \ - --with-stage1-ldflags=-lstdc++ \ - $(ARM_FLOAT_OPTION) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ - ); -endef - -define Build/Compile - export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all - export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) install -endef - -ENVCFLAGS:="$(TARGET_OPTIMIZATION) $(EXTRA_OPTIMIZATION) -ifeq ($(CONFIG_SOFT_FLOAT),y) - ifeq ($(CONFIG_arm),y) - ENVCFLAGS+= -mfloat-abi=soft - else - ENVCFLAGS+= -msoft-float - endif -endif -ENVCFLAGS+=" - -ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib, -lstdc++" - -define Package/gcc/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - cp -ar $(PKG_INSTALL_DIR)/usr/include $(1)/usr - cp -a $(PKG_INSTALL_DIR)/usr/bin/{$(REAL_GNU_TARGET_NAME)-{g++,gcc},cpp,gcov} $(1)/usr/bin - ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/c++ - ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/g++ - ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++ - ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/gcc - ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/cc - ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc-$(PKG_VERSION) - cp -ar $(PKG_INSTALL_DIR)/usr/lib/gcc $(1)/usr/lib - cp -ar $(TOOLCHAIN_ROOT_DIR)/include $(1)/usr - cp -a $(TOOLCHAIN_ROOT_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - cp -a $(TOOLCHAIN_ROOT_DIR)/lib/*nonshared*.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - cp -a $(TOOLCHAIN_ROOT_DIR)/lib/libm.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - $(COPY_STATIC_LIBC) - $(COPY_STATIC_LIBPTHREAD) - $(COPY_STATIC_LIBSTDC) - rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgo* - rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libcc1* - echo '#!/bin/sh' > $(1)/usr/bin/gcc_env.sh - echo 'export LDFLAGS=$(ENVLDFLAGS)' >> $(1)/usr/bin/gcc_env.sh - echo 'export CFLAGS=$(ENVCFLAGS)' >> $(1)/usr/bin/gcc_env.sh - chmod +x $(1)/usr/bin/gcc_env.sh -endef - -ifeq ($(CONFIG_INCLUDE_STATIC_LINK_SPEC),y) -define Package/gcc/postinst -#!/bin/sh - -$(INSTALL_STATIC_SPEC) -endef - -define Package/gcc/postrm -#!/bin/sh - -$(REMOVE_STATIC_SPEC) -endef -endif - -$(eval $(call BuildPackage,gcc)) diff --git a/packages/devel/gcc/README b/packages/devel/gcc/README deleted file mode 100644 index 06ace1a8..00000000 --- a/packages/devel/gcc/README +++ /dev/null @@ -1,10 +0,0 @@ -Native GCC that runs on target. - -To save disk space, this GCC uses dynamic linking on the target box. There -are configuration options to include libstdc++.a, libc.a and libpthread.a -if staticly linked binaries are needed. - -For now, this was only tested on arm (EABI) and mips targets. Others to be -done... - - Christian Beier diff --git a/packages/devel/gcc/patches-10.x/002-case_insensitive.patch b/packages/devel/gcc/patches-10.x/002-case_insensitive.patch deleted file mode 100644 index 409497e5..00000000 --- a/packages/devel/gcc/patches-10.x/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -44,11 +44,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/packages/devel/gcc/patches-10.x/003-dont-choke-when-building-32bit-on-64bit.patch b/packages/devel/gcc/patches-10.x/003-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index c41f35e3..00000000 --- a/packages/devel/gcc/patches-10.x/003-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -77,8 +77,10 @@ struct GTY(()) real_value { - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -+#endif - - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be diff --git a/packages/devel/gcc/patches-10.x/010-documentation.patch b/packages/devel/gcc/patches-10.x/010-documentation.patch deleted file mode 100644 index 85990e5a..00000000 --- a/packages/devel/gcc/patches-10.x/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3285,18 +3285,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/packages/devel/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch b/packages/devel/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index 82ac013d..00000000 --- a/packages/devel/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -3132,6 +3132,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/packages/devel/gcc/patches-10.x/230-musl_libssp.patch b/packages/devel/gcc/patches-10.x/230-musl_libssp.patch deleted file mode 100644 index 63f37662..00000000 --- a/packages/devel/gcc/patches-10.x/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -875,7 +875,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/packages/devel/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch b/packages/devel/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 8c4a5fce..00000000 --- a/packages/devel/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -20041,7 +20041,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/packages/devel/gcc/patches-10.x/810-arm-softfloat-libgcc.patch b/packages/devel/gcc/patches-10.x/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86ae..00000000 --- a/packages/devel/gcc/patches-10.x/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/packages/devel/gcc/patches-10.x/820-libgcc_pic.patch b/packages/devel/gcc/patches-10.x/820-libgcc_pic.patch deleted file mode 100644 index ddd6cf87..00000000 --- a/packages/devel/gcc/patches-10.x/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -929,11 +929,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -957,7 +958,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1163,6 +1164,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/packages/devel/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch b/packages/devel/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index e3cb616c..00000000 --- a/packages/devel/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -91,10 +91,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/packages/devel/gcc/patches-10.x/850-use_shared_libgcc.patch b/packages/devel/gcc/patches-10.x/850-use_shared_libgcc.patch deleted file mode 100644 index 8b17f137..00000000 --- a/packages/devel/gcc/patches-10.x/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -132,10 +132,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_version ("CRuntime_Musl"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -62,6 +62,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/packages/devel/gcc/patches-10.x/851-libgcc_no_compat.patch b/packages/devel/gcc/patches-10.x/851-libgcc_no_compat.patch deleted file mode 100644 index d710e407..00000000 --- a/packages/devel/gcc/patches-10.x/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/packages/devel/gcc/patches-10.x/870-ppc_no_crtsavres.patch b/packages/devel/gcc/patches-10.x/870-ppc_no_crtsavres.patch deleted file mode 100644 index bc182f0c..00000000 --- a/packages/devel/gcc/patches-10.x/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000-logue.c -+++ b/gcc/config/rs6000/rs6000-logue.c -@@ -348,7 +348,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/packages/devel/gcc/patches-10.x/881-no_tm_section.patch b/packages/devel/gcc/patches-10.x/881-no_tm_section.patch deleted file mode 100644 index 2029910f..00000000 --- a/packages/devel/gcc/patches-10.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/packages/devel/gcc/patches-10.x/900-bad-mips16-crt.patch b/packages/devel/gcc/patches-10.x/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc8..00000000 --- a/packages/devel/gcc/patches-10.x/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/packages/devel/gcc/patches-10.x/910-mbsd_multi.patch b/packages/devel/gcc/patches-10.x/910-mbsd_multi.patch deleted file mode 100644 index 3ed62383..00000000 --- a/packages/devel/gcc/patches-10.x/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -455,6 +458,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1168,6 +1177,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1590,6 +1590,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ WarnRemoved - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1660,6 +1660,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -8171,6 +8171,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -2318,6 +2318,9 @@ common_handle_option (struct gcc_options - /* Currently handled in a prescan. */ - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Werror: - dc->warning_as_error_requested = value; - break; diff --git a/packages/devel/gcc/patches-10.x/920-specs_nonfatal_getenv.patch b/packages/devel/gcc/patches-10.x/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 487b9e47..00000000 --- a/packages/devel/gcc/patches-10.x/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9396,8 +9396,10 @@ getenv_spec_function (int argc, const ch - } - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/packages/devel/gcc/patches-10.x/930-fix-mips-noexecstack.patch b/packages/devel/gcc/patches-10.x/930-fix-mips-noexecstack.patch deleted file mode 100644 index e795acd1..00000000 --- a/packages/devel/gcc/patches-10.x/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22881,6 +22881,9 @@ mips_asm_file_end (void) - #define TARGET_ASM_FILE_END mips_asm_file_end - - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -24,6 +24,10 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -24,6 +24,9 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -29,6 +29,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/packages/devel/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch b/packages/devel/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index fb4cb153..00000000 --- a/packages/devel/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] libffi: fix MIPS softfloat build issue - -Backported from github.com/libffi/libffi#272 - -Signed-off-by: BangLang Huang -Signed-off-by: Yousong Zhou ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/packages/devel/gcc/patches-11.x/002-case_insensitive.patch b/packages/devel/gcc/patches-11.x/002-case_insensitive.patch deleted file mode 100644 index 409497e5..00000000 --- a/packages/devel/gcc/patches-11.x/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -44,11 +44,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/packages/devel/gcc/patches-11.x/003-dont-choke-when-building-32bit-on-64bit.patch b/packages/devel/gcc/patches-11.x/003-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index c41f35e3..00000000 --- a/packages/devel/gcc/patches-11.x/003-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -77,8 +77,10 @@ struct GTY(()) real_value { - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -+#endif - - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be diff --git a/packages/devel/gcc/patches-11.x/010-documentation.patch b/packages/devel/gcc/patches-11.x/010-documentation.patch deleted file mode 100644 index 25a5e1e9..00000000 --- a/packages/devel/gcc/patches-11.x/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3348,18 +3348,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/packages/devel/gcc/patches-11.x/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch b/packages/devel/gcc/patches-11.x/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch deleted file mode 100644 index 423def60..00000000 --- a/packages/devel/gcc/patches-11.x/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ea650cae26da4a8fc04f0c4666f4dd776d0b5fc0 Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy -Date: Sun, 14 Nov 2021 21:54:25 -0800 -Subject: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl - -musl only uses PT_GNU_STACK to set default thread stack size and has no -executable stack support[0], so there is no reason not to emit the -.note.GNU-stack section on musl builds. - -[0]: https://lore.kernel.org/all/20190423192534.GN23599@brightrain.aerifal.cx/T/#u - -gcc/ChangeLog: - - * configure: Regenerate. - * configure.ac: define TARGET_LIBC_GNUSTACK on musl - -Signed-off-by: Ilya Lipnitskiy ---- - gcc/configure | 3 +++ - gcc/configure.ac | 3 +++ - 2 files changed, 6 insertions(+) - ---- a/gcc/configure -+++ b/gcc/configure -@@ -31533,6 +31533,9 @@ fi - # Check if the target LIBC handles PT_GNU_STACK. - gcc_cv_libc_gnustack=unknown - case "$target" in -+ mips*-*-linux-musl*) -+ gcc_cv_libc_gnustack=yes -+ ;; - mips*-*-linux*) - - if test $glibc_version_major -gt 2 \ ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -7023,6 +7023,9 @@ fi - # Check if the target LIBC handles PT_GNU_STACK. - gcc_cv_libc_gnustack=unknown - case "$target" in -+ mips*-*-linux-musl*) -+ gcc_cv_libc_gnustack=yes -+ ;; - mips*-*-linux*) - GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], ) - ;; diff --git a/packages/devel/gcc/patches-11.x/110-Fix-MIPS-PR-84790.patch b/packages/devel/gcc/patches-11.x/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index 82ac013d..00000000 --- a/packages/devel/gcc/patches-11.x/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -3132,6 +3132,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/packages/devel/gcc/patches-11.x/230-musl_libssp.patch b/packages/devel/gcc/patches-11.x/230-musl_libssp.patch deleted file mode 100644 index 66b88bc9..00000000 --- a/packages/devel/gcc/patches-11.x/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -978,7 +978,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/packages/devel/gcc/patches-11.x/300-mips_Os_cpu_rtx_cost_model.patch b/packages/devel/gcc/patches-11.x/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 8c4a5fce..00000000 --- a/packages/devel/gcc/patches-11.x/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -20041,7 +20041,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/packages/devel/gcc/patches-11.x/810-arm-softfloat-libgcc.patch b/packages/devel/gcc/patches-11.x/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86ae..00000000 --- a/packages/devel/gcc/patches-11.x/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/packages/devel/gcc/patches-11.x/820-libgcc_pic.patch b/packages/devel/gcc/patches-11.x/820-libgcc_pic.patch deleted file mode 100644 index 525a95b5..00000000 --- a/packages/devel/gcc/patches-11.x/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -930,11 +930,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -958,7 +959,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1164,6 +1165,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/packages/devel/gcc/patches-11.x/840-armv4_pass_fix-v4bx_to_ld.patch b/packages/devel/gcc/patches-11.x/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index e3cb616c..00000000 --- a/packages/devel/gcc/patches-11.x/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -91,10 +91,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/packages/devel/gcc/patches-11.x/850-use_shared_libgcc.patch b/packages/devel/gcc/patches-11.x/850-use_shared_libgcc.patch deleted file mode 100644 index 8b17f137..00000000 --- a/packages/devel/gcc/patches-11.x/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -132,10 +132,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_version ("CRuntime_Musl"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -62,6 +62,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/packages/devel/gcc/patches-11.x/851-libgcc_no_compat.patch b/packages/devel/gcc/patches-11.x/851-libgcc_no_compat.patch deleted file mode 100644 index d710e407..00000000 --- a/packages/devel/gcc/patches-11.x/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/packages/devel/gcc/patches-11.x/870-ppc_no_crtsavres.patch b/packages/devel/gcc/patches-11.x/870-ppc_no_crtsavres.patch deleted file mode 100644 index bc182f0c..00000000 --- a/packages/devel/gcc/patches-11.x/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000-logue.c -+++ b/gcc/config/rs6000/rs6000-logue.c -@@ -348,7 +348,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/packages/devel/gcc/patches-11.x/881-no_tm_section.patch b/packages/devel/gcc/patches-11.x/881-no_tm_section.patch deleted file mode 100644 index 2029910f..00000000 --- a/packages/devel/gcc/patches-11.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/packages/devel/gcc/patches-11.x/900-bad-mips16-crt.patch b/packages/devel/gcc/patches-11.x/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc8..00000000 --- a/packages/devel/gcc/patches-11.x/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/packages/devel/gcc/patches-11.x/910-mbsd_multi.patch b/packages/devel/gcc/patches-11.x/910-mbsd_multi.patch deleted file mode 100644 index 21f53204..00000000 --- a/packages/devel/gcc/patches-11.x/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -469,6 +472,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1198,6 +1207,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1663,6 +1663,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ WarnRemoved - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1698,6 +1698,9 @@ fguess-branch-probability - Common Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -9058,6 +9058,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -2448,6 +2448,9 @@ common_handle_option (struct gcc_options - /* Currently handled in a prescan. */ - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Werror: - dc->warning_as_error_requested = value; - break; diff --git a/packages/devel/gcc/patches-11.x/920-specs_nonfatal_getenv.patch b/packages/devel/gcc/patches-11.x/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 83bcb25a..00000000 --- a/packages/devel/gcc/patches-11.x/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -10106,8 +10106,10 @@ getenv_spec_function (int argc, const ch - } - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/packages/devel/gcc/patches-11.x/931-libffi-fix-MIPS-softfloat-build-issue.patch b/packages/devel/gcc/patches-11.x/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index fb4cb153..00000000 --- a/packages/devel/gcc/patches-11.x/931-libffi-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] libffi: fix MIPS softfloat build issue - -Backported from github.com/libffi/libffi#272 - -Signed-off-by: BangLang Huang -Signed-off-by: Yousong Zhou ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/packages/devel/gcc/patches-11.x/970-macos_arm64-building-fix.patch b/packages/devel/gcc/patches-11.x/970-macos_arm64-building-fix.patch deleted file mode 100644 index 424899eb..00000000 --- a/packages/devel/gcc/patches-11.x/970-macos_arm64-building-fix.patch +++ /dev/null @@ -1,45 +0,0 @@ -commit 9c6e71079b46ad5433165feaa2001450f2017b56 -Author: Przemysław Buczkowski -Date: Mon Aug 16 13:16:21 2021 +0100 - - GCC: Patch for Apple Silicon compatibility - - This patch fixes a linker error occuring when compiling - the cross-compiler on macOS and ARM64 architecture. - - Adapted from: - https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404 - - Change-Id: Ia3ee98a163bbb62689f42e2da83a5ef36beb0913 - Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4329 - Reviewed-by: John Scipione - Reviewed-by: Adrien Destugues - ---- a/gcc/config/aarch64/aarch64.h -+++ b/gcc/config/aarch64/aarch64.h -@@ -1236,7 +1236,7 @@ extern const char *aarch64_rewrite_mcpu - #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ - { "rewrite_mcpu", aarch64_rewrite_mcpu }, - --#if defined(__aarch64__) -+#if defined(__aarch64__) && ! defined(__APPLE__) - extern const char *host_detect_local_cpu (int argc, const char **argv); - #define HAVE_LOCAL_CPU_DETECT - # define EXTRA_SPEC_FUNCTIONS \ ---- a/gcc/config/host-darwin.c -+++ b/gcc/config/host-darwin.c -@@ -22,6 +22,8 @@ - #include "coretypes.h" - #include "diagnostic-core.h" - #include "config/host-darwin.h" -+#include "hosthooks.h" -+#include "hosthooks-def.h" - - /* Yes, this is really supposed to work. */ - /* This allows for a pagesize of 16384, which we have on Darwin20, but should -@@ -79,3 +81,5 @@ darwin_gt_pch_use_address (void *addr, s - - return ret; - } -+ -+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/packages/devel/gcc/patches-12.x/002-case_insensitive.patch b/packages/devel/gcc/patches-12.x/002-case_insensitive.patch deleted file mode 100644 index 409497e5..00000000 --- a/packages/devel/gcc/patches-12.x/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -44,11 +44,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/packages/devel/gcc/patches-12.x/003-dont-choke-when-building-32bit-on-64bit.patch b/packages/devel/gcc/patches-12.x/003-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index c41f35e3..00000000 --- a/packages/devel/gcc/patches-12.x/003-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -77,8 +77,10 @@ struct GTY(()) real_value { - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -+#endif - - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be diff --git a/packages/devel/gcc/patches-12.x/010-documentation.patch b/packages/devel/gcc/patches-12.x/010-documentation.patch deleted file mode 100644 index 39ee48ed..00000000 --- a/packages/devel/gcc/patches-12.x/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3366,18 +3366,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/packages/devel/gcc/patches-12.x/110-Fix-MIPS-PR-84790.patch b/packages/devel/gcc/patches-12.x/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index 856fd6a4..00000000 --- a/packages/devel/gcc/patches-12.x/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.cc -+++ b/gcc/config/mips/mips.cc -@@ -3134,6 +3134,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/packages/devel/gcc/patches-12.x/230-musl_libssp.patch b/packages/devel/gcc/patches-12.x/230-musl_libssp.patch deleted file mode 100644 index a909d638..00000000 --- a/packages/devel/gcc/patches-12.x/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.cc -+++ b/gcc/gcc.cc -@@ -987,7 +987,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/packages/devel/gcc/patches-12.x/300-mips_Os_cpu_rtx_cost_model.patch b/packages/devel/gcc/patches-12.x/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 1d223f2a..00000000 --- a/packages/devel/gcc/patches-12.x/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.cc -+++ b/gcc/config/mips/mips.cc -@@ -20216,7 +20216,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/packages/devel/gcc/patches-12.x/700-RISCV-Inline-subword-atomic-ops.patch b/packages/devel/gcc/patches-12.x/700-RISCV-Inline-subword-atomic-ops.patch deleted file mode 100644 index b164c765..00000000 --- a/packages/devel/gcc/patches-12.x/700-RISCV-Inline-subword-atomic-ops.patch +++ /dev/null @@ -1,2021 +0,0 @@ -From f797260adaf52bee0ec0e16190bbefbe1bfc3692 Mon Sep 17 00:00:00 2001 -From: Patrick O'Neill -Date: Tue, 18 Apr 2023 14:33:13 -0700 -Subject: [PATCH] RISCV: Inline subword atomic ops - -RISC-V has no support for subword atomic operations; code currently -generates libatomic library calls. - -This patch changes the default behavior to inline subword atomic calls -(using the same logic as the existing library call). -Behavior can be specified using the -minline-atomics and --mno-inline-atomics command line flags. - -gcc/libgcc/config/riscv/atomic.c has the same logic implemented in asm. -This will need to stay for backwards compatibility and the --mno-inline-atomics flag. - -2023-04-18 Patrick O'Neill - -gcc/ChangeLog: - PR target/104338 - * config/riscv/riscv-protos.h: Add helper function stubs. - * config/riscv/riscv.cc: Add helper functions for subword masking. - * config/riscv/riscv.opt: Add command-line flag. - * config/riscv/sync.md: Add masking logic and inline asm for fetch_and_op, - fetch_and_nand, CAS, and exchange ops. - * doc/invoke.texi: Add blurb regarding command-line flag. - -libgcc/ChangeLog: - PR target/104338 - * config/riscv/atomic.c: Add reference to duplicate logic. - -gcc/testsuite/ChangeLog: - PR target/104338 - * gcc.target/riscv/inline-atomics-1.c: New test. - * gcc.target/riscv/inline-atomics-2.c: New test. - * gcc.target/riscv/inline-atomics-3.c: New test. - * gcc.target/riscv/inline-atomics-4.c: New test. - * gcc.target/riscv/inline-atomics-5.c: New test. - * gcc.target/riscv/inline-atomics-6.c: New test. - * gcc.target/riscv/inline-atomics-7.c: New test. - * gcc.target/riscv/inline-atomics-8.c: New test. - -Signed-off-by: Patrick O'Neill -Signed-off-by: Palmer Dabbelt ---- - gcc/config/riscv/riscv-protos.h | 2 + - gcc/config/riscv/riscv.cc | 49 ++ - gcc/config/riscv/riscv.opt | 4 + - gcc/config/riscv/sync.md | 301 +++++++++ - gcc/doc/invoke.texi | 10 +- - .../gcc.target/riscv/inline-atomics-1.c | 18 + - .../gcc.target/riscv/inline-atomics-2.c | 9 + - .../gcc.target/riscv/inline-atomics-3.c | 569 ++++++++++++++++++ - .../gcc.target/riscv/inline-atomics-4.c | 566 +++++++++++++++++ - .../gcc.target/riscv/inline-atomics-5.c | 87 +++ - .../gcc.target/riscv/inline-atomics-6.c | 87 +++ - .../gcc.target/riscv/inline-atomics-7.c | 69 +++ - .../gcc.target/riscv/inline-atomics-8.c | 69 +++ - libgcc/config/riscv/atomic.c | 2 + - 14 files changed, 1841 insertions(+), 1 deletion(-) - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-1.c - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-2.c - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-3.c - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-4.c - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-5.c - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-6.c - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-7.c - create mode 100644 gcc/testsuite/gcc.target/riscv/inline-atomics-8.c - ---- a/gcc/config/riscv/riscv-protos.h -+++ b/gcc/config/riscv/riscv-protos.h -@@ -74,6 +74,8 @@ extern bool riscv_expand_block_move (rtx - extern bool riscv_store_data_bypass_p (rtx_insn *, rtx_insn *); - extern rtx riscv_gen_gpr_save_insn (struct riscv_frame_info *); - extern bool riscv_gpr_save_operation_p (rtx); -+extern void riscv_subword_address (rtx, rtx *, rtx *, rtx *, rtx *); -+extern void riscv_lshift_subword (machine_mode, rtx, rtx, rtx *); - - /* Routines implemented in riscv-c.cc. */ - void riscv_cpu_cpp_builtins (cpp_reader *); ---- a/gcc/config/riscv/riscv.cc -+++ b/gcc/config/riscv/riscv.cc -@@ -5605,6 +5605,55 @@ riscv_asan_shadow_offset (void) - return TARGET_64BIT ? (HOST_WIDE_INT_1 << 29) : 0; - } - -+/* Given memory reference MEM, expand code to compute the aligned -+ memory address, shift and mask values and store them into -+ *ALIGNED_MEM, *SHIFT, *MASK and *NOT_MASK. */ -+ -+void -+riscv_subword_address (rtx mem, rtx *aligned_mem, rtx *shift, rtx *mask, -+ rtx *not_mask) -+{ -+ /* Align the memory address to a word. */ -+ rtx addr = force_reg (Pmode, XEXP (mem, 0)); -+ -+ rtx addr_mask = gen_int_mode (-4, Pmode); -+ -+ rtx aligned_addr = gen_reg_rtx (Pmode); -+ emit_move_insn (aligned_addr, gen_rtx_AND (Pmode, addr, addr_mask)); -+ -+ *aligned_mem = change_address (mem, SImode, aligned_addr); -+ -+ /* Calculate the shift amount. */ -+ emit_move_insn (*shift, gen_rtx_AND (SImode, gen_lowpart (SImode, addr), -+ gen_int_mode (3, SImode))); -+ emit_move_insn (*shift, gen_rtx_ASHIFT (SImode, *shift, -+ gen_int_mode (3, SImode))); -+ -+ /* Calculate the mask. */ -+ int unshifted_mask = GET_MODE_MASK (GET_MODE (mem)); -+ -+ emit_move_insn (*mask, gen_int_mode (unshifted_mask, SImode)); -+ -+ emit_move_insn (*mask, gen_rtx_ASHIFT (SImode, *mask, -+ gen_lowpart (QImode, *shift))); -+ -+ emit_move_insn (*not_mask, gen_rtx_NOT(SImode, *mask)); -+} -+ -+/* Leftshift a subword within an SImode register. */ -+ -+void -+riscv_lshift_subword (machine_mode mode, rtx value, rtx shift, -+ rtx *shifted_value) -+{ -+ rtx value_reg = gen_reg_rtx (SImode); -+ emit_move_insn (value_reg, simplify_gen_subreg (SImode, value, -+ mode, 0)); -+ -+ emit_move_insn(*shifted_value, gen_rtx_ASHIFT (SImode, value_reg, -+ gen_lowpart (QImode, shift))); -+} -+ - /* Initialize the GCC target structure. */ - #undef TARGET_ASM_ALIGNED_HI_OP - #define TARGET_ASM_ALIGNED_HI_OP "\t.half\t" ---- a/gcc/config/riscv/riscv.opt -+++ b/gcc/config/riscv/riscv.opt -@@ -209,6 +209,10 @@ int riscv_vector_elen_flags - TargetVariable - int riscv_zvl_flags - -+minline-atomics -+Target Var(TARGET_INLINE_SUBWORD_ATOMIC) Init(1) -+Always inline subword atomic operations. -+ - Enum - Name(isa_spec_class) Type(enum riscv_isa_spec_class) - Supported ISA specs (for use with the -misa-spec= option): ---- a/gcc/config/riscv/sync.md -+++ b/gcc/config/riscv/sync.md -@@ -21,8 +21,11 @@ - - (define_c_enum "unspec" [ - UNSPEC_COMPARE_AND_SWAP -+ UNSPEC_COMPARE_AND_SWAP_SUBWORD - UNSPEC_SYNC_OLD_OP -+ UNSPEC_SYNC_OLD_OP_SUBWORD - UNSPEC_SYNC_EXCHANGE -+ UNSPEC_SYNC_EXCHANGE_SUBWORD - UNSPEC_ATOMIC_STORE - UNSPEC_MEMORY_BARRIER - ]) -@@ -92,6 +95,135 @@ - "%F3amo.%A3 %0,%z2,%1" - [(set (attr "length") (const_int 8))]) - -+(define_insn "subword_atomic_fetch_strong_" -+ [(set (match_operand:SI 0 "register_operand" "=&r") ;; old value at mem -+ (match_operand:SI 1 "memory_operand" "+A")) ;; mem location -+ (set (match_dup 1) -+ (unspec_volatile:SI -+ [(any_atomic:SI (match_dup 1) -+ (match_operand:SI 2 "register_operand" "rI")) ;; value for op -+ (match_operand:SI 3 "register_operand" "rI")] ;; mask -+ UNSPEC_SYNC_OLD_OP_SUBWORD)) -+ (match_operand:SI 4 "register_operand" "rI") ;; not_mask -+ (clobber (match_scratch:SI 5 "=&r")) ;; tmp_1 -+ (clobber (match_scratch:SI 6 "=&r"))] ;; tmp_2 -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+ { -+ return "1:\;" -+ "lr.w.aq\t%0, %1\;" -+ "\t%5, %0, %2\;" -+ "and\t%5, %5, %3\;" -+ "and\t%6, %0, %4\;" -+ "or\t%6, %6, %5\;" -+ "sc.w.rl\t%5, %6, %1\;" -+ "bnez\t%5, 1b"; -+ } -+ [(set (attr "length") (const_int 28))]) -+ -+(define_expand "atomic_fetch_nand" -+ [(match_operand:SHORT 0 "register_operand") ;; old value at mem -+ (not:SHORT (and:SHORT (match_operand:SHORT 1 "memory_operand") ;; mem location -+ (match_operand:SHORT 2 "reg_or_0_operand"))) ;; value for op -+ (match_operand:SI 3 "const_int_operand")] ;; model -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+{ -+ /* We have no QImode/HImode atomics, so form a mask, then use -+ subword_atomic_fetch_strong_nand to implement a LR/SC version of the -+ operation. */ -+ -+ /* Logic duplicated in gcc/libgcc/config/riscv/atomic.c for use when inlining -+ is disabled */ -+ -+ rtx old = gen_reg_rtx (SImode); -+ rtx mem = operands[1]; -+ rtx value = operands[2]; -+ rtx aligned_mem = gen_reg_rtx (SImode); -+ rtx shift = gen_reg_rtx (SImode); -+ rtx mask = gen_reg_rtx (SImode); -+ rtx not_mask = gen_reg_rtx (SImode); -+ -+ riscv_subword_address (mem, &aligned_mem, &shift, &mask, ¬_mask); -+ -+ rtx shifted_value = gen_reg_rtx (SImode); -+ riscv_lshift_subword (mode, value, shift, &shifted_value); -+ -+ emit_insn (gen_subword_atomic_fetch_strong_nand (old, aligned_mem, -+ shifted_value, -+ mask, not_mask)); -+ -+ emit_move_insn (old, gen_rtx_ASHIFTRT (SImode, old, -+ gen_lowpart (QImode, shift))); -+ -+ emit_move_insn (operands[0], gen_lowpart (mode, old)); -+ -+ DONE; -+}) -+ -+(define_insn "subword_atomic_fetch_strong_nand" -+ [(set (match_operand:SI 0 "register_operand" "=&r") ;; old value at mem -+ (match_operand:SI 1 "memory_operand" "+A")) ;; mem location -+ (set (match_dup 1) -+ (unspec_volatile:SI -+ [(not:SI (and:SI (match_dup 1) -+ (match_operand:SI 2 "register_operand" "rI"))) ;; value for op -+ (match_operand:SI 3 "register_operand" "rI")] ;; mask -+ UNSPEC_SYNC_OLD_OP_SUBWORD)) -+ (match_operand:SI 4 "register_operand" "rI") ;; not_mask -+ (clobber (match_scratch:SI 5 "=&r")) ;; tmp_1 -+ (clobber (match_scratch:SI 6 "=&r"))] ;; tmp_2 -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+ { -+ return "1:\;" -+ "lr.w.aq\t%0, %1\;" -+ "and\t%5, %0, %2\;" -+ "not\t%5, %5\;" -+ "and\t%5, %5, %3\;" -+ "and\t%6, %0, %4\;" -+ "or\t%6, %6, %5\;" -+ "sc.w.rl\t%5, %6, %1\;" -+ "bnez\t%5, 1b"; -+ } -+ [(set (attr "length") (const_int 32))]) -+ -+(define_expand "atomic_fetch_" -+ [(match_operand:SHORT 0 "register_operand") ;; old value at mem -+ (any_atomic:SHORT (match_operand:SHORT 1 "memory_operand") ;; mem location -+ (match_operand:SHORT 2 "reg_or_0_operand")) ;; value for op -+ (match_operand:SI 3 "const_int_operand")] ;; model -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+{ -+ /* We have no QImode/HImode atomics, so form a mask, then use -+ subword_atomic_fetch_strong_ to implement a LR/SC version of the -+ operation. */ -+ -+ /* Logic duplicated in gcc/libgcc/config/riscv/atomic.c for use when inlining -+ is disabled */ -+ -+ rtx old = gen_reg_rtx (SImode); -+ rtx mem = operands[1]; -+ rtx value = operands[2]; -+ rtx aligned_mem = gen_reg_rtx (SImode); -+ rtx shift = gen_reg_rtx (SImode); -+ rtx mask = gen_reg_rtx (SImode); -+ rtx not_mask = gen_reg_rtx (SImode); -+ -+ riscv_subword_address (mem, &aligned_mem, &shift, &mask, ¬_mask); -+ -+ rtx shifted_value = gen_reg_rtx (SImode); -+ riscv_lshift_subword (mode, value, shift, &shifted_value); -+ -+ emit_insn (gen_subword_atomic_fetch_strong_ (old, aligned_mem, -+ shifted_value, -+ mask, not_mask)); -+ -+ emit_move_insn (old, gen_rtx_ASHIFTRT (SImode, old, -+ gen_lowpart (QImode, shift))); -+ -+ emit_move_insn (operands[0], gen_lowpart (mode, old)); -+ -+ DONE; -+}) -+ - (define_insn "atomic_exchange" - [(set (match_operand:GPR 0 "register_operand" "=&r") - (unspec_volatile:GPR -@@ -104,6 +236,56 @@ - "%F3amoswap.%A3 %0,%z2,%1" - [(set (attr "length") (const_int 8))]) - -+(define_expand "atomic_exchange" -+ [(match_operand:SHORT 0 "register_operand") ;; old value at mem -+ (match_operand:SHORT 1 "memory_operand") ;; mem location -+ (match_operand:SHORT 2 "register_operand") ;; value -+ (match_operand:SI 3 "const_int_operand")] ;; model -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+{ -+ rtx old = gen_reg_rtx (SImode); -+ rtx mem = operands[1]; -+ rtx value = operands[2]; -+ rtx aligned_mem = gen_reg_rtx (SImode); -+ rtx shift = gen_reg_rtx (SImode); -+ rtx mask = gen_reg_rtx (SImode); -+ rtx not_mask = gen_reg_rtx (SImode); -+ -+ riscv_subword_address (mem, &aligned_mem, &shift, &mask, ¬_mask); -+ -+ rtx shifted_value = gen_reg_rtx (SImode); -+ riscv_lshift_subword (mode, value, shift, &shifted_value); -+ -+ emit_insn (gen_subword_atomic_exchange_strong (old, aligned_mem, -+ shifted_value, not_mask)); -+ -+ emit_move_insn (old, gen_rtx_ASHIFTRT (SImode, old, -+ gen_lowpart (QImode, shift))); -+ -+ emit_move_insn (operands[0], gen_lowpart (mode, old)); -+ DONE; -+}) -+ -+(define_insn "subword_atomic_exchange_strong" -+ [(set (match_operand:SI 0 "register_operand" "=&r") ;; old value at mem -+ (match_operand:SI 1 "memory_operand" "+A")) ;; mem location -+ (set (match_dup 1) -+ (unspec_volatile:SI -+ [(match_operand:SI 2 "reg_or_0_operand" "rI") ;; value -+ (match_operand:SI 3 "reg_or_0_operand" "rI")] ;; not_mask -+ UNSPEC_SYNC_EXCHANGE_SUBWORD)) -+ (clobber (match_scratch:SI 4 "=&r"))] ;; tmp_1 -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+ { -+ return "1:\;" -+ "lr.w.aq\t%0, %1\;" -+ "and\t%4, %0, %3\;" -+ "or\t%4, %4, %2\;" -+ "sc.w.rl\t%4, %4, %1\;" -+ "bnez\t%4, 1b"; -+ } -+ [(set (attr "length") (const_int 20))]) -+ - (define_insn "atomic_cas_value_strong" - [(set (match_operand:GPR 0 "register_operand" "=&r") - (match_operand:GPR 1 "memory_operand" "+A")) -@@ -152,6 +334,125 @@ - DONE; - }) - -+(define_expand "atomic_compare_and_swap" -+ [(match_operand:SI 0 "register_operand") ;; bool output -+ (match_operand:SHORT 1 "register_operand") ;; val output -+ (match_operand:SHORT 2 "memory_operand") ;; memory -+ (match_operand:SHORT 3 "reg_or_0_operand") ;; expected value -+ (match_operand:SHORT 4 "reg_or_0_operand") ;; desired value -+ (match_operand:SI 5 "const_int_operand") ;; is_weak -+ (match_operand:SI 6 "const_int_operand") ;; mod_s -+ (match_operand:SI 7 "const_int_operand")] ;; mod_f -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+{ -+ emit_insn (gen_atomic_cas_value_strong (operands[1], operands[2], -+ operands[3], operands[4], -+ operands[6], operands[7])); -+ -+ rtx val = gen_reg_rtx (SImode); -+ if (operands[1] != const0_rtx) -+ emit_move_insn (val, gen_rtx_SIGN_EXTEND (SImode, operands[1])); -+ else -+ emit_move_insn (val, const0_rtx); -+ -+ rtx exp = gen_reg_rtx (SImode); -+ if (operands[3] != const0_rtx) -+ emit_move_insn (exp, gen_rtx_SIGN_EXTEND (SImode, operands[3])); -+ else -+ emit_move_insn (exp, const0_rtx); -+ -+ rtx compare = val; -+ if (exp != const0_rtx) -+ { -+ rtx difference = gen_rtx_MINUS (SImode, val, exp); -+ compare = gen_reg_rtx (SImode); -+ emit_move_insn (compare, difference); -+ } -+ -+ if (word_mode != SImode) -+ { -+ rtx reg = gen_reg_rtx (word_mode); -+ emit_move_insn (reg, gen_rtx_SIGN_EXTEND (word_mode, compare)); -+ compare = reg; -+ } -+ -+ emit_move_insn (operands[0], gen_rtx_EQ (SImode, compare, const0_rtx)); -+ DONE; -+}) -+ -+(define_expand "atomic_cas_value_strong" -+ [(match_operand:SHORT 0 "register_operand") ;; val output -+ (match_operand:SHORT 1 "memory_operand") ;; memory -+ (match_operand:SHORT 2 "reg_or_0_operand") ;; expected value -+ (match_operand:SHORT 3 "reg_or_0_operand") ;; desired value -+ (match_operand:SI 4 "const_int_operand") ;; mod_s -+ (match_operand:SI 5 "const_int_operand") ;; mod_f -+ (match_scratch:SHORT 6)] -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+{ -+ /* We have no QImode/HImode atomics, so form a mask, then use -+ subword_atomic_cas_strong to implement a LR/SC version of the -+ operation. */ -+ -+ /* Logic duplicated in gcc/libgcc/config/riscv/atomic.c for use when inlining -+ is disabled */ -+ -+ rtx old = gen_reg_rtx (SImode); -+ rtx mem = operands[1]; -+ rtx aligned_mem = gen_reg_rtx (SImode); -+ rtx shift = gen_reg_rtx (SImode); -+ rtx mask = gen_reg_rtx (SImode); -+ rtx not_mask = gen_reg_rtx (SImode); -+ -+ riscv_subword_address (mem, &aligned_mem, &shift, &mask, ¬_mask); -+ -+ rtx o = operands[2]; -+ rtx n = operands[3]; -+ rtx shifted_o = gen_reg_rtx (SImode); -+ rtx shifted_n = gen_reg_rtx (SImode); -+ -+ riscv_lshift_subword (mode, o, shift, &shifted_o); -+ riscv_lshift_subword (mode, n, shift, &shifted_n); -+ -+ emit_move_insn (shifted_o, gen_rtx_AND (SImode, shifted_o, mask)); -+ emit_move_insn (shifted_n, gen_rtx_AND (SImode, shifted_n, mask)); -+ -+ emit_insn (gen_subword_atomic_cas_strong (old, aligned_mem, -+ shifted_o, shifted_n, -+ mask, not_mask)); -+ -+ emit_move_insn (old, gen_rtx_ASHIFTRT (SImode, old, -+ gen_lowpart (QImode, shift))); -+ -+ emit_move_insn (operands[0], gen_lowpart (mode, old)); -+ -+ DONE; -+}) -+ -+(define_insn "subword_atomic_cas_strong" -+ [(set (match_operand:SI 0 "register_operand" "=&r") ;; old value at mem -+ (match_operand:SI 1 "memory_operand" "+A")) ;; mem location -+ (set (match_dup 1) -+ (unspec_volatile:SI [(match_operand:SI 2 "reg_or_0_operand" "rJ") ;; expected value -+ (match_operand:SI 3 "reg_or_0_operand" "rJ")] ;; desired value -+ UNSPEC_COMPARE_AND_SWAP_SUBWORD)) -+ (match_operand:SI 4 "register_operand" "rI") ;; mask -+ (match_operand:SI 5 "register_operand" "rI") ;; not_mask -+ (clobber (match_scratch:SI 6 "=&r"))] ;; tmp_1 -+ "TARGET_ATOMIC && TARGET_INLINE_SUBWORD_ATOMIC" -+ { -+ return "1:\;" -+ "lr.w.aq\t%0, %1\;" -+ "and\t%6, %0, %4\;" -+ "bne\t%6, %z2, 1f\;" -+ "and\t%6, %0, %5\;" -+ "or\t%6, %6, %3\;" -+ "sc.w.rl\t%6, %6, %1\;" -+ "bnez\t%6, 1b\;" -+ "1:"; -+ } -+ [(set (attr "length") (const_int 28))]) -+ - (define_expand "atomic_test_and_set" - [(match_operand:QI 0 "register_operand" "") ;; bool output - (match_operand:QI 1 "memory_operand" "+A") ;; memory ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -753,7 +753,8 @@ Objective-C and Objective-C++ Dialects}. - -moverride=@var{string} -mverbose-cost-dump @gol - -mstack-protector-guard=@var{guard} -mstack-protector-guard-reg=@var{sysreg} @gol - -mstack-protector-guard-offset=@var{offset} -mtrack-speculation @gol ---moutline-atomics } -+-moutline-atomics -+-minline-atomics -mno-inline-atomics} - - @emph{Adapteva Epiphany Options} - @gccoptlist{-mhalf-reg-file -mprefer-short-insn-regs @gol -@@ -28035,6 +28036,13 @@ Do or don't use smaller but slower prolo - library function calls. The default is to use fast inline prologues and - epilogues. - -+@opindex minline-atomics -+@item -minline-atomics -+@itemx -mno-inline-atomics -+Do or don't use smaller but slower subword atomic emulation code that uses -+libatomic function calls. The default is to use fast inline subword atomics -+that do not require libatomic. -+ - @item -mshorten-memrefs - @itemx -mno-shorten-memrefs - @opindex mshorten-memrefs ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-1.c -@@ -0,0 +1,18 @@ -+/* { dg-do compile } */ -+/* { dg-options "-mno-inline-atomics" } */ -+/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "fetch_and_nand" { target *-*-* } 0 } */ -+/* { dg-final { scan-assembler "\tcall\t__sync_fetch_and_add_1" } } */ -+/* { dg-final { scan-assembler "\tcall\t__sync_fetch_and_nand_1" } } */ -+/* { dg-final { scan-assembler "\tcall\t__sync_bool_compare_and_swap_1" } } */ -+ -+char foo; -+char bar; -+char baz; -+ -+int -+main () -+{ -+ __sync_fetch_and_add(&foo, 1); -+ __sync_fetch_and_nand(&bar, 1); -+ __sync_bool_compare_and_swap (&baz, 1, 2); -+} ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-2.c -@@ -0,0 +1,9 @@ -+/* { dg-do compile } */ -+/* Verify that subword atomics do not generate calls. */ -+/* { dg-options "-minline-atomics" } */ -+/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "fetch_and_nand" { target *-*-* } 0 } */ -+/* { dg-final { scan-assembler-not "\tcall\t__sync_fetch_and_add_1" } } */ -+/* { dg-final { scan-assembler-not "\tcall\t__sync_fetch_and_nand_1" } } */ -+/* { dg-final { scan-assembler-not "\tcall\t__sync_bool_compare_and_swap_1" } } */ -+ -+#include "inline-atomics-1.c" -\ No newline at end of file ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-3.c -@@ -0,0 +1,569 @@ -+/* Check all char alignments. */ -+/* Duplicate logic as libatomic/testsuite/libatomic.c/atomic-op-1.c */ -+/* Test __atomic routines for existence and proper execution on 1 byte -+ values with each valid memory model. */ -+/* { dg-do run } */ -+/* { dg-options "-minline-atomics -Wno-address-of-packed-member" } */ -+ -+/* Test the execution of the __atomic_*OP builtin routines for a char. */ -+ -+extern void abort(void); -+ -+char count, res; -+const char init = ~0; -+ -+struct A -+{ -+ char a; -+ char b; -+ char c; -+ char d; -+} __attribute__ ((packed)) A; -+ -+/* The fetch_op routines return the original value before the operation. */ -+ -+void -+test_fetch_add (char* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_fetch_add (v, count, __ATOMIC_RELAXED) != 0) -+ abort (); -+ -+ if (__atomic_fetch_add (v, 1, __ATOMIC_CONSUME) != 1) -+ abort (); -+ -+ if (__atomic_fetch_add (v, count, __ATOMIC_ACQUIRE) != 2) -+ abort (); -+ -+ if (__atomic_fetch_add (v, 1, __ATOMIC_RELEASE) != 3) -+ abort (); -+ -+ if (__atomic_fetch_add (v, count, __ATOMIC_ACQ_REL) != 4) -+ abort (); -+ -+ if (__atomic_fetch_add (v, 1, __ATOMIC_SEQ_CST) != 5) -+ abort (); -+} -+ -+ -+void -+test_fetch_sub (char* v) -+{ -+ *v = res = 20; -+ count = 0; -+ -+ if (__atomic_fetch_sub (v, count + 1, __ATOMIC_RELAXED) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, 1, __ATOMIC_CONSUME) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, count + 1, __ATOMIC_ACQUIRE) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, 1, __ATOMIC_RELEASE) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, count + 1, __ATOMIC_ACQ_REL) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, 1, __ATOMIC_SEQ_CST) != res--) -+ abort (); -+} -+ -+void -+test_fetch_and (char* v) -+{ -+ *v = init; -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_fetch_and (v, init, __ATOMIC_CONSUME) != 0) -+ abort (); -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ *v = ~*v; -+ if (__atomic_fetch_and (v, init, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_SEQ_CST) != 0) -+ abort (); -+} -+ -+void -+test_fetch_nand (char* v) -+{ -+ *v = init; -+ -+ if (__atomic_fetch_nand (v, 0, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, init, __ATOMIC_CONSUME) != init) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, 0, __ATOMIC_ACQUIRE) != 0 ) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, init, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, init, __ATOMIC_ACQ_REL) != 0) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, 0, __ATOMIC_SEQ_CST) != init) -+ abort (); -+} -+ -+void -+test_fetch_xor (char* v) -+{ -+ *v = init; -+ count = 0; -+ -+ if (__atomic_fetch_xor (v, count, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, ~count, __ATOMIC_CONSUME) != init) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, ~count, __ATOMIC_RELEASE) != 0) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, 0, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, ~count, __ATOMIC_SEQ_CST) != init) -+ abort (); -+} -+ -+void -+test_fetch_or (char* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_fetch_or (v, count, __ATOMIC_RELAXED) != 0) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, 2, __ATOMIC_CONSUME) != 1) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, count, __ATOMIC_ACQUIRE) != 3) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, 8, __ATOMIC_RELEASE) != 7) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, count, __ATOMIC_ACQ_REL) != 15) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, count, __ATOMIC_SEQ_CST) != 31) -+ abort (); -+} -+ -+/* The OP_fetch routines return the new value after the operation. */ -+ -+void -+test_add_fetch (char* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_RELAXED) != 1) -+ abort (); -+ -+ if (__atomic_add_fetch (v, 1, __ATOMIC_CONSUME) != 2) -+ abort (); -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_ACQUIRE) != 3) -+ abort (); -+ -+ if (__atomic_add_fetch (v, 1, __ATOMIC_RELEASE) != 4) -+ abort (); -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_ACQ_REL) != 5) -+ abort (); -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_SEQ_CST) != 6) -+ abort (); -+} -+ -+ -+void -+test_sub_fetch (char* v) -+{ -+ *v = res = 20; -+ count = 0; -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_RELAXED) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, 1, __ATOMIC_CONSUME) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_ACQUIRE) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, 1, __ATOMIC_RELEASE) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_ACQ_REL) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_SEQ_CST) != --res) -+ abort (); -+} -+ -+void -+test_and_fetch (char* v) -+{ -+ *v = init; -+ -+ if (__atomic_and_fetch (v, 0, __ATOMIC_RELAXED) != 0) -+ abort (); -+ -+ *v = init; -+ if (__atomic_and_fetch (v, init, __ATOMIC_CONSUME) != init) -+ abort (); -+ -+ if (__atomic_and_fetch (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ *v = ~*v; -+ if (__atomic_and_fetch (v, init, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_and_fetch (v, 0, __ATOMIC_ACQ_REL) != 0) -+ abort (); -+ -+ *v = ~*v; -+ if (__atomic_and_fetch (v, 0, __ATOMIC_SEQ_CST) != 0) -+ abort (); -+} -+ -+void -+test_nand_fetch (char* v) -+{ -+ *v = init; -+ -+ if (__atomic_nand_fetch (v, 0, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, init, __ATOMIC_CONSUME) != 0) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, 0, __ATOMIC_ACQUIRE) != init) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, init, __ATOMIC_RELEASE) != 0) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, init, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, 0, __ATOMIC_SEQ_CST) != init) -+ abort (); -+} -+ -+ -+ -+void -+test_xor_fetch (char* v) -+{ -+ *v = init; -+ count = 0; -+ -+ if (__atomic_xor_fetch (v, count, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, ~count, __ATOMIC_CONSUME) != 0) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, ~count, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, 0, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, ~count, __ATOMIC_SEQ_CST) != 0) -+ abort (); -+} -+ -+void -+test_or_fetch (char* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_or_fetch (v, count, __ATOMIC_RELAXED) != 1) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, 2, __ATOMIC_CONSUME) != 3) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, count, __ATOMIC_ACQUIRE) != 7) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, 8, __ATOMIC_RELEASE) != 15) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, count, __ATOMIC_ACQ_REL) != 31) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, count, __ATOMIC_SEQ_CST) != 63) -+ abort (); -+} -+ -+ -+/* Test the OP routines with a result which isn't used. Use both variations -+ within each function. */ -+ -+void -+test_add (char* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ __atomic_add_fetch (v, count, __ATOMIC_RELAXED); -+ if (*v != 1) -+ abort (); -+ -+ __atomic_fetch_add (v, count, __ATOMIC_CONSUME); -+ if (*v != 2) -+ abort (); -+ -+ __atomic_add_fetch (v, 1 , __ATOMIC_ACQUIRE); -+ if (*v != 3) -+ abort (); -+ -+ __atomic_fetch_add (v, 1, __ATOMIC_RELEASE); -+ if (*v != 4) -+ abort (); -+ -+ __atomic_add_fetch (v, count, __ATOMIC_ACQ_REL); -+ if (*v != 5) -+ abort (); -+ -+ __atomic_fetch_add (v, count, __ATOMIC_SEQ_CST); -+ if (*v != 6) -+ abort (); -+} -+ -+ -+void -+test_sub (char* v) -+{ -+ *v = res = 20; -+ count = 0; -+ -+ __atomic_sub_fetch (v, count + 1, __ATOMIC_RELAXED); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_fetch_sub (v, count + 1, __ATOMIC_CONSUME); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_sub_fetch (v, 1, __ATOMIC_ACQUIRE); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_fetch_sub (v, 1, __ATOMIC_RELEASE); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_sub_fetch (v, count + 1, __ATOMIC_ACQ_REL); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_fetch_sub (v, count + 1, __ATOMIC_SEQ_CST); -+ if (*v != --res) -+ abort (); -+} -+ -+void -+test_and (char* v) -+{ -+ *v = init; -+ -+ __atomic_and_fetch (v, 0, __ATOMIC_RELAXED); -+ if (*v != 0) -+ abort (); -+ -+ *v = init; -+ __atomic_fetch_and (v, init, __ATOMIC_CONSUME); -+ if (*v != init) -+ abort (); -+ -+ __atomic_and_fetch (v, 0, __ATOMIC_ACQUIRE); -+ if (*v != 0) -+ abort (); -+ -+ *v = ~*v; -+ __atomic_fetch_and (v, init, __ATOMIC_RELEASE); -+ if (*v != init) -+ abort (); -+ -+ __atomic_and_fetch (v, 0, __ATOMIC_ACQ_REL); -+ if (*v != 0) -+ abort (); -+ -+ *v = ~*v; -+ __atomic_fetch_and (v, 0, __ATOMIC_SEQ_CST); -+ if (*v != 0) -+ abort (); -+} -+ -+void -+test_nand (char* v) -+{ -+ *v = init; -+ -+ __atomic_fetch_nand (v, 0, __ATOMIC_RELAXED); -+ if (*v != init) -+ abort (); -+ -+ __atomic_fetch_nand (v, init, __ATOMIC_CONSUME); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_nand_fetch (v, 0, __ATOMIC_ACQUIRE); -+ if (*v != init) -+ abort (); -+ -+ __atomic_nand_fetch (v, init, __ATOMIC_RELEASE); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_fetch_nand (v, init, __ATOMIC_ACQ_REL); -+ if (*v != init) -+ abort (); -+ -+ __atomic_nand_fetch (v, 0, __ATOMIC_SEQ_CST); -+ if (*v != init) -+ abort (); -+} -+ -+ -+ -+void -+test_xor (char* v) -+{ -+ *v = init; -+ count = 0; -+ -+ __atomic_xor_fetch (v, count, __ATOMIC_RELAXED); -+ if (*v != init) -+ abort (); -+ -+ __atomic_fetch_xor (v, ~count, __ATOMIC_CONSUME); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_xor_fetch (v, 0, __ATOMIC_ACQUIRE); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_fetch_xor (v, ~count, __ATOMIC_RELEASE); -+ if (*v != init) -+ abort (); -+ -+ __atomic_fetch_xor (v, 0, __ATOMIC_ACQ_REL); -+ if (*v != init) -+ abort (); -+ -+ __atomic_xor_fetch (v, ~count, __ATOMIC_SEQ_CST); -+ if (*v != 0) -+ abort (); -+} -+ -+void -+test_or (char* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ __atomic_or_fetch (v, count, __ATOMIC_RELAXED); -+ if (*v != 1) -+ abort (); -+ -+ count *= 2; -+ __atomic_fetch_or (v, count, __ATOMIC_CONSUME); -+ if (*v != 3) -+ abort (); -+ -+ count *= 2; -+ __atomic_or_fetch (v, 4, __ATOMIC_ACQUIRE); -+ if (*v != 7) -+ abort (); -+ -+ count *= 2; -+ __atomic_fetch_or (v, 8, __ATOMIC_RELEASE); -+ if (*v != 15) -+ abort (); -+ -+ count *= 2; -+ __atomic_or_fetch (v, count, __ATOMIC_ACQ_REL); -+ if (*v != 31) -+ abort (); -+ -+ count *= 2; -+ __atomic_fetch_or (v, count, __ATOMIC_SEQ_CST); -+ if (*v != 63) -+ abort (); -+} -+ -+int -+main () -+{ -+ char* V[] = {&A.a, &A.b, &A.c, &A.d}; -+ -+ for (int i = 0; i < 4; i++) { -+ test_fetch_add (V[i]); -+ test_fetch_sub (V[i]); -+ test_fetch_and (V[i]); -+ test_fetch_nand (V[i]); -+ test_fetch_xor (V[i]); -+ test_fetch_or (V[i]); -+ -+ test_add_fetch (V[i]); -+ test_sub_fetch (V[i]); -+ test_and_fetch (V[i]); -+ test_nand_fetch (V[i]); -+ test_xor_fetch (V[i]); -+ test_or_fetch (V[i]); -+ -+ test_add (V[i]); -+ test_sub (V[i]); -+ test_and (V[i]); -+ test_nand (V[i]); -+ test_xor (V[i]); -+ test_or (V[i]); -+ } -+ -+ return 0; -+} ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-4.c -@@ -0,0 +1,566 @@ -+/* Check all short alignments. */ -+/* Duplicate logic as libatomic/testsuite/libatomic.c/atomic-op-2.c */ -+/* Test __atomic routines for existence and proper execution on 2 byte -+ values with each valid memory model. */ -+/* { dg-do run } */ -+/* { dg-options "-minline-atomics -Wno-address-of-packed-member" } */ -+ -+/* Test the execution of the __atomic_*OP builtin routines for a short. */ -+ -+extern void abort(void); -+ -+short count, res; -+const short init = ~0; -+ -+struct A -+{ -+ short a; -+ short b; -+} __attribute__ ((packed)) A; -+ -+/* The fetch_op routines return the original value before the operation. */ -+ -+void -+test_fetch_add (short* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_fetch_add (v, count, __ATOMIC_RELAXED) != 0) -+ abort (); -+ -+ if (__atomic_fetch_add (v, 1, __ATOMIC_CONSUME) != 1) -+ abort (); -+ -+ if (__atomic_fetch_add (v, count, __ATOMIC_ACQUIRE) != 2) -+ abort (); -+ -+ if (__atomic_fetch_add (v, 1, __ATOMIC_RELEASE) != 3) -+ abort (); -+ -+ if (__atomic_fetch_add (v, count, __ATOMIC_ACQ_REL) != 4) -+ abort (); -+ -+ if (__atomic_fetch_add (v, 1, __ATOMIC_SEQ_CST) != 5) -+ abort (); -+} -+ -+ -+void -+test_fetch_sub (short* v) -+{ -+ *v = res = 20; -+ count = 0; -+ -+ if (__atomic_fetch_sub (v, count + 1, __ATOMIC_RELAXED) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, 1, __ATOMIC_CONSUME) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, count + 1, __ATOMIC_ACQUIRE) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, 1, __ATOMIC_RELEASE) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, count + 1, __ATOMIC_ACQ_REL) != res--) -+ abort (); -+ -+ if (__atomic_fetch_sub (v, 1, __ATOMIC_SEQ_CST) != res--) -+ abort (); -+} -+ -+void -+test_fetch_and (short* v) -+{ -+ *v = init; -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_fetch_and (v, init, __ATOMIC_CONSUME) != 0) -+ abort (); -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ *v = ~*v; -+ if (__atomic_fetch_and (v, init, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_fetch_and (v, 0, __ATOMIC_SEQ_CST) != 0) -+ abort (); -+} -+ -+void -+test_fetch_nand (short* v) -+{ -+ *v = init; -+ -+ if (__atomic_fetch_nand (v, 0, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, init, __ATOMIC_CONSUME) != init) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, 0, __ATOMIC_ACQUIRE) != 0 ) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, init, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, init, __ATOMIC_ACQ_REL) != 0) -+ abort (); -+ -+ if (__atomic_fetch_nand (v, 0, __ATOMIC_SEQ_CST) != init) -+ abort (); -+} -+ -+void -+test_fetch_xor (short* v) -+{ -+ *v = init; -+ count = 0; -+ -+ if (__atomic_fetch_xor (v, count, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, ~count, __ATOMIC_CONSUME) != init) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, ~count, __ATOMIC_RELEASE) != 0) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, 0, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_fetch_xor (v, ~count, __ATOMIC_SEQ_CST) != init) -+ abort (); -+} -+ -+void -+test_fetch_or (short* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_fetch_or (v, count, __ATOMIC_RELAXED) != 0) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, 2, __ATOMIC_CONSUME) != 1) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, count, __ATOMIC_ACQUIRE) != 3) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, 8, __ATOMIC_RELEASE) != 7) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, count, __ATOMIC_ACQ_REL) != 15) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_fetch_or (v, count, __ATOMIC_SEQ_CST) != 31) -+ abort (); -+} -+ -+/* The OP_fetch routines return the new value after the operation. */ -+ -+void -+test_add_fetch (short* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_RELAXED) != 1) -+ abort (); -+ -+ if (__atomic_add_fetch (v, 1, __ATOMIC_CONSUME) != 2) -+ abort (); -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_ACQUIRE) != 3) -+ abort (); -+ -+ if (__atomic_add_fetch (v, 1, __ATOMIC_RELEASE) != 4) -+ abort (); -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_ACQ_REL) != 5) -+ abort (); -+ -+ if (__atomic_add_fetch (v, count, __ATOMIC_SEQ_CST) != 6) -+ abort (); -+} -+ -+ -+void -+test_sub_fetch (short* v) -+{ -+ *v = res = 20; -+ count = 0; -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_RELAXED) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, 1, __ATOMIC_CONSUME) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_ACQUIRE) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, 1, __ATOMIC_RELEASE) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_ACQ_REL) != --res) -+ abort (); -+ -+ if (__atomic_sub_fetch (v, count + 1, __ATOMIC_SEQ_CST) != --res) -+ abort (); -+} -+ -+void -+test_and_fetch (short* v) -+{ -+ *v = init; -+ -+ if (__atomic_and_fetch (v, 0, __ATOMIC_RELAXED) != 0) -+ abort (); -+ -+ *v = init; -+ if (__atomic_and_fetch (v, init, __ATOMIC_CONSUME) != init) -+ abort (); -+ -+ if (__atomic_and_fetch (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ *v = ~*v; -+ if (__atomic_and_fetch (v, init, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_and_fetch (v, 0, __ATOMIC_ACQ_REL) != 0) -+ abort (); -+ -+ *v = ~*v; -+ if (__atomic_and_fetch (v, 0, __ATOMIC_SEQ_CST) != 0) -+ abort (); -+} -+ -+void -+test_nand_fetch (short* v) -+{ -+ *v = init; -+ -+ if (__atomic_nand_fetch (v, 0, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, init, __ATOMIC_CONSUME) != 0) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, 0, __ATOMIC_ACQUIRE) != init) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, init, __ATOMIC_RELEASE) != 0) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, init, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_nand_fetch (v, 0, __ATOMIC_SEQ_CST) != init) -+ abort (); -+} -+ -+ -+ -+void -+test_xor_fetch (short* v) -+{ -+ *v = init; -+ count = 0; -+ -+ if (__atomic_xor_fetch (v, count, __ATOMIC_RELAXED) != init) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, ~count, __ATOMIC_CONSUME) != 0) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, 0, __ATOMIC_ACQUIRE) != 0) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, ~count, __ATOMIC_RELEASE) != init) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, 0, __ATOMIC_ACQ_REL) != init) -+ abort (); -+ -+ if (__atomic_xor_fetch (v, ~count, __ATOMIC_SEQ_CST) != 0) -+ abort (); -+} -+ -+void -+test_or_fetch (short* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ if (__atomic_or_fetch (v, count, __ATOMIC_RELAXED) != 1) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, 2, __ATOMIC_CONSUME) != 3) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, count, __ATOMIC_ACQUIRE) != 7) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, 8, __ATOMIC_RELEASE) != 15) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, count, __ATOMIC_ACQ_REL) != 31) -+ abort (); -+ -+ count *= 2; -+ if (__atomic_or_fetch (v, count, __ATOMIC_SEQ_CST) != 63) -+ abort (); -+} -+ -+ -+/* Test the OP routines with a result which isn't used. Use both variations -+ within each function. */ -+ -+void -+test_add (short* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ __atomic_add_fetch (v, count, __ATOMIC_RELAXED); -+ if (*v != 1) -+ abort (); -+ -+ __atomic_fetch_add (v, count, __ATOMIC_CONSUME); -+ if (*v != 2) -+ abort (); -+ -+ __atomic_add_fetch (v, 1 , __ATOMIC_ACQUIRE); -+ if (*v != 3) -+ abort (); -+ -+ __atomic_fetch_add (v, 1, __ATOMIC_RELEASE); -+ if (*v != 4) -+ abort (); -+ -+ __atomic_add_fetch (v, count, __ATOMIC_ACQ_REL); -+ if (*v != 5) -+ abort (); -+ -+ __atomic_fetch_add (v, count, __ATOMIC_SEQ_CST); -+ if (*v != 6) -+ abort (); -+} -+ -+ -+void -+test_sub (short* v) -+{ -+ *v = res = 20; -+ count = 0; -+ -+ __atomic_sub_fetch (v, count + 1, __ATOMIC_RELAXED); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_fetch_sub (v, count + 1, __ATOMIC_CONSUME); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_sub_fetch (v, 1, __ATOMIC_ACQUIRE); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_fetch_sub (v, 1, __ATOMIC_RELEASE); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_sub_fetch (v, count + 1, __ATOMIC_ACQ_REL); -+ if (*v != --res) -+ abort (); -+ -+ __atomic_fetch_sub (v, count + 1, __ATOMIC_SEQ_CST); -+ if (*v != --res) -+ abort (); -+} -+ -+void -+test_and (short* v) -+{ -+ *v = init; -+ -+ __atomic_and_fetch (v, 0, __ATOMIC_RELAXED); -+ if (*v != 0) -+ abort (); -+ -+ *v = init; -+ __atomic_fetch_and (v, init, __ATOMIC_CONSUME); -+ if (*v != init) -+ abort (); -+ -+ __atomic_and_fetch (v, 0, __ATOMIC_ACQUIRE); -+ if (*v != 0) -+ abort (); -+ -+ *v = ~*v; -+ __atomic_fetch_and (v, init, __ATOMIC_RELEASE); -+ if (*v != init) -+ abort (); -+ -+ __atomic_and_fetch (v, 0, __ATOMIC_ACQ_REL); -+ if (*v != 0) -+ abort (); -+ -+ *v = ~*v; -+ __atomic_fetch_and (v, 0, __ATOMIC_SEQ_CST); -+ if (*v != 0) -+ abort (); -+} -+ -+void -+test_nand (short* v) -+{ -+ *v = init; -+ -+ __atomic_fetch_nand (v, 0, __ATOMIC_RELAXED); -+ if (*v != init) -+ abort (); -+ -+ __atomic_fetch_nand (v, init, __ATOMIC_CONSUME); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_nand_fetch (v, 0, __ATOMIC_ACQUIRE); -+ if (*v != init) -+ abort (); -+ -+ __atomic_nand_fetch (v, init, __ATOMIC_RELEASE); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_fetch_nand (v, init, __ATOMIC_ACQ_REL); -+ if (*v != init) -+ abort (); -+ -+ __atomic_nand_fetch (v, 0, __ATOMIC_SEQ_CST); -+ if (*v != init) -+ abort (); -+} -+ -+ -+ -+void -+test_xor (short* v) -+{ -+ *v = init; -+ count = 0; -+ -+ __atomic_xor_fetch (v, count, __ATOMIC_RELAXED); -+ if (*v != init) -+ abort (); -+ -+ __atomic_fetch_xor (v, ~count, __ATOMIC_CONSUME); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_xor_fetch (v, 0, __ATOMIC_ACQUIRE); -+ if (*v != 0) -+ abort (); -+ -+ __atomic_fetch_xor (v, ~count, __ATOMIC_RELEASE); -+ if (*v != init) -+ abort (); -+ -+ __atomic_fetch_xor (v, 0, __ATOMIC_ACQ_REL); -+ if (*v != init) -+ abort (); -+ -+ __atomic_xor_fetch (v, ~count, __ATOMIC_SEQ_CST); -+ if (*v != 0) -+ abort (); -+} -+ -+void -+test_or (short* v) -+{ -+ *v = 0; -+ count = 1; -+ -+ __atomic_or_fetch (v, count, __ATOMIC_RELAXED); -+ if (*v != 1) -+ abort (); -+ -+ count *= 2; -+ __atomic_fetch_or (v, count, __ATOMIC_CONSUME); -+ if (*v != 3) -+ abort (); -+ -+ count *= 2; -+ __atomic_or_fetch (v, 4, __ATOMIC_ACQUIRE); -+ if (*v != 7) -+ abort (); -+ -+ count *= 2; -+ __atomic_fetch_or (v, 8, __ATOMIC_RELEASE); -+ if (*v != 15) -+ abort (); -+ -+ count *= 2; -+ __atomic_or_fetch (v, count, __ATOMIC_ACQ_REL); -+ if (*v != 31) -+ abort (); -+ -+ count *= 2; -+ __atomic_fetch_or (v, count, __ATOMIC_SEQ_CST); -+ if (*v != 63) -+ abort (); -+} -+ -+int -+main () { -+ short* V[] = {&A.a, &A.b}; -+ -+ for (int i = 0; i < 2; i++) { -+ test_fetch_add (V[i]); -+ test_fetch_sub (V[i]); -+ test_fetch_and (V[i]); -+ test_fetch_nand (V[i]); -+ test_fetch_xor (V[i]); -+ test_fetch_or (V[i]); -+ -+ test_add_fetch (V[i]); -+ test_sub_fetch (V[i]); -+ test_and_fetch (V[i]); -+ test_nand_fetch (V[i]); -+ test_xor_fetch (V[i]); -+ test_or_fetch (V[i]); -+ -+ test_add (V[i]); -+ test_sub (V[i]); -+ test_and (V[i]); -+ test_nand (V[i]); -+ test_xor (V[i]); -+ test_or (V[i]); -+ } -+ -+ return 0; -+} ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-5.c -@@ -0,0 +1,87 @@ -+/* Test __atomic routines for existence and proper execution on 1 byte -+ values with each valid memory model. */ -+/* Duplicate logic as libatomic/testsuite/libatomic.c/atomic-compare-exchange-1.c */ -+/* { dg-do run } */ -+/* { dg-options "-minline-atomics" } */ -+ -+/* Test the execution of the __atomic_compare_exchange_n builtin for a char. */ -+ -+extern void abort(void); -+ -+char v = 0; -+char expected = 0; -+char max = ~0; -+char desired = ~0; -+char zero = 0; -+ -+#define STRONG 0 -+#define WEAK 1 -+ -+int -+main () -+{ -+ -+ if (!__atomic_compare_exchange_n (&v, &expected, max, STRONG , __ATOMIC_RELAXED, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange_n (&v, &expected, 0, STRONG , __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != max) -+ abort (); -+ -+ if (!__atomic_compare_exchange_n (&v, &expected, 0, STRONG , __ATOMIC_RELEASE, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != max) -+ abort (); -+ if (v != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange_n (&v, &expected, desired, WEAK, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (!__atomic_compare_exchange_n (&v, &expected, desired, STRONG , __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ if (v != max) -+ abort (); -+ -+ /* Now test the generic version. */ -+ -+ v = 0; -+ -+ if (!__atomic_compare_exchange (&v, &expected, &max, STRONG, __ATOMIC_RELAXED, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange (&v, &expected, &zero, STRONG , __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != max) -+ abort (); -+ -+ if (!__atomic_compare_exchange (&v, &expected, &zero, STRONG , __ATOMIC_RELEASE, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != max) -+ abort (); -+ if (v != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange (&v, &expected, &desired, WEAK, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (!__atomic_compare_exchange (&v, &expected, &desired, STRONG , __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ if (v != max) -+ abort (); -+ -+ return 0; -+} ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-6.c -@@ -0,0 +1,87 @@ -+/* Test __atomic routines for existence and proper execution on 2 byte -+ values with each valid memory model. */ -+/* Duplicate logic as libatomic/testsuite/libatomic.c/atomic-compare-exchange-2.c */ -+/* { dg-do run } */ -+/* { dg-options "-minline-atomics" } */ -+ -+/* Test the execution of the __atomic_compare_exchange_n builtin for a short. */ -+ -+extern void abort(void); -+ -+short v = 0; -+short expected = 0; -+short max = ~0; -+short desired = ~0; -+short zero = 0; -+ -+#define STRONG 0 -+#define WEAK 1 -+ -+int -+main () -+{ -+ -+ if (!__atomic_compare_exchange_n (&v, &expected, max, STRONG , __ATOMIC_RELAXED, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange_n (&v, &expected, 0, STRONG , __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != max) -+ abort (); -+ -+ if (!__atomic_compare_exchange_n (&v, &expected, 0, STRONG , __ATOMIC_RELEASE, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != max) -+ abort (); -+ if (v != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange_n (&v, &expected, desired, WEAK, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (!__atomic_compare_exchange_n (&v, &expected, desired, STRONG , __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ if (v != max) -+ abort (); -+ -+ /* Now test the generic version. */ -+ -+ v = 0; -+ -+ if (!__atomic_compare_exchange (&v, &expected, &max, STRONG, __ATOMIC_RELAXED, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange (&v, &expected, &zero, STRONG , __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) -+ abort (); -+ if (expected != max) -+ abort (); -+ -+ if (!__atomic_compare_exchange (&v, &expected, &zero, STRONG , __ATOMIC_RELEASE, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != max) -+ abort (); -+ if (v != 0) -+ abort (); -+ -+ if (__atomic_compare_exchange (&v, &expected, &desired, WEAK, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ -+ if (!__atomic_compare_exchange (&v, &expected, &desired, STRONG , __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) -+ abort (); -+ if (expected != 0) -+ abort (); -+ if (v != max) -+ abort (); -+ -+ return 0; -+} ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-7.c -@@ -0,0 +1,69 @@ -+/* Test __atomic routines for existence and proper execution on 1 byte -+ values with each valid memory model. */ -+/* Duplicate logic as libatomic/testsuite/libatomic.c/atomic-exchange-1.c */ -+/* { dg-do run } */ -+/* { dg-options "-minline-atomics" } */ -+ -+/* Test the execution of the __atomic_exchange_n builtin for a char. */ -+ -+extern void abort(void); -+ -+char v, count, ret; -+ -+int -+main () -+{ -+ v = 0; -+ count = 0; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count) -+ abort (); -+ count++; -+ -+ /* Now test the generic version. */ -+ -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_RELAXED); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_ACQUIRE); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_RELEASE); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_ACQ_REL); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_SEQ_CST); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ return 0; -+} ---- /dev/null -+++ b/gcc/testsuite/gcc.target/riscv/inline-atomics-8.c -@@ -0,0 +1,69 @@ -+/* Test __atomic routines for existence and proper execution on 2 byte -+ values with each valid memory model. */ -+/* Duplicate logic as libatomic/testsuite/libatomic.c/atomic-exchange-2.c */ -+/* { dg-do run } */ -+/* { dg-options "-minline-atomics" } */ -+ -+/* Test the execution of the __atomic_X builtin for a short. */ -+ -+extern void abort(void); -+ -+short v, count, ret; -+ -+int -+main () -+{ -+ v = 0; -+ count = 0; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count) -+ abort (); -+ count++; -+ -+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count) -+ abort (); -+ count++; -+ -+ /* Now test the generic version. */ -+ -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_RELAXED); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_ACQUIRE); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_RELEASE); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_ACQ_REL); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ __atomic_exchange (&v, &count, &ret, __ATOMIC_SEQ_CST); -+ if (ret != count - 1 || v != count) -+ abort (); -+ count++; -+ -+ return 0; -+} ---- a/libgcc/config/riscv/atomic.c -+++ b/libgcc/config/riscv/atomic.c -@@ -30,6 +30,8 @@ see the files COPYING3 and COPYING.RUNTI - #define INVERT "not %[tmp1], %[tmp1]\n\t" - #define DONT_INVERT "" - -+/* Logic duplicated in gcc/gcc/config/riscv/sync.md for use when inlining is enabled */ -+ - #define GENERATE_FETCH_AND_OP(type, size, opname, insn, invert, cop) \ - type __sync_fetch_and_ ## opname ## _ ## size (type *p, type v) \ - { \ diff --git a/packages/devel/gcc/patches-12.x/701-riscv-linux-Don-t-add-latomic-with-pthread.patch b/packages/devel/gcc/patches-12.x/701-riscv-linux-Don-t-add-latomic-with-pthread.patch deleted file mode 100644 index 328c7be9..00000000 --- a/packages/devel/gcc/patches-12.x/701-riscv-linux-Don-t-add-latomic-with-pthread.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 203f3060dd363361b172f7295f42bb6bf5ac0b3b Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Sat, 23 Apr 2022 15:48:42 +0200 -Subject: [PATCH] riscv/linux: Don't add -latomic with -pthread - -Now that we have support for inline subword atomic operations, it is no -longer necessary to link against libatomic. This also fixes testsuite -failures because the framework does not properly set up the linker flags -for finding libatomic. -The use of atomic operations is also independent of the use of libpthread. - -gcc/ - * config/riscv/linux.h (LIB_SPEC): Don't redefine. ---- - gcc/config/riscv/linux.h | 10 ---------- - 1 file changed, 10 deletions(-) - ---- a/gcc/config/riscv/linux.h -+++ b/gcc/config/riscv/linux.h -@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3. - #undef MUSL_DYNAMIC_LINKER - #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1" - --/* Because RISC-V only has word-sized atomics, it requries libatomic where -- others do not. So link libatomic by default, as needed. */ --#undef LIB_SPEC --#ifdef LD_AS_NEEDED_OPTION --#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \ -- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}" --#else --#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic " --#endif -- - #define ICACHE_FLUSH_FUNC "__riscv_flush_icache" - - #define CPP_SPEC "%{pthread:-D_REENTRANT}" diff --git a/packages/devel/gcc/patches-12.x/810-arm-softfloat-libgcc.patch b/packages/devel/gcc/patches-12.x/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86ae..00000000 --- a/packages/devel/gcc/patches-12.x/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/packages/devel/gcc/patches-12.x/820-libgcc_pic.patch b/packages/devel/gcc/patches-12.x/820-libgcc_pic.patch deleted file mode 100644 index 525a95b5..00000000 --- a/packages/devel/gcc/patches-12.x/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -930,11 +930,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -958,7 +959,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1164,6 +1165,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/packages/devel/gcc/patches-12.x/840-armv4_pass_fix-v4bx_to_ld.patch b/packages/devel/gcc/patches-12.x/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index e3cb616c..00000000 --- a/packages/devel/gcc/patches-12.x/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -91,10 +91,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/packages/devel/gcc/patches-12.x/850-use_shared_libgcc.patch b/packages/devel/gcc/patches-12.x/850-use_shared_libgcc.patch deleted file mode 100644 index 7be30f32..00000000 --- a/packages/devel/gcc/patches-12.x/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -132,10 +132,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -71,6 +71,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_version ("CRuntime_Musl"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -67,6 +67,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/packages/devel/gcc/patches-12.x/851-libgcc_no_compat.patch b/packages/devel/gcc/patches-12.x/851-libgcc_no_compat.patch deleted file mode 100644 index d710e407..00000000 --- a/packages/devel/gcc/patches-12.x/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/packages/devel/gcc/patches-12.x/870-ppc_no_crtsavres.patch b/packages/devel/gcc/patches-12.x/870-ppc_no_crtsavres.patch deleted file mode 100644 index e51079dc..00000000 --- a/packages/devel/gcc/patches-12.x/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000-logue.cc -+++ b/gcc/config/rs6000/rs6000-logue.cc -@@ -348,7 +348,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/packages/devel/gcc/patches-12.x/881-no_tm_section.patch b/packages/devel/gcc/patches-12.x/881-no_tm_section.patch deleted file mode 100644 index 2029910f..00000000 --- a/packages/devel/gcc/patches-12.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/packages/devel/gcc/patches-12.x/900-bad-mips16-crt.patch b/packages/devel/gcc/patches-12.x/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc8..00000000 --- a/packages/devel/gcc/patches-12.x/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/packages/devel/gcc/patches-12.x/910-mbsd_multi.patch b/packages/devel/gcc/patches-12.x/910-mbsd_multi.patch deleted file mode 100644 index 9233c6a1..00000000 --- a/packages/devel/gcc/patches-12.x/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.cc -+++ b/gcc/c-family/c-opts.cc -@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -478,6 +481,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1218,6 +1227,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1755,6 +1755,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ WarnRemoved - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1770,6 +1770,9 @@ fharden-conditional-branches - Common Var(flag_harden_conditional_branches) Optimization - Harden conditional branches by checking reversed conditions. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -9597,6 +9597,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector ---- a/gcc/opts.cc -+++ b/gcc/opts.cc -@@ -2699,6 +2699,9 @@ common_handle_option (struct gcc_options - add_comma_separated_to_vector (&opts->x_flag_ignored_attributes, arg); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Werror: - dc->warning_as_error_requested = value; - break; diff --git a/packages/devel/gcc/patches-12.x/920-specs_nonfatal_getenv.patch b/packages/devel/gcc/patches-12.x/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 59bd3500..00000000 --- a/packages/devel/gcc/patches-12.x/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.cc -+++ b/gcc/gcc.cc -@@ -10186,8 +10186,10 @@ getenv_spec_function (int argc, const ch - } - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/packages/devel/gcc/patches-12.x/960-gotools-fix-compilation-when-making-cross-compiler.patch b/packages/devel/gcc/patches-12.x/960-gotools-fix-compilation-when-making-cross-compiler.patch deleted file mode 100644 index b1d75763..00000000 --- a/packages/devel/gcc/patches-12.x/960-gotools-fix-compilation-when-making-cross-compiler.patch +++ /dev/null @@ -1,67 +0,0 @@ -From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/packages/devel/gcc/patches-12.x/970-macos_arm64-building-fix.patch b/packages/devel/gcc/patches-12.x/970-macos_arm64-building-fix.patch deleted file mode 100644 index 89730449..00000000 --- a/packages/devel/gcc/patches-12.x/970-macos_arm64-building-fix.patch +++ /dev/null @@ -1,45 +0,0 @@ -commit 9c6e71079b46ad5433165feaa2001450f2017b56 -Author: Przemysław Buczkowski -Date: Mon Aug 16 13:16:21 2021 +0100 - - GCC: Patch for Apple Silicon compatibility - - This patch fixes a linker error occuring when compiling - the cross-compiler on macOS and ARM64 architecture. - - Adapted from: - https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404 - - Change-Id: Ia3ee98a163bbb62689f42e2da83a5ef36beb0913 - Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4329 - Reviewed-by: John Scipione - Reviewed-by: Adrien Destugues - ---- a/gcc/config/aarch64/aarch64.h -+++ b/gcc/config/aarch64/aarch64.h -@@ -1293,7 +1293,7 @@ extern const char *aarch64_rewrite_mcpu - #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ - { "rewrite_mcpu", aarch64_rewrite_mcpu }, - --#if defined(__aarch64__) -+#if defined(__aarch64__) && ! defined(__APPLE__) - extern const char *host_detect_local_cpu (int argc, const char **argv); - #define HAVE_LOCAL_CPU_DETECT - # define EXTRA_SPEC_FUNCTIONS \ ---- a/gcc/config/host-darwin.cc -+++ b/gcc/config/host-darwin.cc -@@ -23,6 +23,8 @@ - #include "options.h" - #include "diagnostic-core.h" - #include "config/host-darwin.h" -+#include "hosthooks.h" -+#include "hosthooks-def.h" - #include - - /* For Darwin (macOS only) platforms, without ASLR (PIE) enabled on the -@@ -181,3 +183,5 @@ darwin_gt_pch_use_address (void *&addr, - - return 1; - } -+ -+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/packages/devel/gcc/patches-13.x/002-case_insensitive.patch b/packages/devel/gcc/patches-13.x/002-case_insensitive.patch deleted file mode 100644 index 409497e5..00000000 --- a/packages/devel/gcc/patches-13.x/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -44,11 +44,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/packages/devel/gcc/patches-13.x/003-dont-choke-when-building-32bit-on-64bit.patch b/packages/devel/gcc/patches-13.x/003-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index c41f35e3..00000000 --- a/packages/devel/gcc/patches-13.x/003-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -77,8 +77,10 @@ struct GTY(()) real_value { - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -+#endif - - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be diff --git a/packages/devel/gcc/patches-13.x/010-documentation.patch b/packages/devel/gcc/patches-13.x/010-documentation.patch deleted file mode 100644 index 9646568a..00000000 --- a/packages/devel/gcc/patches-13.x/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3397,18 +3397,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/packages/devel/gcc/patches-13.x/110-Fix-MIPS-PR-84790.patch b/packages/devel/gcc/patches-13.x/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index 856fd6a4..00000000 --- a/packages/devel/gcc/patches-13.x/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.cc -+++ b/gcc/config/mips/mips.cc -@@ -3134,6 +3134,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/packages/devel/gcc/patches-13.x/230-musl_libssp.patch b/packages/devel/gcc/patches-13.x/230-musl_libssp.patch deleted file mode 100644 index fee068e1..00000000 --- a/packages/devel/gcc/patches-13.x/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.cc -+++ b/gcc/gcc.cc -@@ -972,7 +972,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/packages/devel/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch b/packages/devel/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 2ca42ad7..00000000 --- a/packages/devel/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.cc -+++ b/gcc/config/mips/mips.cc -@@ -20219,7 +20219,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/packages/devel/gcc/patches-13.x/810-arm-softfloat-libgcc.patch b/packages/devel/gcc/patches-13.x/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86ae..00000000 --- a/packages/devel/gcc/patches-13.x/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/packages/devel/gcc/patches-13.x/820-libgcc_pic.patch b/packages/devel/gcc/patches-13.x/820-libgcc_pic.patch deleted file mode 100644 index 7d102981..00000000 --- a/packages/devel/gcc/patches-13.x/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -933,11 +933,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -961,7 +962,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1167,6 +1168,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/packages/devel/gcc/patches-13.x/840-armv4_pass_fix-v4bx_to_ld.patch b/packages/devel/gcc/patches-13.x/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index 82935f3d..00000000 --- a/packages/devel/gcc/patches-13.x/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -88,10 +88,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/packages/devel/gcc/patches-13.x/850-use_shared_libgcc.patch b/packages/devel/gcc/patches-13.x/850-use_shared_libgcc.patch deleted file mode 100644 index f4505ee7..00000000 --- a/packages/devel/gcc/patches-13.x/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -129,10 +129,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -58,6 +58,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -67,6 +67,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/packages/devel/gcc/patches-13.x/851-libgcc_no_compat.patch b/packages/devel/gcc/patches-13.x/851-libgcc_no_compat.patch deleted file mode 100644 index d710e407..00000000 --- a/packages/devel/gcc/patches-13.x/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/packages/devel/gcc/patches-13.x/870-ppc_no_crtsavres.patch b/packages/devel/gcc/patches-13.x/870-ppc_no_crtsavres.patch deleted file mode 100644 index 0dca6889..00000000 --- a/packages/devel/gcc/patches-13.x/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000-logue.cc -+++ b/gcc/config/rs6000/rs6000-logue.cc -@@ -344,7 +344,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/packages/devel/gcc/patches-13.x/881-no_tm_section.patch b/packages/devel/gcc/patches-13.x/881-no_tm_section.patch deleted file mode 100644 index 2029910f..00000000 --- a/packages/devel/gcc/patches-13.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/packages/devel/gcc/patches-13.x/900-bad-mips16-crt.patch b/packages/devel/gcc/patches-13.x/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc8..00000000 --- a/packages/devel/gcc/patches-13.x/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/packages/devel/gcc/patches-13.x/910-mbsd_multi.patch b/packages/devel/gcc/patches-13.x/910-mbsd_multi.patch deleted file mode 100644 index 4138e79b..00000000 --- a/packages/devel/gcc/patches-13.x/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.cc -+++ b/gcc/c-family/c-opts.cc -@@ -104,6 +104,9 @@ static size_t include_cursor; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -475,6 +478,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1228,6 +1237,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1837,6 +1837,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ WarnRemoved - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1801,6 +1801,9 @@ fharden-conditional-branches - Common Var(flag_harden_conditional_branches) Optimization - Harden conditional branches by checking reversed conditions. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -10065,6 +10065,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @opindex Wstack-protector - @opindex Wno-stack-protector - @item -Wstack-protector ---- a/gcc/opts.cc -+++ b/gcc/opts.cc -@@ -2767,6 +2767,9 @@ common_handle_option (struct gcc_options - add_comma_separated_to_vector (&opts->x_flag_ignored_attributes, arg); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Werror: - dc->warning_as_error_requested = value; - break; diff --git a/packages/devel/gcc/patches-13.x/920-specs_nonfatal_getenv.patch b/packages/devel/gcc/patches-13.x/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 265ca22c..00000000 --- a/packages/devel/gcc/patches-13.x/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.cc -+++ b/gcc/gcc.cc -@@ -10174,8 +10174,10 @@ getenv_spec_function (int argc, const ch - } - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/packages/devel/gcc/patches-13.x/960-gotools-fix-compilation-when-making-cross-compiler.patch b/packages/devel/gcc/patches-13.x/960-gotools-fix-compilation-when-making-cross-compiler.patch deleted file mode 100644 index b1d75763..00000000 --- a/packages/devel/gcc/patches-13.x/960-gotools-fix-compilation-when-making-cross-compiler.patch +++ /dev/null @@ -1,67 +0,0 @@ -From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/packages/devel/gcc/patches-13.x/970-macos_arm64-building-fix.patch b/packages/devel/gcc/patches-13.x/970-macos_arm64-building-fix.patch deleted file mode 100644 index a0470b13..00000000 --- a/packages/devel/gcc/patches-13.x/970-macos_arm64-building-fix.patch +++ /dev/null @@ -1,45 +0,0 @@ -commit 9c6e71079b46ad5433165feaa2001450f2017b56 -Author: Przemysław Buczkowski -Date: Mon Aug 16 13:16:21 2021 +0100 - - GCC: Patch for Apple Silicon compatibility - - This patch fixes a linker error occuring when compiling - the cross-compiler on macOS and ARM64 architecture. - - Adapted from: - https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404 - - Change-Id: Ia3ee98a163bbb62689f42e2da83a5ef36beb0913 - Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4329 - Reviewed-by: John Scipione - Reviewed-by: Adrien Destugues - ---- a/gcc/config/aarch64/aarch64.h -+++ b/gcc/config/aarch64/aarch64.h -@@ -1195,7 +1195,7 @@ extern enum aarch64_code_model aarch64_c - - /* Extra specs when building a native AArch64-hosted compiler. - Option rewriting rules based on host system. */ --#if defined(__aarch64__) -+#if defined(__aarch64__) && ! defined(__APPLE__) - extern const char *host_detect_local_cpu (int argc, const char **argv); - #define HAVE_LOCAL_CPU_DETECT - # define EXTRA_SPEC_FUNCTIONS \ ---- a/gcc/config/host-darwin.cc -+++ b/gcc/config/host-darwin.cc -@@ -23,6 +23,8 @@ - #include "options.h" - #include "diagnostic-core.h" - #include "config/host-darwin.h" -+#include "hosthooks.h" -+#include "hosthooks-def.h" - #include - - /* For Darwin (macOS only) platforms, without ASLR (PIE) enabled on the -@@ -181,3 +183,5 @@ darwin_gt_pch_use_address (void *&addr, - - return 1; - } -+ -+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/packages/devel/gcc/patches-14.x/002-case_insensitive.patch b/packages/devel/gcc/patches-14.x/002-case_insensitive.patch deleted file mode 100644 index 409497e5..00000000 --- a/packages/devel/gcc/patches-14.x/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -44,11 +44,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/packages/devel/gcc/patches-14.x/003-dont-choke-when-building-32bit-on-64bit.patch b/packages/devel/gcc/patches-14.x/003-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index c41f35e3..00000000 --- a/packages/devel/gcc/patches-14.x/003-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -77,8 +77,10 @@ struct GTY(()) real_value { - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -+#endif - - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be diff --git a/packages/devel/gcc/patches-14.x/010-documentation.patch b/packages/devel/gcc/patches-14.x/010-documentation.patch deleted file mode 100644 index 7cf59d3a..00000000 --- a/packages/devel/gcc/patches-14.x/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3549,18 +3549,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/packages/devel/gcc/patches-14.x/110-Fix-MIPS-PR-84790.patch b/packages/devel/gcc/patches-14.x/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index bd5d1f34..00000000 --- a/packages/devel/gcc/patches-14.x/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.cc -+++ b/gcc/config/mips/mips.cc -@@ -3227,6 +3227,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/packages/devel/gcc/patches-14.x/230-musl_libssp.patch b/packages/devel/gcc/patches-14.x/230-musl_libssp.patch deleted file mode 100644 index 3ce5e495..00000000 --- a/packages/devel/gcc/patches-14.x/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.cc -+++ b/gcc/gcc.cc -@@ -985,7 +985,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/packages/devel/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch b/packages/devel/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 2cbffe45..00000000 --- a/packages/devel/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.cc -+++ b/gcc/config/mips/mips.cc -@@ -20453,7 +20453,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/packages/devel/gcc/patches-14.x/810-arm-softfloat-libgcc.patch b/packages/devel/gcc/patches-14.x/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86ae..00000000 --- a/packages/devel/gcc/patches-14.x/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/packages/devel/gcc/patches-14.x/820-libgcc_pic.patch b/packages/devel/gcc/patches-14.x/820-libgcc_pic.patch deleted file mode 100644 index 3ab73f48..00000000 --- a/packages/devel/gcc/patches-14.x/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -940,11 +940,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -968,7 +969,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1174,6 +1175,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/packages/devel/gcc/patches-14.x/840-armv4_pass_fix-v4bx_to_ld.patch b/packages/devel/gcc/patches-14.x/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index 82935f3d..00000000 --- a/packages/devel/gcc/patches-14.x/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -88,10 +88,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/packages/devel/gcc/patches-14.x/850-use_shared_libgcc.patch b/packages/devel/gcc/patches-14.x/850-use_shared_libgcc.patch deleted file mode 100644 index 66926ed1..00000000 --- a/packages/devel/gcc/patches-14.x/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -129,10 +129,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -58,6 +58,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -70,6 +70,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/packages/devel/gcc/patches-14.x/851-libgcc_no_compat.patch b/packages/devel/gcc/patches-14.x/851-libgcc_no_compat.patch deleted file mode 100644 index d710e407..00000000 --- a/packages/devel/gcc/patches-14.x/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/packages/devel/gcc/patches-14.x/870-ppc_no_crtsavres.patch b/packages/devel/gcc/patches-14.x/870-ppc_no_crtsavres.patch deleted file mode 100644 index 0dca6889..00000000 --- a/packages/devel/gcc/patches-14.x/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000-logue.cc -+++ b/gcc/config/rs6000/rs6000-logue.cc -@@ -344,7 +344,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/packages/devel/gcc/patches-14.x/881-no_tm_section.patch b/packages/devel/gcc/patches-14.x/881-no_tm_section.patch deleted file mode 100644 index 2029910f..00000000 --- a/packages/devel/gcc/patches-14.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/packages/devel/gcc/patches-14.x/900-bad-mips16-crt.patch b/packages/devel/gcc/patches-14.x/900-bad-mips16-crt.patch deleted file mode 100644 index b355545c..00000000 --- a/packages/devel/gcc/patches-14.x/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -42,3 +42,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/packages/devel/gcc/patches-14.x/910-mbsd_multi.patch b/packages/devel/gcc/patches-14.x/910-mbsd_multi.patch deleted file mode 100644 index 2a58df3c..00000000 --- a/packages/devel/gcc/patches-14.x/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.cc -+++ b/gcc/c-family/c-opts.cc -@@ -108,6 +108,9 @@ static size_t include_cursor; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -498,6 +501,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1291,6 +1300,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1910,6 +1910,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ WarnRemoved - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1881,6 +1881,9 @@ Enum(hardcfr_check_noreturn_calls) Strin - EnumValue - Enum(hardcfr_check_noreturn_calls) String(always) Value(HCFRNR_ALWAYS) - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -10597,6 +10597,17 @@ This option is only supported for C and - - This warning is upgraded to an error by @option{-pedantic-errors}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @opindex Wstack-protector - @opindex Wno-stack-protector - @item -Wstack-protector ---- a/gcc/opts.cc -+++ b/gcc/opts.cc -@@ -2833,6 +2833,9 @@ common_handle_option (struct gcc_options - add_comma_separated_to_vector (&opts->x_flag_ignored_attributes, arg); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Werror: - dc->set_warning_as_error_requested (value); - break; diff --git a/packages/devel/gcc/patches-14.x/920-specs_nonfatal_getenv.patch b/packages/devel/gcc/patches-14.x/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 121b684a..00000000 --- a/packages/devel/gcc/patches-14.x/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.cc -+++ b/gcc/gcc.cc -@@ -10319,8 +10319,10 @@ getenv_spec_function (int argc, const ch - } - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/packages/devel/gcc/patches-14.x/960-gotools-fix-compilation-when-making-cross-compiler.patch b/packages/devel/gcc/patches-14.x/960-gotools-fix-compilation-when-making-cross-compiler.patch deleted file mode 100644 index b1d75763..00000000 --- a/packages/devel/gcc/patches-14.x/960-gotools-fix-compilation-when-making-cross-compiler.patch +++ /dev/null @@ -1,67 +0,0 @@ -From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/packages/devel/gcc/patches-14.x/970-macos_arm64-building-fix.patch b/packages/devel/gcc/patches-14.x/970-macos_arm64-building-fix.patch deleted file mode 100644 index da878df2..00000000 --- a/packages/devel/gcc/patches-14.x/970-macos_arm64-building-fix.patch +++ /dev/null @@ -1,45 +0,0 @@ -commit 9c6e71079b46ad5433165feaa2001450f2017b56 -Author: Przemysław Buczkowski -Date: Mon Aug 16 13:16:21 2021 +0100 - - GCC: Patch for Apple Silicon compatibility - - This patch fixes a linker error occuring when compiling - the cross-compiler on macOS and ARM64 architecture. - - Adapted from: - https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404 - - Change-Id: Ia3ee98a163bbb62689f42e2da83a5ef36beb0913 - Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4329 - Reviewed-by: John Scipione - Reviewed-by: Adrien Destugues - ---- a/gcc/config/aarch64/aarch64.h -+++ b/gcc/config/aarch64/aarch64.h -@@ -1410,7 +1410,7 @@ extern enum aarch64_code_model aarch64_c - - /* Extra specs when building a native AArch64-hosted compiler. - Option rewriting rules based on host system. */ --#if defined(__aarch64__) -+#if defined(__aarch64__) && ! defined(__APPLE__) - extern const char *host_detect_local_cpu (int argc, const char **argv); - #define HAVE_LOCAL_CPU_DETECT - # define EXTRA_SPEC_FUNCTIONS \ ---- a/gcc/config/host-darwin.cc -+++ b/gcc/config/host-darwin.cc -@@ -23,6 +23,8 @@ - #include "options.h" - #include "diagnostic-core.h" - #include "config/host-darwin.h" -+#include "hosthooks.h" -+#include "hosthooks-def.h" - #include - - /* For Darwin (macOS only) platforms, without ASLR (PIE) enabled on the -@@ -181,3 +183,5 @@ darwin_gt_pch_use_address (void *&addr, - - return 1; - } -+ -+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/packages/devel/gcc/patches-8.x/002-case_insensitive.patch b/packages/devel/gcc/patches-8.x/002-case_insensitive.patch deleted file mode 100644 index 3442076d..00000000 --- a/packages/devel/gcc/patches-8.x/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/packages/devel/gcc/patches-8.x/003-dont-choke-when-building-32bit-on-64bit.patch b/packages/devel/gcc/patches-8.x/003-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index 39f06d8f..00000000 --- a/packages/devel/gcc/patches-8.x/003-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -70,8 +70,10 @@ struct GTY(()) real_value { - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -+#endif - - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be diff --git a/packages/devel/gcc/patches-8.x/010-documentation.patch b/packages/devel/gcc/patches-8.x/010-documentation.patch deleted file mode 100644 index c7e3d4ad..00000000 --- a/packages/devel/gcc/patches-8.x/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3204,18 +3204,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/packages/devel/gcc/patches-8.x/110-Fix-MIPS-PR-84790.patch b/packages/devel/gcc/patches-8.x/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index b89eca2f..00000000 --- a/packages/devel/gcc/patches-8.x/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -3102,6 +3102,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/packages/devel/gcc/patches-8.x/230-musl_libssp.patch b/packages/devel/gcc/patches-8.x/230-musl_libssp.patch deleted file mode 100644 index b3ab79ca..00000000 --- a/packages/devel/gcc/patches-8.x/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -868,7 +868,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/packages/devel/gcc/patches-8.x/300-mips_Os_cpu_rtx_cost_model.patch b/packages/devel/gcc/patches-8.x/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 2e2c609e..00000000 --- a/packages/devel/gcc/patches-8.x/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19847,7 +19847,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/packages/devel/gcc/patches-8.x/800-arm_v5te_no_ldrd_strd.patch b/packages/devel/gcc/patches-8.x/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 172295f2..00000000 --- a/packages/devel/gcc/patches-8.x/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -155,7 +155,7 @@ extern tree arm_fp16_type_node; - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/packages/devel/gcc/patches-8.x/810-arm-softfloat-libgcc.patch b/packages/devel/gcc/patches-8.x/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86ae..00000000 --- a/packages/devel/gcc/patches-8.x/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/packages/devel/gcc/patches-8.x/820-libgcc_pic.patch b/packages/devel/gcc/patches-8.x/820-libgcc_pic.patch deleted file mode 100644 index 1a9678d4..00000000 --- a/packages/devel/gcc/patches-8.x/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -923,11 +923,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -948,7 +949,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1154,6 +1155,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/packages/devel/gcc/patches-8.x/840-armv4_pass_fix-v4bx_to_ld.patch b/packages/devel/gcc/patches-8.x/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index b9c9b161..00000000 --- a/packages/devel/gcc/patches-8.x/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -88,10 +88,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/packages/devel/gcc/patches-8.x/850-use_shared_libgcc.patch b/packages/devel/gcc/patches-8.x/850-use_shared_libgcc.patch deleted file mode 100644 index f619f0e6..00000000 --- a/packages/devel/gcc/patches-8.x/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -126,10 +126,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/packages/devel/gcc/patches-8.x/851-libgcc_no_compat.patch b/packages/devel/gcc/patches-8.x/851-libgcc_no_compat.patch deleted file mode 100644 index d710e407..00000000 --- a/packages/devel/gcc/patches-8.x/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/packages/devel/gcc/patches-8.x/870-ppc_no_crtsavres.patch b/packages/devel/gcc/patches-8.x/870-ppc_no_crtsavres.patch deleted file mode 100644 index 51d11c3d..00000000 --- a/packages/devel/gcc/patches-8.x/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -24780,7 +24780,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/packages/devel/gcc/patches-8.x/881-no_tm_section.patch b/packages/devel/gcc/patches-8.x/881-no_tm_section.patch deleted file mode 100644 index fab5db3b..00000000 --- a/packages/devel/gcc/patches-8.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/packages/devel/gcc/patches-8.x/900-bad-mips16-crt.patch b/packages/devel/gcc/patches-8.x/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc8..00000000 --- a/packages/devel/gcc/patches-8.x/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/packages/devel/gcc/patches-8.x/910-mbsd_multi.patch b/packages/devel/gcc/patches-8.x/910-mbsd_multi.patch deleted file mode 100644 index c566ea35..00000000 --- a/packages/devel/gcc/patches-8.x/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -459,6 +462,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1125,6 +1134,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1469,6 +1469,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1551,6 +1551,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -2073,6 +2073,9 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -7013,6 +7013,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector diff --git a/packages/devel/gcc/patches-8.x/920-specs_nonfatal_getenv.patch b/packages/devel/gcc/patches-8.x/920-specs_nonfatal_getenv.patch deleted file mode 100644 index c3836e63..00000000 --- a/packages/devel/gcc/patches-8.x/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9347,8 +9347,10 @@ getenv_spec_function (int argc, const ch - value = varname; - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/packages/devel/gcc/patches-8.x/930-fix-mips-noexecstack.patch b/packages/devel/gcc/patches-8.x/930-fix-mips-noexecstack.patch deleted file mode 100644 index ed8ada22..00000000 --- a/packages/devel/gcc/patches-8.x/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22640,6 +22640,9 @@ mips_starting_frame_offset (void) - #undef TARGET_STARTING_FRAME_OFFSET - #define TARGET_STARTING_FRAME_OFFSET mips_starting_frame_offset - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/packages/devel/gcc/patches-8.x/931-libffi-fix-MIPS-softfloat-build-issue.patch b/packages/devel/gcc/patches-8.x/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index fb4cb153..00000000 --- a/packages/devel/gcc/patches-8.x/931-libffi-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] libffi: fix MIPS softfloat build issue - -Backported from github.com/libffi/libffi#272 - -Signed-off-by: BangLang Huang -Signed-off-by: Yousong Zhou ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -263,6 +263,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -271,7 +272,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/packages/devel/gcc/patches/001-revert_register_mode_search.patch b/packages/devel/gcc/patches/001-revert_register_mode_search.patch deleted file mode 100644 index 63e3fee0..00000000 --- a/packages/devel/gcc/patches/001-revert_register_mode_search.patch +++ /dev/null @@ -1,77 +0,0 @@ -commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a -Author: Felix Fietkau -Date: Tue May 6 11:49:05 2014 +0000 - - gcc: revert an upstream patch that is causing a regression on powerpc - - https://forum.openwrt.org/viewtopic.php?pid=232494#p232494 - - Signed-off-by: Felix Fietkau - - SVN-Revision: 40709 - -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/packages/devel/gcc/patches/002-case_insensitive.patch b/packages/devel/gcc/patches/002-case_insensitive.patch deleted file mode 100644 index 3442076d..00000000 --- a/packages/devel/gcc/patches/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/packages/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch b/packages/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index ead317e3..00000000 --- a/packages/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -70,9 +70,10 @@ struct GTY(()) real_value { - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -- -+#endif - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be - as many as four (32-bit HOST_WIDE_INT, 128-bit REAL_VALUE_TYPE). diff --git a/packages/devel/gcc/patches/010-documentation.patch b/packages/devel/gcc/patches/010-documentation.patch deleted file mode 100644 index 0106814f..00000000 --- a/packages/devel/gcc/patches/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3121,18 +3121,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/packages/devel/gcc/patches/020-disable-check-for-sys-sdt-h.patch b/packages/devel/gcc/patches/020-disable-check-for-sys-sdt-h.patch deleted file mode 100644 index 3708f615..00000000 --- a/packages/devel/gcc/patches/020-disable-check-for-sys-sdt-h.patch +++ /dev/null @@ -1,42 +0,0 @@ -@@ -0,0 +1,45 @@ ---- a/gcc/configure -+++ b/gcc/configure -@@ -29036,19 +29036,6 @@ $as_echo "#define ENABLE_DEFAULT_SSP 1" - fi - - --# Test for on the target. -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 --$as_echo_n "checking sys/sdt.h in the target C library... " >&6; } --have_sys_sdt_h=no --if test -f $target_header_dir/sys/sdt.h; then -- have_sys_sdt_h=yes -- --$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 --$as_echo "$have_sys_sdt_h" >&6; } - - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5787,16 +5787,6 @@ if test x$enable_default_ssp = xyes ; th - fi - AC_SUBST([enable_default_ssp]) - --# Test for on the target. --GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) --AC_MSG_CHECKING(sys/sdt.h in the target C library) --have_sys_sdt_h=no --if test -f $target_header_dir/sys/sdt.h; then -- have_sys_sdt_h=yes -- AC_DEFINE(HAVE_SYS_SDT_H, 1, -- [Define if your target C library provides sys/sdt.h]) --fi --AC_MSG_RESULT($have_sys_sdt_h) - - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 diff --git a/packages/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch b/packages/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index 643c5e68..00000000 --- a/packages/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -3098,6 +3098,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/packages/devel/gcc/patches/230-musl_libssp.patch b/packages/devel/gcc/patches/230-musl_libssp.patch deleted file mode 100644 index eebee917..00000000 --- a/packages/devel/gcc/patches/230-musl_libssp.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 1877bc9d8f2be143fbe530347a945850d0ecd234 -Author: Steven Barth -Date: Mon Jun 22 10:31:07 2015 +0000 - - gcc/musl: rework SSP-support - - Make musl provide libssp_nonshared.a and make GCC link it unconditionally - if musl is used. This should be a no-op if SSP is disabled and seems to be - the only reliable way of dealing with SSP over all packages due to the mess - that is linkerflags handling in packages. - - Signed-off-by: Steven Barth - - SVN-Revision: 46108 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -861,7 +861,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/packages/devel/gcc/patches/260-musl-add-unwind-fix.patch b/packages/devel/gcc/patches/260-musl-add-unwind-fix.patch deleted file mode 100644 index 320a6ac5..00000000 --- a/packages/devel/gcc/patches/260-musl-add-unwind-fix.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) -Subject: unwind fix for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4 - -unwind fix for musl - -On behalf of szabolcs.nagy@arm.com - -2015-04-22 Gregor Richards - Szabolcs Nagy - - * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on - Linux if target provides dl_iterate_phdr. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -65,6 +65,12 @@ - - #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ - && defined(TARGET_DL_ITERATE_PHDR) \ -+ && defined(__linux__) -+# define USE_PT_GNU_EH_FRAME -+#endif -+ -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -+ && defined(TARGET_DL_ITERATE_PHDR) \ - && (defined(__DragonFly__) || defined(__FreeBSD__)) - # define ElfW __ElfN - # define USE_PT_GNU_EH_FRAME diff --git a/packages/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch b/packages/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 2d0ae461..00000000 --- a/packages/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19790,7 +19790,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/packages/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch b/packages/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 76200a16..00000000 --- a/packages/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit b050f87d13b5dc7ed82feb9a90f4529de58bdf25 -Author: Felix Fietkau -Date: Wed Feb 19 19:20:10 2014 +0000 - - gcc: prevent the use of LDRD/STRD on ARMv5TE - - These instructions are for 64-bit load/store. On ARMv5TE, the CPU - requires addresses to be aligned to 64-bit. When misaligned, behavior is - undefined (effectively either loads the same word twice on LDRD, or - corrupts surrounding memory on STRD). - - On ARMv6 and newer, unaligned access is safe. - - Removing these instructions for ARMv5TE is necessary, because GCC - ignores alignment information in pointers and does unsafe optimizations - that have shown up as bugs in various places. - - Signed-off-by: Felix Fietkau - - SVN-Revision: 39638 - ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node; - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/packages/devel/gcc/patches/810-arm-softfloat-libgcc.patch b/packages/devel/gcc/patches/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86ae..00000000 --- a/packages/devel/gcc/patches/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/packages/devel/gcc/patches/820-libgcc_pic.patch b/packages/devel/gcc/patches/820-libgcc_pic.patch deleted file mode 100644 index 0cc1e07e..00000000 --- a/packages/devel/gcc/patches/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -945,7 +946,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1151,6 +1152,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/packages/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch b/packages/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index b9c9b161..00000000 --- a/packages/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -88,10 +88,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/packages/devel/gcc/patches/850-use_shared_libgcc.patch b/packages/devel/gcc/patches/850-use_shared_libgcc.patch deleted file mode 100644 index 1d07efed..00000000 --- a/packages/devel/gcc/patches/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -126,10 +126,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/packages/devel/gcc/patches/851-libgcc_no_compat.patch b/packages/devel/gcc/patches/851-libgcc_no_compat.patch deleted file mode 100644 index d710e407..00000000 --- a/packages/devel/gcc/patches/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/packages/devel/gcc/patches/870-ppc_no_crtsavres.patch b/packages/devel/gcc/patches/870-ppc_no_crtsavres.patch deleted file mode 100644 index 1b448eb5..00000000 --- a/packages/devel/gcc/patches/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit d8c570a1531035c3e26bcd94741e5f5b9c36b5d9 -Author: Felix Fietkau -Date: Mon Mar 5 00:51:01 2012 +0000 - - gcc: do not emit references to _savegpr_* and _restgpr_* on powerpc, as they are tricky to deal with wrt. libgcc. they cannot be linked dynamically - - SVN-Revision: 30814 ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -26981,7 +26981,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/packages/devel/gcc/patches/881-no_tm_section.patch b/packages/devel/gcc/patches/881-no_tm_section.patch deleted file mode 100644 index a58dc27e..00000000 --- a/packages/devel/gcc/patches/881-no_tm_section.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 565988ab47bd9b96b50608564aee2104aeb4b7ae -Author: Felix Fietkau -Date: Tue Dec 13 14:20:49 2016 +0100 - - gcc: rip out transactional memory related bloat from crtbegin - - Slightly improves compression for each executable, saving about 4k from - the default ar71xx rootfs - - Signed-off-by: Felix Fietkau - ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/packages/devel/gcc/patches/900-bad-mips16-crt.patch b/packages/devel/gcc/patches/900-bad-mips16-crt.patch deleted file mode 100644 index f5cc0a74..00000000 --- a/packages/devel/gcc/patches/900-bad-mips16-crt.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 9dc38e48f7a6f88b7ac7bfaced91f53660204e46 -Author: Florian Fainelli -Date: Fri Apr 5 12:36:06 2013 +0000 - - toolchain/gcc: .init and .fini need to pick one ISA - - The .init and .fini sections are built by concatenating code - fragments. Putting mips16 code in the middle of a mips32 code block - doesn't work. Make gcc built the magic crt stuff in no-mips16 mode. - - This is specific to 4.6-linaro but is probably portable to other gcc - flavors. Adding this to the t-libgcc-mips16 makefile fragment is a - hack not suitable for pushing upstream, but there is no mips/t-linux - or mips/t-uclibc and I am not going to touch gcc/configure for two - lines. - - Signed-off-by: Jay Carlson - Signed-off-by: Florian Fainelli - - SVN-Revision: 36200 - ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/packages/devel/gcc/patches/910-mbsd_multi.patch b/packages/devel/gcc/patches/910-mbsd_multi.patch deleted file mode 100644 index f19007ea..00000000 --- a/packages/devel/gcc/patches/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -108,6 +108,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1084,6 +1093,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1510,6 +1510,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1954,6 +1954,9 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -6572,6 +6572,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector diff --git a/packages/devel/gcc/patches/920-specs_nonfatal_getenv.patch b/packages/devel/gcc/patches/920-specs_nonfatal_getenv.patch deleted file mode 100644 index a0fdc5f1..00000000 --- a/packages/devel/gcc/patches/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9281,8 +9281,10 @@ getenv_spec_function (int argc, const ch - value = varname; - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/packages/devel/gcc/patches/930-fix-mips-noexecstack.patch b/packages/devel/gcc/patches/930-fix-mips-noexecstack.patch deleted file mode 100644 index 5affd6f9..00000000 --- a/packages/devel/gcc/patches/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22567,6 +22567,9 @@ mips_promote_function_mode (const_tree t - #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS - #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2 - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/packages/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch b/packages/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index fb4cb153..00000000 --- a/packages/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] libffi: fix MIPS softfloat build issue - -Backported from github.com/libffi/libffi#272 - -Signed-off-by: BangLang Huang -Signed-off-by: Yousong Zhou ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< -Date: Fri Dec 12 17:01:57 2014 +0000 - - gcc: don't clobber stamp-bits with a symlink to itself - - Several versions of gcc have an issue in libstdc++v3 where the build may - clobber stamp-bits with a link to itself. This doesn't manifest itself - on all systems. On several Ubuntu systems, this doesn't appear to be a - problem, but it is an issue on Fedora 16 systems. - - To fix the issue, we'll simply filter out stamp-bits from the symlinks - to be generated. - - Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary - there. - - Signed-off-by: John Szakmeister - - SVN-Revision: 43669 - - ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1474,7 +1474,7 @@ stamp-bits: ${bits_headers} - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/packages/devel/gcc/patches/950-cpp_file_path_translation.patch b/packages/devel/gcc/patches/950-cpp_file_path_translation.patch deleted file mode 100644 index cd30cb20..00000000 --- a/packages/devel/gcc/patches/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,181 +0,0 @@ -commit 331735a357a73c7b8adc205241ac3cc6543d985e -Author: Felix Fietkau -Date: Tue Nov 17 12:38:22 2015 +0000 - - gcc: add a patch to 5.x that supports translation of __FILE__ paths - - Signed-off-by: Felix Fietkau - - SVN-Revision: 47490 - -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1825,6 +1825,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path. - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path. ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] - [@option{-MT} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam - extensions that GCC uses for preprocessed files created by - @option{-save-temps}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -11871,6 +11871,12 @@ by @option{-fplugin=@var{name}} instead - @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant - to be used by the user, but only passed by the driver. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -227,6 +227,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/packages/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch b/packages/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch deleted file mode 100644 index 0822790d..00000000 --- a/packages/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch +++ /dev/null @@ -1,66 +0,0 @@ -From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - if NATIVE -@@ -38,7 +39,8 @@ endif - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - cmdsrcdir = $(srcdir)/../libgo/go/cmd ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -252,13 +252,15 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - @NATIVE_FALSE@GOCOMPILER = $(GOC) - - # Use the compiler we just built. - @NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - cmdsrcdir = $(srcdir)/../libgo/go/cmd - go_cmd_go_files = \ diff --git a/packages/devel/gcc/patches/970-replace-memcpy-memset.patch b/packages/devel/gcc/patches/970-replace-memcpy-memset.patch deleted file mode 100644 index 1487d629..00000000 --- a/packages/devel/gcc/patches/970-replace-memcpy-memset.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/libitm/beginend.cc -+++ b/libitm/beginend.cc -@@ -431,7 +431,7 @@ GTM::gtm_transaction_cp::save(gtm_thread - // Save everything that we might have to restore on restarts or aborts. - jb = tx->jb; - undolog_size = tx->undolog.size(); -- memcpy(&alloc_actions, &tx->alloc_actions, sizeof(alloc_actions)); -+ alloc_actions = tx->alloc_actions; - user_actions_size = tx->user_actions.size(); - id = tx->id; - prop = tx->prop; -@@ -449,7 +449,7 @@ GTM::gtm_transaction_cp::commit(gtm_thre - // commits of nested transactions. Allocation actions must be committed - // before committing the snapshot. - tx->jb = jb; -- memcpy(&tx->alloc_actions, &alloc_actions, sizeof(alloc_actions)); -+ tx->alloc_actions = alloc_actions; - tx->id = id; - tx->prop = prop; - } -@@ -485,7 +485,7 @@ GTM::gtm_thread::rollback (gtm_transacti - prop = cp->prop; - if (cp->disp != abi_disp()) - set_abi_disp(cp->disp); -- memcpy(&alloc_actions, &cp->alloc_actions, sizeof(alloc_actions)); -+ alloc_actions = cp->alloc_actions; - nesting = cp->nesting; - } - else ---- a/libitm/method-ml.cc -+++ b/libitm/method-ml.cc -@@ -138,7 +138,9 @@ struct ml_mg : public method_group - // This store is only executed while holding the serial lock, so relaxed - // memory order is sufficient here. Same holds for the memset. - time.store(0, memory_order_relaxed); -- memset(orecs, 0, sizeof(atomic) * L2O_ORECS); -+ void *p = orecs; -+ memset(p, 0, sizeof(atomic) * L2O_ORECS); -+ - } - }; - diff --git a/packages/devel/gitlab-runner/Makefile b/packages/devel/gitlab-runner/Makefile deleted file mode 100644 index 801119e0..00000000 --- a/packages/devel/gitlab-runner/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2020-2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/) -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gitlab-runner -PKG_VERSION:=16.0.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v$(PKG_VERSION) -PKG_HASH:=f874b9babe21ae04007abfc901e9ad4c0c1ec22095d4de3e22e176914683cb5d - -PKG_MAINTAINER:=Jan Pavlinec -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DIR:=$(BUILD_DIR)/gitlab-runner-v$(PKG_VERSION) -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -GO_PKG:=gitlab.com/gitlab-org/gitlab-runner -GO_PKG_LDFLAGS_X:=$(GO_PKG)/common.VERSION=$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../../lang/golang/golang-package.mk - -define Package/gitlab-runner - SECTION:=devel - CATEGORY:=Development - TITLE:=Runner for CI/CD - URL:=https://docs.gitlab.com/runner - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/gitlab-runner/description - GitLab Runner is an application that works with - GitLab CI/CD to run jobs in a pipeline. -endef - -define Package/gitlab-runner/install - $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) - $(INSTALL_DIR) $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gitlab-runner $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gitlab-runner-helper $(1)/usr/bin/ -endef - -$(eval $(call GoBinPackage,gitlab-runner)) -$(eval $(call BuildPackage,gitlab-runner)) diff --git a/packages/devel/gitlab-runner/patches/010-test.patch b/packages/devel/gitlab-runner/patches/010-test.patch deleted file mode 100644 index f6694050..00000000 --- a/packages/devel/gitlab-runner/patches/010-test.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/common/buildtest/masking.go -+++ b/common/buildtest/masking.go -@@ -55,7 +55,7 @@ func RunBuildWithMasking(t *testing.T, c - - buf.Finish() - -- contents, err := buf.Bytes(0, math.MaxInt64) -+ contents, err := buf.Bytes(0, math.MaxInt32) - assert.NoError(t, err) - - assert.NotContains(t, string(contents), "MASKED_KEY=MASKED_VALUE") diff --git a/packages/devel/gitlab-runner/test.sh b/packages/devel/gitlab-runner/test.sh deleted file mode 100644 index 15171470..00000000 --- a/packages/devel/gitlab-runner/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -gitlab-runner --version | grep "$PKG_VERSION" diff --git a/packages/devel/gn/Makefile b/packages/devel/gn/Makefile deleted file mode 100644 index c1a48688..00000000 --- a/packages/devel/gn/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-only -# -# Copyright (C) 2022 ImmortalWrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gn -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git -PKG_SOURCE_DATE:=2024-11-19 -PKG_SOURCE_VERSION:=24e92acb847233a9c0753c12cb82c98fc084e3db -PKG_MIRROR_HASH:=d5b18b91286f0029e262fc548e4d9636c195a45d41c211f321b126040e246d1d - -PKG_LICENSE:=BSD 3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Tianling Shen - -PKG_HOST_ONLY:=1 -HOST_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/gn - SECTION:=devel - CATEGORY:=Development - TITLE:=A meta-build system that generates build files for Ninja - URL:=https://gn.googlesource.com/gn/ - BUILDONLY:=1 -endef - -define Package/gn/description - GN can generate Ninja build files for C, C++, Rust, Objective C, - and Swift source on most popular platforms. -endef - -define Host/Configure - $(PYTHON) $(HOST_BUILD_DIR)/build/gen.py \ - --no-last-commit-position -endef - -define Host/Compile - +$(NINJA) -C $(HOST_BUILD_DIR)/out -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/out/gn $(STAGING_DIR_HOSTPKG)/bin/ -endef - -define Host/Clean - $(RM) $(STAGING_DIR_HOSTPKG)/bin/gn -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,gn)) diff --git a/packages/devel/gn/src/out/last_commit_position.h b/packages/devel/gn/src/out/last_commit_position.h deleted file mode 100644 index 6803ed4c..00000000 --- a/packages/devel/gn/src/out/last_commit_position.h +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by build/gen.py. - -#ifndef OUT_LAST_COMMIT_POSITION_H_ -#define OUT_LAST_COMMIT_POSITION_H_ - -#define LAST_COMMIT_POSITION_NUM 2205 -#define LAST_COMMIT_POSITION "2205 (24e92acb8472)" - -#endif // OUT_LAST_COMMIT_POSITION_H_ diff --git a/packages/devel/go-rice/Makefile b/packages/devel/go-rice/Makefile deleted file mode 100644 index 8a78082a..00000000 --- a/packages/devel/go-rice/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-only -# -# Copyright (C) 2021 ImmortalWrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=go.rice -PKG_VERSION:=1.0.2 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/GeertJohan/go.rice/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=2eed960aa9531a87c82d2379677723bc0129bc9e387dc0dbb3bb70b78c928dd0 - -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Tianling Shen - -HOST_BUILD_DEPENDS:=golang/host -HOST_BUILD_PARALLEL:=1 - -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -GO_PKG:=github.com/GeertJohan/go.rice -GO_PKG_BUILD_PKG:=$(GO_PKG)/rice - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk -include ../../lang/golang/golang-host-build.mk -include ../../lang/golang/golang-package.mk - -define Package/go-rice - SECTION:=devel - CATEGORY:=Development - TITLE:=A Go package that makes working with resources - URL:=https://github.com/GeertJohan/go.rice - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/go-rice/description - go.rice is a Go package that makes working with resources such as - html,js,css,images and templates easy. - - During development go.rice will load required files directly from disk. - Upon deployment it's easy to add all resource files to a executable - using the rice tool without changing the source code for your package. - - go.rice provides methods to add resources to a binary in different scenarios. -endef - -$(eval $(call GoBinHostBuild)) -$(eval $(call HostBuild)) -$(eval $(call GoBinPackage,go-rice)) -$(eval $(call BuildPackage,go-rice)) diff --git a/packages/devel/libtool-bin/Makefile b/packages/devel/libtool-bin/Makefile deleted file mode 100644 index c63fd951..00000000 --- a/packages/devel/libtool-bin/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libtool -PKG_VERSION:=2.4.6 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/libtool -PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-2.0-or-later -PKG_CPE_ID:=cpe:/a:gnu:libtool - -PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_VARS += GREP=grep SED=sed - -define Package/libtool-bin - SECTION:=devel - CATEGORY:=Development - TITLE:=GNU Libtool - libtoolize - URL:=https://www.gnu.org/software/libtool/ -endef - -define Package/libtool-bin/description - GNU libtool is a generic library support script. - Libtool hides the complexity of using shared libraries behind a consistent, - portable interface. - This package contains the libtoolize executable. -endef - -define Package/libtool-bin/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libtoolize $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/aclocal/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \ - $(1)/usr/share/aclocal/ - $(INSTALL_DIR) $(1)/usr/share/libtool/build-aux/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libtool/build-aux/* \ - $(1)/usr/share/libtool/build-aux/ -endef - -$(eval $(call BuildPackage,libtool-bin)) diff --git a/packages/devel/lpc21isp/Makefile b/packages/devel/lpc21isp/Makefile deleted file mode 100644 index cdf6cb72..00000000 --- a/packages/devel/lpc21isp/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lpc21isp -PKG_VERSION:=197 -PKG_RELEASE:=6 -PKG_LICENSE:=LGPL-3.0-or-later -PKG_LICENSE_FILES:=README gpl.txt lgpl-3.0.txt - -PKG_BUILD_DIR:=$(BUILD_DIR)/lpc21isp_$(PKG_VERSION) -PKG_SOURCE:=lpc21isp_$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/lpc21isp -PKG_HASH:=9f7d80382e4b70bfa4200233466f29f73a36fea7dc604e32f05b9aa69ef591dc -PKG_CAT:=zcat - -include $(INCLUDE_DIR)/package.mk - -define Package/lpc21isp - SECTION:=base - CATEGORY:=Development - TITLE:=Command line ISP for NXP LPC family and ADUC70xx - URL:=http://lpc21isp.sourceforge.net/ - MAINTAINER:=Emil 'Skeen' Madsen -endef - -define Package/lpc21isp/description - Portable command line ISP (In-circuit Programmer) for NXP LPC family - and Analog Devices ADUC70xx. -endef - -TARGET_CFLAGS += $(if $(CONFIG_USE_GLIBC),-lc -lgcc_eh) - -MAKE_FLAGS += \ - OSTYPE="Linux" - -define Package/lpc21isp/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lpc21isp $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,lpc21isp)) diff --git a/packages/devel/lpc21isp/patches/100-fix-reproducible-builds.patch b/packages/devel/lpc21isp/patches/100-fix-reproducible-builds.patch deleted file mode 100644 index ee26d071..00000000 --- a/packages/devel/lpc21isp/patches/100-fix-reproducible-builds.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lpc21isp.c -+++ b/lpc21isp.c -@@ -1549,7 +1549,7 @@ static void ReadArguments(ISP_ENVIRONMEN - DebugPrintf(2, "\n" - "Portable command line ISP\n" - "for NXP LPC family and Analog Devices ADUC 70xx\n" -- "Version " VERSION_STR " compiled for " COMPILED_FOR ": " __DATE__ ", " __TIME__ "\n" -+ "Version " VERSION_STR " compiled for " COMPILED_FOR "\n" - "Copyright (c) by Martin Maurer, 2003-2013, Email: Martin.Maurer@clibb.de\n" - "Portions Copyright (c) by Aeolus Development 2004, www.aeolusdevelopment.com\n" - "\n"); diff --git a/packages/devel/lpc21isp/patches/110-bzero.patch b/packages/devel/lpc21isp/patches/110-bzero.patch deleted file mode 100644 index 22c01244..00000000 --- a/packages/devel/lpc21isp/patches/110-bzero.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lpc21isp.c -+++ b/lpc21isp.c -@@ -533,7 +533,7 @@ static void OpenSerialPort(ISP_ENVIRONME - - tcgetattr(IspEnvironment->fdCom, &IspEnvironment->oldtio); /* save current port settings */ - -- bzero(&IspEnvironment->newtio, sizeof(IspEnvironment->newtio)); -+ memset(&IspEnvironment->newtio, 0, sizeof(IspEnvironment->newtio)); - IspEnvironment->newtio.c_cflag = CS8 | CLOCAL | CREAD; - - #if defined(__FreeBSD__) || defined(__OpenBSD__) diff --git a/packages/devel/lpc21isp/patches/120-nanosleep.patch b/packages/devel/lpc21isp/patches/120-nanosleep.patch deleted file mode 100644 index 9e3ef973..00000000 --- a/packages/devel/lpc21isp/patches/120-nanosleep.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/lpc21isp.c -+++ b/lpc21isp.c -@@ -1130,7 +1130,8 @@ void ClearSerialPortBuffers(ISP_ENVIRONM - */ - void Sleep(unsigned long MilliSeconds) - { -- usleep(MilliSeconds*1000); //convert to microseconds -+ struct timespec m = { MilliSeconds / 1000 , (MilliSeconds % 1000 ) * 1000 * 1000}; -+ nanosleep(&m, &m); //convert to nanoseconds - } - #endif // defined COMPILE_FOR_LINUX - diff --git a/packages/devel/lttng-modules/Makefile b/packages/devel/lttng-modules/Makefile deleted file mode 100644 index 5eea851a..00000000 --- a/packages/devel/lttng-modules/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lttng-modules -PKG_VERSION:=2.13.9 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ -PKG_HASH:=bf808b113544287cfe837a6382887fa66354ef5cc8216460cebbef3d27dc3581 - -PKG_MAINTAINER:= -PKG_LICENSE:=LGPL-2.1 GPL-2.0 MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/lttng - SUBMENU:=Other modules - TITLE:=Linux Trace Toolkit: next generation (kernel modules) - URL:=https://lttng.org/ - DEPENDS:=@!TARGET_uml @KERNEL_FTRACE_SYSCALLS @KERNEL_KPROBES - FILES:= \ - $(PKG_BUILD_DIR)/src/lttng-*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/src/lib/lttng-*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/src/probes/lttng-*.$(LINUX_KMOD_SUFFIX) -endef - -define Build/Compile - +$(KERNEL_MAKE) $(PKG_JOBS) \ - M="$(PKG_BUILD_DIR)" \ - CONFIG_LTTNG=m \ - modules -endef - -$(eval $(call KernelPackage,lttng)) diff --git a/packages/devel/lttng-tools/Makefile b/packages/devel/lttng-tools/Makefile deleted file mode 100644 index c8eac7ae..00000000 --- a/packages/devel/lttng-tools/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lttng-tools -PKG_VERSION:=2.13.9 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ -PKG_HASH:=8d94dc95b608cf70216b01203a3f8242b97a232db2e23421a2f43708da08f337 - -PKG_MAINTAINER:= -PKG_LICENSE:=LGPL-2.1 GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_FLAGS:=no-mips16 -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/lttng-tools - SECTION:=devel - CATEGORY:=Development - TITLE:=Linux Trace Toolkit: next generation (tools) - URL:=https://lttng.org/ - DEPENDS:= +lttng-ust +libpopt +libxml2 $(ICONV_DEPENDS) -endef - -CONFIGURE_ARGS += \ - --enable-epoll \ - --disable-man-pages \ - --disable-python-bindings \ - --disable-test-python-agent-all \ - --disable-test-sdt-uprobe \ - --disable-bin-lttng-consumerd \ - --disable-extras \ - --without-kmod \ - --with-pic - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ctl*.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lttng-ctl.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/lttng-tools/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ctl*.so.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lttng* $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,lttng-tools)) diff --git a/packages/devel/lttng-tools/patches/010-compat-off64_t-is-not-defined-by-musl.patch b/packages/devel/lttng-tools/patches/010-compat-off64_t-is-not-defined-by-musl.patch deleted file mode 100644 index 8b65f428..00000000 --- a/packages/devel/lttng-tools/patches/010-compat-off64_t-is-not-defined-by-musl.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 57fd993799a2b081c826f6fc8def32d28d526bfb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?= - -Date: Tue, 17 Jan 2023 16:57:35 -0500 -Subject: [PATCH] compat: off64_t is not defined by musl -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This helps compile with latest musl, where off64_t is not defined unless -_LARGEFILE64_SOURCE is defined. On glibc, _LARGEFILE64_SOURCE is defined -if _GNU_SOURCE is defined, so the problem is only seen with musl. - -Since the project uses AC_SYS_LARGEFILE, which from the autoconf doc: -"arrange for 64-bit file offsets, known as large-file support." - -As such, it is safe to assume off_t is 64-bit wide. This is checked by a -static_assert to catch any platform where autoconf would let a 32-bit -off_t slip. - -Reported-by: Khem Raj -Signed-off-by: Jérémie Galarneau -Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8 ---- - src/common/compat/compat-fcntl.cpp | 2 +- - src/common/compat/fcntl.hpp | 11 +++++------ - 2 files changed, 6 insertions(+), 7 deletions(-) - ---- a/src/common/compat/compat-fcntl.c -+++ b/src/common/compat/compat-fcntl.c -@@ -13,7 +13,7 @@ - #ifdef __linux__ - - LTTNG_HIDDEN --int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, -+int compat_sync_file_range(int fd, off_t offset, off_t nbytes, - unsigned int flags) - { - #ifdef HAVE_SYNC_FILE_RANGE ---- a/src/common/compat/fcntl.h -+++ b/src/common/compat/fcntl.h -@@ -8,21 +8,21 @@ - #ifndef _COMPAT_FCNTL_H - #define _COMPAT_FCNTL_H - -+#include - #include - #include - - #include - --#if (defined(__CYGWIN__)) --typedef long long off64_t; --#endif -+static_assert(sizeof(off_t) == sizeof(int64_t), -+ "Build system is misconfigured, off_t must be 64-bit wide"); - - #if (defined(__FreeBSD__) || defined(__sun__)) - typedef off64_t loff_t; - #endif - - #ifdef __linux__ --extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, -+extern int compat_sync_file_range(int fd, off_t offset, off_t nbytes, - unsigned int flags); - #define lttng_sync_file_range(fd, offset, nbytes, flags) \ - compat_sync_file_range(fd, offset, nbytes, flags) -@@ -37,8 +37,8 @@ extern int compat_sync_file_range(int fd - #define SYNC_FILE_RANGE_WAIT_BEFORE 0 - #define SYNC_FILE_RANGE_WRITE 0 - --static inline int lttng_sync_file_range(int fd, off64_t offset, -- off64_t nbytes, unsigned int flags) -+static inline int lttng_sync_file_range(int fd, off_t offset, -+ off_t nbytes, unsigned int flags) - { - return -ENOSYS; - } diff --git a/packages/devel/m4/Makefile b/packages/devel/m4/Makefile deleted file mode 100644 index 89635807..00000000 --- a/packages/devel/m4/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=m4 -PKG_VERSION:=1.4.19 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=@GNU/m4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96 -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0-or-later -PKG_CPE_ID:=cpe:/a:gnu:m4 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/m4 - SECTION:=devel - CATEGORY:=Development - TITLE:=m4 - URL:=https://www.gnu.org/software/m4/ -endef - -define Package/m4/description - GNU M4 is an implementation of the traditional Unix macro processor. - It is used by GNU Autoconf and Automake. -endef - -define Package/m4/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/m4 $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,m4)) diff --git a/packages/devel/m4/patches/010-ppc.patch b/packages/devel/m4/patches/010-ppc.patch deleted file mode 100644 index 7110a89e..00000000 --- a/packages/devel/m4/patches/010-ppc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/lib/sigsegv.c -+++ b/lib/sigsegv.c -@@ -217,8 +217,8 @@ int libsigsegv_version = LIBSIGSEGV_VERS - # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1] - # else /* 32-bit */ - /* both should be equivalent */ --# if 0 --# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] -+# ifndef __GLIBC__ -+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1] - # else - # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] - # endif diff --git a/packages/devel/make/Makefile b/packages/devel/make/Makefile deleted file mode 100644 index 3a9461a9..00000000 --- a/packages/devel/make/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=make -PKG_VERSION:=4.4.1 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=@GNU/make -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3 - -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0-or-later -PKG_CPE_ID:=cpe:/a:gnu:make - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/make - SECTION:=devel - CATEGORY:=Development - TITLE:=make - URL:=https://www.gnu.org/software/make/ -endef - -define Package/make/description - The Make package contains a tool to create executables from source files. -endef - -define Package/make/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/make $(1)/usr/bin/ -endef - -CONFIGURE_VARS += ac_cv_lib_elf_elf_begin=no - -# provide gnumake.h at build time for other packages -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/gnumake.h $(1)/usr/include/ -endef - -$(eval $(call BuildPackage,make)) diff --git a/packages/devel/nasm/Makefile b/packages/devel/nasm/Makefile deleted file mode 100644 index d071a429..00000000 --- a/packages/devel/nasm/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=nasm -PKG_VERSION:=2.16.01 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=c77745f4802375efeee2ec5c0ad6b7f037ea9c87c92b149a9637ff099f162558 - -PKG_MAINTAINER:=Oskari Rauta -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_CPE_ID:=cpe:/a:nasm:netwide_assembler - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/nasm - SECTION:=devel - CATEGORY:=Development - TITLE:=nasm assembler - DEPENDS:=@TARGET_x86 -endef - -define Package/nasm/description - NASM, the Netwide Assembler: an assembler targetting the - Intel x86 series of processors, with portable source. -endef - -CONFIGURE_ARGS += --disable-lto --disable-werror --disable-gdb - -define Package/nasm/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndisasm $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nasm $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,nasm)) diff --git a/packages/devel/patch/Makefile b/packages/devel/patch/Makefile deleted file mode 100644 index c8426750..00000000 --- a/packages/devel/patch/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=patch -PKG_VERSION:=2.7.6 -PKG_RELEASE:=7 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/patch -PKG_HASH:=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd - -PKG_LICENSE:=GPL-3.0-or-later -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:gnu:patch - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/patch - SECTION:=devel - CATEGORY:=Development - TITLE:=patch - URL:=https://savannah.gnu.org/projects/patch/ - MAINTAINER:=Russell Senior -endef - -define Package/patch/description - The Patch package contains a program for modifying or creating files - by applying a "patch" file typically created by the diff program. -endef - -CONFIGURE_ARGS+= --disable-xattr - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/patch/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/patch $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,patch)) diff --git a/packages/devel/patch/patches/010-CVE-2018-6951.patch b/packages/devel/patch/patches/010-CVE-2018-6951.patch deleted file mode 100644 index eb8d5136..00000000 --- a/packages/devel/patch/patches/010-CVE-2018-6951.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9bf998b5fcbcde1dea0e472dc1538abb97e9012e Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Mon, 12 Feb 2018 16:48:24 +0100 -Subject: [PATCH] Fix segfault with mangled rename patch - -http://savannah.gnu.org/bugs/?53132 -* src/pch.c (intuit_diff_type): Ensure that two filenames are specified -for renames and copies (fix the existing check). ---- - src/pch.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/src/pch.c -+++ b/src/pch.c -@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode - if ((pch_rename () || pch_copy ()) - && ! inname - && ! ((i == OLD || i == NEW) && -- p_name[! reverse] && -+ p_name[reverse] && p_name[! reverse] && -+ name_is_valid (p_name[reverse]) && - name_is_valid (p_name[! reverse]))) - { - say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy"); diff --git a/packages/devel/patch/patches/020-CVE-2018-1000156.patch b/packages/devel/patch/patches/020-CVE-2018-1000156.patch deleted file mode 100644 index e3c9f231..00000000 --- a/packages/devel/patch/patches/020-CVE-2018-1000156.patch +++ /dev/null @@ -1,189 +0,0 @@ -From b56779aed483f0036a32a65e62ab7b5e461b07cc Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Fri, 6 Apr 2018 12:14:49 +0200 -Subject: [PATCH] Fix arbitrary command execution in ed-style patches - (CVE-2018-1000156) - -* src/pch.c (do_ed_script): Write ed script to a temporary file instead -of piping it to ed: this will cause ed to abort on invalid commands -instead of rejecting them and carrying on. -* tests/ed-style: New test case. -* tests/Makefile.am (TESTS): Add test case. (OPENWRT REMOVED) ---- - src/pch.c | 89 +++++++++++++++++++++++++++++++++++------------ - tests/Makefile.am | 1 + (OPENWRT REMOVED) - tests/ed-style | 41 ++++++++++++++++++++++ - 3 files changed, 108 insertions(+), 23 deletions(-) - create mode 100644 tests/ed-style - ---- a/src/pch.c -+++ b/src/pch.c -@@ -33,6 +33,7 @@ - # include - #endif - #include -+#include - - #define INITHUNKMAX 125 /* initial dynamic allocation size */ - -@@ -2389,22 +2390,28 @@ do_ed_script (char const *inname, char c - static char const editor_program[] = EDITOR_PROGRAM; - - file_offset beginning_of_this_line; -- FILE *pipefp = 0; - size_t chars_read; -+ FILE *tmpfp = 0; -+ char const *tmpname; -+ int tmpfd; -+ pid_t pid; -+ -+ if (! dry_run && ! skip_rest_of_patch) -+ { -+ /* Write ed script to a temporary file. This causes ed to abort on -+ invalid commands such as when line numbers or ranges exceed the -+ number of available lines. When ed reads from a pipe, it rejects -+ invalid commands and treats the next line as a new command, which -+ can lead to arbitrary command execution. */ -+ -+ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0); -+ if (tmpfd == -1) -+ pfatal ("Can't create temporary file %s", quotearg (tmpname)); -+ tmpfp = fdopen (tmpfd, "w+b"); -+ if (! tmpfp) -+ pfatal ("Can't open stream for file %s", quotearg (tmpname)); -+ } - -- if (! dry_run && ! skip_rest_of_patch) { -- int exclusive = *outname_needs_removal ? 0 : O_EXCL; -- assert (! inerrno); -- *outname_needs_removal = true; -- copy_file (inname, outname, 0, exclusive, instat.st_mode, true); -- sprintf (buf, "%s %s%s", editor_program, -- verbosity == VERBOSE ? "" : "- ", -- outname); -- fflush (stdout); -- pipefp = popen(buf, binary_transput ? "wb" : "w"); -- if (!pipefp) -- pfatal ("Can't open pipe to %s", quotearg (buf)); -- } - for (;;) { - char ed_command_letter; - beginning_of_this_line = file_tell (pfp); -@@ -2415,14 +2422,14 @@ do_ed_script (char const *inname, char c - } - ed_command_letter = get_ed_command_letter (buf); - if (ed_command_letter) { -- if (pipefp) -- if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) -+ if (tmpfp) -+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) - write_fatal (); - if (ed_command_letter != 'd' && ed_command_letter != 's') { - p_pass_comments_through = true; - while ((chars_read = get_line ()) != 0) { -- if (pipefp) -- if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) -+ if (tmpfp) -+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) - write_fatal (); - if (chars_read == 2 && strEQ (buf, ".\n")) - break; -@@ -2435,13 +2442,49 @@ do_ed_script (char const *inname, char c - break; - } - } -- if (!pipefp) -+ if (!tmpfp) - return; -- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0 -- || fflush (pipefp) != 0) -+ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0 -+ || fflush (tmpfp) != 0) - write_fatal (); -- if (pclose (pipefp) != 0) -- fatal ("%s FAILED", editor_program); -+ -+ if (lseek (tmpfd, 0, SEEK_SET) == -1) -+ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname)); -+ -+ if (! dry_run && ! skip_rest_of_patch) { -+ int exclusive = *outname_needs_removal ? 0 : O_EXCL; -+ *outname_needs_removal = true; -+ if (inerrno != ENOENT) -+ { -+ *outname_needs_removal = true; -+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true); -+ } -+ sprintf (buf, "%s %s%s", editor_program, -+ verbosity == VERBOSE ? "" : "- ", -+ outname); -+ fflush (stdout); -+ -+ pid = fork(); -+ if (pid == -1) -+ pfatal ("Can't fork"); -+ else if (pid == 0) -+ { -+ dup2 (tmpfd, 0); -+ execl ("/bin/sh", "sh", "-c", buf, (char *) 0); -+ _exit (2); -+ } -+ else -+ { -+ int wstatus; -+ if (waitpid (pid, &wstatus, 0) == -1 -+ || ! WIFEXITED (wstatus) -+ || WEXITSTATUS (wstatus) != 0) -+ fatal ("%s FAILED", editor_program); -+ } -+ } -+ -+ fclose (tmpfp); -+ safe_unlink (tmpname); - - if (ofp) - { ---- /dev/null -+++ b/tests/ed-style -@@ -0,0 +1,41 @@ -+# Copyright (C) 2018 Free Software Foundation, Inc. -+# -+# Copying and distribution of this file, with or without modification, -+# in any medium, are permitted without royalty provided the copyright -+# notice and this notice are preserved. -+ -+. $srcdir/test-lib.sh -+ -+require cat -+use_local_patch -+use_tmpdir -+ -+# ============================================================== -+ -+cat > ed1.diff < ed2.diff < /dev/null || echo "Status: $?"' < -Date: Fri, 17 Aug 2018 13:35:40 +0200 -Subject: [PATCH] Fix swapping fake lines in pch_swap - -* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a -blank line in the middle of a context-diff hunk: that empty line stays -in the middle of the hunk and isn't swapped. - -Fixes: https://savannah.gnu.org/bugs/index.php?53133 ---- - src/pch.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/pch.c -+++ b/src/pch.c -@@ -2115,7 +2115,7 @@ pch_swap (void) - } - if (p_efake >= 0) { /* fix non-freeable ptr range */ - if (p_efake <= i) -- n = p_end - i + 1; -+ n = p_end - p_ptrn_lines; - else - n = -i; - p_efake += n; diff --git a/packages/devel/patch/patches/050-CVE-2019-13636.patch b/packages/devel/patch/patches/050-CVE-2019-13636.patch deleted file mode 100644 index d819838b..00000000 --- a/packages/devel/patch/patches/050-CVE-2019-13636.patch +++ /dev/null @@ -1,101 +0,0 @@ -From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Mon, 15 Jul 2019 16:21:48 +0200 -Subject: Don't follow symlinks unless --follow-symlinks is given - -* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, -append_to_file): Unless the --follow-symlinks option is given, open files with -the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing -that consistently for input files. -* src/util.c (create_backup): When creating empty backup files, (re)create them -with O_CREAT | O_EXCL to avoid following symlinks in that case as well. ---- - src/inp.c | 12 ++++++++++-- - src/util.c | 14 +++++++++++--- - 2 files changed, 21 insertions(+), 5 deletions(-) - ---- a/src/inp.c -+++ b/src/inp.c -@@ -238,8 +238,13 @@ plan_a (char const *filename) - { - if (S_ISREG (instat.st_mode)) - { -- int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); -+ int flags = O_RDONLY | binary_transput; - size_t buffered = 0, n; -+ int ifd; -+ -+ if (! follow_symlinks) -+ flags |= O_NOFOLLOW; -+ ifd = safe_open (filename, flags, 0); - if (ifd < 0) - pfatal ("can't open file %s", quotearg (filename)); - -@@ -340,6 +345,7 @@ plan_a (char const *filename) - static void - plan_b (char const *filename) - { -+ int flags = O_RDONLY | binary_transput; - int ifd; - FILE *ifp; - int c; -@@ -353,7 +359,9 @@ plan_b (char const *filename) - - if (instat.st_size == 0) - filename = NULL_DEVICE; -- if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0 -+ if (! follow_symlinks) -+ flags |= O_NOFOLLOW; -+ if ((ifd = safe_open (filename, flags, 0)) < 0 - || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r"))) - pfatal ("Can't open file %s", quotearg (filename)); - if (TMPINNAME_needs_removal) ---- a/src/util.c -+++ b/src/util.c -@@ -388,7 +388,7 @@ create_backup (char const *to, const str - - try_makedirs_errno = ENOENT; - safe_unlink (bakname); -- while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) -+ while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0) - { - if (errno != try_makedirs_errno) - pfatal ("Can't create file %s", quotearg (bakname)); -@@ -579,10 +579,13 @@ create_file (char const *file, int open_ - static void - copy_to_fd (const char *from, int tofd) - { -+ int from_flags = O_RDONLY | O_BINARY; - int fromfd; - ssize_t i; - -- if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0) -+ if (! follow_symlinks) -+ from_flags |= O_NOFOLLOW; -+ if ((fromfd = safe_open (from, from_flags, 0)) < 0) - pfatal ("Can't reopen file %s", quotearg (from)); - while ((i = read (fromfd, buf, bufsize)) != 0) - { -@@ -625,6 +628,8 @@ copy_file (char const *from, char const - else - { - assert (S_ISREG (mode)); -+ if (! follow_symlinks) -+ to_flags |= O_NOFOLLOW; - tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode, - to_dir_known_to_exist); - copy_to_fd (from, tofd); -@@ -640,9 +645,12 @@ copy_file (char const *from, char const - void - append_to_file (char const *from, char const *to) - { -+ int to_flags = O_WRONLY | O_APPEND | O_BINARY; - int tofd; - -- if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0) -+ if (! follow_symlinks) -+ to_flags |= O_NOFOLLOW; -+ if ((tofd = safe_open (to, to_flags, 0)) < 0) - pfatal ("Can't reopen file %s", quotearg (to)); - copy_to_fd (from, tofd); - if (close (tofd) != 0) diff --git a/packages/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch b/packages/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch deleted file mode 100644 index 590cf186..00000000 --- a/packages/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Fri, 6 Apr 2018 19:36:15 +0200 -Subject: Invoke ed directly instead of using the shell - -* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell -command to avoid quoting vulnerabilities. ---- - src/pch.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - ---- a/src/pch.c -+++ b/src/pch.c -@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char c - *outname_needs_removal = true; - copy_file (inname, outname, 0, exclusive, instat.st_mode, true); - } -- sprintf (buf, "%s %s%s", editor_program, -- verbosity == VERBOSE ? "" : "- ", -- outname); - fflush (stdout); - - pid = fork(); -@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char c - else if (pid == 0) - { - dup2 (tmpfd, 0); -- execl ("/bin/sh", "sh", "-c", buf, (char *) 0); -+ assert (outname[0] != '!' && outname[0] != '-'); -+ execlp (editor_program, editor_program, "-", outname, (char *) NULL); - _exit (2); - } - else diff --git a/packages/devel/pkg-config/Makefile b/packages/devel/pkg-config/Makefile deleted file mode 100644 index 3ea917e2..00000000 --- a/packages/devel/pkg-config/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pkg-config -PKG_VERSION:=0.29.2 -PKG_RELEASE:=3 - -PKG_SOURCE_URL:=https://pkg-config.freedesktop.org/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591 - -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-2.0-or-later -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/pkg-config - SECTION:=devel - CATEGORY:=Development - TITLE:=pkg-config - URL:=https://www.freedesktop.org/wiki/Software/pkg-config/ - DEPENDS:=+glib2 $(INTL_DEPENDS) - CONFLICTS:=pkgconf -endef - -define Package/pkg-config/description - pkg-config is a helper tool used when compiling applications and libraries. - It helps you insert the correct compiler options on the command line so an - application can use gcc -o test test.cpkg-config --libs --cflags glib-2.0 - for instance, rather than hard-coding values on where to find glib (or - other libraries). -endef - -TARGET_CFLAGS += $(FPIC) - -define Package/pkg-config/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkg-config $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/aclocal/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \ - $(1)/usr/share/aclocal/ -endef - -$(eval $(call BuildPackage,pkg-config)) diff --git a/packages/devel/pkgconf/Makefile b/packages/devel/pkgconf/Makefile deleted file mode 100644 index 963a9ac0..00000000 --- a/packages/devel/pkgconf/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pkgconf -PKG_VERSION:=1.8.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://distfiles.dereferenced.org/pkgconf -PKG_HASH:=ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf - -PKG_MAINTAINER:=Rosen Penev -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:pkgconf:pkgconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/meson.mk - -define Package/libpkgconf - SECTION:=libs - CATEGORY:=Libraries - TITLE:=libpkgconf - URL:=http://pkgconf.org/ -endef - -define Package/pkgconf - SECTION:=devel - CATEGORY:=Development - TITLE:=pkgconf - URL:=http://pkgconf.org/ - DEPENDS:=+libpkgconf -endef - -define Package/libpkgconf/description - libpkgconf is a library which provides access to most of pkgconf’s - functionality, to allow other tooling such as compilers and IDEs to - discover and use frameworks configured by pkgconf. It features a stable - library ABI and API designed for building bindings and other tools. -endef - -define Package/pkgconf/description - pkgconf is a program which helps to configure compiler and linker flags - for development frameworks. It is similar to pkg-config from - freedesktop.org, providing additional functionality while also - maintaining compatibility. -endef - -MESON_ARGS += \ - -Dtests=false - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/libpkgconf - $(CP) $(PKG_INSTALL_DIR)/usr/include/pkgconf/libpkgconf/*.h $(1)/usr/include/libpkgconf - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpkgconf.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/share/aclocal/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \ - $(1)/usr/share/aclocal/ -endef - -define Package/libpkgconf/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpkgconf.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/share/aclocal/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \ - $(1)/usr/share/aclocal/ -endef - -define Package/pkgconf/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkgconf $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,libpkgconf)) -$(eval $(call BuildPackage,pkgconf)) diff --git a/packages/devel/ragel/Makefile b/packages/devel/ragel/Makefile deleted file mode 100644 index 25501d3b..00000000 --- a/packages/devel/ragel/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ragel -PKG_VERSION:=6.10 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=https://www.colm.net/files/ragel/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f - -PKG_MAINTAINER:=John Audia -PKG_LICENSE:=GPL-2.0-only -PKG_LICENSE_FILES:=COPYING - -PKG_HOST_ONLY:=1 -HOST_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/ragel - SECTION:=devel - CATEGORY:=Development - TITLE:=Compiles finite state machines from regular languages into executable code - URL:=https://www.colm.net/open-source/ragel/ - BUILDONLY:=1 -endef - -HOST_CONFIGURE_VARS += CXXFLAGS="$(HOST_CXXFLAGS) -std=gnu++98" - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,ragel)) diff --git a/packages/devel/scons/Makefile b/packages/devel/scons/Makefile deleted file mode 100644 index ae052ba9..00000000 --- a/packages/devel/scons/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2011-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=scons -PKG_VERSION:=4.0.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-local-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/scons -PKG_HASH:=23c9d37a008b525bdedfe2666a28b9466c4c945d8ba379873cfd0b9006a3d618 - -PKG_MAINTAINER:= -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=scons-LICENSE - -PKG_HOST_ONLY:=1 -HOST_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - -HOST_UNPACK:=$(DECOMPRESS_CMD) $(HOST_TAR) -C $(HOST_BUILD_DIR) $(TAR_OPTIONS) - -define Package/scons - SECTION:=devel - CATEGORY:=Development - TITLE:=scons - URL:=https://scons.org/ - BUILDONLY:=1 -endef - -define Package/scons/description - SCons is an Open Source software construction tool—that is, a - next-generation build tool. Think of SCons as an improved, cross-platform - substitute for the classic Make utility with integrated functionality - similar to autoconf/automake and compiler caches such as ccache. In short, - SCons is an easier, more reliable and faster way to build software. -endef - -define Host/Configure -endef - -define Host/Compile -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin - for py in $(HOST_BUILD_DIR)/*.py; do \ - bin=$$$${py%.py} ; \ - $(CP) $$$$py $$$$bin ; \ - $(SED) '1c#!$(STAGING_DIR_HOST)/bin/python' $$$$bin ; \ - $(INSTALL_BIN) $$$$bin $(STAGING_DIR_HOSTPKG)/bin/ ; \ - done - - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/scons - $(CP) $(HOST_BUILD_DIR)/scons-local-$(PKG_VERSION)/* $(STAGING_DIR_HOSTPKG)/lib/scons/ -endef - -$(eval $(call BuildPackage,scons)) -$(eval $(call HostBuild)) diff --git a/packages/devel/scons/patches/001-platform_env.patch b/packages/devel/scons/patches/001-platform_env.patch deleted file mode 100644 index 641fdc7c..00000000 --- a/packages/devel/scons/patches/001-platform_env.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/scons-local-4.0.1/SCons/Platform/__init__.py -+++ b/scons-local-4.0.1/SCons/Platform/__init__.py -@@ -63,6 +63,8 @@ def platform_default(): - care about the machine architecture. - """ - osname = os.name -+ if 'PLATFORM' in os.environ: -+ return os.environ['PLATFORM'] - if osname == 'java': - osname = os._osType - if osname == 'posix': diff --git a/packages/devel/scons/patches/002-fix-import-path.patch b/packages/devel/scons/patches/002-fix-import-path.patch deleted file mode 100644 index 2c72cba1..00000000 --- a/packages/devel/scons/patches/002-fix-import-path.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/scons.py -+++ b/scons.py -@@ -56,6 +56,7 @@ if script_path in sys.path: - sys.path.remove(script_path) - - libs = [] -+libs = [os.path.join(os.path.dirname(script_dir), 'lib', 'scons')] - - if "SCONS_LIB_DIR" in os.environ: - libs.append(os.environ["SCONS_LIB_DIR"]) diff --git a/packages/devel/scons/scons.mk b/packages/devel/scons/scons.mk deleted file mode 100644 index 2b767105..00000000 --- a/packages/devel/scons/scons.mk +++ /dev/null @@ -1,23 +0,0 @@ -export PLATFORM=posix - -SCONS_VARS = \ - CC="$(TARGET_CC_NOCACHE)" \ - CXX="$(TARGET_CXX_NOCACHE)" \ - CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ - CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \ - CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" - -define Build/Configure/Default - (cd $(PKG_BUILD_DIR); \ - $(SCONS_VARS) \ - scons \ - prefix=/usr \ - $(SCONS_OPTIONS) \ - install \ - ) -endef - -define Build/Compile -endef diff --git a/packages/fonts/dejavu-fonts-ttf/Makefile b/packages/fonts/dejavu-fonts-ttf/Makefile deleted file mode 100644 index 76bb48c1..00000000 --- a/packages/fonts/dejavu-fonts-ttf/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=dejavu-fonts-ttf -PKG_VERSION:=2.37 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/dejavu -PKG_HASH:=fa9ca4d13871dd122f61258a80d01751d603b4d3ee14095d65453b4e846e17d7 -PKG_LICENSE:=Bitstream-Vera-Fonts-Copyright Arev-Fonts-Copyright Public-Domain -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Mirko Vogt - -include $(INCLUDE_DIR)/package.mk - -FILES:= \ - DejaVuSerif-Italic \ - DejaVuSerifCondensed-Italic \ - DejaVuSerifCondensed-BoldItalic \ - DejaVuSerifCondensed-Bold \ - DejaVuSerifCondensed \ - DejaVuSerif-BoldItalic \ - DejaVuSerif-Bold \ - DejaVuSerif \ - DejaVuSans-Oblique \ - DejaVuSansMono-Oblique \ - DejaVuSansMono-BoldOblique \ - DejaVuSansMono-Bold \ - DejaVuSansMono \ - DejaVuSans-ExtraLight \ - DejaVuSansCondensed-Oblique \ - DejaVuSansCondensed-BoldOblique \ - DejaVuSansCondensed-Bold \ - DejaVuSansCondensed \ - DejaVuSans-BoldOblique \ - DejaVuSans-Bold \ - DejaVuSans \ - DejaVuMathTeXGyre - -define PartGen -define Package/dejavu-fonts-ttf-$(1) -$(call Package/dejavu-fonts-ttf/Default) - TITLE:=$(1) -endef -endef - -define Package/dejavu-fonts-ttf/Default - TITLE:=dejavu-fonts-ttf - SECTION:=fonts - CATEGORY:=Fonts - SUBMENU:=DejaVu - URL:=http://dejavu.sourceforge.net/ -endef - -$(foreach file,$(FILES),$(eval $(call PartGen,$(file)))) - -define Build/Compile - true -endef - -define Build/Configure - true -endef - -define PartInstall -define Package/dejavu-fonts-ttf-$(1)/install - $(INSTALL_DIR) \ - $$(1)/usr/share/fonts/ttf-dejavu - - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/ttf/$(1).ttf \ - $$(1)/usr/share/fonts/ttf-dejavu/ -endef -endef - -$(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) - -$(foreach file,$(FILES),$(eval $(call BuildPackage,dejavu-fonts-ttf-$(file)))) diff --git a/packages/ipv6/generate-ipv6-address/Makefile b/packages/ipv6/generate-ipv6-address/Makefile deleted file mode 100644 index 304f064d..00000000 --- a/packages/ipv6/generate-ipv6-address/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=generate-ipv6-address -PKG_VERSION:=0.1 -PKG_RELEASE:=3 - -PKG_SOURCE:=generate-ipv6-address-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.irif.fr/~jch/software/files/ -PKG_HASH:=e1356d245d5f891fa39b796a8a2deefdaa89f08130dc97a378738ca5ed9a20fa - -PKG_MAINTAINER:=Nick Hainke -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/generate-ipv6-address - SECTION:=net - CATEGORY:=Network - TITLE:=Generate IPv6 Addresses - URL:=https://www.irif.fr/~jch/ - DEPENDS:=@IPV6 -endef - -define Package/generate-ipv6-address/description - Generates IPv6 addresses from a given prefix and either a given MAC-48 - address (an Ethernet hardware address) or a randomly drawn host number. -endef - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(PKG_BUILD_DIR)/generate-ipv6-address.c -o $(PKG_BUILD_DIR)/generate-ipv6-address -endef - -define Package/generate-ipv6-address/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/generate-ipv6-address $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,generate-ipv6-address)) diff --git a/packages/ipv6/tayga/Makefile b/packages/ipv6/tayga/Makefile deleted file mode 100644 index 2eb74a57..00000000 --- a/packages/ipv6/tayga/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tayga -PKG_VERSION:=0.9.2 -PKG_RELEASE:=4 - -PKG_SOURCE:=tayga-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.litech.org/tayga/ -PKG_HASH:=2b1f7927a9d2dcff9095aff3c271924b052ccfd2faca9588b277431a44f0009c -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/tayga - SECTION:=net - CATEGORY:=Network - DEPENDS:=+ip @IPV6 +kmod-tun - TITLE:=Out-of-kernel stateless NAT64 implementation for Linux - URL:=http://www.litech.org/tayga/ - MAINTAINER:=Ondrej Caletka -endef - -define Package/tayga/description - TAYGA is an out-of-kernel stateless NAT64 implementation for - Linux. It uses the TUN driver to exchange packets with the - kernel, which is the same driver used by OpenVPN and QEMU/KVM. -endef - -ifdef CONFIG_PACKAGE_netifd - define Package/tayga/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/netifd/proto - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/tayga-proto.sh $(1)/lib/netifd/proto/tayga.sh - endef -else - define Package/tayga/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/network $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/ - $(INSTALL_DATA) ./files/tayga.sh $(1)/lib/network/tayga.sh - $(INSTALL_DATA) ./files/tayga.hotplug $(1)/etc/hotplug.d/iface/95-tayga - endef -endif - -$(eval $(call BuildPackage,tayga)) diff --git a/packages/ipv6/tayga/files/tayga-proto.sh b/packages/ipv6/tayga/files/tayga-proto.sh deleted file mode 100755 index c8af0c1c..00000000 --- a/packages/ipv6/tayga/files/tayga-proto.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/sh -# tayga.sh - TAYGA proto -# Copyright (c) 2014 OpenWrt.org - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . /lib/functions/network.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_tayga_setup() { - local cfg="$1" - local iface="$2" - local link="tayga-$cfg" - - local ipv4_addr ipv6_addr prefix dynamic_pool map_ipv4 map_ipv6 ipaddr ip6addr noroutes - json_get_vars ipv4_addr ipv6_addr prefix dynamic_pool map_ipv4 map_ipv6 ipaddr ip6addr noroutes - [ -z "$ipv4_addr" -o -z "$prefix" ] && { - proto_notify_error "$cfg" "REQUIRED_PARAMETERS_MISSING" - proto_block_restart "$cfg" - return - } - - local tmpconf="/var/etc/tayga-$cfg.conf" - mkdir -p /var/etc - mkdir -p /var/run/tayga/$cfg - - echo "tun-device $link" >$tmpconf - echo "ipv4-addr $ipv4_addr" >>$tmpconf - [ -n "$ipv6_addr" ] && - echo "ipv6-addr $ipv6_addr" >>$tmpconf - [ -n "$prefix" ] && - echo "prefix $prefix" >>$tmpconf - [ -n "$dynamic_pool" ] && - echo "dynamic-pool $dynamic_pool" >>$tmpconf - # TODO: Allow setting multiple static mapping - [ -n "$map_ipv4" ] && - echo "map $map_ipv4 $map_ipv6" >>$tmpconf - echo "data-dir /var/run/tayga/$cfg" >>$tmpconf - - # here we create TUN device and check configuration - tayga -c $tmpconf --mktun - [ "$?" -ne 0 ] && { - proto_notify_error "$cfg" "TAYGA_FAILED" - proto_block_restart "$cfg" - return - } - - proto_init_update "$link" 1 - - [ -n "$ipaddr" ] && proto_add_ipv4_address "$ipaddr" "255.255.255.255" - [ -n "$ip6addr" ] && proto_add_ipv6_address "$ip6addr" "128" - - [ "$noroutes" != 1 ] && { - [ -n "$ipv6_addr" ] && proto_add_ipv6_route "$ipv6_addr" "128" - [ -n "$dynamic_pool" ] && { - local pool="${dynamic_pool%%/*}" - local mask="${dynamic_pool##*/}" - proto_add_ipv4_route "$pool" "$mask" - } - [ -n "$prefix" ] && { - local prefix6="${prefix%%/*}" - local mask6="${prefix##*/}" - proto_add_ipv6_route "$prefix6" "$mask6" - } - } - # TODO: Set up routes and firewall rules for clat/nat46 automatically? - - proto_send_update "$cfg" - - proto_run_command "$cfg" tayga -n -c $tmpconf \ - -p /var/run/$link.pid - -} - -proto_tayga_teardown() { - local cfg="$1" - local tmpconf="/var/etc/tayga-$cfg.conf" - proto_kill_command "$cfg" - sleep 1 - tayga -c $tmpconf --rmtun -} - -proto_tayga_init_config() { - no_device=1 - available=1 - proto_config_add_string "ipv4_addr" - proto_config_add_string "ipv6_addr" - proto_config_add_string "prefix" - proto_config_add_string "dynamic_pool" - proto_config_add_string "map_ipv4" - proto_config_add_string "map_ipv6" - proto_config_add_string "ipaddr" - proto_config_add_string "ip6addr:ip6addr" - proto_config_add_boolean "noroutes" -} - -[ -n "$INCLUDE_ONLY" ] || { - add_protocol tayga -} diff --git a/packages/ipv6/tayga/files/tayga.hotplug b/packages/ipv6/tayga/files/tayga.hotplug deleted file mode 100644 index fb989bdb..00000000 --- a/packages/ipv6/tayga/files/tayga.hotplug +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -if [ "$ACTION" = ifup ]; then - . /lib/functions.sh - - include /lib/network - scan_interfaces - - update_tunnel() { - local cfg="$1" - - local proto - config_get proto "$cfg" proto - [ "$proto" = tayga ] || return 0 - - local wandev4 - config_get wandev4 "$cfg" wan4_device "$(find_tayga_wanif4)" - - local wandev6 - config_get wandev6 "$cfg" wan6_device "$(find_tayga_wanif6)" - - [ "$wandev4" = "$DEVICE" ] || [ "$wandev6" = "$DEVICE" ] || return 0 - - local wanip4=$(find_tayga_wanip4 "$wandev4") - local wanip6=$(find_tayga_wanip6 "$wandev6") - - [ -n "$wanip4" ] && [ -n "$wanip6" ] && { - uci_set_state network "$cfg" ipv4addr "$wanip4" - uci_set_state network "$cfg" ipv6addr "$wanip6" - - logger -t tayga-update "Re-establishing tayga NAT64 due to change on $INTERFACE ($DEVICE)" - ifup "$cfg" & - } - } - - config_foreach update_tunnel interface -fi diff --git a/packages/ipv6/tayga/files/tayga.sh b/packages/ipv6/tayga/files/tayga.sh deleted file mode 100644 index a9edb6d0..00000000 --- a/packages/ipv6/tayga/files/tayga.sh +++ /dev/null @@ -1,152 +0,0 @@ -# tayga.sh - NAT64 backend - -find_tayga_wanif4() { - local if=$(ip -4 r l e 0.0.0.0/0); if="${if#default* dev }"; if="${if%% *}" - [ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if" -} - -find_tayga_wanip4() { - local ip=$(ip -4 a s dev "$1"); ip="${ip#*inet }" - echo "${ip%%[^0-9.]*}" -} - -find_tayga_wanif6() { - local if=$(ip -6 r l e ::/0); if="${if#default* dev }"; if="${if%% *}" - [ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if" -} - -find_tayga_wanip6() { - local ip=$(ip -6 a s dev "$1"); ip="${ip#*inet6 }" - echo "${ip%%[^0-9A-Fa-f:]*}" -} - -# Hook into scan_interfaces() to synthesize a .device option -# This is needed for /sbin/ifup to properly dispatch control -# to setup_interface_tayga() even if no .ifname is set in -# the configuration. -scan_tayga() { - config_set "$1" device "tayga-$1" -} - -coldplug_interface_tayga() { - setup_interface_tayga "tayga-$1" "$1" -} - -tayga_add_static_mappings() { - local tmpconf="$1" - - ( - . /lib/functions.sh - config_load firewall - - tayga_map_rule_add() { - local cfg="$1" - local tmpconf="$2" - local ipv4_addr ipv6_addr - config_get ipv4_addr "$cfg" ipv4_addr "" - config_get ipv6_addr "$cfg" ipv6_addr "" - [ -n "$ipv4_addr" ] && [ -n "$ipv6_addr" ] && - echo "map $ipv4_addr $ipv6_addr" >>$tmpconf - } - - config_foreach tayga_map_rule_add nat64 "$tmpconf" - ) -} - -setup_interface_tayga() { - local iface="$1" - local cfg="$2" - local link="tayga-$cfg" - - local ipv4_addr ipv6_addr prefix dynamic_pool - - config_get ipv4_addr "$cfg" ipv4_addr - config_get ipv6_addr "$cfg" ipv6_addr - config_get prefix "$cfg" prefix - config_get dynamic_pool "$cfg" dynamic_pool - - local args - - include /lib/network - scan_interfaces - - local wanip4=$(uci_get network "$cfg" ipv4addr) - local wanip6=$(uci_get network "$cfg" ipv6addr) - - local wanif4=$(find_tayga_wanif4) - local wanif6=$(find_tayga_wanif6) - - [ -z "$wanip4" ] && { - [ -n "$wanif4" ] && { - wanip4=$(find_tayga_wanip4 "$wanif4") - uci_set_state network "$cfg" wan4_device "$wanif4" - } - } - - [ -z "$wanip6" ] && { - [ -n "$wanif6" ] && { - wanip6=$(find_tayga_wanip6 "$wanif6") - uci_set_state network "$cfg" wan6_device "$wanif6" - } - } - - [ -n "$wanip4" ] && [ -n "$wanip6" ] || { - echo "Cannot determine local IPv4 and IPv6 addressed for tayga NAT64 $cfg - skipping" - return 1 - } - - local tmpconf="/var/etc/tayga-$cfg.conf" - args="-c $tmpconf" - mkdir -p /var/etc - mkdir -p /var/run/tayga/$cfg - - echo "tun-device $link" >$tmpconf - echo "ipv4-addr $ipv4_addr" >>$tmpconf - [ -n "$ipv6_addr" ] && - echo "ipv6-addr $ipv6_addr" >>$tmpconf - [ -n "$prefix" ] && - echo "prefix $prefix" >>$tmpconf - - tayga_add_static_mappings "$tmpconf" - - [ -n "$dynamic_pool" ] && - echo "dynamic-pool $dynamic_pool" >>$tmpconf - echo "data-dir /var/run/tayga/$cfg" >>$tmpconf - - # creating the tunnel below will trigger a net subsystem event - # prevent it from touching or iface by disabling .auto here - uci_set_state network "$cfg" ifname $link - uci_set_state network "$cfg" auto 0 - - # here we create TUN device and check configuration - tayga $args --mktun || return 1 - - ip link set "$link" up - - ip addr add "$wanip4" dev "$link" - ip addr add "$wanip6" dev "$link" - - [ -n "$dynamic_pool" ] && - ip -4 route add "$dynamic_pool" dev "$link" - [ -n "$prefix" ] && - ip -6 route add "$prefix" dev "$link" - - start-stop-daemon -S -x tayga -- $args -p /var/run/$link.pid - - env -i ACTION="ifup" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \ - /sbin/hotplug-call iface -} - -stop_interface_tayga() { - local cfg="$1" - local link="tayga-$cfg" - - env -i ACTION="ifdown" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \ - /sbin/hotplug-call iface - - service_kill tayga "/var/run/$link.pid" - - ip link set "$link" down - ip addr flush dev "$link" - ip route flush dev "$link" -} diff --git a/packages/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch b/packages/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch deleted file mode 100644 index c56b5f21..00000000 --- a/packages/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -5,8 +5,6 @@ AC_CONFIG_HEADERS(config.h) - - AC_PROG_CC - --CFLAGS='-g -Wall' -- - tayga_conf_path=${sysconfdir}/tayga.conf - - AC_SUBST(tayga_conf_path) diff --git a/packages/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch b/packages/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch deleted file mode 100644 index d8deac3a..00000000 --- a/packages/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- a/nat64.c -+++ b/nat64.c -@@ -19,6 +19,11 @@ - - extern struct config *gcfg; - -+static uint16_t checksum_extend_byte(uint8_t b) -+{ -+ return htons(b << 8); -+} -+ - static uint16_t ip_checksum(void *d, int c) - { - uint32_t sum = 0xffff; -@@ -30,7 +35,7 @@ static uint16_t ip_checksum(void *d, int - } - - if (c) -- sum += htons(*((uint8_t *)p) << 8); -+ sum += checksum_extend_byte(*((uint8_t *)p)); - - while (sum > 0xffff) - sum = (sum & 0xffff) + (sum >> 16); -@@ -180,10 +185,12 @@ static int xlate_payload_4to6(struct pkt - cksum = ones_add(p->icmp->cksum, cksum); - if (p->icmp->type == 8) { - p->icmp->type = 128; -- p->icmp->cksum = ones_add(cksum, ~(128 - 8)); -+ p->icmp->cksum = ones_add(cksum, -+ ~checksum_extend_byte(128 - 8)); - } else { - p->icmp->type = 129; -- p->icmp->cksum = ones_add(cksum, ~(129 - 0)); -+ p->icmp->cksum = ones_add(cksum, -+ ~checksum_extend_byte(129 - 0)); - } - return 0; - case 17: -@@ -668,10 +675,12 @@ static int xlate_payload_6to4(struct pkt - cksum = ones_add(p->icmp->cksum, cksum); - if (p->icmp->type == 128) { - p->icmp->type = 8; -- p->icmp->cksum = ones_add(cksum, 128 - 8); -+ p->icmp->cksum = ones_add(cksum, -+ checksum_extend_byte(128 - 8)); - } else { - p->icmp->type = 0; -- p->icmp->cksum = ones_add(cksum, 129 - 0); -+ p->icmp->cksum = ones_add(cksum, -+ checksum_extend_byte(129 - 0)); - } - return 0; - case 17: diff --git a/packages/ipv6/tayga/patches/003-RFC8215.patch b/packages/ipv6/tayga/patches/003-RFC8215.patch deleted file mode 100644 index 6fdee211..00000000 --- a/packages/ipv6/tayga/patches/003-RFC8215.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/addrmap.c -+++ b/addrmap.c -@@ -44,7 +44,9 @@ int validate_ip4_addr(const struct in_ad - int validate_ip6_addr(const struct in6_addr *a) - { - /* Well-known prefix for NAT64 */ -- if (a->s6_addr32[0] == WKPF && !a->s6_addr32[1] && !a->s6_addr32[2]) -+ if (a->s6_addr32[0] == WKPF && -+ (!a->s6_addr32[1] || (a->s6_addr16[2] == htonl(0x0001))) -+ && !a->s6_addr32[2]) - return 0; - - /* Reserved per RFC 2373 */ diff --git a/packages/kernel/fibocom-qmi-wwan/Makefile b/packages/kernel/fibocom-qmi-wwan/Makefile deleted file mode 100644 index 2ab178d5..00000000 --- a/packages/kernel/fibocom-qmi-wwan/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=fibocom-qmi-wwan -PKG_VERSION:=1.0.5 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@IMMORTALWRT -PKG_HASH:=107a82e4e81bcac0425368965432dd988e8e07c123a57f6ae63329cbf2ba39db - -PKG_LICENSE:=GPL-2.0-only -PKG_MAINTAINER:=Tianling Shen - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/usb-net-qmi-wwan-fibocom - SUBMENU:=USB Support - TITLE:=QMI WWAN driver for Fibocom modules - DEPENDS:=+kmod-usb-net +kmod-usb-wdm - FILES:=$(PKG_BUILD_DIR)/qmi_wwan_f.ko - AUTOLOAD:=$(call AutoLoad,82,qmi_wwan_f) -endef - -define Build/Compile - +$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules -endef - -$(eval $(call KernelPackage,usb-net-qmi-wwan-fibocom)) diff --git a/packages/kernel/fibocom-qmi-wwan/patches/010-fix-build-for-kernel-6.6.patch b/packages/kernel/fibocom-qmi-wwan/patches/010-fix-build-for-kernel-6.6.patch deleted file mode 100644 index a24ae6a2..00000000 --- a/packages/kernel/fibocom-qmi-wwan/patches/010-fix-build-for-kernel-6.6.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/qmi_wwan_f.c -+++ b/qmi_wwan_f.c -@@ -712,7 +712,11 @@ static struct rtnl_link_stats64 *_rmnet_ - stats64 = per_cpu_ptr(dev->stats64, cpu); - - do { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) - start = u64_stats_fetch_begin_irq(&stats64->syncp); -+#else -+ start = u64_stats_fetch_begin(&stats64->syncp); -+#endif - #if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0) - rx_packets = stats64->rx_packets; - rx_bytes = stats64->rx_bytes; -@@ -724,7 +728,11 @@ static struct rtnl_link_stats64 *_rmnet_ - tx_packets = u64_stats_read(&stats64->tx_packets); - tx_bytes = u64_stats_read(&stats64->tx_bytes); - #endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) - } while (u64_stats_fetch_retry_irq(&stats64->syncp, start)); -+#else -+ } while (u64_stats_fetch_retry(&stats64->syncp, start)); -+#endif - - stats->rx_packets += rx_packets; - stats->rx_bytes += rx_bytes; -@@ -1187,7 +1195,11 @@ static int qmap_register_device(sQmiWwan - priv->mux_id = FIBOCOM_QMAP_MUX_ID + offset_id; - sprintf(qmap_net->name, "%s.%d", real_dev->name, offset_id + 1); - qmap_net->netdev_ops = &qmap_netdev_ops; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0) - memcpy (qmap_net->dev_addr, real_dev->dev_addr, ETH_ALEN); -+#else -+ __dev_addr_set(qmap_net, real_dev->dev_addr, ETH_ALEN); -+#endif - - #ifdef FIBOCOM_BRIDGE_MODE - priv->bridge_mode = !!(pDev->bridge_mode & BIT(offset_id)); diff --git a/packages/kernel/macremapper/Makefile b/packages/kernel/macremapper/Makefile deleted file mode 100644 index 0889805e..00000000 --- a/packages/kernel/macremapper/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2019 EWSI -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=macremapper -PKG_VERSION:=1.1.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=f9580427803123d13d50f3422623a37212034a5d72a485f9c04904f19509e4bb - -PKG_MAINTAINER:=Carey Sonsino -PKG_LICENSE:=GPL-2.0-only -PKG_LICENSE_FILES:=kernelmod/COPYING - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/macremapper - SUBMENU:=Network Support - URL:=https://www.edgewaterwireless.com - TITLE:=Dual Channel Wi-Fi macremapper Module - DEPENDS:= +kmod-cfg80211 +kmod-br-netfilter - FILES:=$(PKG_BUILD_DIR)/kernelmod/$(PKG_NAME).$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoProbe,macremapper) -endef - -define KernelPackage/macremapper/description - Linux kernel module for implementation the DCW filtering mechanism -endef - -MAKE_FLAGS += KERNEL_SRC=$(LINUX_DIR) ARCH=$(LINUX_KARCH) -MAKE_PATH:=kernelmod - -$(eval $(call KernelPackage,macremapper)) diff --git a/packages/kernel/macremapper/patches/01_fix_nf_hooks.patch b/packages/kernel/macremapper/patches/01_fix_nf_hooks.patch deleted file mode 100644 index 29cb421f..00000000 --- a/packages/kernel/macremapper/patches/01_fix_nf_hooks.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/kernelmod/main.c -+++ b/kernelmod/main.c -@@ -98,8 +98,11 @@ modinit( void ) { - - rv = mrm_rcdb_init(); - if (rv != 0) return rv; -- -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) - nf_register_hook(&_hops); -+#else -+ nf_register_net_hook(&init_net, &_hops); -+#endif - mrm_init_ctlfile(); /* XXX not checking for failure! */ - - printk(KERN_INFO "MRM The MAC Address Re-Mapper is now in the kernel\n"); -@@ -110,7 +113,11 @@ modinit( void ) { - static void __exit - modexit( void ) { - mrm_destroy_ctlfile(); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) - nf_unregister_hook(&_hops); -+#else -+ nf_unregister_net_hook(&init_net, &_hops); -+#endif - mrm_rcdb_destroy(); /* imperative that this happens last */ - printk(KERN_INFO "MRM The MAC Address Re-Mapper gone bye-bye\n"); - } diff --git a/packages/kernel/macremapper/patches/02-mrm_ctlfile.c-compatibility-with-linux-5.6.patch b/packages/kernel/macremapper/patches/02-mrm_ctlfile.c-compatibility-with-linux-5.6.patch deleted file mode 100644 index d103b19a..00000000 --- a/packages/kernel/macremapper/patches/02-mrm_ctlfile.c-compatibility-with-linux-5.6.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 6126f8efebf659708245ba99df6b85d7c1260668 Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy -Date: Sun, 31 Jan 2021 20:53:32 -0800 -Subject: [PATCH] mrm_ctlfile.c: compatibility with linux >= 5.6 - -Signed-off-by: Ilya Lipnitskiy ---- - kernelmod/mrm_ctlfile.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - ---- a/kernelmod/mrm_ctlfile.c -+++ b/kernelmod/mrm_ctlfile.c -@@ -13,6 +13,7 @@ - #include "./macremapper_ioctl.h" - #include "./bufprintf.h" - -+#include - #include - #include - #include -@@ -80,13 +81,14 @@ mrm_handle_read(struct file *f, char __u - } - - static long --mrm_handle_ioctl(struct file *f, unsigned int type, void __user *param) { -+mrm_handle_ioctl(struct file *f, unsigned int type, unsigned long arg) { - union { - struct mrm_filter_config filt_conf; - struct mrm_remap_entry remap_entry; - unsigned count; - } u; - int rv; -+ void __user *param = (void __user *)arg; - - mutex_lock(&_ctrl_mutex); - -@@ -159,6 +161,14 @@ fail_fault: - } - - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) -+static const struct proc_ops _fops = { -+ .proc_open = mrm_handle_open, -+ .proc_release = mrm_handle_release, -+ .proc_read = mrm_handle_read, -+ .proc_ioctl = mrm_handle_ioctl, -+}; -+#else - static const struct file_operations _fops = { - owner: THIS_MODULE, - open: &mrm_handle_open, -@@ -166,6 +176,7 @@ static const struct file_operations _fop - read: &mrm_handle_read, - unlocked_ioctl: (void*)&mrm_handle_ioctl, - }; -+#endif - - int mrm_init_ctlfile( void ) { - struct proc_dir_entry *pde; diff --git a/packages/kernel/mdio-netlink/Makefile b/packages/kernel/mdio-netlink/Makefile deleted file mode 100644 index cd2ee2f4..00000000 --- a/packages/kernel/mdio-netlink/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=mdio-netlink -PKG_VERSION:=1.3.1 -PKG_RELEASE:=2 - -PKG_SOURCE_URL:=https://github.com/wkz/mdio-tools -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=f74eaf38dbda441df4fcaeb21ca4465957953a2f -PKG_MIRROR_HASH:=fdabb78a4fe26713c4c83aab707f57254145184614b9b39b17649a2151394005 - -PKG_LICENSE:=GPL-2.0-only -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Damien Mascord - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/mdio-netlink - SECTION:=kernel - CATEGORY:=Kernel modules - SUBMENU:=Network Support - TITLE:=mdio-netlink Linux MDIO netlink kernel module - KCONFIG:=CONFIG_PHYLIB=y CONFIG_MDIO_BUS=y - URL:=https://github.com/wkz/mdio-tools.git - FILES:=$(PKG_BUILD_DIR)/kernel/mdio-netlink.ko - AUTOLOAD:=$(call AutoProbe,mdio-netlink) -endef - -define KernelPackage/mdio-netlink/description - mdio-netlink Linux MDIO netlink kernel module -endef - -define Build/Compile - $(KERNEL_MAKE) M=$(PKG_BUILD_DIR)/kernel modules -endef - -$(eval $(call KernelPackage,mdio-netlink)) diff --git a/packages/kernel/mtd-rw/Makefile b/packages/kernel/mtd-rw/Makefile deleted file mode 100644 index 433f679e..00000000 --- a/packages/kernel/mtd-rw/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2016 Joseph C. Lehner -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=mtd-rw -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/jclehner/mtd-rw -PKG_SOURCE_DATE:=2021-02-28 -PKG_SOURCE_VERSION:=e87767395a6d27380196702f5f7bf98e92774f3f -PKG_MIRROR_HASH:=984218d7a8e1252419c45ef313f23fb6e5edfa83088f68a4a356b795444ab381 - -PKG_MAINTAINER:=Joseph C. Lehner -PKG_LICENSE=GPL-2.0 -PKG_LICENSE_FILES=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/mtd-rw - SUBMENU:=Other modules - TITLE:=Write-enabler for MTD partitions - FILES:=$(PKG_BUILD_DIR)/mtd-rw.ko - DEPENDS:=@!(TARGET_x86||TARGET_bcm27xx||TARGET_octeontx) -endef - -define KernelPackage/mtd-rw/description - A kernel module that temporarily makes all MTD partitions writeable. -endef - -MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - M="$(PKG_BUILD_DIR)" - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - CONFIG_MTD_RW=m \ - modules -endef - -$(eval $(call KernelPackage,mtd-rw)) diff --git a/packages/kernel/ovpn-dco/Makefile b/packages/kernel/ovpn-dco/Makefile deleted file mode 100644 index 0ba5744c..00000000 --- a/packages/kernel/ovpn-dco/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2021 Jianhui Zhao -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=ovpn-dco -PKG_VERSION:=0.2.20240320 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL=https://codeload.github.com/OpenVPN/ovpn-dco/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=83a02dc3e6e40b0ef128cd32ce7f47da7fccd759af68657f44925d64a88db37b - -PKG_MAINTAINER:=Jianhui Zhao -PKG_LICENSE:=GPL-2.0-only - - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/ovpn-dco-v2 - SUBMENU:=Network Support - TITLE:=OpenVPN data channel offload - DEPENDS:=+kmod-crypto-aead +kmod-udptunnel4 +IPV6:kmod-udptunnel6 - FILES:=$(PKG_BUILD_DIR)/drivers/net/ovpn-dco/ovpn-dco-v2.ko - AUTOLOAD:=$(call AutoLoad,30,ovpn-dco-v2) -endef - -define KernelPackage/ovpn-dco-v2/description - This module enhances the performance of the OpenVPN userspace software - by offloading the data channel processing to kernelspace. -endef - -NOSTDINC_FLAGS += \ - $(KERNEL_NOSTDINC_FLAGS) \ - -I$(PKG_BUILD_DIR)/include \ - -I$(PKG_BUILD_DIR)/compat-include \ - -include $(PKG_BUILD_DIR)/linux-compat.h - -EXTRA_KCONFIG:= \ - CONFIG_OVPN_DCO_V2=m - -PKG_EXTMOD_SUBDIRS = drivers/net/ovpn-dco - -MAKE_OPTS:= \ - $(KERNEL_MAKE_FLAGS) \ - M="$(PKG_BUILD_DIR)/drivers/net/ovpn-dco" \ - NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ - $(EXTRA_KCONFIG) - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - modules -endef - -$(eval $(call KernelPackage,ovpn-dco-v2)) diff --git a/packages/kernel/quectel-qmi-wwan/Makefile b/packages/kernel/quectel-qmi-wwan/Makefile deleted file mode 100644 index b994b7bb..00000000 --- a/packages/kernel/quectel-qmi-wwan/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=quectel-qmi-wwan -PKG_VERSION:=1.2.6 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@IMMORTALWRT -PKG_HASH:=9fc83f9fdb168bc562e87676919081bb9f582baa3db98ab9b56d77e6295abb6b - -PKG_LICENSE:=GPL-2.0-only -PKG_MAINTAINER:=Tianling Shen - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/usb-net-qmi-wwan-quectel - SUBMENU:=USB Support - TITLE:=QMI WWAN driver for Quectel modules - DEPENDS:=+kmod-usb-net +kmod-usb-wdm - FILES:=$(PKG_BUILD_DIR)/qmi_wwan_q.ko - AUTOLOAD:=$(call AutoLoad,81,qmi_wwan_q) -endef - -define Build/Compile - +$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules -endef - -$(eval $(call KernelPackage,usb-net-qmi-wwan-quectel)) diff --git a/packages/kernel/quectel-qmi-wwan/patches/010-disable-rmnet_nss.patch b/packages/kernel/quectel-qmi-wwan/patches/010-disable-rmnet_nss.patch deleted file mode 100644 index a02c1404..00000000 --- a/packages/kernel/quectel-qmi-wwan/patches/010-disable-rmnet_nss.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/qmi_wwan_q.c -+++ b/qmi_wwan_q.c -@@ -59,9 +59,8 @@ struct rmnet_nss_cb { - int (*nss_tx)(struct sk_buff *skb); - }; - static struct rmnet_nss_cb __read_mostly *nss_cb = NULL; --#if defined(CONFIG_PINCTRL_IPQ807x) || defined(CONFIG_PINCTRL_IPQ5018) || defined(CONFIG_PINCTRL_IPQ8074) -+#if defined(CONFIG_QCA_NSS_DRV) - //#ifdef CONFIG_RMNET_DATA //spf12.x none, not effect for spf11.x --#define CONFIG_QCA_NSS_DRV - /* define at qsdk/qca/src/linux-4.4/net/rmnet_data/rmnet_data_main.c */ //for spf11.x - /* define at qsdk/qca/src/datarmnet/core/rmnet_config.c */ //for spf12.x - /* set at qsdk/qca/src/data-kernel/drivers/rmnet-nss/rmnet_nss.c */ diff --git a/packages/kernel/quectel-qmi-wwan/patches/020-fix-build-for-kernel-6.6.patch b/packages/kernel/quectel-qmi-wwan/patches/020-fix-build-for-kernel-6.6.patch deleted file mode 100644 index 6db7e45c..00000000 --- a/packages/kernel/quectel-qmi-wwan/patches/020-fix-build-for-kernel-6.6.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/qmi_wwan_q.c -+++ b/qmi_wwan_q.c -@@ -846,12 +846,20 @@ static struct rtnl_link_stats64 *_rmnet_ - stats64 = per_cpu_ptr(dev->stats64, cpu); - - do { -+#if (LINUX_VERSION_CODE < KERNEL_VERSION( 6,6,0 )) - start = u64_stats_fetch_begin_irq(&stats64->syncp); -+#else -+ start = u64_stats_fetch_begin(&stats64->syncp); -+#endif - rx_packets = stats64->rx_packets; - rx_bytes = stats64->rx_bytes; - tx_packets = stats64->tx_packets; - tx_bytes = stats64->tx_bytes; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION( 6,6,0 )) - } while (u64_stats_fetch_retry_irq(&stats64->syncp, start)); -+#else -+ } while (u64_stats_fetch_retry(&stats64->syncp, start)); -+#endif - - stats->rx_packets += u64_stats_read(&rx_packets); - stats->rx_bytes += u64_stats_read(&rx_bytes); diff --git a/packages/kernel/quectel-qmi-wwan/patches/100-add-more-usb-ids.patch b/packages/kernel/quectel-qmi-wwan/patches/100-add-more-usb-ids.patch deleted file mode 100644 index e8c7b542..00000000 --- a/packages/kernel/quectel-qmi-wwan/patches/100-add-more-usb-ids.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/qmi_wwan_q.c -+++ b/qmi_wwan_q.c -@@ -2533,6 +2533,13 @@ static const struct usb_device_id produc - { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0800, 4, sdx55) }, /* Quectel RG500 */ - { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0801, 4, sdx55) }, /* Quectel RG520 */ - { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0122, 4, sdx55) }, /* Quectel RG650 */ -+ { QMI_FIXED_RAWIP_INTF(0x05c6, 0x90d5, 3, sdx55) }, /* Foxconn T99W240T00 */ -+ { QMI_FIXED_RAWIP_INTF(0x05c6, 0x90db, 2, sdx55) }, /* SIM8200 */ -+ { QMI_FIXED_RAWIP_INTF(0x02dee, 0x4d22, 5, sdx55) }, /* Meige SRM815 */ -+ { QMI_FIXED_RAWIP_INTF(0x305a, 0x1421, 3, sdx55) }, /* gm800 */ -+ { QMI_FIXED_RAWIP_INTF(0x305a, 0x1403, 3, sdx55) }, /* gm800 */ -+ { QMI_FIXED_RAWIP_INTF(0x05C6, 0x9025, 4, sdx55) }, -+ { QMI_FIXED_RAWIP_INTF(0x05C6, 0x9091, 2, sdx55) }, - { } /* END */ - }; - MODULE_DEVICE_TABLE(usb, products); diff --git a/packages/kernel/v4l2loopback/Makefile b/packages/kernel/v4l2loopback/Makefile deleted file mode 100644 index d49ccfd4..00000000 --- a/packages/kernel/v4l2loopback/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# This software is in the public domain, furnished "as is", without technical -# support, and with no warranty, express or implied, as to its usefulness for -# any purpose. - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=v4l2loopback -PKG_VERSION:=0.13.2 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/umlaeute/v4l2loopback -PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_MIRROR_HASH:=06b786138b35daab3edfafb95432f1b838676e6dd615c481eae0553182eac67b - -PKG_MAINTAINER:=Michel Promonet -PKG_CPE_ID:=cpe:/o:v4l2loopback_project:v4l2loopback - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/v4l2loopback - SUBMENU:=Video Support - TITLE:=v4l2loopback kernel module - FILES:=$(PKG_BUILD_DIR)/v4l2loopback.ko - DEPENDS:=+kmod-video-core - AUTOLOAD:=$(call AutoProbe,v4l2loopback) -endef - -define KernelPackage/v4l2loopback/description - This module allows you to create "virtual video devices". - Normal (v4l2) applications will read these devices as if - they were ordinary video devices, but the video will not be - read from e.g. a capture card but instead it is generated - by another application. -endef - -MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - M="$(PKG_BUILD_DIR)" - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - CONFIG_PACKAGE_kmod-v4l2loopback=m \ - modules -endef - -$(eval $(call KernelPackage,v4l2loopback)) - diff --git a/packages/lang/chicken-scheme/Makefile b/packages/lang/chicken-scheme/Makefile deleted file mode 100644 index c7fb98da..00000000 --- a/packages/lang/chicken-scheme/Makefile +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright (C) 2019-2020 Jerônimo Cordoni Pellegrini -# -# This file is free software, licensed under the GNU General Public License v3 -# or later. -# See /LICENSE for details -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=chicken-scheme -PKG_VERSION:=5.2.0 -PKG_RELEASE:=2 - -PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION) -PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://code.call-cc.org/releases/$(PKG_VERSION)/ -PKG_HASH:=819149c8ce7303a9b381d3fdc1d5765c5f9ac4dee6f627d1652f47966a8780fa -PKG_MAINTAINER:=Jeronimo Pellegrini - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/chicken-scheme/Default - TITLE:=Chicken Scheme - SECTION:=lang - CATEGORY:=Languages - URL:=https://call-cc.org - ABI_VERSION:=11 -endef - -## -## chicken-scheme-interpreter -## - -define Package/chicken-scheme-interpreter -$(call Package/chicken-scheme/Default) - TITLE+=interpreter only - CONFLICTS:=chicken-scheme-full -endef - -define Package/chicken-scheme-interpreter/description - Chicken is an implementation of the Scheme language. It is portable, efficient, and supports - the R5RS and R7RS (work in progress) standards, and many extensions. - Chicken can be used as a scripting language to automate tasks. - This package contains the interpreter, 'csi', only -- - the compiler and the package installer are not included because they depend on a C compiler. - For more information, please refer to the Chicken Scheme website at https://call-cc.org. -endef - -MAKE_FLAGS += PLATFORM=linux C_COMPILER="$(TARGET_CC)" LINKER="$(TARGET_CC)" PREFIX=/usr C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)" - -# not installed: -# - csc and chicken, the compiler -# - the include dir (only useful with the compiler) -# - install, uninstall, status, and chicken-do, which deal with modules -# (installation of more modules depends on the compiler) -# - profiler -# - feathers, the debugger -# - libchicken.a, the static library -define Package/chicken-scheme-interpreter/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib/chicken/$(ABI_VERSION) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi $(1)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/libchicken.so.$(ABI_VERSION) $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/libchicken.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/*.import.so $(1)/usr/lib/chicken/$(ABI_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/types.db $(1)/usr/lib/chicken/$(ABI_VERSION)/ -endef - -$(eval $(call BuildPackage,chicken-scheme-interpreter)) - - - -## -## chicken-scheme-full -## - -# mips-openwrt-linux-musl-gcc dowsn't seem to link with libchicken.so. -# already tried -lchicken and passing /usr/lib/libchicken.so on the command -# line. -# also tried -Wl,-R/usr/lib,-R/usr/lib/chicken/$(ABI_VERSION) -# -# current solution: we do not strip binaries in chicken-scheme-full -# we do this by unsetting STRIP and RSTRIP, *and* reloading rules.mk -# -STRIP:=: -RSTRIP:=: -include $(TOPDIR)/rules.mk - -define Package/chicken-scheme-full -$(call Package/chicken-scheme/Default) - TITLE+=full package - # csc depends on gcc; chicken-install uses the 'install' command from coreutils - EXTRA_DEPENDS:= gcc, coreutils-install -endef - -define Package/chicken-scheme-full/description - Chicken is an implementation of the Scheme language. It is portable, efficient, and supports - the R5RS and R7RS (work in progress) standards, and many extensions. - Chicken can be used as a scripting language to automate tasks. - This package contains the interpreter, 'csi'; the compiler, 'csc'; - the tools for installing and removing eggs (modules); the profiler and - the debugger. - Note that this package depends on gcc, which is quite large (more than 100Mb). - For more information, please refer to the Chicken Scheme website at https://call-cc.org. -endef - - -# not installed: -# - libchicken.a, the static library -define Package/chicken-scheme-full/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib/chicken/$(ABI_VERSION) - $(INSTALL_DIR) $(1)/usr/include/chicken - $(INSTALL_DIR) $(1)/usr/share/chicken - $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi $(1)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/libchicken.so.$(ABI_VERSION) $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/libchicken.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/*.import.so $(1)/usr/lib/chicken/$(ABI_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/types.db $(1)/usr/lib/chicken/$(ABI_VERSION)/ - # csc - $(INSTALL_BIN) $(PKG_BUILD_DIR)/csc $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken $(1)/usr/bin/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/chicken.h $(1)/usr/include/chicken/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/chicken-config.h $(1)/usr/include/chicken/ - # chicken-install - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-install $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-uninstall $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-status $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-do $(1)/usr/bin/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/setup.defaults $(1)/usr/share/chicken/ - # profile - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-profile $(1)/usr/bin/ - # feathers - $(INSTALL_BIN) $(PKG_BUILD_DIR)/feathers.tcl $(1)/usr/share/chicken/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/feathers $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,chicken-scheme-full)) diff --git a/packages/lang/cqueues/Makefile b/packages/lang/cqueues/Makefile deleted file mode 100644 index f3a21651..00000000 --- a/packages/lang/cqueues/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2022 Siger Yang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cqueues -PKG_VERSION:=20200726 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Siger Yang - -PKG_MIRROR_HASH:=214a09c250e92d12cd63cdaedce9491f874a920e8222cc4faf10a978ec7bd1bd -PKG_SOURCE_URL:=https://github.com/wahern/cqueues.git -PKG_SOURCE_VERSION:=rel-$(PKG_VERSION) -PKG_SOURCE_PROTO:=git - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/cqueues - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=lua cqueues - URL:=http://25thandclement.com/~william/projects/cqueues.html - DEPENDS:=+liblua +libopenssl -endef - -define Package/cqueues/description - Continuation Queues: Embeddable asynchronous networking, threading, and - notification framework for Lua on Unix. -endef - -TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += $(FPIC) - -MAKE_FLAGS += \ - LUA_APIS="5.1" \ - lua51cpath="/usr/lib/lua" \ - lua51path="/usr/lib/lua" - -define Package/cqueues/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/_cqueues.so $(1)/usr/lib/lua/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/cqueues.lua $(1)/usr/lib/lua/ - - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/cqueues $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,cqueues)) diff --git a/packages/lang/dkjson/Makefile b/packages/lang/dkjson/Makefile deleted file mode 100644 index 3f0f6fd9..00000000 --- a/packages/lang/dkjson/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 20013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dkjson -PKG_VERSION:=2.5 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/LuaDist/dkjson/tar.gz/$(PKG_VERSION)? -PKG_HASH:=8560ee3c7ed421b293bf0905017bc90bd2f282d56517aa59ec6c53f5fb4057bd - -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/dkjson - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=DKJSON - URL:=http://dkolf.de/src/dkjson-lua.fsl/home - MAINTAINER:=Lars Gierth - DEPENDS:=+lua - PKGARCH:=all -endef - -define Package/dkjson/description - Lua JSON parser/serializer with UTF-8 support -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/dkjson/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dkjson.lua $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,dkjson)) diff --git a/packages/lang/erlang/Makefile b/packages/lang/erlang/Makefile deleted file mode 100644 index 1ccd1b78..00000000 --- a/packages/lang/erlang/Makefile +++ /dev/null @@ -1,410 +0,0 @@ -# -# Copyright (C) 2009-2020 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=erlang -PKG_VERSION:=27.0.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/erlang/otp/releases/download/OTP-$(PKG_VERSION) -PKG_HASH:=26d894e2f0dda9d13560af08ea589afc01569df6b5486e565beb5accb99c9cf4 - -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.txt -PKG_MAINTAINER:=Arnaud Sautaux -PKG_CPE_ID:=cpe:/a:erlang:erlang - -PKG_BUILD_DEPENDS:=erlang/host openssl -PKG_ASLR_PIE:=0 - -PKG_CONFIG_DEPENDS:= \ - CONFIG_KERNEL_TRANSPARENT_HUGEPAGE - -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/otp_src_$(PKG_VERSION) - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/erlang/Default - SUBMENU:=Erlang - SECTION:=lang - CATEGORY:=Languages - TITLE:=Erlang/OTP programming language - URL:=https://www.erlang.org/ -endef - -define Package/erlang/Default/description - Erlang/OTP is a general-purpose programming language and runtime - environment. Erlang has built-in support for concurrency, distribution - and fault tolerance. -endef - -define Package/erlang -$(call Package/erlang/Default) - DEPENDS+= +libncurses +librt +zlib +libstdcpp - PROVIDES:= erlang-erts=15.0.1 erlang-kernel=10.0.1 erlang-sasl=4.2.2 erlang-stdlib=6.0.1 -endef - -define Package/erlang/description -$(call Package/erlang/Default/description) - . - This package contains the runtime implementation and a minimal set of - modules (erts, kernel, sasl & stdlib). -endef - - -define Package/erlang-asn1 -$(call Package/erlang/Default) - TITLE:=Abstract Syntax Notation One (ASN.1) support - VERSION:=5.3 - DEPENDS+= +erlang +erlang-syntax-tools -endef - -define Package/erlang-asn1/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides Abstract Syntax Notation One (ASN.1) - support. -endef - - -define Package/erlang-compiler -$(call Package/erlang/Default) - TITLE:=Byte code compiler - VERSION:=8.5.1 - DEPENDS+= +erlang -endef - -define Package/erlang-compiler/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides a byte code compiler for Erlang which - produces highly compact code. -endef - - -define Package/erlang-crypto -$(call Package/erlang/Default) - TITLE:=Cryptography support - VERSION:=5.5 - DEPENDS+= +erlang +libopenssl -endef - -define Package/erlang-crypto/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides functions for computation of message - digests, and encryption and decryption functions. -endef - - -define Package/erlang-inets -$(call Package/erlang/Default) - TITLE:=Internet clients and servers - VERSION:=9.2 - DEPENDS+= +erlang -endef - -define Package/erlang-inets/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides a container for Internet clients and - servers. Currently a FTP client, a HTTP client and server, and a tftp - client and server have been incorporated in Inets. -endef - - -define Package/erlang-mnesia -$(call Package/erlang/Default) - TITLE:=Distributed database - VERSION:=4.23.2 - DEPENDS+= +erlang -endef - -define Package/erlang-mnesia/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides a distributed DataBase Management - System (DBMS), appropriate for telecommunications applications and - other Erlang applications which require continuous operation and - exhibit soft real-time properties. -endef - - -define Package/erlang-runtime-tools -$(call Package/erlang/Default) - TITLE:=Low-profile debugging/tracing tools - VERSION:=2.1 - DEPENDS+= +erlang -endef - -define Package/erlang-runtime-tools/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides low footprint tracing/debugging tools - suitable for inclusion in a production system. -endef - - -define Package/erlang-snmp -$(call Package/erlang/Default) - TITLE:=Simple Network Management Protocol (SNMP) support - VERSION:=5.16 - DEPENDS+= +erlang +erlang-asn1 -endef - -define Package/erlang-snmp/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides Simple Network Management Protocol - (SNMP) support including a MIB compiler and tools for creating SNMP - agents. -endef - - -define Package/erlang-public-key -$(call Package/erlang/Default) - TITLE:=Public Key support - VERSION:=1.16.1 - DEPENDS+= +erlang +erlang-crypto +erlang-asn1 -endef - -define Package/erlang-public-key/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides functions to handle public-key infrastructure. -endef - - -define Package/erlang-ssh -$(call Package/erlang/Default) - TITLE:=Secure Shell (SSH) support - VERSION:=5.2.1 - DEPENDS+= +erlang +erlang-crypto -endef - -define Package/erlang-ssh/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides an implementation of the Secure Shell - protocol, with SSH & SFTP support. -endef - - -define Package/erlang-ssl -$(call Package/erlang/Default) - TITLE:=Secure Sockets Layer (SSL) support - VERSION:=11.2.1 - DEPENDS+= +erlang +erlang-crypto -endef - -define Package/erlang-ssl/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides support for secure communication over - sockets. -endef - - -define Package/erlang-syntax-tools -$(call Package/erlang/Default) - TITLE:=Abstract Erlang syntax trees handling support - VERSION:=3.2 - DEPENDS+= +erlang -endef - -define Package/erlang-syntax-tools/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides support for handling abstract Erlang - syntax trees. -endef - - -define Package/erlang-tools -$(call Package/erlang/Default) - TITLE:=Erlang tools support - VERSION:=4.0 - DEPENDS+= +erlang -endef - -define Package/erlang-tools/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides support for misc tools. -endef - - -define Package/erlang-reltool -$(call Package/erlang/Default) - TITLE:=Erlang reltool support - VERSION:=1.0.1 - DEPENDS+= +erlang -endef - -define Package/erlang-reltool/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides support for release management. -endef - - -define Package/erlang-erl-interface -$(call Package/erlang/Default) - TITLE:=Erlang erl_interface support - VERSION:=5.5.2 - DEPENDS+= +erlang -endef - -define Package/erlang-erl-interface/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides support for erlang interoperability with other languages. -endef - -define Package/erlang-os_mon -$(call Package/erlang/Default) - TITLE:=Erlang OS Monitoring Application - VERSION:=2.10 - DEPENDS+= +erlang -endef - -define Package/erlang-os_mon/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides the following services: - cpu_sup CPU load and utilization supervision - disksup Disk supervision - memsup Memory supervision -endef - -define Package/erlang-xmerl -$(call Package/erlang/Default) - TITLE:=Erlang XML export - VERSION:=2.0 - DEPENDS+= +erlang -endef - -define Package/erlang-xmerl/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides functions for exporting XML data to an external format -endef - -# Host - -HOST_CONFIGURE_ARGS += \ - --without-wx \ - --with-ssl="$(STAGING_DIR_HOST)" \ - --without-javac - -# Target - -CONFIGURE_ARGS += \ - --without-javac \ - --enable-dynamic-ssl-lib - -## Override incorrect THP detection by configure script -ERTS_THP=no -ifeq ($(CONFIG_KERNEL_TRANSPARENT_HUGEPAGE),y) - ERTS_THP=yes -endif - -CONFIGURE_VARS += \ - SHLIB_LD="$(TARGET_CC)" \ - TARGET_ARCH="$(TARGET_ARCH)" \ - erts_cv_linux_thp=$(ERTS_THP) \ - ac_cv_func_mmap_fixed_mapped=yes \ - ac_cv_path_WX_CONFIG_PATH=no \ - erl_xcomp_getaddrinfo=no \ - erl_xcomp_sysroot="$(STAGING_DIR)" - -EXTRA_CFLAGS+=-D_GNU_SOURCE -EXTRA_LDFLAGS+=-lz - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - noboot - $(MAKE) -C $(PKG_BUILD_DIR) \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - install -endef - -define Package/erlang/install - $(INSTALL_DIR) $(1)/usr/bin - for f in epmd erl erlc escript run_erl; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$$$$f $(1)/usr/bin/ ; \ - done - $(INSTALL_DIR) $(1)/usr/lib/erlang/bin - for f in epmd erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot no_dot_erlang.boot to_erl; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/bin/$$$$f $(1)/usr/lib/erlang/bin/ ; \ - done - $(INSTALL_DIR) $(1)/usr/lib/erlang/lib - for m in erts kernel sasl stdlib; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$m-* $(1)/usr/lib/erlang/lib/ ; \ - rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/examples ; \ - rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/src ; \ - done - $(INSTALL_DIR) $(1)/usr/lib/erlang - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/erts-* $(1)/usr/lib/erlang/ - rm -rf $(1)/usr/lib/erlang/erts-*/{doc,include,lib,man,src} - rm -rf $(1)/usr/lib/erlang/erts-*/bin/*.src - $(INSTALL_DIR) $(1)/usr/lib/erlang/releases - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/releases/* $(1)/usr/lib/erlang/releases/ - $(SED) 's,%ERL_ROOT%,/usr/lib/erlang,g' \ - $(1)/usr/lib/erlang/releases/RELEASES.src - mv -f $(1)/usr/lib/erlang/releases/RELEASES.src \ - $(1)/usr/lib/erlang/releases/RELEASES - for f in bin/erl bin/start erts-*/bin/erl erts-*/bin/start; do \ - $(SED) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \ - $(1)/usr/lib/erlang/$$$$f ; \ - done -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/obj/*/*.a $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/include/*.h $(1)/usr/include/ -endef - -define BuildModule - - define Package/erlang-$(1)/install - $(INSTALL_DIR) $$(1)/usr/lib/erlang/lib - for m in $(2); do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$$$$$m-* $$(1)/usr/lib/erlang/lib/ ; \ - rm -rf $$(1)/usr/lib/erlang/lib/$$$$$$$$m-*/{examples,priv/obj,src} ; \ - done - endef - - $$(eval $$(call BuildPackage,erlang-$(1))) - -endef - - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,erlang)) -$(eval $(call BuildModule,asn1,asn1)) -$(eval $(call BuildModule,compiler,compiler)) -$(eval $(call BuildModule,crypto,crypto)) -$(eval $(call BuildModule,inets,inets)) -$(eval $(call BuildModule,mnesia,mnesia)) -$(eval $(call BuildModule,runtime-tools,runtime_tools)) -$(eval $(call BuildModule,snmp,snmp)) -$(eval $(call BuildModule,public-key,public_key)) -$(eval $(call BuildModule,ssh,ssh)) -$(eval $(call BuildModule,ssl,ssl)) -$(eval $(call BuildModule,syntax-tools,syntax_tools)) -$(eval $(call BuildModule,tools,tools)) -$(eval $(call BuildModule,reltool,reltool)) -$(eval $(call BuildModule,erl-interface,erl_interface)) -$(eval $(call BuildModule,os_mon,os_mon)) -$(eval $(call BuildModule,xmerl,xmerl)) diff --git a/packages/lang/golang/golang-build.sh b/packages/lang/golang/golang-build.sh deleted file mode 100644 index 01df4aa4..00000000 --- a/packages/lang/golang/golang-build.sh +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2020, 2022 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -nl=" -" - -log() { - # shellcheck disable=SC2039 - local IFS=" " - printf '%s\n' "$*" -} - -log_error() { - # shellcheck disable=SC2039 - local IFS=" " - printf 'Error: %s\n' "$*" >&2 -} - -link_contents() { - # shellcheck disable=SC2039 - local src="$1" dest="$2" IFS="$nl" dirs dir base - - if [ -n "$(find "$src" -mindepth 1 -maxdepth 1 -name "*.go" -not -type d)" ]; then - log_error "$src is already a Go library" - return 1 - fi - - dirs="$(find "$src" -mindepth 1 -maxdepth 1 -type d)" - for dir in $dirs; do - base="${dir##*/}" - if [ -d "$dest/$base" ]; then - case "$dir" in - *$GO_BUILD_DEPENDS_SRC/$GO_PKG) - log "$GO_PKG is already installed. Please check for circular dependencies." - ;; - *) - link_contents "$src/$base" "$dest/$base" - ;; - esac - else - log "...${src#$GO_BUILD_DEPENDS_SRC}/$base" - ln -sf "$src/$base" "$dest/$base" - fi - done - - return 0 -} - -configure() { - # shellcheck disable=SC2039 - local files code testdata gomod pattern extra IFS file dest - - cd "$BUILD_DIR" || return 1 - - files="$(find ./ -path "*/.*" -prune -o -not -type d -print)" - - if [ "$GO_INSTALL_ALL" != 1 ]; then - code="$(printf '%s\n' "$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$')" - testdata="$(printf '%s\n' "$files" | grep '/testdata/')" - gomod="$(printf '%s\n' "$files" | grep '/go\.\(mod\|sum\|work\)$')" - - for pattern in $GO_INSTALL_EXTRA; do - extra="$(printf '%s\n' "$extra"; printf '%s\n' "$files" | grep -e "$pattern")" - done - - files="$(printf '%s\n%s\n%s\n%s\n' "$code" "$testdata" "$gomod" "$extra" | grep -v '^[[:space:]]*$' | sort -u)" - fi - - IFS="$nl" - - log "Copying files from $BUILD_DIR into $GO_BUILD_DIR/src/$GO_PKG" - mkdir -p "$GO_BUILD_DIR/src" - for file in $files; do - log "${file#./}" - dest="$GO_BUILD_DIR/src/$GO_PKG/${file#./}" - mkdir -p "${dest%/*}" - cp -fpR "$file" "$dest" - done - log - - if [ "$GO_SOURCE_ONLY" != 1 ]; then - if [ -d "$GO_BUILD_DEPENDS_SRC" ]; then - log "Symlinking directories from $GO_BUILD_DEPENDS_SRC into $GO_BUILD_DIR/src" - link_contents "$GO_BUILD_DEPENDS_SRC" "$GO_BUILD_DIR/src" - else - log "$GO_BUILD_DEPENDS_SRC does not exist, skipping symlinks" - fi - else - log "Not building binaries, skipping symlinks" - fi - log - - return 0 -} - -build() { - # shellcheck disable=SC2039 - local modargs pattern targets retval - - cd "$GO_BUILD_DIR" || return 1 - - if [ -f "$BUILD_DIR/go.mod" ] ; then - mkdir -p "$GO_MOD_CACHE_DIR" - modargs="$GO_MOD_ARGS" - fi - - log "Finding targets" - # shellcheck disable=SC2086 - targets="$(go list $modargs $GO_BUILD_PKG)" - for pattern in $GO_EXCLUDES; do - targets="$(printf '%s\n' "$targets" | grep -v "$pattern")" - done - log - - if [ "$GO_GO_GENERATE" = 1 ]; then - log "Calling go generate" - # shellcheck disable=SC2086 - GOOS='' GOARCH='' GO386='' GOARM='' GOARM64='' GOMIPS='' GOMIPS64='' GORISCV64=''\ - go generate -v $targets - log - fi - - if [ "$GO_SOURCE_ONLY" = 1 ]; then - return 0 - fi - - log "Building targets" - mkdir -p "$GO_BUILD_DIR/bin" "$GO_BUILD_CACHE_DIR" - # shellcheck disable=SC2086 - go install $modargs "$@" $targets - retval="$?" - log - - if [ "$retval" -eq 0 ] && [ -z "$(find "$GO_BUILD_BIN_DIR" -maxdepth 0 -type d -not -empty 2>/dev/null)" ]; then - log_error "No binaries were built" - retval=1 - fi - - if [ "$retval" -ne 0 ]; then - cache_cleanup - fi - - return "$retval" -} - -install_bin() { - # shellcheck disable=SC2039 - local dest="$1" - install -d -m0755 "$dest/$GO_INSTALL_BIN_PATH" - install -m0755 "$GO_BUILD_BIN_DIR"/* "$dest/$GO_INSTALL_BIN_PATH/" -} - -install_src() { - # shellcheck disable=SC2039 - local dest="$1" dir="${GO_PKG%/*}" - install -d -m0755 "$dest/$GO_BUILD_DEPENDS_PATH/src/$dir" - cp -fpR "$GO_BUILD_DIR/src/$GO_PKG" "$dest/$GO_BUILD_DEPENDS_PATH/src/$dir/" -} - -cache_cleanup() { - if ! [ -d "$GO_MOD_CACHE_DIR" ]; then - return 0 - fi - - # in case go is called without -modcacherw - find "$GO_MOD_CACHE_DIR" -type d -not -perm -u+w -exec chmod u+w '{}' + - - if [ -n "$CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE" ]; then - find "$GO_MOD_CACHE_DIR" -type d -not -perm -go+rx -exec chmod go+rx '{}' + - find "$GO_MOD_CACHE_DIR" -not -type d -not -perm -go+r -exec chmod go+r '{}' + - fi - - return 0 -} - - -if [ "$#" -lt 1 ]; then - log_error "Missing command" - exit 1 -fi - -command="$1" -shift 1 - -case "$command" in - configure) - configure - ;; - build) - build "$@" - ;; - install_bin) - install_bin "$@" - ;; - install_src) - install_src "$@" - ;; - cache_cleanup) - cache_cleanup - ;; - *) - log_error "Invalid command \"$command\"" - exit 1 - ;; -esac diff --git a/packages/lang/golang/golang-compiler.mk b/packages/lang/golang/golang-compiler.mk deleted file mode 100644 index 44defed7..00000000 --- a/packages/lang/golang/golang-compiler.mk +++ /dev/null @@ -1,189 +0,0 @@ -# -# Copyright (C) 2018, 2020-2021, 2023 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -ifeq ($(origin GO_INCLUDE_DIR),undefined) - GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) -endif - -include $(GO_INCLUDE_DIR)/golang-values.mk - - -# $(1) valid GOOS_GOARCH combinations -# $(2) go version id -define GoCompiler/Default/CheckHost - $(if $(filter $(GO_HOST_OS_ARCH),$(1)),,$(error go-$(2) cannot be installed on $(GO_HOST_OS)/$(GO_HOST_ARCH))) -endef - -# $(1) source go root -# $(2) additional environment variables (optional) -define GoCompiler/Default/Make - ( \ - cd "$(1)/src" ; \ - $(2) \ - $(BASH) make.bash \ - $(if $(findstring s,$(OPENWRT_VERBOSE)),-v) \ - --no-banner \ - ; \ - ) -endef - -# $(1) destination prefix -# $(2) go version id -define GoCompiler/Default/Install/make-dirs - $(INSTALL_DIR) "$(1)/lib/go-$(2)" - $(INSTALL_DIR) "$(1)/share/go-$(2)" -endef - -# $(1) source go root -# $(2) destination prefix -# $(3) go version id -# $(4) file/directory name -define GoCompiler/Default/Install/install-share-data - $(CP) "$(1)/$(4)" "$(2)/share/go-$(3)/" - $(LN) "../../share/go-$(3)/$(4)" "$(2)/lib/go-$(3)/" -endef - -# $(1) source go root -# $(2) destination prefix -# $(3) go version id -# $(4) GOOS_GOARCH -# $(5) install suffix (optional) -define GoCompiler/Default/Install/Bin - $(call GoCompiler/Default/Install/make-dirs,$(2),$(3)) - - $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),api) - - $(INSTALL_DATA) -p "$(1)/go.env" "$(2)/lib/go-$(3)/" - $(INSTALL_DATA) -p "$(1)/VERSION" "$(2)/lib/go-$(3)/" - - for file in CONTRIBUTING.md LICENSE PATENTS README.md SECURITY.md; do \ - if [ -f "$(1)/$$$$file" ]; then \ - $(INSTALL_DATA) -p "$(1)/$$$$file" "$(2)/share/go-$(3)/" ; \ - fi ; \ - done - - $(INSTALL_DIR) "$(2)/lib/go-$(3)/bin" - - ifeq ($(4),$(GO_HOST_OS_ARCH)) - $(INSTALL_BIN) -p "$(1)/bin"/* "$(2)/lib/go-$(3)/bin/" - else - $(INSTALL_BIN) -p "$(1)/bin/$(4)"/* "$(2)/lib/go-$(3)/bin/" - endif - - if [ -d "$(1)/pkg/$(4)$(if $(5),_$(5))" ]; then \ - $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg" ; \ - $(CP) "$(1)/pkg/$(4)$(if $(5),_$(5))" "$(2)/lib/go-$(3)/pkg/" ; \ - fi - - $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg/tool/$(4)" - $(INSTALL_BIN) -p "$(1)/pkg/tool/$(4)"/* "$(2)/lib/go-$(3)/pkg/tool/$(4)/" -endef - -# $(1) destination prefix -# $(2) go version id -define GoCompiler/Default/Install/BinLinks - $(INSTALL_DIR) "$(1)/bin" - $(LN) "../lib/go-$(2)/bin/go" "$(1)/bin/go" - $(LN) "../lib/go-$(2)/bin/gofmt" "$(1)/bin/gofmt" -endef - -# $(1) source go root -# $(2) destination prefix -# $(3) go version id -define GoCompiler/Default/Install/Doc - $(call GoCompiler/Default/Install/make-dirs,$(2),$(3)) - - $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),doc) -endef - -# $(1) source go root -# $(2) destination prefix -# $(3) go version id -define GoCompiler/Default/Install/Src - $(call GoCompiler/Default/Install/make-dirs,$(2),$(3)) - - $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),lib) - $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),misc) - $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),src) - $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),test) - - $(FIND) \ - "$(2)/share/go-$(3)/src/" \ - \! -type d -a \( -name "*.bat" -o -name "*.rc" \) \ - -delete - - if [ -d "$(1)/pkg/include" ]; then \ - $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg" ; \ - $(INSTALL_DIR) "$(2)/share/go-$(3)/pkg" ; \ - $(CP) "$(1)/pkg/include" "$(2)/share/go-$(3)/pkg/" ; \ - $(LN) "../../../share/go-$(3)/pkg/include" "$(2)/lib/go-$(3)/pkg/" ; \ - fi -endef - -# $(1) destination prefix -# $(2) go version id -define GoCompiler/Default/Uninstall - rm -rf "$(1)/lib/go-$(2)" - rm -rf "$(1)/share/go-$(2)" -endef - -# $(1) destination prefix -define GoCompiler/Default/Uninstall/BinLinks - rm -f "$(1)/bin/go" - rm -f "$(1)/bin/gofmt" -endef - - -# $(1) profile name -# $(2) source go root -# $(3) destination prefix -# $(4) go version id -# $(5) GOOS_GOARCH -# $(6) install suffix (optional) -define GoCompiler/AddProfile - - # $$(1) valid GOOS_GOARCH combinations - define GoCompiler/$(1)/CheckHost - $$(call GoCompiler/Default/CheckHost,$$(1),$(4)) - endef - - # $$(1) additional environment variables (optional) - define GoCompiler/$(1)/Make - $$(call GoCompiler/Default/Make,$(2),$$(1)) - endef - - # $$(1) override install prefix (optional) - define GoCompiler/$(1)/Install/Bin - $$(call GoCompiler/Default/Install/Bin,$(2),$$(or $$(1),$(3)),$(4),$(5),$(6)) - endef - - # $$(1) override install prefix (optional) - define GoCompiler/$(1)/Install/BinLinks - $$(call GoCompiler/Default/Install/BinLinks,$$(or $$(1),$(3)),$(4)) - endef - - # $$(1) override install prefix (optional) - define GoCompiler/$(1)/Install/Doc - $$(call GoCompiler/Default/Install/Doc,$(2),$$(or $$(1),$(3)),$(4)) - endef - - # $$(1) override install prefix (optional) - define GoCompiler/$(1)/Install/Src - $$(call GoCompiler/Default/Install/Src,$(2),$$(or $$(1),$(3)),$(4)) - endef - - # $$(1) override install prefix (optional) - define GoCompiler/$(1)/Uninstall - $$(call GoCompiler/Default/Uninstall,$$(or $$(1),$(3)),$(4)) - endef - - # $$(1) override install prefix (optional) - define GoCompiler/$(1)/Uninstall/BinLinks - $$(call GoCompiler/Default/Uninstall/BinLinks,$$(or $$(1),$(3))) - endef - -endef diff --git a/packages/lang/golang/golang-host-build.mk b/packages/lang/golang/golang-host-build.mk deleted file mode 100644 index 7c7551fd..00000000 --- a/packages/lang/golang/golang-host-build.mk +++ /dev/null @@ -1,220 +0,0 @@ -# -# Copyright (C) 2020, 2022 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -ifeq ($(origin GO_INCLUDE_DIR),undefined) - GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) -endif - -include $(GO_INCLUDE_DIR)/golang-values.mk - - -# these variables have the same meanings as in golang-package.mk -GO_HOST_INSTALL_EXTRA?=$(GO_PKG_INSTALL_EXTRA) -GO_HOST_INSTALL_ALL?=$(GO_PKG_INSTALL_ALL) -GO_HOST_SOURCE_ONLY?=$(GO_PKG_SOURCE_ONLY) -GO_HOST_BUILD_PKG?=$(GO_PKG_BUILD_PKG) -GO_HOST_EXCLUDES?=$(GO_PKG_EXCLUDES) -GO_HOST_GO_GENERATE?=$(GO_PKG_GO_GENERATE) -GO_HOST_GCFLAGS?=$(GO_PKG_GCFLAGS) -GO_HOST_LDFLAGS?=$(GO_PKG_LDFLAGS) -GO_HOST_LDFLAGS_X?=$(GO_PKG_LDFLAGS_X) -GO_HOST_TAGS?=$(GO_PKG_TAGS) -GO_HOST_INSTALL_BIN_PATH?=/bin - - -# need to repeat this here in case golang-package.mk is not included -GO_PKG_BUILD_PKG?=$(strip $(GO_PKG))/... - -GO_HOST_WORK_DIR_NAME:=.go_work -GO_HOST_BUILD_DIR=$(HOST_BUILD_DIR)/$(GO_HOST_WORK_DIR_NAME)/build -GO_HOST_BUILD_BIN_DIR=$(GO_HOST_BUILD_DIR)/bin - -GO_HOST_BUILD_DEPENDS_PATH:=/share/gocode -GO_HOST_BUILD_DEPENDS_SRC=$(STAGING_DIR_HOSTPKG)$(GO_HOST_BUILD_DEPENDS_PATH)/src - -GO_HOST_DIR_NAME:=$(lastword $(subst /,$(space),$(CURDIR))) -GO_HOST_STAGING_DIR:=$(TMP_DIR)/host-stage-$(GO_HOST_DIR_NAME) -GO_HOST_STAGING_FILES_LIST_DIR:=$(HOST_BUILD_PREFIX)/stamp -GO_HOST_BIN_STAGING_FILES_LIST:=$(GO_HOST_STAGING_FILES_LIST_DIR)/$(GO_HOST_DIR_NAME)-bin.list -GO_HOST_SRC_STAGING_FILES_LIST:=$(GO_HOST_STAGING_FILES_LIST_DIR)/$(GO_HOST_DIR_NAME)-src.list - -ifeq ($(GO_HOST_PIE_SUPPORTED),1) - GO_HOST_ENABLE_PIE:=1 -endif - -GO_HOST_BUILD_CONFIG_VARS= \ - GO_PKG="$(strip $(GO_PKG))" \ - GO_INSTALL_EXTRA="$(strip $(GO_HOST_INSTALL_EXTRA))" \ - GO_INSTALL_ALL="$(strip $(GO_HOST_INSTALL_ALL))" \ - GO_SOURCE_ONLY="$(strip $(GO_HOST_SOURCE_ONLY))" \ - GO_BUILD_PKG="$(strip $(GO_HOST_BUILD_PKG))" \ - GO_EXCLUDES="$(strip $(GO_HOST_EXCLUDES))" \ - GO_GO_GENERATE="$(strip $(GO_HOST_GO_GENERATE))" \ - GO_INSTALL_BIN_PATH="$(strip $(GO_HOST_INSTALL_BIN_PATH))" \ - BUILD_DIR="$(HOST_BUILD_DIR)" \ - GO_BUILD_DIR="$(GO_HOST_BUILD_DIR)" \ - GO_BUILD_BIN_DIR="$(GO_HOST_BUILD_BIN_DIR)" \ - GO_BUILD_DEPENDS_PATH="$(GO_HOST_BUILD_DEPENDS_PATH)" \ - GO_BUILD_DEPENDS_SRC="$(GO_HOST_BUILD_DEPENDS_SRC)" - -GO_HOST_MORE_CFLAGS?= \ - -Wformat -Werror=format-security \ - -fstack-protector-strong \ - -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \ - -Wl,-z,now -Wl,-z,relro \ - $(if $(GO_HOST_ENABLE_PIE),$(FPIC)) - -GO_HOST_MORE_LDFLAGS?= \ - -znow -zrelro \ - $(if $(GO_HOST_ENABLE_PIE),$(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs) - -GO_HOST_TARGET_VARS= \ - CGO_ENABLED=1 \ - CC=gcc \ - CXX=g++ \ - PKG_CONFIG=pkg-config \ - CGO_CFLAGS="$(HOST_CFLAGS) $(GO_HOST_MORE_CFLAGS)" \ - CGO_CPPFLAGS="$(HOST_CPPFLAGS) $(GO_HOST_MORE_CPPFLAGS)" \ - CGO_CXXFLAGS="$(HOST_CFLAGS) $(GO_HOST_MORE_CFLAGS)" \ - CGO_LDFLAGS="$(HOST_LDFLAGS) $(GO_HOST_MORE_LDFLAGS)" \ - GO_GCC_HELPER_CC="$(HOSTCC)" \ - GO_GCC_HELPER_CXX="$(HOSTCXX)" \ - GO_GCC_HELPER_PATH="$$$$PATH" \ - PATH="$(STAGING_DIR_HOSTPKG)/lib/go-cross/openwrt:$$$$PATH" - -GO_HOST_BUILD_VARS= \ - GOPATH="$(GO_HOST_BUILD_DIR)" \ - GOCACHE="$(GO_BUILD_CACHE_DIR)" \ - GOMODCACHE="$(GO_MOD_CACHE_DIR)" \ - GOENV=off - -GO_HOST_VARS= \ - $(GO_HOST_TARGET_VARS) \ - $(GO_HOST_BUILD_VARS) - -GO_HOST_DEFAULT_LDFLAGS= \ - -linkmode external \ - -extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(HOST_LDFLAGS) $(GO_HOST_MORE_LDFLAGS))' - -GO_HOST_CUSTOM_LDFLAGS= \ - $(GO_HOST_LDFLAGS) \ - $(patsubst %,-X %,$(GO_HOST_LDFLAGS_X)) - -GO_HOST_INSTALL_ARGS= \ - -v \ - -ldflags "all=$(GO_HOST_DEFAULT_LDFLAGS)" \ - $(if $(GO_HOST_ENABLE_PIE),-buildmode pie) \ - $(if $(strip $(GO_HOST_GCFLAGS)),-gcflags "$(GO_HOST_GCFLAGS)") \ - $(if $(strip $(GO_HOST_CUSTOM_LDFLAGS)),-ldflags "$(GO_HOST_CUSTOM_LDFLAGS) $(GO_HOST_DEFAULT_LDFLAGS)") \ - $(if $(strip $(GO_HOST_TAGS)),-tags "$(GO_HOST_TAGS)") - -define GoHost/Host/Configure - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_HOST_BUILD_CONFIG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh configure -endef - -# $(1) additional arguments for go command line (optional) -define GoHost/Host/Compile - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_HOST_BUILD_CONFIG_VARS) \ - $(GO_HOST_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh build $(GO_HOST_INSTALL_ARGS) $(1) -endef - -define GoHost/Host/Install/Bin - rm -rf "$(GO_HOST_STAGING_DIR)" - mkdir -p "$(GO_HOST_STAGING_DIR)" "$(GO_HOST_STAGING_FILES_LIST_DIR)" - - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_HOST_BUILD_CONFIG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_bin "$(GO_HOST_STAGING_DIR)" - - if [ -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ]; then \ - "$(SCRIPT_DIR)/clean-package.sh" \ - "$(GO_HOST_BIN_STAGING_FILES_LIST)" \ - "$(1)" ; \ - fi - - cd "$(GO_HOST_STAGING_DIR)" && find ./ > "$(GO_HOST_STAGING_DIR).files" - - $(call locked, \ - mv "$(GO_HOST_STAGING_DIR).files" "$(GO_HOST_BIN_STAGING_FILES_LIST)" && \ - $(CP) "$(GO_HOST_STAGING_DIR)"/* "$(1)/", \ - host-staging-dir \ - ) - - rm -rf "$(GO_HOST_STAGING_DIR)" -endef - -define GoHost/Host/Install/Src - rm -rf "$(GO_HOST_STAGING_DIR)" - mkdir -p "$(GO_HOST_STAGING_DIR)" "$(GO_HOST_STAGING_FILES_LIST_DIR)" - - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_HOST_BUILD_CONFIG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_src "$(GO_HOST_STAGING_DIR)" - - if [ -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ]; then \ - "$(SCRIPT_DIR)/clean-package.sh" \ - "$(GO_HOST_SRC_STAGING_FILES_LIST)" \ - "$(1)" ; \ - fi - - cd "$(GO_HOST_STAGING_DIR)" && find ./ > "$(GO_HOST_STAGING_DIR).files" - - $(call locked, \ - mv "$(GO_HOST_STAGING_DIR).files" "$(GO_HOST_SRC_STAGING_FILES_LIST)" && \ - $(CP) "$(GO_HOST_STAGING_DIR)"/* "$(1)/", \ - host-staging-dir \ - ) - - rm -rf "$(GO_HOST_STAGING_DIR)" -endef - -define GoHost/Host/Install - $(if $(filter $(GO_HOST_SOURCE_ONLY),1),, \ - $(call GoHost/Host/Install/Bin,$(1)) \ - ) - $(call GoHost/Host/Install/Src,$(1)) -endef - -define GoHost/Host/Uninstall - if [ -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ]; then \ - "$(SCRIPT_DIR)/clean-package.sh" \ - "$(GO_HOST_BIN_STAGING_FILES_LIST)" \ - "$(HOST_BUILD_PREFIX)" ; \ - rm -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ; \ - fi - - if [ -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ]; then \ - "$(SCRIPT_DIR)/clean-package.sh" \ - "$(GO_HOST_SRC_STAGING_FILES_LIST)" \ - "$(HOST_BUILD_PREFIX)" ; \ - rm -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ; \ - fi -endef - - -ifneq ($(strip $(GO_PKG)),) - Host/Configure=$(call GoHost/Host/Configure) - Host/Compile=$(call GoHost/Host/Compile) - Hooks/HostCompile/Post+=Go/CacheCleanup - Host/Uninstall=$(call GoHost/Host/Uninstall,$(1)) -endif - -define GoHostBuild - Host/Install=$$(call GoHost/Host/Install,$$(1)) -endef - -define GoBinHostBuild - Host/Install=$$(call GoHost/Host/Install/Bin,$$(1)) -endef - -define GoSrcHostBuild - Host/Install=$$(call GoHost/Host/Install/Src,$$(1)) -endef diff --git a/packages/lang/golang/golang-package.mk b/packages/lang/golang/golang-package.mk deleted file mode 100644 index cc005053..00000000 --- a/packages/lang/golang/golang-package.mk +++ /dev/null @@ -1,320 +0,0 @@ -# -# Copyright (C) 2018-2022 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -ifeq ($(origin GO_INCLUDE_DIR),undefined) - GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) -endif - -include $(GO_INCLUDE_DIR)/golang-values.mk - - -# Variables (all optional, except GO_PKG) to be set in package -# Makefiles: -# -# GO_PKG (required) - name of Go package -# -# Go name of the package. -# -# e.g. GO_PKG:=golang.org/x/text -# -# -# GO_PKG_INSTALL_EXTRA - list of regular expressions, default empty -# -# Additional files/directories to install. By default, only these -# files are installed: -# -# * Files with one of these extensions: -# .go, .c, .cc, .cpp, .h, .hh, .hpp, .proto, .s -# -# * Files in any 'testdata' directory -# -# * go.mod, go.sum and go.work, in any directory -# -# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml -# -# -# GO_PKG_INSTALL_ALL - boolean (0 or 1), default false -# -# If true, install all files regardless of extension or directory. -# -# e.g. GO_PKG_INSTALL_ALL:=1 -# -# -# GO_PKG_SOURCE_ONLY - boolean (0 or 1), default false -# -# If true, 'go install' will not be called. If the package does not -# (or should not) build any binaries, then specifying this option will -# save build time. -# -# e.g. GO_PKG_SOURCE_ONLY:=1 -# -# -# GO_PKG_BUILD_PKG - list of build targets, default GO_PKG/... -# -# Build targets for compiling this Go package, i.e. arguments passed -# to 'go install'. -# -# e.g. GO_PKG_BUILD_PKG:=github.com/debian/ratt/cmd/... -# -# -# GO_PKG_EXCLUDES - list of regular expressions, default empty -# -# Patterns to exclude from the build targets expanded from -# GO_PKG_BUILD_PKG. -# -# e.g. GO_PKG_EXCLUDES:=examples/ -# -# -# GO_PKG_GO_GENERATE - boolean (0 or 1), default false -# -# If true, 'go generate' will be called on all build targets (as -# determined by GO_PKG_BUILD_PKG and GO_PKG_EXCLUDES). This is usually -# not necessary. -# -# e.g. GO_PKG_GO_GENERATE:=1 -# -# -# GO_PKG_GCFLAGS - list of options, default empty -# -# Additional go tool compile options to use when building targets. -# -# e.g. GO_PKG_GCFLAGS:=-N -l -# -# -# GO_PKG_LDFLAGS - list of options, default empty -# -# Additional go tool link options to use when building targets. -# -# Note that the OpenWrt build system has an option to strip binaries -# (enabled by default), so -s (Omit the symbol table and debug -# information) and -w (Omit the DWARF symbol table) flags are not -# necessary. -# -# e.g. GO_PKG_LDFLAGS:=-r dir1:dir2 -u -# -# -# GO_PKG_LDFLAGS_X - list of string variable definitions, default empty -# -# Each definition will be passed as the parameter to the -X go tool -# link option, i.e. -ldflags "-X importpath.name=value". -# -# e.g. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) main.BuildStamp=$(SOURCE_DATE_EPOCH) -# -# -# GO_PKG_TAGS - list of build tags, default empty -# -# Build tags to consider satisfied during the build, passed as the -# parameter to the -tags option for 'go install'. -# -# e.g. GO_PKG_TAGS:=release,noupgrade -# -# -# GO_PKG_INSTALL_BIN_PATH - target directory path, default /usr/bin -# -# Directory path under "dest_dir" where binaries will be installed by -# '$(call GoPackage/Package/Install/Bin,dest_dir)'. -# -# e.g. GO_PKG_INSTALL_BIN_PATH:=/sbin - -# Credit for this package build process (GoPackage/Build/Configure and -# GoPackage/Build/Compile) belong to Debian's dh-golang completely. -# https://salsa.debian.org/go-team/packages/dh-golang - - -GO_PKG_BUILD_PKG?=$(strip $(GO_PKG))/... -GO_PKG_INSTALL_BIN_PATH?=/usr/bin - -GO_PKG_WORK_DIR_NAME:=.go_work -GO_PKG_BUILD_DIR=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME)/build -GO_PKG_BUILD_BIN_DIR=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS_ARCH)) - -GO_PKG_BUILD_DEPENDS_PATH:=/usr/share/gocode -GO_PKG_BUILD_DEPENDS_SRC=$(STAGING_DIR)$(GO_PKG_BUILD_DEPENDS_PATH)/src - -ifdef CONFIG_PKG_ASLR_PIE_ALL - ifeq ($(strip $(PKG_ASLR_PIE)),1) - ifeq ($(GO_TARGET_PIE_SUPPORTED),1) - GO_PKG_ENABLE_PIE:=1 - else - $(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH)) - endif - endif -endif - -ifdef CONFIG_PKG_ASLR_PIE_REGULAR - ifeq ($(strip $(PKG_ASLR_PIE_REGULAR)),1) - ifeq ($(GO_TARGET_PIE_SUPPORTED),1) - GO_PKG_ENABLE_PIE:=1 - else - $(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH)) - endif - endif -endif - -ifdef CONFIG_GOLANG_SPECTRE - ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1) - GO_PKG_ENABLE_SPECTRE:=1 - else - $(warning Spectre mitigations are not supported for $(GO_ARCH)) - endif -endif - -# sstrip causes corrupted section header size -ifneq ($(CONFIG_USE_SSTRIP),) - ifneq ($(CONFIG_DEBUG),) - GO_PKG_STRIP_ARGS:=--strip-unneeded --remove-section=.comment --remove-section=.note - else - GO_PKG_STRIP_ARGS:=--strip-all - endif - STRIP:=$(TARGET_CROSS)strip $(GO_PKG_STRIP_ARGS) -endif - -define GoPackage/GoSubMenu - SUBMENU:=Go - SECTION:=lang - CATEGORY:=Languages -endef - -GO_PKG_BUILD_CONFIG_VARS= \ - GO_PKG="$(strip $(GO_PKG))" \ - GO_INSTALL_EXTRA="$(strip $(GO_PKG_INSTALL_EXTRA))" \ - GO_INSTALL_ALL="$(strip $(GO_PKG_INSTALL_ALL))" \ - GO_SOURCE_ONLY="$(strip $(GO_PKG_SOURCE_ONLY))" \ - GO_BUILD_PKG="$(strip $(GO_PKG_BUILD_PKG))" \ - GO_EXCLUDES="$(strip $(GO_PKG_EXCLUDES))" \ - GO_GO_GENERATE="$(strip $(GO_PKG_GO_GENERATE))" \ - GO_INSTALL_BIN_PATH="$(strip $(GO_PKG_INSTALL_BIN_PATH))" \ - BUILD_DIR="$(PKG_BUILD_DIR)" \ - GO_BUILD_DIR="$(GO_PKG_BUILD_DIR)" \ - GO_BUILD_BIN_DIR="$(GO_PKG_BUILD_BIN_DIR)" \ - GO_BUILD_DEPENDS_PATH="$(GO_PKG_BUILD_DEPENDS_PATH)" \ - GO_BUILD_DEPENDS_SRC="$(GO_PKG_BUILD_DEPENDS_SRC)" - -GO_PKG_TARGET_VARS= \ - GOOS="$(GO_OS)" \ - GOARCH="$(GO_ARCH)" \ - GO386="$(GO_386)" \ - GOAMD64="$(GO_AMD64)" \ - GOARM="$(GO_ARM)" \ - GOMIPS="$(GO_MIPS)" \ - GOMIPS64="$(GO_MIPS64)" \ - GOPPC64="$(GO_PPC64)" \ - CGO_ENABLED=1 \ - CC="$(TARGET_CC)" \ - CXX="$(TARGET_CXX)" \ - CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \ - CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \ - CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \ - CGO_LDFLAGS="$(TARGET_LDFLAGS)" - -GO_PKG_BUILD_VARS= \ - GOPATH="$(GO_PKG_BUILD_DIR)" \ - GOCACHE="$(GO_BUILD_CACHE_DIR)" \ - GOMODCACHE="$(GO_MOD_CACHE_DIR)" \ - GOENV=off \ - GOTOOLCHAIN=local - -GO_PKG_VARS= \ - $(GO_PKG_TARGET_VARS) \ - $(GO_PKG_BUILD_VARS) - -GO_PKG_DEFAULT_GCFLAGS= \ - $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) - -GO_PKG_DEFAULT_ASMFLAGS= \ - $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) - -GO_PKG_DEFAULT_LDFLAGS= \ - -buildid '$(SOURCE_DATE_EPOCH)' \ - -linkmode external \ - -extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(TARGET_LDFLAGS))' - -GO_PKG_CUSTOM_LDFLAGS= \ - $(GO_PKG_LDFLAGS) \ - $(patsubst %,-X %,$(GO_PKG_LDFLAGS_X)) - -GO_PKG_INSTALL_ARGS= \ - -v \ - -buildvcs=false \ - -trimpath \ - -ldflags "all=$(GO_PKG_DEFAULT_LDFLAGS)" \ - $(if $(strip $(GO_PKG_DEFAULT_GCFLAGS)),-gcflags "all=$(GO_PKG_DEFAULT_GCFLAGS)") \ - $(if $(strip $(GO_PKG_DEFAULT_ASMFLAGS)),-asmflags "all=$(GO_PKG_DEFAULT_ASMFLAGS)") \ - $(if $(GO_PKG_ENABLE_PIE),-buildmode pie) \ - $(if $(filter $(GO_ARCH),arm),-installsuffix "v$(GO_ARM)") \ - $(if $(filter $(GO_ARCH),mips mipsle),-installsuffix "$(GO_MIPS)") \ - $(if $(filter $(GO_ARCH),mips64 mips64le),-installsuffix "$(GO_MIPS64)") \ - $(if $(strip $(GO_PKG_GCFLAGS)),-gcflags "$(GO_PKG_GCFLAGS) $(GO_PKG_DEFAULT_GCFLAGS)") \ - $(if $(strip $(GO_PKG_CUSTOM_LDFLAGS)),-ldflags "$(GO_PKG_CUSTOM_LDFLAGS) $(GO_PKG_DEFAULT_LDFLAGS)") \ - $(if $(strip $(GO_PKG_TAGS)),-tags "$(GO_PKG_TAGS)") - -define GoPackage/Build/Configure - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_CONFIG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh configure -endef - -# $(1) additional arguments for go command line (optional) -define GoPackage/Build/Compile - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_CONFIG_VARS) \ - $(GO_PKG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh build $(GO_PKG_INSTALL_ARGS) $(1) -endef - -define GoPackage/Build/InstallDev - $(call GoPackage/Package/Install/Src,$(1)) -endef - -define GoPackage/Package/Install/Bin - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_CONFIG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_bin "$(1)" -endef - -define GoPackage/Package/Install/Src - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_CONFIG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_src "$(1)" -endef - -define GoPackage/Package/Install - $(if $(filter $(GO_PKG_SOURCE_ONLY),1),, \ - $(call GoPackage/Package/Install/Bin,$(1)) \ - ) - $(call GoPackage/Package/Install/Src,$(1)) -endef - - -ifneq ($(strip $(GO_PKG)),) - ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1) - PKG_CONFIG_DEPENDS+=CONFIG_GOLANG_SPECTRE - endif - - Build/Configure=$(call GoPackage/Build/Configure) - Build/Compile=$(call GoPackage/Build/Compile) - Hooks/Compile/Post+=Go/CacheCleanup - Build/InstallDev=$(call GoPackage/Build/InstallDev,$(1)) -endif - -define GoPackage - ifndef Package/$(1)/install - Package/$(1)/install=$$(call GoPackage/Package/Install,$$(1)) - endif -endef - -define GoBinPackage - ifndef Package/$(1)/install - Package/$(1)/install=$$(call GoPackage/Package/Install/Bin,$$(1)) - endif -endef - -define GoSrcPackage - ifndef Package/$(1)/install - Package/$(1)/install=$$(call GoPackage/Package/Install/Src,$$(1)) - endif -endef diff --git a/packages/lang/golang/golang-values.mk b/packages/lang/golang/golang-values.mk deleted file mode 100644 index d57de5f3..00000000 --- a/packages/lang/golang/golang-values.mk +++ /dev/null @@ -1,272 +0,0 @@ -# -# Copyright (C) 2018-2023 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -ifeq ($(origin GO_INCLUDE_DIR),undefined) - GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) -endif - - -# Unset environment variables -# There are more magic variables to track down, but ain't nobody got time for that - -# From https://pkg.go.dev/cmd/go#hdr-Environment_variables - -# General-purpose environment variables: -unexport \ - GO111MODULE \ - GCCGO \ - GOARCH \ - GOBIN \ - GOCACHE \ - GOMODCACHE \ - GODEBUG \ - GOENV \ - GOFLAGS \ - GOOS \ - GOPATH \ - GOROOT \ - GOTOOLCHAIN \ - GOTMPDIR \ - GOWORK -# Unmodified: -# GOINSECURE -# GOPRIVATE -# GOPROXY -# GONOPROXY -# GOSUMDB -# GONOSUMDB -# GOVCS - -# Environment variables for use with cgo: -unexport \ - AR \ - CC \ - CGO_ENABLED \ - CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \ - CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \ - CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \ - CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \ - CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \ - CXX \ - FC -# Unmodified: -# PKG_CONFIG - -# Architecture-specific environment variables: -unexport \ - GOARM \ - GOARM64 \ - GO386 \ - GOAMD64 \ - GOMIPS \ - GOMIPS64 \ - GOPPC64 \ - GORISCV64 \ - GOWASM - -# Environment variables for use with code coverage: -unexport \ - GOCOVERDIR - -# Special-purpose environment variables: -unexport \ - GCCGOTOOLDIR \ - GOEXPERIMENT \ - GOROOT_FINAL \ - GO_EXTLINK_ENABLED -# Unmodified: -# GIT_ALLOW_PROTOCOL - -# From https://pkg.go.dev/runtime#hdr-Environment_Variables -unexport \ - GOGC \ - GOMEMLIMIT \ - GOMAXPROCS \ - GORACE \ - GOTRACEBACK - -# From https://pkg.go.dev/cmd/cgo#hdr-Using_cgo_with_the_go_command -unexport \ - CC_FOR_TARGET \ - CXX_FOR_TARGET -# Todo: -# CC_FOR_${GOOS}_${GOARCH} -# CXX_FOR_${GOOS}_${GOARCH} - -# From https://go.dev/doc/install/source#environment -unexport \ - GOHOSTOS \ - GOHOSTARCH - -# From https://go.dev/src/make.bash -unexport \ - GO_GCFLAGS \ - GO_LDFLAGS \ - GO_LDSO \ - GO_DISTFLAGS \ - GOBUILDTIMELOGFILE \ - GOROOT_BOOTSTRAP - -# From https://go.dev/doc/go1.9#parallel-compile -unexport \ - GO19CONCURRENTCOMPILATION - -# From https://go.dev/src/cmd/dist/build.go -unexport \ - BOOT_GO_GCFLAGS \ - BOOT_GO_LDFLAGS - -# From https://go.dev/src/cmd/dist/buildtool.go -unexport \ - GOBOOTSTRAP_TOOLEXEC - - -# GOOS / GOARCH - -go_arch=$(subst \ - aarch64,arm64,$(subst \ - i386,386,$(subst \ - loongarch64,loong64,$(subst \ - mipsel,mipsle,$(subst \ - mips64el,mips64le,$(subst \ - powerpc64,ppc64,$(subst \ - x86_64,amd64,$(1)))))))) - -GO_OS:=linux -GO_ARCH:=$(call go_arch,$(ARCH)) -GO_OS_ARCH:=$(GO_OS)_$(GO_ARCH) - -GO_HOST_OS:=$(call tolower,$(HOST_OS)) -GO_HOST_ARCH:=$(call go_arch,$(subst \ - armv6l,arm,$(subst \ - armv7l,arm,$(subst \ - i686,i386,$(HOST_ARCH))))) -GO_HOST_OS_ARCH:=$(GO_HOST_OS)_$(GO_HOST_ARCH) - -ifeq ($(GO_OS_ARCH),$(GO_HOST_OS_ARCH)) - GO_HOST_TARGET_SAME:=1 -else - GO_HOST_TARGET_DIFFERENT:=1 -endif - -ifeq ($(GO_ARCH),386) - ifeq ($(CONFIG_TARGET_x86_geode)$(CONFIG_TARGET_x86_legacy),y) - GO_386:=softfloat - else - GO_386:=sse2 - endif - - # -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors - GO_CFLAGS_TO_REMOVE:=-fno-plt - -else ifeq ($(GO_ARCH),amd64) - GO_AMD64:=v1 - -else ifeq ($(GO_ARCH),arm) - GO_TARGET_FPU:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))) - - # FPU names from https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/ARM-Options.html#index-mfpu-1 - # see also https://github.com/gcc-mirror/gcc/blob/releases/gcc-8.4.0/gcc/config/arm/arm-cpus.in - - ifeq ($(GO_TARGET_FPU),) - GO_ARM:=5 - else ifneq ($(filter $(GO_TARGET_FPU),vfp vfpv2),) - GO_ARM:=6 - else - GO_ARM:=7 - endif - -else ifneq ($(filter $(GO_ARCH),mips mipsle),) - ifeq ($(CONFIG_HAS_FPU),y) - GO_MIPS:=hardfloat - else - GO_MIPS:=softfloat - endif - - # -mips32r2: conflicts with -march=mips32 set by go - GO_CFLAGS_TO_REMOVE:=-mips32r2 - -else ifneq ($(filter $(GO_ARCH),mips64 mips64le),) - ifeq ($(CONFIG_HAS_FPU),y) - GO_MIPS64:=hardfloat - else - GO_MIPS64:=softfloat - endif - -else ifeq ($(GO_ARCH),ppc64) - GO_PPC64:=power8 - -endif - - -# Target Go - -GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||loongarch64||mips||mips64||mips64el||mipsel||powerpc64||riscv64||x86_64) - - -# ASLR/PIE - -# From https://go.dev/src/internal/platform/supported.go -GO_PIE_SUPPORTED_OS_ARCH:= \ - android_386 android_amd64 android_arm android_arm64 \ - linux_386 linux_amd64 linux_arm linux_arm64 \ - windows_386 windows_amd64 windows_arm windows_arm64 \ - \ - darwin_amd64 darwin_arm64 \ - ios_amd64 ios_arm64 \ - \ - freebsd_amd64 \ - \ - aix_ppc64 \ - \ - linux_loong64 linux_ppc64le linux_riscv64 linux_s390x - -# From https://go.dev/src/cmd/go/internal/work/init.go -go_pie_install_suffix=$(if $(filter $(1),aix_ppc64 windows_386 windows_amd64 windows_arm windows_arm64),,shared) - -ifneq ($(filter $(GO_HOST_OS_ARCH),$(GO_PIE_SUPPORTED_OS_ARCH)),) - GO_HOST_PIE_SUPPORTED:=1 - GO_HOST_PIE_INSTALL_SUFFIX:=$(call go_pie_install_suffix,$(GO_HOST_OS_ARCH)) -endif - -ifneq ($(filter $(GO_OS_ARCH),$(GO_PIE_SUPPORTED_OS_ARCH)),) - GO_TARGET_PIE_SUPPORTED:=1 - GO_TARGET_PIE_INSTALL_SUFFIX:=$(call go_pie_install_suffix,$(GO_OS_ARCH)) -endif - - -# Spectre mitigations - -GO_SPECTRE_SUPPORTED_ARCH:=amd64 - -ifneq ($(filter $(GO_HOST_ARCH),$(GO_SPECTRE_SUPPORTED_ARCH)),) - GO_HOST_SPECTRE_SUPPORTED:=1 -endif - -ifneq ($(filter $(GO_ARCH),$(GO_SPECTRE_SUPPORTED_ARCH)),) - GO_TARGET_SPECTRE_SUPPORTED:=1 -endif - - -# General build info - -GO_BUILD_CACHE_DIR:=$(or $(call qstrip,$(CONFIG_GOLANG_BUILD_CACHE_DIR)),$(TMP_DIR)/go-build) -GO_MOD_CACHE_DIR:=$(DL_DIR)/go-mod-cache - -GO_MOD_ARGS= \ - -modcacherw - -GO_GENERAL_BUILD_CONFIG_VARS= \ - CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="$(CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE)" \ - GO_BUILD_CACHE_DIR="$(GO_BUILD_CACHE_DIR)" \ - GO_MOD_CACHE_DIR="$(GO_MOD_CACHE_DIR)" \ - GO_MOD_ARGS="$(GO_MOD_ARGS)" - -define Go/CacheCleanup - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh cache_cleanup -endef diff --git a/packages/lang/golang/golang/Config.in b/packages/lang/golang/golang/Config.in deleted file mode 100644 index 76fd85c8..00000000 --- a/packages/lang/golang/golang/Config.in +++ /dev/null @@ -1,33 +0,0 @@ -menu "Configuration" - -config GOLANG_EXTERNAL_BOOTSTRAP_ROOT - string "External bootstrap Go root directory" - default "" - help - Path to a working Go tree (>= Go 1.4), with bin, pkg, and src - subdirectories and the Go compiler at bin/go. - - If specified, the existing Go installation will be used to - compile host (buildroot) Go. - - Leave blank to compile the default bootstrap Go. - -config GOLANG_BUILD_CACHE_DIR - string "Go build cache directory" - default "" - help - Store the Go build cache in this directory. - If not set, uses '$(TMP_DIR)/go-build'. - -config GOLANG_MOD_CACHE_WORLD_READABLE - bool "Ensure Go module cache is world-readable" - default n - -config GOLANG_SPECTRE - bool "Enable Spectre mitigations" - default n - depends on x86_64 - help - Currently only available for x86-64 (amd64). - -endmenu diff --git a/packages/lang/golang/golang/Makefile b/packages/lang/golang/golang/Makefile deleted file mode 100644 index 605f3954..00000000 --- a/packages/lang/golang/golang/Makefile +++ /dev/null @@ -1,433 +0,0 @@ -# -# Copyright (C) 2018-2023 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -GO_VERSION_MAJOR_MINOR:=1.23 -GO_VERSION_PATCH:=3 - -PKG_NAME:=golang -PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH)) -PKG_RELEASE:=1 - -GO_SOURCE_URLS:=https://dl.google.com/go/ \ - https://mirrors.ustc.edu.cn/golang/ \ - https://mirrors.nju.edu.cn/golang/ \ - https://go.dev/dl/ - -PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz -PKG_SOURCE_URL:=$(GO_SOURCE_URLS) -PKG_HASH:=8d6a77332487557c6afa2421131b50f83db4ae3c579c3bc72e670ee1f6968599 - -PKG_MAINTAINER:=Jeffery To -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_CPE_ID:=cpe:/a:golang:go - -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_DIR:=$(BUILD_DIR)/go-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -PKG_GO_PREFIX:=/usr -PKG_GO_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR) - -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/go-$(PKG_VERSION) -HOST_BUILD_PARALLEL:=1 - -HOST_GO_PREFIX:=$(STAGING_DIR_HOSTPKG) -HOST_GO_VERSION_ID:=cross -HOST_GO_ROOT:=$(HOST_GO_PREFIX)/lib/go-$(HOST_GO_VERSION_ID) - -HOST_GO_VALID_OS_ARCH:= \ - android_386 android_amd64 android_arm android_arm64 \ - freebsd_386 freebsd_amd64 freebsd_arm freebsd_arm64 \ - linux_386 linux_amd64 linux_arm linux_arm64 \ - openbsd_386 openbsd_amd64 openbsd_arm openbsd_arm64 \ - netbsd_386 netbsd_amd64 netbsd_arm netbsd_arm64 \ - windows_386 windows_amd64 windows_arm windows_arm64 \ - \ - plan9_386 plan9_amd64 plan9_arm \ - \ - darwin_amd64 darwin_arm64 \ - ios_amd64 ios_arm64 \ - \ - dragonfly_amd64 \ - illumos_amd64 \ - solaris_amd64 \ - \ - aix_ppc64 \ - js_wasm \ - wasip1_wasm \ - \ - freebsd_riscv64 \ - openbsd_riscv64 \ - \ - linux_ppc64 linux_ppc64le \ - linux_mips linux_mipsle linux_mips64 linux_mips64le \ - linux_loong64 linux_riscv64 linux_s390x \ - \ - openbsd_mips64 - -BOOTSTRAP_SOURCE:=go1.4-bootstrap-20171003.tar.gz -BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS) -BOOTSTRAP_HASH:=f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52 - -BOOTSTRAP_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap - -BOOTSTRAP_GO_VALID_OS_ARCH:= \ - darwin_386 darwin_amd64 \ - dragonfly_386 dragonfly_amd64 \ - freebsd_386 freebsd_amd64 freebsd_arm \ - linux_386 linux_amd64 linux_arm \ - netbsd_386 netbsd_amd64 netbsd_arm \ - openbsd_386 openbsd_amd64 \ - plan9_386 plan9_amd64 \ - solaris_amd64 \ - windows_386 windows_amd64 - -BOOTSTRAP_1_17_SOURCE:=go1.17.13.src.tar.gz -BOOTSTRAP_1_17_SOURCE_URL:=$(GO_SOURCE_URLS) -BOOTSTRAP_1_17_HASH:=a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd - -BOOTSTRAP_1_17_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.17 - -BOOTSTRAP_1_20_SOURCE:=go1.20.14.src.tar.gz -BOOTSTRAP_1_20_SOURCE_URL:=$(GO_SOURCE_URLS) -BOOTSTRAP_1_20_HASH:=1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e - -BOOTSTRAP_1_20_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.20 - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk -include ../golang-compiler.mk -include ../golang-package.mk - -PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)" -HOST_UNPACK:=$(HOST_TAR) -C "$(HOST_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)" -BOOTSTRAP_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_SOURCE)" -BOOTSTRAP_1_17_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_17_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_17_SOURCE)" -BOOTSTRAP_1_20_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_20_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_20_SOURCE)" - -# don't strip ELF executables in test data -RSTRIP:=: -STRIP:=: - -ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1) - PKG_CONFIG_DEPENDS+=CONFIG_GOLANG_SPECTRE -endif - -define Package/golang/Default -$(call GoPackage/GoSubMenu) - TITLE:=Go programming language - URL:=https://go.dev/ - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/golang/Default/description -The Go programming language is an open source project to make -programmers more productive. - -Go is expressive, concise, clean, and efficient. Its concurrency -mechanisms make it easy to write programs that get the most out of -multicore and networked machines, while its novel type system enables -flexible and modular program construction. Go compiles quickly to -machine code yet has the convenience of garbage collection and the power -of run-time reflection. It's a fast, statically typed, compiled language -that feels like a dynamically typed, interpreted language. -endef - -# go tool requires source present: -# https://github.com/golang/go/issues/4635 -define Package/golang -$(call Package/golang/Default) - TITLE+= (compiler) - DEPENDS+= +golang-src -endef - -define Package/golang/description -$(call Package/golang/Default/description) - -This package provides an assembler, compiler, linker, and compiled -libraries for the Go programming language. -endef - -define Package/golang/config - source "$(SOURCE)/Config.in" -endef - -define Package/golang-doc -$(call Package/golang/Default) - TITLE+= (documentation) -endef - -define Package/golang-doc/description -$(call Package/golang/Default/description) - -This package provides the documentation for the Go programming language. -endef - -define Package/golang-src -$(call Package/golang/Default) - TITLE+= (source files) -endef - -define Package/golang-src/description -$(call Package/golang/Default/description) - -This package provides the Go programming language source files needed -for cross-compilation. -endef - - -# Bootstrap - -BOOTSTRAP_ROOT_DIR:=$(call qstrip,$(CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT)) - -ifeq ($(BOOTSTRAP_ROOT_DIR),) - BOOTSTRAP_ROOT_DIR:=$(BOOTSTRAP_BUILD_DIR) - - define Download/golang-bootstrap - FILE:=$(BOOTSTRAP_SOURCE) - URL:=$(BOOTSTRAP_SOURCE_URL) - HASH:=$(BOOTSTRAP_HASH) - endef - $(eval $(call Download,golang-bootstrap)) - - define Bootstrap/Prepare - mkdir -p "$(BOOTSTRAP_BUILD_DIR)" && $(BOOTSTRAP_UNPACK) ; - endef - Hooks/HostPrepare/Post+=Bootstrap/Prepare - - $(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH))) -endif - - -# Bootstrap 1.17 - -define Download/golang-bootstrap-1.17 - FILE:=$(BOOTSTRAP_1_17_SOURCE) - URL:=$(BOOTSTRAP_1_17_SOURCE_URL) - HASH:=$(BOOTSTRAP_1_17_HASH) -endef -$(eval $(call Download,golang-bootstrap-1.17)) - -define Bootstrap-1.17/Prepare - mkdir -p "$(BOOTSTRAP_1_17_BUILD_DIR)" && $(BOOTSTRAP_1_17_UNPACK) ; -endef -Hooks/HostPrepare/Post+=Bootstrap-1.17/Prepare - -$(eval $(call GoCompiler/AddProfile,Bootstrap-1.17,$(BOOTSTRAP_1_17_BUILD_DIR),,bootstrap-1.17,$(GO_HOST_OS_ARCH))) - - -# Bootstrap 1.20 - -define Download/golang-bootstrap-1.20 - FILE:=$(BOOTSTRAP_1_20_SOURCE) - URL:=$(BOOTSTRAP_1_20_SOURCE_URL) - HASH:=$(BOOTSTRAP_1_20_HASH) -endef -$(eval $(call Download,golang-bootstrap-1.20)) - -define Bootstrap-1.20/Prepare - mkdir -p "$(BOOTSTRAP_1_20_BUILD_DIR)" && $(BOOTSTRAP_1_20_UNPACK) ; -endef -Hooks/HostPrepare/Post+=Bootstrap-1.20/Prepare - -$(eval $(call GoCompiler/AddProfile,Bootstrap-1.20,$(BOOTSTRAP_1_20_BUILD_DIR),,bootstrap-1.20,$(GO_HOST_OS_ARCH))) - -# Host - -ifeq ($(GO_HOST_PIE_SUPPORTED),1) - HOST_GO_ENABLE_PIE:=1 -endif - -# when using GO_LDFLAGS to set buildmode=pie, the PIE install suffix -# does not apply (we also delete the std lib during Host/Install) - -$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH),$(HOST_GO_INSTALL_SUFFIX))) - -HOST_GO_VARS= \ - GOHOSTARCH="$(GO_HOST_ARCH)" \ - GOCACHE="$(GO_BUILD_CACHE_DIR)" \ - GOENV=off \ - CC="$(HOSTCC_NOCACHE)" \ - CXX="$(HOSTCXX_NOCACHE)" - -define Host/Configure - $(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH)) - $(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH)) - - mkdir -p "$(GO_BUILD_CACHE_DIR)" -endef - -define Host/Compile - $(call GoCompiler/Bootstrap/Make, \ - $(HOST_GO_VARS) \ - ) - - $(call GoCompiler/Bootstrap-1.17/Make, \ - GOROOT_BOOTSTRAP="$(BOOTSTRAP_ROOT_DIR)" \ - $(HOST_GO_VARS) \ - ) - - $(call GoCompiler/Bootstrap-1.20/Make, \ - GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_17_BUILD_DIR)" \ - $(HOST_GO_VARS) \ - ) - - $(call GoCompiler/Host/Make, \ - GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_20_BUILD_DIR)" \ - $(if $(HOST_GO_ENABLE_PIE),GO_LDFLAGS="-buildmode pie") \ - $(HOST_GO_VARS) \ - ) -endef - -# if host and target os/arch are the same, -# when go compiles a program, it will use the host std lib -# so remove it now and force go to rebuild std for target later -define Host/Install - $(call Host/Uninstall) - - $(call GoCompiler/Host/Install/Bin,) - $(call GoCompiler/Host/Install/Src,) - - $(call GoCompiler/Host/Install/BinLinks,) - - rm -rf "$(HOST_GO_ROOT)/pkg/$(GO_HOST_OS_ARCH)$(if $(HOST_GO_INSTALL_SUFFIX),_$(HOST_GO_INSTALL_SUFFIX))" - - $(INSTALL_DIR) "$(HOST_GO_ROOT)/openwrt" - $(INSTALL_BIN) ./files/go-gcc-helper "$(HOST_GO_ROOT)/openwrt/" - $(LN) go-gcc-helper "$(HOST_GO_ROOT)/openwrt/gcc" - $(LN) go-gcc-helper "$(HOST_GO_ROOT)/openwrt/g++" -endef - -define Host/Uninstall - rm -rf "$(HOST_GO_ROOT)/openwrt" - - $(call GoCompiler/Host/Uninstall/BinLinks,) - - $(call GoCompiler/Host/Uninstall,) -endef - - -# Target - -ifeq ($(GO_PKG_ENABLE_PIE),1) - PKG_GO_INSTALL_SUFFIX:=$(GO_TARGET_PIE_INSTALL_SUFFIX) -endif - -$(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(PKG_GO_PREFIX),$(PKG_GO_VERSION_ID),$(GO_OS_ARCH),$(PKG_GO_INSTALL_SUFFIX))) - -PKG_GO_ZBOOTSTRAP_MODS:= \ - s/defaultGO386 = `[^`]*`/defaultGO386 = `$(or $(GO_386),sse2)`/; \ - s/defaultGOAMD64 = `[^`]*`/defaultGOAMD64 = `$(or $(GO_AMD64),v1)`/; \ - s/defaultGOARM = `[^`]*`/defaultGOARM = `$(or $(GO_ARM),7)`/; \ - s/defaultGOMIPS = `[^`]*`/defaultGOMIPS = `$(or $(GO_MIPS),hardfloat)`/; \ - s/defaultGOMIPS64 = `[^`]*`/defaultGOMIPS64 = `$(or $(GO_MIPS64),hardfloat)`/; \ - s/defaultGOPPC64 = `[^`]*`/defaultGOPPC64 = `$(or $(GO_PPC64),power8)`/; - -PKG_GO_ZBOOTSTRAP_PATH:=$(PKG_BUILD_DIR)/src/internal/buildcfg/zbootstrap.go - -PKG_GO_VARS= \ - GOHOSTARCH="$(GO_HOST_ARCH)" \ - GOCACHE="$(GO_BUILD_CACHE_DIR)" \ - GOENV=off \ - GO_GCC_HELPER_PATH="$$$$PATH" \ - CC=gcc \ - CXX=g++ \ - PKG_CONFIG=pkg-config \ - PATH="$(HOST_GO_ROOT)/openwrt:$$$$PATH" - -PKG_GO_GCFLAGS= \ - $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) - -PKG_GO_ASMFLAGS= \ - $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) - -PKG_GO_LDFLAGS= \ - -buildid '$(SOURCE_DATE_EPOCH)' \ - -linkmode external \ - -extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(TARGET_LDFLAGS))' \ - $(if $(CONFIG_NO_STRIP)$(CONFIG_DEBUG),,-s -w) - -PKG_GO_INSTALL_ARGS= \ - -buildvcs=false \ - -trimpath \ - -ldflags "all=$(PKG_GO_LDFLAGS)" \ - $(if $(PKG_GO_GCFLAGS),-gcflags "all=$(PKG_GO_GCFLAGS)") \ - $(if $(PKG_GO_ASMFLAGS),-asmflags "all=$(PKG_GO_ASMFLAGS)") \ - $(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie) - -define Build/Configure - mkdir -p "$(GO_BUILD_CACHE_DIR)" -endef - -define Build/Compile - @echo "Building target Go first stage" - - $(call GoCompiler/Package/Make, \ - GOROOT_BOOTSTRAP="$(HOST_GO_ROOT)" \ - GO_GCC_HELPER_CC="$(HOSTCC)" \ - GO_GCC_HELPER_CXX="$(HOSTCXX)" \ - $(PKG_GO_VARS) \ - ) - - $(SED) '$(PKG_GO_ZBOOTSTRAP_MODS)' "$(PKG_GO_ZBOOTSTRAP_PATH)" - - ( \ - if echo 'int main() { return 0; }' | $(TARGET_CC) -o $(PKG_BUILD_DIR)/test-ldso -x c - > /dev/null 2>&1; then \ - LDSO=$$$$( \ - readelf -l $(PKG_BUILD_DIR)/test-ldso | \ - sed -n -e 's/^.*interpreter: \(.*\)[]]/\1/p' \ - ) ; \ - fi ; \ - $(SED) "s,defaultGO_LDSO = \`[^\`]*\`,defaultGO_LDSO = \`$$$$LDSO\`," "$(PKG_GO_ZBOOTSTRAP_PATH)" ; \ - ) - - @echo "Building target Go second stage" - - ( \ - cd "$(PKG_BUILD_DIR)/bin" ; \ - export $(GO_PKG_TARGET_VARS) ; \ - $(CP) go go-host ; \ - GO_GCC_HELPER_CC="$(TARGET_CC)" \ - GO_GCC_HELPER_CXX="$(TARGET_CXX)" \ - $(PKG_GO_VARS) \ - ./go-host install -a $(PKG_GO_INSTALL_ARGS) std cmd ; \ - retval="$$$$?" ; \ - rm -f go-host ; \ - exit "$$$$retval" ; \ - ) -endef - -define Package/golang/install - $(call GoCompiler/Package/Install/Bin,$(1)$(PKG_GO_PREFIX)) - $(call GoCompiler/Package/Install/BinLinks,$(1)$(PKG_GO_PREFIX)) -endef - -define Package/golang-doc/install - $(call GoCompiler/Package/Install/Doc,$(1)$(PKG_GO_PREFIX)) -endef - -define Package/golang-src/install - $(call GoCompiler/Package/Install/Src,$(1)$(PKG_GO_PREFIX)) -endef - -# src/debug contains ELF executables as test data -# and they reference these libraries -# we need to call this in Package/$(1)/extra_provides -# to pass CheckDependencies in include/package-ipkg.mk -define Package/golang-src/extra_provides - echo 'libc.so.6' -endef - - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,golang)) -$(eval $(call BuildPackage,golang-doc)) -$(eval $(call BuildPackage,golang-src)) diff --git a/packages/lang/golang/golang/files/go-gcc-helper b/packages/lang/golang/golang/files/go-gcc-helper deleted file mode 100644 index b21457b5..00000000 --- a/packages/lang/golang/golang/files/go-gcc-helper +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2018, 2020 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -me=go-gcc-helper -name="${0##*/}" - -log() { - # shellcheck disable=SC2039 - local IFS=" " - printf '%s\n' "$me: $*" -} - -case "$name" in -gcc) - if [ -z "$GO_GCC_HELPER_CC" ]; then - log "missing GO_GCC_HELPER_CC" - exit 1 - fi - cmd="$GO_GCC_HELPER_CC" - ;; -g++) - if [ -z "$GO_GCC_HELPER_CXX" ]; then - log "missing GO_GCC_HELPER_CXX" - exit 1 - fi - cmd="$GO_GCC_HELPER_CXX" - ;; -*) - log "unknown command \"$name\"" - exit 1 - ;; -esac - -if [ -n "$GO_GCC_HELPER_PATH" ]; then - export PATH="$GO_GCC_HELPER_PATH" -else - log "missing GO_GCC_HELPER_PATH" -fi - -log "running $cmd $*" - -$cmd "$@" diff --git a/packages/lang/golang/golang/test.sh b/packages/lang/golang/golang/test.sh deleted file mode 100644 index 114b427e..00000000 --- a/packages/lang/golang/golang/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -[ "$1" = golang ] || exit 0 - -go version | grep -F " go$PKG_VERSION " diff --git a/packages/lang/json4lua/Makefile b/packages/lang/json4lua/Makefile deleted file mode 100644 index 6a4f8af7..00000000 --- a/packages/lang/json4lua/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=json4lua -PKG_VERSION:=0.9.54 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/amrhassan/json4lua/tar.gz/$(PKG_VERSION)? -PKG_HASH:=2498e5224b024521af7f2de9a2c2af4028cd8da4b724ffd6bd94beede2402cfe - -PKG_MAINTAINER:=Amr Hassan -PKG_LICENSE:=MIT - -LUA_MODULE_PATH:=/usr/lib/lua - -include $(INCLUDE_DIR)/package.mk - -define Package/json4lua - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=json4lua - URL:=https://github.com/amrhassan/json4lua - DEPENDS:=+lua +luasocket - PKGARCH:=all -endef - -define Package/json4lua/description - JSON and JSONRPC for Lua -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/json4lua/install - $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/json - $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/json.lua $(1)/$(LUA_MODULE_PATH)/json.lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/rpc.lua $(1)/$(LUA_MODULE_PATH)/json/rpc.lua -endef - -$(eval $(call BuildPackage,json4lua)) diff --git a/packages/lang/ldbus/Makefile b/packages/lang/ldbus/Makefile deleted file mode 100644 index b5ba07b4..00000000 --- a/packages/lang/ldbus/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2006-2017 OpenWrt.org -# -# This is free software, licensed under the GPL 2 license. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ldbus -PKG_SOURCE_DATE:=2019-08-15 -PKG_SOURCE_VERSION:=9e176fe851006037a643610e6d8f3a8e597d4073 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/daurnimator/ldbus -PKG_MIRROR_HASH:=6a17564734b9cd3a9c4713777b8219c5e08252be3fd6ba9f9aecbf109d1ed899 - -PKG_MAINTAINER:=Enrico Mioso -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=luarocks/host -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/ldbus - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=ldbus Lua DBus bindings - URL:=https://github.com/daurnimator/ldbus - DEPENDS:=+dbus +lua -endef - -define Package/ldbus/description - This package contains "ldbus": LUA bindings to interact with the DBUS - message bus system, and services connected to it. - See https://github.com/daurnimator/ldbus - for details. -endef - -define Build/Compile - cd $(PKG_BUILD_DIR) && \ - luarocks make --pack-binary-rock ldbus-scm-0.rockspec \ - LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ - LUA_PKGNAME=lua5.1 \ - DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \ - DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \ - DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \ - CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ - LDFLAGS="$(TARGET_LDFLAGS)" -endef - -define Package/ldbus/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,ldbus)) diff --git a/packages/lang/linotify/Makefile b/packages/lang/linotify/Makefile deleted file mode 100644 index 17be2b2c..00000000 --- a/packages/lang/linotify/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# This is free software, licensed under your choice of the following SPDX identifiers: -# Apache-2.0, BSD-2-Clause, CC-BY-4.0, ISC, MIT, X11 or GPL-2.0-or-later - -include $(TOPDIR)/rules.mk - -PKG_NAME:=linotify -PKG_VERSION:=0.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL=https://codeload.github.com/hoelzro/$(PKG_NAME)/tar.gz/$(PKG_VERSION)? -PKG_HASH:=21d005f16043397a85913a7d14a267716d6384f0228718d5de464bfc0274e338 - -PKG_MAINTAINER:=Karl Palsson -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYRIGHT - -include $(INCLUDE_DIR)/package.mk - -define Package/linotify - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=inotify binding for lua - DEPENDS:=+lua - URL:=https://github.com/hoelzro/linotify -endef - -define Package/linotify/description - This provides a lua binding to the inotify file system change notification system -endef - -define Build/Compile - cd $(PKG_BUILD_DIR) && \ - $(TARGET_CC) -o inotify.so -shared $(FPIC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) linotify.c -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/inotify.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,linotify)) diff --git a/packages/lang/lpeg/Makefile b/packages/lang/lpeg/Makefile deleted file mode 100644 index 896b70b5..00000000 --- a/packages/lang/lpeg/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lpeg -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.inf.puc-rio.br/~roberto/lpeg/ -PKG_HASH:=48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe - -include $(INCLUDE_DIR)/package.mk - -define Package/lpeg - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LPeg - URL:=http://www.inf.puc-rio.br/~roberto/lpeg/ - DEPENDS:=+lua -endef - -define Package/lpeg/description - LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs) -endef - -define Build/Configure -endef - -# add make variable overrides here -MAKE_FLAGS += \ - COPT="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -O2" - -define Package/lpeg/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lpeg.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lpeg)) diff --git a/packages/lang/lua-argparse/Makefile b/packages/lang/lua-argparse/Makefile deleted file mode 100644 index 4c77dd6c..00000000 --- a/packages/lang/lua-argparse/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2006-2020 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-argparse -PKG_VERSION:=0.6.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/mpeterv/argparse/tar.gz/$(PKG_VERSION)? -PKG_HASH:=0eddda29d591536bc7310b99ce7acc3e5e00557f18d6e63ab10d56683e8952f1 -PKG_BUILD_DIR:=$(BUILD_DIR)/argparse-$(PKG_VERSION) - -PKG_MAINTAINER:=Vladimir Malyutin -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-argparse - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=lua-argparse - URL:=https://github.com/mpeterv/argparse - DEPENDS:=+lua - PKGARCH:=all -endef - -define Package/lua-argparse/description - Argparse is a feature-rich command line parser for Lua inspired by argparse for Python. -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/lua-argparse/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/argparse.lua $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-argparse)) diff --git a/packages/lang/lua-bencode/Makefile b/packages/lang/lua-bencode/Makefile deleted file mode 100644 index 3edee239..00000000 --- a/packages/lang/lua-bencode/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 20013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-bencode -PKG_VERSION:=2.2.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/ -PKG_HASH:=25830ff3fe342c09c65995d46c4d89ad0387cc502b1a2f70f9cca2d8c7ccafdd - -PKG_MAINTAINER:=Lars Gierth -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-bencode - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=lua-bencode - URL:=https://bitbucket.org/wilhelmy/lua-bencode - DEPENDS:=+lua - PKGARCH:=all -endef - -define Package/lua-bencode/description - This is a module for the lua programming language for decoding and encoding - bencoded data which can be used to read and write torrent files for bittorrent. -endef - -define Build/Configure -endef - -define Build/Compile -endef - - -define Package/lua-bencode/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/bencode.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-bencode)) diff --git a/packages/lang/lua-bit32/Makefile b/packages/lang/lua-bit32/Makefile deleted file mode 100644 index da4ae876..00000000 --- a/packages/lang/lua-bit32/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-bit32 -PKG_VERSION:=5.3.0 -PKG_RELEASE:=1 - - -PKG_SRC_NAME:=lua-compat-5.2 -PKG_SRC_VERSION:=0.3 -PKG_SOURCE_URL=https://codeload.github.com/keplerproject/$(PKG_SRC_NAME)/tar.gz/v$(PKG_SRC_VERSION)? -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=627e842c488c1afece4383da9f9a839a7ddbc2f7fedfc456f76e3a590d4ca67f -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SRC_NAME)-$(PKG_SRC_VERSION) - -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=luarocks/host - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-bit32 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua 5.2 bit manipulation library - DEPENDS:=+lua -endef - -define Package/lua-bit32/description - lua-bit32 is the native Lua 5.2 bit manipulation library, - backported to Lua 5.1 -endef - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include - -define Build/Compile - cd $(PKG_BUILD_DIR) && \ - luarocks make --pack-binary-rock bit32-scm-1.rockspec \ - LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ - LUA_PKGNAME=lua5.1 \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC)" LD="$(TARGET_CC)" -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit32.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-bit32)) diff --git a/packages/lang/lua-cjson/Makefile b/packages/lang/lua-cjson/Makefile deleted file mode 100644 index 9f76b886..00000000 --- a/packages/lang/lua-cjson/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-cjson -PKG_VERSION:=2.1.0 -PKG_RELEASE:=3 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://kyne.au/~mark/software/download/ -PKG_HASH:=51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778 - -HOST_BUILD_DEPENDS:=lua/host - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lua-cjson - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua CJSON parser - URL:=https://github.com/mpx/lua-cjson - DEPENDS:= +lua -endef - -define Package/lua-cjson/description - Lua CJSON is a fast JSON encoding/parsing module for Lua. -endef - -CMAKE_OPTIONS += \ - -DUSE_LUA=ON - -CMAKE_HOST_OPTIONS += \ - -DLUA_MATH_LIBRARY=m - -define Package/lua-cjson/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/ - - $(INSTALL_DIR) $(1)/usr/lib/lua/cjson - $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,lua-cjson)) diff --git a/packages/lang/lua-copas/Makefile b/packages/lang/lua-copas/Makefile deleted file mode 100644 index 527ec525..00000000 --- a/packages/lang/lua-copas/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-copas -PKG_VERSION:=2.0.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=copas-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/copas/tar.gz/$(PKG_VERSION)? -PKG_HASH:=1469eaf987513f5a9a0bee345c040c8fa30ca6194bc75ad78171362f9904cf3e -PKG_BUILD_DIR:=$(BUILD_DIR)/copas-$(PKG_VERSION) - -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-copas - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-Copas - URL:=https://github.com/keplerproject/copas - DEPENDS:=+lua -endef - -define Package/lua-copas/description - Copas is a dispatcher based on coroutines that can be used by TCP/IP servers. -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - T="$(BUILD_VARIANT)" \ - PREFIX="$(PKG_INSTALL_DIR)/usr" \ - install -endef - -define Package/lua-copas/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas.lua $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/ftp.lua $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/smtp.lua $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/http.lua $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/limit.lua $(1)/usr/lib/lua/copas -endef - -$(eval $(call BuildPackage,lua-copas)) diff --git a/packages/lang/lua-coxpcall/Makefile b/packages/lang/lua-coxpcall/Makefile deleted file mode 100644 index c9345df4..00000000 --- a/packages/lang/lua-coxpcall/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-coxpcall -PKG_VERSION:=1.17.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=e037c1aa1d2a2b213fca144d86cd5b5cf2cd77cec6d8f52d056add7ea806f0dc -PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=ea22f44e490430e40217f0792bf82eaeaec51903 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-coxpcall - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-Coxpcall - URL:=https://github.com/keplerproject/coxpcall - DEPENDS:=+lua -endef - -define Package/lua-coxpcall/description - Coxpcall encapsulates the protected calls with a coroutine based loop, - so errors can be dealed without the usual pcall/xpcall issues with coroutines. -endef - -TARGET_CFLAGS += $(FPIC) -# add make variable overrides here -MAKE_FLAGS += - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - T="$(BUILD_VARIANT)" \ - LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - install -endef - -define Package/lua-coxpcall/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-coxpcall)) diff --git a/packages/lang/lua-coxpcall/patches/config.patch b/packages/lang/lua-coxpcall/patches/config.patch deleted file mode 100644 index b96455a7..00000000 --- a/packages/lang/lua-coxpcall/patches/config.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /dev/null -+++ b/config -@@ -0,0 +1 @@ -+LUA_DIR ?=$(DESTDIR)/usr/lib/lua diff --git a/packages/lang/lua-cs-bouncer/Makefile b/packages/lang/lua-cs-bouncer/Makefile deleted file mode 100644 index 3f8f7593..00000000 --- a/packages/lang/lua-cs-bouncer/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (C) 2021-2022 Gerald Kerma -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-cs-bouncer -PKG_SOURCE_DATE:=2022-01-18 -PKG_SOURCE_VERSION:=e0f68b1265c386715c1d6ab79fe9063c0a9e3d3a -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/crowdsecurity/$(PKG_NAME)/tar.gz/$(PKG_SOURCE_VERSION)? -PKG_HASH:=c7e92cc9dc023ebcd84f3632d6cf0e38a7d9f5e7bba15367247753a306b89829 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Gerald Kerma - -HOST_BUILD_DEPENDS:=lua/host -PKG_BUILD_DEPENDS:=luarocks/host - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/lua-cs-bouncer - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua Crowdsec Bouncer module - URL:=https://github.com/crowdsecurity/lua-cs-bouncer - DEPENDS:=+lua \ - +luasec -endef - -define Package/lua-cs-bouncer/description - Lua module to allow ip (or not) from CrowdSec API. -endef - -define Build/Compile -endef - -define Package/lua-cs-bouncer/install - $(INSTALL_DIR) $(1)/usr/lib/lua/crowdsec - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/lib/*.lua \ - $(1)/usr/lib/lua/crowdsec/ - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/template.conf \ - $(1)/usr/lib/lua/crowdsec/crowdsec.conf - - $(INSTALL_DIR) $(1)/usr/lib/crowdsec/lua/plugins/crowdsec - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/nginx/config.lua \ - $(1)/usr/lib/crowdsec/lua/plugins/crowdsec/ - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/nginx/crowdsec.lua \ - $(1)/usr/lib/crowdsec/lua/ - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/nginx/recaptcha.lua \ - $(1)/usr/lib/crowdsec/lua/ - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/nginx/access.lua \ - $(1)/usr/lib/crowdsec/lua/ - - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_BIN) \ - ./files/lua-cs-bouncer.defaults \ - $(1)/etc/uci-defaults/99_lua-cs-bouncer -endef - -define Package/lua-cs-bouncer/conffiles -/usr/lib/lua/crowdsec/crowdsec.conf -endef - -$(eval $(call BuildPackage,lua-cs-bouncer)) diff --git a/packages/lang/lua-cs-bouncer/files/lua-cs-bouncer.defaults b/packages/lang/lua-cs-bouncer/files/lua-cs-bouncer.defaults deleted file mode 100644 index 12e4a998..00000000 --- a/packages/lang/lua-cs-bouncer/files/lua-cs-bouncer.defaults +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -CONFIG=/usr/lib/lua/crowdsec/crowdsec.conf -## Gen&ConfigApiKey -if grep -q "{API_KEY}" "$CONFIG"; then - SUFFIX=`tr -dc A-Za-z0-9 -endef - -MAKE_FLAGS += \ - UNAME="Linux" - -define Package/lua-curl-v3/description - Lua bindings to libcurl (Lua-cURLv3) -endef - -define Package/lua-curl-v3/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lcurl.so $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/src/lua/* $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-curl-v3)) - diff --git a/packages/lang/lua-eco/Makefile b/packages/lang/lua-eco/Makefile deleted file mode 100644 index ac2e6f66..00000000 --- a/packages/lang/lua-eco/Makefile +++ /dev/null @@ -1,217 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-eco -PKG_VERSION:=3.6.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL=https://github.com/zhaojh329/lua-eco/releases/download/v$(PKG_VERSION) -PKG_HASH:=0fdcd8eb9e93f2d1f0ff2132298faae2e13a8bfd676bd91db4d53e48917d6a74 - -PKG_MAINTAINER:=Jianhui Zhao -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_CONFIG_DEPENDS:= \ - LUA_ECO_OPENSSL \ - LUA_ECO_WOLFSSL \ - LUA_ECO_MBEDTLS - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lua-eco - TITLE:=A Lua interpreter with a built-in libev event loop - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Lua - URL:=https://github.com/zhaojh329/lua-eco - DEPENDS:=+libev +liblua5.3 -endef - -define Package/lua-eco/description - Lua-eco is a Lua interpreter with a built-in event loop for scheduling - lightweight coroutines automatically, enabling efficient concurrency in - Lua. Build high-performance, scalable applications. -endef - -define Package/lua-eco/Module - TITLE:=$1 support for lua-eco - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Lua - URL:=https://github.com/zhaojh329/lua-eco - DEPENDS:=+lua-eco $2 -endef - -Package/lua-eco-log=$(call Package/lua-eco/Module,log utils) -Package/lua-eco-base64=$(call Package/lua-eco/Module,base64) -Package/lua-eco-sha1=$(call Package/lua-eco/Module,sha1) -Package/lua-eco-md5=$(call Package/lua-eco/Module,md5) -Package/lua-eco-socket=$(call Package/lua-eco/Module,socket) -Package/lua-eco-dns=$(call Package/lua-eco/Module,dns,+lua-eco-socket) -Package/lua-eco-ssl=$(call Package/lua-eco/Module,ssl,\ - +LUA_ECO_OPENSSL:libopenssl +LUA_ECO_WOLFSSL:libwolfssl \ - +LUA_ECO_MBEDTLS:libmbedtls +LUA_ECO_MBEDTLS:zlib +lua-eco-socket) -Package/lua-eco-ubus=$(call Package/lua-eco/Module,ubus,+libubus) -Package/lua-eco-http=$(call Package/lua-eco/Module,http/https,+lua-eco-dns +lua-eco-ssl +lua-eco-base64 +lua-eco-log) -Package/lua-eco-mqtt=$(call Package/lua-eco/Module,mqtt,+lua-eco-socket +lua-eco-ssl) -Package/lua-eco-websocket=$(call Package/lua-eco/Module,websocket,+lua-eco-http +lua-eco-base64 +lua-eco-sha1) -Package/lua-eco-termios=$(call Package/lua-eco/Module,termios) -Package/lua-eco-netlink=$(call Package/lua-eco/Module,netlink,+lua-eco-socket) -Package/lua-eco-ip=$(call Package/lua-eco/Module,ip utils,+lua-eco-netlink) -Package/lua-eco-nl80211=$(call Package/lua-eco/Module,nl80211,+lua-eco-netlink) -Package/lua-eco-ssh=$(call Package/lua-eco/Module,ssh,+lua-eco-socket +libssh2) -Package/lua-eco-packet=$(call Package/lua-eco/Module,packet,+lua-eco-nl80211) - -define Package/lua-eco-ssl/config - choice - prompt "SSL Library" - default LUA_ECO_MBEDTLS - - config LUA_ECO_OPENSSL - bool "OpenSSL" - - config LUA_ECO_WOLFSSL - bool "wolfSSL" - - config LUA_ECO_MBEDTLS - bool "mbedTLS" - endchoice -endef - -CMAKE_OPTIONS += \ - -DECO_UBUS_SUPPORT=O$(if $(CONFIG_PACKAGE_lua-eco-ubus),N,FF) \ - -DECO_SSL_SUPPORT=O$(if $(CONFIG_PACKAGE_lua-eco-ssl),N,FF) - -ifneq ($(CONFIG_PACKAGE_lua-eco-ssl),) - ifneq ($(CONFIG_LUA_ECO_OPENSSL),) - CMAKE_OPTIONS += -DUSE_OPENSSL=ON - else ifneq ($(CONFIG_LUA_ECO_WOLFSSL),) - CMAKE_OPTIONS += -DUSE_WOLFSSL=ON - else ifneq ($(CONFIG_LUA_ECO_MBEDTLS),) - CMAKE_OPTIONS += -DUSE_MBEDTLS=ON - endif -endif - -define Package/lua-eco/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/local/lib/lua/5.3/eco/core \ - $(1)/usr/lib $(1)/usr/local/lib/lua/5.3/eco/encoding - $(INSTALL_BIN) $(PKG_BUILD_DIR)/eco $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/libeco.so $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bufio.so $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hex.lua $(1)/usr/local/lib/lua/5.3/eco/encoding - $(INSTALL_BIN) $(PKG_BUILD_DIR)/{time,bufio,sys,file}.so $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_DATA) $(PKG_BUILD_DIR)/{time,sys,file,sync}.lua $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-log/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/log.so $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-base64/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/encoding - $(INSTALL_BIN) $(PKG_BUILD_DIR)/base64.so $(1)/usr/local/lib/lua/5.3/eco/encoding -endef - -define Package/lua-eco-sha1/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/hash - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sha1.so $(1)/usr/local/lib/lua/5.3/eco/hash -endef - -define Package/lua-eco-md5/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/hash - $(INSTALL_BIN) $(PKG_BUILD_DIR)/md5.so $(1)/usr/local/lib/lua/5.3/eco/hash -endef - -define Package/lua-eco-socket/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_DATA) $(PKG_BUILD_DIR)/socket.lua $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/socket.so $(1)/usr/local/lib/lua/5.3/eco/core -endef - -define Package/lua-eco-dns/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_DATA) $(PKG_BUILD_DIR)/dns.lua $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-ssl/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_DATA) $(PKG_BUILD_DIR)/ssl.lua $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssl.so $(1)/usr/local/lib/lua/5.3/eco/core -endef - -define Package/lua-eco-ubus/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_DATA) $(PKG_BUILD_DIR)/ubus.lua $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ubus.so $(1)/usr/local/lib/lua/5.3/eco/core -endef - -define Package/lua-eco-http/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/http - $(INSTALL_DATA) $(PKG_BUILD_DIR)/http/*.lua $(1)/usr/local/lib/lua/5.3/eco/http -endef - -define Package/lua-eco-mqtt/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_DATA) $(PKG_BUILD_DIR)/mqtt.lua $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-websocket/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_DATA) $(PKG_BUILD_DIR)/websocket.lua $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-termios/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/termios.so $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-netlink/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_DATA) $(PKG_BUILD_DIR)/{nl,genl}.lua $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/{nl,genl}.so $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_BIN) $(PKG_BUILD_DIR)/rtnl.so $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-ip/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_DATA) $(PKG_BUILD_DIR)/ip.lua $(1)/usr/local/lib/lua/5.3/eco -endef - -define Package/lua-eco-nl80211/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_DATA) $(PKG_BUILD_DIR)/nl80211.lua $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/nl80211.so $(1)/usr/local/lib/lua/5.3/eco/core -endef - -define Package/lua-eco-ssh/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core - $(INSTALL_DATA) $(PKG_BUILD_DIR)/ssh.lua $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssh.so $(1)/usr/local/lib/lua/5.3/eco/core -endef - -define Package/lua-eco-packet/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco - $(INSTALL_DATA) $(PKG_BUILD_DIR)/packet.lua $(1)/usr/local/lib/lua/5.3/eco -endef - -$(eval $(call BuildPackage,lua-eco)) -$(eval $(call BuildPackage,lua-eco-log)) -$(eval $(call BuildPackage,lua-eco-base64)) -$(eval $(call BuildPackage,lua-eco-sha1)) -$(eval $(call BuildPackage,lua-eco-md5)) -$(eval $(call BuildPackage,lua-eco-socket)) -$(eval $(call BuildPackage,lua-eco-dns)) -$(eval $(call BuildPackage,lua-eco-ssl)) -$(eval $(call BuildPackage,lua-eco-ubus)) -$(eval $(call BuildPackage,lua-eco-http)) -$(eval $(call BuildPackage,lua-eco-mqtt)) -$(eval $(call BuildPackage,lua-eco-websocket)) -$(eval $(call BuildPackage,lua-eco-termios)) -$(eval $(call BuildPackage,lua-eco-netlink)) -$(eval $(call BuildPackage,lua-eco-ip)) -$(eval $(call BuildPackage,lua-eco-nl80211)) -$(eval $(call BuildPackage,lua-eco-ssh)) -$(eval $(call BuildPackage,lua-eco-packet)) diff --git a/packages/lang/lua-ev/Makefile b/packages/lang/lua-ev/Makefile deleted file mode 100644 index 7a6a3fb3..00000000 --- a/packages/lang/lua-ev/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (C) 2019 Jianhui Zhao -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-ev -PKG_VERSION:=1.5 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/brimworks/lua-ev/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=26ac116722a241bf59daf5315ce0ffe751c1babea9a146ffc0a389f1af3facca - -PKG_MAINTAINER:=Jianhui Zhao -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lua-ev - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=lua-ev - URL:=https://github.com/brimworks/lua-ev - DEPENDS:=+lua +libev -endef - -define Package/lua-ev/description - Lua integration with libev. -endef - -define Package/lua-ev/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/lua/cmod/ev.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-ev)) diff --git a/packages/lang/lua-ffi/Makefile b/packages/lang/lua-ffi/Makefile deleted file mode 100644 index b31e769b..00000000 --- a/packages/lang/lua-ffi/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-ffi -PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL=https://github.com/zhaojh329/lua-ffi/releases/download/v$(PKG_VERSION) -PKG_HASH:=e26a8ed685c1aa31566683e3c06b057fd9ae6c7eec9922abe7661eeb678f1cd8 - -PKG_MAINTAINER:=Jianhui Zhao -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lua-ffi/default - TITLE:=A portable lightweight C FFI for $(1), based on libffi - CATEGORY:=Languages - SECTION:=lang - SUBMENU:=Lua - DEPENDS:=+libffi - URL:=https://github.com/zhaojh329/lua-ffi -endef - -define Package/lua-ffi/default/description - Lua-ffi is a portable lightweight C FFI for Lua, based on libffi - and aiming to be mostly compatible with LuaJIT FFI, but written - from scratch in C language. -endef - -define Package/lua-ffi - $(call Package/lua-ffi/default,lua5.1) - DEPENDS+=+liblua - VARIANT:=lua51 -endef - -define Package/lua-ffi-lua5.3 - $(call Package/lua-ffi/default,lua5.3) - DEPENDS+=+liblua5.3 - VARIANT:=lua53 -endef - -define Package/lua-ffi-lua5.4 - $(call Package/lua-ffi/default,lua5.4) - DEPENDS+=+liblua5.4 - VARIANT:=lua54 -endef - -Package/lua-ffi/description = $(Package/lua-ffi/default/description) -Package/lua-ffi-lua5.3/description = $(Package/lua-ffi/default/description) -Package/lua-ffi-lua5.4/description = $(Package/lua-ffi/default/description) - -ifeq ($(BUILD_VARIANT),lua51) - CMAKE_OPTIONS += -DLUA_INCLUDE_DIR="$(STAGING_DIR)/usr/include" -endif - -ifeq ($(BUILD_VARIANT),lua53) - CMAKE_OPTIONS += -DLUA_INCLUDE_DIR="$(STAGING_DIR)/usr/include/lua5.3" -endif - -ifeq ($(BUILD_VARIANT),lua54) - CMAKE_OPTIONS += -DLUA_INCLUDE_DIR="$(STAGING_DIR)/usr/include/lua5.4" -endif - -define Package/lua-ffi/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ffi.so $(1)/usr/lib/lua -endef - -define Package/lua-ffi-lua5.3/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3 - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ffi.so $(1)/usr/local/lib/lua/5.3 -endef - -define Package/lua-ffi-lua5.4/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.4 - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ffi.so $(1)/usr/local/lib/lua/5.4 -endef - -$(eval $(call BuildPackage,lua-ffi)) -$(eval $(call BuildPackage,lua-ffi-lua5.3)) -$(eval $(call BuildPackage,lua-ffi-lua5.4)) diff --git a/packages/lang/lua-libmodbus/Makefile b/packages/lang/lua-libmodbus/Makefile deleted file mode 100644 index 05275671..00000000 --- a/packages/lang/lua-libmodbus/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-libmodbus -PKG_VERSION:=0.7 -PKG_RELEASE:=1 - -PKG_SOURCE:=lua-libmodbus-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=lua-libmodbus-$(PKG_VERSION) -PKG_SOURCE_URL:=https://codeload.github.com/etactica/lua-libmodbus/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=70369f4c4e36421095bf00dcee36c633b4284eaa79bcfdfd230bfefb27acefda -PKG_SOURCE_VERSION:=v$(PKG_VERSION) - -PKG_MAINTAINER:=Karl Palsson -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-libmodbus - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=lua-libmodbus - URL:=https://github.com/etactica/lua-libmodbus - DEPENDS:=+liblua +libmodbus -endef - -define Package/lua-libmodbus/description - lua-libmodbus is a binding to libmodbus, - see also http://www.libmodbus.org -endef - -define Build/Configure -endef - -define Package/lua-libmodbus/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/libmodbus.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-libmodbus)) diff --git a/packages/lang/lua-lsqlite3/Makefile b/packages/lang/lua-lsqlite3/Makefile deleted file mode 100644 index 7a31424c..00000000 --- a/packages/lang/lua-lsqlite3/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lsqlite3 -PKG_VERSION:=0.9.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=lsqlite3_fsl09y.zip -PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/ -PKG_HASH:=d38402aa7640055d260c1246c36e6d6d31b425a25a805431f13695694466b722 - -PKG_LICENSE:=MIT -PKG_MAINTAINER:=Oskari Rauta - -PKG_BUILD_DIR:=$(BUILD_DIR)/lsqlite3-$(BUILD_VARIANT)/$(basename $(PKG_SOURCE)) - -include $(INCLUDE_DIR)/package.mk - -define Package/lsqlite3/default - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua wrapper for the SQLite3 library - URL:=http://lua.sqlite.org - DEPENDS:=+libsqlite3 -endef - -define Package/lsqlite3 - $(Package/lsqlite3/default) - DEPENDS+=+liblua - VARIANT:=lua-51 -endef - -define Package/lsqlite3-lua5.3 - $(Package/lsqlite3/default) - DEPENDS+=+liblua5.3 - VARIANT:=lua-53 -endef - -define Package/lsqlite3/default/description - LuaSQLite3 is a thin wrapper around the public domain SQLite3 database engine. -endef - -Package/lsqlite3/description = $(Package/lsqlite3/default/description) -Package/lsqlite3-lua5.3/description = $(Package/lsqlite3/default/description) - -TARGET_CFLAGS += $(FPIC) -std=gnu99 -TARGET_CPPFLAGS += -DLUA_USE_LINUX -TARGET_LDFLAGS += -lsqlite3 -lpthread - -ifeq ($(BUILD_VARIANT),lua-53) - TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/lua5.3 -endif - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ - -c $(PKG_BUILD_DIR)/lsqlite3.c \ - -o $(PKG_BUILD_DIR)/lsqlite3.o \ - -DLSQLITE_VERSION=\"$(PKG_VERSION)\" - $(TARGET_CC) $(TARGET_LDFLAGS) -shared \ - $(PKG_BUILD_DIR)/lsqlite3.o \ - -o $(PKG_BUILD_DIR)/lsqlite3.so -endef - -define Package/lsqlite3/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/lua/ -endef - -define Package/lsqlite3-lua5.3/install - $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3 - $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/local/lib/lua/5.3 -endef - -$(eval $(call BuildPackage,lsqlite3)) -$(eval $(call BuildPackage,lsqlite3-lua5.3)) diff --git a/packages/lang/lua-lzlib/Makefile b/packages/lang/lua-lzlib/Makefile deleted file mode 100644 index bf84a511..00000000 --- a/packages/lang/lua-lzlib/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-lzlib -PKG_VERSION:=0.4.3 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=b6ef5e3f04b7f2137b39931a175ee802489a2486e70537770919bcccca10e723 -PKG_SOURCE_URL:=https://github.com/LuaDist/lzlib.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=79329a07d8f79c19eadd7ea2752b4c4e1574b015 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-lzlib - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua zlib binding - URL:=http://github.com/LuaDist/lzlib - DEPENDS:= +lua +zlib -endef - -define Package/lua-lzlib/description - A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package. -endef - -MAKE_FLAGS += \ - LUA="$(STAGING_DIR)/usr" \ - OFLAGS="$(TARGET_CFLAGS)" \ - -define Package/lua-lzlib/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/zlib.so $(1)/usr/lib/lua/ - - $(INSTALL_DATA) $(PKG_BUILD_DIR)/gzip.lua $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-lzlib)) diff --git a/packages/lang/lua-lzlib/patches/001-allow_optim_flags.patch b/packages/lang/lua-lzlib/patches/001-allow_optim_flags.patch deleted file mode 100644 index 78f981d2..00000000 --- a/packages/lang/lua-lzlib/patches/001-allow_optim_flags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -14,7 +14,8 @@ LUABIN= $(LUA)/bin - ZLIB=../zlib-1.2.3 - - # no need to change anything below here --CFLAGS= $(INCS) $(DEFS) $(WARN) -O0 -fPIC -+CFLAGS= $(INCS) $(DEFS) $(WARN) $(OFLAGS) -fPIC -+OFLAGS= -O0 - WARN= -g -Werror -Wall -pedantic #-ansi - INCS= -I$(LUAINC) -I$(ZLIB) - LIBS= -L$(ZLIB) -lz -L$(LUALIB) -L$(LUABIN) #-llua51 diff --git a/packages/lang/lua-maxminddb/Makefile b/packages/lang/lua-maxminddb/Makefile deleted file mode 100644 index 60c59943..00000000 --- a/packages/lang/lua-maxminddb/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-only -# -# Copyright (C) 2020 jerryk -# Copyright (C) 2021 ImmortalWrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-maxminddb -PKG_VERSION:=0.2 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/fabled/lua-maxminddb.git -PKG_SOURCE_DATE:=2019-03-14 -PKG_SOURCE_VERSION:=93da9f4e6c814c3a23044dd2cdd22d4a6b4f665b -PKG_MIRROR_HASH:=e70dd8843c3688b58f66fff5320a93d5789b79114bcb36a94d5b554664439f04 - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-maxminddb - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=libmaxminddb bindings for lua - URL:=https://github.com/fabled/lua-maxminddb - DEPENDS:=+lua +libmaxminddb -endef - -TARGET_CFLAGS += $(FPIC) - -MAKE_VARS += LUA_PKG=lua - -define Package/lua-maxminddb/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/maxminddb.so $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-maxminddb)) diff --git a/packages/lang/lua-md5/Makefile b/packages/lang/lua-md5/Makefile deleted file mode 100644 index f4bb3e1c..00000000 --- a/packages/lang/lua-md5/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-md5 -PKG_VERSION:=1.3 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=675b8ba144d14cbe66abfd360d9a8861a18d5b69966768d6cdc78ca3c9fe0baf -PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=2a98633d7587a4900cfa7cbed340f377f4acd930 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-md5 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-MD5 - URL:=https://github.com/keplerproject/md5 - DEPENDS:=+lua -endef - -define Package/lua-md5/description - MD5 offers basic cryptographic facilities for Lua -endef - -TARGET_CFLAGS += $(FPIC) - -# add make variable overrides here -MAKE_FLAGS += - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - PREFIX="$(STAGING_DIR)/usr" \ - LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \ - clean - $(MAKE) -C $(PKG_BUILD_DIR) \ - PREFIX="$(STAGING_DIR)/usr" \ - LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \ - LIB_OPTION="-shared" \ - CC="$(TARGET_CROSS)gcc" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - all -endef - -define Build/Install - mkdir -p $(PKG_INSTALL_DIR)/usr/lib/lua - $(MAKE) -C $(PKG_BUILD_DIR) \ - LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - install -endef - -define Package/lua-md5/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/md5.lua $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/lib/lua/md5 - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/core.so $(1)/usr/lib/lua/md5/core.so -endef - -$(eval $(call BuildPackage,lua-md5)) diff --git a/packages/lang/lua-md5/patches/config.patch b/packages/lang/lua-md5/patches/config.patch deleted file mode 100644 index 4c950376..00000000 --- a/packages/lang/lua-md5/patches/config.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/config -+++ b/config -@@ -1,16 +1,16 @@ - # Installation directories - - # Default prefix --PREFIX = /usr/local -+PREFIX = /usr - - # Lua version - LUA_SYS_VER ?= 5.2 - - # System's libraries directory (where binary libraries are installed) --LUA_LIBDIR= $(PREFIX)/lib/lua/$(LUA_SYS_VER) -+LUA_LIBDIR= $(PREFIX)/lib/lua - - # System's lua directory (where Lua libraries are installed) --LUA_DIR= $(PREFIX)/share/lua/$(LUA_SYS_VER) -+LUA_DIR= $(PREFIX)/share/lua - - # Lua includes directory - LUA_INC= $(PREFIX)/include diff --git a/packages/lang/lua-md5/patches/makefile.patch b/packages/lang/lua-md5/patches/makefile.patch deleted file mode 100644 index 0f0f709c..00000000 --- a/packages/lang/lua-md5/patches/makefile.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,6 @@ - # $Id: Makefile,v 1.7 2007/10/11 00:02:56 carregal Exp $ - --CONFIG= ./config -+CFLAGS+= -fPIC - - include $(CONFIG) - diff --git a/packages/lang/lua-mobdebug/Makefile b/packages/lang/lua-mobdebug/Makefile deleted file mode 100644 index b1c387d4..00000000 --- a/packages/lang/lua-mobdebug/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-mobdebug -PKG_VERSION:=0.70 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/pkulchenko/MobDebug/tar.gz/$(PKG_VERSION)? -PKG_HASH:=35ec131a0ecc74dbe1cc50582ed977120a4ef6d9f815ce07367fdb945cfee370 -PKG_BUILD_DIR:=$(BUILD_DIR)/MobDebug-$(PKG_VERSION) - -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-mobdebug - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-MobDebug - URL:=https://github.com/pkulchenko/MobDebug - DEPENDS:=+lua - PKGARCH:=all -endef - -define Package/lua-mobdebug/description - MobDebug is a remote debugger for Lua (including Lua 5.1, Lua 5.2, Lua 5.3, and LuaJIT 2.x). -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Build/Install -endef - -# add make variable overrides here -MAKE_FLAGS += - -define Package/lua-mobdebug/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/mobdebug.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-mobdebug)) diff --git a/packages/lang/lua-mosquitto/Makefile b/packages/lang/lua-mosquitto/Makefile deleted file mode 100644 index 4e0aaac2..00000000 --- a/packages/lang/lua-mosquitto/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-mosquitto -PKG_VERSION:=0.4.1 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=d6bc828ea05f9a1ff3241f575a6ce699e577f9b79277182699e8fa03ac094ac9 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/flukso/lua-mosquitto.git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-mosquitto - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-mosquitto - DEPENDS:=+libmosquitto +lua - MAINTAINER:=Karl Palsson -endef - -define Package/lua-mosquitto/description - Lua bindings to libmosquitto -endef - -define Package/lua-mosquitto/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-mosquitto)) diff --git a/packages/lang/lua-neturl/Makefile b/packages/lang/lua-neturl/Makefile deleted file mode 100644 index 5f923840..00000000 --- a/packages/lang/lua-neturl/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-only -# -# Copyright (C) 2022-2023 ImmortalWrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=neturl -PKG_REAL_VERSION:=1.1-1 -PKG_VERSION:=$(subst -,.,$(PKG_REAL_VERSION)) -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_REAL_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/golgote/neturl/tar.gz/v$(PKG_REAL_VERSION)? -PKG_HASH:=25f3a94ba9f435ef1395555de2bf17d6f934d789fa515ed965405919e42be27b -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REAL_VERSION) - -PKG_MAINTAINER:=Tianling Shen -PKG_LICENSE:=MIT -PKG_LICNESE_FILES:=LICENSE.txt - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-neturl - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=URL and Query string parser, builder, normalizer for Lua - URL:=https://github.com/golgote/neturl - DEPENDS:=+lua - PKGARCH:=all -endef - -define Package/lua-neturl/description - This small Lua library provides a few functions to parse URL with - querystring and build new URL easily. -endef - -define Build/Compile -endef - -define Package/lua-neturl/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/lib/net/url.lua $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-neturl)) diff --git a/packages/lang/lua-neturl/patches/010-userinfo-regex.patch b/packages/lang/lua-neturl/patches/010-userinfo-regex.patch deleted file mode 100644 index 9dbd91cc..00000000 --- a/packages/lang/lua-neturl/patches/010-userinfo-regex.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/lib/net/url.lua -+++ b/lib/net/url.lua -@@ -340,7 +340,7 @@ function M:setAuthority(authority) - self.password = v - return '' - end) -- if string.find(userinfo, "^[%w%+%.]+$") then -+ if string.find(userinfo, "^[%p%w%+%.]+$") then - self.user = userinfo - else - -- incorrect userinfo -@@ -369,7 +369,7 @@ function M.parse(url) - comp.fragment = v - return '' - end) -- url =url:gsub('^([%w][%w%+%-%.]*)%:', function(v) -+ url =url:gsub('^([%w][%w%+%-%_%.]*)%:', function(v) - comp.scheme = v:lower() - return '' - end) diff --git a/packages/lang/lua-openssl/Makefile b/packages/lang/lua-openssl/Makefile deleted file mode 100644 index b0f0e828..00000000 --- a/packages/lang/lua-openssl/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (C) 2016 Amnon Paz -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-openssl -PKG_SOURCE_VERSION:=0.8.5-1 -PKG_VERSION:=$(subst -,.,$(PKG_SOURCE_VERSION)) -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git -PKG_MIRROR_HASH:=415decabf303095a487f3882fd1f835b20e57c7c08e86a14d124c21131524f50 - -PKG_MAINTAINER:=Amnon Paz -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lua-openssl - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua openSSL binding - URL:=http://github.com/zhaozg/lua-openssl - DEPENDS:=+lua +libopenssl +librt -endef - -define Package/lua-openssl/description - A free, MIT-licensed OpenSSL binding for Lua. -endef - -define Package/lua-openssl/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/openssl.so $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-openssl)) diff --git a/packages/lang/lua-openssl/patches/010-no-luajit.patch b/packages/lang/lua-openssl/patches/010-no-luajit.patch deleted file mode 100644 index 4530cde4..00000000 --- a/packages/lang/lua-openssl/patches/010-no-luajit.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -8,10 +8,7 @@ option(BUILD_SHARED_LUA_OPENSSL "Shared - - include(GNUInstallDirs) - --find_package(LuaJIT) --if(NOT LUAJIT_FOUND) -- find_package(Lua REQUIRED) --endif() -+find_package(Lua REQUIRED) - find_package(OpenSSL REQUIRED) - - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) diff --git a/packages/lang/lua-penlight/Makefile b/packages/lang/lua-penlight/Makefile deleted file mode 100644 index 34d96e66..00000000 --- a/packages/lang/lua-penlight/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-penlight -PKG_VERSION:=1.13.1 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/Penlight-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/lunarmodules/Penlight/tar.gz/$(PKG_VERSION)? -PKG_HASH:=530380e1a377df519c2e589f47823f79701f8e0e67f6bbd994e18d09a470b680 -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE.md - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-penlight - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Penlight - URL:=http://lunarmodules.github.io/Penlight/manual/01-introduction.md.html - DEPENDS:=+luafilesystem - MAINTAINER:=Karl Palsson -endef - -define Package/lua-penlight/description - It is often said of Lua that it does not include batteries. - Penlight is the batteries. -endef - -define Build/Compile - echo "Nothing to compile, pure lua package" -endef - -define Package/lua-penlight/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/lua/pl $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-penlight)) diff --git a/packages/lang/lua-periphery/Makefile b/packages/lang/lua-periphery/Makefile deleted file mode 100644 index 5a7c652f..00000000 --- a/packages/lang/lua-periphery/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-periphery -PKG_VERSION:=2.4.2 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/vsergeev/lua-periphery.git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_MIRROR_HASH:=0489c51a1463f2ddbdd1e445cde59e31c222551b917b46f85500a601f155af9a - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Tianling Shen - -CMAKE_SOURCE_SUBDIR:=c-periphery -CMAKE_BINARY_SUBDIR:=c-periphery -PKG_BUILD_FLAGS:=gc-sections - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lua-periphery - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=A Lua library for peripheral I/O in Linux - URL:=https://github.com/vsergeev/lua-periphery - DEPENDS:=+lua -endef - -define Package/lua-periphery/description - lua-periphery is a library for GPIO, LED, PWM, SPI, I2C, MMIO, and - Serial peripheral I/O interface access in userspace Linux. -endef - -CMAKE_OPTIONS += -DBUILD_TESTS=OFF - -define Build/Compile - +$(NINJA) -C $(CMAKE_BINARY_DIR) - $(CP) $(CMAKE_BINARY_DIR)/libperiphery.a $(CMAKE_BINARY_DIR)/periphery.a - +$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) -endef - -define Package/lua-periphery/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/periphery.so* $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-periphery)) diff --git a/packages/lang/lua-rings/Makefile b/packages/lang/lua-rings/Makefile deleted file mode 100644 index 53fe67b2..00000000 --- a/packages/lang/lua-rings/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-rings -PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=7026ce5898d37a4175b7afad693d59ff1fff1a84adafcabfafd065956a03616c -PKG_SOURCE_URL:=https://github.com/keplerproject/rings.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=2b8a900f8b9dbde304859a3ac9d437795c3fdde3 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_FIXUP:=autoreconf - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-rings - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-Rings - URL:=http://keplerproject.github.io/rings/ - DEPENDS:=+lua -endef - -define Package/lua-rings/description - Rings is a library which provides a way to create new Lua states from within Lua. -endef - -TARGET_CFLAGS += $(FPIC) -# add make variable overrides here -MAKE_FLAGS += - -define Build/Configure -endef - -define Package/lua-rings/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rings.so $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/stable.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-rings)) diff --git a/packages/lang/lua-rings/patches/config.patch b/packages/lang/lua-rings/patches/config.patch deleted file mode 100644 index 05513782..00000000 --- a/packages/lang/lua-rings/patches/config.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/config -+++ b/config -@@ -1,15 +1,15 @@ - # Installation directories - - # Default prefix --PREFIX ?= /usr/local -+PREFIX ?= /usr - - DESTDIR ?= / - - # System's libraries directory (where binary libraries are installed) --LUA_LIBDIR ?= $(PREFIX)/lib/lua/5.1 -+LUA_LIBDIR ?= $(PREFIX)/lib/lua - - # System's lua directory (where Lua libraries are installed) --LUA_DIR ?= $(PREFIX)/share/lua/5.1 -+LUA_DIR ?= $(PREFIX)/lib/lua - - # Lua includes directory - LUA_INC ?= $(PREFIX)/include -@@ -24,6 +24,5 @@ LIBNAME ?= $T.so.$V - WARN ?= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -Wpointer-arith -pedantic - INCS ?= -I$(LUA_INC) - CFLAGS ?= $(WARN) $(INCS) --CC ?= gcc - - # $Id: config,v 1.7 2007/10/29 22:51:39 carregal Exp $ diff --git a/packages/lang/lua-rings/patches/makefile.patch b/packages/lang/lua-rings/patches/makefile.patch deleted file mode 100644 index d639ef91..00000000 --- a/packages/lang/lua-rings/patches/makefile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -3,6 +3,8 @@ - T= rings - CONFIG= ./config - -+CFLAGS+= -fPIC -+ - include $(CONFIG) - - SRCS= src/rings.c diff --git a/packages/lang/lua-rs232/Makefile b/packages/lang/lua-rs232/Makefile deleted file mode 100644 index 925ee69e..00000000 --- a/packages/lang/lua-rs232/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-rs232 -PKG_SOURCE_DATE:=2019-11-20 -PKG_SOURCE_VERSION:=c106c94d1a5a84e8582c936528303528608776c2 -PKG_RELEASE:=3 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/srdgame/librs232 -PKG_MIRROR_HASH:=d507ce004a9b02b8d8a31d0c348eb9c481f1030153c941131aeff0dd3046a419 - -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=lua/host -PKG_BUILD_FLAGS:=gc-sections - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-rs232 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua Serial Library - URL:=https://github.com/srdgame/librs232 - DEPENDS:= +lua -endef - -define Package/lua-rs232/description - multiplatform library for serial communications over RS-232 -endef - -TARGET_LDFLAGS += -Wl,--as-needed -MAKE_FLAGS += luadir='$$$${prefix}/lib/lua' luaexecdir='$$$${exec_prefix}/lib/lua' - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/librs232 - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/librs232/rs232* $(1)/usr/include/librs232 - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/luars232* $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librs232.pc $(1)/usr/lib/pkgconfig -endef - -define Package/lua-rs232/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/luars232* $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-rs232)) diff --git a/packages/lang/lua-rs232/patches/010-gcc13.patch b/packages/lang/lua-rs232/patches/010-gcc13.patch deleted file mode 100644 index 32da1376..00000000 --- a/packages/lang/lua-rs232/patches/010-gcc13.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 3467c3c354263b066ad47bddfe6eb869c0111e0d Mon Sep 17 00:00:00 2001 -From: Damian Wrobel -Date: Tue, 24 Jan 2023 10:19:16 +0100 -Subject: [PATCH] Fix rs232_set_* prototypes mismatch - -Fixes compilation error on gcc 13 (excerpt): - rs232_posix.c:490:1: error: conflicting types for 'rs232_set_baud' \ - due to enum/integer mismatch; have 'unsigned int(struct rs232_port_t *, \ - enum rs232_baud_e)' [-Werror=enum-int-mismatch] - 490 | rs232_set_baud(struct rs232_port_t *p, enum rs232_baud_e baud) - | ^~~~~~~~~~~~~~ - In file included from rs232_posix.c:39: - ../include/librs232/rs232.h:203:24: note: previous declaration of \ - 'rs232_set_baud' with type 'unsigned int(struct rs232_port_t *, unsigned int)' - 203 | RS232_LIB unsigned int rs232_set_baud(struct rs232_port_t *p, unsigned int baud); - | ^~~~~~~~~~~~~~ - - rs232_posix.c:591:1: error: conflicting types for 'rs232_set_dtr' \ - due to enum/integer mismatch; have 'unsigned int(struct rs232_port_t *, \ - enum rs232_dtr_e)' [-Werror=enum-int-mismatch] - 591 | rs232_set_dtr(struct rs232_port_t *p, enum rs232_dtr_e state) - | ^~~~~~~~~~~~~ - In file included from rs232_posix.c:39: - ../include/librs232/rs232.h:208:24: note: previous declaration of 'rs232_set_dtr' \ - with type 'unsigned int(struct rs232_port_t *, unsigned int)' - 208 | RS232_LIB unsigned int rs232_set_dtr(struct rs232_port_t *p, unsigned int dtr); - | ^~~~~~~~~~~~~ - -Signed-off-by: Damian Wrobel ---- - include/librs232/rs232.h | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - ---- a/include/librs232/rs232.h -+++ b/include/librs232/rs232.h -@@ -200,13 +200,13 @@ RS232_LIB unsigned int rs232_port_open(s - RS232_LIB unsigned int rs232_close(struct rs232_port_t *p); - RS232_LIB unsigned int rs232_flush(struct rs232_port_t *p); - RS232_LIB void rs232_set_device(struct rs232_port_t *p, const char *device); --RS232_LIB unsigned int rs232_set_baud(struct rs232_port_t *p, unsigned int baud); --RS232_LIB unsigned int rs232_set_stop(struct rs232_port_t *p, unsigned int stop); --RS232_LIB unsigned int rs232_set_data(struct rs232_port_t *p, unsigned int data); --RS232_LIB unsigned int rs232_set_parity(struct rs232_port_t *p, unsigned int parity); --RS232_LIB unsigned int rs232_set_flow(struct rs232_port_t *p, unsigned int flow); --RS232_LIB unsigned int rs232_set_dtr(struct rs232_port_t *p, unsigned int dtr); --RS232_LIB unsigned int rs232_set_rts(struct rs232_port_t *p, unsigned int rts); -+RS232_LIB unsigned int rs232_set_baud(struct rs232_port_t *p, enum rs232_baud_e baud); -+RS232_LIB unsigned int rs232_set_stop(struct rs232_port_t *p, enum rs232_stop_e stop); -+RS232_LIB unsigned int rs232_set_data(struct rs232_port_t *p, enum rs232_data_e data); -+RS232_LIB unsigned int rs232_set_parity(struct rs232_port_t *p, enum rs232_parity_e parity); -+RS232_LIB unsigned int rs232_set_flow(struct rs232_port_t *p, enum rs232_flow_e flow); -+RS232_LIB unsigned int rs232_set_dtr(struct rs232_port_t *p, enum rs232_dtr_e state); -+RS232_LIB unsigned int rs232_set_rts(struct rs232_port_t *p, enum rs232_rts_e state); - RS232_LIB const char * rs232_get_device(struct rs232_port_t *p); - RS232_LIB unsigned int rs232_get_baud(struct rs232_port_t *p); - RS232_LIB unsigned int rs232_get_stop(struct rs232_port_t *p); diff --git a/packages/lang/lua-rs232/patches/100-remove-build-timestamps.patch b/packages/lang/lua-rs232/patches/100-remove-build-timestamps.patch deleted file mode 100644 index 4299cdf9..00000000 --- a/packages/lang/lua-rs232/patches/100-remove-build-timestamps.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/bindings/lua/luars232.c -+++ b/bindings/lua/luars232.c -@@ -31,7 +31,6 @@ - - #include "librs232/rs232.h" - --#define MODULE_TIMESTAMP __DATE__ " " __TIME__ - #define MODULE_NAMESPACE "luars232" - #define MODULE_VERSION "1.0.3" - #define MODULE_BUILD "$Id: luars232.c 15 2011-02-23 09:02:20Z sp $" -@@ -553,9 +552,6 @@ RS232_LIB int luaopen_luars232(lua_State - lua_pushstring(L, MODULE_BUILD); - lua_setfield(L, -2, "_BUILD"); - -- lua_pushstring(L, MODULE_TIMESTAMP); -- lua_setfield(L, -2, "_TIMESTAMP"); -- - lua_pushstring(L, MODULE_COPYRIGHT); - lua_setfield(L, -2, "_COPYRIGHT"); - diff --git a/packages/lang/lua-sha2/Makefile b/packages/lang/lua-sha2/Makefile deleted file mode 100644 index e76a5a20..00000000 --- a/packages/lang/lua-sha2/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 20013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-sha2 -PKG_VERSION:=0.2.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=79e65bd7cb1b8ef64e125c9e57f40b7d38678599587c1894ce57838814403945 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-sha2 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua binding for Aaron Gifford's SHA-2 implementation - URL:=https://code.google.com/p/sha2/ - MAINTAINER:=Lars Gierth - DEPENDS:=+lua -endef - -define Package/lua-sha2/description - Lua Binding for the SHA-2 (SHA-256/384/512) BSD-licensed C implementation by Aaron Gifford. - Also contains a HMAC implementation in Lua. -endef - -TARGET_CFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN -TARGET_LDFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN - -define Build/Configure -endef - -define Package/lua-sha2/install - $(INSTALL_DIR) $(1)/usr/lib/lua/hmac - $(INSTALL_DATA) $(PKG_BUILD_DIR)/sha2.so $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac -endef - -$(eval $(call BuildPackage,lua-sha2)) diff --git a/packages/lang/lua-sha2/patches/001-makefile.patch b/packages/lang/lua-sha2/patches/001-makefile.patch deleted file mode 100644 index e395044e..00000000 --- a/packages/lang/lua-sha2/patches/001-makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ -From: Lars Gierth -Date: Tue, 2 Sep 2014 00:05:39 +0200 - - Add rump Makefile - -new file mode 100644 -index 0000000..f081d38 ---- /dev/null -+++ b/Makefile -@@ -0,0 +1,4 @@ -+all: sha2.o sha2lib.o -+ $(CC) -shared -o sha2.so sha2.o sha2lib.o -+ -+.PHONY: all diff --git a/packages/lang/lua-struct/Makefile b/packages/lang/lua-struct/Makefile deleted file mode 100644 index f24131f9..00000000 --- a/packages/lang/lua-struct/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-struct -PKG_VERSION:=0.9.2 -PKG_RELEASE:=1 - -PKG_VERSION_TAG:=$(PKG_VERSION)-1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION_TAG).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/iryont/$(PKG_NAME)/tar.gz/$(PKG_VERSION_TAG)? -PKG_HASH:=30d4e3584e27caa504745fdf5e191f2469ae284dc51271292654856905a4603d - -PKG_MAINTAINER:=jasle -PKG_LICENSE:=MIT/X11 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION_TAG) - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-struct - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Implementation of binary packing/unpacking in pure lua - URL:=https://github.com/iryont/lua-struct -endef - -define Package/lua-struct/desription - lua-struct is a pure lua Implementation for packing and unpacking - binary data. -endef - -define Build/Compile - echo "Nothing to compile, pure lua package" -endef - -define Package/lua-struct/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/struct.lua $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-struct)) - diff --git a/packages/lang/lua-wsapi/Makefile b/packages/lang/lua-wsapi/Makefile deleted file mode 100644 index 5a1c99b8..00000000 --- a/packages/lang/lua-wsapi/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-wsapi -PKG_VERSION:=1.7 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/wsapi/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=48dc7aba0fd2e96a3e5ef51045b5d923964f6ae299de761aa0467031ad44e987 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/wsapi-$(PKG_VERSION) - -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-wsapi/Default - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua WSAPI - URL:=https://keplerproject.github.io/wsapi/ - DEPENDS:= +lua - PKGARCH:=all -endef - -define Package/lua-wsapi/Default/description - WSAPI is an API that abstracts the web server from Lua web applications -endef - - -define Package/lua-wsapi-base -$(call Package/lua-wsapi/Default) - TITLE+= base - DEPENDS+= +luafilesystem - VARIANT:=base -endef - -define Package/lua-wsapi-base/description -$(call Package/lua-wsapi/Default/description) - . - This package contains the basic stuff. -endef - -define Package/lua-wsapi-xavante -$(call Package/lua-wsapi/Default) - TITLE+= xavante - DEPENDS+= +lua-wsapi-base +lua-xavante - VARIANT:=xavante -endef - -define Package/lua-wsapi-xavante/description -$(call Package/lua-wsapi/Default/description) - . - This package contains the Xavante stuff. -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Build/Install -endef - -define Package/lua-wsapi-base/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi.lua $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi.cgi $(1)/usr/bin - - $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/{common,request,response,util,cgi,sapi,ringer,mock}.lua $(1)/usr/lib/lua/wsapi -endef - -define Package/lua-wsapi-xavante/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi $(1)/usr/bin - - $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi -endef - - -$(eval $(call BuildPackage,lua-wsapi-base)) -$(eval $(call BuildPackage,lua-wsapi-xavante)) diff --git a/packages/lang/lua-xavante/Makefile b/packages/lang/lua-xavante/Makefile deleted file mode 100644 index 9b870aa5..00000000 --- a/packages/lang/lua-xavante/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-xavante -PKG_VERSION:=2.4.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/xavante/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=0e4f49dd96cb092cd5d80cc66a5204dcb22a14f80897a121f2f0d1dceb1c7ba5 -PKG_BUILD_DIR:=$(BUILD_DIR)/xavante-$(PKG_VERSION) - -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-xavante - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Xavante Web Server - URL:=https://keplerproject.github.io/xavante/ - DEPENDS:= +lua - PKGARCH:=all -endef - -define Package/lua-xavante/description - Xavante is a Lua HTTP 1.1 Web server that uses a modular architecture based on URI mapped handlers. -endef - - -define Build/Configure -endef - -define Build/Compile -endef - -define Build/Install -endef - -define Package/lua-xavante/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/sajax/sajax.lua $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/xavante.lua $(1)/usr/lib/lua - - $(INSTALL_DIR) $(1)/usr/lib/lua/xavante - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/{cgiluahandler,encoding,filehandler,httpd,mime,patternhandler,redirecthandler,vhostshandler,indexhandler,urlhandler,ruleshandler}.lua $(1)/usr/lib/lua/xavante -endef - -$(eval $(call BuildPackage,lua-xavante)) diff --git a/packages/lang/lua5.4/Makefile b/packages/lang/lua5.4/Makefile deleted file mode 100644 index b525c9a6..00000000 --- a/packages/lang/lua5.4/Makefile +++ /dev/null @@ -1,165 +0,0 @@ -# -# Copyright (C) 2006-2023 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua -PKG_VERSION:=5.4.6 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.lua.org/ftp/ \ - https://www.tecgraf.puc-rio.br/lua/ftp/ -PKG_HASH:=7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88 -PKG_BUILD_PARALLEL:=1 - -PKG_MAINTAINER:=Christian Marangi - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYRIGHT -PKG_CPE_ID:=cpe:/a:lua:lua - -HOST_PATCH_DIR := ./patches-host - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - -define Package/lua5.4/Default - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua programming language (version 5.4) - URL:=https://www.lua.org/ -endef - -define Package/lua5.4/Default/description - Lua is a powerful, efficient, lightweight, embeddable scripting language. It - supports procedural programming, object-oriented programming, functional - programming, data-driven programming, and data description. -endef - -define Package/liblua5.4 -$(call Package/lua5.4/Default) - SUBMENU:= - SECTION:=libs - CATEGORY:=Libraries - TITLE+= (libraries) - ABI_VERSION:=5.4 -endef - -define Package/liblua5.4/description -$(call Package/lua5.4/Default/description) - This package contains the Lua shared libraries, needed by other programs. -endef - -define Package/lua5.4 -$(call Package/lua5.4/Default) - DEPENDS:=+liblua5.4 - TITLE+= (interpreter) -endef - -define Package/lua5.4/description -$(call Package/lua5.4/Default/description) - This package contains the Lua language interpreter. -endef - -define Package/luac5.4 -$(call Package/lua5.4/Default) - DEPENDS:=+liblua5.4 - TITLE+= (compiler) -endef - -define Package/luac5.4/description -$(call Package/lua5.4/Default/description) - This package contains the Lua language compiler. -endef - -define Build/Prepare - $(call Build/Prepare/Default) - mv $(PKG_BUILD_DIR)/doc/lua.1 $(PKG_BUILD_DIR)/doc/lua5.4.1 - mv $(PKG_BUILD_DIR)/doc/luac.1 $(PKG_BUILD_DIR)/doc/luac5.4.1 -endef - -TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99 - -define Build/Compile - $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CROSS)gcc" \ - AR="$(TARGET_CROSS)ar rcu" \ - RANLIB="$(TARGET_CROSS)ranlib" \ - INSTALL_ROOT=/usr \ - CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ - PKG_VERSION=$(PKG_VERSION) \ - linux - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - INSTALL_TOP="$(PKG_INSTALL_DIR)/usr" \ - install -endef - -define Host/Prepare - $(call Host/Prepare/Default) - mv $(HOST_BUILD_DIR)/doc/lua.1 $(HOST_BUILD_DIR)/doc/lua5.4.1 - mv $(HOST_BUILD_DIR)/doc/luac.1 $(HOST_BUILD_DIR)/doc/luac5.4.1 -endef - -define Host/Configure - $(SED) 's,"/usr/local/","$(STAGING_DIR_HOSTPKG)/",' $(HOST_BUILD_DIR)/src/luaconf.h -endef - -ifeq ($(HOST_OS),Darwin) - LUA_OS:=macosx -else - ifeq ($(HOST_OS),FreeBSD) - LUA_OS:=freebsd - else - LUA_OS:=linux - endif -endif - -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) \ - CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \ - $(LUA_OS) -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) \ - INSTALL_TOP="$(STAGING_DIR_HOSTPKG)" \ - install -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/lua5.4 $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/include/lua5.4/lua{,lib,conf}.h $(1)/usr/include/lua5.4/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/lua5.4/lua.hpp $(1)/usr/include/lua5.4/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/lua5.4/lauxlib.h $(1)/usr/include/lua5.4/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua5.4.{a,so*} $(1)/usr/lib/ - $(LN) liblua5.4.so.0.0.0 $(1)/usr/lib/liblualib5.4.so -endef - -define Package/liblua5.4/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua5.4.so* $(1)/usr/lib/ -endef - -define Package/lua5.4/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lua5.4 $(1)/usr/bin/ -endef - -define Package/luac5.4/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luac5.4 $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,liblua5.4)) -$(eval $(call BuildPackage,lua5.4)) -$(eval $(call BuildPackage,luac5.4)) -$(eval $(call HostBuild)) diff --git a/packages/lang/lua5.4/patches-host/001-include-version-number.patch b/packages/lang/lua5.4/patches-host/001-include-version-number.patch deleted file mode 100644 index 99c225ee..00000000 --- a/packages/lang/lua5.4/patches-host/001-include-version-number.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Fri, 21 Jun 2019 14:08:38 +0200 -Subject: [PATCH] include version number - -Including it allows multiple lua versions to coexist. - -Signed-off-by: Rafał Miłecki ---- - ---- a/Makefile -+++ b/Makefile -@@ -12,7 +12,7 @@ PLAT= guess - # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. - INSTALL_TOP= /usr/local - INSTALL_BIN= $(INSTALL_TOP)/bin --INSTALL_INC= $(INSTALL_TOP)/include -+INSTALL_INC= $(INSTALL_TOP)/include/lua$V - INSTALL_LIB= $(INSTALL_TOP)/lib - INSTALL_MAN= $(INSTALL_TOP)/man/man1 - INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V -@@ -39,10 +39,10 @@ RM= rm -f - PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris - - # What to install. --TO_BIN= lua luac -+TO_BIN= lua$V luac$V - TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp --TO_LIB= liblua.a --TO_MAN= lua.1 luac.1 -+TO_LIB= liblua$V.a -+TO_MAN= lua$V.1 luac$V.1 - - # Lua version and release. - V= 5.4 -@@ -52,7 +52,7 @@ R= $V.6 - all: $(PLAT) - - $(PLATS) help test clean: -- @cd src && $(MAKE) $@ -+ @cd src && $(MAKE) $@ V=$V - - install: dummy - cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) ---- a/src/Makefile -+++ b/src/Makefile -@@ -32,15 +32,15 @@ CMCFLAGS= - - PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris - --LUA_A= liblua.a -+LUA_A= liblua$V.a - CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o - LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o - BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) - --LUA_T= lua -+LUA_T= lua$V - LUA_O= lua.o - --LUAC_T= luac -+LUAC_T= luac$V - LUAC_O= luac.o - - ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) diff --git a/packages/lang/lua5.4/patches-host/100-no_readline.patch b/packages/lang/lua5.4/patches-host/100-no_readline.patch deleted file mode 100644 index 64567dd0..00000000 --- a/packages/lang/lua5.4/patches-host/100-no_readline.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -126,7 +126,7 @@ c89: - @echo '' - - FreeBSD NetBSD OpenBSD freebsd: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX $(if $(USE_READLINE), -DLUA_USE_READLINE) -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc" - - generic: $(ALL) - -@@ -136,13 +136,13 @@ ios: - Linux linux: linux-noreadline - - linux-noreadline: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX $(if $(USE_READLINE), -DLUA_USE_READLINE)" SYSLIBS="-Wl,-E -ldl $(if $(USE_READLINE), -lreadline)" - - linux-readline: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline" - - Darwin macos macosx: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX $(if $(USE_READLINE), -DLUA_USE_READLINE)" SYSLIBS="$(if $(USE_READLINE), -lreadline)" - - mingw: - $(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \ diff --git a/packages/lang/lua5.4/patches/001-include-version-number.patch b/packages/lang/lua5.4/patches/001-include-version-number.patch deleted file mode 100644 index 99c225ee..00000000 --- a/packages/lang/lua5.4/patches/001-include-version-number.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Fri, 21 Jun 2019 14:08:38 +0200 -Subject: [PATCH] include version number - -Including it allows multiple lua versions to coexist. - -Signed-off-by: Rafał Miłecki ---- - ---- a/Makefile -+++ b/Makefile -@@ -12,7 +12,7 @@ PLAT= guess - # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. - INSTALL_TOP= /usr/local - INSTALL_BIN= $(INSTALL_TOP)/bin --INSTALL_INC= $(INSTALL_TOP)/include -+INSTALL_INC= $(INSTALL_TOP)/include/lua$V - INSTALL_LIB= $(INSTALL_TOP)/lib - INSTALL_MAN= $(INSTALL_TOP)/man/man1 - INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V -@@ -39,10 +39,10 @@ RM= rm -f - PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris - - # What to install. --TO_BIN= lua luac -+TO_BIN= lua$V luac$V - TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp --TO_LIB= liblua.a --TO_MAN= lua.1 luac.1 -+TO_LIB= liblua$V.a -+TO_MAN= lua$V.1 luac$V.1 - - # Lua version and release. - V= 5.4 -@@ -52,7 +52,7 @@ R= $V.6 - all: $(PLAT) - - $(PLATS) help test clean: -- @cd src && $(MAKE) $@ -+ @cd src && $(MAKE) $@ V=$V - - install: dummy - cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) ---- a/src/Makefile -+++ b/src/Makefile -@@ -32,15 +32,15 @@ CMCFLAGS= - - PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris - --LUA_A= liblua.a -+LUA_A= liblua$V.a - CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o - LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o - BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) - --LUA_T= lua -+LUA_T= lua$V - LUA_O= lua.o - --LUAC_T= luac -+LUAC_T= luac$V - LUAC_O= luac.o - - ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) diff --git a/packages/lang/lua5.4/patches/020-shared_liblua.patch b/packages/lang/lua5.4/patches/020-shared_liblua.patch deleted file mode 100644 index f2bed515..00000000 --- a/packages/lang/lua5.4/patches/020-shared_liblua.patch +++ /dev/null @@ -1,115 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -41,7 +41,7 @@ PLATS= guess aix bsd c89 freebsd generic - # What to install. - TO_BIN= lua$V luac$V - TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp --TO_LIB= liblua$V.a -+TO_LIB= liblua$V.a liblua$V.so.0.0.0 - TO_MAN= lua$V.1 luac$V.1 - - # Lua version and release. -@@ -59,6 +59,9 @@ install: dummy - cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) - cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) - cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) -+ ln -s liblua$V.so.0.0.0 $(INSTALL_LIB)/liblua$V.so.0.0 -+ ln -s liblua$V.so.0.0.0 $(INSTALL_LIB)/liblua$V.so.0 -+ ln -s liblua$V.so.0.0.0 $(INSTALL_LIB)/liblua$V.so - cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) - - uninstall: ---- a/src/ldebug.h -+++ b/src/ldebug.h -@@ -36,7 +36,7 @@ - #endif - - --LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc); -+LUA_API int luaG_getfuncline (const Proto *f, int pc); - LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n, - StkId *pos); - LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, ---- a/src/lstring.h -+++ b/src/lstring.h -@@ -50,7 +50,7 @@ LUAI_FUNC void luaS_init (lua_State *L); - LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); - LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue); - LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); --LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); -+LUA_API TString *luaS_new (lua_State *L, const char *str); - LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); - - ---- a/src/lundump.h -+++ b/src/lundump.h -@@ -30,7 +30,7 @@ - LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name); - - /* dump one chunk; from ldump.c */ --LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, -+LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, - void* data, int strip); - - #endif ---- a/src/lzio.h -+++ b/src/lzio.h -@@ -44,7 +44,7 @@ typedef struct Mbuffer { - #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) - - --LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, -+LUA_API void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, - void *data); - LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */ - ---- a/src/Makefile -+++ b/src/Makefile -@@ -33,6 +33,7 @@ CMCFLAGS= - PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris - - LUA_A= liblua$V.a -+LUA_SO= liblua$V.so.0.0.0 - CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o - LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o - BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) -@@ -44,8 +45,9 @@ LUAC_T= luac$V - LUAC_O= luac.o - - ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) --ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) -+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) - ALL_A= $(LUA_A) -+ALL_SO= $(LUA_SO) - - # Targets start here. - default: $(PLAT) -@@ -56,14 +58,25 @@ o: $(ALL_O) - - a: $(ALL_A) - -+so: $(ALL_SO) -+ - $(LUA_A): $(BASE_O) - $(AR) $@ $(BASE_O) - $(RANLIB) $@ - --$(LUA_T): $(LUA_O) $(LUA_A) -- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) -+$(LUA_SO): $(CORE_O) $(LIB_O) -+ $(CC) -o $@ -Wl,-Bsymbolic-functions -shared -Wl,-soname="$@" $? -+ ln -fs $@ liblua$V.so.0.0 -+ ln -fs $@ liblua$V.so.0 -+ ln -fs $@ liblua$V.so -+ -+$(LUA_T): $(LUA_O) $(LUA_SO) -+ $(CC) -o $@ -L. -llua$V $(MYLDFLAGS) $(LUA_O) $(LIBS) -+ -+$(LUAC_T): $(LUAC_O) $(LUA_SO) -+ $(CC) -o $@ -L. -llua$V $(MYLDFLAGS) $(LUAC_O) $(LIBS) - --$(LUAC_T): $(LUAC_O) $(LUA_A) -+$(LUAC_T)-host: $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) - - test: diff --git a/packages/lang/lua5.4/patches/100-no_readline.patch b/packages/lang/lua5.4/patches/100-no_readline.patch deleted file mode 100644 index 64567dd0..00000000 --- a/packages/lang/lua5.4/patches/100-no_readline.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -126,7 +126,7 @@ c89: - @echo '' - - FreeBSD NetBSD OpenBSD freebsd: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX $(if $(USE_READLINE), -DLUA_USE_READLINE) -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc" - - generic: $(ALL) - -@@ -136,13 +136,13 @@ ios: - Linux linux: linux-noreadline - - linux-noreadline: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX $(if $(USE_READLINE), -DLUA_USE_READLINE)" SYSLIBS="-Wl,-E -ldl $(if $(USE_READLINE), -lreadline)" - - linux-readline: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline" - - Darwin macos macosx: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX $(if $(USE_READLINE), -DLUA_USE_READLINE)" SYSLIBS="$(if $(USE_READLINE), -lreadline)" - - mingw: - $(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \ diff --git a/packages/lang/luabitop/Makefile b/packages/lang/luabitop/Makefile deleted file mode 100644 index 20f2c391..00000000 --- a/packages/lang/luabitop/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luabitop -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 - -_BASENAME:=LuaBitOp - -PKG_MAINTAINER:=Maxim Storchak -PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://bitop.luajit.org/download/ -PKG_HASH:=1207c9293dcd52eb9dca6538d1b87352bd510f4e760938f5048433f7f272ce99 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION) -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/luabitop - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=luabitop - URL:=http://bitop.luajit.org/ - DEPENDS:=+liblua -endef - -define Package/luabitop/description -Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. -endef - -define Build/Configure -endef - - -TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c -endef - -define Package/luabitop/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,luabitop)) diff --git a/packages/lang/luaexpat/Makefile b/packages/lang/luaexpat/Makefile deleted file mode 100644 index d6d616a3..00000000 --- a/packages/lang/luaexpat/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luaexpat -PKG_VERSION:=1.5.1 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/lunarmodules/luaexpat -PKG_MIRROR_HASH:=7e370d47e947a1acfeb4d00df012f47116fe7971f5b12033e92666e37a9312a1 - -PKG_CPE_ID:=cpe:/a:matthewwild:luaexpat - -include $(INCLUDE_DIR)/package.mk - -define Package/luaexpat - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaExpat - URL:=http://matthewwild.co.uk/projects/luaexpat/ - MAINTAINER:=W. Michael Petullo - DEPENDS:=+lua +libexpat -endef - -define Package/luaexpat/description - LuaExpat is a SAX XML parser based on the Expat library. -endef - -define Build/Configure -endef - -define Build/Compile - $(CP) files/compat-5.1r5 $(PKG_BUILD_DIR)/compat-5.1r5 - $(MAKE) -C $(PKG_BUILD_DIR) \ - EXPAT_INC="-I$(STAGING_DIR)/usr/include/" \ - LUA_INC="-I$(STAGING_DIR)/usr/include/" \ - LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \ - COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \ - LDFLAGS="-shared $(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -std=c99" \ - LD="$(TARGET_CROSS)ld -shared" -endef - -define Package/luaexpat/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp.so $(1)/usr/lib/lua/lxp.so - $(INSTALL_DIR) $(1)/usr/lib/lua/lxp - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/lib/lua/lxp -endef - -$(eval $(call BuildPackage,luaexpat)) diff --git a/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.c b/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.c deleted file mode 100644 index 6fdb8b7b..00000000 --- a/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.c +++ /dev/null @@ -1,97 +0,0 @@ -/* -** Compat-5.1 -** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) -** $Id: compat-5.1.c,v 1.13 2006/02/20 21:12:47 carregal Exp $ -*/ - -#include -#include -#include "lua.h" -#include "lauxlib.h" -#include "compat-5.1.h" - -static void getfield(lua_State *L, int idx, const char *name) { - const char *end = strchr(name, '.'); - lua_pushvalue(L, idx); - while (end) { - lua_pushlstring(L, name, end - name); - lua_gettable(L, -2); - lua_remove(L, -2); - if (lua_isnil(L, -1)) return; - name = end+1; - end = strchr(name, '.'); - } - lua_pushstring(L, name); - lua_gettable(L, -2); - lua_remove(L, -2); -} - -static void setfield(lua_State *L, int idx, const char *name) { - const char *end = strchr(name, '.'); - lua_pushvalue(L, idx); - while (end) { - lua_pushlstring(L, name, end - name); - lua_gettable(L, -2); - /* create table if not found */ - if (lua_isnil(L, -1)) { - lua_pop(L, 1); - lua_newtable(L); - lua_pushlstring(L, name, end - name); - lua_pushvalue(L, -2); - lua_settable(L, -4); - } - lua_remove(L, -2); - name = end+1; - end = strchr(name, '.'); - } - lua_pushstring(L, name); - lua_pushvalue(L, -3); - lua_settable(L, -3); - lua_pop(L, 2); -} - -LUALIB_API void luaL_module(lua_State *L, const char *libname, - const luaL_reg *l, int nup) { - if (libname) { - getfield(L, LUA_GLOBALSINDEX, libname); /* check whether lib already exists */ - if (lua_isnil(L, -1)) { - int env, ns; - lua_pop(L, 1); /* get rid of nil */ - lua_pushliteral(L, "require"); - lua_gettable(L, LUA_GLOBALSINDEX); /* look for require */ - lua_getfenv(L, -1); /* getfenv(require) */ - lua_remove(L, -2); /* remove function require */ - env = lua_gettop(L); - - lua_newtable(L); /* create namespace for lib */ - ns = lua_gettop(L); - getfield(L, env, "package.loaded"); /* get package.loaded table */ - if (lua_isnil(L, -1)) { /* create package.loaded table */ - lua_pop(L, 1); /* remove previous result */ - lua_newtable(L); - lua_pushvalue(L, -1); - setfield(L, env, "package.loaded"); - } - else if (!lua_istable(L, -1)) - luaL_error(L, "name conflict for library `%s'", libname); - lua_pushstring(L, libname); - lua_pushvalue(L, ns); - lua_settable(L, -3); /* package.loaded[libname] = ns */ - lua_pop(L, 1); /* get rid of package.loaded table */ - lua_pushvalue(L, ns); /* copy namespace */ - setfield(L, LUA_GLOBALSINDEX, libname); - lua_remove (L, env); /* remove env */ - } - lua_insert(L, -(nup+1)); /* move library table to below upvalues */ - } - for (; l->name; l++) { - int i; - lua_pushstring(L, l->name); - for (i=0; ifunc, nup); - lua_settable(L, -(nup+3)); - } - lua_pop(L, nup); /* remove upvalues */ -} - diff --git a/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.h b/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.h deleted file mode 100644 index 97570d9c..00000000 --- a/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.h +++ /dev/null @@ -1,13 +0,0 @@ -/* -** Compat-5.1 -** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat/) -** $Id: compat-5.1.h,v 1.8 2006/02/20 21:12:47 carregal Exp $ -*/ - -#ifndef COMPAT_H - -LUALIB_API void luaL_module(lua_State *L, const char *libname, - const luaL_reg *l, int nup); -#define luaL_openlib luaL_module - -#endif diff --git a/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua b/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua deleted file mode 100644 index 0938d56a..00000000 --- a/packages/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua +++ /dev/null @@ -1,267 +0,0 @@ --- --- Compat-5.1 --- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) --- According to Lua 5.1 --- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $ --- - -_COMPAT51 = "Compat-5.1 R5" - -local LUA_DIRSEP = '/' -local LUA_OFSEP = '_' -local OLD_LUA_OFSEP = '' -local POF = 'luaopen_' -local LUA_PATH_MARK = '?' -local LUA_IGMARK = ':' - -local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type -local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub - --- --- avoid overwriting the package table if it's already there --- -package = package or {} -local _PACKAGE = package - -package.path = LUA_PATH or os.getenv("LUA_PATH") or - ("./?.lua;" .. - "/usr/local/share/lua/5.0/?.lua;" .. - "/usr/local/share/lua/5.0/?/?.lua;" .. - "/usr/local/share/lua/5.0/?/init.lua" ) - -package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or - "./?.so;" .. - "./l?.so;" .. - "/usr/local/lib/lua/5.0/?.so;" .. - "/usr/local/lib/lua/5.0/l?.so" - --- --- make sure require works with standard libraries --- -package.loaded = package.loaded or {} -package.loaded.debug = debug -package.loaded.string = string -package.loaded.math = math -package.loaded.io = io -package.loaded.os = os -package.loaded.table = table -package.loaded.base = _G -package.loaded.coroutine = coroutine -local _LOADED = package.loaded - --- --- avoid overwriting the package.preload table if it's already there --- -package.preload = package.preload or {} -local _PRELOAD = package.preload - - --- --- looks for a file `name' in given path --- -local function findfile (name, pname) - name = gsub (name, "%.", LUA_DIRSEP) - local path = _PACKAGE[pname] - assert (type(path) == "string", format ("package.%s must be a string", pname)) - for c in gfind (path, "[^;]+") do - c = gsub (c, "%"..LUA_PATH_MARK, name) - local f = io.open (c) - if f then - f:close () - return c - end - end - return nil -- not found -end - - --- --- check whether library is already loaded --- -local function loader_preload (name) - assert (type(name) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - assert (type(_PRELOAD) == "table", "`package.preload' must be a table") - return _PRELOAD[name] -end - - --- --- Lua library loader --- -local function loader_Lua (name) - assert (type(name) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - local filename = findfile (name, "path") - if not filename then - return false - end - local f, err = loadfile (filename) - if not f then - error (format ("error loading module `%s' (%s)", name, err)) - end - return f -end - - -local function mkfuncname (name) - name = gsub (name, "^.*%"..LUA_IGMARK, "") - name = gsub (name, "%.", LUA_OFSEP) - return POF..name -end - -local function old_mkfuncname (name) - --name = gsub (name, "^.*%"..LUA_IGMARK, "") - name = gsub (name, "%.", OLD_LUA_OFSEP) - return POF..name -end - --- --- C library loader --- -local function loader_C (name) - assert (type(name) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - local filename = findfile (name, "cpath") - if not filename then - return false - end - local funcname = mkfuncname (name) - local f, err = loadlib (filename, funcname) - if not f then - funcname = old_mkfuncname (name) - f, err = loadlib (filename, funcname) - if not f then - error (format ("error loading module `%s' (%s)", name, err)) - end - end - return f -end - - -local function loader_Croot (name) - local p = gsub (name, "^([^.]*).-$", "%1") - if p == "" then - return - end - local filename = findfile (p, "cpath") - if not filename then - return - end - local funcname = mkfuncname (name) - local f, err, where = loadlib (filename, funcname) - if f then - return f - elseif where ~= "init" then - error (format ("error loading module `%s' (%s)", name, err)) - end -end - --- create `loaders' table -package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, } -local _LOADERS = package.loaders - - --- --- iterate over available loaders --- -local function load (name, loaders) - -- iterate over available loaders - assert (type (loaders) == "table", "`package.loaders' must be a table") - for i, loader in ipairs (loaders) do - local f = loader (name) - if f then - return f - end - end - error (format ("module `%s' not found", name)) -end - --- sentinel -local sentinel = function () end - --- --- new require --- -function _G.require (modname) - assert (type(modname) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - local p = _LOADED[modname] - if p then -- is it there? - if p == sentinel then - error (format ("loop or previous error loading module '%s'", modname)) - end - return p -- package is already loaded - end - local init = load (modname, _LOADERS) - _LOADED[modname] = sentinel - local actual_arg = _G.arg - _G.arg = { modname } - local res = init (modname) - if res then - _LOADED[modname] = res - end - _G.arg = actual_arg - if _LOADED[modname] == sentinel then - _LOADED[modname] = true - end - return _LOADED[modname] -end - - --- findtable -local function findtable (t, f) - assert (type(f)=="string", "not a valid field name ("..tostring(f)..")") - local ff = f.."." - local ok, e, w = find (ff, '(.-)%.', 1) - while ok do - local nt = rawget (t, w) - if not nt then - nt = {} - t[w] = nt - elseif type(t) ~= "table" then - return sub (f, e+1) - end - t = nt - ok, e, w = find (ff, '(.-)%.', e+1) - end - return t -end - --- --- new package.seeall function --- -function _PACKAGE.seeall (module) - local t = type(module) - assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")") - local meta = getmetatable (module) - if not meta then - meta = {} - setmetatable (module, meta) - end - meta.__index = _G -end - - --- --- new module function --- -function _G.module (modname, ...) - local ns = _LOADED[modname] - if type(ns) ~= "table" then - ns = findtable (_G, modname) - if not ns then - error (string.format ("name conflict for module '%s'", modname)) - end - _LOADED[modname] = ns - end - if not ns._NAME then - ns._NAME = modname - ns._M = ns - ns._PACKAGE = gsub (modname, "[^.]*$", "") - end - setfenv (2, ns) - for i, f in ipairs (arg) do - f (ns) - end -end diff --git a/packages/lang/luafilesystem/Makefile b/packages/lang/luafilesystem/Makefile deleted file mode 100644 index a59f4515..00000000 --- a/packages/lang/luafilesystem/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2008-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luafilesystem -PKG_VERSION:=1.8.0 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_MIRROR_HASH:=69c676dd811fc77e205b1b8064017536fade1be47e50ba785c243a5d7540cdf6 -PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git -PKG_SOURCE_VERSION:=v$(subst .,_,$(PKG_VERSION)) -PKG_SOURCE_PROTO:=git - -include $(INCLUDE_DIR)/package.mk - -define Package/luafilesystem - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaFileSystem - URL:=http://keplerproject.github.com/luafilesystem/ - MAINTAINER:=W. Michael Petullo - DEPENDS:=+liblua -endef - -define Package/luafilesystem/description - This package contains the LuaFileSystem library, a set of portable - functions for directory creation, listing and deletion and for file - locking. -endef - -define Build/Configure -endef - -TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) - -TARGET_LDFLAGS += -llua - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ - LDFLAGS="$(TARGET_LDFLAGS)" - $(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o -endef - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR)/usr/include - $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua -endef - -define Package/luafilesystem/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so -endef - -$(eval $(call BuildPackage,luafilesystem)) diff --git a/packages/lang/luajit/Makefile b/packages/lang/luajit/Makefile deleted file mode 100644 index c5d86a70..00000000 --- a/packages/lang/luajit/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=luajit -PKG_VERSION:=2.1.0-beta3 -PKG_RELEASE:=7 - -PKG_SOURCE:=LuaJIT-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://luajit.org/download -PKG_HASH:=1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3 -PKG_BUILD_DIR:=$(BUILD_DIR)/LuaJIT-$(PKG_VERSION) - -PKG_MAINTAINER:=Morteza Milani -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYRIGHT -PKG_CPE_ID:=cpe:/a:luajit:luajit - -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - -define Package/luajit - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaJIT - URL:=https://www.luajit.org - DEPENDS:=@HAS_LUAJIT_ARCH -endef - -define Package/luajit/description - LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. *** Requires GCC Multilib on host system to build! *** -endef - -define Package/luajit/config -config HAS_LUAJIT_ARCH - bool - default y if i386||x86_64||arm||armeb||aarch64||powerpc||mips||mipsel||mips64 -endef - -ifeq ($(HOST_ARCH),$(filter $(HOST_ARCH), x86_64 mips64)) - ifeq ($(CONFIG_ARCH_64BIT),) - HOST_BITS := -m32 - endif -endif - -define Build/Compile - $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - HOST_CC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_BITS)" \ - CROSS="$(TARGET_CROSS)" \ - DPREFIX=$(PKG_INSTALL_DIR)/usr \ - PREFIX=/usr \ - TARGET_SYS=Linux \ - TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - BUILDMODE=dynamic - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DPREFIX=$(PKG_INSTALL_DIR)/usr \ - PREFIX=/usr \ - TARGET_SYS=Linux \ - install -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/luajit-2.1 - $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.{h,hpp} $(1)/usr/include/luajit-2.1 - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/luajit.pc $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-$(PKG_VERSION) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) -endef - -define Package/luajit/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-$(PKG_VERSION) $(1)/usr/bin/$(PKG_NAME) -endef - -define Host/Compile - $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ - DPREFIX=$(STAGING_DIR_HOSTPKG) \ - TARGET_CFLAGS="$(HOST_CFLAGS)" \ - TARGET_LDFLAGS="$(HOST_LDFLAGS)" -endef - -define Host/Install - $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ - DPREFIX=$(STAGING_DIR_HOSTPKG) \ - install - $(CP) $(STAGING_DIR_HOSTPKG)/bin/luajit-$(PKG_VERSION) $(STAGING_DIR_HOSTPKG)/bin/$(PKG_NAME) -endef - -$(eval $(call HostBuild,luajit)) -$(eval $(call BuildPackage,luajit)) diff --git a/packages/lang/luajit/patches/010-lua-path.patch b/packages/lang/luajit/patches/010-lua-path.patch deleted file mode 100644 index f752002d..00000000 --- a/packages/lang/luajit/patches/010-lua-path.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -35,8 +35,8 @@ - #ifndef LUA_LMULTILIB - #define LUA_LMULTILIB "lib" - #endif --#define LUA_LROOT "/usr/local" --#define LUA_LUADIR "/lua/5.1/" -+#define LUA_LROOT "/usr" -+#define LUA_LUADIR "/lua/" - #define LUA_LJDIR "/luajit-2.1.0-beta3/" - - #ifdef LUA_ROOT diff --git a/packages/lang/luajit/patches/020-clang.patch b/packages/lang/luajit/patches/020-clang.patch deleted file mode 100644 index e0a53743..00000000 --- a/packages/lang/luajit/patches/020-clang.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/lj_arch.h -+++ b/src/lj_arch.h -@@ -391,9 +391,6 @@ - #endif - #endif - #elif !LJ_TARGET_PS3 --#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) --#error "Need at least GCC 4.3 or newer" --#endif - #endif - #endif - diff --git a/packages/lang/luajit/patches/030_fix_posix_install_with_missing_or_incompatible_ldconfig.patch b/packages/lang/luajit/patches/030_fix_posix_install_with_missing_or_incompatible_ldconfig.patch deleted file mode 100644 index 70f664c1..00000000 --- a/packages/lang/luajit/patches/030_fix_posix_install_with_missing_or_incompatible_ldconfig.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit 18c9cf7d3788a8f7408df45df92fc4ae3bcc0d80 -Author: Mike Pall -Date: Sat Jan 25 17:37:12 2020 +0100 - - Fix POSIX install with missing or incompatible ldconfig. - ---- a/Makefile -+++ b/Makefile -@@ -75,7 +75,7 @@ SYMLINK= ln -sf - INSTALL_X= install -m 0755 - INSTALL_F= install -m 0644 - UNINSTALL= $(RM) --LDCONFIG= ldconfig -n -+LDCONFIG= ldconfig -n 2>/dev/null - SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \ - -e "s|^multilib=.*|multilib=$(MULTILIB)|" - -@@ -121,7 +121,7 @@ install: $(INSTALL_DEP) - $(RM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) - cd src && test -f $(FILE_SO) && \ - $(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \ -- $(LDCONFIG) $(INSTALL_LIB) && \ -+ ( $(LDCONFIG) $(INSTALL_LIB) || : ) && \ - $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \ - $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || : - cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN) diff --git a/packages/lang/luajit/patches/040-softfloat-ppc.patch b/packages/lang/luajit/patches/040-softfloat-ppc.patch deleted file mode 100644 index c424b9e6..00000000 --- a/packages/lang/luajit/patches/040-softfloat-ppc.patch +++ /dev/null @@ -1,2742 +0,0 @@ -From fd37da0d586c331b0008fbfd653a9659344fe76f Mon Sep 17 00:00:00 2001 -From: Mike Pall -Date: Wed, 26 Jul 2017 09:52:19 +0200 -Subject: [PATCH] PPC: Add soft-float support to interpreter. - -Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com. -Sponsored by Cisco Systems, Inc. ---- - src/host/buildvm_asm.c | 2 +- - src/lj_arch.h | 29 +- - src/lj_ccall.c | 38 +- - src/lj_ccall.h | 4 +- - src/lj_ccallback.c | 30 +- - src/lj_frame.h | 2 +- - src/lj_ircall.h | 2 +- - src/vm_ppc.dasc | 1249 +++++++++++++++++++++++++++++++++------- - 8 files changed, 1101 insertions(+), 255 deletions(-) - ---- a/src/host/buildvm_asm.c -+++ b/src/host/buildvm_asm.c -@@ -338,7 +338,7 @@ void emit_asm(BuildCtx *ctx) - #if !(LJ_TARGET_PS3 || LJ_TARGET_PSVITA) - fprintf(ctx->fp, "\t.section .note.GNU-stack,\"\"," ELFASM_PX "progbits\n"); - #endif --#if LJ_TARGET_PPC && !LJ_TARGET_PS3 -+#if LJ_TARGET_PPC && !LJ_TARGET_PS3 && !LJ_ABI_SOFTFP - /* Hard-float ABI. */ - fprintf(ctx->fp, "\t.gnu_attribute 4, 1\n"); - #endif ---- a/src/lj_arch.h -+++ b/src/lj_arch.h -@@ -254,6 +254,29 @@ - #else - #define LJ_ARCH_BITS 32 - #define LJ_ARCH_NAME "ppc" -+ -+#if !defined(LJ_ARCH_HASFPU) -+#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) -+#define LJ_ARCH_HASFPU 0 -+#else -+#define LJ_ARCH_HASFPU 1 -+#endif -+#endif -+ -+#if !defined(LJ_ABI_SOFTFP) -+#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) -+#define LJ_ABI_SOFTFP 1 -+#else -+#define LJ_ABI_SOFTFP 0 -+#endif -+#endif -+#endif -+ -+#if LJ_ABI_SOFTFP -+#define LJ_ARCH_NOJIT 1 /* NYI */ -+#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL -+#else -+#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL_SINGLE - #endif - - #define LJ_TARGET_PPC 1 -@@ -262,7 +285,6 @@ - #define LJ_TARGET_MASKSHIFT 0 - #define LJ_TARGET_MASKROT 1 - #define LJ_TARGET_UNIFYROT 1 /* Want only IR_BROL. */ --#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL_SINGLE - - #if LJ_TARGET_CONSOLE - #define LJ_ARCH_PPC32ON64 1 -@@ -415,16 +437,13 @@ - #error "No support for ILP32 model on ARM64" - #endif - #elif LJ_TARGET_PPC --#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) --#error "No support for PowerPC CPUs without double-precision FPU" --#endif - #if !LJ_ARCH_PPC64 && LJ_ARCH_ENDIAN == LUAJIT_LE - #error "No support for little-endian PPC32" - #endif - #if LJ_ARCH_PPC64 - #error "No support for PowerPC 64 bit mode (yet)" - #endif --#ifdef __NO_FPRS__ -+#if defined(__NO_FPRS__) && !defined(_SOFT_FLOAT) - #error "No support for PPC/e500 anymore (use LuaJIT 2.0)" - #endif - #elif LJ_TARGET_MIPS32 ---- a/src/lj_ccall.c -+++ b/src/lj_ccall.c -@@ -387,6 +387,24 @@ - #define CCALL_HANDLE_COMPLEXARG \ - /* Pass complex by value in 2 or 4 GPRs. */ - -+#define CCALL_HANDLE_GPR \ -+ /* Try to pass argument in GPRs. */ \ -+ if (n > 1) { \ -+ lua_assert(n == 2 || n == 4); /* int64_t or complex (float). */ \ -+ if (ctype_isinteger(d->info) || ctype_isfp(d->info)) \ -+ ngpr = (ngpr + 1u) & ~1u; /* Align int64_t to regpair. */ \ -+ else if (ngpr + n > maxgpr) \ -+ ngpr = maxgpr; /* Prevent reordering. */ \ -+ } \ -+ if (ngpr + n <= maxgpr) { \ -+ dp = &cc->gpr[ngpr]; \ -+ ngpr += n; \ -+ goto done; \ -+ } \ -+ -+#if LJ_ABI_SOFTFP -+#define CCALL_HANDLE_REGARG CCALL_HANDLE_GPR -+#else - #define CCALL_HANDLE_REGARG \ - if (isfp) { /* Try to pass argument in FPRs. */ \ - if (nfpr + 1 <= CCALL_NARG_FPR) { \ -@@ -395,24 +413,16 @@ - d = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ \ - goto done; \ - } \ -- } else { /* Try to pass argument in GPRs. */ \ -- if (n > 1) { \ -- lua_assert(n == 2 || n == 4); /* int64_t or complex (float). */ \ -- if (ctype_isinteger(d->info)) \ -- ngpr = (ngpr + 1u) & ~1u; /* Align int64_t to regpair. */ \ -- else if (ngpr + n > maxgpr) \ -- ngpr = maxgpr; /* Prevent reordering. */ \ -- } \ -- if (ngpr + n <= maxgpr) { \ -- dp = &cc->gpr[ngpr]; \ -- ngpr += n; \ -- goto done; \ -- } \ -+ } else { \ -+ CCALL_HANDLE_GPR \ - } -+#endif - -+#if !LJ_ABI_SOFTFP - #define CCALL_HANDLE_RET \ - if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ - ctr = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ -+#endif - - #elif LJ_TARGET_MIPS32 - /* -- MIPS o32 calling conventions ---------------------------------------- */ -@@ -1080,7 +1090,7 @@ static int ccall_set_args(lua_State *L, - } - if (fid) lj_err_caller(L, LJ_ERR_FFI_NUMARG); /* Too few arguments. */ - --#if LJ_TARGET_X64 || LJ_TARGET_PPC -+#if LJ_TARGET_X64 || (LJ_TARGET_PPC && !LJ_ABI_SOFTFP) - cc->nfpr = nfpr; /* Required for vararg functions. */ - #endif - cc->nsp = nsp; ---- a/src/lj_ccall.h -+++ b/src/lj_ccall.h -@@ -86,9 +86,9 @@ typedef union FPRArg { - #elif LJ_TARGET_PPC - - #define CCALL_NARG_GPR 8 --#define CCALL_NARG_FPR 8 -+#define CCALL_NARG_FPR (LJ_ABI_SOFTFP ? 0 : 8) - #define CCALL_NRET_GPR 4 /* For complex double. */ --#define CCALL_NRET_FPR 1 -+#define CCALL_NRET_FPR (LJ_ABI_SOFTFP ? 0 : 1) - #define CCALL_SPS_EXTRA 4 - #define CCALL_SPS_FREE 0 - ---- a/src/lj_ccallback.c -+++ b/src/lj_ccallback.c -@@ -419,6 +419,23 @@ void lj_ccallback_mcode_free(CTState *ct - - #elif LJ_TARGET_PPC - -+#define CALLBACK_HANDLE_GPR \ -+ if (n > 1) { \ -+ lua_assert(((LJ_ABI_SOFTFP && ctype_isnum(cta->info)) || /* double. */ \ -+ ctype_isinteger(cta->info)) && n == 2); /* int64_t. */ \ -+ ngpr = (ngpr + 1u) & ~1u; /* Align int64_t to regpair. */ \ -+ } \ -+ if (ngpr + n <= maxgpr) { \ -+ sp = &cts->cb.gpr[ngpr]; \ -+ ngpr += n; \ -+ goto done; \ -+ } -+ -+#if LJ_ABI_SOFTFP -+#define CALLBACK_HANDLE_REGARG \ -+ CALLBACK_HANDLE_GPR \ -+ UNUSED(isfp); -+#else - #define CALLBACK_HANDLE_REGARG \ - if (isfp) { \ - if (nfpr + 1 <= CCALL_NARG_FPR) { \ -@@ -427,20 +444,15 @@ void lj_ccallback_mcode_free(CTState *ct - goto done; \ - } \ - } else { /* Try to pass argument in GPRs. */ \ -- if (n > 1) { \ -- lua_assert(ctype_isinteger(cta->info) && n == 2); /* int64_t. */ \ -- ngpr = (ngpr + 1u) & ~1u; /* Align int64_t to regpair. */ \ -- } \ -- if (ngpr + n <= maxgpr) { \ -- sp = &cts->cb.gpr[ngpr]; \ -- ngpr += n; \ -- goto done; \ -- } \ -+ CALLBACK_HANDLE_GPR \ - } -+#endif - -+#if !LJ_ABI_SOFTFP - #define CALLBACK_HANDLE_RET \ - if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ - *(double *)dp = *(float *)dp; /* FPRs always hold doubles. */ -+#endif - - #elif LJ_TARGET_MIPS32 - ---- a/src/lj_frame.h -+++ b/src/lj_frame.h -@@ -226,7 +226,7 @@ enum { LJ_CONT_TAILCALL, LJ_CONT_FFI_CAL - #define CFRAME_OFS_L 36 - #define CFRAME_OFS_PC 32 - #define CFRAME_OFS_MULTRES 28 --#define CFRAME_SIZE 272 -+#define CFRAME_SIZE (LJ_ARCH_HASFPU ? 272 : 128) - #define CFRAME_SHIFT_MULTRES 3 - #endif - #elif LJ_TARGET_MIPS32 ---- a/src/lj_ircall.h -+++ b/src/lj_ircall.h -@@ -272,7 +272,7 @@ LJ_DATA const CCallInfo lj_ir_callinfo[I - #define fp64_f2l __aeabi_f2lz - #define fp64_f2ul __aeabi_f2ulz - #endif --#elif LJ_TARGET_MIPS -+#elif LJ_TARGET_MIPS || LJ_TARGET_PPC - #define softfp_add __adddf3 - #define softfp_sub __subdf3 - #define softfp_mul __muldf3 ---- a/src/vm_ppc.dasc -+++ b/src/vm_ppc.dasc -@@ -103,6 +103,18 @@ - |// Fixed register assignments for the interpreter. - |// Don't use: r1 = sp, r2 and r13 = reserved (TOC, TLS or SDATA) - | -+|.macro .FPU, a, b -+|.if FPU -+| a, b -+|.endif -+|.endmacro -+| -+|.macro .FPU, a, b, c -+|.if FPU -+| a, b, c -+|.endif -+|.endmacro -+| - |// The following must be C callee-save (but BASE is often refetched). - |.define BASE, r14 // Base of current Lua stack frame. - |.define KBASE, r15 // Constants of current Lua function. -@@ -116,8 +128,10 @@ - |.define TISNUM, r22 - |.define TISNIL, r23 - |.define ZERO, r24 -+|.if FPU - |.define TOBIT, f30 // 2^52 + 2^51. - |.define TONUM, f31 // 2^52 + 2^51 + 2^31. -+|.endif - | - |// The following temporaries are not saved across C calls, except for RA. - |.define RA, r20 // Callee-save. -@@ -133,6 +147,7 @@ - | - |// Saved temporaries. - |.define SAVE0, r21 -+|.define SAVE1, r25 - | - |// Calling conventions. - |.define CARG1, r3 -@@ -141,8 +156,10 @@ - |.define CARG4, r6 // Overlaps TMP3. - |.define CARG5, r7 // Overlaps INS. - | -+|.if FPU - |.define FARG1, f1 - |.define FARG2, f2 -+|.endif - | - |.define CRET1, r3 - |.define CRET2, r4 -@@ -213,10 +230,16 @@ - |.endif - |.else - | -+|.if FPU - |.define SAVE_LR, 276(sp) - |.define CFRAME_SPACE, 272 // Delta for sp. - |// Back chain for sp: 272(sp) <-- sp entering interpreter - |.define SAVE_FPR_, 128 // .. 128+18*8: 64 bit FPR saves. -+|.else -+|.define SAVE_LR, 132(sp) -+|.define CFRAME_SPACE, 128 // Delta for sp. -+|// Back chain for sp: 128(sp) <-- sp entering interpreter -+|.endif - |.define SAVE_GPR_, 56 // .. 56+18*4: 32 bit GPR saves. - |.define SAVE_CR, 52(sp) // 32 bit CR save. - |.define SAVE_ERRF, 48(sp) // 32 bit C frame info. -@@ -226,16 +249,25 @@ - |.define SAVE_PC, 32(sp) - |.define SAVE_MULTRES, 28(sp) - |.define UNUSED1, 24(sp) -+|.if FPU - |.define TMPD_LO, 20(sp) - |.define TMPD_HI, 16(sp) - |.define TONUM_LO, 12(sp) - |.define TONUM_HI, 8(sp) -+|.else -+|.define SFSAVE_4, 20(sp) -+|.define SFSAVE_3, 16(sp) -+|.define SFSAVE_2, 12(sp) -+|.define SFSAVE_1, 8(sp) -+|.endif - |// Next frame lr: 4(sp) - |// Back chain for sp: 0(sp) <-- sp while in interpreter - | -+|.if FPU - |.define TMPD_BLO, 23(sp) - |.define TMPD, TMPD_HI - |.define TONUM_D, TONUM_HI -+|.endif - | - |.endif - | -@@ -245,7 +277,7 @@ - |.else - | stw r..reg, SAVE_GPR_+(reg-14)*4(sp) - |.endif --| stfd f..reg, SAVE_FPR_+(reg-14)*8(sp) -+| .FPU stfd f..reg, SAVE_FPR_+(reg-14)*8(sp) - |.endmacro - |.macro rest_, reg - |.if GPR64 -@@ -253,7 +285,7 @@ - |.else - | lwz r..reg, SAVE_GPR_+(reg-14)*4(sp) - |.endif --| lfd f..reg, SAVE_FPR_+(reg-14)*8(sp) -+| .FPU lfd f..reg, SAVE_FPR_+(reg-14)*8(sp) - |.endmacro - | - |.macro saveregs -@@ -323,6 +355,7 @@ - |// Trap for not-yet-implemented parts. - |.macro NYI; tw 4, sp, sp; .endmacro - | -+|.if FPU - |// int/FP conversions. - |.macro tonum_i, freg, reg - | xoris reg, reg, 0x8000 -@@ -346,6 +379,7 @@ - |.macro toint, reg, freg - | toint reg, freg, freg - |.endmacro -+|.endif - | - |//----------------------------------------------------------------------- - | -@@ -533,9 +567,19 @@ static void build_subroutines(BuildCtx * - | beq >2 - |1: - | addic. TMP1, TMP1, -8 -+ |.if FPU - | lfd f0, 0(RA) -+ |.else -+ | lwz CARG1, 0(RA) -+ | lwz CARG2, 4(RA) -+ |.endif - | addi RA, RA, 8 -+ |.if FPU - | stfd f0, 0(BASE) -+ |.else -+ | stw CARG1, 0(BASE) -+ | stw CARG2, 4(BASE) -+ |.endif - | addi BASE, BASE, 8 - | bney <1 - | -@@ -613,23 +657,23 @@ static void build_subroutines(BuildCtx * - | .toc ld TOCREG, SAVE_TOC - | li TISNUM, LJ_TISNUM // Setup type comparison constants. - | lp BASE, L->base -- | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). -+ | .FPU lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). - | lwz DISPATCH, L->glref // Setup pointer to dispatch table. - | li ZERO, 0 -- | stw TMP3, TMPD -+ | .FPU stw TMP3, TMPD - | li TMP1, LJ_TFALSE -- | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -+ | .FPU ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). - | li TISNIL, LJ_TNIL - | li_vmstate INTERP -- | lfs TOBIT, TMPD -+ | .FPU lfs TOBIT, TMPD - | lwz PC, FRAME_PC(BASE) // Fetch PC of previous frame. - | la RA, -8(BASE) // Results start at BASE-8. -- | stw TMP3, TMPD -+ | .FPU stw TMP3, TMPD - | addi DISPATCH, DISPATCH, GG_G2DISP - | stw TMP1, 0(RA) // Prepend false to error message. - | li RD, 16 // 2 results: false + error message. - | st_vmstate -- | lfs TONUM, TMPD -+ | .FPU lfs TONUM, TMPD - | b ->vm_returnc - | - |//----------------------------------------------------------------------- -@@ -690,22 +734,22 @@ static void build_subroutines(BuildCtx * - | li TISNUM, LJ_TISNUM // Setup type comparison constants. - | lp TMP1, L->top - | lwz PC, FRAME_PC(BASE) -- | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). -+ | .FPU lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). - | stb CARG3, L->status -- | stw TMP3, TMPD -- | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -- | lfs TOBIT, TMPD -+ | .FPU stw TMP3, TMPD -+ | .FPU ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -+ | .FPU lfs TOBIT, TMPD - | sub RD, TMP1, BASE -- | stw TMP3, TMPD -- | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) -+ | .FPU stw TMP3, TMPD -+ | .FPU lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) - | addi RD, RD, 8 -- | stw TMP0, TONUM_HI -+ | .FPU stw TMP0, TONUM_HI - | li_vmstate INTERP - | li ZERO, 0 - | st_vmstate - | andix. TMP0, PC, FRAME_TYPE - | mr MULTRES, RD -- | lfs TONUM, TMPD -+ | .FPU lfs TONUM, TMPD - | li TISNIL, LJ_TNIL - | beq ->BC_RET_Z - | b ->vm_return -@@ -739,19 +783,19 @@ static void build_subroutines(BuildCtx * - | lp TMP2, L->base // TMP2 = old base (used in vmeta_call). - | li TISNUM, LJ_TISNUM // Setup type comparison constants. - | lp TMP1, L->top -- | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). -+ | .FPU lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). - | add PC, PC, BASE -- | stw TMP3, TMPD -+ | .FPU stw TMP3, TMPD - | li ZERO, 0 -- | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -- | lfs TOBIT, TMPD -+ | .FPU ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -+ | .FPU lfs TOBIT, TMPD - | sub PC, PC, TMP2 // PC = frame delta + frame type -- | stw TMP3, TMPD -- | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) -+ | .FPU stw TMP3, TMPD -+ | .FPU lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) - | sub NARGS8:RC, TMP1, BASE -- | stw TMP0, TONUM_HI -+ | .FPU stw TMP0, TONUM_HI - | li_vmstate INTERP -- | lfs TONUM, TMPD -+ | .FPU lfs TONUM, TMPD - | li TISNIL, LJ_TNIL - | st_vmstate - | -@@ -839,15 +883,30 @@ static void build_subroutines(BuildCtx * - | lwz INS, -4(PC) - | subi CARG2, RB, 16 - | decode_RB8 SAVE0, INS -+ |.if FPU - | lfd f0, 0(RA) -+ |.else -+ | lwz TMP2, 0(RA) -+ | lwz TMP3, 4(RA) -+ |.endif - | add TMP1, BASE, SAVE0 - | stp BASE, L->base - | cmplw TMP1, CARG2 - | sub CARG3, CARG2, TMP1 - | decode_RA8 RA, INS -+ |.if FPU - | stfd f0, 0(CARG2) -+ |.else -+ | stw TMP2, 0(CARG2) -+ | stw TMP3, 4(CARG2) -+ |.endif - | bney ->BC_CAT_Z -+ |.if FPU - | stfdx f0, BASE, RA -+ |.else -+ | stwux TMP2, RA, BASE -+ | stw TMP3, 4(RA) -+ |.endif - | b ->cont_nop - | - |//-- Table indexing metamethods ----------------------------------------- -@@ -900,9 +959,19 @@ static void build_subroutines(BuildCtx * - | // Returns TValue * (finished) or NULL (metamethod). - | cmplwi CRET1, 0 - | beq >3 -+ |.if FPU - | lfd f0, 0(CRET1) -+ |.else -+ | lwz TMP0, 0(CRET1) -+ | lwz TMP1, 4(CRET1) -+ |.endif - | ins_next1 -+ |.if FPU - | stfdx f0, BASE, RA -+ |.else -+ | stwux TMP0, RA, BASE -+ | stw TMP1, 4(RA) -+ |.endif - | ins_next2 - | - |3: // Call __index metamethod. -@@ -920,7 +989,12 @@ static void build_subroutines(BuildCtx * - | // Returns cTValue * or NULL. - | cmplwi CRET1, 0 - | beq >1 -+ |.if FPU - | lfd f14, 0(CRET1) -+ |.else -+ | lwz SAVE0, 0(CRET1) -+ | lwz SAVE1, 4(CRET1) -+ |.endif - | b ->BC_TGETR_Z - |1: - | stwx TISNIL, BASE, RA -@@ -975,11 +1049,21 @@ static void build_subroutines(BuildCtx * - | bl extern lj_meta_tset // (lua_State *L, TValue *o, TValue *k) - | // Returns TValue * (finished) or NULL (metamethod). - | cmplwi CRET1, 0 -+ |.if FPU - | lfdx f0, BASE, RA -+ |.else -+ | lwzux TMP2, RA, BASE -+ | lwz TMP3, 4(RA) -+ |.endif - | beq >3 - | // NOBARRIER: lj_meta_tset ensures the table is not black. - | ins_next1 -+ |.if FPU - | stfd f0, 0(CRET1) -+ |.else -+ | stw TMP2, 0(CRET1) -+ | stw TMP3, 4(CRET1) -+ |.endif - | ins_next2 - | - |3: // Call __newindex metamethod. -@@ -990,7 +1074,12 @@ static void build_subroutines(BuildCtx * - | add PC, TMP1, BASE - | lwz LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. - | li NARGS8:RC, 24 // 3 args for func(t, k, v) -+ |.if FPU - | stfd f0, 16(BASE) // Copy value to third argument. -+ |.else -+ | stw TMP2, 16(BASE) -+ | stw TMP3, 20(BASE) -+ |.endif - | b ->vm_call_dispatch_f - | - |->vmeta_tsetr: -@@ -998,7 +1087,12 @@ static void build_subroutines(BuildCtx * - | stw PC, SAVE_PC - | bl extern lj_tab_setinth // (lua_State *L, GCtab *t, int32_t key) - | // Returns TValue *. -+ |.if FPU - | stfd f14, 0(CRET1) -+ |.else -+ | stw SAVE0, 0(CRET1) -+ | stw SAVE1, 4(CRET1) -+ |.endif - | b ->cont_nop - | - |//-- Comparison metamethods --------------------------------------------- -@@ -1037,9 +1131,19 @@ static void build_subroutines(BuildCtx * - | - |->cont_ra: // RA = resultptr - | lwz INS, -4(PC) -+ |.if FPU - | lfd f0, 0(RA) -+ |.else -+ | lwz CARG1, 0(RA) -+ | lwz CARG2, 4(RA) -+ |.endif - | decode_RA8 TMP1, INS -+ |.if FPU - | stfdx f0, BASE, TMP1 -+ |.else -+ | stwux CARG1, TMP1, BASE -+ | stw CARG2, 4(TMP1) -+ |.endif - | b ->cont_nop - | - |->cont_condt: // RA = resultptr -@@ -1245,22 +1349,32 @@ static void build_subroutines(BuildCtx * - |.macro .ffunc_n, name - |->ff_ .. name: - | cmplwi NARGS8:RC, 8 -- | lwz CARG3, 0(BASE) -+ | lwz CARG1, 0(BASE) -+ |.if FPU - | lfd FARG1, 0(BASE) -+ |.else -+ | lwz CARG2, 4(BASE) -+ |.endif - | blt ->fff_fallback -- | checknum CARG3; bge ->fff_fallback -+ | checknum CARG1; bge ->fff_fallback - |.endmacro - | - |.macro .ffunc_nn, name - |->ff_ .. name: - | cmplwi NARGS8:RC, 16 -- | lwz CARG3, 0(BASE) -+ | lwz CARG1, 0(BASE) -+ |.if FPU - | lfd FARG1, 0(BASE) -- | lwz CARG4, 8(BASE) -+ | lwz CARG3, 8(BASE) - | lfd FARG2, 8(BASE) -+ |.else -+ | lwz CARG2, 4(BASE) -+ | lwz CARG3, 8(BASE) -+ | lwz CARG4, 12(BASE) -+ |.endif - | blt ->fff_fallback -+ | checknum CARG1; bge ->fff_fallback - | checknum CARG3; bge ->fff_fallback -- | checknum CARG4; bge ->fff_fallback - |.endmacro - | - |// Inlined GC threshold check. Caveat: uses TMP0 and TMP1. -@@ -1281,14 +1395,21 @@ static void build_subroutines(BuildCtx * - | bge cr1, ->fff_fallback - | stw CARG3, 0(RA) - | addi RD, NARGS8:RC, 8 // Compute (nresults+1)*8. -+ | addi TMP1, BASE, 8 -+ | add TMP2, RA, NARGS8:RC - | stw CARG1, 4(RA) - | beq ->fff_res // Done if exactly 1 argument. -- | li TMP1, 8 -- | subi RC, RC, 8 - |1: -- | cmplw TMP1, RC -- | lfdx f0, BASE, TMP1 -- | stfdx f0, RA, TMP1 -+ | cmplw TMP1, TMP2 -+ |.if FPU -+ | lfd f0, 0(TMP1) -+ | stfd f0, 0(TMP1) -+ |.else -+ | lwz CARG1, 0(TMP1) -+ | lwz CARG2, 4(TMP1) -+ | stw CARG1, -8(TMP1) -+ | stw CARG2, -4(TMP1) -+ |.endif - | addi TMP1, TMP1, 8 - | bney <1 - | b ->fff_res -@@ -1303,8 +1424,14 @@ static void build_subroutines(BuildCtx * - | orc TMP1, TMP2, TMP0 - | addi TMP1, TMP1, ~LJ_TISNUM+1 - | slwi TMP1, TMP1, 3 -+ |.if FPU - | la TMP2, CFUNC:RB->upvalue - | lfdx FARG1, TMP2, TMP1 -+ |.else -+ | add TMP1, CFUNC:RB, TMP1 -+ | lwz CARG1, CFUNC:TMP1->upvalue[0].u32.hi -+ | lwz CARG2, CFUNC:TMP1->upvalue[0].u32.lo -+ |.endif - | b ->fff_resn - | - |//-- Base library: getters and setters --------------------------------- -@@ -1382,7 +1509,12 @@ static void build_subroutines(BuildCtx * - | mr CARG1, L - | bl extern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) - | // Returns cTValue *. -+ |.if FPU - | lfd FARG1, 0(CRET1) -+ |.else -+ | lwz CARG2, 4(CRET1) -+ | lwz CARG1, 0(CRET1) // Caveat: CARG1 == CRET1. -+ |.endif - | b ->fff_resn - | - |//-- Base library: conversions ------------------------------------------ -@@ -1391,7 +1523,11 @@ static void build_subroutines(BuildCtx * - | // Only handles the number case inline (without a base argument). - | cmplwi NARGS8:RC, 8 - | lwz CARG1, 0(BASE) -+ |.if FPU - | lfd FARG1, 0(BASE) -+ |.else -+ | lwz CARG2, 4(BASE) -+ |.endif - | bne ->fff_fallback // Exactly one argument. - | checknum CARG1; bgt ->fff_fallback - | b ->fff_resn -@@ -1442,12 +1578,23 @@ static void build_subroutines(BuildCtx * - | cmplwi CRET1, 0 - | li CARG3, LJ_TNIL - | beq ->fff_restv // End of traversal: return nil. -- | lfd f0, 8(BASE) // Copy key and value to results. - | la RA, -8(BASE) -+ |.if FPU -+ | lfd f0, 8(BASE) // Copy key and value to results. - | lfd f1, 16(BASE) - | stfd f0, 0(RA) -- | li RD, (2+1)*8 - | stfd f1, 8(RA) -+ |.else -+ | lwz CARG1, 8(BASE) -+ | lwz CARG2, 12(BASE) -+ | lwz CARG3, 16(BASE) -+ | lwz CARG4, 20(BASE) -+ | stw CARG1, 0(RA) -+ | stw CARG2, 4(RA) -+ | stw CARG3, 8(RA) -+ | stw CARG4, 12(RA) -+ |.endif -+ | li RD, (2+1)*8 - | b ->fff_res - | - |.ffunc_1 pairs -@@ -1456,17 +1603,32 @@ static void build_subroutines(BuildCtx * - | bne ->fff_fallback - #if LJ_52 - | lwz TAB:TMP2, TAB:CARG1->metatable -+ |.if FPU - | lfd f0, CFUNC:RB->upvalue[0] -+ |.else -+ | lwz TMP0, CFUNC:RB->upvalue[0].u32.hi -+ | lwz TMP1, CFUNC:RB->upvalue[0].u32.lo -+ |.endif - | cmplwi TAB:TMP2, 0 - | la RA, -8(BASE) - | bne ->fff_fallback - #else -+ |.if FPU - | lfd f0, CFUNC:RB->upvalue[0] -+ |.else -+ | lwz TMP0, CFUNC:RB->upvalue[0].u32.hi -+ | lwz TMP1, CFUNC:RB->upvalue[0].u32.lo -+ |.endif - | la RA, -8(BASE) - #endif - | stw TISNIL, 8(BASE) - | li RD, (3+1)*8 -+ |.if FPU - | stfd f0, 0(RA) -+ |.else -+ | stw TMP0, 0(RA) -+ | stw TMP1, 4(RA) -+ |.endif - | b ->fff_res - | - |.ffunc ipairs_aux -@@ -1512,14 +1674,24 @@ static void build_subroutines(BuildCtx * - | stfd FARG2, 0(RA) - |.endif - | ble >2 // Not in array part? -+ |.if FPU - | lwzx TMP2, TMP1, TMP3 - | lfdx f0, TMP1, TMP3 -+ |.else -+ | lwzux TMP2, TMP1, TMP3 -+ | lwz TMP3, 4(TMP1) -+ |.endif - |1: - | checknil TMP2 - | li RD, (0+1)*8 - | beq ->fff_res // End of iteration, return 0 results. - | li RD, (2+1)*8 -+ |.if FPU - | stfd f0, 8(RA) -+ |.else -+ | stw TMP2, 8(RA) -+ | stw TMP3, 12(RA) -+ |.endif - | b ->fff_res - |2: // Check for empty hash part first. Otherwise call C function. - | lwz TMP0, TAB:CARG1->hmask -@@ -1533,7 +1705,11 @@ static void build_subroutines(BuildCtx * - | li RD, (0+1)*8 - | beq ->fff_res - | lwz TMP2, 0(CRET1) -+ |.if FPU - | lfd f0, 0(CRET1) -+ |.else -+ | lwz TMP3, 4(CRET1) -+ |.endif - | b <1 - | - |.ffunc_1 ipairs -@@ -1542,12 +1718,22 @@ static void build_subroutines(BuildCtx * - | bne ->fff_fallback - #if LJ_52 - | lwz TAB:TMP2, TAB:CARG1->metatable -+ |.if FPU - | lfd f0, CFUNC:RB->upvalue[0] -+ |.else -+ | lwz TMP0, CFUNC:RB->upvalue[0].u32.hi -+ | lwz TMP1, CFUNC:RB->upvalue[0].u32.lo -+ |.endif - | cmplwi TAB:TMP2, 0 - | la RA, -8(BASE) - | bne ->fff_fallback - #else -+ |.if FPU - | lfd f0, CFUNC:RB->upvalue[0] -+ |.else -+ | lwz TMP0, CFUNC:RB->upvalue[0].u32.hi -+ | lwz TMP1, CFUNC:RB->upvalue[0].u32.lo -+ |.endif - | la RA, -8(BASE) - #endif - |.if DUALNUM -@@ -1557,7 +1743,12 @@ static void build_subroutines(BuildCtx * - |.endif - | stw ZERO, 12(BASE) - | li RD, (3+1)*8 -+ |.if FPU - | stfd f0, 0(RA) -+ |.else -+ | stw TMP0, 0(RA) -+ | stw TMP1, 4(RA) -+ |.endif - | b ->fff_res - | - |//-- Base library: catch errors ---------------------------------------- -@@ -1576,19 +1767,32 @@ static void build_subroutines(BuildCtx * - | - |.ffunc xpcall - | cmplwi NARGS8:RC, 16 -- | lwz CARG4, 8(BASE) -+ | lwz CARG3, 8(BASE) -+ |.if FPU - | lfd FARG2, 8(BASE) - | lfd FARG1, 0(BASE) -+ |.else -+ | lwz CARG1, 0(BASE) -+ | lwz CARG2, 4(BASE) -+ | lwz CARG4, 12(BASE) -+ |.endif - | blt ->fff_fallback - | lbz TMP1, DISPATCH_GL(hookmask)(DISPATCH) - | mr TMP2, BASE -- | checkfunc CARG4; bne ->fff_fallback // Traceback must be a function. -+ | checkfunc CARG3; bne ->fff_fallback // Traceback must be a function. - | la BASE, 16(BASE) - | // Remember active hook before pcall. - | rlwinm TMP1, TMP1, 32-HOOK_ACTIVE_SHIFT, 31, 31 -+ |.if FPU - | stfd FARG2, 0(TMP2) // Swap function and traceback. -- | subi NARGS8:RC, NARGS8:RC, 16 - | stfd FARG1, 8(TMP2) -+ |.else -+ | stw CARG3, 0(TMP2) -+ | stw CARG4, 4(TMP2) -+ | stw CARG1, 8(TMP2) -+ | stw CARG2, 12(TMP2) -+ |.endif -+ | subi NARGS8:RC, NARGS8:RC, 16 - | addi PC, TMP1, 16+FRAME_PCALL - | b ->vm_call_dispatch - | -@@ -1631,9 +1835,21 @@ static void build_subroutines(BuildCtx * - | stp BASE, L->top - |2: // Move args to coroutine. - | cmpw TMP1, NARGS8:RC -+ |.if FPU - | lfdx f0, BASE, TMP1 -+ |.else -+ | add CARG3, BASE, TMP1 -+ | lwz TMP2, 0(CARG3) -+ | lwz TMP3, 4(CARG3) -+ |.endif - | beq >3 -+ |.if FPU - | stfdx f0, CARG2, TMP1 -+ |.else -+ | add CARG3, CARG2, TMP1 -+ | stw TMP2, 0(CARG3) -+ | stw TMP3, 4(CARG3) -+ |.endif - | addi TMP1, TMP1, 8 - | b <2 - |3: -@@ -1664,8 +1880,17 @@ static void build_subroutines(BuildCtx * - | stp TMP2, L:SAVE0->top // Clear coroutine stack. - |5: // Move results from coroutine. - | cmplw TMP1, TMP3 -+ |.if FPU - | lfdx f0, TMP2, TMP1 - | stfdx f0, BASE, TMP1 -+ |.else -+ | add CARG3, TMP2, TMP1 -+ | lwz CARG1, 0(CARG3) -+ | lwz CARG2, 4(CARG3) -+ | add CARG3, BASE, TMP1 -+ | stw CARG1, 0(CARG3) -+ | stw CARG2, 4(CARG3) -+ |.endif - | addi TMP1, TMP1, 8 - | bne <5 - |6: -@@ -1690,12 +1915,22 @@ static void build_subroutines(BuildCtx * - | andix. TMP0, PC, FRAME_TYPE - | la TMP3, -8(TMP3) - | li TMP1, LJ_TFALSE -+ |.if FPU - | lfd f0, 0(TMP3) -+ |.else -+ | lwz CARG1, 0(TMP3) -+ | lwz CARG2, 4(TMP3) -+ |.endif - | stp TMP3, L:SAVE0->top // Remove error from coroutine stack. - | li RD, (2+1)*8 - | stw TMP1, -8(BASE) // Prepend false to results. - | la RA, -8(BASE) -+ |.if FPU - | stfd f0, 0(BASE) // Copy error message. -+ |.else -+ | stw CARG1, 0(BASE) // Copy error message. -+ | stw CARG2, 4(BASE) -+ |.endif - | b <7 - |.else - | mr CARG1, L -@@ -1874,7 +2109,12 @@ static void build_subroutines(BuildCtx * - | lus CARG1, 0x8000 // -(2^31). - | beqy ->fff_resi - |5: -+ |.if FPU - | lfd FARG1, 0(BASE) -+ |.else -+ | lwz CARG1, 0(BASE) -+ | lwz CARG2, 4(BASE) -+ |.endif - | blex func - | b ->fff_resn - |.endmacro -@@ -1898,10 +2138,14 @@ static void build_subroutines(BuildCtx * - | - |.ffunc math_log - | cmplwi NARGS8:RC, 8 -- | lwz CARG3, 0(BASE) -- | lfd FARG1, 0(BASE) -+ | lwz CARG1, 0(BASE) - | bne ->fff_fallback // Need exactly 1 argument. -- | checknum CARG3; bge ->fff_fallback -+ | checknum CARG1; bge ->fff_fallback -+ |.if FPU -+ | lfd FARG1, 0(BASE) -+ |.else -+ | lwz CARG2, 4(BASE) -+ |.endif - | blex log - | b ->fff_resn - | -@@ -1923,17 +2167,24 @@ static void build_subroutines(BuildCtx * - |.if DUALNUM - |.ffunc math_ldexp - | cmplwi NARGS8:RC, 16 -- | lwz CARG3, 0(BASE) -+ | lwz TMP0, 0(BASE) -+ |.if FPU - | lfd FARG1, 0(BASE) -- | lwz CARG4, 8(BASE) -+ |.else -+ | lwz CARG1, 0(BASE) -+ | lwz CARG2, 4(BASE) -+ |.endif -+ | lwz TMP1, 8(BASE) - |.if GPR64 - | lwz CARG2, 12(BASE) -- |.else -+ |.elif FPU - | lwz CARG1, 12(BASE) -+ |.else -+ | lwz CARG3, 12(BASE) - |.endif - | blt ->fff_fallback -- | checknum CARG3; bge ->fff_fallback -- | checknum CARG4; bne ->fff_fallback -+ | checknum TMP0; bge ->fff_fallback -+ | checknum TMP1; bne ->fff_fallback - |.else - |.ffunc_nn math_ldexp - |.if GPR64 -@@ -1948,8 +2199,10 @@ static void build_subroutines(BuildCtx * - |.ffunc_n math_frexp - |.if GPR64 - | la CARG2, DISPATCH_GL(tmptv)(DISPATCH) -- |.else -+ |.elif FPU - | la CARG1, DISPATCH_GL(tmptv)(DISPATCH) -+ |.else -+ | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) - |.endif - | lwz PC, FRAME_PC(BASE) - | blex frexp -@@ -1958,7 +2211,12 @@ static void build_subroutines(BuildCtx * - |.if not DUALNUM - | tonum_i FARG2, TMP1 - |.endif -+ |.if FPU - | stfd FARG1, 0(RA) -+ |.else -+ | stw CRET1, 0(RA) -+ | stw CRET2, 4(RA) -+ |.endif - | li RD, (2+1)*8 - |.if DUALNUM - | stw TISNUM, 8(RA) -@@ -1971,13 +2229,20 @@ static void build_subroutines(BuildCtx * - |.ffunc_n math_modf - |.if GPR64 - | la CARG2, -8(BASE) -- |.else -+ |.elif FPU - | la CARG1, -8(BASE) -+ |.else -+ | la CARG3, -8(BASE) - |.endif - | lwz PC, FRAME_PC(BASE) - | blex modf - | la RA, -8(BASE) -+ |.if FPU - | stfd FARG1, 0(BASE) -+ |.else -+ | stw CRET1, 0(BASE) -+ | stw CRET2, 4(BASE) -+ |.endif - | li RD, (2+1)*8 - | b ->fff_res - | -@@ -1985,13 +2250,13 @@ static void build_subroutines(BuildCtx * - |.if DUALNUM - | .ffunc_1 name - | checknum CARG3 -- | addi TMP1, BASE, 8 -- | add TMP2, BASE, NARGS8:RC -+ | addi SAVE0, BASE, 8 -+ | add SAVE1, BASE, NARGS8:RC - | bne >4 - |1: // Handle integers. -- | lwz CARG4, 0(TMP1) -- | cmplw cr1, TMP1, TMP2 -- | lwz CARG2, 4(TMP1) -+ | lwz CARG4, 0(SAVE0) -+ | cmplw cr1, SAVE0, SAVE1 -+ | lwz CARG2, 4(SAVE0) - | bge cr1, ->fff_resi - | checknum CARG4 - | xoris TMP0, CARG1, 0x8000 -@@ -2008,36 +2273,76 @@ static void build_subroutines(BuildCtx * - |.if GPR64 - | rldicl CARG1, CARG1, 0, 32 - |.endif -- | addi TMP1, TMP1, 8 -+ | addi SAVE0, SAVE0, 8 - | b <1 - |3: - | bge ->fff_fallback - | // Convert intermediate result to number and continue below. -+ |.if FPU - | tonum_i FARG1, CARG1 -- | lfd FARG2, 0(TMP1) -+ | lfd FARG2, 0(SAVE0) -+ |.else -+ | mr CARG2, CARG1 -+ | bl ->vm_sfi2d_1 -+ | lwz CARG3, 0(SAVE0) -+ | lwz CARG4, 4(SAVE0) -+ |.endif - | b >6 - |4: -+ |.if FPU - | lfd FARG1, 0(BASE) -+ |.else -+ | lwz CARG1, 0(BASE) -+ | lwz CARG2, 4(BASE) -+ |.endif - | bge ->fff_fallback - |5: // Handle numbers. -- | lwz CARG4, 0(TMP1) -- | cmplw cr1, TMP1, TMP2 -- | lfd FARG2, 0(TMP1) -+ | lwz CARG3, 0(SAVE0) -+ | cmplw cr1, SAVE0, SAVE1 -+ |.if FPU -+ | lfd FARG2, 0(SAVE0) -+ |.else -+ | lwz CARG4, 4(SAVE0) -+ |.endif - | bge cr1, ->fff_resn -- | checknum CARG4; bge >7 -+ | checknum CARG3; bge >7 - |6: -+ | addi SAVE0, SAVE0, 8 -+ |.if FPU - | fsub f0, FARG1, FARG2 -- | addi TMP1, TMP1, 8 - |.if ismax - | fsel FARG1, f0, FARG1, FARG2 - |.else - | fsel FARG1, f0, FARG2, FARG1 - |.endif -+ |.else -+ | stw CARG1, SFSAVE_1 -+ | stw CARG2, SFSAVE_2 -+ | stw CARG3, SFSAVE_3 -+ | stw CARG4, SFSAVE_4 -+ | blex __ledf2 -+ | cmpwi CRET1, 0 -+ |.if ismax -+ | blt >8 -+ |.else -+ | bge >8 -+ |.endif -+ | lwz CARG1, SFSAVE_1 -+ | lwz CARG2, SFSAVE_2 -+ | b <5 -+ |8: -+ | lwz CARG1, SFSAVE_3 -+ | lwz CARG2, SFSAVE_4 -+ |.endif - | b <5 - |7: // Convert integer to number and continue above. -- | lwz CARG2, 4(TMP1) -+ | lwz CARG3, 4(SAVE0) - | bne ->fff_fallback -- | tonum_i FARG2, CARG2 -+ |.if FPU -+ | tonum_i FARG2, CARG3 -+ |.else -+ | bl ->vm_sfi2d_2 -+ |.endif - | b <6 - |.else - | .ffunc_n name -@@ -2237,28 +2542,37 @@ static void build_subroutines(BuildCtx * - | - |.macro .ffunc_bit_op, name, ins - | .ffunc_bit name -- | addi TMP1, BASE, 8 -- | add TMP2, BASE, NARGS8:RC -+ | addi SAVE0, BASE, 8 -+ | add SAVE1, BASE, NARGS8:RC - |1: -- | lwz CARG4, 0(TMP1) -- | cmplw cr1, TMP1, TMP2 -+ | lwz CARG4, 0(SAVE0) -+ | cmplw cr1, SAVE0, SAVE1 - |.if DUALNUM -- | lwz CARG2, 4(TMP1) -+ | lwz CARG2, 4(SAVE0) - |.else -- | lfd FARG1, 0(TMP1) -+ | lfd FARG1, 0(SAVE0) - |.endif - | bgey cr1, ->fff_resi - | checknum CARG4 - |.if DUALNUM -+ |.if FPU - | bnel ->fff_bitop_fb - |.else -+ | beq >3 -+ | stw CARG1, SFSAVE_1 -+ | bl ->fff_bitop_fb -+ | mr CARG2, CARG1 -+ | lwz CARG1, SFSAVE_1 -+ |3: -+ |.endif -+ |.else - | fadd FARG1, FARG1, TOBIT - | bge ->fff_fallback - | stfd FARG1, TMPD - | lwz CARG2, TMPD_LO - |.endif - | ins CARG1, CARG1, CARG2 -- | addi TMP1, TMP1, 8 -+ | addi SAVE0, SAVE0, 8 - | b <1 - |.endmacro - | -@@ -2280,7 +2594,14 @@ static void build_subroutines(BuildCtx * - |.macro .ffunc_bit_sh, name, ins, shmod - |.if DUALNUM - | .ffunc_2 bit_..name -+ |.if FPU - | checknum CARG3; bnel ->fff_tobit_fb -+ |.else -+ | checknum CARG3; beq >1 -+ | bl ->fff_tobit_fb -+ | lwz CARG2, 12(BASE) // Conversion polluted CARG2. -+ |1: -+ |.endif - | // Note: no inline conversion from number for 2nd argument! - | checknum CARG4; bne ->fff_fallback - |.else -@@ -2317,27 +2638,77 @@ static void build_subroutines(BuildCtx * - |->fff_resn: - | lwz PC, FRAME_PC(BASE) - | la RA, -8(BASE) -+ |.if FPU - | stfd FARG1, -8(BASE) -+ |.else -+ | stw CARG1, -8(BASE) -+ | stw CARG2, -4(BASE) -+ |.endif - | b ->fff_res1 - | - |// Fallback FP number to bit conversion. - |->fff_tobit_fb: - |.if DUALNUM -+ |.if FPU - | lfd FARG1, 0(BASE) - | bgt ->fff_fallback - | fadd FARG1, FARG1, TOBIT - | stfd FARG1, TMPD - | lwz CARG1, TMPD_LO - | blr -+ |.else -+ | bgt ->fff_fallback -+ | mr CARG2, CARG1 -+ | mr CARG1, CARG3 -+ |// Modifies: CARG1, CARG2, TMP0, TMP1, TMP2. -+ |->vm_tobit: -+ | slwi TMP2, CARG1, 1 -+ | addis TMP2, TMP2, 0x0020 -+ | cmpwi TMP2, 0 -+ | bge >2 -+ | li TMP1, 0x3e0 -+ | srawi TMP2, TMP2, 21 -+ | not TMP1, TMP1 -+ | sub. TMP2, TMP1, TMP2 -+ | cmpwi cr7, CARG1, 0 -+ | blt >1 -+ | slwi TMP1, CARG1, 11 -+ | srwi TMP0, CARG2, 21 -+ | oris TMP1, TMP1, 0x8000 -+ | or TMP1, TMP1, TMP0 -+ | srw CARG1, TMP1, TMP2 -+ | bclr 4, 28 // Return if cr7[lt] == 0, no hint. -+ | neg CARG1, CARG1 -+ | blr -+ |1: -+ | addi TMP2, TMP2, 21 -+ | srw TMP1, CARG2, TMP2 -+ | slwi CARG2, CARG1, 12 -+ | subfic TMP2, TMP2, 20 -+ | slw TMP0, CARG2, TMP2 -+ | or CARG1, TMP1, TMP0 -+ | bclr 4, 28 // Return if cr7[lt] == 0, no hint. -+ | neg CARG1, CARG1 -+ | blr -+ |2: -+ | li CARG1, 0 -+ | blr -+ |.endif - |.endif - |->fff_bitop_fb: - |.if DUALNUM -- | lfd FARG1, 0(TMP1) -+ |.if FPU -+ | lfd FARG1, 0(SAVE0) - | bgt ->fff_fallback - | fadd FARG1, FARG1, TOBIT - | stfd FARG1, TMPD - | lwz CARG2, TMPD_LO - | blr -+ |.else -+ | bgt ->fff_fallback -+ | mr CARG1, CARG4 -+ | b ->vm_tobit -+ |.endif - |.endif - | - |//----------------------------------------------------------------------- -@@ -2530,10 +2901,21 @@ static void build_subroutines(BuildCtx * - | decode_RA8 RC, INS // Call base. - | beq >2 - |1: // Move results down. -+ |.if FPU - | lfd f0, 0(RA) -+ |.else -+ | lwz CARG1, 0(RA) -+ | lwz CARG2, 4(RA) -+ |.endif - | addic. TMP1, TMP1, -8 - | addi RA, RA, 8 -+ |.if FPU - | stfdx f0, BASE, RC -+ |.else -+ | add CARG3, BASE, RC -+ | stw CARG1, 0(CARG3) -+ | stw CARG2, 4(CARG3) -+ |.endif - | addi RC, RC, 8 - | bne <1 - |2: -@@ -2586,10 +2968,12 @@ static void build_subroutines(BuildCtx * - |//----------------------------------------------------------------------- - | - |.macro savex_, a, b, c, d -+ |.if FPU - | stfd f..a, 16+a*8(sp) - | stfd f..b, 16+b*8(sp) - | stfd f..c, 16+c*8(sp) - | stfd f..d, 16+d*8(sp) -+ |.endif - |.endmacro - | - |->vm_exit_handler: -@@ -2661,16 +3045,16 @@ static void build_subroutines(BuildCtx * - | lwz KBASE, PC2PROTO(k)(TMP1) - | // Setup type comparison constants. - | li TISNUM, LJ_TISNUM -- | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). -- | stw TMP3, TMPD -+ | .FPU lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). -+ | .FPU stw TMP3, TMPD - | li ZERO, 0 -- | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -- | lfs TOBIT, TMPD -- | stw TMP3, TMPD -- | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) -+ | .FPU ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -+ | .FPU lfs TOBIT, TMPD -+ | .FPU stw TMP3, TMPD -+ | .FPU lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) - | li TISNIL, LJ_TNIL -- | stw TMP0, TONUM_HI -- | lfs TONUM, TMPD -+ | .FPU stw TMP0, TONUM_HI -+ | .FPU lfs TONUM, TMPD - | // Modified copy of ins_next which handles function header dispatch, too. - | lwz INS, 0(PC) - | addi PC, PC, 4 -@@ -2715,7 +3099,35 @@ static void build_subroutines(BuildCtx * - |//-- Math helper functions ---------------------------------------------- - |//----------------------------------------------------------------------- - | -- |// NYI: Use internal implementations of floor, ceil, trunc. -+ |// NYI: Use internal implementations of floor, ceil, trunc, sfcmp. -+ | -+ |.macro sfi2d, AHI, ALO -+ |.if not FPU -+ | mr. AHI, ALO -+ | bclr 12, 2 // Handle zero first. -+ | srawi TMP0, ALO, 31 -+ | xor TMP1, ALO, TMP0 -+ | sub TMP1, TMP1, TMP0 // Absolute value in TMP1. -+ | cntlzw AHI, TMP1 -+ | andix. TMP0, TMP0, 0x800 // Mask sign bit. -+ | slw TMP1, TMP1, AHI // Align mantissa left with leading 1. -+ | subfic AHI, AHI, 0x3ff+31-1 // Exponent -1 in AHI. -+ | slwi ALO, TMP1, 21 -+ | or AHI, AHI, TMP0 // Sign | Exponent. -+ | srwi TMP1, TMP1, 11 -+ | slwi AHI, AHI, 20 // Align left. -+ | add AHI, AHI, TMP1 // Add mantissa, increment exponent. -+ | blr -+ |.endif -+ |.endmacro -+ | -+ |// Input: CARG2. Output: CARG1, CARG2. Temporaries: TMP0, TMP1. -+ |->vm_sfi2d_1: -+ | sfi2d CARG1, CARG2 -+ | -+ |// Input: CARG4. Output: CARG3, CARG4. Temporaries: TMP0, TMP1. -+ |->vm_sfi2d_2: -+ | sfi2d CARG3, CARG4 - | - |->vm_modi: - | divwo. TMP0, CARG1, CARG2 -@@ -2783,21 +3195,21 @@ static void build_subroutines(BuildCtx * - | addi DISPATCH, r12, GG_G2DISP - | stw r11, CTSTATE->cb.slot - | stw r3, CTSTATE->cb.gpr[0] -- | stfd f1, CTSTATE->cb.fpr[0] -+ | .FPU stfd f1, CTSTATE->cb.fpr[0] - | stw r4, CTSTATE->cb.gpr[1] -- | stfd f2, CTSTATE->cb.fpr[1] -+ | .FPU stfd f2, CTSTATE->cb.fpr[1] - | stw r5, CTSTATE->cb.gpr[2] -- | stfd f3, CTSTATE->cb.fpr[2] -+ | .FPU stfd f3, CTSTATE->cb.fpr[2] - | stw r6, CTSTATE->cb.gpr[3] -- | stfd f4, CTSTATE->cb.fpr[3] -+ | .FPU stfd f4, CTSTATE->cb.fpr[3] - | stw r7, CTSTATE->cb.gpr[4] -- | stfd f5, CTSTATE->cb.fpr[4] -+ | .FPU stfd f5, CTSTATE->cb.fpr[4] - | stw r8, CTSTATE->cb.gpr[5] -- | stfd f6, CTSTATE->cb.fpr[5] -+ | .FPU stfd f6, CTSTATE->cb.fpr[5] - | stw r9, CTSTATE->cb.gpr[6] -- | stfd f7, CTSTATE->cb.fpr[6] -+ | .FPU stfd f7, CTSTATE->cb.fpr[6] - | stw r10, CTSTATE->cb.gpr[7] -- | stfd f8, CTSTATE->cb.fpr[7] -+ | .FPU stfd f8, CTSTATE->cb.fpr[7] - | addi TMP0, sp, CFRAME_SPACE+8 - | stw TMP0, CTSTATE->cb.stack - | mr CARG1, CTSTATE -@@ -2808,21 +3220,21 @@ static void build_subroutines(BuildCtx * - | lp BASE, L:CRET1->base - | li TISNUM, LJ_TISNUM // Setup type comparison constants. - | lp RC, L:CRET1->top -- | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). -+ | .FPU lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). - | li ZERO, 0 - | mr L, CRET1 -- | stw TMP3, TMPD -- | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) -+ | .FPU stw TMP3, TMPD -+ | .FPU lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) - | lwz LFUNC:RB, FRAME_FUNC(BASE) -- | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -- | stw TMP0, TONUM_HI -+ | .FPU ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). -+ | .FPU stw TMP0, TONUM_HI - | li TISNIL, LJ_TNIL - | li_vmstate INTERP -- | lfs TOBIT, TMPD -- | stw TMP3, TMPD -+ | .FPU lfs TOBIT, TMPD -+ | .FPU stw TMP3, TMPD - | sub RC, RC, BASE - | st_vmstate -- | lfs TONUM, TMPD -+ | .FPU lfs TONUM, TMPD - | ins_callt - |.endif - | -@@ -2836,7 +3248,7 @@ static void build_subroutines(BuildCtx * - | mr CARG2, RA - | bl extern lj_ccallback_leave // (CTState *cts, TValue *o) - | lwz CRET1, CTSTATE->cb.gpr[0] -- | lfd FARG1, CTSTATE->cb.fpr[0] -+ | .FPU lfd FARG1, CTSTATE->cb.fpr[0] - | lwz CRET2, CTSTATE->cb.gpr[1] - | b ->vm_leave_unw - |.endif -@@ -2870,14 +3282,14 @@ static void build_subroutines(BuildCtx * - | bge <1 - |2: - | bney cr1, >3 -- | lfd f1, CCSTATE->fpr[0] -- | lfd f2, CCSTATE->fpr[1] -- | lfd f3, CCSTATE->fpr[2] -- | lfd f4, CCSTATE->fpr[3] -- | lfd f5, CCSTATE->fpr[4] -- | lfd f6, CCSTATE->fpr[5] -- | lfd f7, CCSTATE->fpr[6] -- | lfd f8, CCSTATE->fpr[7] -+ | .FPU lfd f1, CCSTATE->fpr[0] -+ | .FPU lfd f2, CCSTATE->fpr[1] -+ | .FPU lfd f3, CCSTATE->fpr[2] -+ | .FPU lfd f4, CCSTATE->fpr[3] -+ | .FPU lfd f5, CCSTATE->fpr[4] -+ | .FPU lfd f6, CCSTATE->fpr[5] -+ | .FPU lfd f7, CCSTATE->fpr[6] -+ | .FPU lfd f8, CCSTATE->fpr[7] - |3: - | lp TMP0, CCSTATE->func - | lwz CARG2, CCSTATE->gpr[1] -@@ -2894,7 +3306,7 @@ static void build_subroutines(BuildCtx * - | lwz TMP2, -4(r14) - | lwz TMP0, 4(r14) - | stw CARG1, CCSTATE:TMP1->gpr[0] -- | stfd FARG1, CCSTATE:TMP1->fpr[0] -+ | .FPU stfd FARG1, CCSTATE:TMP1->fpr[0] - | stw CARG2, CCSTATE:TMP1->gpr[1] - | mtlr TMP0 - | stw CARG3, CCSTATE:TMP1->gpr[2] -@@ -2923,19 +3335,19 @@ static void build_ins(BuildCtx *ctx, BCO - case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: - | // RA = src1*8, RD = src2*8, JMP with RD = target - |.if DUALNUM -- | lwzux TMP0, RA, BASE -+ | lwzux CARG1, RA, BASE - | addi PC, PC, 4 - | lwz CARG2, 4(RA) -- | lwzux TMP1, RD, BASE -+ | lwzux CARG3, RD, BASE - | lwz TMP2, -4(PC) -- | checknum cr0, TMP0 -- | lwz CARG3, 4(RD) -+ | checknum cr0, CARG1 -+ | lwz CARG4, 4(RD) - | decode_RD4 TMP2, TMP2 -- | checknum cr1, TMP1 -- | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) -+ | checknum cr1, CARG3 -+ | addis SAVE0, TMP2, -(BCBIAS_J*4 >> 16) - | bne cr0, >7 - | bne cr1, >8 -- | cmpw CARG2, CARG3 -+ | cmpw CARG2, CARG4 - if (op == BC_ISLT) { - | bge >2 - } else if (op == BC_ISGE) { -@@ -2946,28 +3358,41 @@ static void build_ins(BuildCtx *ctx, BCO - | ble >2 - } - |1: -- | add PC, PC, TMP2 -+ | add PC, PC, SAVE0 - |2: - | ins_next - | - |7: // RA is not an integer. - | bgt cr0, ->vmeta_comp - | // RA is a number. -- | lfd f0, 0(RA) -+ | .FPU lfd f0, 0(RA) - | bgt cr1, ->vmeta_comp - | blt cr1, >4 - | // RA is a number, RD is an integer. -- | tonum_i f1, CARG3 -+ |.if FPU -+ | tonum_i f1, CARG4 -+ |.else -+ | bl ->vm_sfi2d_2 -+ |.endif - | b >5 - | - |8: // RA is an integer, RD is not an integer. - | bgt cr1, ->vmeta_comp - | // RA is an integer, RD is a number. -+ |.if FPU - | tonum_i f0, CARG2 -+ |.else -+ | bl ->vm_sfi2d_1 -+ |.endif - |4: -- | lfd f1, 0(RD) -+ | .FPU lfd f1, 0(RD) - |5: -+ |.if FPU - | fcmpu cr0, f0, f1 -+ |.else -+ | blex __ledf2 -+ | cmpwi CRET1, 0 -+ |.endif - if (op == BC_ISLT) { - | bge <2 - } else if (op == BC_ISGE) { -@@ -3015,42 +3440,42 @@ static void build_ins(BuildCtx *ctx, BCO - vk = op == BC_ISEQV; - | // RA = src1*8, RD = src2*8, JMP with RD = target - |.if DUALNUM -- | lwzux TMP0, RA, BASE -+ | lwzux CARG1, RA, BASE - | addi PC, PC, 4 - | lwz CARG2, 4(RA) -- | lwzux TMP1, RD, BASE -- | checknum cr0, TMP0 -- | lwz TMP2, -4(PC) -- | checknum cr1, TMP1 -- | decode_RD4 TMP2, TMP2 -- | lwz CARG3, 4(RD) -+ | lwzux CARG3, RD, BASE -+ | checknum cr0, CARG1 -+ | lwz SAVE0, -4(PC) -+ | checknum cr1, CARG3 -+ | decode_RD4 SAVE0, SAVE0 -+ | lwz CARG4, 4(RD) - | cror 4*cr7+gt, 4*cr0+gt, 4*cr1+gt -- | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) -+ | addis SAVE0, SAVE0, -(BCBIAS_J*4 >> 16) - if (vk) { - | ble cr7, ->BC_ISEQN_Z - } else { - | ble cr7, ->BC_ISNEN_Z - } - |.else -- | lwzux TMP0, RA, BASE -- | lwz TMP2, 0(PC) -+ | lwzux CARG1, RA, BASE -+ | lwz SAVE0, 0(PC) - | lfd f0, 0(RA) - | addi PC, PC, 4 -- | lwzux TMP1, RD, BASE -- | checknum cr0, TMP0 -- | decode_RD4 TMP2, TMP2 -+ | lwzux CARG3, RD, BASE -+ | checknum cr0, CARG1 -+ | decode_RD4 SAVE0, SAVE0 - | lfd f1, 0(RD) -- | checknum cr1, TMP1 -- | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) -+ | checknum cr1, CARG3 -+ | addis SAVE0, SAVE0, -(BCBIAS_J*4 >> 16) - | bge cr0, >5 - | bge cr1, >5 - | fcmpu cr0, f0, f1 - if (vk) { - | bne >1 -- | add PC, PC, TMP2 -+ | add PC, PC, SAVE0 - } else { - | beq >1 -- | add PC, PC, TMP2 -+ | add PC, PC, SAVE0 - } - |1: - | ins_next -@@ -3058,36 +3483,36 @@ static void build_ins(BuildCtx *ctx, BCO - |5: // Either or both types are not numbers. - |.if not DUALNUM - | lwz CARG2, 4(RA) -- | lwz CARG3, 4(RD) -+ | lwz CARG4, 4(RD) - |.endif - |.if FFI -- | cmpwi cr7, TMP0, LJ_TCDATA -- | cmpwi cr5, TMP1, LJ_TCDATA -+ | cmpwi cr7, CARG1, LJ_TCDATA -+ | cmpwi cr5, CARG3, LJ_TCDATA - |.endif -- | not TMP3, TMP0 -- | cmplw TMP0, TMP1 -- | cmplwi cr1, TMP3, ~LJ_TISPRI // Primitive? -+ | not TMP2, CARG1 -+ | cmplw CARG1, CARG3 -+ | cmplwi cr1, TMP2, ~LJ_TISPRI // Primitive? - |.if FFI - | cror 4*cr7+eq, 4*cr7+eq, 4*cr5+eq - |.endif -- | cmplwi cr6, TMP3, ~LJ_TISTABUD // Table or userdata? -+ | cmplwi cr6, TMP2, ~LJ_TISTABUD // Table or userdata? - |.if FFI - | beq cr7, ->vmeta_equal_cd - |.endif -- | cmplw cr5, CARG2, CARG3 -+ | cmplw cr5, CARG2, CARG4 - | crandc 4*cr0+gt, 4*cr0+eq, 4*cr1+gt // 2: Same type and primitive. - | crorc 4*cr0+lt, 4*cr5+eq, 4*cr0+eq // 1: Same tv or different type. - | crand 4*cr0+eq, 4*cr0+eq, 4*cr5+eq // 0: Same type and same tv. -- | mr SAVE0, PC -+ | mr SAVE1, PC - | cror 4*cr0+eq, 4*cr0+eq, 4*cr0+gt // 0 or 2. - | cror 4*cr0+lt, 4*cr0+lt, 4*cr0+gt // 1 or 2. - if (vk) { - | bne cr0, >6 -- | add PC, PC, TMP2 -+ | add PC, PC, SAVE0 - |6: - } else { - | beq cr0, >6 -- | add PC, PC, TMP2 -+ | add PC, PC, SAVE0 - |6: - } - |.if DUALNUM -@@ -3102,6 +3527,7 @@ static void build_ins(BuildCtx *ctx, BCO - | - | // Different tables or userdatas. Need to check __eq metamethod. - | // Field metatable must be at same offset for GCtab and GCudata! -+ | mr CARG3, CARG4 - | lwz TAB:TMP2, TAB:CARG2->metatable - | li CARG4, 1-vk // ne = 0 or 1. - | cmplwi TAB:TMP2, 0 -@@ -3109,7 +3535,7 @@ static void build_ins(BuildCtx *ctx, BCO - | lbz TMP2, TAB:TMP2->nomm - | andix. TMP2, TMP2, 1<vmeta_equal // Handle __eq metamethod. - break; - -@@ -3150,16 +3576,16 @@ static void build_ins(BuildCtx *ctx, BCO - vk = op == BC_ISEQN; - | // RA = src*8, RD = num_const*8, JMP with RD = target - |.if DUALNUM -- | lwzux TMP0, RA, BASE -+ | lwzux CARG1, RA, BASE - | addi PC, PC, 4 - | lwz CARG2, 4(RA) -- | lwzux TMP1, RD, KBASE -- | checknum cr0, TMP0 -- | lwz TMP2, -4(PC) -- | checknum cr1, TMP1 -- | decode_RD4 TMP2, TMP2 -- | lwz CARG3, 4(RD) -- | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) -+ | lwzux CARG3, RD, KBASE -+ | checknum cr0, CARG1 -+ | lwz SAVE0, -4(PC) -+ | checknum cr1, CARG3 -+ | decode_RD4 SAVE0, SAVE0 -+ | lwz CARG4, 4(RD) -+ | addis SAVE0, SAVE0, -(BCBIAS_J*4 >> 16) - if (vk) { - |->BC_ISEQN_Z: - } else { -@@ -3167,7 +3593,7 @@ static void build_ins(BuildCtx *ctx, BCO - } - | bne cr0, >7 - | bne cr1, >8 -- | cmpw CARG2, CARG3 -+ | cmpw CARG2, CARG4 - |4: - |.else - if (vk) { -@@ -3175,20 +3601,20 @@ static void build_ins(BuildCtx *ctx, BCO - } else { - |->BC_ISNEN_Z: // Dummy label. - } -- | lwzx TMP0, BASE, RA -+ | lwzx CARG1, BASE, RA - | addi PC, PC, 4 - | lfdx f0, BASE, RA -- | lwz TMP2, -4(PC) -+ | lwz SAVE0, -4(PC) - | lfdx f1, KBASE, RD -- | decode_RD4 TMP2, TMP2 -- | checknum TMP0 -- | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) -+ | decode_RD4 SAVE0, SAVE0 -+ | checknum CARG1 -+ | addis SAVE0, SAVE0, -(BCBIAS_J*4 >> 16) - | bge >3 - | fcmpu cr0, f0, f1 - |.endif - if (vk) { - | bne >1 -- | add PC, PC, TMP2 -+ | add PC, PC, SAVE0 - |1: - |.if not FFI - |3: -@@ -3199,13 +3625,13 @@ static void build_ins(BuildCtx *ctx, BCO - |.if not FFI - |3: - |.endif -- | add PC, PC, TMP2 -+ | add PC, PC, SAVE0 - |2: - } - | ins_next - |.if FFI - |3: -- | cmpwi TMP0, LJ_TCDATA -+ | cmpwi CARG1, LJ_TCDATA - | beq ->vmeta_equal_cd - | b <1 - |.endif -@@ -3213,18 +3639,31 @@ static void build_ins(BuildCtx *ctx, BCO - |7: // RA is not an integer. - | bge cr0, <3 - | // RA is a number. -- | lfd f0, 0(RA) -+ | .FPU lfd f0, 0(RA) - | blt cr1, >1 - | // RA is a number, RD is an integer. -- | tonum_i f1, CARG3 -+ |.if FPU -+ | tonum_i f1, CARG4 -+ |.else -+ | bl ->vm_sfi2d_2 -+ |.endif - | b >2 - | - |8: // RA is an integer, RD is a number. -+ |.if FPU - | tonum_i f0, CARG2 -+ |.else -+ | bl ->vm_sfi2d_1 -+ |.endif - |1: -- | lfd f1, 0(RD) -+ | .FPU lfd f1, 0(RD) - |2: -+ |.if FPU - | fcmpu cr0, f0, f1 -+ |.else -+ | blex __ledf2 -+ | cmpwi CRET1, 0 -+ |.endif - | b <4 - |.endif - break; -@@ -3279,7 +3718,12 @@ static void build_ins(BuildCtx *ctx, BCO - | add PC, PC, TMP2 - } else { - | li TMP1, LJ_TFALSE -+ |.if FPU - | lfdx f0, BASE, RD -+ |.else -+ | lwzux CARG1, RD, BASE -+ | lwz CARG2, 4(RD) -+ |.endif - | cmplw TMP0, TMP1 - if (op == BC_ISTC) { - | bge >1 -@@ -3288,7 +3732,12 @@ static void build_ins(BuildCtx *ctx, BCO - } - | addis PC, PC, -(BCBIAS_J*4 >> 16) - | decode_RD4 TMP2, INS -+ |.if FPU - | stfdx f0, BASE, RA -+ |.else -+ | stwux CARG1, RA, BASE -+ | stw CARG2, 4(RA) -+ |.endif - | add PC, PC, TMP2 - |1: - } -@@ -3323,8 +3772,15 @@ static void build_ins(BuildCtx *ctx, BCO - case BC_MOV: - | // RA = dst*8, RD = src*8 - | ins_next1 -+ |.if FPU - | lfdx f0, BASE, RD - | stfdx f0, BASE, RA -+ |.else -+ | lwzux TMP0, RD, BASE -+ | lwz TMP1, 4(RD) -+ | stwux TMP0, RA, BASE -+ | stw TMP1, 4(RA) -+ |.endif - | ins_next2 - break; - case BC_NOT: -@@ -3426,44 +3882,65 @@ static void build_ins(BuildCtx *ctx, BCO - ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); - ||switch (vk) { - ||case 0: -- | lwzx TMP1, BASE, RB -+ | lwzx CARG1, BASE, RB - | .if DUALNUM -- | lwzx TMP2, KBASE, RC -+ | lwzx CARG3, KBASE, RC - | .endif -+ | .if FPU - | lfdx f14, BASE, RB - | lfdx f15, KBASE, RC -+ | .else -+ | add TMP1, BASE, RB -+ | add TMP2, KBASE, RC -+ | lwz CARG2, 4(TMP1) -+ | lwz CARG4, 4(TMP2) -+ | .endif - | .if DUALNUM -- | checknum cr0, TMP1 -- | checknum cr1, TMP2 -+ | checknum cr0, CARG1 -+ | checknum cr1, CARG3 - | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt - | bge ->vmeta_arith_vn - | .else -- | checknum TMP1; bge ->vmeta_arith_vn -+ | checknum CARG1; bge ->vmeta_arith_vn - | .endif - || break; - ||case 1: -- | lwzx TMP1, BASE, RB -+ | lwzx CARG1, BASE, RB - | .if DUALNUM -- | lwzx TMP2, KBASE, RC -+ | lwzx CARG3, KBASE, RC - | .endif -+ | .if FPU - | lfdx f15, BASE, RB - | lfdx f14, KBASE, RC -+ | .else -+ | add TMP1, BASE, RB -+ | add TMP2, KBASE, RC -+ | lwz CARG2, 4(TMP1) -+ | lwz CARG4, 4(TMP2) -+ | .endif - | .if DUALNUM -- | checknum cr0, TMP1 -- | checknum cr1, TMP2 -+ | checknum cr0, CARG1 -+ | checknum cr1, CARG3 - | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt - | bge ->vmeta_arith_nv - | .else -- | checknum TMP1; bge ->vmeta_arith_nv -+ | checknum CARG1; bge ->vmeta_arith_nv - | .endif - || break; - ||default: -- | lwzx TMP1, BASE, RB -- | lwzx TMP2, BASE, RC -+ | lwzx CARG1, BASE, RB -+ | lwzx CARG3, BASE, RC -+ | .if FPU - | lfdx f14, BASE, RB - | lfdx f15, BASE, RC -- | checknum cr0, TMP1 -- | checknum cr1, TMP2 -+ | .else -+ | add TMP1, BASE, RB -+ | add TMP2, BASE, RC -+ | lwz CARG2, 4(TMP1) -+ | lwz CARG4, 4(TMP2) -+ | .endif -+ | checknum cr0, CARG1 -+ | checknum cr1, CARG3 - | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt - | bge ->vmeta_arith_vv - || break; -@@ -3497,48 +3974,78 @@ static void build_ins(BuildCtx *ctx, BCO - | fsub a, b, a // b - floor(b/c)*c - |.endmacro - | -+ |.macro sfpmod -+ |->BC_MODVN_Z: -+ | stw CARG1, SFSAVE_1 -+ | stw CARG2, SFSAVE_2 -+ | mr SAVE0, CARG3 -+ | mr SAVE1, CARG4 -+ | blex __divdf3 -+ | blex floor -+ | mr CARG3, SAVE0 -+ | mr CARG4, SAVE1 -+ | blex __muldf3 -+ | mr CARG3, CRET1 -+ | mr CARG4, CRET2 -+ | lwz CARG1, SFSAVE_1 -+ | lwz CARG2, SFSAVE_2 -+ | blex __subdf3 -+ |.endmacro -+ | - |.macro ins_arithfp, fpins - | ins_arithpre - |.if "fpins" == "fpmod_" - | b ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. -- |.else -+ |.elif FPU - | fpins f0, f14, f15 - | ins_next1 - | stfdx f0, BASE, RA - | ins_next2 -+ |.else -+ | blex __divdf3 // Only soft-float div uses this macro. -+ | ins_next1 -+ | stwux CRET1, RA, BASE -+ | stw CRET2, 4(RA) -+ | ins_next2 - |.endif - |.endmacro - | -- |.macro ins_arithdn, intins, fpins -+ |.macro ins_arithdn, intins, fpins, fpcall - | // RA = dst*8, RB = src1*8, RC = src2*8 | num_const*8 - ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); - ||switch (vk) { - ||case 0: -- | lwzux TMP1, RB, BASE -- | lwzux TMP2, RC, KBASE -- | lwz CARG1, 4(RB) -- | checknum cr0, TMP1 -- | lwz CARG2, 4(RC) -+ | lwzux CARG1, RB, BASE -+ | lwzux CARG3, RC, KBASE -+ | lwz CARG2, 4(RB) -+ | checknum cr0, CARG1 -+ | lwz CARG4, 4(RC) -+ | checknum cr1, CARG3 - || break; - ||case 1: -- | lwzux TMP1, RB, BASE -- | lwzux TMP2, RC, KBASE -- | lwz CARG2, 4(RB) -- | checknum cr0, TMP1 -- | lwz CARG1, 4(RC) -+ | lwzux CARG3, RB, BASE -+ | lwzux CARG1, RC, KBASE -+ | lwz CARG4, 4(RB) -+ | checknum cr0, CARG3 -+ | lwz CARG2, 4(RC) -+ | checknum cr1, CARG1 - || break; - ||default: -- | lwzux TMP1, RB, BASE -- | lwzux TMP2, RC, BASE -- | lwz CARG1, 4(RB) -- | checknum cr0, TMP1 -- | lwz CARG2, 4(RC) -+ | lwzux CARG1, RB, BASE -+ | lwzux CARG3, RC, BASE -+ | lwz CARG2, 4(RB) -+ | checknum cr0, CARG1 -+ | lwz CARG4, 4(RC) -+ | checknum cr1, CARG3 - || break; - ||} -- | checknum cr1, TMP2 - | bne >5 - | bne cr1, >5 -- | intins CARG1, CARG1, CARG2 -+ |.if "intins" == "intmod" -+ | mr CARG1, CARG2 -+ | mr CARG2, CARG4 -+ |.endif -+ | intins CARG1, CARG2, CARG4 - | bso >4 - |1: - | ins_next1 -@@ -3550,29 +4057,40 @@ static void build_ins(BuildCtx *ctx, BCO - | checkov TMP0, <1 // Ignore unrelated overflow. - | ins_arithfallback b - |5: // FP variant. -+ |.if FPU - ||if (vk == 1) { - | lfd f15, 0(RB) -- | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt - | lfd f14, 0(RC) - ||} else { - | lfd f14, 0(RB) -- | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt - | lfd f15, 0(RC) - ||} -+ |.endif -+ | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt - | ins_arithfallback bge - |.if "fpins" == "fpmod_" - | b ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. - |.else -+ |.if FPU - | fpins f0, f14, f15 -- | ins_next1 - | stfdx f0, BASE, RA -+ |.else -+ |.if "fpcall" == "sfpmod" -+ | sfpmod -+ |.else -+ | blex fpcall -+ |.endif -+ | stwux CRET1, RA, BASE -+ | stw CRET2, 4(RA) -+ |.endif -+ | ins_next1 - | b <2 - |.endif - |.endmacro - | -- |.macro ins_arith, intins, fpins -+ |.macro ins_arith, intins, fpins, fpcall - |.if DUALNUM -- | ins_arithdn intins, fpins -+ | ins_arithdn intins, fpins, fpcall - |.else - | ins_arithfp fpins - |.endif -@@ -3587,9 +4105,9 @@ static void build_ins(BuildCtx *ctx, BCO - | addo. TMP0, TMP0, TMP3 - | add y, a, b - |.endmacro -- | ins_arith addo32., fadd -+ | ins_arith addo32., fadd, __adddf3 - |.else -- | ins_arith addo., fadd -+ | ins_arith addo., fadd, __adddf3 - |.endif - break; - case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: -@@ -3601,36 +4119,48 @@ static void build_ins(BuildCtx *ctx, BCO - | subo. TMP0, TMP0, TMP3 - | sub y, a, b - |.endmacro -- | ins_arith subo32., fsub -+ | ins_arith subo32., fsub, __subdf3 - |.else -- | ins_arith subo., fsub -+ | ins_arith subo., fsub, __subdf3 - |.endif - break; - case BC_MULVN: case BC_MULNV: case BC_MULVV: -- | ins_arith mullwo., fmul -+ | ins_arith mullwo., fmul, __muldf3 - break; - case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: - | ins_arithfp fdiv - break; - case BC_MODVN: -- | ins_arith intmod, fpmod -+ | ins_arith intmod, fpmod, sfpmod - break; - case BC_MODNV: case BC_MODVV: -- | ins_arith intmod, fpmod_ -+ | ins_arith intmod, fpmod_, sfpmod - break; - case BC_POW: - | // NYI: (partial) integer arithmetic. -- | lwzx TMP1, BASE, RB -+ | lwzx CARG1, BASE, RB -+ | lwzx CARG3, BASE, RC -+ |.if FPU - | lfdx FARG1, BASE, RB -- | lwzx TMP2, BASE, RC - | lfdx FARG2, BASE, RC -- | checknum cr0, TMP1 -- | checknum cr1, TMP2 -+ |.else -+ | add TMP1, BASE, RB -+ | add TMP2, BASE, RC -+ | lwz CARG2, 4(TMP1) -+ | lwz CARG4, 4(TMP2) -+ |.endif -+ | checknum cr0, CARG1 -+ | checknum cr1, CARG3 - | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt - | bge ->vmeta_arith_vv - | blex pow - | ins_next1 -+ |.if FPU - | stfdx FARG1, BASE, RA -+ |.else -+ | stwux CARG1, RA, BASE -+ | stw CARG2, 4(RA) -+ |.endif - | ins_next2 - break; - -@@ -3650,8 +4180,15 @@ static void build_ins(BuildCtx *ctx, BCO - | lp BASE, L->base - | bne ->vmeta_binop - | ins_next1 -+ |.if FPU - | lfdx f0, BASE, SAVE0 // Copy result from RB to RA. - | stfdx f0, BASE, RA -+ |.else -+ | lwzux TMP0, SAVE0, BASE -+ | lwz TMP1, 4(SAVE0) -+ | stwux TMP0, RA, BASE -+ | stw TMP1, 4(RA) -+ |.endif - | ins_next2 - break; - -@@ -3714,8 +4251,15 @@ static void build_ins(BuildCtx *ctx, BCO - case BC_KNUM: - | // RA = dst*8, RD = num_const*8 - | ins_next1 -+ |.if FPU - | lfdx f0, KBASE, RD - | stfdx f0, BASE, RA -+ |.else -+ | lwzux TMP0, RD, KBASE -+ | lwz TMP1, 4(RD) -+ | stwux TMP0, RA, BASE -+ | stw TMP1, 4(RA) -+ |.endif - | ins_next2 - break; - case BC_KPRI: -@@ -3748,8 +4292,15 @@ static void build_ins(BuildCtx *ctx, BCO - | lwzx UPVAL:RB, LFUNC:RB, RD - | ins_next1 - | lwz TMP1, UPVAL:RB->v -+ |.if FPU - | lfd f0, 0(TMP1) - | stfdx f0, BASE, RA -+ |.else -+ | lwz TMP2, 0(TMP1) -+ | lwz TMP3, 4(TMP1) -+ | stwux TMP2, RA, BASE -+ | stw TMP3, 4(RA) -+ |.endif - | ins_next2 - break; - case BC_USETV: -@@ -3757,14 +4308,24 @@ static void build_ins(BuildCtx *ctx, BCO - | lwz LFUNC:RB, FRAME_FUNC(BASE) - | srwi RA, RA, 1 - | addi RA, RA, offsetof(GCfuncL, uvptr) -+ |.if FPU - | lfdux f0, RD, BASE -+ |.else -+ | lwzux CARG1, RD, BASE -+ | lwz CARG3, 4(RD) -+ |.endif - | lwzx UPVAL:RB, LFUNC:RB, RA - | lbz TMP3, UPVAL:RB->marked - | lwz CARG2, UPVAL:RB->v - | andix. TMP3, TMP3, LJ_GC_BLACK // isblack(uv) - | lbz TMP0, UPVAL:RB->closed - | lwz TMP2, 0(RD) -+ |.if FPU - | stfd f0, 0(CARG2) -+ |.else -+ | stw CARG1, 0(CARG2) -+ | stw CARG3, 4(CARG2) -+ |.endif - | cmplwi cr1, TMP0, 0 - | lwz TMP1, 4(RD) - | cror 4*cr0+eq, 4*cr0+eq, 4*cr1+eq -@@ -3820,11 +4381,21 @@ static void build_ins(BuildCtx *ctx, BCO - | lwz LFUNC:RB, FRAME_FUNC(BASE) - | srwi RA, RA, 1 - | addi RA, RA, offsetof(GCfuncL, uvptr) -+ |.if FPU - | lfdx f0, KBASE, RD -+ |.else -+ | lwzux TMP2, RD, KBASE -+ | lwz TMP3, 4(RD) -+ |.endif - | lwzx UPVAL:RB, LFUNC:RB, RA - | ins_next1 - | lwz TMP1, UPVAL:RB->v -+ |.if FPU - | stfd f0, 0(TMP1) -+ |.else -+ | stw TMP2, 0(TMP1) -+ | stw TMP3, 4(TMP1) -+ |.endif - | ins_next2 - break; - case BC_USETP: -@@ -3972,11 +4543,21 @@ static void build_ins(BuildCtx *ctx, BCO - |.endif - | ble ->vmeta_tgetv // Integer key and in array part? - | lwzx TMP0, TMP1, TMP2 -+ |.if FPU - | lfdx f14, TMP1, TMP2 -+ |.else -+ | lwzux SAVE0, TMP1, TMP2 -+ | lwz SAVE1, 4(TMP1) -+ |.endif - | checknil TMP0; beq >2 - |1: - | ins_next1 -+ |.if FPU - | stfdx f14, BASE, RA -+ |.else -+ | stwux SAVE0, RA, BASE -+ | stw SAVE1, 4(RA) -+ |.endif - | ins_next2 - | - |2: // Check for __index if table value is nil. -@@ -4052,12 +4633,22 @@ static void build_ins(BuildCtx *ctx, BCO - | lwz TMP1, TAB:RB->asize - | lwz TMP2, TAB:RB->array - | cmplw TMP0, TMP1; bge ->vmeta_tgetb -+ |.if FPU - | lwzx TMP1, TMP2, RC - | lfdx f0, TMP2, RC -+ |.else -+ | lwzux TMP1, TMP2, RC -+ | lwz TMP3, 4(TMP2) -+ |.endif - | checknil TMP1; beq >5 - |1: - | ins_next1 -+ |.if FPU - | stfdx f0, BASE, RA -+ |.else -+ | stwux TMP1, RA, BASE -+ | stw TMP3, 4(RA) -+ |.endif - | ins_next2 - | - |5: // Check for __index if table value is nil. -@@ -4087,10 +4678,20 @@ static void build_ins(BuildCtx *ctx, BCO - | cmplw TMP0, CARG2 - | slwi TMP2, CARG2, 3 - | ble ->vmeta_tgetr // In array part? -+ |.if FPU - | lfdx f14, TMP1, TMP2 -+ |.else -+ | lwzux SAVE0, TMP2, TMP1 -+ | lwz SAVE1, 4(TMP2) -+ |.endif - |->BC_TGETR_Z: - | ins_next1 -+ |.if FPU - | stfdx f14, BASE, RA -+ |.else -+ | stwux SAVE0, RA, BASE -+ | stw SAVE1, 4(RA) -+ |.endif - | ins_next2 - break; - -@@ -4131,11 +4732,22 @@ static void build_ins(BuildCtx *ctx, BCO - | ble ->vmeta_tsetv // Integer key and in array part? - | lwzx TMP2, TMP1, TMP0 - | lbz TMP3, TAB:RB->marked -+ |.if FPU - | lfdx f14, BASE, RA -+ |.else -+ | add SAVE1, BASE, RA -+ | lwz SAVE0, 0(SAVE1) -+ | lwz SAVE1, 4(SAVE1) -+ |.endif - | checknil TMP2; beq >3 - |1: - | andix. TMP2, TMP3, LJ_GC_BLACK // isblack(table) -+ |.if FPU - | stfdx f14, TMP1, TMP0 -+ |.else -+ | stwux SAVE0, TMP1, TMP0 -+ | stw SAVE1, 4(TMP1) -+ |.endif - | bne >7 - |2: - | ins_next -@@ -4176,7 +4788,13 @@ static void build_ins(BuildCtx *ctx, BCO - | lwz NODE:TMP2, TAB:RB->node - | stb ZERO, TAB:RB->nomm // Clear metamethod cache. - | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask -+ |.if FPU - | lfdx f14, BASE, RA -+ |.else -+ | add CARG2, BASE, RA -+ | lwz SAVE0, 0(CARG2) -+ | lwz SAVE1, 4(CARG2) -+ |.endif - | slwi TMP0, TMP1, 5 - | slwi TMP1, TMP1, 3 - | sub TMP1, TMP0, TMP1 -@@ -4192,7 +4810,12 @@ static void build_ins(BuildCtx *ctx, BCO - | checknil CARG2; beq >4 // Key found, but nil value? - |2: - | andix. TMP0, TMP3, LJ_GC_BLACK // isblack(table) -+ |.if FPU - | stfd f14, NODE:TMP2->val -+ |.else -+ | stw SAVE0, NODE:TMP2->val.u32.hi -+ | stw SAVE1, NODE:TMP2->val.u32.lo -+ |.endif - | bne >7 - |3: - | ins_next -@@ -4231,7 +4854,12 @@ static void build_ins(BuildCtx *ctx, BCO - | bl extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k) - | // Returns TValue *. - | lp BASE, L->base -+ |.if FPU - | stfd f14, 0(CRET1) -+ |.else -+ | stw SAVE0, 0(CRET1) -+ | stw SAVE1, 4(CRET1) -+ |.endif - | b <3 // No 2nd write barrier needed. - | - |7: // Possible table write barrier for the value. Skip valiswhite check. -@@ -4248,13 +4876,24 @@ static void build_ins(BuildCtx *ctx, BCO - | lwz TMP2, TAB:RB->array - | lbz TMP3, TAB:RB->marked - | cmplw TMP0, TMP1 -+ |.if FPU - | lfdx f14, BASE, RA -+ |.else -+ | add CARG2, BASE, RA -+ | lwz SAVE0, 0(CARG2) -+ | lwz SAVE1, 4(CARG2) -+ |.endif - | bge ->vmeta_tsetb - | lwzx TMP1, TMP2, RC - | checknil TMP1; beq >5 - |1: - | andix. TMP0, TMP3, LJ_GC_BLACK // isblack(table) -+ |.if FPU - | stfdx f14, TMP2, RC -+ |.else -+ | stwux SAVE0, RC, TMP2 -+ | stw SAVE1, 4(RC) -+ |.endif - | bne >7 - |2: - | ins_next -@@ -4294,10 +4933,20 @@ static void build_ins(BuildCtx *ctx, BCO - |2: - | cmplw TMP0, CARG3 - | slwi TMP2, CARG3, 3 -+ |.if FPU - | lfdx f14, BASE, RA -+ |.else -+ | lwzux SAVE0, RA, BASE -+ | lwz SAVE1, 4(RA) -+ |.endif - | ble ->vmeta_tsetr // In array part? - | ins_next1 -+ |.if FPU - | stfdx f14, TMP1, TMP2 -+ |.else -+ | stwux SAVE0, TMP1, TMP2 -+ | stw SAVE1, 4(TMP1) -+ |.endif - | ins_next2 - | - |7: // Possible table write barrier for the value. Skip valiswhite check. -@@ -4327,10 +4976,20 @@ static void build_ins(BuildCtx *ctx, BCO - | add TMP1, TMP1, TMP0 - | andix. TMP0, TMP3, LJ_GC_BLACK // isblack(table) - |3: // Copy result slots to table. -+ |.if FPU - | lfd f0, 0(RA) -+ |.else -+ | lwz SAVE0, 0(RA) -+ | lwz SAVE1, 4(RA) -+ |.endif - | addi RA, RA, 8 - | cmpw cr1, RA, TMP2 -+ |.if FPU - | stfd f0, 0(TMP1) -+ |.else -+ | stw SAVE0, 0(TMP1) -+ | stw SAVE1, 4(TMP1) -+ |.endif - | addi TMP1, TMP1, 8 - | blt cr1, <3 - | bne >7 -@@ -4397,9 +5056,20 @@ static void build_ins(BuildCtx *ctx, BCO - | beq cr1, >3 - |2: - | addi TMP3, TMP2, 8 -+ |.if FPU - | lfdx f0, RA, TMP2 -+ |.else -+ | add CARG3, RA, TMP2 -+ | lwz CARG1, 0(CARG3) -+ | lwz CARG2, 4(CARG3) -+ |.endif - | cmplw cr1, TMP3, NARGS8:RC -+ |.if FPU - | stfdx f0, BASE, TMP2 -+ |.else -+ | stwux CARG1, TMP2, BASE -+ | stw CARG2, 4(TMP2) -+ |.endif - | mr TMP2, TMP3 - | bne cr1, <2 - |3: -@@ -4432,14 +5102,28 @@ static void build_ins(BuildCtx *ctx, BCO - | add BASE, BASE, RA - | lwz TMP1, -24(BASE) - | lwz LFUNC:RB, -20(BASE) -+ |.if FPU - | lfd f1, -8(BASE) - | lfd f0, -16(BASE) -+ |.else -+ | lwz CARG1, -8(BASE) -+ | lwz CARG2, -4(BASE) -+ | lwz CARG3, -16(BASE) -+ | lwz CARG4, -12(BASE) -+ |.endif - | stw TMP1, 0(BASE) // Copy callable. - | stw LFUNC:RB, 4(BASE) - | checkfunc TMP1 -- | stfd f1, 16(BASE) // Copy control var. - | li NARGS8:RC, 16 // Iterators get 2 arguments. -+ |.if FPU -+ | stfd f1, 16(BASE) // Copy control var. - | stfdu f0, 8(BASE) // Copy state. -+ |.else -+ | stw CARG1, 16(BASE) // Copy control var. -+ | stw CARG2, 20(BASE) -+ | stwu CARG3, 8(BASE) // Copy state. -+ | stw CARG4, 4(BASE) -+ |.endif - | bne ->vmeta_call - | ins_call - break; -@@ -4460,7 +5144,12 @@ static void build_ins(BuildCtx *ctx, BCO - | slwi TMP3, RC, 3 - | bge >5 // Index points after array part? - | lwzx TMP2, TMP1, TMP3 -+ |.if FPU - | lfdx f0, TMP1, TMP3 -+ |.else -+ | lwzux CARG1, TMP3, TMP1 -+ | lwz CARG2, 4(TMP3) -+ |.endif - | checknil TMP2 - | lwz INS, -4(PC) - | beq >4 -@@ -4472,7 +5161,12 @@ static void build_ins(BuildCtx *ctx, BCO - |.endif - | addi RC, RC, 1 - | addis TMP3, PC, -(BCBIAS_J*4 >> 16) -+ |.if FPU - | stfd f0, 8(RA) -+ |.else -+ | stw CARG1, 8(RA) -+ | stw CARG2, 12(RA) -+ |.endif - | decode_RD4 TMP1, INS - | stw RC, -4(RA) // Update control var. - | add PC, TMP1, TMP3 -@@ -4497,17 +5191,38 @@ static void build_ins(BuildCtx *ctx, BCO - | slwi RB, RC, 3 - | sub TMP3, TMP3, RB - | lwzx RB, TMP2, TMP3 -+ |.if FPU - | lfdx f0, TMP2, TMP3 -+ |.else -+ | add CARG3, TMP2, TMP3 -+ | lwz CARG1, 0(CARG3) -+ | lwz CARG2, 4(CARG3) -+ |.endif - | add NODE:TMP3, TMP2, TMP3 - | checknil RB - | lwz INS, -4(PC) - | beq >7 -+ |.if FPU - | lfd f1, NODE:TMP3->key -+ |.else -+ | lwz CARG3, NODE:TMP3->key.u32.hi -+ | lwz CARG4, NODE:TMP3->key.u32.lo -+ |.endif - | addis TMP2, PC, -(BCBIAS_J*4 >> 16) -+ |.if FPU - | stfd f0, 8(RA) -+ |.else -+ | stw CARG1, 8(RA) -+ | stw CARG2, 12(RA) -+ |.endif - | add RC, RC, TMP0 - | decode_RD4 TMP1, INS -+ |.if FPU - | stfd f1, 0(RA) -+ |.else -+ | stw CARG3, 0(RA) -+ | stw CARG4, 4(RA) -+ |.endif - | addi RC, RC, 1 - | add PC, TMP1, TMP2 - | stw RC, -4(RA) // Update control var. -@@ -4573,9 +5288,19 @@ static void build_ins(BuildCtx *ctx, BCO - | subi TMP2, TMP2, 16 - | ble >2 // No vararg slots? - |1: // Copy vararg slots to destination slots. -+ |.if FPU - | lfd f0, 0(RC) -+ |.else -+ | lwz CARG1, 0(RC) -+ | lwz CARG2, 4(RC) -+ |.endif - | addi RC, RC, 8 -+ |.if FPU - | stfd f0, 0(RA) -+ |.else -+ | stw CARG1, 0(RA) -+ | stw CARG2, 4(RA) -+ |.endif - | cmplw RA, TMP2 - | cmplw cr1, RC, TMP3 - | bge >3 // All destination slots filled? -@@ -4598,9 +5323,19 @@ static void build_ins(BuildCtx *ctx, BCO - | addi MULTRES, TMP1, 8 - | bgt >7 - |6: -+ |.if FPU - | lfd f0, 0(RC) -+ |.else -+ | lwz CARG1, 0(RC) -+ | lwz CARG2, 4(RC) -+ |.endif - | addi RC, RC, 8 -+ |.if FPU - | stfd f0, 0(RA) -+ |.else -+ | stw CARG1, 0(RA) -+ | stw CARG2, 4(RA) -+ |.endif - | cmplw RC, TMP3 - | addi RA, RA, 8 - | blt <6 // More vararg slots? -@@ -4651,14 +5386,38 @@ static void build_ins(BuildCtx *ctx, BCO - | li TMP1, 0 - |2: - | addi TMP3, TMP1, 8 -+ |.if FPU - | lfdx f0, RA, TMP1 -+ |.else -+ | add CARG3, RA, TMP1 -+ | lwz CARG1, 0(CARG3) -+ | lwz CARG2, 4(CARG3) -+ |.endif - | cmpw TMP3, RC -+ |.if FPU - | stfdx f0, TMP2, TMP1 -+ |.else -+ | add CARG3, TMP2, TMP1 -+ | stw CARG1, 0(CARG3) -+ | stw CARG2, 4(CARG3) -+ |.endif - | beq >3 - | addi TMP1, TMP3, 8 -+ |.if FPU - | lfdx f1, RA, TMP3 -+ |.else -+ | add CARG3, RA, TMP3 -+ | lwz CARG1, 0(CARG3) -+ | lwz CARG2, 4(CARG3) -+ |.endif - | cmpw TMP1, RC -+ |.if FPU - | stfdx f1, TMP2, TMP3 -+ |.else -+ | add CARG3, TMP2, TMP3 -+ | stw CARG1, 0(CARG3) -+ | stw CARG2, 4(CARG3) -+ |.endif - | bne <2 - |3: - |5: -@@ -4700,8 +5459,15 @@ static void build_ins(BuildCtx *ctx, BCO - | subi TMP2, BASE, 8 - | decode_RB8 RB, INS - if (op == BC_RET1) { -+ |.if FPU - | lfd f0, 0(RA) - | stfd f0, 0(TMP2) -+ |.else -+ | lwz CARG1, 0(RA) -+ | lwz CARG2, 4(RA) -+ | stw CARG1, 0(TMP2) -+ | stw CARG2, 4(TMP2) -+ |.endif - } - |5: - | cmplw RB, RD -@@ -4762,11 +5528,11 @@ static void build_ins(BuildCtx *ctx, BCO - |4: - | stw CARG1, FORL_IDX*8+4(RA) - } else { -- | lwz TMP3, FORL_STEP*8(RA) -+ | lwz SAVE0, FORL_STEP*8(RA) - | lwz CARG3, FORL_STEP*8+4(RA) - | lwz TMP2, FORL_STOP*8(RA) - | lwz CARG2, FORL_STOP*8+4(RA) -- | cmplw cr7, TMP3, TISNUM -+ | cmplw cr7, SAVE0, TISNUM - | cmplw cr1, TMP2, TISNUM - | crand 4*cr0+eq, 4*cr0+eq, 4*cr7+eq - | crand 4*cr0+eq, 4*cr0+eq, 4*cr1+eq -@@ -4809,41 +5575,80 @@ static void build_ins(BuildCtx *ctx, BCO - if (vk) { - |.if DUALNUM - |9: // FP loop. -+ |.if FPU - | lfd f1, FORL_IDX*8(RA) - |.else -+ | lwz CARG1, FORL_IDX*8(RA) -+ | lwz CARG2, FORL_IDX*8+4(RA) -+ |.endif -+ |.else - | lfdux f1, RA, BASE - |.endif -+ |.if FPU - | lfd f3, FORL_STEP*8(RA) - | lfd f2, FORL_STOP*8(RA) -- | lwz TMP3, FORL_STEP*8(RA) - | fadd f1, f1, f3 - | stfd f1, FORL_IDX*8(RA) -+ |.else -+ | lwz CARG3, FORL_STEP*8(RA) -+ | lwz CARG4, FORL_STEP*8+4(RA) -+ | mr SAVE1, RD -+ | blex __adddf3 -+ | mr RD, SAVE1 -+ | stw CRET1, FORL_IDX*8(RA) -+ | stw CRET2, FORL_IDX*8+4(RA) -+ | lwz CARG3, FORL_STOP*8(RA) -+ | lwz CARG4, FORL_STOP*8+4(RA) -+ |.endif -+ | lwz SAVE0, FORL_STEP*8(RA) - } else { - |.if DUALNUM - |9: // FP loop. - |.else - | lwzux TMP1, RA, BASE -- | lwz TMP3, FORL_STEP*8(RA) -+ | lwz SAVE0, FORL_STEP*8(RA) - | lwz TMP2, FORL_STOP*8(RA) - | cmplw cr0, TMP1, TISNUM -- | cmplw cr7, TMP3, TISNUM -+ | cmplw cr7, SAVE0, TISNUM - | cmplw cr1, TMP2, TISNUM - |.endif -+ |.if FPU - | lfd f1, FORL_IDX*8(RA) -+ |.else -+ | lwz CARG1, FORL_IDX*8(RA) -+ | lwz CARG2, FORL_IDX*8+4(RA) -+ |.endif - | crand 4*cr0+lt, 4*cr0+lt, 4*cr7+lt - | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt -+ |.if FPU - | lfd f2, FORL_STOP*8(RA) -+ |.else -+ | lwz CARG3, FORL_STOP*8(RA) -+ | lwz CARG4, FORL_STOP*8+4(RA) -+ |.endif - | bge ->vmeta_for - } -- | cmpwi cr6, TMP3, 0 -+ | cmpwi cr6, SAVE0, 0 - if (op != BC_JFORL) { - | srwi RD, RD, 1 - } -+ |.if FPU - | stfd f1, FORL_EXT*8(RA) -+ |.else -+ | stw CARG1, FORL_EXT*8(RA) -+ | stw CARG2, FORL_EXT*8+4(RA) -+ |.endif - if (op != BC_JFORL) { - | add RD, PC, RD - } -+ |.if FPU - | fcmpu cr0, f1, f2 -+ |.else -+ | mr SAVE1, RD -+ | blex __ledf2 -+ | cmpwi CRET1, 0 -+ | mr RD, SAVE1 -+ |.endif - if (op == BC_JFORI) { - | addis PC, RD, -(BCBIAS_J*4 >> 16) - } diff --git a/packages/lang/luajit/patches/050-ppc-softfloat.patch b/packages/lang/luajit/patches/050-ppc-softfloat.patch deleted file mode 100644 index 68215bbf..00000000 --- a/packages/lang/luajit/patches/050-ppc-softfloat.patch +++ /dev/null @@ -1,744 +0,0 @@ -From 71b7bc88341945f13f3951e2bb5fd247b639ff7a Mon Sep 17 00:00:00 2001 -From: Mike Pall -Date: Sun, 3 Sep 2017 23:20:53 +0200 -Subject: [PATCH] PPC: Add soft-float support to JIT compiler backend. - -Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com. -Sponsored by Cisco Systems, Inc. ---- - src/lj_arch.h | 1 - - src/lj_asm_ppc.h | 321 ++++++++++++++++++++++++++++++++++++++++------- - 2 files changed, 278 insertions(+), 44 deletions(-) - ---- a/src/lj_arch.h -+++ b/src/lj_arch.h -@@ -273,7 +273,6 @@ - #endif - - #if LJ_ABI_SOFTFP --#define LJ_ARCH_NOJIT 1 /* NYI */ - #define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL - #else - #define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL_SINGLE ---- a/src/lj_asm_ppc.h -+++ b/src/lj_asm_ppc.h -@@ -226,6 +226,7 @@ static void asm_fusexrefx(ASMState *as, - emit_tab(as, pi, rt, left, right); - } - -+#if !LJ_SOFTFP - /* Fuse to multiply-add/sub instruction. */ - static int asm_fusemadd(ASMState *as, IRIns *ir, PPCIns pi, PPCIns pir) - { -@@ -245,6 +246,7 @@ static int asm_fusemadd(ASMState *as, IR - } - return 0; - } -+#endif - - /* -- Calls --------------------------------------------------------------- */ - -@@ -253,13 +255,17 @@ static void asm_gencall(ASMState *as, co - { - uint32_t n, nargs = CCI_XNARGS(ci); - int32_t ofs = 8; -- Reg gpr = REGARG_FIRSTGPR, fpr = REGARG_FIRSTFPR; -+ Reg gpr = REGARG_FIRSTGPR; -+#if !LJ_SOFTFP -+ Reg fpr = REGARG_FIRSTFPR; -+#endif - if ((void *)ci->func) - emit_call(as, (void *)ci->func); - for (n = 0; n < nargs; n++) { /* Setup args. */ - IRRef ref = args[n]; - if (ref) { - IRIns *ir = IR(ref); -+#if !LJ_SOFTFP - if (irt_isfp(ir->t)) { - if (fpr <= REGARG_LASTFPR) { - lua_assert(rset_test(as->freeset, fpr)); /* Already evicted. */ -@@ -271,7 +277,9 @@ static void asm_gencall(ASMState *as, co - emit_spstore(as, ir, r, ofs); - ofs += irt_isnum(ir->t) ? 8 : 4; - } -- } else { -+ } else -+#endif -+ { - if (gpr <= REGARG_LASTGPR) { - lua_assert(rset_test(as->freeset, gpr)); /* Already evicted. */ - ra_leftov(as, gpr, ref); -@@ -290,8 +298,10 @@ static void asm_gencall(ASMState *as, co - } - checkmclim(as); - } -+#if !LJ_SOFTFP - if ((ci->flags & CCI_VARARG)) /* Vararg calls need to know about FPR use. */ - emit_tab(as, fpr == REGARG_FIRSTFPR ? PPCI_CRXOR : PPCI_CREQV, 6, 6, 6); -+#endif - } - - /* Setup result reg/sp for call. Evict scratch regs. */ -@@ -299,8 +309,10 @@ static void asm_setupresult(ASMState *as - { - RegSet drop = RSET_SCRATCH; - int hiop = ((ir+1)->o == IR_HIOP && !irt_isnil((ir+1)->t)); -+#if !LJ_SOFTFP - if ((ci->flags & CCI_NOFPRCLOBBER)) - drop &= ~RSET_FPR; -+#endif - if (ra_hasreg(ir->r)) - rset_clear(drop, ir->r); /* Dest reg handled below. */ - if (hiop && ra_hasreg((ir+1)->r)) -@@ -308,7 +320,7 @@ static void asm_setupresult(ASMState *as - ra_evictset(as, drop); /* Evictions must be performed first. */ - if (ra_used(ir)) { - lua_assert(!irt_ispri(ir->t)); -- if (irt_isfp(ir->t)) { -+ if (!LJ_SOFTFP && irt_isfp(ir->t)) { - if ((ci->flags & CCI_CASTU64)) { - /* Use spill slot or temp slots. */ - int32_t ofs = ir->s ? sps_scale(ir->s) : SPOFS_TMP; -@@ -377,6 +389,7 @@ static void asm_retf(ASMState *as, IRIns - - /* -- Type conversions ---------------------------------------------------- */ - -+#if !LJ_SOFTFP - static void asm_tointg(ASMState *as, IRIns *ir, Reg left) - { - RegSet allow = RSET_FPR; -@@ -409,15 +422,23 @@ static void asm_tobit(ASMState *as, IRIn - emit_fai(as, PPCI_STFD, tmp, RID_SP, SPOFS_TMP); - emit_fab(as, PPCI_FADD, tmp, left, right); - } -+#endif - - static void asm_conv(ASMState *as, IRIns *ir) - { - IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); -+#if !LJ_SOFTFP - int stfp = (st == IRT_NUM || st == IRT_FLOAT); -+#endif - IRRef lref = ir->op1; -- lua_assert(irt_type(ir->t) != st); - lua_assert(!(irt_isint64(ir->t) || - (st == IRT_I64 || st == IRT_U64))); /* Handled by SPLIT. */ -+#if LJ_SOFTFP -+ /* FP conversions are handled by SPLIT. */ -+ lua_assert(!irt_isfp(ir->t) && !(st == IRT_NUM || st == IRT_FLOAT)); -+ /* Can't check for same types: SPLIT uses CONV int.int + BXOR for sfp NEG. */ -+#else -+ lua_assert(irt_type(ir->t) != st); - if (irt_isfp(ir->t)) { - Reg dest = ra_dest(as, ir, RSET_FPR); - if (stfp) { /* FP to FP conversion. */ -@@ -476,7 +497,9 @@ static void asm_conv(ASMState *as, IRIns - emit_fb(as, PPCI_FCTIWZ, tmp, left); - } - } -- } else { -+ } else -+#endif -+ { - Reg dest = ra_dest(as, ir, RSET_GPR); - if (st >= IRT_I8 && st <= IRT_U16) { /* Extend to 32 bit integer. */ - Reg left = ra_alloc1(as, ir->op1, RSET_GPR); -@@ -496,17 +519,41 @@ static void asm_strto(ASMState *as, IRIn - { - const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_strscan_num]; - IRRef args[2]; -- int32_t ofs; -+ int32_t ofs = SPOFS_TMP; -+#if LJ_SOFTFP -+ ra_evictset(as, RSET_SCRATCH); -+ if (ra_used(ir)) { -+ if (ra_hasspill(ir->s) && ra_hasspill((ir+1)->s) && -+ (ir->s & 1) == LJ_BE && (ir->s ^ 1) == (ir+1)->s) { -+ int i; -+ for (i = 0; i < 2; i++) { -+ Reg r = (ir+i)->r; -+ if (ra_hasreg(r)) { -+ ra_free(as, r); -+ ra_modified(as, r); -+ emit_spload(as, ir+i, r, sps_scale((ir+i)->s)); -+ } -+ } -+ ofs = sps_scale(ir->s & ~1); -+ } else { -+ Reg rhi = ra_dest(as, ir+1, RSET_GPR); -+ Reg rlo = ra_dest(as, ir, rset_exclude(RSET_GPR, rhi)); -+ emit_tai(as, PPCI_LWZ, rhi, RID_SP, ofs); -+ emit_tai(as, PPCI_LWZ, rlo, RID_SP, ofs+4); -+ } -+ } -+#else - RegSet drop = RSET_SCRATCH; - if (ra_hasreg(ir->r)) rset_set(drop, ir->r); /* Spill dest reg (if any). */ - ra_evictset(as, drop); -+ if (ir->s) ofs = sps_scale(ir->s); -+#endif - asm_guardcc(as, CC_EQ); - emit_ai(as, PPCI_CMPWI, RID_RET, 0); /* Test return status. */ - args[0] = ir->op1; /* GCstr *str */ - args[1] = ASMREF_TMP1; /* TValue *n */ - asm_gencall(as, ci, args); - /* Store the result to the spill slot or temp slots. */ -- ofs = ir->s ? sps_scale(ir->s) : SPOFS_TMP; - emit_tai(as, PPCI_ADDI, ra_releasetmp(as, ASMREF_TMP1), RID_SP, ofs); - } - -@@ -530,7 +577,10 @@ static void asm_tvptr(ASMState *as, Reg - Reg src = ra_alloc1(as, ref, allow); - emit_setgl(as, src, tmptv.gcr); - } -- type = ra_allock(as, irt_toitype(ir->t), allow); -+ if (LJ_SOFTFP && (ir+1)->o == IR_HIOP) -+ type = ra_alloc1(as, ref+1, allow); -+ else -+ type = ra_allock(as, irt_toitype(ir->t), allow); - emit_setgl(as, type, tmptv.it); - } - } -@@ -574,11 +624,27 @@ static void asm_href(ASMState *as, IRIns - Reg tisnum = RID_NONE, tmpnum = RID_NONE; - IRRef refkey = ir->op2; - IRIns *irkey = IR(refkey); -+ int isk = irref_isk(refkey); - IRType1 kt = irkey->t; - uint32_t khash; - MCLabel l_end, l_loop, l_next; - - rset_clear(allow, tab); -+#if LJ_SOFTFP -+ if (!isk) { -+ key = ra_alloc1(as, refkey, allow); -+ rset_clear(allow, key); -+ if (irkey[1].o == IR_HIOP) { -+ if (ra_hasreg((irkey+1)->r)) { -+ tmpnum = (irkey+1)->r; -+ ra_noweak(as, tmpnum); -+ } else { -+ tmpnum = ra_allocref(as, refkey+1, allow); -+ } -+ rset_clear(allow, tmpnum); -+ } -+ } -+#else - if (irt_isnum(kt)) { - key = ra_alloc1(as, refkey, RSET_FPR); - tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key)); -@@ -588,6 +654,7 @@ static void asm_href(ASMState *as, IRIns - key = ra_alloc1(as, refkey, allow); - rset_clear(allow, key); - } -+#endif - tmp2 = ra_scratch(as, allow); - rset_clear(allow, tmp2); - -@@ -610,7 +677,7 @@ static void asm_href(ASMState *as, IRIns - asm_guardcc(as, CC_EQ); - else - emit_condbranch(as, PPCI_BC|PPCF_Y, CC_EQ, l_end); -- if (irt_isnum(kt)) { -+ if (!LJ_SOFTFP && irt_isnum(kt)) { - emit_fab(as, PPCI_FCMPU, 0, tmpnum, key); - emit_condbranch(as, PPCI_BC, CC_GE, l_next); - emit_ab(as, PPCI_CMPLW, tmp1, tisnum); -@@ -620,7 +687,10 @@ static void asm_href(ASMState *as, IRIns - emit_ab(as, PPCI_CMPW, tmp2, key); - emit_condbranch(as, PPCI_BC, CC_NE, l_next); - } -- emit_ai(as, PPCI_CMPWI, tmp1, irt_toitype(irkey->t)); -+ if (LJ_SOFTFP && ra_hasreg(tmpnum)) -+ emit_ab(as, PPCI_CMPW, tmp1, tmpnum); -+ else -+ emit_ai(as, PPCI_CMPWI, tmp1, irt_toitype(irkey->t)); - if (!irt_ispri(kt)) - emit_tai(as, PPCI_LWZ, tmp2, dest, (int32_t)offsetof(Node, key.gcr)); - } -@@ -629,19 +699,19 @@ static void asm_href(ASMState *as, IRIns - (((char *)as->mcp-(char *)l_loop) & 0xffffu); - - /* Load main position relative to tab->node into dest. */ -- khash = irref_isk(refkey) ? ir_khash(irkey) : 1; -+ khash = isk ? ir_khash(irkey) : 1; - if (khash == 0) { - emit_tai(as, PPCI_LWZ, dest, tab, (int32_t)offsetof(GCtab, node)); - } else { - Reg tmphash = tmp1; -- if (irref_isk(refkey)) -+ if (isk) - tmphash = ra_allock(as, khash, allow); - emit_tab(as, PPCI_ADD, dest, dest, tmp1); - emit_tai(as, PPCI_MULLI, tmp1, tmp1, sizeof(Node)); - emit_asb(as, PPCI_AND, tmp1, tmp2, tmphash); - emit_tai(as, PPCI_LWZ, dest, tab, (int32_t)offsetof(GCtab, node)); - emit_tai(as, PPCI_LWZ, tmp2, tab, (int32_t)offsetof(GCtab, hmask)); -- if (irref_isk(refkey)) { -+ if (isk) { - /* Nothing to do. */ - } else if (irt_isstr(kt)) { - emit_tai(as, PPCI_LWZ, tmp1, key, (int32_t)offsetof(GCstr, hash)); -@@ -651,13 +721,19 @@ static void asm_href(ASMState *as, IRIns - emit_asb(as, PPCI_XOR, tmp1, tmp1, tmp2); - emit_rotlwi(as, tmp1, tmp1, (HASH_ROT2+HASH_ROT1)&31); - emit_tab(as, PPCI_SUBF, tmp2, dest, tmp2); -- if (irt_isnum(kt)) { -+ if (LJ_SOFTFP ? (irkey[1].o == IR_HIOP) : irt_isnum(kt)) { -+#if LJ_SOFTFP -+ emit_asb(as, PPCI_XOR, tmp2, key, tmp1); -+ emit_rotlwi(as, dest, tmp1, HASH_ROT1); -+ emit_tab(as, PPCI_ADD, tmp1, tmpnum, tmpnum); -+#else - int32_t ofs = ra_spill(as, irkey); - emit_asb(as, PPCI_XOR, tmp2, tmp2, tmp1); - emit_rotlwi(as, dest, tmp1, HASH_ROT1); - emit_tab(as, PPCI_ADD, tmp1, tmp1, tmp1); - emit_tai(as, PPCI_LWZ, tmp2, RID_SP, ofs+4); - emit_tai(as, PPCI_LWZ, tmp1, RID_SP, ofs); -+#endif - } else { - emit_asb(as, PPCI_XOR, tmp2, key, tmp1); - emit_rotlwi(as, dest, tmp1, HASH_ROT1); -@@ -784,8 +860,8 @@ static PPCIns asm_fxloadins(IRIns *ir) - case IRT_U8: return PPCI_LBZ; - case IRT_I16: return PPCI_LHA; - case IRT_U16: return PPCI_LHZ; -- case IRT_NUM: return PPCI_LFD; -- case IRT_FLOAT: return PPCI_LFS; -+ case IRT_NUM: lua_assert(!LJ_SOFTFP); return PPCI_LFD; -+ case IRT_FLOAT: if (!LJ_SOFTFP) return PPCI_LFS; - default: return PPCI_LWZ; - } - } -@@ -795,8 +871,8 @@ static PPCIns asm_fxstoreins(IRIns *ir) - switch (irt_type(ir->t)) { - case IRT_I8: case IRT_U8: return PPCI_STB; - case IRT_I16: case IRT_U16: return PPCI_STH; -- case IRT_NUM: return PPCI_STFD; -- case IRT_FLOAT: return PPCI_STFS; -+ case IRT_NUM: lua_assert(!LJ_SOFTFP); return PPCI_STFD; -+ case IRT_FLOAT: if (!LJ_SOFTFP) return PPCI_STFS; - default: return PPCI_STW; - } - } -@@ -839,7 +915,8 @@ static void asm_fstore(ASMState *as, IRI - - static void asm_xload(ASMState *as, IRIns *ir) - { -- Reg dest = ra_dest(as, ir, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); -+ Reg dest = ra_dest(as, ir, -+ (!LJ_SOFTFP && irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR); - lua_assert(!(ir->op2 & IRXLOAD_UNALIGNED)); - if (irt_isi8(ir->t)) - emit_as(as, PPCI_EXTSB, dest, dest); -@@ -857,7 +934,8 @@ static void asm_xstore_(ASMState *as, IR - Reg src = ra_alloc1(as, irb->op1, RSET_GPR); - asm_fusexrefx(as, PPCI_STWBRX, src, ir->op1, rset_exclude(RSET_GPR, src)); - } else { -- Reg src = ra_alloc1(as, ir->op2, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); -+ Reg src = ra_alloc1(as, ir->op2, -+ (!LJ_SOFTFP && irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR); - asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1, - rset_exclude(RSET_GPR, src), ofs); - } -@@ -871,10 +949,19 @@ static void asm_ahuvload(ASMState *as, I - Reg dest = RID_NONE, type = RID_TMP, tmp = RID_TMP, idx; - RegSet allow = RSET_GPR; - int32_t ofs = AHUREF_LSX; -+ if (LJ_SOFTFP && (ir+1)->o == IR_HIOP) { -+ t.irt = IRT_NUM; -+ if (ra_used(ir+1)) { -+ type = ra_dest(as, ir+1, allow); -+ rset_clear(allow, type); -+ } -+ ofs = 0; -+ } - if (ra_used(ir)) { -- lua_assert(irt_isnum(t) || irt_isint(t) || irt_isaddr(t)); -- if (!irt_isnum(t)) ofs = 0; -- dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : RSET_GPR); -+ lua_assert((LJ_SOFTFP ? 0 : irt_isnum(ir->t)) || -+ irt_isint(ir->t) || irt_isaddr(ir->t)); -+ if (LJ_SOFTFP || !irt_isnum(t)) ofs = 0; -+ dest = ra_dest(as, ir, (!LJ_SOFTFP && irt_isnum(t)) ? RSET_FPR : allow); - rset_clear(allow, dest); - } - idx = asm_fuseahuref(as, ir->op1, &ofs, allow); -@@ -883,12 +970,13 @@ static void asm_ahuvload(ASMState *as, I - asm_guardcc(as, CC_GE); - emit_ab(as, PPCI_CMPLW, type, tisnum); - if (ra_hasreg(dest)) { -- if (ofs == AHUREF_LSX) { -+ if (!LJ_SOFTFP && ofs == AHUREF_LSX) { - tmp = ra_scratch(as, rset_exclude(rset_exclude(RSET_GPR, - (idx&255)), (idx>>8))); - emit_fab(as, PPCI_LFDX, dest, (idx&255), tmp); - } else { -- emit_fai(as, PPCI_LFD, dest, idx, ofs); -+ emit_fai(as, LJ_SOFTFP ? PPCI_LWZ : PPCI_LFD, dest, idx, -+ ofs+4*LJ_SOFTFP); - } - } - } else { -@@ -911,7 +999,7 @@ static void asm_ahustore(ASMState *as, I - int32_t ofs = AHUREF_LSX; - if (ir->r == RID_SINK) - return; -- if (irt_isnum(ir->t)) { -+ if (!LJ_SOFTFP && irt_isnum(ir->t)) { - src = ra_alloc1(as, ir->op2, RSET_FPR); - } else { - if (!irt_ispri(ir->t)) { -@@ -919,11 +1007,14 @@ static void asm_ahustore(ASMState *as, I - rset_clear(allow, src); - ofs = 0; - } -- type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); -+ if (LJ_SOFTFP && (ir+1)->o == IR_HIOP) -+ type = ra_alloc1(as, (ir+1)->op2, allow); -+ else -+ type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); - rset_clear(allow, type); - } - idx = asm_fuseahuref(as, ir->op1, &ofs, allow); -- if (irt_isnum(ir->t)) { -+ if (!LJ_SOFTFP && irt_isnum(ir->t)) { - if (ofs == AHUREF_LSX) { - emit_fab(as, PPCI_STFDX, src, (idx&255), RID_TMP); - emit_slwi(as, RID_TMP, (idx>>8), 3); -@@ -948,21 +1039,33 @@ static void asm_sload(ASMState *as, IRIn - IRType1 t = ir->t; - Reg dest = RID_NONE, type = RID_NONE, base; - RegSet allow = RSET_GPR; -+ int hiop = (LJ_SOFTFP && (ir+1)->o == IR_HIOP); -+ if (hiop) -+ t.irt = IRT_NUM; - lua_assert(!(ir->op2 & IRSLOAD_PARENT)); /* Handled by asm_head_side(). */ -- lua_assert(irt_isguard(t) || !(ir->op2 & IRSLOAD_TYPECHECK)); -+ lua_assert(irt_isguard(ir->t) || !(ir->op2 & IRSLOAD_TYPECHECK)); - lua_assert(LJ_DUALNUM || - !irt_isint(t) || (ir->op2 & (IRSLOAD_CONVERT|IRSLOAD_FRAME))); -+#if LJ_SOFTFP -+ lua_assert(!(ir->op2 & IRSLOAD_CONVERT)); /* Handled by LJ_SOFTFP SPLIT. */ -+ if (hiop && ra_used(ir+1)) { -+ type = ra_dest(as, ir+1, allow); -+ rset_clear(allow, type); -+ } -+#else - if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(t) && irt_isint(t)) { - dest = ra_scratch(as, RSET_FPR); - asm_tointg(as, ir, dest); - t.irt = IRT_NUM; /* Continue with a regular number type check. */ -- } else if (ra_used(ir)) { -+ } else -+#endif -+ if (ra_used(ir)) { - lua_assert(irt_isnum(t) || irt_isint(t) || irt_isaddr(t)); -- dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : RSET_GPR); -+ dest = ra_dest(as, ir, (!LJ_SOFTFP && irt_isnum(t)) ? RSET_FPR : allow); - rset_clear(allow, dest); - base = ra_alloc1(as, REF_BASE, allow); - rset_clear(allow, base); -- if ((ir->op2 & IRSLOAD_CONVERT)) { -+ if (!LJ_SOFTFP && (ir->op2 & IRSLOAD_CONVERT)) { - if (irt_isint(t)) { - emit_tai(as, PPCI_LWZ, dest, RID_SP, SPOFS_TMPLO); - dest = ra_scratch(as, RSET_FPR); -@@ -994,10 +1097,13 @@ dotypecheck: - if ((ir->op2 & IRSLOAD_TYPECHECK)) { - Reg tisnum = ra_allock(as, (int32_t)LJ_TISNUM, allow); - asm_guardcc(as, CC_GE); -- emit_ab(as, PPCI_CMPLW, RID_TMP, tisnum); -+#if !LJ_SOFTFP - type = RID_TMP; -+#endif -+ emit_ab(as, PPCI_CMPLW, type, tisnum); - } -- if (ra_hasreg(dest)) emit_fai(as, PPCI_LFD, dest, base, ofs-4); -+ if (ra_hasreg(dest)) emit_fai(as, LJ_SOFTFP ? PPCI_LWZ : PPCI_LFD, dest, -+ base, ofs-(LJ_SOFTFP?0:4)); - } else { - if ((ir->op2 & IRSLOAD_TYPECHECK)) { - asm_guardcc(as, CC_NE); -@@ -1119,6 +1225,7 @@ static void asm_obar(ASMState *as, IRIns - - /* -- Arithmetic and logic operations ------------------------------------- */ - -+#if !LJ_SOFTFP - static void asm_fparith(ASMState *as, IRIns *ir, PPCIns pi) - { - Reg dest = ra_dest(as, ir, RSET_FPR); -@@ -1146,13 +1253,17 @@ static void asm_fpmath(ASMState *as, IRI - else - asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2); - } -+#endif - - static void asm_add(ASMState *as, IRIns *ir) - { -+#if !LJ_SOFTFP - if (irt_isnum(ir->t)) { - if (!asm_fusemadd(as, ir, PPCI_FMADD, PPCI_FMADD)) - asm_fparith(as, ir, PPCI_FADD); -- } else { -+ } else -+#endif -+ { - Reg dest = ra_dest(as, ir, RSET_GPR); - Reg right, left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); - PPCIns pi; -@@ -1191,10 +1302,13 @@ static void asm_add(ASMState *as, IRIns - - static void asm_sub(ASMState *as, IRIns *ir) - { -+#if !LJ_SOFTFP - if (irt_isnum(ir->t)) { - if (!asm_fusemadd(as, ir, PPCI_FMSUB, PPCI_FNMSUB)) - asm_fparith(as, ir, PPCI_FSUB); -- } else { -+ } else -+#endif -+ { - PPCIns pi = PPCI_SUBF; - Reg dest = ra_dest(as, ir, RSET_GPR); - Reg left, right; -@@ -1220,9 +1334,12 @@ static void asm_sub(ASMState *as, IRIns - - static void asm_mul(ASMState *as, IRIns *ir) - { -+#if !LJ_SOFTFP - if (irt_isnum(ir->t)) { - asm_fparith(as, ir, PPCI_FMUL); -- } else { -+ } else -+#endif -+ { - PPCIns pi = PPCI_MULLW; - Reg dest = ra_dest(as, ir, RSET_GPR); - Reg right, left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); -@@ -1250,9 +1367,12 @@ static void asm_mul(ASMState *as, IRIns - - static void asm_neg(ASMState *as, IRIns *ir) - { -+#if !LJ_SOFTFP - if (irt_isnum(ir->t)) { - asm_fpunary(as, ir, PPCI_FNEG); -- } else { -+ } else -+#endif -+ { - Reg dest, left; - PPCIns pi = PPCI_NEG; - if (as->flagmcp == as->mcp) { -@@ -1563,9 +1683,40 @@ static void asm_bitshift(ASMState *as, I - PPCI_RLWINM|PPCF_MB(0)|PPCF_ME(31)) - #define asm_bror(as, ir) lua_assert(0) - -+#if LJ_SOFTFP -+static void asm_sfpmin_max(ASMState *as, IRIns *ir) -+{ -+ CCallInfo ci = lj_ir_callinfo[IRCALL_softfp_cmp]; -+ IRRef args[4]; -+ MCLabel l_right, l_end; -+ Reg desthi = ra_dest(as, ir, RSET_GPR), destlo = ra_dest(as, ir+1, RSET_GPR); -+ Reg righthi, lefthi = ra_alloc2(as, ir, RSET_GPR); -+ Reg rightlo, leftlo = ra_alloc2(as, ir+1, RSET_GPR); -+ PPCCC cond = (IROp)ir->o == IR_MIN ? CC_EQ : CC_NE; -+ righthi = (lefthi >> 8); lefthi &= 255; -+ rightlo = (leftlo >> 8); leftlo &= 255; -+ args[0^LJ_BE] = ir->op1; args[1^LJ_BE] = (ir+1)->op1; -+ args[2^LJ_BE] = ir->op2; args[3^LJ_BE] = (ir+1)->op2; -+ l_end = emit_label(as); -+ if (desthi != righthi) emit_mr(as, desthi, righthi); -+ if (destlo != rightlo) emit_mr(as, destlo, rightlo); -+ l_right = emit_label(as); -+ if (l_end != l_right) emit_jmp(as, l_end); -+ if (desthi != lefthi) emit_mr(as, desthi, lefthi); -+ if (destlo != leftlo) emit_mr(as, destlo, leftlo); -+ if (l_right == as->mcp+1) { -+ cond ^= 4; l_right = l_end; ++as->mcp; -+ } -+ emit_condbranch(as, PPCI_BC, cond, l_right); -+ ra_evictset(as, RSET_SCRATCH); -+ emit_cmpi(as, RID_RET, 1); -+ asm_gencall(as, &ci, args); -+} -+#endif -+ - static void asm_min_max(ASMState *as, IRIns *ir, int ismax) - { -- if (irt_isnum(ir->t)) { -+ if (!LJ_SOFTFP && irt_isnum(ir->t)) { - Reg dest = ra_dest(as, ir, RSET_FPR); - Reg tmp = dest; - Reg right, left = ra_alloc2(as, ir, RSET_FPR); -@@ -1653,7 +1804,7 @@ static void asm_intcomp_(ASMState *as, I - static void asm_comp(ASMState *as, IRIns *ir) - { - PPCCC cc = asm_compmap[ir->o]; -- if (irt_isnum(ir->t)) { -+ if (!LJ_SOFTFP && irt_isnum(ir->t)) { - Reg right, left = ra_alloc2(as, ir, RSET_FPR); - right = (left >> 8); left &= 255; - asm_guardcc(as, (cc >> 4)); -@@ -1674,6 +1825,44 @@ static void asm_comp(ASMState *as, IRIns - - #define asm_equal(as, ir) asm_comp(as, ir) - -+#if LJ_SOFTFP -+/* SFP comparisons. */ -+static void asm_sfpcomp(ASMState *as, IRIns *ir) -+{ -+ const CCallInfo *ci = &lj_ir_callinfo[IRCALL_softfp_cmp]; -+ RegSet drop = RSET_SCRATCH; -+ Reg r; -+ IRRef args[4]; -+ args[0^LJ_BE] = ir->op1; args[1^LJ_BE] = (ir+1)->op1; -+ args[2^LJ_BE] = ir->op2; args[3^LJ_BE] = (ir+1)->op2; -+ -+ for (r = REGARG_FIRSTGPR; r <= REGARG_FIRSTGPR+3; r++) { -+ if (!rset_test(as->freeset, r) && -+ regcost_ref(as->cost[r]) == args[r-REGARG_FIRSTGPR]) -+ rset_clear(drop, r); -+ } -+ ra_evictset(as, drop); -+ asm_setupresult(as, ir, ci); -+ switch ((IROp)ir->o) { -+ case IR_ULT: -+ asm_guardcc(as, CC_EQ); -+ emit_ai(as, PPCI_CMPWI, RID_RET, 0); -+ case IR_ULE: -+ asm_guardcc(as, CC_EQ); -+ emit_ai(as, PPCI_CMPWI, RID_RET, 1); -+ break; -+ case IR_GE: case IR_GT: -+ asm_guardcc(as, CC_EQ); -+ emit_ai(as, PPCI_CMPWI, RID_RET, 2); -+ default: -+ asm_guardcc(as, (asm_compmap[ir->o] & 0xf)); -+ emit_ai(as, PPCI_CMPWI, RID_RET, 0); -+ break; -+ } -+ asm_gencall(as, ci, args); -+} -+#endif -+ - #if LJ_HASFFI - /* 64 bit integer comparisons. */ - static void asm_comp64(ASMState *as, IRIns *ir) -@@ -1703,19 +1892,36 @@ static void asm_comp64(ASMState *as, IRI - /* Hiword op of a split 64 bit op. Previous op must be the loword op. */ - static void asm_hiop(ASMState *as, IRIns *ir) - { --#if LJ_HASFFI -+#if LJ_HASFFI || LJ_SOFTFP - /* HIOP is marked as a store because it needs its own DCE logic. */ - int uselo = ra_used(ir-1), usehi = ra_used(ir); /* Loword/hiword used? */ - if (LJ_UNLIKELY(!(as->flags & JIT_F_OPT_DCE))) uselo = usehi = 1; - if ((ir-1)->o == IR_CONV) { /* Conversions to/from 64 bit. */ - as->curins--; /* Always skip the CONV. */ -+#if LJ_HASFFI && !LJ_SOFTFP - if (usehi || uselo) - asm_conv64(as, ir); - return; -+#endif - } else if ((ir-1)->o <= IR_NE) { /* 64 bit integer comparisons. ORDER IR. */ - as->curins--; /* Always skip the loword comparison. */ -+#if LJ_SOFTFP -+ if (!irt_isint(ir->t)) { -+ asm_sfpcomp(as, ir-1); -+ return; -+ } -+#endif -+#if LJ_HASFFI - asm_comp64(as, ir); -+#endif -+ return; -+#if LJ_SOFTFP -+ } else if ((ir-1)->o == IR_MIN || (ir-1)->o == IR_MAX) { -+ as->curins--; /* Always skip the loword min/max. */ -+ if (uselo || usehi) -+ asm_sfpmin_max(as, ir-1); - return; -+#endif - } else if ((ir-1)->o == IR_XSTORE) { - as->curins--; /* Handle both stores here. */ - if ((ir-1)->r != RID_SINK) { -@@ -1726,14 +1932,27 @@ static void asm_hiop(ASMState *as, IRIns - } - if (!usehi) return; /* Skip unused hiword op for all remaining ops. */ - switch ((ir-1)->o) { -+#if LJ_HASFFI - case IR_ADD: as->curins--; asm_add64(as, ir); break; - case IR_SUB: as->curins--; asm_sub64(as, ir); break; - case IR_NEG: as->curins--; asm_neg64(as, ir); break; -+#endif -+#if LJ_SOFTFP -+ case IR_SLOAD: case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: -+ case IR_STRTO: -+ if (!uselo) -+ ra_allocref(as, ir->op1, RSET_GPR); /* Mark lo op as used. */ -+ break; -+#endif - case IR_CALLN: -+ case IR_CALLS: - case IR_CALLXS: - if (!uselo) - ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ - break; -+#if LJ_SOFTFP -+ case IR_ASTORE: case IR_HSTORE: case IR_USTORE: case IR_TOSTR: -+#endif - case IR_CNEWI: - /* Nothing to do here. Handled by lo op itself. */ - break; -@@ -1797,8 +2016,19 @@ static void asm_stack_restore(ASMState * - if ((sn & SNAP_NORESTORE)) - continue; - if (irt_isnum(ir->t)) { -+#if LJ_SOFTFP -+ Reg tmp; -+ RegSet allow = rset_exclude(RSET_GPR, RID_BASE); -+ lua_assert(irref_isk(ref)); /* LJ_SOFTFP: must be a number constant. */ -+ tmp = ra_allock(as, (int32_t)ir_knum(ir)->u32.lo, allow); -+ emit_tai(as, PPCI_STW, tmp, RID_BASE, ofs+(LJ_BE?4:0)); -+ if (rset_test(as->freeset, tmp+1)) allow = RID2RSET(tmp+1); -+ tmp = ra_allock(as, (int32_t)ir_knum(ir)->u32.hi, allow); -+ emit_tai(as, PPCI_STW, tmp, RID_BASE, ofs+(LJ_BE?0:4)); -+#else - Reg src = ra_alloc1(as, ref, RSET_FPR); - emit_fai(as, PPCI_STFD, src, RID_BASE, ofs); -+#endif - } else { - Reg type; - RegSet allow = rset_exclude(RSET_GPR, RID_BASE); -@@ -1811,6 +2041,10 @@ static void asm_stack_restore(ASMState * - if ((sn & (SNAP_CONT|SNAP_FRAME))) { - if (s == 0) continue; /* Do not overwrite link to previous frame. */ - type = ra_allock(as, (int32_t)(*flinks--), allow); -+#if LJ_SOFTFP -+ } else if ((sn & SNAP_SOFTFPNUM)) { -+ type = ra_alloc1(as, ref+1, rset_exclude(RSET_GPR, RID_BASE)); -+#endif - } else { - type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); - } -@@ -1947,14 +2181,15 @@ static Reg asm_setup_call_slots(ASMState - int nslots = 2, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; - asm_collectargs(as, ir, ci, args); - for (i = 0; i < nargs; i++) -- if (args[i] && irt_isfp(IR(args[i])->t)) { -+ if (!LJ_SOFTFP && args[i] && irt_isfp(IR(args[i])->t)) { - if (nfpr > 0) nfpr--; else nslots = (nslots+3) & ~1; - } else { - if (ngpr > 0) ngpr--; else nslots++; - } - if (nslots > as->evenspill) /* Leave room for args in stack slots. */ - as->evenspill = nslots; -- return irt_isfp(ir->t) ? REGSP_HINT(RID_FPRET) : REGSP_HINT(RID_RET); -+ return (!LJ_SOFTFP && irt_isfp(ir->t)) ? REGSP_HINT(RID_FPRET) : -+ REGSP_HINT(RID_RET); - } - - static void asm_setup_target(ASMState *as) diff --git a/packages/lang/luajit/patches/060-ppc-musl.patch b/packages/lang/luajit/patches/060-ppc-musl.patch deleted file mode 100644 index 119fedd2..00000000 --- a/packages/lang/luajit/patches/060-ppc-musl.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 195e0be62c0aa0f6aaf63a93ee322bb0a630576c Mon Sep 17 00:00:00 2001 -From: Clint Bland -Date: Wed, 13 Mar 2019 19:19:16 -0700 -Subject: [PATCH] Have powerpc use fake GOT like MIPS - ---- - src/lj_dispatch.c | 15 +++++++++++++++ - src/lj_dispatch.h | 29 ++++++++++++++++++++++++++++- - src/vm_ppc.dasc | 9 ++++++++- - 3 files changed, 51 insertions(+), 2 deletions(-) - ---- a/src/lj_dispatch.c -+++ b/src/lj_dispatch.c -@@ -56,6 +56,18 @@ static const ASMFunction dispatch_got[] - #undef GOTFUNC - #endif - -+#if LJ_TARGET_PPC -+#include -+LJ_FUNCA_NORET void LJ_FASTCALL lj_ffh_coroutine_wrap_err(lua_State *L, -+ lua_State *co); -+ -+#define GOTFUNC(name) (ASMFunction)name, -+static const ASMFunction dispatch_got[] = { -+ GOTDEF(GOTFUNC) -+}; -+#undef GOTFUNC -+#endif -+ - /* Initialize instruction dispatch table and hot counters. */ - void lj_dispatch_init(GG_State *GG) - { -@@ -77,6 +89,9 @@ void lj_dispatch_init(GG_State *GG) - #if LJ_TARGET_MIPS - memcpy(GG->got, dispatch_got, LJ_GOT__MAX*sizeof(ASMFunction *)); - #endif -+#if LJ_TARGET_PPC -+ memcpy(GG->got, dispatch_got, LJ_GOT__MAX*4); -+#endif - } - - #if LJ_HASJIT ---- a/src/lj_dispatch.h -+++ b/src/lj_dispatch.h -@@ -66,6 +66,33 @@ GOTDEF(GOTENUM) - }; - #endif - -+#if LJ_TARGET_PPC -+/* Need our own global offset table for the dreaded MIPS calling conventions. */ -+#if LJ_SOFTFP -+#ifndef _LJ_IRCALL_H -+extern double __ledf2(double a, double b); -+extern double __adddf3(double a, double b); -+extern double __subdf3(double a, double b); -+extern double __muldf3(double a, double b); -+extern double __divdf3(double a, double b); -+#endif -+#define SFGOTDEF(_) _(__ledf2) _(__adddf3) _(__subdf3) _(__muldf3) _(__divdf3) -+#else -+#define SFGOTDEF(_) -+#endif -+#define GOTDEF(_) \ -+ _(floor) _(ceil) _(trunc) _(log) _(log10) _(exp) _(sin) _(cos) _(tan) \ -+ _(asin) _(acos) _(atan) _(sinh) _(cosh) _(tanh) _(frexp) _(modf) _(atan2) \ -+ _(pow) _(fmod) _(ldexp) _(sqrt) SFGOTDEF(_) -+ -+enum { -+#define GOTENUM(name) LJ_GOT_##name, -+GOTDEF(GOTENUM) -+#undef GOTENUM -+ LJ_GOT__MAX -+}; -+#endif -+ - /* Type of hot counter. Must match the code in the assembler VM. */ - /* 16 bits are sufficient. Only 0.0015% overhead with maximum slot penalty. */ - typedef uint16_t HotCount; -@@ -89,7 +116,7 @@ typedef uint16_t HotCount; - typedef struct GG_State { - lua_State L; /* Main thread. */ - global_State g; /* Global state. */ --#if LJ_TARGET_MIPS -+#if LJ_TARGET_MIPS || LJ_TARGET_PPC - ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */ - #endif - #if LJ_HASJIT ---- a/src/vm_ppc.dasc -+++ b/src/vm_ppc.dasc -@@ -59,7 +59,12 @@ - |.define ENV_OFS, 8 - |.endif - |.else // No TOC. --|.macro blex, target; bl extern target@plt; .endmacro -+|.macro blex, target -+| lwz TMP0, DISPATCH_GOT(target)(DISPATCH) -+| mtctr TMP0 -+| bctrl -+| //bl extern target@plt -+|.endmacro - |.macro .toc, a, b; .endmacro - |.endif - |.macro .tocenv, a, b; .if TOCENV; a, b; .endif; .endmacro -@@ -482,6 +487,8 @@ - |// Assumes DISPATCH is relative to GL. - #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) - #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) -+#define GG_DISP2GOT (GG_OFS(got) - GG_OFS(dispatch)) -+#define DISPATCH_GOT(name) (GG_DISP2GOT + 4*LJ_GOT_##name) - | - #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) - | diff --git a/packages/lang/luajit/patches/300-PPC-e500-with-SPE-enabled-use-soft-float.patch b/packages/lang/luajit/patches/300-PPC-e500-with-SPE-enabled-use-soft-float.patch deleted file mode 100644 index e63c5ddc..00000000 --- a/packages/lang/luajit/patches/300-PPC-e500-with-SPE-enabled-use-soft-float.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 2c8b9d5807a515a0ff859899065f512beabcbaed Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C5=A0imon=20Bo=C5=99ek?= -Date: Sat, 16 Jul 2022 18:39:55 +0200 -Subject: [PATCH] PPC/e500 with SPE enabled: use soft float instead of failing -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This allows building LuaJit for systems with Power ISA SPE -extension[^1] support by using soft float on LuaJit side. - -While e500 CPU cores support SPE instruction set extension -allowing them to perform floating point arithmetic natively, -this isn't required. They can function with software floating -point to integer arithmetic translation as well, -just like FPU-less PowerPC CPUs without SPE support. - -Therefore I see no need to prevent them from running LuaJit -explicitly. - -[^1]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf - -Signed-off-by: Pali Rohár -Signed-off-by: Šimon Bořek ---- - src/lj_arch.h | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - ---- a/src/lj_arch.h -+++ b/src/lj_arch.h -@@ -256,7 +256,7 @@ - #define LJ_ARCH_NAME "ppc" - - #if !defined(LJ_ARCH_HASFPU) --#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) -+#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) || defined(__NO_FPRS__) - #define LJ_ARCH_HASFPU 0 - #else - #define LJ_ARCH_HASFPU 1 -@@ -264,7 +264,7 @@ - #endif - - #if !defined(LJ_ABI_SOFTFP) --#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) -+#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) || defined(__NO_FPRS__) - #define LJ_ABI_SOFTFP 1 - #else - #define LJ_ABI_SOFTFP 0 -@@ -442,9 +442,6 @@ - #if LJ_ARCH_PPC64 - #error "No support for PowerPC 64 bit mode (yet)" - #endif --#if defined(__NO_FPRS__) && !defined(_SOFT_FLOAT) --#error "No support for PPC/e500 anymore (use LuaJIT 2.0)" --#endif - #elif LJ_TARGET_MIPS32 - #if !((defined(_MIPS_SIM_ABI32) && _MIPS_SIM == _MIPS_SIM_ABI32) || (defined(_ABIO32) && _MIPS_SIM == _ABIO32)) - #error "Only o32 ABI supported for MIPS32" diff --git a/packages/lang/luajit2/Makefile b/packages/lang/luajit2/Makefile deleted file mode 100644 index e2959d7d..00000000 --- a/packages/lang/luajit2/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=luajit2 -PKG_SOURCE_DATE:=2024-08-15 -PKG_VERSION:=2.1.$(subst -,.,$(PKG_SOURCE_DATE)) -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/openresty/luajit2 -PKG_SOURCE_VERSION:=33d6b04681d2f079a6d013988a426a841c52e29e -PKG_MIRROR_HASH:=cb6687203153fd6b2f730e899728a911f8b7094f296cc11ca0f2b20ce849f952 - -PKG_MAINTAINER:=Javier Marcet -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYRIGHT - -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - -# HAS_LUAJIT_ARCH config is defined in luajit and is used to define -# arch deoendency for luajit. Since luajit2 is an improved version of -# luajit, they share the same arch dependency. Refer there to update -# dependency for them. -define Package/luajit2 - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Lua - TITLE:=LuaJIT from OpenResty - URL:=https://www.luajit.org - DEPENDS:=@HAS_LUAJIT_ARCH - PROVIDES:=luajit -endef - -define Package/luajit2/description - OpenResty's maintained branch of LuaJIT, a Just-In-Time (JIT) compiler for the Lua programming language -endef - -ifeq ($(HOST_ARCH),$(filter $(HOST_ARCH), x86_64 mips64)) - ifeq ($(CONFIG_ARCH_64BIT),) - HOST_BITS := -m32 - endif -endif - -define Build/Compile - $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - HOST_CC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_BITS)" \ - CROSS="$(TARGET_CROSS)" \ - DPREFIX=$(PKG_INSTALL_DIR)/usr \ - PREFIX=/usr \ - TARGET_SYS=Linux \ - TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - BUILDMODE=dynamic - $(RM) -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DPREFIX=$(PKG_INSTALL_DIR)/usr \ - PREFIX=/usr \ - TARGET_SYS=Linux \ - install -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/luajit-2.1 - $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.{h,hpp} $(1)/usr/include/luajit-2.1 - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/luajit.pc $(1)/usr/lib/pkgconfig/ - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-* $(1)/usr/bin/$(PKG_NAME) -endef - -define Package/luajit2/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-* $(1)/usr/bin/$(PKG_NAME) -endef - -define Host/Compile - $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ - DPREFIX=$(STAGING_DIR_HOSTPKG) \ - TARGET_CFLAGS="$(HOST_CFLAGS)" \ - TARGET_LDFLAGS="$(HOST_LDFLAGS)" -endef - -define Host/Install - $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ - DPREFIX=$(STAGING_DIR_HOSTPKG) \ - install - $(CP) $(STAGING_DIR_HOSTPKG)/bin/luajit-* $(STAGING_DIR_HOSTPKG)/bin/$(PKG_NAME) -endef - -$(eval $(call HostBuild,luajit2)) -$(eval $(call BuildPackage,luajit2)) diff --git a/packages/lang/luajit2/patches/010-lua-path.patch b/packages/lang/luajit2/patches/010-lua-path.patch deleted file mode 100644 index 35a1e0b3..00000000 --- a/packages/lang/luajit2/patches/010-lua-path.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -35,8 +35,8 @@ - #ifndef LUA_LMULTILIB - #define LUA_LMULTILIB "lib" - #endif --#define LUA_LROOT "/usr/local" --#define LUA_LUADIR "/lua/5.1/" -+#define LUA_LROOT "/usr" -+#define LUA_LUADIR "/lua/" - - #ifdef LUA_ROOT - #define LUA_JROOT LUA_ROOT diff --git a/packages/lang/lualanes/Makefile b/packages/lang/lualanes/Makefile deleted file mode 100644 index 764b8ddd..00000000 --- a/packages/lang/lualanes/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lualanes -PKG_VERSION:=3.16.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/LuaLanes/lanes/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=22cfa836de4be14fe588b9cd34e936d6f61ec6f4096d8ae30d4ec35855d9608f -PKG_BUILD_DIR:=$(BUILD_DIR)/lanes-$(PKG_VERSION) - -PKG_MAINTAINER:=Vladimir Malyutin -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=COPYRIGHT - -PKG_BUILD_DEPENDS:=lua/host - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lualanes - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaLanes - URL:=http://lualanes.github.io/lanes/ - DEPENDS:=+lua +luac +liblua +libpthread -endef - -define Package/lualanes/description -Lua Lanes is a Lua extension library providing the possibility to run -multiple Lua states in parallel. It is intended to be used for optimizing -performance on multicore CPU's and to study ways to make Lua programs -naturally parallel to begin with. - -Lanes is included into your software by the regular require "lanes" method. -No C side programming is needed; all APIs are Lua side, and most existing -extension modules should work seamlessly together with the multiple lanes. - -Lanes supports Lua 5.1, 5.2 and 5.3 -endef - -define Package/lualanes/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/lua/lmod/lanes.lua $(1)/usr/lib/lua/ - $(INSTALL_DIR) $(1)/usr/lib/lua/lanes - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/lua/cmod/core.so $(1)/usr/lib/lua/lanes/core.so -endef - -$(eval $(call BuildPackage,lualanes)) diff --git a/packages/lang/luaossl/Makefile b/packages/lang/luaossl/Makefile deleted file mode 100644 index 73ef3d03..00000000 --- a/packages/lang/luaossl/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2021 Siger Yang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luaossl -PKG_VERSION:=20220711 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Siger Yang - -PKG_MIRROR_HASH:=7abb1070da36906f9ef310af1a12827543bb5de4bbe239068420fd8b3e3858d2 -PKG_SOURCE_URL:=https://github.com/wahern/luaossl.git -PKG_SOURCE_VERSION:=rel-$(PKG_VERSION) -PKG_SOURCE_PROTO:=git - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/luaossl - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Comprehensive binding to OpenSSL for Lua 5.1, 5.2, and later - URL:=http://25thandclement.com/~william/projects/luaossl.html - DEPENDS:=+liblua +libopenssl -endef - -define Package/luaossl/description - luaossl is a comprehensive binding to OpenSSL for Lua 5.1, 5.2, and - later. It includes support for certificate and key management, key - generation, signature verification, and deep bindings to the - distinguished name, alternative name, and X.509v3 extension interfaces. -endef - -TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += $(FPIC) - -MAKE_FLAGS += \ - LUA_APIS="5.1" \ - lua51cpath="/usr/lib/lua" \ - lua51path="/usr/lib/lua" - -define Package/luaossl/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/_openssl.so $(1)/usr/lib/lua/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/openssl.lua $(1)/usr/lib/lua/ - - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/openssl $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,luaossl)) diff --git a/packages/lang/luaossl/patches/900_fix_build_on_macos.patch b/packages/lang/luaossl/patches/900_fix_build_on_macos.patch deleted file mode 100644 index 5ceb99b6..00000000 --- a/packages/lang/luaossl/patches/900_fix_build_on_macos.patch +++ /dev/null @@ -1,15 +0,0 @@ -commit 8686cae32fc04045c1404c2febf84242c298bf0d -Author: Sergey V. Lobanov -Date: Fri Jan 7 23:00:03 2022 +0300 - - fix build on macos - - OpenWrt is always Linux. Disable OS detection - ---- a/mk/vendor.os -+++ b/mk/vendor.os -@@ -1,3 +1,3 @@ - #!/bin/sh - --uname -s -+echo Linux diff --git a/packages/lang/luaposix/Makefile b/packages/lang/luaposix/Makefile deleted file mode 100644 index 2379d6d3..00000000 --- a/packages/lang/luaposix/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luaposix -PKG_VERSION:=36.2.1 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)? -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=44e5087cd3c47058f9934b90c0017e4cf870b71619f99707dd433074622debb1 -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_DEPENDS:=luarocks/host - -include $(INCLUDE_DIR)/package.mk - -define Package/luaposix - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=POSIX binding for LuaJIT, Lua 5.1, 5.2 and 5.3 - URL:=https://github.com/luaposix/luaposix - DEPENDS:=+lua +lua-bit32 -endef - -define Package/luaposix/description - luaposix is a general POSIX library for Lua providing access - to various low level libc functions. -endef - -TARGET_PATH_PKG:=$(CURDIR)/scripts:$(TARGET_PATH_PKG) - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include - -define Build/Compile - cd $(PKG_BUILD_DIR) && \ - LDFLAGS="$(TARGET_LDFLAGS) $(FPIC)" \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ - CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ - LUA_PKGNAME=lua5.1 \ - LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ - luarocks make --force --deps-mode=none --pack-binary-rock luaposix-$(PKG_VERSION)-1.rockspec \ - LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ - LUA_PKGNAME=lua5.1 \ - CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ - LDFLAGS="$(TARGET_LDFLAGS)" -endef - -define Package/luaposix/install - $(INSTALL_DIR) $(1)/usr/lib/lua/posix/sys - $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/*.so $(1)/usr/lib/lua/posix/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/sys/*.so $(1)/usr/lib/lua/posix/sys/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix/*.lua $(1)/usr/lib/lua/posix/ - rm -f $(1)/usr/lib/lua/posix/{deprecated,compat}.lua -endef - -$(eval $(call BuildPackage,luaposix)) diff --git a/packages/lang/luaposix/patches/102-disable-compat-deprecated.patch b/packages/lang/luaposix/patches/102-disable-compat-deprecated.patch deleted file mode 100644 index efaa37ba..00000000 --- a/packages/lang/luaposix/patches/102-disable-compat-deprecated.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/lib/posix/init.lua -+++ b/lib/posix/init.lua -@@ -437,14 +437,6 @@ do - end - end - -- -- Inject deprecated APIs (overwriting submodules) for backwards compatibility. -- for k, v in next, (require 'posix.deprecated') do -- rawset(M, k, v) -- end -- for k, v in next, (require 'posix.compat') do -- rawset(M, k, v) -- end -- - --- Metamethods - -- @section metamethods - diff --git a/packages/lang/luaposix/scripts/uname b/packages/lang/luaposix/scripts/uname deleted file mode 100755 index 787b647f..00000000 --- a/packages/lang/luaposix/scripts/uname +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo Linux diff --git a/packages/lang/luarocks/Makefile b/packages/lang/luarocks/Makefile deleted file mode 100644 index e6d67979..00000000 --- a/packages/lang/luarocks/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luarocks -PKG_VERSION:=2.2.2 -PKG_RELEASE:=4 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks -PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_MIRROR_HASH:=9b2f880e0ff57a0d7e3a9d8d5365c73e6f546891bc39d2c6ef4c3443a8ca4b45 - -PKG_MAINTAINER:=Amr Hassan -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=lua/host -HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS) -HOST_BUILD_PARALLEL:=1 - -HOST_BUILD_PREFIX:=$(STAGING_DIR)/host -HOST_BUILD_DIR:=$(BUILD_DIR)/host/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/luarocks - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=luarocks - URL:=https://github.com/keplerproject/luarocks - DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec -endef - -define Package/luarocks/description - LuaRocks is a deployment and management system for Lua modules. -endef - -# My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk -CONFIGURE_ARGS = \ - --prefix=$(CONFIGURE_PREFIX) \ - --sysconfdir=/etc \ - --with-lua=$(STAGING_DIR_HOSTPKG) - -HOST_CONFIGURE_ARGS= \ - --prefix=$(STAGING_DIR)/host \ - --sysconfdir=$(STAGING_DIR)/host/etc \ - --with-lua=$(STAGING_DIR_HOSTPKG) - -CONFIGURE_VARS = \ - LUAROCKS_UNAME_S="Linux" \ - LUAROCKS_UNAME_M="$(ARCH)" - -HOST_CONFIGURE_VARS = \ - LUAROCKS_UNAME_S="Linux" \ - LUAROCKS_UNAME_M="$(ARCH)" - -define Build/Compile - $(call Build/Compile/Default,build) -endef - -define Host/Compile - $(call Host/Compile/Default,build) -endef - -define Package/luarocks/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin - $(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) install -endef - -$(eval $(call BuildPackage,luarocks)) - -$(eval $(call HostBuild)) diff --git a/packages/lang/luarocks/patches/01_dont_modify_bin_shebang.diff b/packages/lang/luarocks/patches/01_dont_modify_bin_shebang.diff deleted file mode 100644 index ab48a961..00000000 --- a/packages/lang/luarocks/patches/01_dont_modify_bin_shebang.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -89,7 +89,7 @@ build_bins: cleanup_bins - for f in $(BIN_FILES) ;\ - do \ - sed "1d" src/bin/$$f > src/bin/$$f.bak ;\ -- echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\ -+ echo "#!/usr/bin/env lua5.1" > src/bin/$$f ;\ - echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\ - cat src/bin/$$f.bak >> src/bin/$$f ;\ - chmod +x src/bin/$$f ;\ diff --git a/packages/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch b/packages/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch deleted file mode 100644 index d6da3fe1..00000000 --- a/packages/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/configure -+++ b/configure -@@ -388,18 +388,22 @@ then - fi - - echo_n "Configuring for system... " --if uname -s --then -- LUAROCKS_UNAME_S=`uname -s` --else -- die "Could not determine operating system. 'uname -s' failed." -+if [ -z "$LUAROCKS_UNAME_S" ]; then -+ if uname -s -+ then -+ LUAROCKS_UNAME_S=`uname -s` -+ else -+ die "Could not determine operating system. 'uname -s' failed." -+ fi - fi - echo_n "Configuring for architecture... " --if uname -m --then -- LUAROCKS_UNAME_M=`uname -m` --else -- die "Could not determine processor architecture. 'uname -m' failed." -+if [ -z "$LUAROCKS_UNAME_M" ]; then -+ if uname -m -+ then -+ LUAROCKS_UNAME_M=`uname -m` -+ else -+ die "Could not determine processor architecture. 'uname -m' failed." -+ fi - fi - - for v in 5.1 5.2 5.3; do diff --git a/packages/lang/luasec/Makefile b/packages/lang/luasec/Makefile deleted file mode 100644 index 9d60604c..00000000 --- a/packages/lang/luasec/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2009-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasec -PKG_VERSION:=1.3.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=97293092ba385ab390decb6678bc8cbeffd5899bfbc49eb7ef4aa00f5e31c3d4 - -MAINTAINER:=W. Michael Petullo -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/luasec - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaSec - URL:=https://github.com/brunoos/luasec - DEPENDS:=+lua +libopenssl +luasocket -endef - -define Package/luasec/description - LuaSec is a binding for OpenSSL library to provide TLS/SSL communication. -endef - -define Build/Configure -endef - -TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += $(FPIC) - -MAKE_FLAGS += \ - LD="$(TARGET_CC)" \ - INC_PATH="" \ - LIB_PATH="" \ - LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" - -define Build/Compile -$(call Build/Compile/Default,linux) -endef - -define Package/luasec/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/ - $(INSTALL_DIR) $(1)/usr/lib/lua/ssl - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/ -endef - -$(eval $(call BuildPackage,luasec)) diff --git a/packages/lang/luasec/patches/100-fix-compilation.patch b/packages/lang/luasec/patches/100-fix-compilation.patch deleted file mode 100644 index 1c3bc3ba..00000000 --- a/packages/lang/luasec/patches/100-fix-compilation.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -16,8 +16,8 @@ WARN=-Wall -pedantic - BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) - BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR) - --LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) --LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR) -+LNX_CFLAGS=$(INCDIR) $(DEFS) -+LNX_LDFLAGS=-shared $(LIBDIR) - - MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)' - MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS) -@@ -34,10 +34,10 @@ LDFLAGS += $(MYLDFLAGS) - all: - - install: $(CMOD) $(LMOD) -- $(INSTALL) -d $(DESTDIR)$(LUAPATH)/ssl $(DESTDIR)$(LUACPATH) -- $(INSTALL) $(CMOD) $(DESTDIR)$(LUACPATH) -- $(INSTALL) -m644 $(LMOD) $(DESTDIR)$(LUAPATH) -- $(INSTALL) -m644 https.lua $(DESTDIR)$(LUAPATH)/ssl -+ $(INSTALL) -d $(LUAPATH)/ssl $(LUACPATH) -+ $(INSTALL) $(CMOD) $(LUACPATH) -+ $(INSTALL) -m644 $(LMOD) $(LUAPATH) -+ $(INSTALL) -m644 https.lua $(LUAPATH)/ssl - - linux: - @$(MAKE) $(CMOD) MYCFLAGS="$(LNX_CFLAGS)" MYLDFLAGS="$(LNX_LDFLAGS)" EXTRA="$(EXTRA)" diff --git a/packages/lang/luasoap/Makefile b/packages/lang/luasoap/Makefile deleted file mode 100644 index 20e5a3de..00000000 --- a/packages/lang/luasoap/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasoap -PKG_VERSION:=4.0.2 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/tomasguisasola/luasoap -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_MIRROR_HASH:=ecd82fe9d7c62c6870f042ba65ce57054d68193779af9461cb4d95b83983bf80 - -PKG_MAINTAINER:=Liu Peng -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/luasoap - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaSOAP - URL:=https://github.com/tomasguisasola/luasoap - DEPENDS:=+lua +luaexpat +luasec +luasocket - PKGARCH:=all -endef - -define Package/luasoap/description - LuaSOAP is a library of functions to deal with SOAP. -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/luasoap/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/soap.lua $(1)/usr/lib/lua/ - $(INSTALL_DIR) $(1)/usr/lib/lua/soap - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{client,server}.lua $(1)/usr/lib/lua/soap/ - $(INSTALL_DIR) $(1)/usr/lib/lua/soap/tests - $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/test{,-http,-server,-wsdl}.lua $(1)/usr/lib/lua/soap/tests/ -endef - -$(eval $(call BuildPackage,luasoap)) diff --git a/packages/lang/luasocket/Makefile b/packages/lang/luasocket/Makefile deleted file mode 100644 index 9538d7a9..00000000 --- a/packages/lang/luasocket/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -# -# Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasocket -PKG_VERSION:=3.1.0 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/lunarmodules/luasocket -PKG_MIRROR_HASH:=1ee81f1f5a63d0d14c8c8571e8940604cbf1443c3b18ee7d3d1bac6791f853fc - -PKG_MAINTAINER:=W. Michael Petullo -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/luasocket/default - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - URL:=http://w3.impa.br/~diego/software/luasocket -endef - -define Package/luasocket - $(Package/luasocket/default) - TITLE:=LuaSocket - DEPENDS:=+lua - VARIANT:=lua-51 - DEFAULT_VARIANT:=1 -endef - -define Package/luasocket5.3 - $(Package/luasocket/default) - TITLE:=LuaSocket 5.3 - DEPENDS:=+liblua5.3 - VARIANT:=lua-53 -endef - -ifeq ($(BUILD_VARIANT),lua-51) - LUA_VERSION=5.1 -endif - -ifeq ($(BUILD_VARIANT),lua-53) - LUA_VERSION=5.3 -endif - - -define Package/luasocket/default/description - LuaSocket is the most comprehensive networking support - library for the Lua language. It provides easy access to - TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more. -endef -Package/luasocket/description = $(Package/luasocket/default/description) -Package/luasocket5.3/description = $(Package/luasocket/default/description) - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/ \ - LIBDIR="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \ - LD="$(TARGET_CROSS)ld -shared" \ - LUAV=$(LUA_VERSION) LUAINC_linux_base=$(STAGING_DIR)/usr/include \ - all -endef - -define Package/luasocket/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime-1.0.3.so $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket-3.0.0.so $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/lib/lua/mime - ln -sf ../mime-1.0.3.so $(1)/usr/lib/lua/mime/core.so - $(INSTALL_DIR) $(1)/usr/lib/lua/socket - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/serial.so $(1)/usr/lib/lua/socket - ln -sf ../socket-3.0.0.so $(1)/usr/lib/lua/socket/core.so -endef - - -define Package/luasocket5.3/install - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - DESTDIR="$(1)" \ - LUAV=$(LUA_VERSION) \ - install -endef - - -$(eval $(call BuildPackage,luasocket)) -$(eval $(call BuildPackage,luasocket5.3)) diff --git a/packages/lang/luasocket/patches/0001-Add-interface-support.patch b/packages/lang/luasocket/patches/0001-Add-interface-support.patch deleted file mode 100644 index d7bfe2bb..00000000 --- a/packages/lang/luasocket/patches/0001-Add-interface-support.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 96fdf07acf78ecfc9be76a8b0591f38fe6f1a875 Mon Sep 17 00:00:00 2001 -From: Steven Barth -Date: Sat, 9 Nov 2013 12:01:42 +0100 -Subject: [PATCH] Add interface resolving - ---- - src/if.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/if.h | 27 ++++++++++++++ - src/luasocket.c | 2 + - src/makefile | 2 + - src/options.c | 9 +++++ - 5 files changed, 153 insertions(+) - create mode 100644 src/if.c - create mode 100644 src/if.h - ---- /dev/null -+++ b/src/if.c -@@ -0,0 +1,117 @@ -+/* -+ * $Id: if.c $ -+ * -+ * Author: Markus Stenberg -+ * -+ * Copyright (c) 2012 cisco Systems, Inc. -+ * -+ * Created: Tue Dec 4 14:50:34 2012 mstenber -+ * Last modified: Wed Dec 5 18:51:08 2012 mstenber -+ * Edit time: 24 min -+ * -+ */ -+ -+#include -+#include -+#include -+ -+#include "if.h" -+ -+#include "lauxlib.h" -+ -+static int if_global_indextoname(lua_State *L); -+static int if_global_nametoindex(lua_State *L); -+static int if_global_nameindex(lua_State *L); -+ -+static luaL_Reg func[] = { -+ { "indextoname", if_global_indextoname}, -+ { "nametoindex", if_global_nametoindex}, -+ { "nameindex", if_global_nameindex}, -+ { NULL, NULL} -+}; -+ -+int if_open(lua_State *L) -+{ -+ lua_pushstring(L, "iface"); -+ lua_newtable(L); -+#if LUA_VERSION_NUM < 503 -+ luaL_openlib(L, NULL, func, 0); -+#else -+ luaL_setfuncs(L, func, 0); -+#endif -+ lua_settable(L, -3); -+ return 0; -+} -+ -+int if_global_indextoname(lua_State *L) -+{ -+ unsigned int ifnumber; -+ const char *name; -+ char buf[IF_NAMESIZE+1]; -+ -+ if (!lua_isnumber(L, 1)) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "indextoname expects only number argument"); -+ return 2; -+ } -+ ifnumber = lua_tonumber(L, 1); -+ if (!(name = if_indextoname(ifnumber, buf))) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "nonexistent interface"); -+ return 2; -+ } -+ lua_pushstring(L, name); -+ return 1; -+} -+ -+int if_global_nametoindex(lua_State *L) -+{ -+ unsigned int ifnumber; -+ if (!lua_isstring(L, 1)) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "nametoindex expects only string argument"); -+ return 2; -+ } -+ if (!(ifnumber = if_nametoindex(lua_tostring(L, 1)))) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "nonexistent interface"); -+ return 2; -+ } -+ lua_pushnumber(L, ifnumber); -+ return 1; -+} -+ -+int if_global_nameindex(lua_State *L) -+{ -+ struct if_nameindex *ni, *oni; -+ int i = 1; -+ oni = ni = if_nameindex(); -+ lua_newtable(L); -+ while (ni && ni->if_index && *(ni->if_name)) -+ { -+ /* at result[i], we store.. */ -+ lua_pushnumber(L, i); -+ -+ /* new table with two items - index, name*/ -+ lua_newtable(L); -+ lua_pushstring(L, "index"); -+ lua_pushnumber(L, ni->if_index); -+ lua_settable(L, -3); -+ -+ lua_pushstring(L, "name"); -+ lua_pushstring(L, ni->if_name); -+ lua_settable(L, -3); -+ -+ /* Then, actually store it */ -+ lua_settable(L, -3); -+ -+ i++; -+ ni++; -+ } -+ if_freenameindex(oni); -+ return 1; -+} ---- /dev/null -+++ b/src/if.h -@@ -0,0 +1,27 @@ -+/* -+ * $Id: if.h $ -+ * -+ * Author: Markus Stenberg -+ * -+ * Copyright (c) 2012 cisco Systems, Inc. -+ * -+ * Created: Tue Dec 4 14:37:24 2012 mstenber -+ * Last modified: Tue Dec 4 14:51:43 2012 mstenber -+ * Edit time: 7 min -+ * -+ */ -+ -+/* This module provides Lua wrapping for the advanced socket API -+ * defined in RFC3542, or mainly, the access to the system's interface -+ * list. It is necessary for use of recvmsg/sendmsg. -+ * -+ * TODO - Do something clever with Windows? -+ */ -+#ifndef IF_H -+#define IF_H -+ -+#include "lua.h" -+ -+int if_open(lua_State *L); -+ -+#endif /* IF_H */ ---- a/src/luasocket.c -+++ b/src/luasocket.c -@@ -21,6 +21,7 @@ - #include "tcp.h" - #include "udp.h" - #include "select.h" -+#include "if.h" - - /*-------------------------------------------------------------------------*\ - * Internal function prototypes -@@ -41,6 +42,7 @@ static const luaL_Reg mod[] = { - {"tcp", tcp_open}, - {"udp", udp_open}, - {"select", select_open}, -+ {"iface", if_open}, - {NULL, NULL} - }; - ---- a/src/makefile -+++ b/src/makefile -@@ -303,6 +303,7 @@ SOCKET_OBJS= \ - compat.$(O) \ - options.$(O) \ - inet.$(O) \ -+ if.$(O) \ - $(SOCKET) \ - except.$(O) \ - select.$(O) \ -@@ -440,6 +441,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h - buffer.$(O): buffer.c buffer.h io.h timeout.h - except.$(O): except.c except.h - inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h -+if.$(O): if.c if.h - io.$(O): io.c io.h timeout.h - luasocket.$(O): luasocket.c luasocket.h auxiliar.h except.h \ - timeout.h buffer.h io.h inet.h socket.h usocket.h tcp.h \ ---- a/src/options.c -+++ b/src/options.c -@@ -7,7 +7,10 @@ - #include "options.h" - #include "inet.h" - #include -- -+#include -+#include -+#include -+ - /*=========================================================================*\ - * Internal functions prototypes - \*=========================================================================*/ -@@ -414,6 +417,12 @@ static int opt_ip6_setmembership(lua_Sta - if (!lua_isnil(L, -1)) { - if (lua_isnumber(L, -1)) { - val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1); -+ } else if (lua_isstring(L, -1)) { -+ if (!(val.ipv6mr_interface = if_nametoindex(lua_tostring(L, -1)))) { -+ lua_pushnil(L); -+ lua_pushstring(L, "nonexistent interface"); -+ return 2; -+ } - } else - luaL_argerror(L, -1, "number 'interface' field expected"); - } diff --git a/packages/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch b/packages/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch deleted file mode 100644 index 14ba072b..00000000 --- a/packages/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/src/makefile -+++ b/src/makefile -@@ -397,18 +397,18 @@ none: - all: $(SOCKET_SO) $(MIME_SO) - - $(SOCKET_SO): $(SOCKET_OBJS) -- $(LD) $(SOCKET_OBJS) $(LDFLAGS)$@ -+ $(CC) $(SOCKET_OBJS) $(LDFLAGS)$@ - - $(MIME_SO): $(MIME_OBJS) -- $(LD) $(MIME_OBJS) $(LDFLAGS)$@ -+ $(CC) $(MIME_OBJS) $(LDFLAGS)$@ - - all-unix: all $(UNIX_SO) $(SERIAL_SO) - - $(UNIX_SO): $(UNIX_OBJS) -- $(LD) $(UNIX_OBJS) $(LDFLAGS)$@ -+ $(CC) $(UNIX_OBJS) $(LDFLAGS)$@ - - $(SERIAL_SO): $(SERIAL_OBJS) -- $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@ -+ $(CC) $(SERIAL_OBJS) $(LDFLAGS)$@ - - install: - $(INSTALL_DIR) $(INSTALL_TOP_LDIR) diff --git a/packages/lang/luasql/Makefile b/packages/lang/luasql/Makefile deleted file mode 100644 index 8c35df92..00000000 --- a/packages/lang/luasql/Makefile +++ /dev/null @@ -1,112 +0,0 @@ -# -# Copyright (C) 2010-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasql -PKG_VERSION:=2.4.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/luasql/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=db2458a8c8c5f3bc717e4030fe2878f1ad8d71e437ec6149c381eebad5d525c5 - -PKG_MAINTAINER:= -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=docs/us/license.html - -include $(INCLUDE_DIR)/package.mk - -define Package/luasql/Default - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua SQL binding - URL:=https://keplerproject.github.io/luasql/ - DEPENDS:= +lua -endef - -define Package/luasql/Default/description - LuaSQL is a simple interface from Lua to a DBMS. -endef - - -define Package/luasql-mysql -$(call Package/luasql/Default) - TITLE+= for MySQL - DEPENDS+= +libmysqlclient - VARIANT:=mysql -endef - -define Package/luasql-mysql/description -$(call Package/luasql/Default/description) - . - This package contains the MySQL binding. -endef - - -define Package/luasql-pgsql -$(call Package/luasql/Default) - TITLE+= for PostgreSQL - DEPENDS+= +libpq - VARIANT:=postgres -endef - -define Package/luasql-pgsql/description -$(call Package/luasql/Default/description) - . - This package contains the PostgreSQL binding. -endef - - -define Package/luasql-sqlite3 -$(call Package/luasql/Default) - TITLE+= for SQLite 3 - DEPENDS+= +libsqlite3 - VARIANT:=sqlite3 -endef - -define Package/luasql-sqlite3/description -$(call Package/luasql/Default/description) - . - This package contains the SQLite 3 binding. -endef - - -TARGET_CFLAGS += $(FPIC) -std=gnu99 -TARGET_CPPFLAGS += -DLUA_USE_LINUX - -ifeq ($(BUILD_VARIANT),mysql) - MAKE_FLAGS += DRIVER_INCS_mysql='-I$(STAGING_DIR)/usr/include/mysql' \ - DRIVER_LIBS_mysql='$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz' -endif - -ifeq ($(BUILD_VARIANT),postgres) - MAKE_FLAGS += DRIVER_LIBS_postgres='$(TARGET_LDFLAGS) -lpq' -endif - -ifeq ($(BUILD_VARIANT),sqlite3) - MAKE_FLAGS += DRIVER_LIBS_sqlite='$(TARGET_LDFLAGS) -lsqlite3 -lpthread' -endif - -MAKE_FLAGS += \ - LIB_OPTION="-shared" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - $(BUILD_VARIANT) - -define Package/Install/Default - $(INSTALL_DIR) $(1)/usr/lib/lua/luasql - $(CP) $(PKG_BUILD_DIR)/src/*.so $(1)/usr/lib/lua/luasql/ -endef - -Package/luasql-mysql/install = $(Package/Install/Default) -Package/luasql-pgsql/install = $(Package/Install/Default) -Package/luasql-sqlite3/install = $(Package/Install/Default) - -$(eval $(call BuildPackage,luasql-mysql)) -$(eval $(call BuildPackage,luasql-pgsql)) -$(eval $(call BuildPackage,luasql-sqlite3)) diff --git a/packages/lang/luasrcdiet/Makefile b/packages/lang/luasrcdiet/Makefile deleted file mode 100644 index f1ed10c3..00000000 --- a/packages/lang/luasrcdiet/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasrcdiet -PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 - -PKG_MAINTAINER:=Matthias Schiffer -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYRIGHT - -PKG_SOURCE_URL:=https://github.com/jirutka/luasrcdiet.git -PKG_SOURCE_VERSION:=f138fc9359821d9201cd6b57cfa2fcbed5b9af97 -PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=a3e316f273d4daf4bc5caea295d050efb2624125960de593c72b3aef0126583c - -HOST_BUILD_DEPENDS:=lua/host - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - -define Package/luasrcdiet - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=luasrcdiet - URL:=https://github.com/jirutka/luasrcdiet - DEPENDS:=+lua - PKGARCH:=all -endef - -define Package/luasrcdiet/description - Compresses Lua source code by removing unnecessary characters -endef - -define Build/Compile -endef - -define Package/luasrcdiet/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/luasrcdiet $(1)/usr/bin/luasrcdiet - - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/luasrcdiet $(1)/usr/lib/lua/ -endef - -define Host/Compile -endef - -define Host/Install - $(INSTALL_DIR) $(1)/bin - $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/luasrcdiet $(1)/bin/ - - $(INSTALL_DIR) $(1)/lib/lua/5.1 - $(CP) $(HOST_BUILD_DIR)/luasrcdiet $(1)/lib/lua/5.1/ -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,luasrcdiet)) diff --git a/packages/lang/luv/Config.in b/packages/lang/luv/Config.in deleted file mode 100644 index 076473f3..00000000 --- a/packages/lang/luv/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -menu "Configuration" - depends on PACKAGE_luv - -config LUV_USE_LUAJIT_ENGINE - bool "Use luajit engine" - select PACKAGE_luajit - help - If selected, luv will be compiled against luajit. If not selected, luv will use Lua as engine. - default n - -endmenu diff --git a/packages/lang/luv/Makefile b/packages/lang/luv/Makefile deleted file mode 100644 index bf9cfeca..00000000 --- a/packages/lang/luv/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=luv -PKG_REAL_VERSION:=1.40.0-0 -PKG_VERSION:=$(subst -,.,$(PKG_REAL_VERSION)) -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_REAL_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/luvit/luv/releases/download/$(PKG_REAL_VERSION) -PKG_HASH:=24473a081c3928eec2a352369cbafda97059574f4a4276861274473e7c7d17a0 - -PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REAL_VERSION) - -PKG_MAINTAINER:=Morteza Milani -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/luv - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Luv - URL:=https://github.com/luvit/luv - DEPENDS:=+libuv +!LUV_USE_LUAJIT_ENGINE:lua -endef - -define Package/luv/description - Bare libuv bindings for lua -endef - -define Package/luv/config - source "$(SOURCE)/Config.in" -endef - -CMAKE_OPTIONS += \ - -DLUA_BUILD_TYPE=System \ - -DWITH_SHARED_LIBUV=ON \ - -DBUILD_MODULE=OFF \ - -DBUILD_SHARED_LIBS=ON \ - -DWITH_LUA_ENGINE=$(if $(CONFIG_LUV_USE_LUAJIT_ENGINE),Luajit,Lua) - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/luv - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/luv/*.h $(1)/usr/include/luv - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so* $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libluv.pc $(1)/usr/lib/pkgconfig - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libluv.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libluv.pc -endef - -define Package/luv/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so.1.40.0 $(1)/usr/lib/lua/luv.so -endef - - -$(eval $(call BuildPackage,luv)) diff --git a/packages/lang/lyaml/Makefile b/packages/lang/lyaml/Makefile deleted file mode 100755 index ac7311ac..00000000 --- a/packages/lang/lyaml/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=lyaml -PKG_VERSION:=6.2.7 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/gvvaughan/lyaml/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=9bb489cefae48b150d66f6bab4141d8d5831fcb7465bfc52a9845fa01efc63b0 - -PKG_MAINTAINER:=Mathew McBride -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=lua/host luarocks/host HOST_OS_MACOS:fakeuname/host - -include $(INCLUDE_DIR)/package.mk -ifeq ($(CONFIG_HOST_OS_MACOS),y) - include ../../utils/fakeuname/fakeuname.mk -endif - -define Package/lyaml - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua lib-yaml bindings - URL:=https://github.com/gvvaughan/lyaml - DEPENDS:= +lua +libyaml -endef - -define Package/lyaml/description - Lua bindings for libyaml -endef - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include - -# Note: the duplicate environment exports are not a typo! -# First is for luarocks, then the second is for the compilation -# invoked by luarocks -# (Same setup as luaposix) -define Build/Compile - cd $(PKG_BUILD_DIR) && \ - LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ - LUA_PKGNAME=lua5.1 \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ - $(if $(CONFIG_HOST_OS_MACOS),PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG)) \ - luarocks make --pack-binary-rock lyaml-$(PKG_VERSION)-1.rockspec \ - LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ - YAML_DIR=$(STAGING_DIR)/usr \ - LUA_INCDIR=$(STAGING_DIR)/usr/include \ - LUA_PKGNAME=lua5.1 \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC)" LD="$(TARGET_CC)" -endef - -define Package/lyaml/install - $(INSTALL_DIR) $(1)/usr/lib/lua/lyaml - $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/yaml.so $(1)/usr/lib/lua/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/lyaml/*.lua $(1)/usr/lib/lua/lyaml/ -endef - -$(eval $(call BuildPackage,lyaml)) diff --git a/packages/lang/lzmq/Makefile b/packages/lang/lzmq/Makefile deleted file mode 100644 index f401af3e..00000000 --- a/packages/lang/lzmq/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lzmq -PKG_VERSION:=0.4.4 -PKG_RELEASE:=2 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=cf70200045b8bcb0e929c338ad421b6a291cf1038053532888dc201af3224d8b - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lzmq - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua ZeroMQ binding - URL:=https://github.com/zeromq/lzmq - DEPENDS:= +lua +libzmq -endef - -define Package/lzmq/description - LZMQ is a Lua binding to ZeroMQ. -endef - -CMAKE_OPTIONS += \ - -DUSE_LUA=ON - -define Package/lzmq/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq.so $(1)/usr/lib/lua/ - - $(INSTALL_DIR) $(1)/usr/lib/lua/lzmq - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq/timer.so $(1)/usr/lib/lua/lzmq - $(CP) -R $(PKG_BUILD_DIR)/src/lua/lzmq/* $(1)/usr/lib/lua/lzmq -endef - -$(eval $(call BuildPackage,lzmq)) diff --git a/packages/lang/lzmq/patches/010-gcc14.patch b/packages/lang/lzmq/patches/010-gcc14.patch deleted file mode 100644 index 8be0b657..00000000 --- a/packages/lang/lzmq/patches/010-gcc14.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/lzmq.c -+++ b/src/lzmq.c -@@ -23,6 +23,7 @@ - #include - #include "zsupport.h" - #include -+#include - - #define LUAZMQ_MODULE_NAME "lzmq" - #define LUAZMQ_MODULE_LICENSE "MIT" diff --git a/packages/lang/node-actions-on-google/Makefile b/packages/lang/node-actions-on-google/Makefile deleted file mode 100644 index 09deaad8..00000000 --- a/packages/lang/node-actions-on-google/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=actions-on-google -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=3.0.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=6172ea5dd89f07a22de89bd5364f3320575a707d2cd8a05437dce6de8c9e3a26 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-actions-on-google - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Actions On Google Client Library - URL:=https://www.npmjs.org/package/actions-on-google - DEPENDS:=+node -endef - -define Package/node-actions-on-google/description - This Actions On Google client library makes it easy to create your apps for the Google Assistant. The client library supports both the Actions SDK webhook and Dialogflow fulfillment. -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --ignore-scripts - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-actions-on-google/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/LICENSE \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-actions-on-google/postrm -#!/bin/sh -rm /usr/lib/node_modules/actions-on-google || true -rm -rf /usr/lib/node/actions-on-google || true -endef - -$(eval $(call BuildPackage,node-actions-on-google)) diff --git a/packages/lang/node-alexa-app/Makefile b/packages/lang/node-alexa-app/Makefile deleted file mode 100644 index b7c7ce56..00000000 --- a/packages/lang/node-alexa-app/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=alexa-app -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=4.2.3 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=4269bffd4370a7cc6f676d2d98fa306a2ebe67b00e890149b58f7492923234ee - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE.md - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-alexa-app - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=To simplify the development of Alexa skills - URL:=https://www.npmjs.org/package/alexa-app - DEPENDS:=+node -endef - -define Package/node-alexa-app/description - A Node module to simplify the development of Alexa skills (applications.) -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-alexa-app/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/index.js \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{example,test} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-alexa-app/postrm -#!/bin/sh -rm /usr/lib/node_modules/alexa-app || true -rm -rf /usr/lib/node/alexa-app || true -endef - -$(eval $(call BuildPackage,node-alexa-app)) diff --git a/packages/lang/node-arduino-firmata/Makefile b/packages/lang/node-arduino-firmata/Makefile deleted file mode 100644 index 60505d27..00000000 --- a/packages/lang/node-arduino-firmata/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (C) 2014 Arduino LLC -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=arduino-firmata -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.3.4 -PKG_RELEASE:=33 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=d7157e02867eae82887cb5e17b90c963fe7489bacd464110bfd20c672b8d5a98 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-arduino-firmata - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Arduino Firmata implementation for Node.js - URL:=https://www.npmjs.com/package/arduino-firmata - DEPENDS:=+node +node-serialport -endef - -define Package/node-arduino-firmata/description - Arduino Firmata protocol (http://firmata.org) implementation on Node.js. -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-arduino-firmata/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,README.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{tests,*.txt} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) ./files/* $(1)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-arduino-firmata/postrm -#!/bin/sh -rm /usr/lib/node_modules/arduino-firmata || true -rm -rf /usr/lib/node/arduino-firmata || true -endef - -$(eval $(call BuildPackage,node-arduino-firmata)) diff --git a/packages/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js b/packages/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js deleted file mode 100644 index 2f9bcf7c..00000000 --- a/packages/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js +++ /dev/null @@ -1,295 +0,0 @@ -(function() { - 'use strict'; - var ArduinoFirmata, debug, events, exports, serialport; - - events = require('eventemitter2'); - - serialport = require('serialport'); - - debug = require('debug')('arduino-firmata'); - - exports = module.exports = ArduinoFirmata = (function() { - class ArduinoFirmata extends events.EventEmitter2 { - static list(callback) { - return serialport.list(function(err, ports) { - var devices, j, len, port; - if (err) { - return callback(err); - } - devices = []; - for (j = 0, len = ports.length; j < len; j++) { - port = ports[j]; - if (/usb|acm|com|ama\d+/i.test(port.comName)) { - devices.push(port.comName); - } - } - return callback(null, devices); - }); - } - - constructor() { - super(); - this.status = ArduinoFirmata.Status.CLOSE; - this.wait_for_data = 0; - this.execute_multi_byte_command = 0; - this.multi_byte_channel = 0; - this.stored_input_data = []; - this.parsing_sysex = false; - this.sysex_bytes_read = 0; - this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - this.boardVersion = null; - } - - isOldArduinoDevice() { - return /usbserial|USB/.test(this.serialport_name); - } - - connect(serialport_name, opts = { - baudRate: 57600 - }) { - this.serialport_name = serialport_name; - opts.parser = serialport.parsers.raw; - if (!this.serialport_name) { - ArduinoFirmata.list((err, devices) => { - return this.connect(devices[0], opts); - }); - return this; - } - this.once('boardReady', function() { - var io_init_wait; - debug('boardReady'); - io_init_wait = this.isOldArduinoDevice() ? (debug(`old arduino device found ${this.serialport_name}`), 3000) : (debug(`new arduino device found ${this.serialport_name}`), 100); - debug(`wait ${io_init_wait}(msec)`); - return setTimeout(() => { - var i, j, k; - for (i = j = 0; j < 6; i = ++j) { - this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]); - } - for (i = k = 0; k < 2; i = ++k) { - this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]); - } - debug('init IO ports'); - return this.emit('connect'); - }, io_init_wait); - }); - this.serialport = new serialport(this.serialport_name, opts); - this.serialport.once('open', () => { - var cid; - cid = setInterval(() => { - debug('request REPORT_VERSION'); - return this.write([ArduinoFirmata.REPORT_VERSION]); - }, 500); - this.once('boardVersion', (version) => { - clearInterval(cid); - this.status = ArduinoFirmata.Status.OPEN; - return this.emit('boardReady'); - }); - return this.serialport.on('data', (data) => { - var byte, j, len, results; - results = []; - for (j = 0, len = data.length; j < len; j++) { - byte = data[j]; - results.push(this.process_input(byte)); - } - return results; - }); - }); - return this; - } - - isOpen() { - return this.status === ArduinoFirmata.Status.OPEN; - } - - close(callback) { - this.status = ArduinoFirmata.Status.CLOSE; - return this.serialport.close(callback); - } - - reset(callback) { - return this.write([ArduinoFirmata.SYSTEM_RESET], callback); - } - - write(bytes, callback) { - return this.serialport.write(bytes, callback); - } - - sysex(command, data = [], callback) { - var write_data; - //# http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format - data = data.map(function(i) { - return i & 0b1111111; // 7bit - }); - write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]); - return this.write(write_data, callback); - } - - pinMode(pin, mode, callback) { - switch (mode) { - case true: - mode = ArduinoFirmata.OUTPUT; - break; - case false: - mode = ArduinoFirmata.INPUT; - } - return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback); - } - - digitalWrite(pin, value, callback) { - var port_num; - this.pinMode(pin, ArduinoFirmata.OUTPUT); - port_num = (pin >>> 3) & 0x0F; - if (value === 0 || value === false) { - this.digital_output_data[port_num] &= ~(1 << (pin & 0x07)); - } else { - this.digital_output_data[port_num] |= 1 << (pin & 0x07); - } - return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback); - } - - analogWrite(pin, value, callback) { - value = Math.floor(value); - this.pinMode(pin, ArduinoFirmata.PWM); - return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback); - } - - servoWrite(pin, angle, callback) { - this.pinMode(pin, ArduinoFirmata.SERVO); - return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback); - } - - digitalRead(pin) { - return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0; - } - - analogRead(pin) { - return this.analog_input_data[pin]; - } - - process_input(input_data) { - var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data; - if (this.parsing_sysex) { - if (input_data === ArduinoFirmata.END_SYSEX) { - this.parsing_sysex = false; - sysex_command = this.stored_input_data[0]; - sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read); - return this.emit('sysex', { - command: sysex_command, - data: sysex_data - }); - } else { - this.stored_input_data[this.sysex_bytes_read] = input_data; - return this.sysex_bytes_read += 1; - } - } else if (this.wait_for_data > 0 && input_data < 128) { - this.wait_for_data -= 1; - this.stored_input_data[this.wait_for_data] = input_data; - if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) { - switch (this.execute_multi_byte_command) { - case ArduinoFirmata.DIGITAL_MESSAGE: - input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1]; - diff = this.digital_input_data[this.multi_byte_channel] ^ input_data; - this.digital_input_data[this.multi_byte_channel] = input_data; - if (this.listeners('digitalChange').length > 0) { - results = []; - for (i = j = 0; j <= 13; i = ++j) { - if (((0x01 << i) & diff) > 0) { - stat = (input_data & diff) > 0; - results.push(this.emit('digitalChange', { - pin: i + this.multi_byte_channel * 8, - value: stat, - old_value: !stat - })); - } else { - results.push(void 0); - } - } - return results; - } - break; - case ArduinoFirmata.ANALOG_MESSAGE: - analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1]; - old_analog_value = this.analogRead(this.multi_byte_channel); - this.analog_input_data[this.multi_byte_channel] = analog_value; - if (old_analog_value !== analog_value) { - return this.emit('analogChange', { - pin: this.multi_byte_channel, - value: analog_value, - old_value: old_analog_value - }); - } - break; - case ArduinoFirmata.REPORT_VERSION: - this.boardVersion = `${this.stored_input_data[1]}.${this.stored_input_data[0]}`; - return this.emit('boardVersion', this.boardVersion); - } - } - } else { - if (input_data < 0xF0) { - command = input_data & 0xF0; - this.multi_byte_channel = input_data & 0x0F; - } else { - command = input_data; - } - if (command === ArduinoFirmata.START_SYSEX) { - this.parsing_sysex = true; - return this.sysex_bytes_read = 0; - } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) { - this.wait_for_data = 2; - return this.execute_multi_byte_command = command; - } - } - } - - }; - - ArduinoFirmata.Status = { - CLOSE: 0, - OPEN: 1 - }; - - ArduinoFirmata.INPUT = 0; - - ArduinoFirmata.OUTPUT = 1; - - ArduinoFirmata.ANALOG = 2; - - ArduinoFirmata.PWM = 3; - - ArduinoFirmata.SERVO = 4; - - ArduinoFirmata.SHIFT = 5; - - ArduinoFirmata.I2C = 6; - - ArduinoFirmata.LOW = 0; - - ArduinoFirmata.HIGH = 1; - - ArduinoFirmata.MAX_DATA_BYTES = 32; - - ArduinoFirmata.DIGITAL_MESSAGE = 0x90; // send data for a digital port - - ArduinoFirmata.ANALOG_MESSAGE = 0xE0; // send data for an analog pin (or PWM) - - ArduinoFirmata.REPORT_ANALOG = 0xC0; // enable analog input by pin - - ArduinoFirmata.REPORT_DIGITAL = 0xD0; // enable digital input by port - - ArduinoFirmata.SET_PIN_MODE = 0xF4; // set a pin to INPUT/OUTPUT/PWM/etc - - ArduinoFirmata.REPORT_VERSION = 0xF9; // report firmware version - - ArduinoFirmata.SYSTEM_RESET = 0xFF; // reset from MIDI - - ArduinoFirmata.START_SYSEX = 0xF0; // start a MIDI SysEx message - - ArduinoFirmata.END_SYSEX = 0xF7; // end a MIDI SysEx message - - return ArduinoFirmata; - - }).call(this); - -}).call(this); diff --git a/packages/lang/node-arduino-firmata/patches/000-remove_depends.patch b/packages/lang/node-arduino-firmata/patches/000-remove_depends.patch deleted file mode 100644 index 10eab644..00000000 --- a/packages/lang/node-arduino-firmata/patches/000-remove_depends.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -30,7 +30,6 @@ - "author": "Sho Hashimoto ", - "license": "MIT", - "dependencies": { -- "serialport": "*", - "eventemitter2": "*", - "debug": "*" - }, diff --git a/packages/lang/node-arduino-firmata/patches/900-fix_the_usage_of_serialport.patch b/packages/lang/node-arduino-firmata/patches/900-fix_the_usage_of_serialport.patch deleted file mode 100644 index fd1e2380..00000000 --- a/packages/lang/node-arduino-firmata/patches/900-fix_the_usage_of_serialport.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/tests/test_arduino.coffee -+++ b/tests/test_arduino.coffee -@@ -16,10 +16,9 @@ describe 'class ArduinoFirmata', -> - - describe 'method list', -> - -- it 'should return list of serialports', (done) -> -+ it 'should return list of serialports', -> - ArduinoFirmata.list (err, devices) -> -- assert.equal devices instanceof Array, true -- done() -+ assert.equal (devices instanceof Array), true - - - describe 'instance of ArduinoFirmata', -> diff --git a/packages/lang/node-argon2/Makefile b/packages/lang/node-argon2/Makefile deleted file mode 100644 index 2349b3f0..00000000 --- a/packages/lang/node-argon2/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=argon2 -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.41.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=2e55dd4290220804fcc0519a6ea4d822ad28dc02760364705b09bbc5974d6f55 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-argon2 - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=An Argon2 library for Node - URL:=https://www.npmjs.com/package/argon2 - DEPENDS:=+node -endef - -define Package/node-argon2/description - Bindings to the reference Argon2 implementation. -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - rm -rf $(PKG_BUILD_DIR)/prebuilds - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --build-from-source --target_arch=$(NODEJS_CPU) --ignore-scripts - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm run install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --build-from-source --target_arch=$(NODEJS_CPU) - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-argon2/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md,*.cjs} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{LICENSE,node_modules} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release - $(CP) $(PKG_BUILD_DIR)/build/Release/argon2.node \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-argon2/postrm -#!/bin/sh -rm /usr/lib/node_modules/argon2 || true -rm -rf /usr/lib/node/argon2 || true -endef - -$(eval $(call BuildPackage,node-argon2)) diff --git a/packages/lang/node-argon2/patches/002-remove_FORTIFY_SOURCE.patch b/packages/lang/node-argon2/patches/002-remove_FORTIFY_SOURCE.patch deleted file mode 100644 index a4b4d8d7..00000000 --- a/packages/lang/node-argon2/patches/002-remove_FORTIFY_SOURCE.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/binding.gyp -+++ b/binding.gyp -@@ -24,7 +24,7 @@ - "ldflags+": ["-Wl,--gc-sections"] - }] - ], -- "defines+": ["_FORTIFY_SOURCE=2", "NDEBUG"] -+ "defines+": ["NDEBUG"] - } - } - }, diff --git a/packages/lang/node-ask-sdk/Makefile b/packages/lang/node-ask-sdk/Makefile deleted file mode 100644 index 797f843a..00000000 --- a/packages/lang/node-ask-sdk/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=ask-sdk -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=2.14.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=e8d9d464aba3072ef288dc4a9eebb7ebf502e3223d7da33770cd91e2c3fe7d1e - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-ask-sdk - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Alexa Skills Kit SDK for Node.js - URL:=https://www.npmjs.org/package/ask-sdk - DEPENDS:=+node -endef - -define Package/node-ask-sdk/description - The ASK SDK v2 for Node.js is an open-source Alexa Skill Development Kit. ASK SDK v2 for Node.js makes it easier for you to build highly engaging skills, by allowing you to spend more time on implementing features and less on writing boiler-plate code. -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-ask-sdk/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/LICENSE \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-ask-sdk/postrm -#!/bin/sh -rm /usr/lib/node_modules/ask-sdk || true -rm -rf /usr/lib/node/ask-sdk || true -endef - -$(eval $(call BuildPackage,node-ask-sdk)) diff --git a/packages/lang/node-authenticate-pam/Makefile b/packages/lang/node-authenticate-pam/Makefile deleted file mode 100644 index 4c8b7333..00000000 --- a/packages/lang/node-authenticate-pam/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=authenticate-pam -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.0.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=eee6adb5e20658750a2ca681cbd2db084672bb054f3950f3ccec27ce01e3ed28 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=MIT-LICENSE.txt - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-authenticate-pam - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Asynchronous PAM authentication for Node.js - URL:=https://www.npmjs.org/package/authenticate-pam - DEPENDS:=+node +libpam -endef - -define Package/node-authenticate-pam/description - Asynchronous PAM authentication for Node.js -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/security -TARGET_CPPFLAGS+=$(FPIC) -TARGET_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --build-from-source --target_arch=$(NODEJS_CPU) - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-authenticate-pam/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/node_modules \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release - $(CP) $(PKG_BUILD_DIR)/build/Release/authenticate_pam.node \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-authenticate-pam/postrm -#!/bin/sh -rm /usr/lib/node_modules/authenticate-pam || true -rm -rf /usr/lib/node/authenticate-pam || true -endef - -$(eval $(call BuildPackage,node-authenticate-pam)) diff --git a/packages/lang/node-authenticate-pam/patches/999-node_v23_support.patch b/packages/lang/node-authenticate-pam/patches/999-node_v23_support.patch deleted file mode 100644 index d34e873a..00000000 --- a/packages/lang/node-authenticate-pam/patches/999-node_v23_support.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -14,7 +14,7 @@ - "url": "https://github.com/RushPL/node-authenticate-pam.git" - }, - "dependencies": { -- "nan": "^2.3.3" -+ "nan": "^2.22.0" - }, - "files": [ - "authenticate_pam.cc", diff --git a/packages/lang/node-autobahn/Makefile b/packages/lang/node-autobahn/Makefile deleted file mode 100644 index cc03a6dd..00000000 --- a/packages/lang/node-autobahn/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=autobahn -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=22.11.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=1a5279e0e1b115599db6c4e5fb9eccd048cbf4e971bc71c83302a4939ee84e07 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-autobahn - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Web Application Messaging Protocol for Node.js - URL:=https://www.npmjs.org/package/autobahn - DEPENDS:=+node +node-ws -endef - -define Package/node-autobahn/description - An implementation of The Web Application Messaging Protocol (WAMP) -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-autobahn/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-autobahn/postrm -#!/bin/sh -rm /usr/lib/node_modules/autobahn || true -rm -rf /usr/lib/node/autobahn || true -endef - -$(eval $(call BuildPackage,node-autobahn)) diff --git a/packages/lang/node-autobahn/patches/000-remove_depends.patch b/packages/lang/node-autobahn/patches/000-remove_depends.patch deleted file mode 100644 index 8d170bd1..00000000 --- a/packages/lang/node-autobahn/patches/000-remove_depends.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -17,12 +17,9 @@ - "cbor": ">= 3.0.0", - "crypto-js": ">=3.1.8", - "msgpack5": ">= 3.6.0", -- "tweetnacl": ">= 0.14.3", -- "ws": "1.1.4 - 7" -+ "tweetnacl": ">= 0.14.3" - }, - "optionalDependencies": { -- "bufferutil": ">= 1.2.1", -- "utf-8-validate": ">= 1.2.1", - "when": ">= 3.7.7" - }, - "devDependencies": { diff --git a/packages/lang/node-aws-crt/Makefile b/packages/lang/node-aws-crt/Makefile deleted file mode 100644 index cea19d43..00000000 --- a/packages/lang/node-aws-crt/Makefile +++ /dev/null @@ -1,140 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=aws-crt -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.21.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=482905eebf086f7dfa5a9d75ca0b6128d0de01ffe6a99daef8136b52a7d346dd - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/node-aws-crt - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=NodeJS bindings for the AWS Common Runtime - URL:=https://www.npmjs.com/package/aws-crt - DEPENDS:=+node @(x86_64||aarch64||arm||i386) -endef - -define Package/node-aws-crt/description - NodeJS/Browser bindings for the AWS Common Runtime -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -D_GNU_SOURCE $(if $(CONFIG_USE_MUSL),-Dpthread_attr_setaffinity_np=pthread_setaffinity_np) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Configure -endef - -define Build/Install -endef - -define Build/Compile - rm -rf $(PKG_BUILD_DIR)/dist/bin - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --no-save --no-package-lock --ignore-scripts - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - CMAKE_SYSTEM_NAME=Linux \ - CMAKE_SYSTEM_VERSION=1 \ - CMAKE_SYSTEM_PROCESSOR=$(ARCH) \ - CMAKE_BUILD_TYPE=Release \ - CMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ - CMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ - CMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \ - CMAKE_C_COMPILER="$(CMAKE_C_COMPILER)" \ - CMAKE_C_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \ - CMAKE_CXX_COMPILER_LAUNCHER="$(CMAKE_CXX_COMPILER_LAUNCHER)" \ - CMAKE_CXX_COMPILER="$(CMAKE_CXX_COMPILER)" \ - CMAKE_CXX_COMPILER_ARG1="$(CMAKE_CXX_COMPILER_ARG1)" \ - CMAKE_ASM_COMPILER="$(TARGET_CC_NOCACHE)" \ - CMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)" \ - CMAKE_MODULE_LINKER_FLAGS="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \ - CMAKE_SHARED_LINKER_FLAGS="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \ - CMAKE_AR="$(CMAKE_AR)" \ - CMAKE_NM="$(CMAKE_NM)" \ - CMAKE_RANLIB="$(CMAKE_RANLIB)" \ - CMAKE_FIND_ROOT_PATH="$(CMAKE_FIND_ROOT_PATH)" \ - CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH \ - CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ - CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - CMAKE_INSTALL_PREFIX=/usr \ - DL_LIBRARY=$(STAGING_DIR) \ - CMAKE_PREFIX_PATH=$(STAGING_DIR) \ - CMAKE_SKIP_RPATH=TRUE \ - CMAKE_EXPORT_PACKAGE_REGISTRY=FALSE \ - CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE \ - CMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE \ - CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE \ - CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE \ - CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE \ - CMAKE_SYSROOT="$(STAGING_DIR_ROOT)" \ - CROSS_COMPILE="$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-" \ - TARGET_CROSS="$(firstword $(TOOLCHAIN_BIN_DIRS))/$(TARGET_CROSS)" \ - npm run install --no-save --no-package-lock - rm -rf $(PKG_BUILD_DIR)/node_modules - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --ignore-scripts --legacy-peer-deps - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-aws-crt/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{LICENSE,NOTICE} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist,dist.browser} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/dist/bin/linux-$(NODEJS_CPU)-$(TARGET_SUFFIX) - $(CP) $(PKG_BUILD_DIR)/build/linux-x64-glibc/Release/aws-crt-nodejs.node \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/dist/bin/linux-$(NODEJS_CPU)-$(TARGET_SUFFIX)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-aws-crt/postrm -#!/bin/sh -rm /usr/lib/node_modules/aws-crt || true -rm -rf /usr/lib/node/aws-crt || true -endef - -$(eval $(call BuildPackage,node-aws-crt)) diff --git a/packages/lang/node-aws-crt/patches/001-modify_compile_options.patch b/packages/lang/node-aws-crt/patches/001-modify_compile_options.patch deleted file mode 100644 index 196f3f57..00000000 --- a/packages/lang/node-aws-crt/patches/001-modify_compile_options.patch +++ /dev/null @@ -1,114 +0,0 @@ ---- a/scripts/build_dependencies/build_step_cmake.js -+++ b/scripts/build_dependencies/build_step_cmake.js -@@ -9,6 +9,45 @@ const path = require("path"); - const utils = require('./build_utils'); - const getCRuntime = require("../cruntime") - -+const execSync = require('child_process').execSync; -+const CMAKE_SYSTEM_NAME = process.env.CMAKE_SYSTEM_NAME; -+const CMAKE_SYSTEM_VERSION = process.env.CMAKE_SYSTEM_VERSION; -+const CMAKE_SYSTEM_PROCESSOR = process.env.CMAKE_SYSTEM_PROCESSOR; -+const CMAKE_BUILD_TYPE = process.env.CMAKE_BUILD_TYPE; -+const CMAKE_C_FLAGS_RELEASE = process.env.CMAKE_C_FLAGS_RELEASE; -+const CMAKE_CXX_FLAGS_RELEASE = process.env.CMAKE_CXX_FLAGS_RELEASE; -+const CMAKE_C_COMPILER_LAUNCHER = process.env.CMAKE_C_COMPILER_LAUNCHER; -+const CMAKE_C_COMPILER = process.env.CMAKE_C_COMPILER; -+const CMAKE_C_COMPILER_ARG1 = process.env.CMAKE_C_COMPILER_ARG1; -+const CMAKE_CXX_COMPILER_LAUNCHER = process.env.CMAKE_CXX_COMPILER_LAUNCHER; -+const CMAKE_CXX_COMPILER = process.env.CMAKE_CXX_COMPILER; -+const CMAKE_CXX_COMPILER_ARG1 = process.env.CMAKE_CXX_COMPILER_ARG1; -+const CMAKE_ASM_COMPILER = process.env.CMAKE_ASM_COMPILER; -+const CMAKE_EXE_LINKER_FLAGS = process.env.CMAKE_EXE_LINKER_FLAGS; -+const CMAKE_MODULE_LINKER_FLAGS = process.env.CMAKE_MODULE_LINKER_FLAGS; -+const CMAKE_SHARED_LINKER_FLAGS = process.env.CMAKE_SHARED_LINKER_FLAGS; -+const CMAKE_AR = process.env.CMAKE_AR; -+const CMAKE_NM = process.env.CMAKE_NM; -+const CMAKE_RANLIB = process.env.CMAKE_RANLIB; -+const CMAKE_FIND_ROOT_PATH = process.env.CMAKE_FIND_ROOT_PATH; -+const CMAKE_FIND_ROOT_PATH_MODE_PROGRAM = process.env.CMAKE_FIND_ROOT_PATH_MODE_PROGRAM; -+const CMAKE_FIND_ROOT_PATH_MODE_LIBRARY = process.env.CMAKE_FIND_ROOT_PATH_MODE_LIBRARY; -+const CMAKE_FIND_ROOT_PATH_MODE_INCLUDE = process.env.CMAKE_FIND_ROOT_PATH_MODE_INCLUDE; -+const CMAKE_STRIP = process.env.CMAKE_STRIP; -+const CMAKE_INSTALL_PREFIX = process.env.CMAKE_INSTALL_PREFIX; -+const DL_LIBRARY = process.env.DL_LIBRARY; -+const CMAKE_PREFIX_PATH = process.env.CMAKE_PREFIX_PATH; -+const CMAKE_SKIP_RPATH = process.env.CMAKE_SKIP_RPATH; -+const CMAKE_EXPORT_PACKAGE_REGISTRY = process.env.CMAKE_EXPORT_PACKAGE_REGISTRY; -+const CMAKE_EXPORT_NO_PACKAGE_REGISTRY = process.env.CMAKE_EXPORT_NO_PACKAGE_REGISTRY; -+const CMAKE_FIND_USE_PACKAGE_REGISTRY = process.env.CMAKE_FIND_USE_PACKAGE_REGISTRY; -+const CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY = process.env.CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY; -+const CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY = process.env.CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY; -+const CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY = process.env.CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY; -+const CMAKE_SYSROOT = process.env.CMAKE_SYSROOT; -+const CROSS_COMPILE = process.env.CROSS_COMPILE; -+const TARGET_CROSS = process.env.TARGET_CROSS; -+ - module.exports = { - cmake: null, - cmake_version: require("../../package.json").devDependencies['cmake-js'].replace("^", ""), -@@ -81,6 +120,42 @@ module.exports = { - CMAKE_EXPORT_COMPILE_COMMANDS: true, - CMAKE_JS_PLATFORM: platform, - BUILD_TESTING: 'OFF', -+ CMAKE_CROSSCOMPILING: true, -+ CMAKE_SYSTEM_NAME: `${CMAKE_SYSTEM_NAME}`, -+ CMAKE_SYSTEM_VERSION: `${CMAKE_SYSTEM_VERSION}`, -+ CMAKE_SYSTEM_PROCESSOR: `${CMAKE_SYSTEM_PROCESSOR}`, -+ CMAKE_BUILD_TYPE: `${CMAKE_BUILD_TYPE}`, -+ CMAKE_C_FLAGS_RELEASE: `${CMAKE_C_FLAGS_RELEASE}`, -+ CMAKE_CXX_FLAGS_RELEASE: `${CMAKE_CXX_FLAGS_RELEASE}`, -+ CMAKE_C_COMPILER_LAUNCHER: `${CMAKE_C_COMPILER_LAUNCHER}`, -+ CMAKE_C_COMPILER: `${CMAKE_C_COMPILER}`, -+ CMAKE_C_COMPILER_ARG1: `${CMAKE_C_COMPILER_ARG1}`, -+ CMAKE_CXX_COMPILER_LAUNCHER: `${CMAKE_CXX_COMPILER_LAUNCHER}`, -+ CMAKE_CXX_COMPILER: `${CMAKE_CXX_COMPILER}`, -+ CMAKE_CXX_COMPILER_ARG1: `${CMAKE_CXX_COMPILER_ARG1}`, -+ CMAKE_ASM_COMPILER: `${CMAKE_ASM_COMPILER}`, -+ CMAKE_EXE_LINKER_FLAGS: `${CMAKE_EXE_LINKER_FLAGS}`, -+ CMAKE_MODULE_LINKER_FLAGS: `${CMAKE_MODULE_LINKER_FLAGS}`, -+ CMAKE_SHARED_LINKER_FLAGS: `${CMAKE_SHARED_LINKER_FLAGS}`, -+ CMAKE_AR: `${CMAKE_AR}`, -+ CMAKE_NM: `${CMAKE_NM}`, -+ CMAKE_RANLIB: `${CMAKE_RANLIB}`, -+ CMAKE_FIND_ROOT_PATH: `${CMAKE_FIND_ROOT_PATH}`, -+ CMAKE_FIND_ROOT_PATH_MODE_PROGRAM: `${CMAKE_FIND_ROOT_PATH_MODE_PROGRAM}`, -+ CMAKE_FIND_ROOT_PATH_MODE_LIBRARY: `${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY}`, -+ CMAKE_FIND_ROOT_PATH_MODE_INCLUDE: `${CMAKE_FIND_ROOT_PATH_MODE_INCLUDE}`, -+ DL_LIBRARY: `${DL_LIBRARY}`, -+ CMAKE_SKIP_RPATH: `${CMAKE_SKIP_RPATH}`, -+ CMAKE_EXPORT_PACKAGE_REGISTRY: `${CMAKE_EXPORT_PACKAGE_REGISTRY}`, -+ CMAKE_EXPORT_NO_PACKAGE_REGISTRY: `${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}`, -+ CMAKE_FIND_USE_PACKAGE_REGISTRY: `${CMAKE_FIND_USE_PACKAGE_REGISTRY}`, -+ CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY: `${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}`, -+ CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY: `${CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY}`, -+ CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY: `${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}`, -+ CMAKE_SYSROOT: `${CMAKE_SYSROOT}`, -+ CROSS_COMPILE: `${CROSS_COMPILE}`, -+ CMAKE_OBJCOPY: `${TARGET_CROSS}objcopy`, -+ CMAKE_STRIP: `${TARGET_CROSS}strip`, - CMAKE_INSTALL_PREFIX: 'crt/install', - CMAKE_PREFIX_PATH: 'crt/install', - } -@@ -109,6 +184,22 @@ module.exports = { - // Enable parallel build (ignored by cmake older than 3.12) - process.env.CMAKE_BUILD_PARALLEL_LEVEL = `${Math.max(os.cpus().length, 1)}`; - -+ // Bad technique (for OpenWrt) -+ execSync("find ./crt \\( -name CMakeLists.txt -or -name *.mk -or -name *.cmake \\) -exec sed -i -e 's| -Werror||g' {} +", (error, stdout, stderr) => { -+ console.log(error, stdout, stderr); -+ }); -+ execSync("find ./crt \\( -name CMakeLists.txt -or -name *.mk -or -name *.cmake \\) -exec sed -i -e 's|-D_FORTIFY_SOURCE=2||g' {} +", (error, stdout, stderr) => { -+ console.log(error, stdout, stderr); -+ }); -+ -+ execSync("sed -i '35d' ./crt/aws-c-common/cmake/AwsSharedLibSetup.cmake", (error, stdout, stderr) => { -+ console.log(error, stdout, stderr); -+ }); -+ -+ execSync("sed -i 's/pthread_attr_setaffinity_np(attributes_ptr/pthread_attr_setaffinity_np((pthread_t)attributes_ptr/' ./crt/aws-c-common/source/posix/thread.c", (error, stdout, stderr) => { -+ console.log(error, stdout, stderr); -+ }); -+ - // Run the build - var buildSystem = new this.cmake.BuildSystem(options); - return buildSystem.build(); diff --git a/packages/lang/node-aws-iot-device-sdk-v2/Makefile b/packages/lang/node-aws-iot-device-sdk-v2/Makefile deleted file mode 100644 index e42f12ec..00000000 --- a/packages/lang/node-aws-iot-device-sdk-v2/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=aws-iot-device-sdk-v2 -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.21.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=695bf2237e50d7d207451755926399f47de1d694e96de45b64aee2c371af6f05 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-aws-iot-device-sdk-v2 - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=AWS IoT Device SDK for JavaScript v2 - URL:=https://www.npmjs.com/package/aws-iot-device-sdk-v2 - DEPENDS:=+node +node-aws-crt -endef - -define Package/node-aws-iot-device-sdk-v2/description - This SDK is built on the AWS Common Runtime, a collection of libraries (aws-c-common, aws-c-io, aws-c-mqtt, aws-c-http, aws-c-cal ...) written in C to be cross-platform, high-performance, secure, and reliable. The libraries are bound to JS by the awscrt package. -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --ignore-scripts - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-aws-iot-device-sdk-v2/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist,lib,documents} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-aws-iot-device-sdk-v2/postrm -#!/bin/sh -rm /usr/lib/node_modules/aws-iot-device-sdk-v2 || true -rm -rf /usr/lib/node/aws-iot-device-sdk-v2 || true -endef - -$(eval $(call BuildPackage,node-aws-iot-device-sdk-v2)) diff --git a/packages/lang/node-aws-iot-device-sdk-v2/patches/000-remove_depends.patch b/packages/lang/node-aws-iot-device-sdk-v2/patches/000-remove_depends.patch deleted file mode 100644 index 0fc18e15..00000000 --- a/packages/lang/node-aws-iot-device-sdk-v2/patches/000-remove_depends.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -42,7 +42,6 @@ - "typescript": "^4.9.5" - }, - "dependencies": { -- "@aws-sdk/util-utf8-browser": "^3.109.0", -- "aws-crt": "1.21.8" -+ "@aws-sdk/util-utf8-browser": "^3.109.0" - } - } diff --git a/packages/lang/node-aws-iot-device-sdk/Makefile b/packages/lang/node-aws-iot-device-sdk/Makefile deleted file mode 100644 index af8660b8..00000000 --- a/packages/lang/node-aws-iot-device-sdk/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=aws-iot-device-sdk -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=2.2.15 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=e93c86220bd1428c005b30d07acb28b86a6cee7fab87face0996b504d7a060c1 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-aws-iot-device-sdk - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=AWS IoT Node.js SDK for Embedded Devices - URL:=https://www.npmjs.com/package/aws-iot-device-sdk - DEPENDS:=+node -endef - -define Package/node-aws-iot-device-sdk/description - The aws-iot-device-sdk.js package allows developers to write JavaScript applications which access the AWS IoT Platform via MQTT or MQTT over the Secure WebSocket Protocol -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-aws-iot-device-sdk/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{*.txt,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,common} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{device,jobs,scripts,thing} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-aws-iot-device-sdk/postrm -#!/bin/sh -rm /usr/lib/node_modules/aws-iot-device-sdk || true -rm -rf /usr/lib/node/aws-iot-device-sdk || true -endef - -$(eval $(call BuildPackage,node-aws-iot-device-sdk)) diff --git a/packages/lang/node-aws-sdk/Makefile b/packages/lang/node-aws-sdk/Makefile deleted file mode 100644 index b6a959f1..00000000 --- a/packages/lang/node-aws-sdk/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=aws-sdk -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=2.1692.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=c5de2b2f968e2b039bc17466dcac07cdd554fd3f81614b722fdbaa2f29037287 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-aws-sdk - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=AWS SDK for JavaScript - URL:=https://www.npmjs.com/package/aws-sdk - DEPENDS:=+node -endef - -define Package/node-aws-sdk/description - The official AWS SDK for JavaScript, available for browsers and mobile devices, or Node.js backends -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-aws-sdk/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{*.txt,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{apis,clients,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{dist-tools,scripts,vendor} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-aws-sdk/postrm -#!/bin/sh -rm /usr/lib/node_modules/aws-sdk || true -rm -rf /usr/lib/node/aws-sdk || true -endef - -$(eval $(call BuildPackage,node-aws-sdk)) diff --git a/packages/lang/node-azure-event-hubs/Makefile b/packages/lang/node-azure-event-hubs/Makefile deleted file mode 100644 index 5477fe7a..00000000 --- a/packages/lang/node-azure-event-hubs/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_SCOPE:=azure -PKG_NPM_NAME:=event-hubs -PKG_NAME:=node-$(PKG_NPM_SCOPE)-$(PKG_NPM_NAME) -PKG_VERSION:=5.12.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_SCOPE)-$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL_FILE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://registry.npmjs.org/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/-/ -PKG_HASH:=1d3e7d60fb75084332c385c51ad6e94a8803a6e735e1f6e958375f13de37652d - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=License - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-azure-event-hubs - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Azure Event Hubs service - URL:=https://www.npmjs.org/package/azure-event-hubs - DEPENDS:=+node -endef - -define Package/node-azure-event-hubs/description - Azure Event Hubs service -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_SCOPE)-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --ignore-scripts - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-azure-event-hubs/install - $(INSTALL_DIR) $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{License,dist} \ - $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/node_modules \ - $(1)/usr/lib/node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules/@$(PKG_NPM_SCOPE) - $(LN) ../../node/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME) \ - $(1)/usr/lib/node_modules/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME) -endef - -define Package/node-azure-event-hubs/postrm -#!/bin/sh -rm /usr/lib/node_modules/@azure/event-hubs || true -rm -rf /usr/lib/node/@azure/event-hubs || true -rmdir /usr/lib/node_modules/@azure || true -rmdir /usr/lib/node/@azure || true -endef - -$(eval $(call BuildPackage,node-azure-event-hubs)) diff --git a/packages/lang/node-azure-event-hubs/patches/999-remove_dev.patch b/packages/lang/node-azure-event-hubs/patches/999-remove_dev.patch deleted file mode 100644 index ea2a5873..00000000 --- a/packages/lang/node-azure-event-hubs/patches/999-remove_dev.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -115,37 +115,6 @@ - "tslib": "^2.6.3" - }, - "devDependencies": { -- "@azure-tools/test-credential": "^2.0.0", -- "@azure-tools/test-utils-vitest": "^1.0.0", -- "@azure-tools/vite-plugin-browser-test-map": "^1.0.0", -- "@azure/dev-tool": "^1.0.0", -- "@azure/eslint-plugin-azure-sdk": "^3.0.0", -- "@azure/identity": "^4.4.1", -- "@azure/keyvault-secrets": "^4.8.0", -- "@azure/mock-hub": "^1.0.0", -- "@microsoft/api-extractor": "^7.31.1", -- "@rollup/plugin-inject": "^5.0.5", -- "@types/chai-as-promised": "^7.1.8", -- "@types/debug": "^4.1.4", -- "@types/node": "^18.0.0", -- "@types/ws": "^7.2.4", -- "@vitest/browser": "^2.0.5", -- "@vitest/coverage-istanbul": "^2.0.5", -- "chai": "^5.1.1", -- "chai-as-promised": "^8.0.0", -- "chai-exclude": "^3.0.0", -- "copyfiles": "^2.4.1", -- "cross-env": "^7.0.3", -- "debug": "^4.1.1", -- "dotenv": "^16.0.0", -- "eslint": "^9.9.0", -- "https-proxy-agent": "^7.0.0", -- "playwright": "^1.45.3", -- "rimraf": "^6.0.1", -- "tsx": "^4.16.2", -- "typescript": "~5.6.2", -- "vitest": "^2.0.5", -- "ws": "^8.2.0" - }, - "exports": { - "./package.json": "./package.json", diff --git a/packages/lang/node-azure-iot-device-amqp/Makefile b/packages/lang/node-azure-iot-device-amqp/Makefile deleted file mode 100644 index b44101b8..00000000 --- a/packages/lang/node-azure-iot-device-amqp/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=azure-iot-device-amqp -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.14.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=964d4c9ab9366f227a90c3a37db1f33b87390332b47483bb9c31ee9179afb282 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:= - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-azure-iot-device-amqp - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=AMQP transport for Azure IoT device SDK - URL:=https://www.npmjs.org/package/azure-iot-device-amqp - DEPENDS:=+node -endef - -define Package/node-azure-iot-device-amqp/description - Communicate with Azure IoT Hub from any device over AMQP -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-azure-iot-device-amqp/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-azure-iot-device-amqp/postrm -#!/bin/sh -rm /usr/lib/node_modules/azure-iot-device-amqp || true -rm -rf /usr/lib/node/azure-iot-device-amqp || true -endef - -$(eval $(call BuildPackage,node-azure-iot-device-amqp)) diff --git a/packages/lang/node-azure-iot-device-http/Makefile b/packages/lang/node-azure-iot-device-http/Makefile deleted file mode 100644 index 446799bf..00000000 --- a/packages/lang/node-azure-iot-device-http/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=azure-iot-device-http -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.14.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=96d3222fa85665121832fcb29106ba4dd0a8bec0278e2ecc209f2641a2a7cdad - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:= - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-azure-iot-device-http - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=HTTP transport for Azure IoT device SDK - URL:=https://www.npmjs.org/package/azure-iot-device-http - DEPENDS:=+node -endef - -define Package/node-azure-iot-device-http/description - Communicate with Azure IoT Hub from any device over HTTP 1.1 -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-azure-iot-device-http/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-azure-iot-device-http/postrm -#!/bin/sh -rm /usr/lib/node_modules/azure-iot-device-http || true -rm -rf /usr/lib/node/azure-iot-device-http || true -endef - -$(eval $(call BuildPackage,node-azure-iot-device-http)) diff --git a/packages/lang/node-azure-iot-device-mqtt/Makefile b/packages/lang/node-azure-iot-device-mqtt/Makefile deleted file mode 100644 index 048dbccd..00000000 --- a/packages/lang/node-azure-iot-device-mqtt/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=azure-iot-device-mqtt -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.16.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=9f440c1b70fc61004654ea2febaa428baada8b9e79d51d65f096c0c60f38a4b5 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:= - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-azure-iot-device-mqtt - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=MQTT transport for Azure IoT device SDK - URL:=https://www.npmjs.org/package/azure-iot-device-mqtt - DEPENDS:=+node -endef - -define Package/node-azure-iot-device-mqtt/description - Communicate with Azure IoT Hub from any device over MQTT -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-azure-iot-device-mqtt/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-azure-iot-device-mqtt/postrm -#!/bin/sh -rm /usr/lib/node_modules/azure-iot-device-mqtt || true -rm -rf /usr/lib/node/azure-iot-device-mqtt || true -endef - -$(eval $(call BuildPackage,node-azure-iot-device-mqtt)) diff --git a/packages/lang/node-azure-iot-device/Makefile b/packages/lang/node-azure-iot-device/Makefile deleted file mode 100644 index 9abaa21a..00000000 --- a/packages/lang/node-azure-iot-device/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=azure-iot-device -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.18.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=524296fa3dee0d4e58e96a8032b2be66ce4e698417eb78f999eb5790c95ae135 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:= - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-azure-iot-device - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Azure IoT device SDK core - URL:=https://www.npmjs.org/package/azure-iot-device - DEPENDS:=+node -endef - -define Package/node-azure-iot-device/description - The core components of the Azure IoT device SDK. -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-azure-iot-device/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-azure-iot-device/postrm -#!/bin/sh -rm /usr/lib/node_modules/azure-iot-device || true -rm -rf /usr/lib/node/azure-iot-device || true -endef - -$(eval $(call BuildPackage,node-azure-iot-device)) diff --git a/packages/lang/node-azure-iothub/Makefile b/packages/lang/node-azure-iothub/Makefile deleted file mode 100644 index d16282bc..00000000 --- a/packages/lang/node-azure-iothub/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=azure-iothub -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=1.16.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=1ed8782b45c3feb534937451ba308b1f6768108ba5499371fba364035e746657 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:= - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-azure-iothub - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Azure IoT SDK - IoT Hub - URL:=https://www.npmjs.org/package/azure-iothub - DEPENDS:=+node -endef - -define Package/node-azure-iothub/description - The Azure IoT Service SDK for Node.js helps you build applications that interact with your devices and manage their identities in your IoT hub -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --omit=optional --ignore-scripts - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-azure-iothub/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,dist} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-azure-iothub/postrm -#!/bin/sh -rm /usr/lib/node_modules/azure-iothub || true -rm -rf /usr/lib/node/azure-iothub || true -endef - -$(eval $(call BuildPackage,node-azure-iothub)) diff --git a/packages/lang/node-bcrypt/Makefile b/packages/lang/node-bcrypt/Makefile deleted file mode 100644 index ba1659e3..00000000 --- a/packages/lang/node-bcrypt/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=bcrypt -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=5.1.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=64008e514f8f2a83aac4f883847affed1f89eaecb496d21dbdeb43ada793735d - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-bcrypt - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=A bcrypt library for NodeJS - URL:=https://www.npmjs.com/package/bcrypt - DEPENDS:=+node -endef - -define Package/node-bcrypt/description - A library to help you hash passwords. You can read about bcrypt in Wikipedia as well as in the following article: How To Safely Store A Password -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --build-from-source --target_arch=$(NODEJS_CPU) - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-bcrypt/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{LICENSE,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{examples,test} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-bcrypt/postrm -#!/bin/sh -rm /usr/lib/node_modules/bcrypt || true -rm -rf /usr/lib/node/bcrypt || true -endef - -$(eval $(call BuildPackage,node-bcrypt)) diff --git a/packages/lang/node-bignum/Makefile b/packages/lang/node-bignum/Makefile deleted file mode 100644 index 3b2a3915..00000000 --- a/packages/lang/node-bignum/Makefile +++ /dev/null @@ -1,81 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=bignum -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.13.1 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=276200eb97ab41a80cdfac0e90979c61c2ba6a3a052a312228b3e2f8c6563f3d - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-bignum - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Arbitrary precision integral arithmetic for Node.js - URL:=https://www.npmjs.org/package/bignum - DEPENDS:=+node -endef - -define Package/node-bignum/description - Arbitrary precision integral arithmetic for Node.js using OpenSSL. -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --build-from-source --target_arch=$(NODEJS_CPU) - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-bignum/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,README.markdown} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release - $(CP) $(PKG_BUILD_DIR)/build/Release/bignum.node \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-bignum/postrm -#!/bin/sh -rm /usr/lib/node_modules/bignum || true -rm -rf /usr/lib/node/bignum || true -endef - -$(eval $(call BuildPackage,node-bignum)) diff --git a/packages/lang/node-bignum/patches/000-remove_openssl_confs.patch b/packages/lang/node-bignum/patches/000-remove_openssl_confs.patch deleted file mode 100644 index ffd778e1..00000000 --- a/packages/lang/node-bignum/patches/000-remove_openssl_confs.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/binding.gyp -+++ b/binding.gyp -@@ -32,52 +32,6 @@ - ], - 'include_dirs': [ - '<(openssl_root)/include', -- ], -- }, -- -- # Otherwise, if not Windows, link against the exposed OpenSSL -- # in Node. -- { -- 'conditions': [ -- [ -- 'target_arch=="ia32"', { -- 'variables': { -- 'openssl_config_path': '<(nodedir)/deps/openssl/config/piii' -- } -- } -- ], -- [ -- 'target_arch=="x64"', { -- 'variables': { -- 'openssl_config_path': '<(nodedir)/deps/openssl/config/k8' -- }, -- } -- ], -- [ -- 'target_arch=="arm"', { -- 'variables': { -- 'openssl_config_path': '<(nodedir)/deps/openssl/config/arm' -- } -- } -- ], -- [ -- 'target_arch=="arm64"', { -- 'variables': { -- 'openssl_config_path': '<(nodedir)/deps/openssl/config/aarch64' -- } -- }, -- ], -- [ -- 'target_arch=="ppc64"', { -- 'variables': { -- 'openssl_config_path': '<(nodedir)/deps/openssl/config/powerpc64' -- } -- }, -- ] -- ], -- 'include_dirs': [ -- "<(nodedir)/deps/openssl/openssl/include", -- "<(openssl_config_path)" - ] - } - ] diff --git a/packages/lang/node-bignum/patches/999-node_v23_support.patch b/packages/lang/node-bignum/patches/999-node_v23_support.patch deleted file mode 100644 index beea7449..00000000 --- a/packages/lang/node-bignum/patches/999-node_v23_support.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -23,7 +23,7 @@ - }, - "dependencies": { - "bindings": "^1.5.0", -- "nan": "^2.14.0", -+ "nan": "^2.22.0", - "safe-buffer": "^5.2.0" - }, - "devDependencies": { diff --git a/packages/lang/node-binaryjs/Makefile b/packages/lang/node-binaryjs/Makefile deleted file mode 100644 index d75cf3c0..00000000 --- a/packages/lang/node-binaryjs/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=binaryjs -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.2.1 -PKG_RELEASE:=14 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=3f39394fea889b14892de5f94cf9d6ebf3034f68cf51db6b64f51772492e55cf - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-binaryjs - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Binary realtime streaming made easy - URL:=https://www.npmjs.org/package/binaryjs - DEPENDS:=+node +node-bufferutil +node-utf-8-validate -endef - -define Package/node-binaryjs/description - Node binary websocket streaming made easy -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-binaryjs/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{bin,dist,doc,examples} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{lib,node_modules,test} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-binaryjs/postrm -#!/bin/sh -rm /usr/lib/node_modules/binaryjs || true -rm -rf /usr/lib/node/binaryjs || true -endef - -$(eval $(call BuildPackage,node-binaryjs)) diff --git a/packages/lang/node-bleacon/Makefile b/packages/lang/node-bleacon/Makefile deleted file mode 100644 index c84140a4..00000000 --- a/packages/lang/node-bleacon/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=bleacon -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.5.1 -PKG_RELEASE:=11 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=faf72b2adbb99386665eba5678f89b813486a1b6a294bb8f013058a2b536eef5 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-bleacon - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Library for creating/discovering/configuring iBeacons - URL:=https://www.npmjs.org/package/bleacon - DEPENDS:=+node +node-bignum +node-bleno +node-noble-device -endef - -define Package/node-bleacon/description - A Node.js library for creating, discovering, and configuring iBeacons -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-bleacon/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,README.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{index.js,test.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{bleu-station,radbeacon} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{estimote,estimote-sticker} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-bleacon/postrm -#!/bin/sh -rm /usr/lib/node_modules/bleacon || true -rm -rf /usr/lib/node/bleacon || true -endef - -$(eval $(call BuildPackage,node-bleacon)) diff --git a/packages/lang/node-bleacon/patches/000-remove_depends.patch b/packages/lang/node-bleacon/patches/000-remove_depends.patch deleted file mode 100644 index 3d48dbe1..00000000 --- a/packages/lang/node-bleacon/patches/000-remove_depends.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -19,11 +19,7 @@ - "url": "https://github.com/sandeepmistry/node-bleacon/issues" - }, - "dependencies": { -- "bignum": "^0.11.0", -- "bleno": "^0.4.1", -- "debug": "^2.2.0", -- "noble": "^1.7.0", -- "noble-device": "^1.1.0" -+ "debug": "^2.2.0" - }, - "devDependencies": { - "jshint": "~2.1.11", diff --git a/packages/lang/node-bleno/Makefile b/packages/lang/node-bleno/Makefile deleted file mode 100644 index 448a75e6..00000000 --- a/packages/lang/node-bleno/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (C) 2014 Arduino LLC -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=bleno -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.5.0 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=44a6df84a5eae35be45990ac69fe00f4d8a3d6f88110ab9d0cea2a7f59e82cf5 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-bleno - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=BLE (Bluetooth low energy) peripherals for Node.js - URL:=https://www.npmjs.org/package/bleno - DEPENDS:=+node +node-bluetooth-hci-socket -endef - -define Package/node-bleno/description - A node.js module for implementing BLE (Bluetooth low energy) peripherals -endef - -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-bleno/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{LICENSE,examples,test} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-bleno/postrm -#!/bin/sh -rm /usr/lib/node_modules/bleno || true -rm -rf /usr/lib/node/bleno || true -endef - -$(eval $(call BuildPackage,node-bleno)) diff --git a/packages/lang/node-bleno/patches/000-remove_depends.patch b/packages/lang/node-bleno/patches/000-remove_depends.patch deleted file mode 100644 index 01653150..00000000 --- a/packages/lang/node-bleno/patches/000-remove_depends.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -44,7 +44,6 @@ - "debug": "^2.2.0" - }, - "optionalDependencies": { -- "bluetooth-hci-socket": "^0.5.1", - "bplist-parser": "0.0.6", - "xpc-connection": "~0.1.4" - } diff --git a/packages/lang/node-bluetooth-hci-socket/Makefile b/packages/lang/node-bluetooth-hci-socket/Makefile deleted file mode 100644 index 05d5f10e..00000000 --- a/packages/lang/node-bluetooth-hci-socket/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=bluetooth-hci-socket -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.5.3 -PKG_RELEASE:=6 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/noble/node-bluetooth-hci-socket.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=916158269f7e48ddc73d2448d2634e91538c8991 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=90493dce4b98eb14cc25885cdcdbc4da476db48e78cf1353f3f461bfc3c6b3c1 - -#PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -#PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -#PKG_HASH:=69fba6171c1fb981d61c0e789ebcd25869589181a03c836b1b5e4867bab957e5 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/package.mk - -define Package/node-bluetooth-hci-socket - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Bluetooth HCI socket binding for Node.js - URL:=https://www.npmjs.com/package/bluetooth-hci-socket - DEPENDS:=+node +node-usb +bluez-libs -endef - -define Package/node-bluetooth-hci-socket/description - Bluetooth HCI socket binding for Node.js -endef - -NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) -TMPNPM:=$(shell mktemp -u XXXXXXXXXX) -NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR)) - -TARGET_CFLAGS+=$(FPIC) -TARGET_CPPFLAGS+=$(FPIC) - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_nodedir=$(STAGING_DIR)/usr/ \ - $(if $(CONFIG_NODEJS_NPM_KEEP_CACHE), npm_config_cache=$(NPM_CACHE_DIR)/npm-cache-$(PKG_NPM_NAME),npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM)) \ - npm install --prefer-offline --no-audit --global-style --install-strategy=shallow --no-save --omit=dev --no-package-lock --build-from-source --target_arch=$(NODEJS_CPU) - rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM) - rm -f $(PKG_BUILD_DIR)/node_modules/.package-lock.json - find $(PKG_BUILD_DIR)/node_modules -type d -empty -print0 | xargs -0 -r rmdir || true -endef - -define Package/node-bluetooth-hci-socket/install - $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) - $(CP) $(PKG_BUILD_DIR)/{package.json,*.md} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{LICENSE,*.js} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(CP) $(PKG_BUILD_DIR)/{node_modules,lib,examples} \ - $(1)/usr/lib/node/$(PKG_NPM_NAME)/ - $(INSTALL_DIR) $(1)/usr/lib/node_modules - $(LN) ../node/$(PKG_NPM_NAME) $(1)/usr/lib/node_modules/$(PKG_NPM_NAME) -endef - -define Package/node-bluetooth-hci-socket/postrm -#!/bin/sh -rm /usr/lib/node_modules/bluetooth-hci-socket || true -rm -rf /usr/lib/node/bluetooth-hci-socket || true -endef - -$(eval $(call BuildPackage,node-bluetooth-hci-socket)) diff --git a/packages/lang/node-bluetooth-hci-socket/patches/900-musl_byteswap.patch b/packages/lang/node-bluetooth-hci-socket/patches/900-musl_byteswap.patch deleted file mode 100644 index 325ce9de..00000000 --- a/packages/lang/node-bluetooth-hci-socket/patches/900-musl_byteswap.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/BluetoothHciSocket.cpp -+++ b/src/BluetoothHciSocket.cpp -@@ -7,6 +7,9 @@ - #include - #include - -+/* __MUSL__ */ -+#include -+ - #include "BluetoothHciSocket.h" - - #define BTPROTO_L2CAP 0 diff --git a/packages/lang/node-bluetooth-hci-socket/patches/999-fix_build_on_node_10_x.patch b/packages/lang/node-bluetooth-hci-socket/patches/999-fix_build_on_node_10_x.patch deleted file mode 100644 index 837f1754..00000000 --- a/packages/lang/node-bluetooth-hci-socket/patches/999-fix_build_on_node_10_x.patch +++ /dev/null @@ -1,2986 +0,0 @@ ---- a/appveyor.yml -+++ /dev/null -@@ -1,39 +0,0 @@ --branches: -- only: -- - master -- - /^v?[0-9]/ -- --environment: -- GYP_MSVS_VERSION: 2013 -- -- matrix: -- - node_version: '4' -- - node_version: '5' -- - node_version: '6' -- --install: -- - ps: Install-Product node $env:node_version $env:platform -- - ps: npm install -g node-gyp node-pre-gyp-github -- # This fixes an issue with Node 4.x on x86. If it builds without this line -- # needing to be set, we can remove it. -- - ps: npm config -g set node-gyp "$(npm config -g get prefix)\node_modules\node-gyp\bin\node-gyp.js" -- -- - ps: if ($env:appveyor_repo_tag -match "true" -and $env:appveyor_repo_tag_name -match '^v?[0-9]') { $publish_binary=1; } -- --build_script: -- - ps: echo $publish_binary -- - ps: | -- $ErrorActionPreference = 'Continue' -- git submodule update --init 2>&1 | write-host -- npm install --build-from-source 2>&1 | write-host -- ./node_modules/.bin/node-pre-gyp package 2>&1 | write-host -- if ($publish_binary -Eq "1") { -- node-pre-gyp-github publish 2>&1 | write-host -- if (-Not ($?)) { -- throw "Failed publishing"; -- } -- } -- echo "done." --platform: -- - x86 -- - x64 ---- /dev/null -+++ b/.appveyor.yml -@@ -0,0 +1,34 @@ -+environment: -+ GYP_MSVS_VERSION: 2013 -+ -+ matrix: -+ - node_version: '6' -+ - node_version: '8' -+ - node_version: '10' -+ -+install: -+ - ps: Install-Product node $env:node_version $env:platform -+ - ps: npm install -g node-gyp node-pre-gyp-github -+ # This fixes an issue with Node 4.x on x86. If it builds without this line -+ # needing to be set, we can remove it. -+ - ps: npm config -g set node-gyp "$(npm config -g get prefix)\node_modules\node-gyp\bin\node-gyp.js" -+ -+ - ps: if ($env:appveyor_repo_tag -match "true" -and $env:appveyor_repo_tag_name -match '^v?[0-9]') { $publish_binary=1; } -+ -+build_script: -+ - ps: echo $publish_binary -+ - ps: | -+ $ErrorActionPreference = 'Continue' -+ git submodule update --init 2>&1 | write-host -+ npm install --build-from-source 2>&1 | write-host -+ ./node_modules/.bin/node-pre-gyp package 2>&1 | write-host -+ if ($publish_binary -Eq "1") { -+ node-pre-gyp-github publish 2>&1 | write-host -+ if (-Not ($?)) { -+ throw "Failed publishing"; -+ } -+ } -+ echo "done." -+platform: -+ - x86 -+ - x64 ---- /dev/null -+++ b/.eslintrc.json -@@ -0,0 +1,27 @@ -+{ -+ "env": { -+ "browser": true, -+ "node": true, -+ "mocha": true -+ }, -+ "parserOptions": { -+ "ecmaVersion": 2016 -+ }, -+ "extends": "eslint:recommended", -+ "rules": { -+ "no-buffer-constructor": "error", -+ "no-const-assign": "error", -+ "prefer-const": "error", -+ "prefer-spread": "error", -+ "prefer-template": "error", -+ "prefer-object-spread": "error", -+ "guard-for-in": "error", -+ "eqeqeq": "error", -+ "no-bitwise": "off", -+ "curly": "error", -+ "indent": ["error", 2], -+ "linebreak-style": ["error", "unix"], -+ "quotes": ["error", "single"], -+ "semi": ["error", "always"] -+ } -+} ---- a/.travis.yml -+++ b/.travis.yml -@@ -1,17 +1,12 @@ --branches: -- only: -- - node-pre-gyp -- - /^[0-9]/ -- - language: cpp - - dist: trusty - - env: - matrix: -- - NODE_VERSION="4" -- - NODE_VERSION="5" - - NODE_VERSION="6" -+ - NODE_VERSION="8" -+ - NODE_VERSION="10" - - before_install: - - sudo apt-get install build-essential libudev-dev -y ---- a/README.md -+++ b/README.md -@@ -53,7 +53,7 @@ npm install bluetooth-hci-socket - ## Usage - - ```javascript --var BluetoothHciSocket = require('bluetooth-hci-socket'); -+const BluetoothHciSocket = require('bluetooth-hci-socket'); - ``` - - ### Actions -@@ -61,13 +61,13 @@ var BluetoothHciSocket = require('blueto - #### Create - - ```javascript --var bluetoothHciSocket = new BluetoothHciSocket(); -+const bluetoothHciSocket = new BluetoothHciSocket(); - ``` - - #### Set Filter - - ```javascript --var filter = new Buffer(14); -+const filter = Buffer.alloc(14); - - // ... - -@@ -103,7 +103,7 @@ bluetoothHciSocket.bindControl(); - Query the device state. - - ``` --var isDevUp = bluetoothHciSocket.isDevUp(); // returns: true or false -+const isDevUp = bluetoothHciSocket.isDevUp(); // returns: true or false - ``` - - __Note:__ must be called after ```bindRaw```. -@@ -125,7 +125,7 @@ __Note:__ must be called after ```bindRa - #### Write - - ```javascript --var data = new Buffer(/* ... */); -+const data = Buffer.from(/* ... */); - - // ... - ---- a/binding.gyp -+++ b/binding.gyp -@@ -1,7 +1,7 @@ - { - 'targets': [ - { -- 'target_name': 'binding', -+ 'target_name': 'bluetooth_hci_socket', - 'conditions': [ - ['OS=="linux" or OS=="android" or OS=="freebsd"', { - 'sources': [ ---- a/examples/le-advertisement-test.js -+++ b/examples/le-advertisement-test.js -@@ -1,13 +1,14 @@ --var BluetoothHciSocket = require('../index'); -+/* eslint-disable no-console */ -+const BluetoothHciSocket = require('../index'); - --var bluetoothHciSocket = new BluetoothHciSocket(); -+const bluetoothHciSocket = new BluetoothHciSocket(); - - bluetoothHciSocket.on('data', function(data) { -- console.log('data: ' + data.toString('hex')); -+ console.log(`data: ${data.toString('hex')}`); - - if (data.readUInt8(0) === HCI_EVENT_PKT) { - if (data.readUInt8(1) === EVT_CMD_COMPLETE) { -- if (data.readUInt16LE(4) == LE_SET_ADVERTISING_PARAMETERS_CMD) { -+ if (data.readUInt16LE(4) === LE_SET_ADVERTISING_PARAMETERS_CMD) { - if (data.readUInt8(6) === HCI_SUCCESS) { - console.log('LE Advertising Parameters Set'); - } -@@ -25,54 +26,54 @@ bluetoothHciSocket.on('data', function(d - } - } - } else if (data.readUInt8(1) === EVT_DISCONN_COMPLETE) { -- var status = data.readUInt8(3); -- var handle = data.readUInt16LE(4); -- var reason = data.readUInt8(6); -+ const disconnectionStatus = data.readUInt8(3); -+ const disconnectionHandle = data.readUInt16LE(4); -+ const disconnectionReason = data.readUInt8(6); - - console.log('Disconn Complete'); -- console.log('\t' + status); -- console.log('\t' + handle); -- console.log('\t' + reason); -+ console.log(`\t${disconnectionStatus}`); -+ console.log(`\t${disconnectionHandle}`); -+ console.log(`\t${disconnectionReason}`); - - process.exit(0); - } else if (data.readUInt8(1) === EVT_LE_META_EVENT) { -- if (data.readUInt8(3) === EVT_LE_CONN_COMPLETE) { // subevent -- var status = data.readUInt8(4); -- var handle = data.readUInt16LE(5); -- var role = data.readUInt8(7); -- var peerBdAddrType = data.readUInt8(8); -- var peerBdAddr = data.slice(9, 15); -- var interval = data.readUInt16LE(15); -- var latency = data.readUInt16LE(17); -- var supervisionTimeout = data.readUInt16LE(19); -- var masterClockAccuracy = data.readUInt8(21); -+ const subEvent = data.readUInt8(3); -+ const status = data.readUInt8(4); -+ const handle = data.readUInt16LE(5); -+ -+ if (subEvent === EVT_LE_CONN_COMPLETE) { // subevent -+ const role = data.readUInt8(7); -+ const peerBdAddrType = data.readUInt8(8); -+ const peerBdAddr = data.slice(9, 15); -+ const interval = data.readUInt16LE(15); -+ const latency = data.readUInt16LE(17); -+ const supervisionTimeout = data.readUInt16LE(19); -+ const masterClockAccuracy = data.readUInt8(21); - - console.log('LE Connection Complete'); -- console.log('\t' + status); -- console.log('\t' + handle); -- console.log('\t' + role); -- console.log('\t' + ['PUBLIC', 'RANDOM'][peerBdAddrType]); -- console.log('\t' + peerBdAddr.toString('hex').match(/.{1,2}/g).reverse().join(':')); -- console.log('\t' + interval * 1.25); -- console.log('\t' + latency); -- console.log('\t' + supervisionTimeout * 10); -- console.log('\t' + masterClockAccuracy); -+ console.log(`\t${status}`); -+ console.log(`\t${handle}`); -+ console.log(`\t${role}`); -+ console.log(`\t${['PUBLIC', 'RANDOM'][peerBdAddrType]}`); -+ console.log(`\t${peerBdAddr.toString('hex').match(/.{1,2}/g).reverse().join(':')}`); -+ console.log(`\t${interval * 1.25}`); -+ console.log(`\t${latency}`); -+ console.log(`\t${supervisionTimeout * 10}`); -+ console.log(`\t${masterClockAccuracy}`); - - setAdvertiseEnable(true); -- } else if (data.readUInt8(3) === EVT_LE_CONN_UPDATE_COMPLETE) { -- var status = data.readUInt8(4); -- var handle = data.readUInt16LE(5); -- var interval = data.readUInt16LE(7); -- var latency = data.readUInt16LE(9); -- var supervisionTimeout = data.readUInt16LE(11); -+ } else if (subEvent === EVT_LE_CONN_UPDATE_COMPLETE) { -+ const updateInterval = data.readUInt16LE(7); -+ const updateLatency = data.readUInt16LE(9); -+ const updateSupervisionTimeout = data.readUInt16LE(11); - - console.log('LE Connection Update Complete'); -- console.log('\t' + status); -- console.log('\t' + handle); -+ console.log(`\t${status}`); -+ console.log(`\t${handle}`); - -- console.log('\t' + interval * 1.25); -- console.log('\t' + latency); -- console.log('\t' + supervisionTimeout * 10); -+ console.log(`\t${updateInterval * 1.25}`); -+ console.log(`\t${updateLatency}`); -+ console.log(`\t${updateSupervisionTimeout * 10}`); - } - } - } -@@ -90,37 +91,37 @@ bluetoothHciSocket.on('error', function( - } - }); - --var HCI_COMMAND_PKT = 0x01; --var HCI_ACLDATA_PKT = 0x02; --var HCI_EVENT_PKT = 0x04; -- --var EVT_DISCONN_COMPLETE = 0x05; --var EVT_CMD_COMPLETE = 0x0e; --var EVT_CMD_STATUS = 0x0f; --var EVT_LE_META_EVENT = 0x3e; -- --var EVT_LE_CONN_COMPLETE = 0x01; --var EVT_LE_CONN_UPDATE_COMPLETE = 0x03; -- --var OGF_LE_CTL = 0x08; --var OCF_LE_SET_ADVERTISING_PARAMETERS = 0x0006; --var OCF_LE_SET_ADVERTISING_DATA = 0x0008; --var OCF_LE_SET_SCAN_RESPONSE_DATA = 0x0009; --var OCF_LE_SET_ADVERTISE_ENABLE = 0x000a; -- --var LE_SET_ADVERTISING_PARAMETERS_CMD = OCF_LE_SET_ADVERTISING_PARAMETERS | OGF_LE_CTL << 10; --var LE_SET_ADVERTISING_DATA_CMD = OCF_LE_SET_ADVERTISING_DATA | OGF_LE_CTL << 10; --var LE_SET_SCAN_RESPONSE_DATA_CMD = OCF_LE_SET_SCAN_RESPONSE_DATA | OGF_LE_CTL << 10; --var LE_SET_ADVERTISE_ENABLE_CMD = OCF_LE_SET_ADVERTISE_ENABLE | OGF_LE_CTL << 10; -+const HCI_COMMAND_PKT = 0x01; -+const HCI_ACLDATA_PKT = 0x02; -+const HCI_EVENT_PKT = 0x04; -+ -+const EVT_DISCONN_COMPLETE = 0x05; -+const EVT_CMD_COMPLETE = 0x0e; -+const EVT_CMD_STATUS = 0x0f; -+const EVT_LE_META_EVENT = 0x3e; -+ -+const EVT_LE_CONN_COMPLETE = 0x01; -+const EVT_LE_CONN_UPDATE_COMPLETE = 0x03; -+ -+const OGF_LE_CTL = 0x08; -+const OCF_LE_SET_ADVERTISING_PARAMETERS = 0x0006; -+const OCF_LE_SET_ADVERTISING_DATA = 0x0008; -+const OCF_LE_SET_SCAN_RESPONSE_DATA = 0x0009; -+const OCF_LE_SET_ADVERTISE_ENABLE = 0x000a; -+ -+const LE_SET_ADVERTISING_PARAMETERS_CMD = OCF_LE_SET_ADVERTISING_PARAMETERS | OGF_LE_CTL << 10; -+const LE_SET_ADVERTISING_DATA_CMD = OCF_LE_SET_ADVERTISING_DATA | OGF_LE_CTL << 10; -+const LE_SET_SCAN_RESPONSE_DATA_CMD = OCF_LE_SET_SCAN_RESPONSE_DATA | OGF_LE_CTL << 10; -+const LE_SET_ADVERTISE_ENABLE_CMD = OCF_LE_SET_ADVERTISE_ENABLE | OGF_LE_CTL << 10; - --var HCI_SUCCESS = 0; -+const HCI_SUCCESS = 0; - - function setFilter() { -- var filter = new Buffer(14); -- var typeMask = (1 << HCI_EVENT_PKT) | (1 << HCI_ACLDATA_PKT); -- var eventMask1 = (1 << EVT_DISCONN_COMPLETE) | (1 << EVT_CMD_COMPLETE) | (1 << EVT_CMD_STATUS); -- var eventMask2 = (1 << (EVT_LE_META_EVENT - 32)); -- var opcode = 0; -+ const filter = Buffer.alloc(14); -+ const typeMask = (1 << HCI_EVENT_PKT) | (1 << HCI_ACLDATA_PKT); -+ const eventMask1 = (1 << EVT_DISCONN_COMPLETE) | (1 << EVT_CMD_COMPLETE) | (1 << EVT_CMD_STATUS); -+ const eventMask2 = (1 << (EVT_LE_META_EVENT - 32)); -+ const opcode = 0; - - filter.writeUInt32LE(typeMask, 0); - filter.writeUInt32LE(eventMask1, 4); -@@ -131,7 +132,7 @@ function setFilter() { - } - - function setAdvertisingParameter() { -- var cmd = new Buffer(19); -+ const cmd = Buffer.alloc(19); - - // header - cmd.writeUInt8(HCI_COMMAND_PKT, 0); -@@ -146,16 +147,16 @@ function setAdvertisingParameter() { - cmd.writeUInt8(0x00, 8); // adv type - cmd.writeUInt8(0x00, 9); // own addr typ - cmd.writeUInt8(0x00, 10); // direct addr type -- (new Buffer('000000000000', 'hex')).copy(cmd, 11); // direct addr -+ Buffer.from('000000000000', 'hex').copy(cmd, 11); // direct addr - cmd.writeUInt8(0x07, 17); - cmd.writeUInt8(0x00, 18); - -- console.log('write: ' + cmd.toString('hex')) -+ console.log(`write: ${cmd.toString('hex')}`); - bluetoothHciSocket.write(cmd); --}; -+} - - function setAdvertisingData(data) { -- var cmd = new Buffer(36); -+ const cmd = Buffer.alloc(36); - - cmd.fill(0); - -@@ -170,12 +171,12 @@ function setAdvertisingData(data) { - cmd.writeUInt8(data.length, 4); - data.copy(cmd, 5); - -- console.log('write: ' + cmd.toString('hex')) -+ console.log(`write: ${cmd.toString('hex')}`); - bluetoothHciSocket.write(cmd); - } - - function setScanResponseData(data) { -- var cmd = new Buffer(36); -+ const cmd = Buffer.alloc(36); - - cmd.fill(0); - -@@ -190,12 +191,12 @@ function setScanResponseData(data) { - cmd.writeUInt8(data.length, 4); - data.copy(cmd, 5); - -- console.log('write: ' + cmd.toString('hex')) -+ console.log(`write: ${cmd.toString('hex')}`); - bluetoothHciSocket.write(cmd); - } - - function setAdvertiseEnable(enabled) { -- var cmd = new Buffer(5); -+ const cmd = Buffer.alloc(5); - - // header - cmd.writeUInt8(HCI_COMMAND_PKT, 0); -@@ -207,7 +208,7 @@ function setAdvertiseEnable(enabled) { - // data - cmd.writeUInt8(enabled ? 0x01 : 0x00, 4); // enable: 0 -> disabled, 1 -> enabled - -- console.log('write: ' + cmd.toString('hex')); -+ console.log(`write: ${cmd.toString('hex')}`); - bluetoothHciSocket.write(cmd); - } - -@@ -215,10 +216,10 @@ bluetoothHciSocket.bindRaw(); - setFilter(); - bluetoothHciSocket.start(); - --console.log('isDevUp = ' + bluetoothHciSocket.isDevUp()); -+console.log(`isDevUp = ${bluetoothHciSocket.isDevUp()}`); - - setAdvertiseEnable(false); - setAdvertisingParameter(); --setScanResponseData(new Buffer('0909657374696d6f74650e160a182eb8855fb5ddb601000200', 'hex')); --setAdvertisingData(new Buffer('0201061aff4c000215b9407f30f5f8466eaff925556b57fe6d00010002b6', 'hex')); -+setScanResponseData(Buffer.from('0909657374696d6f74650e160a182eb8855fb5ddb601000200', 'hex')); -+setAdvertisingData(Buffer.from('0201061aff4c000215b9407f30f5f8466eaff925556b57fe6d00010002b6', 'hex')); - setAdvertiseEnable(true); ---- a/examples/le-connection-test.js -+++ b/examples/le-connection-test.js -@@ -1,74 +1,74 @@ --var BluetoothHciSocket = require('../index'); -+/* eslint-disable no-console */ -+const BluetoothHciSocket = require('../index'); - --var bluetoothHciSocket = new BluetoothHciSocket(); -+const bluetoothHciSocket = new BluetoothHciSocket(); - - bluetoothHciSocket.on('data', function(data) { -- console.log('data: ' + data.toString('hex') + ', ' + data.length + ' bytes'); -+ console.log(`data: ${data.toString('hex')}, ${data.length} bytes`); - - if (data.readUInt8(0) === HCI_EVENT_PKT) { - if (data.readUInt8(1) === EVT_DISCONN_COMPLETE) { -- var status = data.readUInt8(3); -- var handle = data.readUInt16LE(4); -- var reason = data.readUInt8(6); -+ const disconnectionStatus = data.readUInt8(3); -+ const disconnectionHandle = data.readUInt16LE(4); -+ const disconnectionReason = data.readUInt8(6); - - console.log('Disconn Complete'); -- console.log('\t' + status); -- console.log('\t' + handle); -- console.log('\t' + reason); -+ console.log(`\t${disconnectionStatus}`); -+ console.log(`\t${disconnectionHandle}`); -+ console.log(`\t${disconnectionReason}`); - - process.exit(0); - } else if (data.readUInt8(1) === EVT_LE_META_EVENT) { -- if (data.readUInt8(3) === EVT_LE_CONN_COMPLETE) { // subevent -- var status = data.readUInt8(4); -- var handle = data.readUInt16LE(5); -- var role = data.readUInt8(7); -- var peerBdAddrType = data.readUInt8(8); -- var peerBdAddr = data.slice(9, 15); -- var interval = data.readUInt16LE(15); -- var latency = data.readUInt16LE(17); -- var supervisionTimeout = data.readUInt16LE(19); -- var masterClockAccuracy = data.readUInt8(21); -+ const subEvent = data.readUInt8(3); -+ const status = data.readUInt8(4); -+ const handle = data.readUInt16LE(5); -+ if (subEvent === EVT_LE_CONN_COMPLETE) { // subevent -+ const role = data.readUInt8(7); -+ const peerBdAddrType = data.readUInt8(8); -+ const peerBdAddr = data.slice(9, 15); -+ const interval = data.readUInt16LE(15); -+ const latency = data.readUInt16LE(17); -+ const supervisionTimeout = data.readUInt16LE(19); -+ const masterClockAccuracy = data.readUInt8(21); - - console.log('LE Connection Complete'); -- console.log('\t' + status); -- console.log('\t' + handle); -- console.log('\t' + role); -- console.log('\t' + ['PUBLIC', 'RANDOM'][peerBdAddrType]); -- console.log('\t' + peerBdAddr.toString('hex').match(/.{1,2}/g).reverse().join(':')); -- console.log('\t' + interval * 1.25); -- console.log('\t' + latency); -- console.log('\t' + supervisionTimeout * 10); -- console.log('\t' + masterClockAccuracy); -- } else if (data.readUInt8(3) === EVT_LE_CONN_UPDATE_COMPLETE) { -- var status = data.readUInt8(4); -- var handle = data.readUInt16LE(5); -- var interval = data.readUInt16LE(7); -- var latency = data.readUInt16LE(9); -- var supervisionTimeout = data.readUInt16LE(11); -+ console.log(`\t${status}`); -+ console.log(`\t${handle}`); -+ console.log(`\t${role}`); -+ console.log(`\t${['PUBLIC', 'RANDOM'][peerBdAddrType]}`); -+ console.log(`\t${peerBdAddr.toString('hex').match(/.{1,2}/g).reverse().join(':')}`); -+ console.log(`\t${interval * 1.25}`); -+ console.log(`\t${latency}`); -+ console.log(`\t${supervisionTimeout * 10}`); -+ console.log(`\t${masterClockAccuracy}`); -+ } else if (subEvent === EVT_LE_CONN_UPDATE_COMPLETE) { -+ const updateInterval = data.readUInt16LE(7); -+ const updateLatency = data.readUInt16LE(9); -+ const updateSupervisionTimeout = data.readUInt16LE(11); - - console.log('LE Connection Update Complete'); -- console.log('\t' + status); -- console.log('\t' + handle); -+ console.log(`\t${status}`); -+ console.log(`\t${handle}`); - -- console.log('\t' + interval * 1.25); -- console.log('\t' + latency); -- console.log('\t' + supervisionTimeout * 10); -+ console.log(`\t${updateInterval * 1.25}`); -+ console.log(`\t${updateLatency}`); -+ console.log(`\t${updateSupervisionTimeout * 10}`); - -- writeHandle(handle, new Buffer('020001', 'hex')); -+ writeHandle(handle, Buffer.from('020001', 'hex')); - } - } - } else if (data.readUInt8(0) === HCI_ACLDATA_PKT) { - if ( ((data.readUInt16LE(1) >> 12) === ACL_START) && - (data.readUInt16LE(7) === ATT_CID) ) { - -- var handle = data.readUInt16LE(1) & 0x0fff; -- var data = data.slice(9); -+ const aclHandle = data.readUInt16LE(1) & 0x0fff; -+ const aclData = data.slice(9); - - console.log('ACL data'); -- console.log('\t' + handle); -- console.log('\t' + data.toString('hex')); -+ console.log(`\t${aclHandle}`); -+ console.log(`\t${aclData.toString('hex')}`); - -- disconnectConnection(handle, HCI_OE_USER_ENDED_CONNECTION); -+ disconnectConnection(aclHandle, HCI_OE_USER_ENDED_CONNECTION); - } - } - }); -@@ -83,40 +83,38 @@ bluetoothHciSocket.on('error', function( - } - }); - --var HCI_COMMAND_PKT = 0x01; --var HCI_ACLDATA_PKT = 0x02; --var HCI_EVENT_PKT = 0x04; -+const HCI_COMMAND_PKT = 0x01; -+const HCI_ACLDATA_PKT = 0x02; -+const HCI_EVENT_PKT = 0x04; - --var ACL_START = 0x02; -+const ACL_START = 0x02; - --var ATT_CID = 0x0004; -+const ATT_CID = 0x0004; - --var EVT_DISCONN_COMPLETE = 0x05; --var EVT_CMD_COMPLETE = 0x0e; --var EVT_CMD_STATUS = 0x0f; --var EVT_LE_META_EVENT = 0x3e; -+const EVT_DISCONN_COMPLETE = 0x05; -+const EVT_CMD_COMPLETE = 0x0e; -+const EVT_CMD_STATUS = 0x0f; -+const EVT_LE_META_EVENT = 0x3e; - --var EVT_LE_CONN_COMPLETE = 0x01; --var EVT_LE_CONN_UPDATE_COMPLETE = 0x03; -+const EVT_LE_CONN_COMPLETE = 0x01; -+const EVT_LE_CONN_UPDATE_COMPLETE = 0x03; - --var OGF_LE_CTL = 0x08; --var OCF_LE_CREATE_CONN = 0x000d; -+const OGF_LE_CTL = 0x08; -+const OCF_LE_CREATE_CONN = 0x000d; - --var OGF_LINK_CTL = 0x01; --var OCF_DISCONNECT = 0x0006; -+const OGF_LINK_CTL = 0x01; -+const OCF_DISCONNECT = 0x0006; - --var LE_CREATE_CONN_CMD = OCF_LE_CREATE_CONN | OGF_LE_CTL << 10; --var DISCONNECT_CMD = OCF_DISCONNECT | OGF_LINK_CTL << 10; -+const LE_CREATE_CONN_CMD = OCF_LE_CREATE_CONN | OGF_LE_CTL << 10; -+const DISCONNECT_CMD = OCF_DISCONNECT | OGF_LINK_CTL << 10; - --var HCI_SUCCESS = 0; --var HCI_OE_USER_ENDED_CONNECTION = 0x13; -+const HCI_OE_USER_ENDED_CONNECTION = 0x13; - - function setFilter() { -- var filter = new Buffer(14); -- var typeMask = (1 << HCI_EVENT_PKT) | (1 << HCI_ACLDATA_PKT); -- var eventMask1 = (1 << EVT_DISCONN_COMPLETE) | (1 << EVT_CMD_COMPLETE) | (1 << EVT_CMD_STATUS); -- var eventMask2 = (1 << (EVT_LE_META_EVENT - 32)); -- var opcode = 0; -+ const filter = Buffer.alloc(14); -+ const typeMask = (1 << HCI_EVENT_PKT) | (1 << HCI_ACLDATA_PKT); -+ const eventMask1 = (1 << EVT_DISCONN_COMPLETE) | (1 << EVT_CMD_COMPLETE) | (1 << EVT_CMD_STATUS); -+ const eventMask2 = (1 << (EVT_LE_META_EVENT - 32)); - - filter.writeUInt32LE(typeMask, 0); - filter.writeUInt32LE(eventMask1, 4); -@@ -131,7 +129,7 @@ setFilter(); - bluetoothHciSocket.start(); - - function createConnection(address, addressType) { -- var cmd = new Buffer(29); -+ const cmd = Buffer.alloc(29); - - // header - cmd.writeUInt8(HCI_COMMAND_PKT, 0); -@@ -146,7 +144,7 @@ function createConnection(address, addre - cmd.writeUInt8(0x00, 8); // initiator filter - - cmd.writeUInt8(addressType === 'random' ? 0x01 : 0x00, 9); // peer address type -- (new Buffer(address.split(':').reverse().join(''), 'hex')).copy(cmd, 10); // peer address -+ Buffer.from(address.split(':').reverse().join(''), 'hex').copy(cmd, 10); // peer address - - cmd.writeUInt8(0x00, 16); // own address type - -@@ -161,7 +159,7 @@ function createConnection(address, addre - } - - function writeHandle(handle, data) { -- var cmd = new Buffer(9 + data.length); -+ const cmd = Buffer.alloc(9 + data.length); - - // header - cmd.writeUInt8(HCI_ACLDATA_PKT, 0); -@@ -176,7 +174,7 @@ function writeHandle(handle, data) { - } - - function disconnectConnection(handle, reason) { -- var cmd = new Buffer(7); -+ const cmd = Buffer.alloc(7); - - // header - cmd.writeUInt8(HCI_COMMAND_PKT, 0); ---- a/examples/le-scan-test.js -+++ b/examples/le-scan-test.js -@@ -1,9 +1,10 @@ --var BluetoothHciSocket = require('../index'); -+/* eslint-disable no-console */ -+const BluetoothHciSocket = require('../index'); - --var bluetoothHciSocket = new BluetoothHciSocket(); -+const bluetoothHciSocket = new BluetoothHciSocket(); - - bluetoothHciSocket.on('data', function(data) { -- console.log('data: ' + data.toString('hex')); -+ console.log(`data: ${data.toString('hex')}`); - - if (data.readUInt8(0) === HCI_EVENT_PKT) { - if (data.readUInt8(1) === EVT_CMD_COMPLETE) { -@@ -18,19 +19,19 @@ bluetoothHciSocket.on('data', function(d - } - } else if (data.readUInt8(1) === EVT_LE_META_EVENT) { - if (data.readUInt8(3) === EVT_LE_ADVERTISING_REPORT) { // subevent -- var gapAdvType = data.readUInt8(5); -- var gapAddrType = data.readUInt8(6); -- var gapAddr = data.slice(7, 13); -+ const gapAdvType = data.readUInt8(5); -+ const gapAddrType = data.readUInt8(6); -+ const gapAddr = data.slice(7, 13); - -- var eir = data.slice(14, data.length - 1); -- var rssi = data.readInt8(data.length - 1); -+ const eir = data.slice(14, data.length - 1); -+ const rssi = data.readInt8(data.length - 1); - - console.log('LE Advertising Report'); -- console.log('\t' + ['ADV_IND', 'ADV_DIRECT_IND', 'ADV_SCAN_IND', 'ADV_NONCONN_IND', 'SCAN_RSP'][gapAdvType]); -- console.log('\t' + ['PUBLIC', 'RANDOM'][gapAddrType]); -- console.log('\t' + gapAddr.toString('hex').match(/.{1,2}/g).reverse().join(':')); -- console.log('\t' + eir.toString('hex')); -- console.log('\t' + rssi); -+ console.log(`\t${['ADV_IND', 'ADV_DIRECT_IND', 'ADV_SCAN_IND', 'ADV_NONCONN_IND', 'SCAN_RSP'][gapAdvType]}`); -+ console.log(`\t${['PUBLIC', 'RANDOM'][gapAddrType]}`); -+ console.log(`\t${gapAddr.toString('hex').match(/.{1,2}/g).reverse().join(':')}`); -+ console.log(`\t${eir.toString('hex')}`); -+ console.log(`\t${rssi}`); - } - } - } -@@ -48,32 +49,31 @@ bluetoothHciSocket.on('error', function( - } - }); - --var HCI_COMMAND_PKT = 0x01; --var HCI_ACLDATA_PKT = 0x02; --var HCI_EVENT_PKT = 0x04; -+const HCI_COMMAND_PKT = 0x01; -+const HCI_EVENT_PKT = 0x04; - --var EVT_CMD_COMPLETE = 0x0e; --var EVT_CMD_STATUS = 0x0f; --var EVT_LE_META_EVENT = 0x3e; -+const EVT_CMD_COMPLETE = 0x0e; -+const EVT_CMD_STATUS = 0x0f; -+const EVT_LE_META_EVENT = 0x3e; - --var EVT_LE_ADVERTISING_REPORT = 0x02; -+const EVT_LE_ADVERTISING_REPORT = 0x02; - --var OGF_LE_CTL = 0x08; --var OCF_LE_SET_SCAN_PARAMETERS = 0x000b; --var OCF_LE_SET_SCAN_ENABLE = 0x000c; -+const OGF_LE_CTL = 0x08; -+const OCF_LE_SET_SCAN_PARAMETERS = 0x000b; -+const OCF_LE_SET_SCAN_ENABLE = 0x000c; - - --var LE_SET_SCAN_PARAMETERS_CMD = OCF_LE_SET_SCAN_PARAMETERS | OGF_LE_CTL << 10; --var LE_SET_SCAN_ENABLE_CMD = OCF_LE_SET_SCAN_ENABLE | OGF_LE_CTL << 10; -+const LE_SET_SCAN_PARAMETERS_CMD = OCF_LE_SET_SCAN_PARAMETERS | OGF_LE_CTL << 10; -+const LE_SET_SCAN_ENABLE_CMD = OCF_LE_SET_SCAN_ENABLE | OGF_LE_CTL << 10; - --var HCI_SUCCESS = 0; -+const HCI_SUCCESS = 0; - - function setFilter() { -- var filter = new Buffer(14); -- var typeMask = (1 << HCI_EVENT_PKT); -- var eventMask1 = (1 << EVT_CMD_COMPLETE) | (1 << EVT_CMD_STATUS); -- var eventMask2 = (1 << (EVT_LE_META_EVENT - 32)); -- var opcode = 0; -+ const filter = Buffer.alloc(14); -+ const typeMask = (1 << HCI_EVENT_PKT); -+ const eventMask1 = (1 << EVT_CMD_COMPLETE) | (1 << EVT_CMD_STATUS); -+ const eventMask2 = (1 << (EVT_LE_META_EVENT - 32)); -+ const opcode = 0; - - filter.writeUInt32LE(typeMask, 0); - filter.writeUInt32LE(eventMask1, 4); -@@ -84,7 +84,7 @@ function setFilter() { - } - - function setScanParameters() { -- var cmd = new Buffer(11); -+ const cmd = Buffer.alloc(11); - - // header - cmd.writeUInt8(HCI_COMMAND_PKT, 0); -@@ -104,7 +104,7 @@ function setScanParameters() { - } - - function setScanEnable(enabled, duplicates) { -- var cmd = new Buffer(6); -+ const cmd = Buffer.alloc(6); - - // header - cmd.writeUInt8(HCI_COMMAND_PKT, 0); ---- a/examples/list-devices-test.js -+++ b/examples/list-devices-test.js -@@ -1,9 +1,10 @@ --var UsbBluetoothHciSocket = require('../lib/usb'); --var usbBluetoothHciSocket = new UsbBluetoothHciSocket(); --var usbDevices = usbBluetoothHciSocket.getDeviceList(); --console.log("usbDevices: ", usbDevices); -+/* eslint-disable no-console */ -+const UsbBluetoothHciSocket = require('../lib/usb'); -+const usbBluetoothHciSocket = new UsbBluetoothHciSocket(); -+const usbDevices = usbBluetoothHciSocket.getDeviceList(); -+console.log('usbDevices: ', usbDevices); - --var NativeBluetoothHciSocket = require('../lib/native'); --var nativeBluetoothHciSocket = new NativeBluetoothHciSocket(); --var nativeDevices = nativeBluetoothHciSocket.getDeviceList(); --console.log("nativeDevices: ", nativeDevices); -\ No newline at end of file -+const NativeBluetoothHciSocket = require('../lib/native'); -+const nativeBluetoothHciSocket = new NativeBluetoothHciSocket(); -+const nativeDevices = nativeBluetoothHciSocket.getDeviceList(); -+console.log('nativeDevices: ', nativeDevices); ---- a/examples/mgmt-test.js -+++ b/examples/mgmt-test.js -@@ -1,8 +1,9 @@ --var BluetoothHciSocket = require('../index'); -+/* eslint-disable no-console */ -+const BluetoothHciSocket = require('../index'); - --var bluetoothHciSocket = new BluetoothHciSocket(); -+const bluetoothHciSocket = new BluetoothHciSocket(); - --var STATUS_MAPPER = [ -+const STATUS_MAPPER = [ - 'success', - 'unknown command', - 'not connected', -@@ -26,35 +27,34 @@ var STATUS_MAPPER = [ - 'permission denied' - ]; - --var MGMT_INDEX_NONE = 0xFFFF; -+const MGMT_INDEX_NONE = 0xFFFF; - --var MGMT_OP_READ_VERSION = 0x0001; --var MGMT_OP_LOAD_LONG_TERM_KEYS = 0x0013; -+const MGMT_OP_READ_VERSION = 0x0001; - - bluetoothHciSocket.on('data', function(data) { -- console.log('on -> data: ' + data.toString('hex')); -+ console.log(`on -> data: ${data.toString('hex')}`); - -- var index = data.readUInt16LE(2); -- var length = data.readUInt16LE(4); -- var opcode = data.readUInt16LE(6); -- var status = data.readUInt8(8); -- -- console.log('\tindex = ' + index); -- console.log('\tlength = ' + length); -- console.log('\topcode = ' + opcode); -- console.log('\tstatus = ' + status + ' (' + STATUS_MAPPER[status] + ')'); -+ const index = data.readUInt16LE(2); -+ const length = data.readUInt16LE(4); -+ const opcode = data.readUInt16LE(6); -+ const status = data.readUInt8(8); -+ -+ console.log(`\tindex = ${index}`); -+ console.log(`\tlength = ${length}`); -+ console.log(`\topcode = ${opcode}`); -+ console.log(`\tstatus = ${status} (${STATUS_MAPPER[status]})`); - - data = data.slice(9); - - if (data.length) { - if (opcode === MGMT_OP_READ_VERSION) { -- var version = data.readUInt8(0); -- var revision = data.readUInt16LE(1); -+ const version = data.readUInt8(0); -+ const revision = data.readUInt16LE(1); - -- console.log('\t\tversion = ' + version); -- console.log('\t\trevision = ' + revision); -+ console.log(`\t\tversion = ${version}`); -+ console.log(`\t\trevision = ${revision}`); - } else { -- console.log('\t\tdata = ' + data.toString('hex')); -+ console.log(`\t\tdata = ${data.toString('hex')}`); - } - } - -@@ -62,17 +62,17 @@ bluetoothHciSocket.on('data', function(d - }); - - bluetoothHciSocket.on('error', function(error) { -- console.log('on -> error: ' + error.message); -+ console.log(`on -> error: ${error.message}`); - }); - - function write(opcode, index, data) { -- var length = 0; -+ let length = 0; - - if (data) { - length += data.length; - } - -- var pkt = new Buffer(6 + length); -+ const pkt = Buffer.alloc(6 + length); - - pkt.writeUInt16LE(opcode, 0); - pkt.writeUInt16LE(index, 2); -@@ -82,7 +82,7 @@ function write(opcode, index, data) { - data.copy(pkt, 6); - } - -- console.log('writing -> ' + pkt.toString('hex')); -+ console.log(`writing -> ${pkt.toString('hex')}`); - bluetoothHciSocket.write(pkt); - } - ---- a/lib/native.js -+++ b/lib/native.js -@@ -1,19 +1,13 @@ --var events = require('events'); -+const events = require('events'); - --var binary = require('node-pre-gyp'); --var path = require('path'); --var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json'))); --var binding = require(binding_path); -+const binary = require('node-pre-gyp'); -+const path = require('path'); -+const util = require('util'); -+const binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json'))); -+const binding = require(binding_path); - --var BluetoothHciSocket = binding.BluetoothHciSocket; -+const BluetoothHciSocket = binding.BluetoothHciSocket; - --inherits(BluetoothHciSocket, events.EventEmitter); -- --// extend prototype --function inherits(target, source) { -- for (var k in source.prototype) { -- target.prototype[k] = source.prototype[k]; -- } --} -+util.inherits(BluetoothHciSocket, events.EventEmitter); - - module.exports = BluetoothHciSocket; ---- a/lib/usb.js -+++ b/lib/usb.js -@@ -1,17 +1,16 @@ --var events = require('events'); --var util = require('util'); -+const events = require('events'); - --var debug = require('debug')('hci-usb'); --var usb = require('usb'); -+const debug = require('debug')('hci-usb'); -+const usb = require('usb'); - --var HCI_COMMAND_PKT = 0x01; --var HCI_ACLDATA_PKT = 0x02; --var HCI_EVENT_PKT = 0x04; -+const HCI_COMMAND_PKT = 0x01; -+const HCI_ACLDATA_PKT = 0x02; -+const HCI_EVENT_PKT = 0x04; - --var OGF_HOST_CTL = 0x03; --var OCF_RESET = 0x0003; -+const OGF_HOST_CTL = 0x03; -+const OCF_RESET = 0x0003; - --var VENDOR_DEVICE_LIST = [ -+const VENDOR_DEVICE_LIST = [ - {vid: 0x0CF3, pid: 0xE300 }, // Qualcomm Atheros QCA61x4 - {vid: 0x0a5c, pid: 0x21e8 }, // Broadcom BCM20702A0 - {vid: 0x19ff, pid: 0x0239 }, // Broadcom BCM20702A0 -@@ -26,223 +25,227 @@ var VENDOR_DEVICE_LIST = [ - {vid: 0x050D, pid: 0x065A }, // Belkin BCM20702A0 - ]; - --function BluetoothHciSocket() { -- this._isUp = false; -+class BluetoothHciSocket extends events.EventEmitter { -+ constructor() { -+ super(); -+ this._isUp = false; - -- this._hciEventEndpointBuffer = new Buffer(0); -- this._aclDataInEndpointBuffer = new Buffer(0); --} -- --util.inherits(BluetoothHciSocket, events.EventEmitter); -+ this._hciEventEndpointBuffer = Buffer.alloc(0); -+ this._aclDataInEndpointBuffer = Buffer.alloc(0); -+ } - --BluetoothHciSocket.prototype.setFilter = function(filter) { -- // no-op --}; -+ // eslint-disable-next-line no-unused-vars -+ setFilter(filter) { -+ // no-op -+ } - --BluetoothHciSocket.prototype.bindRaw = function(devId) { -- this.bindUser(devId); -+ bindRaw(devId) { -+ this.bindUser(devId); - -- this._mode = 'raw'; -+ this._mode = 'raw'; - -- this.reset(); --}; -+ this.reset(); -+ } - --BluetoothHciSocket.prototype.bindUser = function(devId) { -- this._mode = 'user'; -+ // FIXME: devId doesn't seem to be used anywhere, here or the C++ binding -+ // eslint-disable-next-line no-unused-vars -+ bindUser(devId) { -+ this._mode = 'user'; - -- if (process.env.BLUETOOTH_HCI_SOCKET_USB_VID && process.env.BLUETOOTH_HCI_SOCKET_USB_PID) { -- var usbVid = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_VID); -- var usbPid = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_PID); -+ if (process.env.BLUETOOTH_HCI_SOCKET_USB_VID && process.env.BLUETOOTH_HCI_SOCKET_USB_PID) { -+ const usbVid = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_VID); -+ const usbPid = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_PID); - -- debug('using USB VID = ' + usbVid + ', PID = ' + usbPid); -+ debug(`using USB VID = ${usbVid}, PID = ${usbPid}`); - -- if (process.env.BLUETOOTH_HCI_SOCKET_USB_BUS && process.env.BLUETOOTH_HCI_SOCKET_USB_ADDRESS) { -- var usbBus = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_BUS); -- var usbAddress = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_ADDRESS); -+ if (process.env.BLUETOOTH_HCI_SOCKET_USB_BUS && process.env.BLUETOOTH_HCI_SOCKET_USB_ADDRESS) { -+ const usbBus = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_BUS); -+ const usbAddress = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_ADDRESS); - -- debug('using USB BUS = ' + usbBus + ', Address = ' + usbAddress); -+ debug(`using USB BUS = ${usbBus}, Address = ${usbAddress}`); - -- var usbDevices = usb.getDeviceList(); -+ const usbDevices = usb.getDeviceList(); - -- for (var i = 0; i < usbDevices.length; i++) { -- var usbDeviceDesc = usbDevices[i].deviceDescriptor; -+ for (let i = 0; i < usbDevices.length; i++) { -+ const usbDeviceDesc = usbDevices[i].deviceDescriptor; - -- if ((usbDeviceDesc.idVendor == usbVid) && -- (usbDeviceDesc.idProduct == usbPid) && -- (usbDevices[i].busNumber == usbBus) && -- (usbDevices[i].deviceAddress == usbAddress)) { -- this._usbDevice = usbDevices[i]; -+ if ((usbDeviceDesc.idVendor === usbVid) && -+ (usbDeviceDesc.idProduct === usbPid) && -+ (usbDevices[i].busNumber === usbBus) && -+ (usbDevices[i].deviceAddress === usbAddress)) { -+ this._usbDevice = usbDevices[i]; -+ } - } -+ } else { -+ this._usbDevice = usb.findByIds(usbVid, usbPid); - } - } else { -- this._usbDevice = usb.findByIds(usbVid, usbPid); -+ this._usbDevice = VENDOR_DEVICE_LIST -+ .map(d => usb.findByIds(d.vid, d.pid)) -+ .find(d => d !== undefined); - } -- } else { -- this._usbDevice = VENDOR_DEVICE_LIST -- .map(d => usb.findByIds(d.vid, d.pid)) -- .find(d => d != null); -- } -- -- if (!this._usbDevice) { -- throw new Error('No compatible USB Bluetooth 4.0 device found!'); -- } - -- this._usbDevice.open(); -- -- this._usbDeviceInterface = this._usbDevice.interfaces[0]; -- -- this._aclDataOutEndpoint = this._usbDeviceInterface.endpoint(0x02); -- -- this._hciEventEndpoint = this._usbDeviceInterface.endpoint(0x81); -- this._aclDataInEndpoint = this._usbDeviceInterface.endpoint(0x82); -- -- this._usbDeviceInterface.claim(); --}; -+ if (!this._usbDevice) { -+ throw new Error('No compatible USB Bluetooth 4.0 device found!'); -+ } - --BluetoothHciSocket.prototype.getDeviceList = function() { -- return usb.getDeviceList() -- .filter(dev => { -- return VENDOR_DEVICE_LIST.findIndex(d => { -- return dev.deviceDescriptor.idVendor == d.vid && dev.deviceDescriptor.idProduct == d.pid; -- }) !== -1; -- }) -- .map(dev => ({ -- "devId": null, -- "devUp": null, -- "idVendor": dev.deviceDescriptor.idVendor, -- "idProduct": dev.deviceDescriptor.idProduct, -- "busNumber": dev.busNumber, -- "deviceAddress": dev.deviceAddress, -- })); --} -+ this._usbDevice.open(); - --BluetoothHciSocket.prototype.bindControl = function() { -- this._mode = 'control'; --}; -+ this._usbDeviceInterface = this._usbDevice.interfaces[0]; - --BluetoothHciSocket.prototype.isDevUp = function() { -- return this._isUp; --}; -+ this._aclDataOutEndpoint = this._usbDeviceInterface.endpoint(0x02); - --BluetoothHciSocket.prototype.start = function() { -- if (this._mode === 'raw' || this._mode === 'user') { -- this._hciEventEndpoint.on('data', this.onHciEventEndpointData.bind(this)); -- this._hciEventEndpoint.startPoll(); -+ this._hciEventEndpoint = this._usbDeviceInterface.endpoint(0x81); -+ this._aclDataInEndpoint = this._usbDeviceInterface.endpoint(0x82); - -- this._aclDataInEndpoint.on('data', this.onAclDataInEndpointData.bind(this)); -- this._aclDataInEndpoint.startPoll(); -+ this._usbDeviceInterface.claim(); - } --}; - --BluetoothHciSocket.prototype.stop = function() { -- if (this._mode === 'raw' || this._mode === 'user') { -- this._hciEventEndpoint.stopPoll(); -- this._hciEventEndpoint.removeAllListeners(); -+ getDeviceList() { -+ return usb.getDeviceList() -+ .filter(dev => { -+ return VENDOR_DEVICE_LIST.findIndex(d => { -+ return dev.deviceDescriptor.idVendor === d.vid && dev.deviceDescriptor.idProduct === d.pid; -+ }) !== -1; -+ }) -+ .map(dev => ({ -+ 'devId': null, -+ 'devUp': null, -+ 'idVendor': dev.deviceDescriptor.idVendor, -+ 'idProduct': dev.deviceDescriptor.idProduct, -+ 'busNumber': dev.busNumber, -+ 'deviceAddress': dev.deviceAddress, -+ })); -+ } - -- this._aclDataInEndpoint.stopPoll(); -- this._aclDataInEndpoint.removeAllListeners(); -+ bindControl() { -+ this._mode = 'control'; - } --}; - --BluetoothHciSocket.prototype.write = function(data) { -- debug('write: ' + data.toString('hex')); -+ isDevUp() { -+ return this._isUp; -+ } - -- if (this._mode === 'raw' || this._mode === 'user') { -- var type = data.readUInt8(0); -+ start() { -+ if (this._mode === 'raw' || this._mode === 'user') { -+ this._hciEventEndpoint.on('data', this.onHciEventEndpointData.bind(this)); -+ this._hciEventEndpoint.startPoll(); - -- if (HCI_COMMAND_PKT === type) { -- this._usbDevice.controlTransfer(usb.LIBUSB_REQUEST_TYPE_CLASS | usb.LIBUSB_RECIPIENT_INTERFACE, 0, 0, 0, data.slice(1), function() {}); -- } else if(HCI_ACLDATA_PKT === type) { -- this._aclDataOutEndpoint.transfer(data.slice(1)); -+ this._aclDataInEndpoint.on('data', this.onAclDataInEndpointData.bind(this)); -+ this._aclDataInEndpoint.startPoll(); - } - } --}; - --BluetoothHciSocket.prototype.onHciEventEndpointData = function(data) { -- debug('HCI event: ' + data.toString('hex')); -+ stop() { -+ if (this._mode === 'raw' || this._mode === 'user') { -+ this._hciEventEndpoint.stopPoll(); -+ this._hciEventEndpoint.removeAllListeners(); - -- if (data.length === 0) { -- return; -+ this._aclDataInEndpoint.stopPoll(); -+ this._aclDataInEndpoint.removeAllListeners(); -+ } - } - -- // add to buffer -- this._hciEventEndpointBuffer = Buffer.concat([ -- this._hciEventEndpointBuffer, -- data -- ]); -+ write(data) { -+ debug(`write: ${data.toString('hex')}`); - -- if (this._hciEventEndpointBuffer.length < 2) { -- return; -- } -+ if (this._mode === 'raw' || this._mode === 'user') { -+ const type = data.readUInt8(0); - -- // check if desired length -- var pktLen = this._hciEventEndpointBuffer.readUInt8(1); -- if (pktLen <= (this._hciEventEndpointBuffer.length - 2)) { -+ if (HCI_COMMAND_PKT === type) { -+ this._usbDevice.controlTransfer(usb.LIBUSB_REQUEST_TYPE_CLASS | usb.LIBUSB_RECIPIENT_INTERFACE, 0, 0, 0, data.slice(1), function() {}); -+ } else if(HCI_ACLDATA_PKT === type) { -+ this._aclDataOutEndpoint.transfer(data.slice(1)); -+ } -+ } -+ } - -- var buf = this._hciEventEndpointBuffer.slice(0, pktLen + 2); -+ onHciEventEndpointData(data) { -+ debug(`HCI event: ${data.toString('hex')}`); - -- if (this._mode === 'raw' && buf.length === 6 && ('0e0401030c00' === buf.toString('hex') || '0e0402030c00' === buf.toString('hex'))) { -- debug('reset complete'); -- this._isUp = true; -+ if (data.length === 0) { -+ return; - } - -- // fire event -- this.emit('data', Buffer.concat([ -- new Buffer([HCI_EVENT_PKT]), -- buf -- ])); -+ // add to buffer -+ this._hciEventEndpointBuffer = Buffer.concat([ -+ this._hciEventEndpointBuffer, -+ data -+ ]); - -- // reset buffer -- this._hciEventEndpointBuffer = this._hciEventEndpointBuffer.slice(pktLen + 2); -- } --}; -+ if (this._hciEventEndpointBuffer.length < 2) { -+ return; -+ } -+ -+ // check if desired length -+ const pktLen = this._hciEventEndpointBuffer.readUInt8(1); -+ if (pktLen <= (this._hciEventEndpointBuffer.length - 2)) { -+ -+ const buf = this._hciEventEndpointBuffer.slice(0, pktLen + 2); -+ -+ if (this._mode === 'raw' && buf.length === 6 && ('0e0401030c00' === buf.toString('hex') || '0e0402030c00' === buf.toString('hex'))) { -+ debug('reset complete'); -+ this._isUp = true; -+ } - --BluetoothHciSocket.prototype.onAclDataInEndpointData = function(data) { -- debug('ACL Data In: ' + data.toString('hex')); -+ // fire event -+ this.emit('data', Buffer.concat([ -+ Buffer.from([HCI_EVENT_PKT]), -+ buf -+ ])); - -- if (data.length === 0) { -- return; -+ // reset buffer -+ this._hciEventEndpointBuffer = this._hciEventEndpointBuffer.slice(pktLen + 2); -+ } - } - -- // add to buffer -- this._aclDataInEndpointBuffer = Buffer.concat([ -- this._aclDataInEndpointBuffer, -- data -- ]); -+ onAclDataInEndpointData(data) { -+ debug(`ACL Data In: ${data.toString('hex')}`); - -- if (this._aclDataInEndpointBuffer.length < 4) { -- return; -- } -+ if (data.length === 0) { -+ return; -+ } - -- // check if desired length -- var pktLen = this._aclDataInEndpointBuffer.readUInt16LE(2); -- if (pktLen <= (this._aclDataInEndpointBuffer.length - 4)) { -+ // add to buffer -+ this._aclDataInEndpointBuffer = Buffer.concat([ -+ this._aclDataInEndpointBuffer, -+ data -+ ]); - -- var buf = this._aclDataInEndpointBuffer.slice(0, pktLen + 4); -+ if (this._aclDataInEndpointBuffer.length < 4) { -+ return; -+ } - -- // fire event -- this.emit('data', Buffer.concat([ -- new Buffer([HCI_ACLDATA_PKT]), -- buf -- ])); -+ // check if desired length -+ const pktLen = this._aclDataInEndpointBuffer.readUInt16LE(2); -+ if (pktLen <= (this._aclDataInEndpointBuffer.length - 4)) { -+ -+ const buf = this._aclDataInEndpointBuffer.slice(0, pktLen + 4); -+ -+ // fire event -+ this.emit('data', Buffer.concat([ -+ Buffer.from([HCI_ACLDATA_PKT]), -+ buf -+ ])); - -- // reset buffer -- this._aclDataInEndpointBuffer = this._aclDataInEndpointBuffer.slice(pktLen + 4); -+ // reset buffer -+ this._aclDataInEndpointBuffer = this._aclDataInEndpointBuffer.slice(pktLen + 4); -+ } - } --}; - --BluetoothHciSocket.prototype.reset = function() { -- var cmd = new Buffer(4); -+ reset() { -+ const cmd = Buffer.alloc(4); - -- // header -- cmd.writeUInt8(HCI_COMMAND_PKT, 0); -- cmd.writeUInt16LE(OCF_RESET | OGF_HOST_CTL << 10, 1); -+ // header -+ cmd.writeUInt8(HCI_COMMAND_PKT, 0); -+ cmd.writeUInt16LE(OCF_RESET | OGF_HOST_CTL << 10, 1); - -- // length -- cmd.writeUInt8(0x00, 3); -+ // length -+ cmd.writeUInt8(0x00, 3); - -- debug('reset'); -- this.write(cmd); --}; -+ debug('reset'); -+ this.write(cmd); -+ } -+} - - module.exports = BluetoothHciSocket; ---- /dev/null -+++ b/package-lock.json -@@ -0,0 +1,1571 @@ -+{ -+ "name": "bluetooth-hci-socket", -+ "version": "0.5.2", -+ "lockfileVersion": 1, -+ "requires": true, -+ "dependencies": { -+ "abbrev": { -+ "version": "1.1.1", -+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", -+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" -+ }, -+ "acorn": { -+ "version": "5.7.1", -+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", -+ "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", -+ "dev": true -+ }, -+ "acorn-jsx": { -+ "version": "4.1.1", -+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", -+ "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", -+ "dev": true, -+ "requires": { -+ "acorn": "^5.0.3" -+ } -+ }, -+ "ajv": { -+ "version": "6.5.2", -+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", -+ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", -+ "dev": true, -+ "requires": { -+ "fast-deep-equal": "^2.0.1", -+ "fast-json-stable-stringify": "^2.0.0", -+ "json-schema-traverse": "^0.4.1", -+ "uri-js": "^4.2.1" -+ } -+ }, -+ "ajv-keywords": { -+ "version": "3.2.0", -+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", -+ "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", -+ "dev": true -+ }, -+ "ansi-escapes": { -+ "version": "3.1.0", -+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", -+ "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", -+ "dev": true -+ }, -+ "ansi-regex": { -+ "version": "2.1.1", -+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", -+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" -+ }, -+ "ansi-styles": { -+ "version": "2.2.1", -+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", -+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", -+ "dev": true -+ }, -+ "aproba": { -+ "version": "1.2.0", -+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", -+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" -+ }, -+ "are-we-there-yet": { -+ "version": "1.1.5", -+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", -+ "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", -+ "requires": { -+ "delegates": "^1.0.0", -+ "readable-stream": "^2.0.6" -+ } -+ }, -+ "argparse": { -+ "version": "1.0.10", -+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", -+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", -+ "dev": true, -+ "requires": { -+ "sprintf-js": "~1.0.2" -+ } -+ }, -+ "array-union": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", -+ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", -+ "dev": true, -+ "requires": { -+ "array-uniq": "^1.0.1" -+ } -+ }, -+ "array-uniq": { -+ "version": "1.0.3", -+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", -+ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", -+ "dev": true -+ }, -+ "arrify": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", -+ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", -+ "dev": true -+ }, -+ "babel-code-frame": { -+ "version": "6.26.0", -+ "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", -+ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", -+ "dev": true, -+ "requires": { -+ "chalk": "^1.1.3", -+ "esutils": "^2.0.2", -+ "js-tokens": "^3.0.2" -+ }, -+ "dependencies": { -+ "chalk": { -+ "version": "1.1.3", -+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", -+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", -+ "dev": true, -+ "requires": { -+ "ansi-styles": "^2.2.1", -+ "escape-string-regexp": "^1.0.2", -+ "has-ansi": "^2.0.0", -+ "strip-ansi": "^3.0.0", -+ "supports-color": "^2.0.0" -+ } -+ } -+ } -+ }, -+ "balanced-match": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", -+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" -+ }, -+ "brace-expansion": { -+ "version": "1.1.11", -+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", -+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", -+ "requires": { -+ "balanced-match": "^1.0.0", -+ "concat-map": "0.0.1" -+ } -+ }, -+ "caller-path": { -+ "version": "0.1.0", -+ "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", -+ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", -+ "dev": true, -+ "requires": { -+ "callsites": "^0.2.0" -+ } -+ }, -+ "callsites": { -+ "version": "0.2.0", -+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", -+ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", -+ "dev": true -+ }, -+ "chalk": { -+ "version": "2.4.1", -+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", -+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", -+ "dev": true, -+ "requires": { -+ "ansi-styles": "^3.2.1", -+ "escape-string-regexp": "^1.0.5", -+ "supports-color": "^5.3.0" -+ }, -+ "dependencies": { -+ "ansi-styles": { -+ "version": "3.2.1", -+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", -+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", -+ "dev": true, -+ "requires": { -+ "color-convert": "^1.9.0" -+ } -+ }, -+ "supports-color": { -+ "version": "5.4.0", -+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", -+ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", -+ "dev": true, -+ "requires": { -+ "has-flag": "^3.0.0" -+ } -+ } -+ } -+ }, -+ "chardet": { -+ "version": "0.4.2", -+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", -+ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", -+ "dev": true -+ }, -+ "chownr": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", -+ "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" -+ }, -+ "circular-json": { -+ "version": "0.3.3", -+ "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", -+ "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", -+ "dev": true -+ }, -+ "cli-cursor": { -+ "version": "2.1.0", -+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", -+ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", -+ "dev": true, -+ "requires": { -+ "restore-cursor": "^2.0.0" -+ } -+ }, -+ "cli-width": { -+ "version": "2.2.0", -+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", -+ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", -+ "dev": true -+ }, -+ "code-point-at": { -+ "version": "1.1.0", -+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", -+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" -+ }, -+ "color-convert": { -+ "version": "1.9.2", -+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", -+ "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", -+ "dev": true, -+ "requires": { -+ "color-name": "1.1.1" -+ } -+ }, -+ "color-name": { -+ "version": "1.1.1", -+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", -+ "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", -+ "dev": true -+ }, -+ "concat-map": { -+ "version": "0.0.1", -+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", -+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" -+ }, -+ "console-control-strings": { -+ "version": "1.1.0", -+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", -+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" -+ }, -+ "core-util-is": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", -+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" -+ }, -+ "cross-spawn": { -+ "version": "6.0.5", -+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", -+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", -+ "dev": true, -+ "requires": { -+ "nice-try": "^1.0.4", -+ "path-key": "^2.0.1", -+ "semver": "^5.5.0", -+ "shebang-command": "^1.2.0", -+ "which": "^1.2.9" -+ } -+ }, -+ "debug": { -+ "version": "3.1.0", -+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", -+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", -+ "requires": { -+ "ms": "2.0.0" -+ } -+ }, -+ "deep-extend": { -+ "version": "0.6.0", -+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", -+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" -+ }, -+ "deep-is": { -+ "version": "0.1.3", -+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", -+ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", -+ "dev": true -+ }, -+ "define-properties": { -+ "version": "1.1.3", -+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", -+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", -+ "dev": true, -+ "requires": { -+ "object-keys": "^1.0.12" -+ } -+ }, -+ "del": { -+ "version": "2.2.2", -+ "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", -+ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", -+ "dev": true, -+ "requires": { -+ "globby": "^5.0.0", -+ "is-path-cwd": "^1.0.0", -+ "is-path-in-cwd": "^1.0.0", -+ "object-assign": "^4.0.1", -+ "pify": "^2.0.0", -+ "pinkie-promise": "^2.0.0", -+ "rimraf": "^2.2.8" -+ } -+ }, -+ "delegates": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", -+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" -+ }, -+ "detect-libc": { -+ "version": "1.0.3", -+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", -+ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" -+ }, -+ "doctrine": { -+ "version": "2.1.0", -+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", -+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", -+ "dev": true, -+ "requires": { -+ "esutils": "^2.0.2" -+ } -+ }, -+ "es-abstract": { -+ "version": "1.12.0", -+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", -+ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", -+ "dev": true, -+ "requires": { -+ "es-to-primitive": "^1.1.1", -+ "function-bind": "^1.1.1", -+ "has": "^1.0.1", -+ "is-callable": "^1.1.3", -+ "is-regex": "^1.0.4" -+ } -+ }, -+ "es-to-primitive": { -+ "version": "1.1.1", -+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", -+ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", -+ "dev": true, -+ "requires": { -+ "is-callable": "^1.1.1", -+ "is-date-object": "^1.0.1", -+ "is-symbol": "^1.0.1" -+ } -+ }, -+ "escape-string-regexp": { -+ "version": "1.0.5", -+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", -+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", -+ "dev": true -+ }, -+ "eslint": { -+ "version": "5.3.0", -+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", -+ "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", -+ "dev": true, -+ "requires": { -+ "ajv": "^6.5.0", -+ "babel-code-frame": "^6.26.0", -+ "chalk": "^2.1.0", -+ "cross-spawn": "^6.0.5", -+ "debug": "^3.1.0", -+ "doctrine": "^2.1.0", -+ "eslint-scope": "^4.0.0", -+ "eslint-utils": "^1.3.1", -+ "eslint-visitor-keys": "^1.0.0", -+ "espree": "^4.0.0", -+ "esquery": "^1.0.1", -+ "esutils": "^2.0.2", -+ "file-entry-cache": "^2.0.0", -+ "functional-red-black-tree": "^1.0.1", -+ "glob": "^7.1.2", -+ "globals": "^11.7.0", -+ "ignore": "^4.0.2", -+ "imurmurhash": "^0.1.4", -+ "inquirer": "^5.2.0", -+ "is-resolvable": "^1.1.0", -+ "js-yaml": "^3.11.0", -+ "json-stable-stringify-without-jsonify": "^1.0.1", -+ "levn": "^0.3.0", -+ "lodash": "^4.17.5", -+ "minimatch": "^3.0.4", -+ "mkdirp": "^0.5.1", -+ "natural-compare": "^1.4.0", -+ "optionator": "^0.8.2", -+ "path-is-inside": "^1.0.2", -+ "pluralize": "^7.0.0", -+ "progress": "^2.0.0", -+ "regexpp": "^2.0.0", -+ "require-uncached": "^1.0.3", -+ "semver": "^5.5.0", -+ "string.prototype.matchall": "^2.0.0", -+ "strip-ansi": "^4.0.0", -+ "strip-json-comments": "^2.0.1", -+ "table": "^4.0.3", -+ "text-table": "^0.2.0" -+ }, -+ "dependencies": { -+ "ansi-regex": { -+ "version": "3.0.0", -+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", -+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", -+ "dev": true -+ }, -+ "strip-ansi": { -+ "version": "4.0.0", -+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", -+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", -+ "dev": true, -+ "requires": { -+ "ansi-regex": "^3.0.0" -+ } -+ } -+ } -+ }, -+ "eslint-scope": { -+ "version": "4.0.0", -+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", -+ "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", -+ "dev": true, -+ "requires": { -+ "esrecurse": "^4.1.0", -+ "estraverse": "^4.1.1" -+ } -+ }, -+ "eslint-utils": { -+ "version": "1.3.1", -+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", -+ "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", -+ "dev": true -+ }, -+ "eslint-visitor-keys": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", -+ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", -+ "dev": true -+ }, -+ "espree": { -+ "version": "4.0.0", -+ "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", -+ "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", -+ "dev": true, -+ "requires": { -+ "acorn": "^5.6.0", -+ "acorn-jsx": "^4.1.1" -+ } -+ }, -+ "esprima": { -+ "version": "4.0.1", -+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", -+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", -+ "dev": true -+ }, -+ "esquery": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", -+ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", -+ "dev": true, -+ "requires": { -+ "estraverse": "^4.0.0" -+ } -+ }, -+ "esrecurse": { -+ "version": "4.2.1", -+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", -+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", -+ "dev": true, -+ "requires": { -+ "estraverse": "^4.1.0" -+ } -+ }, -+ "estraverse": { -+ "version": "4.2.0", -+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", -+ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", -+ "dev": true -+ }, -+ "esutils": { -+ "version": "2.0.2", -+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", -+ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", -+ "dev": true -+ }, -+ "external-editor": { -+ "version": "2.2.0", -+ "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", -+ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", -+ "dev": true, -+ "requires": { -+ "chardet": "^0.4.0", -+ "iconv-lite": "^0.4.17", -+ "tmp": "^0.0.33" -+ } -+ }, -+ "fast-deep-equal": { -+ "version": "2.0.1", -+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", -+ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", -+ "dev": true -+ }, -+ "fast-json-stable-stringify": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", -+ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", -+ "dev": true -+ }, -+ "fast-levenshtein": { -+ "version": "2.0.6", -+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", -+ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", -+ "dev": true -+ }, -+ "figures": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", -+ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", -+ "dev": true, -+ "requires": { -+ "escape-string-regexp": "^1.0.5" -+ } -+ }, -+ "file-entry-cache": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", -+ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", -+ "dev": true, -+ "requires": { -+ "flat-cache": "^1.2.1", -+ "object-assign": "^4.0.1" -+ } -+ }, -+ "flat-cache": { -+ "version": "1.3.0", -+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", -+ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", -+ "dev": true, -+ "requires": { -+ "circular-json": "^0.3.1", -+ "del": "^2.0.2", -+ "graceful-fs": "^4.1.2", -+ "write": "^0.2.1" -+ } -+ }, -+ "fs-minipass": { -+ "version": "1.2.5", -+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", -+ "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", -+ "requires": { -+ "minipass": "^2.2.1" -+ } -+ }, -+ "fs.realpath": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", -+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" -+ }, -+ "function-bind": { -+ "version": "1.1.1", -+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", -+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", -+ "dev": true -+ }, -+ "functional-red-black-tree": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", -+ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", -+ "dev": true -+ }, -+ "gauge": { -+ "version": "2.7.4", -+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", -+ "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", -+ "requires": { -+ "aproba": "^1.0.3", -+ "console-control-strings": "^1.0.0", -+ "has-unicode": "^2.0.0", -+ "object-assign": "^4.1.0", -+ "signal-exit": "^3.0.0", -+ "string-width": "^1.0.1", -+ "strip-ansi": "^3.0.1", -+ "wide-align": "^1.1.0" -+ } -+ }, -+ "glob": { -+ "version": "7.1.2", -+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", -+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", -+ "requires": { -+ "fs.realpath": "^1.0.0", -+ "inflight": "^1.0.4", -+ "inherits": "2", -+ "minimatch": "^3.0.4", -+ "once": "^1.3.0", -+ "path-is-absolute": "^1.0.0" -+ } -+ }, -+ "globals": { -+ "version": "11.7.0", -+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", -+ "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", -+ "dev": true -+ }, -+ "globby": { -+ "version": "5.0.0", -+ "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", -+ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", -+ "dev": true, -+ "requires": { -+ "array-union": "^1.0.1", -+ "arrify": "^1.0.0", -+ "glob": "^7.0.3", -+ "object-assign": "^4.0.1", -+ "pify": "^2.0.0", -+ "pinkie-promise": "^2.0.0" -+ } -+ }, -+ "graceful-fs": { -+ "version": "4.1.11", -+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", -+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", -+ "dev": true -+ }, -+ "has": { -+ "version": "1.0.3", -+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", -+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", -+ "dev": true, -+ "requires": { -+ "function-bind": "^1.1.1" -+ } -+ }, -+ "has-ansi": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", -+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", -+ "dev": true, -+ "requires": { -+ "ansi-regex": "^2.0.0" -+ } -+ }, -+ "has-flag": { -+ "version": "3.0.0", -+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", -+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", -+ "dev": true -+ }, -+ "has-symbols": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", -+ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", -+ "dev": true -+ }, -+ "has-unicode": { -+ "version": "2.0.1", -+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", -+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" -+ }, -+ "iconv-lite": { -+ "version": "0.4.23", -+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", -+ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", -+ "requires": { -+ "safer-buffer": ">= 2.1.2 < 3" -+ } -+ }, -+ "ignore": { -+ "version": "4.0.6", -+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", -+ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", -+ "dev": true -+ }, -+ "ignore-walk": { -+ "version": "3.0.1", -+ "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", -+ "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", -+ "requires": { -+ "minimatch": "^3.0.4" -+ } -+ }, -+ "imurmurhash": { -+ "version": "0.1.4", -+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", -+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", -+ "dev": true -+ }, -+ "inflight": { -+ "version": "1.0.6", -+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", -+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", -+ "requires": { -+ "once": "^1.3.0", -+ "wrappy": "1" -+ } -+ }, -+ "inherits": { -+ "version": "2.0.3", -+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", -+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" -+ }, -+ "ini": { -+ "version": "1.3.5", -+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", -+ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" -+ }, -+ "inquirer": { -+ "version": "5.2.0", -+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", -+ "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", -+ "dev": true, -+ "requires": { -+ "ansi-escapes": "^3.0.0", -+ "chalk": "^2.0.0", -+ "cli-cursor": "^2.1.0", -+ "cli-width": "^2.0.0", -+ "external-editor": "^2.1.0", -+ "figures": "^2.0.0", -+ "lodash": "^4.3.0", -+ "mute-stream": "0.0.7", -+ "run-async": "^2.2.0", -+ "rxjs": "^5.5.2", -+ "string-width": "^2.1.0", -+ "strip-ansi": "^4.0.0", -+ "through": "^2.3.6" -+ }, -+ "dependencies": { -+ "ansi-regex": { -+ "version": "3.0.0", -+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", -+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", -+ "dev": true -+ }, -+ "is-fullwidth-code-point": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", -+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", -+ "dev": true -+ }, -+ "string-width": { -+ "version": "2.1.1", -+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", -+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", -+ "dev": true, -+ "requires": { -+ "is-fullwidth-code-point": "^2.0.0", -+ "strip-ansi": "^4.0.0" -+ } -+ }, -+ "strip-ansi": { -+ "version": "4.0.0", -+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", -+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", -+ "dev": true, -+ "requires": { -+ "ansi-regex": "^3.0.0" -+ } -+ } -+ } -+ }, -+ "is-callable": { -+ "version": "1.1.4", -+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", -+ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", -+ "dev": true -+ }, -+ "is-date-object": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", -+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", -+ "dev": true -+ }, -+ "is-fullwidth-code-point": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", -+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", -+ "requires": { -+ "number-is-nan": "^1.0.0" -+ } -+ }, -+ "is-path-cwd": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", -+ "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", -+ "dev": true -+ }, -+ "is-path-in-cwd": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", -+ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", -+ "dev": true, -+ "requires": { -+ "is-path-inside": "^1.0.0" -+ } -+ }, -+ "is-path-inside": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", -+ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", -+ "dev": true, -+ "requires": { -+ "path-is-inside": "^1.0.1" -+ } -+ }, -+ "is-promise": { -+ "version": "2.1.0", -+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", -+ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", -+ "dev": true -+ }, -+ "is-regex": { -+ "version": "1.0.4", -+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", -+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", -+ "dev": true, -+ "requires": { -+ "has": "^1.0.1" -+ } -+ }, -+ "is-resolvable": { -+ "version": "1.1.0", -+ "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", -+ "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", -+ "dev": true -+ }, -+ "is-symbol": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", -+ "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", -+ "dev": true -+ }, -+ "isarray": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", -+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" -+ }, -+ "isexe": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", -+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", -+ "dev": true -+ }, -+ "js-tokens": { -+ "version": "3.0.2", -+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", -+ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", -+ "dev": true -+ }, -+ "js-yaml": { -+ "version": "3.12.0", -+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", -+ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", -+ "dev": true, -+ "requires": { -+ "argparse": "^1.0.7", -+ "esprima": "^4.0.0" -+ } -+ }, -+ "json-schema-traverse": { -+ "version": "0.4.1", -+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", -+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", -+ "dev": true -+ }, -+ "json-stable-stringify-without-jsonify": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", -+ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", -+ "dev": true -+ }, -+ "levn": { -+ "version": "0.3.0", -+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", -+ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", -+ "dev": true, -+ "requires": { -+ "prelude-ls": "~1.1.2", -+ "type-check": "~0.3.2" -+ } -+ }, -+ "lodash": { -+ "version": "4.17.10", -+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", -+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", -+ "dev": true -+ }, -+ "mimic-fn": { -+ "version": "1.2.0", -+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", -+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", -+ "dev": true -+ }, -+ "minimatch": { -+ "version": "3.0.4", -+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", -+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", -+ "requires": { -+ "brace-expansion": "^1.1.7" -+ } -+ }, -+ "minimist": { -+ "version": "0.0.8", -+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", -+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" -+ }, -+ "minipass": { -+ "version": "2.3.4", -+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.4.tgz", -+ "integrity": "sha512-mlouk1OHlaUE8Odt1drMtG1bAJA4ZA6B/ehysgV0LUIrDHdKgo1KorZq3pK0b/7Z7LJIQ12MNM6aC+Tn6lUZ5w==", -+ "requires": { -+ "safe-buffer": "^5.1.2", -+ "yallist": "^3.0.0" -+ } -+ }, -+ "minizlib": { -+ "version": "1.1.0", -+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", -+ "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", -+ "requires": { -+ "minipass": "^2.2.1" -+ } -+ }, -+ "mkdirp": { -+ "version": "0.5.1", -+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", -+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", -+ "requires": { -+ "minimist": "0.0.8" -+ } -+ }, -+ "ms": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", -+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" -+ }, -+ "mute-stream": { -+ "version": "0.0.7", -+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", -+ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", -+ "dev": true -+ }, -+ "nan": { -+ "version": "2.10.0", -+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", -+ "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" -+ }, -+ "natural-compare": { -+ "version": "1.4.0", -+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", -+ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", -+ "dev": true -+ }, -+ "needle": { -+ "version": "2.2.2", -+ "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.2.tgz", -+ "integrity": "sha512-mW7W8dKuVYefCpNzE3Z7xUmPI9wSrSL/1qH31YGMxmSOAnjatS3S9Zv3cmiHrhx3Jkp1SrWWBdOFXjfF48Uq3A==", -+ "requires": { -+ "debug": "^2.1.2", -+ "iconv-lite": "^0.4.4", -+ "sax": "^1.2.4" -+ }, -+ "dependencies": { -+ "debug": { -+ "version": "2.6.9", -+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", -+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", -+ "requires": { -+ "ms": "2.0.0" -+ } -+ } -+ } -+ }, -+ "nice-try": { -+ "version": "1.0.4", -+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", -+ "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", -+ "dev": true -+ }, -+ "node-pre-gyp": { -+ "version": "0.11.0", -+ "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", -+ "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", -+ "requires": { -+ "detect-libc": "^1.0.2", -+ "mkdirp": "^0.5.1", -+ "needle": "^2.2.1", -+ "nopt": "^4.0.1", -+ "npm-packlist": "^1.1.6", -+ "npmlog": "^4.0.2", -+ "rc": "^1.2.7", -+ "rimraf": "^2.6.1", -+ "semver": "^5.3.0", -+ "tar": "^4" -+ } -+ }, -+ "nopt": { -+ "version": "4.0.1", -+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", -+ "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", -+ "requires": { -+ "abbrev": "1", -+ "osenv": "^0.1.4" -+ } -+ }, -+ "npm-bundled": { -+ "version": "1.0.5", -+ "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", -+ "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==" -+ }, -+ "npm-packlist": { -+ "version": "1.1.11", -+ "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.11.tgz", -+ "integrity": "sha512-CxKlZ24urLkJk+9kCm48RTQ7L4hsmgSVzEk0TLGPzzyuFxD7VNgy5Sl24tOLMzQv773a/NeJ1ce1DKeacqffEA==", -+ "requires": { -+ "ignore-walk": "^3.0.1", -+ "npm-bundled": "^1.0.1" -+ } -+ }, -+ "npmlog": { -+ "version": "4.1.2", -+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", -+ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", -+ "requires": { -+ "are-we-there-yet": "~1.1.2", -+ "console-control-strings": "~1.1.0", -+ "gauge": "~2.7.3", -+ "set-blocking": "~2.0.0" -+ } -+ }, -+ "number-is-nan": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", -+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" -+ }, -+ "object-assign": { -+ "version": "4.1.1", -+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", -+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" -+ }, -+ "object-keys": { -+ "version": "1.0.12", -+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", -+ "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", -+ "dev": true -+ }, -+ "once": { -+ "version": "1.4.0", -+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", -+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", -+ "requires": { -+ "wrappy": "1" -+ } -+ }, -+ "onetime": { -+ "version": "2.0.1", -+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", -+ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", -+ "dev": true, -+ "requires": { -+ "mimic-fn": "^1.0.0" -+ } -+ }, -+ "optionator": { -+ "version": "0.8.2", -+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", -+ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", -+ "dev": true, -+ "requires": { -+ "deep-is": "~0.1.3", -+ "fast-levenshtein": "~2.0.4", -+ "levn": "~0.3.0", -+ "prelude-ls": "~1.1.2", -+ "type-check": "~0.3.2", -+ "wordwrap": "~1.0.0" -+ } -+ }, -+ "os-homedir": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", -+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" -+ }, -+ "os-tmpdir": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", -+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" -+ }, -+ "osenv": { -+ "version": "0.1.5", -+ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", -+ "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", -+ "requires": { -+ "os-homedir": "^1.0.0", -+ "os-tmpdir": "^1.0.0" -+ } -+ }, -+ "path-is-absolute": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", -+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" -+ }, -+ "path-is-inside": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", -+ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", -+ "dev": true -+ }, -+ "path-key": { -+ "version": "2.0.1", -+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", -+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", -+ "dev": true -+ }, -+ "pify": { -+ "version": "2.3.0", -+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", -+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", -+ "dev": true -+ }, -+ "pinkie": { -+ "version": "2.0.4", -+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", -+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", -+ "dev": true -+ }, -+ "pinkie-promise": { -+ "version": "2.0.1", -+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", -+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", -+ "dev": true, -+ "requires": { -+ "pinkie": "^2.0.0" -+ } -+ }, -+ "pluralize": { -+ "version": "7.0.0", -+ "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", -+ "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", -+ "dev": true -+ }, -+ "prelude-ls": { -+ "version": "1.1.2", -+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", -+ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", -+ "dev": true -+ }, -+ "process-nextick-args": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", -+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" -+ }, -+ "progress": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", -+ "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", -+ "dev": true -+ }, -+ "punycode": { -+ "version": "2.1.1", -+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", -+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", -+ "dev": true -+ }, -+ "rc": { -+ "version": "1.2.8", -+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", -+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", -+ "requires": { -+ "deep-extend": "^0.6.0", -+ "ini": "~1.3.0", -+ "minimist": "^1.2.0", -+ "strip-json-comments": "~2.0.1" -+ }, -+ "dependencies": { -+ "minimist": { -+ "version": "1.2.0", -+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", -+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" -+ } -+ } -+ }, -+ "readable-stream": { -+ "version": "2.3.6", -+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", -+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", -+ "requires": { -+ "core-util-is": "~1.0.0", -+ "inherits": "~2.0.3", -+ "isarray": "~1.0.0", -+ "process-nextick-args": "~2.0.0", -+ "safe-buffer": "~5.1.1", -+ "string_decoder": "~1.1.1", -+ "util-deprecate": "~1.0.1" -+ } -+ }, -+ "regexp.prototype.flags": { -+ "version": "1.2.0", -+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", -+ "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", -+ "dev": true, -+ "requires": { -+ "define-properties": "^1.1.2" -+ } -+ }, -+ "regexpp": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", -+ "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", -+ "dev": true -+ }, -+ "require-uncached": { -+ "version": "1.0.3", -+ "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", -+ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", -+ "dev": true, -+ "requires": { -+ "caller-path": "^0.1.0", -+ "resolve-from": "^1.0.0" -+ } -+ }, -+ "resolve-from": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", -+ "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", -+ "dev": true -+ }, -+ "restore-cursor": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", -+ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", -+ "dev": true, -+ "requires": { -+ "onetime": "^2.0.0", -+ "signal-exit": "^3.0.2" -+ } -+ }, -+ "rimraf": { -+ "version": "2.6.2", -+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", -+ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", -+ "requires": { -+ "glob": "^7.0.5" -+ } -+ }, -+ "run-async": { -+ "version": "2.3.0", -+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", -+ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", -+ "dev": true, -+ "requires": { -+ "is-promise": "^2.1.0" -+ } -+ }, -+ "rxjs": { -+ "version": "5.5.11", -+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", -+ "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", -+ "dev": true, -+ "requires": { -+ "symbol-observable": "1.0.1" -+ } -+ }, -+ "safe-buffer": { -+ "version": "5.1.2", -+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", -+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" -+ }, -+ "safer-buffer": { -+ "version": "2.1.2", -+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", -+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" -+ }, -+ "sax": { -+ "version": "1.2.4", -+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", -+ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" -+ }, -+ "semver": { -+ "version": "5.5.0", -+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", -+ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" -+ }, -+ "set-blocking": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", -+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" -+ }, -+ "shebang-command": { -+ "version": "1.2.0", -+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", -+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", -+ "dev": true, -+ "requires": { -+ "shebang-regex": "^1.0.0" -+ } -+ }, -+ "shebang-regex": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", -+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", -+ "dev": true -+ }, -+ "signal-exit": { -+ "version": "3.0.2", -+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", -+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" -+ }, -+ "slice-ansi": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", -+ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", -+ "dev": true, -+ "requires": { -+ "is-fullwidth-code-point": "^2.0.0" -+ }, -+ "dependencies": { -+ "is-fullwidth-code-point": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", -+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", -+ "dev": true -+ } -+ } -+ }, -+ "sprintf-js": { -+ "version": "1.0.3", -+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", -+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", -+ "dev": true -+ }, -+ "string-width": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", -+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", -+ "requires": { -+ "code-point-at": "^1.0.0", -+ "is-fullwidth-code-point": "^1.0.0", -+ "strip-ansi": "^3.0.0" -+ } -+ }, -+ "string.prototype.matchall": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", -+ "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", -+ "dev": true, -+ "requires": { -+ "define-properties": "^1.1.2", -+ "es-abstract": "^1.10.0", -+ "function-bind": "^1.1.1", -+ "has-symbols": "^1.0.0", -+ "regexp.prototype.flags": "^1.2.0" -+ } -+ }, -+ "string_decoder": { -+ "version": "1.1.1", -+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", -+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", -+ "requires": { -+ "safe-buffer": "~5.1.0" -+ } -+ }, -+ "strip-ansi": { -+ "version": "3.0.1", -+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", -+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", -+ "requires": { -+ "ansi-regex": "^2.0.0" -+ } -+ }, -+ "strip-json-comments": { -+ "version": "2.0.1", -+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", -+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" -+ }, -+ "supports-color": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", -+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", -+ "dev": true -+ }, -+ "symbol-observable": { -+ "version": "1.0.1", -+ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", -+ "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", -+ "dev": true -+ }, -+ "table": { -+ "version": "4.0.3", -+ "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", -+ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", -+ "dev": true, -+ "requires": { -+ "ajv": "^6.0.1", -+ "ajv-keywords": "^3.0.0", -+ "chalk": "^2.1.0", -+ "lodash": "^4.17.4", -+ "slice-ansi": "1.0.0", -+ "string-width": "^2.1.1" -+ }, -+ "dependencies": { -+ "ansi-regex": { -+ "version": "3.0.0", -+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", -+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", -+ "dev": true -+ }, -+ "is-fullwidth-code-point": { -+ "version": "2.0.0", -+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", -+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", -+ "dev": true -+ }, -+ "string-width": { -+ "version": "2.1.1", -+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", -+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", -+ "dev": true, -+ "requires": { -+ "is-fullwidth-code-point": "^2.0.0", -+ "strip-ansi": "^4.0.0" -+ } -+ }, -+ "strip-ansi": { -+ "version": "4.0.0", -+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", -+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", -+ "dev": true, -+ "requires": { -+ "ansi-regex": "^3.0.0" -+ } -+ } -+ } -+ }, -+ "tar": { -+ "version": "4.4.6", -+ "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.6.tgz", -+ "integrity": "sha512-tMkTnh9EdzxyfW+6GK6fCahagXsnYk6kE6S9Gr9pjVdys769+laCTbodXDhPAjzVtEBazRgP0gYqOjnk9dQzLg==", -+ "requires": { -+ "chownr": "^1.0.1", -+ "fs-minipass": "^1.2.5", -+ "minipass": "^2.3.3", -+ "minizlib": "^1.1.0", -+ "mkdirp": "^0.5.0", -+ "safe-buffer": "^5.1.2", -+ "yallist": "^3.0.2" -+ } -+ }, -+ "text-table": { -+ "version": "0.2.0", -+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", -+ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", -+ "dev": true -+ }, -+ "through": { -+ "version": "2.3.8", -+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", -+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", -+ "dev": true -+ }, -+ "tmp": { -+ "version": "0.0.33", -+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", -+ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", -+ "dev": true, -+ "requires": { -+ "os-tmpdir": "~1.0.2" -+ } -+ }, -+ "type-check": { -+ "version": "0.3.2", -+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", -+ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", -+ "dev": true, -+ "requires": { -+ "prelude-ls": "~1.1.2" -+ } -+ }, -+ "uri-js": { -+ "version": "4.2.2", -+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", -+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", -+ "dev": true, -+ "requires": { -+ "punycode": "^2.1.0" -+ } -+ }, -+ "usb": { -+ "version": "git://github.com/jrobeson/node-usb.git#0b85eb208e30c1475f6d451dec0653b168f693c5", -+ "from": "git://github.com/jrobeson/node-usb.git#fork", -+ "requires": { -+ "nan": "^2.8.0", -+ "node-pre-gyp": "^0.10.0" -+ }, -+ "dependencies": { -+ "node-pre-gyp": { -+ "version": "0.10.3", -+ "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz", -+ "integrity": "sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A==", -+ "requires": { -+ "detect-libc": "^1.0.2", -+ "mkdirp": "^0.5.1", -+ "needle": "^2.2.1", -+ "nopt": "^4.0.1", -+ "npm-packlist": "^1.1.6", -+ "npmlog": "^4.0.2", -+ "rc": "^1.2.7", -+ "rimraf": "^2.6.1", -+ "semver": "^5.3.0", -+ "tar": "^4" -+ } -+ } -+ } -+ }, -+ "util-deprecate": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", -+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" -+ }, -+ "which": { -+ "version": "1.3.1", -+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", -+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", -+ "dev": true, -+ "requires": { -+ "isexe": "^2.0.0" -+ } -+ }, -+ "wide-align": { -+ "version": "1.1.3", -+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", -+ "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", -+ "requires": { -+ "string-width": "^1.0.2 || 2" -+ } -+ }, -+ "wordwrap": { -+ "version": "1.0.0", -+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", -+ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", -+ "dev": true -+ }, -+ "wrappy": { -+ "version": "1.0.2", -+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", -+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" -+ }, -+ "write": { -+ "version": "0.2.1", -+ "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", -+ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", -+ "dev": true, -+ "requires": { -+ "mkdirp": "^0.5.1" -+ } -+ }, -+ "yallist": { -+ "version": "3.0.2", -+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", -+ "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" -+ } -+ } -+} ---- a/package.json -+++ b/package.json -@@ -26,26 +26,26 @@ - "win32" - ], - "dependencies": { -- "debug": "^2.2.0", -- "nan": "^2.0.5", -- "node-pre-gyp": "0.6.x" -- }, -- "optionalDependencies": { -- "usb": "^1.1.0" -+ "debug": "^3.1.0", -+ "nan": "^2.10.0", -+ "node-pre-gyp": "^0.11.0" - }, -+ "optionalDependencies": {}, - "devDependencies": { -- "jshint": "^2.8.0" -+ "eslint": "^5.3.0" -+ }, -+ "engines": { -+ "node": ">=6.14.0" - }, - "scripts": { -- "preinstall": "npm install node-pre-gyp", -- "install": "node-pre-gyp install --fallback-to-build", -- "test": "jshint lib/*.js" -+ "install": "node-pre-gyp install --build-from-source", -+ "test": "eslint examples/ lib/" - }, - "binary": { -- "module_name": "binding", -- "module_path": "./lib/binding/", -- "host": "https://github.com/sandeepmistry/node-bluetooth-hci-socket/releases/download/", -- "package_name": "{module_name}-{version}-{node_abi}-{platform}-{arch}.tar.gz", -- "remote_path": "{version}" -+ "module_name": "bluetooth_hci_socket", -+ "module_path": "./lib/binding/", -+ "host": "https://github.com/sandeepmistry/node-bluetooth-hci-socket/releases/download/", -+ "package_name": "{module_name}-{version}-{node_abi}-{platform}-{arch}.tar.gz", -+ "remote_path": "{version}" - } - } ---- a/src/BluetoothHciSocket.cpp -+++ b/src/BluetoothHciSocket.cpp -@@ -276,7 +276,7 @@ void BluetoothHciSocket::emitErrnoError( - Nan::New(strerror(errno)).ToLocalChecked() - }; - -- Local error = errorConstructor->NewInstance(1, constructorArgs); -+ Local error = Nan::NewInstance(errorConstructor, 1, constructorArgs).ToLocalChecked(); - - Local argv[2] = { - Nan::New("error").ToLocalChecked(), -@@ -538,4 +538,4 @@ void BluetoothHciSocket::PollCallback(uv - p->poll(); - } - --NODE_MODULE(binding, BluetoothHciSocket::Init); -+NODE_MODULE(NODE_GYP_MODULE_NAME, BluetoothHciSocket::Init); diff --git a/packages/lang/node-bluetooth-hci-socket/patches/999-fix_build_on_node_23_x.patch b/packages/lang/node-bluetooth-hci-socket/patches/999-fix_build_on_node_23_x.patch deleted file mode 100644 index 38b95949..00000000 --- a/packages/lang/node-bluetooth-hci-socket/patches/999-fix_build_on_node_23_x.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 9b9e9753a6e676754a851369f723c1bbcf7783c6 Mon Sep 17 00:00:00 2001 -From: Aarni Koskela -Date: Wed, 28 Aug 2019 13:30:51 +0300 -Subject: [PATCH 3/6] Fix things up for Node 12, nan 2.14.x - ---- - package.json | 4 ++-- - src/BluetoothHciSocket.cpp | 29 ++++++++++------------------- - 2 files changed, 12 insertions(+), 21 deletions(-) - ---- a/package.json -+++ b/package.json -@@ -27,8 +27,8 @@ - ], - "dependencies": { - "debug": "^3.1.0", -- "nan": "^2.10.0", -- "node-pre-gyp": "^0.11.0" -+ "nan": "^2.22.0", -+ "node-pre-gyp": "^0.13.0" - }, - "optionalDependencies": {}, - "devDependencies": { ---- a/src/BluetoothHciSocket.cpp -+++ b/src/BluetoothHciSocket.cpp -@@ -129,7 +129,7 @@ NAN_MODULE_INIT(BluetoothHciSocket::Init - Nan::SetPrototypeMethod(tmpl, "stop", Stop); - Nan::SetPrototypeMethod(tmpl, "write", Write); - -- target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction()); -+ Nan::Set(target, Nan::New("BluetoothHciSocket").ToLocalChecked(), Nan::GetFunction(tmpl).ToLocalChecked()); - } - - BluetoothHciSocket::BluetoothHciSocket() : -@@ -267,16 +267,7 @@ void BluetoothHciSocket::write_(char* da - } - - void BluetoothHciSocket::emitErrnoError() { -- Nan::HandleScope scope; -- -- Local globalObj = Nan::GetCurrentContext()->Global(); -- Local errorConstructor = Local::Cast(globalObj->Get(Nan::New("Error").ToLocalChecked())); -- -- Local constructorArgs[1] = { -- Nan::New(strerror(errno)).ToLocalChecked() -- }; -- -- Local error = Nan::NewInstance(errorConstructor, 1, constructorArgs).ToLocalChecked(); -+ v8::Local error = Nan::ErrnoException(errno, NULL, strerror(errno)); - - Local argv[2] = { - Nan::New("error").ToLocalChecked(), -@@ -396,7 +387,7 @@ NAN_METHOD(BluetoothHciSocket::BindRaw) - if (info.Length() > 0) { - Local arg0 = info[0]; - if (arg0->IsInt32() || arg0->IsUint32()) { -- devId = arg0->IntegerValue(); -+ devId = Nan::To(arg0).FromJust(); - - pDevId = &devId; - } -@@ -418,7 +409,7 @@ NAN_METHOD(BluetoothHciSocket::BindUser) - if (info.Length() > 0) { - Local arg0 = info[0]; - if (arg0->IsInt32() || arg0->IsUint32()) { -- devId = arg0->IntegerValue(); -+ devId = Nan::To(arg0).FromJust(); - - pDevId = &devId; - } -@@ -471,12 +462,12 @@ NAN_METHOD(BluetoothHciSocket::GetDevice - bool devUp = dr->dev_opt & (1 << HCI_UP); - if (dr != NULL) { - v8::Local obj = Nan::New(); -- obj->Set(Nan::New("devId").ToLocalChecked(), Nan::New(devId)); -- obj->Set(Nan::New("devUp").ToLocalChecked(), Nan::New(devUp)); -- obj->Set(Nan::New("idVendor").ToLocalChecked(), Nan::Null()); -- obj->Set(Nan::New("idProduct").ToLocalChecked(), Nan::Null()); -- obj->Set(Nan::New("busNumber").ToLocalChecked(), Nan::Null()); -- obj->Set(Nan::New("deviceAddress").ToLocalChecked(), Nan::Null()); -+ Nan::Set(obj, Nan::New("devId").ToLocalChecked(), Nan::New(devId)); -+ Nan::Set(obj, Nan::New("devUp").ToLocalChecked(), Nan::New(devUp)); -+ Nan::Set(obj, Nan::New("idVendor").ToLocalChecked(), Nan::Null()); -+ Nan::Set(obj, Nan::New("idProduct").ToLocalChecked(), Nan::Null()); -+ Nan::Set(obj, Nan::New("busNumber").ToLocalChecked(), Nan::Null()); -+ Nan::Set(obj, Nan::New("deviceAddress").ToLocalChecked(), Nan::Null()); - Nan::Set(deviceList, di++, obj); - } - } diff --git a/packages/lang/node-browserify/Makefile b/packages/lang/node-browserify/Makefile deleted file mode 100644 index b1e61e6c..00000000 --- a/packages/lang/node-browserify/Makefile +++ /dev/null @@ -1,115 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=browserify -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=17.0.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=https://mirrors.tencent.com/npm/$(PKG_NPM_NAME)/-/ \ - https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=599ed96d127b06d608bc7aaff0ddbfe85d05f408d72cc378a620d766c60a8cb8 - -PKG_MAINTAINER:=Hirokazu MORIKAWA -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -HOST_BUILD_DEPENDS:=node/host -HOST_BUILD_PARALLEL:=1 - -PKG_BUILD_DEPENDS:=node/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/node-browserify - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=browser-side require() the node way - URL:=https://www.npmjs.org/package/browserify - DEPENDS:=+node -endef - -define Package/node-browserify/description - browserify will recursively analyze all the require() calls in your app in order to build a bundle you can serve up to the browser in a single