Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 515304 Details for
Bug 644748
[Prefix/Cygwin] Qt5 (5.9.3) Cygwin support patches
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
QtCore specific patches to build and install on cygwin
qtcore-5.9.3-fix_build_on_cygwin_prefix.patch (text/plain), 11.90 KB, created by
Sven Eden
on 2018-01-19 11:54:39 UTC
(
hide
)
Description:
QtCore specific patches to build and install on cygwin
Filename:
MIME Type:
Creator:
Sven Eden
Created:
2018-01-19 11:54:39 UTC
Size:
11.90 KB
patch
obsolete
># ===================================================================== ># === Patches specific to qtcore === ># ===================================================================== >--- a/qmake/generators/makefile.cpp 2018-01-18 11:58:43.504910900 +0100 >+++ b/qmake/generators/makefile.cpp 2018-01-18 11:58:43.661196100 +0100 >@@ -1088,6 +1088,13 @@ > int dot = ret.indexOf('.'); > if(dot != -1) > ret.truncate(dot); >+ if(!project->isEmpty("QMAKE_CYGWIN_SHLIB")) { >+ if(ret.startsWith("cyg")) >+ ret = "lib" + ret.mid(3); >+ int dash = ret.indexOf('-'); >+ if(dash != -1) >+ ret.truncate(dash); >+ } > ret += Option::prl_ext; > } > if(!project->isEmpty("QMAKE_BUNDLE")) >@@ -3154,11 +3161,14 @@ > int slsh = ret.lastIndexOf(Option::dir_sep); > if (slsh != -1) > ret = ret.right(ret.length() - slsh - 1); >- if (ret.startsWith("lib")) >+ if (ret.startsWith("lib") || ret.startsWith("cyg")) > ret = ret.mid(3); > int dot = ret.indexOf('.'); > if (dot != -1) > ret = ret.left(dot); >+ int dash = ret.indexOf('-'); >+ if (dash != -1) >+ ret = ret.left(dash); > } > ret += Option::pkgcfg_ext; > QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString(); >--- a/qmake/generators/unix/unixmake.cpp 2018-01-18 11:58:43.551817500 +0100 >+++ b/qmake/generators/unix/unixmake.cpp 2018-01-18 11:58:43.676822400 +0100 >@@ -588,11 +588,13 @@ > bundle = project->isActiveConfig("sliced_bundle") ? SlicedBundle : SolidBundle; > } else if(project->first("TEMPLATE") == "app") { > target = "$(QMAKE_TARGET)"; >+ if(!project->isEmpty("QMAKE_CYGWIN_EXE") && !target.endsWith(".exe")) >+ target += ".exe"; > } else if(project->first("TEMPLATE") == "lib") { > if (!project->isActiveConfig("staticlib") > && !project->isActiveConfig("plugin") > && !project->isActiveConfig("unversioned_libname")) { >- if(project->isEmpty("QMAKE_HPUX_SHLIB")) { >+ if(project->isEmpty("QMAKE_HPUX_SHLIB") && project->isEmpty("QMAKE_CYGWIN_SHLIB")) { > links << "$(TARGET0)" << "$(TARGET1)" << "$(TARGET2)"; > } else { > links << "$(TARGET0)"; >@@ -717,7 +719,10 @@ > link = link.right(link.length() - (lslash + 1)); > QString dst_link = escapeFilePath( > filePrefixRoot(root, fileFixify(targetdir + link, FileFixifyAbsolute))); >- ret += "\n\t-$(SYMLINK) $(TARGET) " + dst_link; >+ if(!project->isEmpty("QMAKE_CYGWIN_SHLIB")) >+ ret += "\n\t-$(INSTALL_FILE) \"" + destdir + "$(TARGET0)\" " + dst_link; >+ else >+ ret += "\n\t-$(SYMLINK) $(TARGET) " + dst_link; > if(!uninst.isEmpty()) > uninst.append("\n\t"); > uninst.append("-$(DEL_FILE) " + dst_link); >--- a/qmake/generators/unix/unixmake2.cpp 2018-01-18 11:58:43.614291000 +0100 >+++ b/qmake/generators/unix/unixmake2.cpp 2018-01-18 11:58:43.676822400 +0100 >@@ -180,7 +180,7 @@ > const ProStringList &incs = project->values("INCLUDEPATH"); > for(int i = 0; i < incs.size(); ++i) { > const ProString &inc = incs.at(i); >- if (inc.isEmpty()) >+ if ( (inc.isEmpty()) || (inc == "/usr/include") ) > continue; > > if (!isystem.isEmpty() && isSystemInclude(inc.toQString())) >@@ -603,6 +603,14 @@ > if(!project->isEmpty("QMAKE_POST_LINK")) > t << "\n\t" << var("QMAKE_POST_LINK"); > t << endl << endl; >+ } else if(!project->isEmpty("QMAKE_CYGWIN_SHLIB")) { >+ t << "\n\t" >+ << "-$(DEL_FILE) $(TARGET) $(TARGET0)" << "\n\t" >+ << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"; >+ if(!destdir.isEmpty()) >+ t << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t" >+ << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t" >+ << "-$(MOVE) $(TARGET) $(TARGET0) " << destdir; > } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) { > t << "\n\t"; > >@@ -1205,6 +1213,8 @@ > } > if(!project->isEmpty("TARGET")) > project->values("TARGET").first().prepend(project->first("DESTDIR")); >+ if(!project->isEmpty("QMAKE_CYGWIN_EXE")) >+ project->values("TARGET").first().append(".exe"); > } else if (project->isActiveConfig("staticlib")) { > project->values("TARGET").first().prepend(project->first("QMAKE_PREFIX_STATICLIB")); > project->values("TARGET").first() += "." + project->first("QMAKE_EXTENSION_STATICLIB"); >@@ -1237,9 +1247,10 @@ > project->values("TARGET_x.y").append(target); > } > } else if(project->isActiveConfig("plugin")) { >- QString prefix; >- if(!project->isActiveConfig("no_plugin_name_prefix")) >- prefix = "lib"; >+ ProString prefix; >+ if(!project->isActiveConfig("no_plugin_name_prefix")) { >+ prefix = project->first("QMAKE_PREFIX_SHLIB"); >+ } > project->values("TARGET_x.y.z").append(prefix + > project->first("TARGET") + "." + > project->first("QMAKE_EXTENSION_PLUGIN")); >@@ -1252,6 +1263,11 @@ > project->first("QMAKE_EXTENSION_PLUGIN") + > "." + project->first("VER_MAJ")); > project->values("TARGET") = project->values("TARGET_x.y.z"); >+ } else if (!project->isEmpty("QMAKE_CYGWIN_SHLIB")) { >+ project->values("TARGET_").append("lib" + project->first("TARGET") + ".dll.a"); >+ project->values("TARGET_x").append("cyg" + project->first("TARGET") + "-" + >+ project->first("VER_MAJ") + "." + project->first("QMAKE_EXTENSION_SHLIB")); >+ project->values("TARGET") = project->values("TARGET_x"); > } else if (!project->isEmpty("QMAKE_HPUX_SHLIB")) { > project->values("TARGET_").append("lib" + project->first("TARGET") + ".sl"); > if(project->isActiveConfig("lib_version_first")) >@@ -1382,6 +1398,8 @@ > project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME"); > } else { > project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SHLIB"); >+ if(!project->isEmpty("QMAKE_CYGWIN_SHLIB")) >+ project->values("QMAKE_LFLAGS") += "-Wl,--out-implib,$(TARGET0)"; > if(!project->isEmpty("QMAKE_LFLAGS_COMPAT_VERSION")) { > if(project->isEmpty("COMPAT_VERSION")) > project->values("QMAKE_LFLAGS") += QString(project->first("QMAKE_LFLAGS_COMPAT_VERSION") + >@@ -1419,6 +1437,13 @@ > int dot = ret.indexOf('.'); > if(dot != -1) > ret = ret.left(dot); >+ if(!project->isEmpty("QMAKE_CYGWIN_SHLIB")) { >+ if(ret.startsWith("cyg")) >+ ret = "lib" + ret.mid(3); >+ int dash = ret.indexOf('-'); >+ if(dash != -1) >+ ret = ret.left(dash); >+ } > ret += Option::libtool_ext; > if(!project->isEmpty("QMAKE_LIBTOOL_DESTDIR")) > ret.prepend(project->first("QMAKE_LIBTOOL_DESTDIR") + Option::dir_sep); >@@ -1460,9 +1485,14 @@ > if(project->isActiveConfig("plugin")) { > t << fileVar("TARGET"); > } else { >- if (project->isEmpty("QMAKE_HPUX_SHLIB")) >+ if (!project->isEmpty("QMAKE_CYGWIN_SHLIB")) { >+ t << fileVar("TARGET_"); >+ } else { >+ if (project->isEmpty("QMAKE_HPUX_SHLIB")) { > t << fileVar("TARGET_x.y.z") << ' '; >+ } > t << fileVar("TARGET_x") << ' ' << fileVar("TARGET_"); >+ } > } > t << "'\n\n"; > >--- a/src/3rdparty/forkfd/forkfd.c 2018-01-19 08:21:39.366409200 +0100 >+++ b/src/3rdparty/forkfd/forkfd.c 2018-01-19 08:21:39.381990300 +0100 >@@ -70,6 +70,11 @@ > # undef HAVE_WAITID > #endif > >+#if defined(__CYGWIN__) >+# undef HAVE_WAITID >+# define HAVE_PIPE2 1 >+#endif >+ > #if (defined(__FreeBSD__) && defined(__FreeBSD_version) && __FreeBSD_version >= 1000032) || \ > (defined(__OpenBSD__) && OpenBSD >= 201505) || \ > (defined(__NetBSD__) && __NetBSD_Version__ >= 600000000) >--- a/src/corelib/codecs/qiconvcodec.cpp 2018-01-18 11:58:42.890430700 +0100 >+++ b/src/corelib/codecs/qiconvcodec.cpp 2018-01-18 11:58:42.952898800 +0100 >@@ -433,7 +433,7 @@ > init(); > > iconv_t cd = (iconv_t) -1; >-#if defined(__GLIBC__) || !QT_CONFIG(posix_libiconv) || defined(Q_OS_QNX) >+#if defined(__GLIBC__) || !QT_CONFIG(posix_libiconv) || defined(Q_OS_QNX) || defined(Q_OS_CYGWIN) > #if defined(Q_OS_QNX) > // on QNX the default locale is UTF-8, and an empty string will cause iconv_open to fail > static const char empty_codeset[] = "UTF-8"; >--- a/src/corelib/global/qcompilerdetection.h 2018-01-19 08:21:39.085938100 +0100 >+++ b/src/corelib/global/qcompilerdetection.h 2018-01-19 08:21:39.117101300 +0100 >@@ -222,7 +222,7 @@ > # endif > # endif > >-# ifdef Q_OS_WIN >+# if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) > # define Q_DECL_EXPORT __declspec(dllexport) > # define Q_DECL_IMPORT __declspec(dllimport) > # elif defined(QT_VISIBILITY_AVAILABLE) >--- a/src/corelib/global/qglobal.cpp 2018-01-18 11:58:43.864290000 +0100 >+++ b/src/corelib/global/qglobal.cpp 2018-01-18 11:58:43.926806100 +0100 >@@ -2036,7 +2036,7 @@ > } > #endif > >-#elif defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINRT) >+#elif defined(Q_OS_WIN) || defined(Q_OS_WINRT) > > QT_BEGIN_INCLUDE_NAMESPACE > #include "qt_windows.h" >--- a/src/corelib/global/qsysinfo.h 2018-01-18 11:58:43.864290000 +0100 >+++ b/src/corelib/global/qsysinfo.h 2018-01-18 11:58:43.942446000 +0100 >@@ -212,7 +212,7 @@ > > QT_WARNING_PUSH > QT_WARNING_DISABLE_DEPRECATED >-#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) >+#if defined(Q_OS_WIN) > QT_SYSINFO_DEPRECATED_X("Use QOperatingSystemVersion::current()") static const WinVersion WindowsVersion; > QT_SYSINFO_DEPRECATED_X("Use QOperatingSystemVersion::current()") static WinVersion windowsVersion(); > #else >--- a/src/corelib/plugin/qlibrary.cpp 2018-01-18 11:58:42.250953200 +0100 >+++ b/src/corelib/plugin/qlibrary.cpp 2018-01-18 11:58:42.578839500 +0100 >@@ -615,7 +615,7 @@ > */ > bool QLibrary::isLibrary(const QString &fileName) > { >-#if defined(Q_OS_WIN) >+#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) > return fileName.endsWith(QLatin1String(".dll"), Qt::CaseInsensitive); > #else // Generic Unix > QString completeSuffix = QFileInfo(fileName).completeSuffix(); >--- a/src/corelib/plugin/qlibrary_unix.cpp 2018-01-18 11:58:42.297588200 +0100 >+++ b/src/corelib/plugin/qlibrary_unix.cpp 2018-01-18 11:58:42.578839500 +0100 >@@ -96,6 +96,12 @@ > } > #elif defined(Q_OS_AIX) > suffixes << ".a"; >+#elif defined(Q_OS_CYGWIN) >+ if (!fullVersion.isEmpty()) { >+ suffixes << QString::fromLatin1("-%1.dll").arg(fullVersion); >+ } else { >+ suffixes << QLatin1String(".dll"); >+ } > > #else > if (!fullVersion.isEmpty()) { >@@ -117,7 +123,11 @@ > > QStringList QLibraryPrivate::prefixes_sys() > { >+#if defined(Q_OS_CYGWIN) >+ return QStringList() << QLatin1String("cyg"); >+#else > return QStringList() << QLatin1String("lib"); >+#endif > } > > bool QLibraryPrivate::load_sys() >--- a/src/corelib/Qt5CoreConfigExtras.cmake.in 2018-01-19 08:21:38.876775900 +0100 >+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in 2018-01-19 08:21:38.954684800 +0100 >@@ -125,6 +125,7 @@ > !!ENDIF > > !!IF !isEmpty(CMAKE_WINDOWS_BUILD) >+!!IF isEmpty(CMAKE_CYGWIN_BUILD) > set(Qt5Core_QTMAIN_LIBRARIES Qt5::WinMain) > > if (NOT TARGET Qt5::WinMain) >@@ -182,6 +183,7 @@ > endif() > endif() > !!ENDIF >+!!ENDIF > > get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 644748
:
515030
|
515034
|
515138
|
515302
| 515304 |
515306
|
516034
|
516036
|
516040
|
516042
|
516538
|
520668