-
Notifications
You must be signed in to change notification settings - Fork 41
refactor: unify DTK5/DTK6 build system #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,48 @@ | ||
| Source: dde-qt5platform-plugins | ||
| Section: devel | ||
| Priority: optional | ||
| Maintainer: Deepin Packages Builder <[email protected]> | ||
| Build-Depends: debhelper (>=9), qtbase5-dev, qtbase5-private-dev, | ||
| pkg-config, libqt5x11extras5-dev, libxcb-xkb-dev, libxcb-render-util0-dev, | ||
| libxcb-image0-dev, libxcb-icccm4-dev, libxcb-keysyms1-dev, libegl1-mesa-dev, | ||
| libmtdev-dev, libxkbcommon-x11-dev, libdbus-1-dev, libqt5opengl5-dev, | ||
| libudev-dev, libxrender-dev,libxi-dev, libsm-dev, libxcb-xinerama0-dev, | ||
| libfontconfig1-dev, libglib2.0-dev, libxcb-damage0-dev, | ||
| libxcb-composite0-dev, libcairo2-dev, libkf5wayland-dev, libdwayland-dev, | ||
| qtwayland5-private-dev | libqt5waylandclient5-dev, | ||
| libwayland-dev, libxcb-xinput-dev, libxcb-util-dev | libxcb-util0-dev, | ||
| libx11-xcb-dev, libxcb-sync-dev, libxcb-randr0-dev, cmake, libgtest-dev, libgmock-dev, libdtkcommon-dev(>=5.6.16) | ||
| Maintainer: Shanshan Ye <[email protected]> | ||
| Build-Depends: debhelper-compat (= 12), | ||
| cmake, | ||
| pkg-config, | ||
| libgtest-dev, | ||
| libgmock-dev, | ||
| libdtkcommon-dev(>=5.6.16), | ||
| qtbase5-dev <!nodtk5>, | ||
| qtbase5-private-dev <!nodtk5>, | ||
| libqt5x11extras5-dev <!nodtk5>, | ||
| libqt5opengl5-dev <!nodtk5>, | ||
| qtwayland5-private-dev | libqt5waylandclient5-dev <!nodtk5>, | ||
| qt6-base-dev <!nodtk6>, | ||
| qt6-base-private-dev <!nodtk6>, | ||
| libxcb-cursor-dev <!nodtk6>, | ||
| libxcb-xkb-dev, | ||
| libxcb-render-util0-dev, | ||
| libxcb-image0-dev, | ||
| libxcb-icccm4-dev, | ||
| libxcb-keysyms1-dev, | ||
| libegl1-mesa-dev, | ||
| libmtdev-dev, | ||
| libxkbcommon-x11-dev, | ||
| libdbus-1-dev, | ||
| libudev-dev, | ||
| libxrender-dev, | ||
| libxi-dev, | ||
| libsm-dev, | ||
| libxcb-xinerama0-dev, | ||
| libfontconfig1-dev, | ||
| libglib2.0-dev, | ||
| libxcb-damage0-dev, | ||
| libxcb-composite0-dev, | ||
| libcairo2-dev, | ||
| libkf5wayland-dev <!nodtk5>, | ||
| libdwayland-dev <!nodtk5>, | ||
| libwayland-dev, | ||
| libxcb-xinput-dev, | ||
| libxcb-util-dev | libxcb-util0-dev, | ||
| libx11-xcb-dev, | ||
| libxcb-sync-dev, | ||
| libxcb-randr0-dev | ||
| Standards-Version: 3.9.8 | ||
|
|
||
| Package: dde-qt5xcb-plugin | ||
|
|
@@ -21,11 +52,20 @@ Conflicts: libqt5dxcb-plugin, qt5dxcb-plugin | |
| Breaks:dde-qt5integration (<< 0.2.8.1) | ||
| Replaces: qt5dxcb-plugin | ||
| Depends: ${shlibs:Depends}, ${misc:Depends} | ||
| Description: Qt platform plugins | ||
| Build-Profiles: <!nodtk5> | ||
| Description: Qt platform plugins (DTK5 with Qt5) | ||
| Qt platform plugins for DDE. | ||
|
|
||
| Package: dde-qt5wayland-plugin | ||
| Architecture: any | ||
| Depends: ${shlibs:Depends}, ${misc:Depends}, qtwayland5 | ||
| Description: Qt platform plugins | ||
| Build-Profiles: <!nodtk5> | ||
| Description: Qt platform plugins (DTK5 with Qt5) | ||
| Qt platform plugins for DDE. | ||
|
|
||
| Package: dde-qt6xcb-plugin | ||
| Architecture: any | ||
| Depends: ${shlibs:Depends}, ${misc:Depends} | ||
| Build-Profiles: <!nodtk6> | ||
| Description: Qt platform plugins (DTK6 with Qt6) | ||
| Qt platform plugins for DDE (Qt6 version). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| usr/lib/*/qt6/plugins/platforms/libdxcb.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,64 @@ | ||
| #!/usr/bin/make -f | ||
| DPKG_EXPORT_BUILDFLAGS = 1 | ||
| include /usr/share/dpkg/default.mk | ||
|
|
||
| # 安全编译参数 | ||
| export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
| export DEB_CFLAGS_MAINT_APPEND = -Wall | ||
| export DEB_CXXFLAGS_MAINT_APPEND = -Wall | ||
| export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E | ||
|
|
||
| # Build-Profiles 控制 | ||
| BUILD_DTK5 := $(if $(filter nodtk5,$(DEB_BUILD_PROFILES)),OFF,ON) | ||
| BUILD_DTK6 := $(if $(filter nodtk6,$(DEB_BUILD_PROFILES)),OFF,ON) | ||
|
|
||
| %: | ||
| dh $@ | ||
| dh $@ | ||
|
|
||
| override_dh_auto_configure: | ||
| ifeq ($(BUILD_DTK5),ON) | ||
| mkdir -p build5 | ||
| QT_SELECT=qt5 dh_auto_configure --builddirectory=build5 -- \ | ||
| $(DEB_CMAKE_EXTRA_FLAGS) \ | ||
| -DBUILD_TESTING=OFF \ | ||
| -DDTK5=ON | ||
| endif | ||
| ifeq ($(BUILD_DTK6),ON) | ||
| mkdir -p build6 | ||
| dh_auto_configure --builddirectory=build6 -- \ | ||
| $(DEB_CMAKE_EXTRA_FLAGS) \ | ||
| -DBUILD_TESTING=OFF \ | ||
| -DDTK5=OFF | ||
| endif | ||
|
|
||
| override_dh_auto_build: | ||
| ifeq ($(BUILD_DTK5),ON) | ||
| QT_SELECT=qt5 dh_auto_build --builddirectory=build5 | ||
| endif | ||
| ifeq ($(BUILD_DTK6),ON) | ||
| dh_auto_build --builddirectory=build6 | ||
| endif | ||
|
|
||
| override_dh_auto_install: | ||
| ifeq ($(BUILD_DTK5),ON) | ||
| QT_SELECT=qt5 dh_auto_install --builddirectory=build5 | ||
| endif | ||
| ifeq ($(BUILD_DTK6),ON) | ||
| dh_auto_install --builddirectory=build6 | ||
| endif | ||
|
|
||
| override_dh_auto_test: | ||
| ifeq ($(BUILD_DTK5),ON) | ||
| QT_SELECT=qt5 dh_auto_test --builddirectory=build5 | ||
| endif | ||
| ifeq ($(BUILD_DTK6),ON) | ||
| dh_auto_test --builddirectory=build6 | ||
| endif | ||
|
|
||
| override_dh_shlibdeps: | ||
| dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info | ||
|
|
||
| override_dh_auto_clean: | ||
| dh_auto_clean --builddirectory=build5 | ||
| dh_auto_clean --builddirectory=build6 | ||
| rm -rf build5 build6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种写法能达到预期的效果吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没试过,AI写的,要相信它,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
又问ai确认了下,是可以的,