From 557902a281a5eb38adc02200d3452b253dcd9c98 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Fri, 20 Oct 2023 20:04:43 +0300 Subject: [PATCH] qt.io/qt5 (#3545) * + * deps * . * wip * provides * qt => qt5 * wip * fix args * qt5 => qt * rebuilt zstd; try llvm * wip * flags * add c/xx/ldflags * maybe? * maybe this? * last try * skip version tagging * i think based on what i learned with libtirpc, this is it. * std::move is c++11 * waiting for this to build is SO BORING, so I'm pushing it to CI. * llvm <16 * add CXXFLAGS * use LFLAGS * -ldl on linux * unicode/debugging * missing executables * CC | CXX | LD on linux * llvm * wip * make --------- Co-authored-by: Jacob Heider --- projects/qt.io/hello.pro | 8 ++ projects/qt.io/main.cpp | 9 ++ projects/qt.io/package.yml | 219 +++++++++++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+) create mode 100644 projects/qt.io/hello.pro create mode 100644 projects/qt.io/main.cpp create mode 100644 projects/qt.io/package.yml diff --git a/projects/qt.io/hello.pro b/projects/qt.io/hello.pro new file mode 100644 index 00000000..ea9b9ad7 --- /dev/null +++ b/projects/qt.io/hello.pro @@ -0,0 +1,8 @@ +QT += core +QT -= gui +TARGET = hello +CONFIG += console +CONFIG -= app_bundle +TEMPLATE = app +SOURCES += main.cpp +QMAKE_LFLAGS += -Wl,-rpath,$$(PKGX_DIR) diff --git a/projects/qt.io/main.cpp b/projects/qt.io/main.cpp new file mode 100644 index 00000000..6665c2a2 --- /dev/null +++ b/projects/qt.io/main.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + qDebug() << "Hello World!"; + return 0; +} \ No newline at end of file diff --git a/projects/qt.io/package.yml b/projects/qt.io/package.yml new file mode 100644 index 00000000..bfed4dbb --- /dev/null +++ b/projects/qt.io/package.yml @@ -0,0 +1,219 @@ +distributable: + url: https://download.qt.io/official_releases/qt/{{version.marketing}}/{{version}}/single/qt-everywhere-opensource-src-{{version}}.tar.xz + strip-components: 1 +versions: + - 5.15.10 +dependencies: + freetype.org: '*' + gnome.org/glib: '*' + libjpeg-turbo.org: '*' + libpng.org: '*' + pcre.org/v2: '*' + google.com/webp: '*' + gnu.org/bison: '*' + github.com/westes/flex: '*' + kerberos.org: '*' + gnome.org/libxslt: '*' + sqlite.org: '*' + unicode.org: ^71 + linux: + alsa-project.org/alsa-lib: '*' + freedesktop.org/fontconfig: '*' + harfbuzz.org: '*' + unicode.org: ~71 + dri.freedesktop.org: '*' + libevent.org: '*' + x.org/ice: '*' + x.org/sm: '*' + webmproject.org/libvpx: '*' + x.org/xcomposite: '*' + xkbcommon.org: ~1.5 + x.org/xkbfile: '*' + x.org/xrandr: '*' + x.org/xtst: '*' + mesa3d.org: '*' + zlib.net/minizip: '*' + mozilla.org/nss: '*' + opus-codec.org: '*' + libsdl.org: '*' + google.github.io/snappy: '*' + systemd.io: '*' + wayland.freedesktop.org: '*' + freedesktop.org/xcb-util: '*' + freedesktop.org/xcb-util-image: '*' + freedesktop.org/xcb-util-keysyms: '*' + freedesktop.org/xcb-util-renderutil: '*' + freedesktop.org/xcb-util-wm: '*' + facebook.com/zstd: '*' +build: + dependencies: + nodejs.org: '*' + freedesktop.org/pkg-config: '*' + python.org: '>=2.7' + gnu.org/gperf: '*' + perl.org: '>=5.12' + ruby-lang.org: '>=1.9.3' + linux: + llvm.org: '<16' + gnu.org/make: '*' + script: + # this is a weird one; doesn't seem to get run by the makefile + # https://forum.qt.io/post/640699 + - run: | + mkdir -p .rcc + perl mimetypes/mime/generate.pl mimetypes/mime/packages/freedesktop.org.xml > .rcc/qmimeprovider_database.cpp + working-directory: qtbase/src/corelib + # MacPorts found this one: + # https://github.com/macports/macports-ports/pull/18656/files + - run: | + sed -i.bak -e'/#include /a\ + #include // std::move\ + ' unique_any.hpp + rm unique_any.hpp.bak + working-directory: qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util + - ./configure $ARGS + - make --jobs {{hw.concurrency}} + - make -j1 install + env: + ARGS: + - -verbose + - -prefix {{prefix}} + - -release + - -opensource -confirm-license + - -nomake examples + - -nomake tests + - -pkg-config + - -dbus-runtime + - -proprietary-codecs + - -system-freetype + - -system-libjpeg + - -system-libpng + - -system-pcre + - -system-zlib + linux: + LD: clang + ARGS: + - -R{{prefix}}/lib + - -no-avx2 + - -no-avx512 + - -no-sql-mysql + - -platform linux-clang + - QMAKE_LFLAGS=-Wl,-rpath,{{pkgx.prefix}},-ldl + darwin: + ARGS: + - -no-rpath + - QMAKE_LFLAGS=-Wl,-rpath,{{pkgx.prefix}} + darwin/aarch64: + ARGS: + - -no-assimp +provides: + linux: + - bin/assistant + - bin/balsam + - bin/canbusutil + - bin/designer + - bin/lconvert + - bin/linguist + - bin/lprodump + - bin/lrelease + - bin/lrelease-pro + - bin/lupdate + - bin/lupdate-pro + - bin/meshdebug + - bin/moc + - bin/pixeltool + - bin/qcollectiongenerator + - bin/qdbus + - bin/qdbuscpp2xml + - bin/qdbusviewer + - bin/qdbusxml2cpp + - bin/qdistancefieldgenerator + - bin/qdoc + - bin/qgltf + - bin/qhelpgenerator + - bin/qlalr + - bin/qmake + - bin/qml + - bin/qmlcachegen + - bin/qmleasing + - bin/qmlformat + - bin/qmlimportscanner + - bin/qmllint + - bin/qmlmin + - bin/qmlplugindump + - bin/qmlpreview + - bin/qmlprofiler + - bin/qmlscene + - bin/qmltestrunner + - bin/qmltime + - bin/qmltyperegistrar + - bin/qscxmlc + - bin/qtattributionsscanner + - bin/qtdiag + - bin/qtpaths + - bin/qtplugininfo + - bin/qtwaylandscanner + - bin/qvkgen + - bin/rcc + - bin/repc + - bin/tracegen + - bin/uic + - bin/xmlpatterns + - bin/xmlpatternsvalidator + darwin: + - bin/balsam + - bin/canbusutil + - bin/lconvert + - bin/lprodump + - bin/lrelease + - bin/lrelease-pro + - bin/lupdate + - bin/lupdate-pro + - bin/meshdebug + - bin/moc + - bin/qcollectiongenerator + - bin/qdbus + - bin/qdbuscpp2xml + - bin/qdbusxml2cpp + - bin/qdistancefieldgenerator + - bin/qhelpgenerator + - bin/qlalr + - bin/qmake + - bin/qmlcachegen + - bin/qmleasing + - bin/qmlformat + - bin/qmlimportscanner + - bin/qmllint + - bin/qmlmin + - bin/qmlplugindump + - bin/qmlpreview + - bin/qmlprofiler + - bin/qmlscene + - bin/qmltestrunner + - bin/qmltime + - bin/qmltyperegistrar + - bin/qscxmlc + - bin/qtattributionsscanner + - bin/qtdiag + - bin/qtpaths + - bin/qtplugininfo + - bin/qvkgen + - bin/rcc + - bin/repc + - bin/tracegen + - bin/uic + - bin/xmlpatterns + - bin/xmlpatternsvalidator +test: + dependencies: + linux: + llvm.org: '*' + gnu.org/make: '*' + script: + - qmake hello.pro + - make + - run: otool -l hello + if: darwin + - run: ldd hello + if: linux + - ./hello \ No newline at end of file