diff --git a/dev-qt/qt6-base/licenses/FDL b/dev-qt/qt6-base/licenses/FDL new file mode 100644 index 000000000..938bb8da9 --- /dev/null +++ b/dev-qt/qt6-base/licenses/FDL @@ -0,0 +1,450 @@ + GNU Free Documentation License + Version 1.3, 3 November 2008 + + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of +the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no +other conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to +give them a chance to provide you with an updated version of the +Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other +documents released under this License, and replace the individual +copies of this License in the various documents with a single copy +that is included in the collection, provided that you follow the rules +of this License for verbatim copying of each of the documents in all +other respects. + +You may extract a single document from such a collection, and +distribute it individually under this License, provided you insert a +copy of this License into the extracted document, and follow this +License in all other respects regarding verbatim copying of that +document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the +GNU Free Documentation 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. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +"Massive Multiauthor Collaboration" (or "MMC") contained in the site +means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in +part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole or +in part into the MMC, (1) had no cover texts or invariant sections, and +(2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/dev-qt/qt6-base/patches/qt6_base-6.2.0.patchset b/dev-qt/qt6-base/patches/qt6_base-6.2.0.patchset new file mode 100644 index 000000000..5ed334d76 --- /dev/null +++ b/dev-qt/qt6-base/patches/qt6_base-6.2.0.patchset @@ -0,0 +1,1048 @@ +From 539f3d92c540ec451b970c484055f99122dbfa7f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Mon, 11 Feb 2019 15:53:49 +1000 +Subject: Make sure libs are searched in the develop/ dir by CMake + +Static libs at least are not in the lib[/x86] dirs... + +diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf +index 24ed125..52f637e 100644 +--- a/mkspecs/features/create_cmake.prf ++++ b/mkspecs/features/create_cmake.prf +@@ -112,6 +112,9 @@ win32:!static:!staticlib { + CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/ + CMAKE_DLL_DIR_IS_ABSOLUTE = True + } ++} else:haiku { ++ CMAKE_DLL_DIR = develop/$$CMAKE_LIB_DIR ++ CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE + } else { + CMAKE_DLL_DIR = $$CMAKE_LIB_DIR + CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE +-- +2.30.2 + + +From 3e2630d33503d1411af771d6fc4bfb9a7034946b Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:56:12 +1000 +Subject: Fix QStandartPaths for Haiku + + +diff --git a/src/corelib/io/qstandardpaths_haiku.cpp b/src/corelib/io/qstandardpaths_haiku.cpp +index 044d69f..1f255a9 100644 +--- a/src/corelib/io/qstandardpaths_haiku.cpp ++++ b/src/corelib/io/qstandardpaths_haiku.cpp +@@ -145,22 +145,22 @@ QString QStandardPaths::writableLocation(StandardLocation type) + return haikuStandardPath(B_USER_NONPACKAGED_BIN_DIRECTORY); + case TempLocation: + return haikuStandardPath(B_SYSTEM_TEMP_DIRECTORY); +- case AppDataLocation: // fall through ++ case AppDataLocation: ++ return haikuAppStandardPath(B_SYSTEM_CACHE_DIRECTORY); + case AppLocalDataLocation: +- return haikuAppStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY); ++ return haikuAppStandardPath(B_USER_CACHE_DIRECTORY); + case GenericDataLocation: +- return haikuStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY); ++ return haikuAppStandardPath(B_SYSTEM_CACHE_DIRECTORY); + case CacheLocation: + return haikuAppStandardPath(B_USER_CACHE_DIRECTORY); + case GenericCacheLocation: +- return haikuStandardPath(B_USER_CACHE_DIRECTORY); +- case ConfigLocation: // fall through ++ return haikuStandardPath(B_SYSTEM_CACHE_DIRECTORY); ++ case ConfigLocation: + case AppConfigLocation: +- return haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + case GenericConfigLocation: +- return haikuStandardPath(B_USER_SETTINGS_DIRECTORY); ++ return haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + default: +- return QString(); ++ return haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + } + } + +@@ -179,7 +179,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) + case MoviesLocation: + case DownloadLocation: + case HomeLocation: +- paths += haikuStandardPath(B_USER_NONPACKAGED_DIRECTORY); ++ paths += haikuStandardPath(B_USER_DIRECTORY); + break; + case FontsLocation: + paths += haikuStandardPaths(B_FIND_PATH_FONTS_DIRECTORY); +@@ -203,7 +203,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) + break; + case ConfigLocation: // fall through + case AppConfigLocation: +- paths += haikuAppStandardPath(B_SYSTEM_SETTINGS_DIRECTORY); ++ paths += haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + break; + case GenericConfigLocation: + paths += haikuStandardPath(B_SYSTEM_SETTINGS_DIRECTORY); +-- +2.30.2 + + +From 908d945943b0563451f4aa1027df3a7afd427148 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:56:39 +1000 +Subject: QSslSocketPrivate::unixRootCertDirectories(): add ssl path for Haiku. + + +diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp +index 003bbf0..8c48db1 100644 +--- a/src/network/ssl/qsslsocket.cpp ++++ b/src/network/ssl/qsslsocket.cpp +@@ -2980,6 +2980,7 @@ QList QSslSocketPrivate::unixRootCertDirectories() + << "/usr/local/ssl/certs/" // Solaris + << "/etc/openssl/certs/" // BlackBerry + << "/opt/openssl/certs/" // HP-UX ++ << "/system/data/ssl/" // Haiku + << "/etc/ssl/"; // OpenBSD + } + +-- +2.30.2 + + +From 7e582bb843a2a46efa11c7a9365114fa944eaa85 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:56:59 +1000 +Subject: Fix build for Haiku platform + + +diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf +index 0040b6c..9a729bb 100644 +--- a/mkspecs/features/toolchain.prf ++++ b/mkspecs/features/toolchain.prf +@@ -263,7 +263,7 @@ isEmpty($${target_prefix}.INCDIRS) { + } + } + } +- if(!darwin:clang)|intel_icc { ++ if(!darwin:clang)|haiku|intel_icc { + # Clang on a non-Apple system (that is, a system without ld64 -- say, with GNU ld + # or gold under Linux) will not print any library search path. Need to use another + # invocation with different options (which in turn doesn't print include search +-- +2.30.2 + + +From 0a68bc64a38a6104917b2f510cd054cada753e7a Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:57:54 +1000 +Subject: Fix endian detection + + +diff --git a/src/3rdparty/sha3/brg_endian.h b/src/3rdparty/sha3/brg_endian.h +index 9bb306e..9f0ea58 100644 +--- a/src/3rdparty/sha3/brg_endian.h ++++ b/src/3rdparty/sha3/brg_endian.h +@@ -39,10 +39,10 @@ Changes for ARM 9/9/2010 [Downstream relative to Gladman's GitHub, upstream to Q + #elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ + defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) + # include +-#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) ++#elif defined( __linux__ ) || defined( __HAIKU__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) + # if !defined( __MINGW32__ ) && !defined( _AIX ) && !defined(Q_OS_QNX) + # include +-# if !defined( __BEOS__ ) && !defined(Q_OS_RTEMS) ++# if !defined( __BEOS__ ) && !defined( __HAIKU__ ) && !defined(Q_OS_RTEMS) + # include + # endif + # endif +-- +2.30.2 + + +From 8494b1bd7cfd532ddb859e68e6b68bd691ce3cb4 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 27 May 2020 19:54:30 +1000 +Subject: Disable LibResolv for Haiku + + +diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp +index 9b0a2ee..480671b 100644 +--- a/src/network/kernel/qhostinfo_unix.cpp ++++ b/src/network/kernel/qhostinfo_unix.cpp +@@ -87,7 +87,7 @@ typedef void (*res_nclose_proto)(res_state_ptr); + static res_nclose_proto local_res_nclose = nullptr; + static res_state_ptr local_res = nullptr; + +-#if QT_CONFIG(library) && !defined(Q_OS_QNX) ++#if QT_CONFIG(library) && !defined(Q_OS_QNX) && !defined(Q_OS_HAIKU) + namespace { + struct LibResolv + { +-- +2.30.2 + + +From 9bc157e738691749706fe03b6bfe219b596d9eb7 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 8 Sep 2019 00:17:19 +1000 +Subject: Don't use ifaddrs for Haiku + + +diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp +index b1e351a..705033c 100644 +--- a/src/network/kernel/qnetworkinterface_unix.cpp ++++ b/src/network/kernel/qnetworkinterface_unix.cpp +@@ -53,7 +53,7 @@ + # include "qdatetime.h" + #endif + +-#if defined(QT_LINUXBASE) ++#if defined(QT_LINUXBASE) || defined(Q_OS_HAIKU) + # define QT_NO_GETIFADDRS + #endif + +-- +2.30.2 + + +From 8e3ff77b9c2be9219e1c8cee83420c08ecfc39e3 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 27 May 2020 19:54:58 +1000 +Subject: Disable sharedmemory feature for bootstrap + + +diff --git a/src/tools/bootstrap/CMakeLists.txt b/src/tools/bootstrap/CMakeLists.txt +index 511313e..f997489 100644 +--- a/src/tools/bootstrap/CMakeLists.txt ++++ b/src/tools/bootstrap/CMakeLists.txt +@@ -109,6 +109,7 @@ qt_internal_extend_target(Bootstrap + QT_NO_CAST_FROM_ASCII + QT_NO_CAST_TO_ASCII + QT_NO_FOREACH ++ QT_NO_SHAREDMEMORY + INCLUDE_DIRECTORIES + .. + ../../3rdparty/tinycbor/src +-- +2.30.2 + + +From 244d13ddddf14efcb0e33e6e3b157b769ba1d215 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 29 Dec 2019 18:13:19 +1000 +Subject: Fix build for x86_gcc2 + + +diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c +index c29ebc2..c6309a2 100644 +--- a/src/3rdparty/forkfd/forkfd.c ++++ b/src/3rdparty/forkfd/forkfd.c +@@ -722,7 +722,7 @@ int forkfd(int flags, pid_t *ppid) + /* parent process */ + info->deathPipe = death_pipe[1]; + fd = death_pipe[0]; +- ffd_atomic_store(&info->pid, pid, FFD_ATOMIC_RELEASE); ++ ffd_atomic_store(&info->pid, (int32_t)pid, FFD_ATOMIC_RELEASE); + + /* release the child */ + #ifdef HAVE_EVENTFD +-- +2.30.2 + + +From 044d412caee2a8ee8713a796b9ae1617439b6a91 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 4 Jun 2020 23:11:17 +1000 +Subject: Implement QFilesystemWatcher for Haiku + + +diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt +index 0bcc3b7..6132bba 100644 +--- a/src/corelib/CMakeLists.txt ++++ b/src/corelib/CMakeLists.txt +@@ -426,6 +426,14 @@ qt_internal_extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQU + "/BASE:0x67000000" + ) + ++qt_internal_extend_target(Core CONDITION HAIKU ++ SOURCES ++ kernel/qsharedmemory_haiku.cpp ++ kernel/qsystemsemaphore_posix.cpp ++ kernel/qsystemsemaphore_systemv.cpp ++ kernel/qsystemsemaphore_unix.cpp ++) ++ + # QtCore can't be compiled with -Wl,-no-undefined because it uses the + # "environ" variable and FreeBSD does not include a weak symbol for it + # in libc. +@@ -895,6 +903,11 @@ qt_internal_extend_target(Core CONDITION MACOS AND QT_FEATURE_filesystemwatcher + io/qfilesystemwatcher_fsevents.mm io/qfilesystemwatcher_fsevents_p.h + ) + ++qt_internal_extend_target(Core CONDITION HAIKU AND QT_FEATURE_filesystemwatcher ++ SOURCES ++ io/qfilesystemwatcher_haiku.cpp io/qfilesystemwatcher_haiku_p.h ++) ++ + qt_internal_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND QT_FEATURE_inotify AND UNIX AND NOT MACOS + SOURCES + io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_inotify_p.h +@@ -1072,7 +1085,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_clock_gettime AND UNIX + WrapRt::WrapRt + ) + +-qt_internal_extend_target(Core CONDITION UNIX AND NOT ANDROID ++qt_internal_extend_target(Core CONDITION UNIX AND NOT ANDROID AND NOT HAIKU + SOURCES + kernel/qsharedmemory_posix.cpp + kernel/qsharedmemory_systemv.cpp +diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp +index bd5a73d..a3825f8 100644 +--- a/src/corelib/io/qfilesystemwatcher.cpp ++++ b/src/corelib/io/qfilesystemwatcher.cpp +@@ -54,6 +54,8 @@ + #include "qfilesystemwatcher_polling_p.h" + #if defined(Q_OS_WIN) + # include "qfilesystemwatcher_win_p.h" ++#elif defined(Q_OS_HAIKU) ++# include "qfilesystemwatcher_haiku_p.h" + #elif defined(USE_INOTIFY) + # include "qfilesystemwatcher_inotify_p.h" + #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(QT_PLATFORM_UIKIT) +@@ -73,6 +75,8 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine(QObject + { + #if defined(Q_OS_WIN) + return new QWindowsFileSystemWatcherEngine(parent); ++#elif defined(Q_OS_HAIKU) ++ return new QHaikuFileSystemWatcherEngine(parent); + #elif defined(USE_INOTIFY) + // there is a chance that inotify may fail on Linux pre-2.6.13 (August + // 2005), so we can't just new inotify directly. +diff --git a/src/corelib/io/qfilesystemwatcher_haiku.cpp b/src/corelib/io/qfilesystemwatcher_haiku.cpp +new file mode 100644 +index 0000000..8355ca8 +--- /dev/null ++++ b/src/corelib/io/qfilesystemwatcher_haiku.cpp +@@ -0,0 +1,254 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2020 The Qt Company Ltd. ++** Copyright (C) 2015-2020 Gerasim Troeglazov, ++** Contact: 3dEyes@gmail.com ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++****************************************************************************/ ++ ++#include "qfilesystemwatcher_haiku_p.h" ++#include ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QHaikuFileWatcher::QHaikuFileWatcher() : QObject(), BLooper() {}; ++QHaikuDirWatcher::QHaikuDirWatcher() : QObject(), BLooper() {}; ++ ++QHaikuFileSystemWatcherEngine::QHaikuFileSystemWatcherEngine(QObject *parent) ++ : QFileSystemWatcherEngine(parent) ++{ ++ fileLooper = new QHaikuFileWatcher(); ++ connect(fileLooper, SIGNAL(fileChanged(const QString &, bool)), SLOT(bfsFileChanged(const QString &, bool))); ++ fileLooper->Run(); ++ ++ dirLooper = new QHaikuDirWatcher(); ++ connect(dirLooper, SIGNAL(directoryChanged(const QString &, bool)), SLOT(bfsDirectoryChanged(const QString &, bool))); ++ dirLooper->Run(); ++} ++ ++QHaikuFileSystemWatcherEngine::~QHaikuFileSystemWatcherEngine() ++{ ++ stop_watching(fileLooper); ++ if (fileLooper->Lock()) ++ fileLooper->Quit(); ++ ++ stop_watching(dirLooper); ++ if (dirLooper->Lock()) ++ dirLooper->Quit(); ++} ++ ++QStringList QHaikuFileSystemWatcherEngine::addPaths(const QStringList &paths, ++ QStringList *files, ++ QStringList *directories) ++{ ++ QStringList unhandled; ++ for (const QString &path : paths) { ++ QFileInfo fi(path); ++ bool isDir = fi.isDir(); ++ auto sg = qScopeGuard([&]{ unhandled.push_back(path); }); ++ if (isDir) { ++ if (directories->contains(path)) ++ continue; ++ } else { ++ if (files->contains(path)) ++ continue; ++ } ++ ++ BEntry entry(path.toUtf8().constData()); ++ if (!entry.Exists()) ++ continue; ++ ++ node_ref nref; ++ entry.GetNodeRef(&nref); ++ status_t status = isDir ? ++ watch_node(&nref, (B_WATCH_NAME | B_WATCH_ATTR | B_WATCH_STAT | B_WATCH_DIRECTORY), dirLooper): ++ watch_node(&nref, (B_WATCH_NAME | B_WATCH_ATTR | B_WATCH_STAT), fileLooper); ++ ++ if (status != B_OK) { ++ qWarning("watch_node(%ls) failed:", path.constData()); ++ continue; ++ } ++ ++ sg.dismiss(); ++ ++ if (isDir) ++ directories->append(path); ++ else ++ files->append(path); ++ } ++ return unhandled; ++} ++ ++QStringList QHaikuFileSystemWatcherEngine::removePaths(const QStringList &paths, ++ QStringList *files, ++ QStringList *directories) ++{ ++ QStringList unhandled; ++ for (const QString &path : paths) { ++ auto sg = qScopeGuard([&]{ unhandled.push_back(path); }); ++ ++ BEntry entry(path.toUtf8().constData()); ++ node_ref nref; ++ entry.GetNodeRef(&nref); ++ ++ if (directories->contains(path)) { ++ directories->removeAll(path); ++ status_t status = watch_node(&nref, B_STOP_WATCHING, dirLooper); ++ } else if (files->contains(path)) { ++ files->removeAll(path); ++ status_t status = watch_node(&nref, B_STOP_WATCHING, fileLooper); ++ } else { ++ continue; ++ } ++ ++ sg.dismiss(); ++ } ++ ++ return unhandled; ++} ++ ++void ++QHaikuDirWatcher::MessageReceived(BMessage* message) ++{ ++ if (message->what == B_NODE_MONITOR) { ++ int32 opcode; ++ ++ if (message->FindInt32("opcode", &opcode) != B_OK) ++ return; ++ ++ switch (opcode) { ++ case B_ENTRY_MOVED: ++ { ++ int32 device = 0; ++ int64 srcFolder = 0; ++ int64 dstFolder = 0; ++ const char* name = NULL; ++ if (message->FindInt32("device", &device) != B_OK ++ || message->FindInt64("to directory", &dstFolder) != B_OK ++ || message->FindInt64("from directory", &srcFolder) != B_OK ++ || message->FindString("name", &name) != B_OK) ++ break; ++ ++ entry_ref ref(device, srcFolder, name); ++ BEntry entry(&ref); ++ ++ BEntry dirEntry; ++ entry.GetParent(&dirEntry); ++ ++ BPath path; ++ dirEntry.GetPath(&path); ++ ++ QString qpath = QString::fromUtf8(path.Path()); ++ ++ emit directoryChanged(qpath, false); ++ } ++ break; ++ case B_ENTRY_CREATED: ++ case B_ENTRY_REMOVED: ++ { ++ int64 directory; ++ int32 device; ++ int64 node; ++ const char *name; ++ if (message->FindInt64("directory", &directory) != B_OK ++ || message->FindInt32("device", &device) != B_OK ++ || message->FindInt64("node", &node) != B_OK ++ || message->FindString("name", &name) != B_OK) ++ break; ++ ++ entry_ref ref(device, directory, name); ++ BEntry entry(&ref); ++ BEntry dirEntry; ++ entry.GetParent(&dirEntry); ++ ++ BPath path; ++ dirEntry.GetPath(&path); ++ ++ QString qpath = QString::fromUtf8(path.Path()); ++ emit directoryChanged(qpath, opcode == B_ENTRY_REMOVED); ++ } ++ break; ++ } ++ } ++} ++ ++void ++QHaikuFileWatcher::MessageReceived(BMessage* message) ++{ ++ if (message->what == B_NODE_MONITOR) { ++ int32 opcode; ++ node_ref nref; ++ const char *name; ++ ++ if (message->FindInt32("opcode", &opcode) != B_OK) ++ return; ++ ++ switch (opcode) { ++ case B_ENTRY_MOVED: ++ { ++ int32 device = 0; ++ int64 srcFolder = 0; ++ int64 dstFolder = 0; ++ const char* name = NULL; ++ if (message->FindInt32("device", &device) != B_OK ++ || message->FindInt64("to directory", &dstFolder) != B_OK ++ || message->FindInt64("from directory", &srcFolder) != B_OK ++ || message->FindString("name", &name) != B_OK) ++ break; ++ ++ entry_ref ref(device, srcFolder, name); ++ BEntry entry(&ref); ++ ++ BPath path; ++ entry.GetPath(&path); ++ ++ QString qpath = QString::fromUtf8(path.Path()); ++ ++ emit fileChanged(qpath, false); ++ } ++ break; ++ case B_STAT_CHANGED: ++ case B_ATTR_CHANGED: ++ BString path; ++ if (message->FindString("path", &path) == B_OK) { ++ QString qpath = QString::fromUtf8(path.String()); ++ ++ QFileInfo fi(qpath); ++ if (!fi.exists()) ++ emit fileChanged(qpath, true); ++ else ++ emit fileChanged(qpath, false); ++ } ++ break; ++ } ++ } ++} ++ ++void ++QHaikuFileSystemWatcherEngine::bfsDirectoryChanged(const QString &path, bool removed) ++{ ++ emit directoryChanged(path, removed); ++} ++ ++void ++QHaikuFileSystemWatcherEngine::bfsFileChanged(const QString &path, bool removed) ++{ ++ emit fileChanged(path, removed); ++} ++ ++QT_END_NAMESPACE ++ ++#include "moc_qfilesystemwatcher_haiku_p.cpp" +diff --git a/src/corelib/io/qfilesystemwatcher_haiku_p.h b/src/corelib/io/qfilesystemwatcher_haiku_p.h +new file mode 100644 +index 0000000..8a8d75a +--- /dev/null ++++ b/src/corelib/io/qfilesystemwatcher_haiku_p.h +@@ -0,0 +1,84 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2020 The Qt Company Ltd. ++** Copyright (C) 2015-2020 Gerasim Troeglazov, ++** Contact: 3dEyes@gmail.com ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++****************************************************************************/ ++ ++#ifndef QFILESYSTEMWATCHER_HAIKU_P_H ++#define QFILESYSTEMWATCHER_HAIKU_P_H ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "qfilesystemwatcher_p.h" ++ ++QT_REQUIRE_CONFIG(filesystemwatcher); ++QT_BEGIN_NAMESPACE ++ ++class QHaikuDirWatcher : public QObject, public BLooper { ++ Q_OBJECT ++public: ++ QHaikuDirWatcher(); ++ virtual void MessageReceived(BMessage* msg); ++Q_SIGNALS: ++ void directoryChanged(const QString &path, bool removed); ++}; ++ ++class QHaikuFileWatcher : public QObject, public BLooper { ++ Q_OBJECT ++public: ++ QHaikuFileWatcher(); ++ virtual void MessageReceived(BMessage* msg); ++Q_SIGNALS: ++ void fileChanged(const QString &path, bool removed); ++}; ++ ++class QHaikuFileSystemWatcherEngine : public QFileSystemWatcherEngine ++{ ++ Q_OBJECT ++ ++public: ++ QHaikuFileSystemWatcherEngine(QObject *parent); ++ ~QHaikuFileSystemWatcherEngine(); ++ ++ QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories) override; ++ QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories) override; ++ ++private: ++ QHaikuDirWatcher *dirLooper; ++ QHaikuFileWatcher *fileLooper; ++ ++private Q_SLOTS: ++ void bfsDirectoryChanged(const QString &path, bool removed); ++ void bfsFileChanged(const QString &path, bool removed); ++}; ++ ++QT_END_NAMESPACE ++#endif // QFILESYSTEMWATCHER_HAIKU_P_H ++ +-- +2.30.2 + + +From 2924289d25898a4010670f75e8e9ca7884af1eba Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Tue, 16 Jun 2020 18:06:57 +1000 +Subject: Don't use AF_INET6 for new sockets + + +diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp +index e6704a3..930bc80 100644 +--- a/src/network/socket/qnativesocketengine_unix.cpp ++++ b/src/network/socket/qnativesocketengine_unix.cpp +@@ -232,8 +232,12 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc + } + int protocol = 0; + #endif // QT_NO_SCTP ++#ifdef Q_OS_HAIKU ++ int domain = AF_INET; ++#else + int domain = (socketProtocol == QAbstractSocket::IPv6Protocol + || socketProtocol == QAbstractSocket::AnyIPProtocol) ? AF_INET6 : AF_INET; ++#endif + int type = (socketType == QAbstractSocket::UdpSocket) ? SOCK_DGRAM : SOCK_STREAM; + + int socket = qt_safe_socket(domain, type, protocol, O_NONBLOCK); +-- +2.30.2 + + +From 2061a362b203542035b88d70b5d5c504b8831f66 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 5 Oct 2020 19:40:40 +1000 +Subject: Disable Haswell CPU feature for plugins + + +diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +index 05b2c92..6e89a5e 100644 +--- a/src/corelib/plugin/qlibrary_unix.cpp ++++ b/src/corelib/plugin/qlibrary_unix.cpp +@@ -192,7 +192,7 @@ bool QLibraryPrivate::load_sys() + prefixes.append(QString()); + } + +-#if defined(Q_PROCESSOR_X86) && !defined(Q_OS_DARWIN) ++#if defined(Q_PROCESSOR_X86) && !defined(Q_OS_DARWIN) && !defined(Q_OS_HAIKU) + if (qCpuHasFeature(ArchHaswell)) { + auto transform = [](QStringList &list, void (*f)(QString *)) { + QStringList tmp; +-- +2.30.2 + + +From 889f5e27c62afb9b6215401aaf97ed8bb9fa8e3b Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 Nov 2020 17:50:04 +0100 +Subject: Haiku build setup + + +diff --git a/cmake/QtRpathHelpers.cmake b/cmake/QtRpathHelpers.cmake +index 6e3414b..8d16ac4 100644 +--- a/cmake/QtRpathHelpers.cmake ++++ b/cmake/QtRpathHelpers.cmake +@@ -22,6 +22,8 @@ function(qt_compute_relative_rpath_base rpath install_location out_var) + set(rpath_rel_base "@loader_path") + elseif(LINUX OR SOLARIS OR FREEBSD) + set(rpath_rel_base "$ORIGIN") ++ elseif(HAIKU) ++ set(rpath_rel_base "$ORIGIN") + else() + message(WARNING "No known RPATH_REL_BASE for target platform.") + set(rpath_rel_base "NO_KNOWN_RPATH_REL_BASE") +diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake +index 7de8dfc..0880961 100644 +--- a/cmake/QtSetup.cmake ++++ b/cmake/QtSetup.cmake +@@ -55,7 +55,7 @@ elseif(APPLE) + endif() + + ## Position independent code: +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++set(CMAKE_POSITION_INDEPENDENT_CODE OFF) + + # Do not relink dependent libraries when no header has changed: + set(CMAKE_LINK_DEPENDS_NO_SHARED ON) +-- +2.30.2 + + +From 18cc6325b911225fb8b0408f1eb095a7c95717a6 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 Nov 2020 22:33:56 +0100 +Subject: Haiku: link against libnetwork + + +diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt +index 1ab3c20..534a7e7 100644 +--- a/src/network/CMakeLists.txt ++++ b/src/network/CMakeLists.txt +@@ -200,6 +200,11 @@ qt_internal_extend_target(Network CONDITION QT_FEATURE_dnslookup AND WIN32 + kernel/qdnslookup_win.cpp + ) + ++qt_internal_extend_target(Network CONDITION HAIKU ++ LIBRARIES ++ network ++) ++ + qt_internal_extend_target(Network CONDITION APPLE AND NOT UIKIT + LIBRARIES + ${FWCoreServices} +-- +2.30.2 + + +From 0ce7a1db826d6e17e2a406f20b0d8609f01ded8a Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 31 Oct 2021 22:57:22 +1000 +Subject: QSharedMemory implementation + + +diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp +index 3dbbe75..6303b77 100644 +--- a/src/corelib/kernel/qsharedmemory.cpp ++++ b/src/corelib/kernel/qsharedmemory.cpp +@@ -46,6 +46,9 @@ + #ifdef Q_OS_WIN + # include + #endif ++#ifdef Q_OS_HAIKU ++# include ++#endif + + #if defined(Q_OS_DARWIN) + # include "qcore_mac_p.h" +@@ -104,6 +107,12 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key, + + #ifdef Q_OS_WIN + return result; ++#elif defined(Q_OS_HAIKU) ++ if (key.length() < B_OS_NAME_LENGTH) ++ return key; ++ result = key; ++ result.truncate(B_OS_NAME_LENGTH - 4); ++ return result + QLatin1Char('_') + QString::number(qChecksum(key.toUtf8()), 16); + #elif defined(QT_POSIX_IPC) + return QLatin1Char('/') + result; + #else +diff --git a/src/corelib/kernel/qsharedmemory_haiku.cpp b/src/corelib/kernel/qsharedmemory_haiku.cpp +new file mode 100644 +index 0000000..469b81c +--- /dev/null ++++ b/src/corelib/kernel/qsharedmemory_haiku.cpp +@@ -0,0 +1,183 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2016 The Qt Company Ltd. ++** Copyright (C) 2021 Gerasim Troeglazov, ++** Contact: 3dEyes@gmail.com ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++****************************************************************************/ ++ ++#include "qsharedmemory.h" ++#include "qsharedmemory_p.h" ++#include ++ ++#include ++ ++#ifndef QT_NO_SHAREDMEMORY ++QT_BEGIN_NAMESPACE ++ ++QSharedMemoryPrivate::QSharedMemoryPrivate() ++ : QObjectPrivate(), memory(0), size(0), error(QSharedMemory::NoError), ++#ifndef QT_NO_SYSTEMSEMAPHORE ++ systemSemaphore(QString()), lockedByMe(false), ++#endif ++ hand(-1) ++{ ++} ++ ++void QSharedMemoryPrivate::setErrorString(QLatin1String function) ++{ ++ Q_UNUSED(function); ++} ++ ++key_t QSharedMemoryPrivate::handle() ++{ ++ const QString safeKey = makePlatformSafeKey(key); ++ if (safeKey.isEmpty()) { ++ errorString = QSharedMemory::tr("%1: key is empty").arg(QLatin1String("QSharedMemory::handle")); ++ error = QSharedMemory::KeyError; ++ return 0; ++ } ++ ++ return 1; ++} ++ ++#endif // QT_NO_SHAREDMEMORY ++ ++#if !(defined(QT_NO_SHAREDMEMORY) && defined(QT_NO_SYSTEMSEMAPHORE)) ++int QSharedMemoryPrivate::createUnixKeyFile(const QString &fileName) ++{ ++ Q_UNUSED(fileName); ++ return 0; ++} ++#endif // QT_NO_SHAREDMEMORY && QT_NO_SYSTEMSEMAPHORE ++ ++#ifndef QT_NO_SHAREDMEMORY ++ ++bool QSharedMemoryPrivate::cleanHandle() ++{ ++ if (hand > 0) ++ delete_area(hand); ++ ++ hand = -1; ++ ++ return true; ++} ++ ++bool QSharedMemoryPrivate::create(qsizetype size) ++{ ++ if (!handle()) ++ return false; ++ ++ const QLatin1String function("QSharedMemory::create"); ++ ++ const QString areaName = makePlatformSafeKey(key); ++ ++ if (find_area(areaName.toUtf8().constData()) > 0) { ++ errorString = QSharedMemory::tr("%1: already exists").arg(function); ++ error = QSharedMemory::AlreadyExists; ++ return false; ++ } ++ ++ hand = create_area(areaName.toUtf8().constData(), &memory, B_ANY_ADDRESS, size, ++ B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); ++ ++ if (hand <= B_ERROR) { ++ switch (hand) { ++ case B_NO_MEMORY: ++ errorString = QSharedMemory::tr("%1: not enough memory").arg(function); ++ error = QSharedMemory::OutOfResources; ++ break; ++ case B_BAD_VALUE: ++ errorString = QSharedMemory::tr("%1: bad area name").arg(function); ++ error = QSharedMemory::KeyError; ++ break; ++ default: ++ errorString = QSharedMemory::tr("%1: unknown error").arg(function); ++ error = QSharedMemory::UnknownError; ++ break; ++ } ++ return false; ++ } ++ ++ return true; ++} ++ ++bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) ++{ ++ const QLatin1String function("QSharedMemory::attach"); ++ ++ const QString areaName = makePlatformSafeKey(key); ++ ++ uint32 permissions = mode == QSharedMemory::ReadOnly ? B_READ_AREA : B_READ_AREA | B_WRITE_AREA; ++ ++ if (hand <= B_ERROR) { ++ area_id baseArea = find_area(areaName.toUtf8().constData()); ++ if (baseArea <= B_ERROR) { ++ error = QSharedMemory::NotFound; ++ errorString = QSharedMemory::tr("%1: doesn't exist").arg(function); ++ cleanHandle(); ++ return false; ++ } ++ ++ hand = clone_area(areaName.toUtf8().constData(), &memory, B_ANY_ADDRESS, permissions, baseArea); ++ if (hand <= B_ERROR) { ++ error = QSharedMemory::UnknownError; ++ errorString = QSharedMemory::tr("%1: clone_area failed").arg(function); ++ cleanHandle(); ++ return false; ++ } ++ } ++ ++ area_info info; ++ if (get_area_info(hand, &info) != B_OK) { ++ error = QSharedMemory::UnknownError; ++ errorString = QSharedMemory::tr("%1: size query failed").arg(function); ++ cleanHandle(); ++ return false; ++ } ++ ++ size = info.size; ++ memory = info.address; ++ ++ return true; ++} ++ ++bool QSharedMemoryPrivate::detach() ++{ ++ const QLatin1String function("QSharedMemory::detach"); ++ ++ area_id id = area_for(memory); ++ ++ if (id == B_ERROR) { ++ error = QSharedMemory::NotFound; ++ errorString = QSharedMemory::tr("%1: doesn't exist").arg(function); ++ return false; ++ } ++ ++ if (delete_area(id) != B_OK) { ++ error = QSharedMemory::UnknownError; ++ errorString = QSharedMemory::tr("%1: delete_area failed").arg(function); ++ return false; ++ } ++ ++ memory = 0; ++ size = 0; ++ ++ return cleanHandle(); ++} ++ ++ ++QT_END_NAMESPACE ++ ++#endif // QT_NO_SHAREDMEMORY +diff --git a/src/corelib/kernel/qsharedmemory_p.h b/src/corelib/kernel/qsharedmemory_p.h +index e06e7e8..e0bd23f 100644 +--- a/src/corelib/kernel/qsharedmemory_p.h ++++ b/src/corelib/kernel/qsharedmemory_p.h +@@ -78,10 +78,14 @@ QT_END_NAMESPACE + # include "private/qobject_p.h" + #endif + +-#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_RTEMS) ++#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_RTEMS) && !defined(Q_OS_HAIKU) + # include + #endif + ++#if defined(Q_OS_HAIKU) ++# include ++#endif ++ + QT_BEGIN_NAMESPACE + + #ifndef QT_NO_SYSTEMSEMAPHORE +@@ -144,6 +148,8 @@ public: + const QString &prefix = QLatin1String("qipc_sharedmemory_")); + #ifdef Q_OS_WIN + Qt::HANDLE handle(); ++#elif defined(Q_OS_HAIKU) ++ area_id handle(); + #elif defined(QT_POSIX_IPC) + int handle(); + #else +@@ -171,6 +177,8 @@ public: + private: + #ifdef Q_OS_WIN + Qt::HANDLE hand; ++#elif defined(Q_OS_HAIKU) ++ area_id hand; + #elif defined(QT_POSIX_IPC) + int hand; + #else +-- +2.30.2 + diff --git a/dev-qt/qt6-base/qt6_base-6.2.0.recipe b/dev-qt/qt6-base/qt6_base-6.2.0.recipe new file mode 100644 index 000000000..dc935eb7c --- /dev/null +++ b/dev-qt/qt6-base/qt6_base-6.2.0.recipe @@ -0,0 +1,202 @@ +SUMMARY="A cross-platform application and UI framework" +DESCRIPTION="Qt is a cross-platform application framework that is widely \ +used for developing software with a graphical user interface, and also used \ +for developing non-GUI programs such as command-line tools and consoles for \ +servers." +HOMEPAGE="https://qt.io/" +COPYRIGHT="2015-2021 The Qt Company Ltd." +LICENSE="GNU LGPL v3 + GNU GPL v3 + FDL" +REVISION="1" +SOURCE_URI="https://download.qt.io/official_releases/qt/${portVersion%.*}/$portVersion/submodules/qtbase-everywhere-src-$portVersion.tar.xz" +CHECKSUM_SHA256="fdfff0716d093bcb6bcd53746ce1d3c9701a6bf3326d47813866d43949b47769" +SOURCE_DIR="qtbase-everywhere-src-$portVersion" +srcGitRev2="31711ded19261c7d98d48c4cebfdd70a40bd9212" +SOURCE_URI_2="https://github.com/threedeyes/qt6-haikuplugins/archive/$srcGitRev2.tar.gz" +CHECKSUM_SHA256_2="c1e0042b96c393f696addf731ff2fa9fa3e93dc81bdcc98fae2a5a260364ca01" +SOURCE_DIR_2="qt6-haikuplugins-$srcGitRev2" +PATCHES="qt6_base-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + qt6_base$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Concurrent$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Core$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Core5Compat$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6DBus$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6EglFSDeviceIntegration$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Gui$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Network$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6OpenGL$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6OpenGLWidgets$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6PrintSupport$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Sql$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Test$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6UiTools$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Widgets$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Xml$secondaryArchSuffix = $portVersion compat >= 6 + " +REQUIRES=" + haiku$secondaryArchSuffix + haiku_svg_icon_theme + lib:libcrypto$secondaryArchSuffix + lib:libdouble_conversion$secondaryArchSuffix + lib:libegl$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix + lib:libgl$secondaryArchSuffix + lib:libharfbuzz$secondaryArchSuffix + lib:libicudata$secondaryArchSuffix >= 66 + lib:libicui18n$secondaryArchSuffix >= 66 + lib:libicuuc$secondaryArchSuffix >= 66 + lib:libintl$secondaryArchSuffix + lib:libpcre2_16$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + cmd:qsystray + cmd:qnotify + " + +PROVIDES_devel=" + qt6_base${secondaryArchSuffix}_devel = $portVersion compat >= 6 + devel:libQt6Concurrent$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Core$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6DBus$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6DeviceDiscoverySupport = $portVersion compat >= 6 + devel:libQt6EdidSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6EglFSDeviceIntegration$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6FBSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Gui$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Network$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6OpenGL$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6OpenGLWidgets$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6PrintSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Sql$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Test$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Widgets$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Xml$secondaryArchSuffix = $portVersion compat >= 6 + cmd:qmake6 = $portVersion compat >= 6 + cmd:qtpaths6 = $portVersion compat >= 6 + " +REQUIRES_devel=" + haiku${secondaryArchSuffix}_devel + qt6_base$secondaryArchSuffix == $portVersion base + devel:libgl$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcrypto$secondaryArchSuffix + devel:libdouble_conversion$secondaryArchSuffix >= 3 + devel:libegl$secondaryArchSuffix + devel:libfontconfig$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libgl$secondaryArchSuffix + devel:libglu$secondaryArchSuffix + devel:libharfbuzz$secondaryArchSuffix + devel:libicuuc$secondaryArchSuffix >= 66 + devel:libjpeg$secondaryArchSuffix + devel:libpcre2_16$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libsqlite3$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:awk + cmd:cmake + cmd:find + cmd:g++$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:ninja + cmd:perl + cmd:pkg_config$secondaryArchSuffix + cmd:python3.9 + cmd:sed + cmd:xargs + " + +BUILD() +{ + export DISABLE_ASLR=1 + + cmake \ + -B build \ + -S $sourceDir \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS=-fPIC \ + -DCMAKE_CXX_FLAGS=-fPIC \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DBUILD_WITH_PCH=ON \ + -DINSTALL_BINDIR=$libDir/Qt6 \ + -DINSTALL_PUBLICBINDIR=$binDir \ + -DINSTALL_PLUGINSDIR=$addOnsDir/Qt6 \ + -DINSTALL_LIBDIR=$libDir \ + -DINSTALL_LIBEXECDIR=$libExecDir/Qt6 \ + -DINSTALL_DOCDIR=$docDir \ + -DINSTALL_ARCHDATADIR=$dataDir/Qt6 \ + -DINSTALL_DATADIR=$dataDir/Qt6 \ + -DINSTALL_INCLUDEDIR=$includeDir/Qt6 \ + -DINSTALL_MKSPECSDIR=$dataDir/Qt6/mkspecs \ + -DINSTALL_EXAMPLESDIR=$dataDir/Qt6/examples \ + -DINSTALL_QMLDIR=$dataDir/Qt6/qml \ + -DINSTALL_TRANSLATIONSDIR=$dataDir/Qt6/translations \ + -DQT_QMAKE_TARGET_MKSPEC=haiku-g++ \ + -DQT_FEATURE_openssl_linked=ON \ + -DQT_FEATURE_system_sqlite=ON \ + -DQT_FEATURE_glib=OFF \ + -DFEATURE_rpath=OFF + + ninja -C build $jobArgs +} + +INSTALL() +{ + ninja -C build install + + # build platform plugins + PATH=$PATH:$binDir:$libExecDir/Qt6 + mkdir -p $sourceDir2/build $preferencesDir + cd $sourceDir2/build + qmake6 ../src + make $jobArgs + make install + cp preferences/Qt6Configurator $preferencesDir + + prepareInstalledDevelLibs \ + libQt6Concurrent libQt6Core libQt6DBus libQt6EglFSDeviceIntegration \ + libQt6Gui libQt6Network libQt6OpenGL libQt6OpenGLWidgets \ + libQt6PrintSupport libQt6Sql libQt6Test libQt6Widgets libQt6Xml \ + libQt6FbSupport libQt6DeviceDiscoverySupport + + cd $libDir + for i in lib*.so.6.*;do + ln -fs $i $(echo $i | cut -f1,2 -d.) + done + + # fix paths for static libs + sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, \ + $libDir/cmake/Qt6FbSupportPrivate/Qt6FbSupportPrivateTargets-release.cmake + sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, \ + $libDir/cmake/Qt6DeviceDiscoverySupportPrivate/Qt6DeviceDiscoverySupportPrivateTargets-release.cmake + + mkdir -p $binDir + ln -s -t $binDir $libExecDir/Qt6/{qmake6,qtpaths6} + + rm -rf $(dirname "$docDir") + + packageEntries devel \ + $developDir \ + $binDir \ + $libDir/cmake \ + $dataDir/Qt6/mkspecs + + addPreferencesDeskbarSymlink $preferencesDir/Qt6Configurator "Qt6 Configurator" +}