Skip to content

Commit

Permalink
feat: v23开源合规整改
Browse files Browse the repository at this point in the history
v23开源合规整改

Log: v23开源合规整改
  • Loading branch information
pengfeixx authored and deepin-bot[bot] committed Jan 6, 2023
1 parent 169ff36 commit 4fec7e4
Show file tree
Hide file tree
Showing 226 changed files with 22,430 additions and 23,152 deletions.
10 changes: 10 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Files: debian/*
Copyright: None
License: CC0-1.0

# patches
Files: patches/*
Copyright: None
License: CC0-1.0

# rpm
Files: rpm/*
Copyright: None
Expand Down Expand Up @@ -78,3 +83,8 @@ Files: deepin-movie.desktop
Copyright: UnionTech Software Technology Co., Ltd.
License: CC-BY-4.0

# com.deepin.movie.service
Files: com.deepin.movie.service
Copyright: UnionTech Software Technology Co., Ltd.
License: CC-BY-4.0

16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ find_package(PkgConfig REQUIRED)
pkg_check_modules(MPRIS REQUIRED IMPORTED_TARGET mpris-qt5)

# test deepin fork mpris-qt5
#try_compile(USE_FORK_MPRIS
# ${CMAKE_CURRENT_BINARY_DIR}/try_compile
# SOURCES
# ${CMAKE_CURRENT_SOURCE_DIR}/tests/mpris_test.cc
# LINK_LIBRARIES
# PkgConfig::MPRIS
# OUTPUT_VARIABLE TRY_COMPILE_OUTPUT
#)
try_compile(USE_FORK_MPRIS
${CMAKE_CURRENT_BINARY_DIR}/try_compile
SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/tests/mpris_test.cc
LINK_LIBRARIES
PkgConfig::MPRIS
OUTPUT_VARIABLE TRY_COMPILE_OUTPUT
)

message(STATUS "use deepin fork mpris-qt5: ${USE_FORK_MPRIS}")

Expand Down
32 changes: 32 additions & 0 deletions archlinux/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Maintainer: justforlxz <[email protected]>
pkgname=deepin-movie-git
pkgver=5.9.8.r48.g225c49e9
pkgrel=1
pkgdesc='Movie player based on mpv'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/deepin-movie-reborn"
license=('GPL3')
depends=('deepin-qt5integration-git' 'ffmpegthumbnailer' 'libxtst' 'mpv' 'qtdbusextended' 'qtmpris' 'gstreamer' 'glib2')
makedepends=('cmake' 'gtest' 'ninja' 'qt5-tools')
provides=('deepin-movie')
conflicts=('deepin-movie')
groups=('deepin-extra-git')
options=('!lto')
source=("source.tar.gz")
sha512sums=('SKIP')

prepare() {
cd $deepin_source_name
}

build() {
cd $deepin_source_name
export CXXFLAGS+=' -fpermissive'
cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release .
ninja
}

package() {
cd $deepin_source_name
DESTDIR="$pkgdir" ninja install
}
3 changes: 3 additions & 0 deletions com.deepin.movie.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=com.deepin.movie
Exec=/usr/bin/ll-cli run org.deepin.movie --exec deepin-movie
14 changes: 13 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ deepin-movie-reborn (6.0.1) unstable; urgency=medium
* New version 6.0.1.

-- muyuankai <[email protected]> Mon, 13 Jun 2022 10:40:00 +0800


deepin-movie-reborn (5.10.19) unstable; urgency=medium

* New version 5.10.19.

-- xiepengfei <[email protected]> Tue, 27 Dec 2022 16:49:20 +0800

deepin-movie-reborn (5.10.0) unstable; urgency=medium

* New version 5.10.0.

-- fengli <[email protected]> Tue, 13 Jul 2022 10:08:00 +0800

deepin-movie-reborn (3.0.0-1) unstable; urgency=low

* First release.
Expand Down
2 changes: 1 addition & 1 deletion debian/deepin-movie.install
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ usr/share/glib-2.0/schemas/com.deepin.deepin-movie.gschema.xml
usr/share/deepin-movie/translations/*.qm
usr/share/icons/*
usr/share/deepin-manual/manual-assets/application/*
/usr/share/dbus-1/services/com.deepin.Movie.service
/usr/share/dbus-1/services/com.deepin.movie.service
1 change: 0 additions & 1 deletion examples/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
1 change: 0 additions & 1 deletion examples/test/dmr_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
1 change: 0 additions & 1 deletion examples/test/window.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
1 change: 0 additions & 1 deletion examples/test/window.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
64 changes: 64 additions & 0 deletions linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package:
id: org.deepin.movie
name: "deepin-movie"
version: 5.9.13
kind: app
description: |
movie player for deepin os
variables:
extra_args: |
-DVERSION=${VERSION}
runtime:
id: org.deepin.Runtime
version: 23.0.0

depends:
- id: icu
version: 63.1
type: runtime
- id: qtmpris
version: 0.1.0.1
type: runtime
- id: ffmpegthumbnailer
version: 2.1.1
- id: mpv
version: 0.34.1.2
- id: qtdbusextended
version: 0.0.3
type: runtime
- id: ffmpeg
version: 4.1.8
- id: "gstreamer1.0"
version: 1.14.6
- id: "gst-plugins-base1.0"
version: 1.14.5
type: runtime
- id: libva
version: 2.4.0
- id: libdvdnav
version: 6.0.0
- id: libdvdread
version: 6.0.0
- id: orc
version: 0.4.28
- id: xcb-util
version: 0.3.8.1
type: runtime
source:
kind: local
url: "http://gerrit.uniontech.com/deepin-movie-reborn"
version: 5.9.13
commit: a41347f6a932f647242e36d5b92f3e30538fb988
patch: patches/fix-build-failed.patch

build:
kind: manual
manual:
configure: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} ${extra_args} ..
make -j6
make -j install
162 changes: 162 additions & 0 deletions patches/fix-build-failed.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
diff --git a/examples/test/CMakeLists.txt b/examples/test/CMakeLists.txt
index f2a2e76b..dee00f57 100644
--- a/examples/test/CMakeLists.txt
+++ b/examples/test/CMakeLists.txt
@@ -10,7 +10,7 @@ set(CMD_NAME dmr_test)
set(CMAKE_CXX_FLAGS "-std=c++1y -fpermissive -Wno-error")

include_directories(${CMAKE_INCLUDE_CURRENT_DIR})
-
+include_directories(/runtime/include)
find_package(Qt5Widgets)
find_package(Qt5Concurrent)
find_package(Qt5Network)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 10783d3b..2b12ab9b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,7 +14,7 @@ add_definitions(-D_MOVIE_USE_)

include_directories(${CMAKE_INCLUDE_CURRENT_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-
+include_directories(/runtime/include)
find_package(Qt5Widgets)
find_package(Qt5DBus)
find_package(Qt5X11Extras)
@@ -98,14 +98,14 @@ install(FILES ${PROJECT_SOURCE_DIR}/assets/resources/icons/logo-big.svg
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps
RENAME deepin-movie.svg)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/assets/deepin-movie DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-manual/manual-assets/application/)
-install (FILES ${CMAKE_SOURCE_DIR}/com.deepin.movie.service DESTINATION /usr/share/dbus-1/services/)
+install (FILES ${CMAKE_SOURCE_DIR}/com.deepin.movie.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dbus-1/services/)

#匹配mpris差异
-execute_process(COMMAND dpkg -s libmpris-qt5-1 COMMAND grep -i version COMMAND cut -d\ -f2 OUTPUT_VARIABLE libmprisVersion)
-message(${libmprisVersion})
-if( ${libmprisVersion} MATCHES "0.1.0-" )
- add_definitions(-D_LIBMPR_)
-endif()
+#execute_process(COMMAND dpkg -s libmpris-qt5-1 COMMAND grep -i version COMMAND cut -d\ -f2 OUTPUT_VARIABLE libmprisVersion)
+#message(${libmprisVersion})
+#if( ${libmprisVersion} MATCHES "0.1.0-" )
+# add_definitions(-D_LIBMPR_)
+#endif()

# 加速编译优化参数
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64")
diff --git a/src/backends/mpv/mpv_proxy.h b/src/backends/mpv/mpv_proxy.h
index 1256a069..30b4bd89 100644
--- a/src/backends/mpv/mpv_proxy.h
+++ b/src/backends/mpv/mpv_proxy.h
@@ -38,20 +38,33 @@ typedef void (*mpv_terminateDestroy)(mpv_handle *ctx);

static QString libPath(const QString &sLib)
{
- QDir dir;
- QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
- dir.setPath(path);
- QStringList list = dir.entryList(QStringList() << (sLib + "*"), QDir::NoDotAndDotDot | QDir::Files); //filter name with strlib
- if (list.contains(sLib)) {
- return sLib;
- } else {
- list.sort();
+ QDir dir;
+ QStringList environment = QProcess::systemEnvironment();
+ QString str, t_str;
+ foreach (str, environment) {
+ if (str.startsWith("LD_LIBRARY_PATH=")) {
+ t_str = str;
+ break;
+ }
}
-
- if(list.size() > 0)
- return list.last();
- else
+ if (t_str.isEmpty()) {
return QString();
+ }
+ qDebug() << t_str;
+ QStringList liststr = t_str.split("=").at(1).split(":");
+ QStringList t_list;
+ QString t_libPath;
+ for (size_t i = 0; i < liststr.count() ; i++) {
+ QString path = liststr.at(i);
+ dir.setPath(path);
+ QStringList list = dir.entryList(QStringList() << (sLib + "*"), QDir::NoDotAndDotDot | QDir::Files); //filter name with sLib
+ if (!list.isEmpty()) {
+ t_libPath = path + "/" + list.first();
+ break;
+ }
+ }
+ qDebug() << t_libPath;
+ return t_libPath;
}

class MpvHandle
diff --git a/src/libdmr/CMakeLists.txt b/src/libdmr/CMakeLists.txt
index c264f7e8..13babb3a 100644
--- a/src/libdmr/CMakeLists.txt
+++ b/src/libdmr/CMakeLists.txt
@@ -13,7 +13,6 @@ remove_definitions(-D_MOVIE_USE_)
pkg_check_modules(Gst REQUIRED IMPORTED_TARGET gstreamer-1.0 glib-2.0)

include_directories(${CMAKE_INCLUDE_CURRENT_DIR})
-
file(GLOB_RECURSE SRCS LIST_DIRECTORIES false *.cpp)
file(GLOB_RECURSE MPV_SRCS LIST_DIRECTORIES false ../backends/mpv/*.cpp)
file(GLOB_RECURSE MEDIAPLAYER_SRCS LIST_DIRECTORIES false ../backends/mediaplayer/*.cpp)
diff --git a/src/libdmr/compositing_manager.cpp b/src/libdmr/compositing_manager.cpp
index 9b117fcf..52ade8f7 100644
--- a/src/libdmr/compositing_manager.cpp
+++ b/src/libdmr/compositing_manager.cpp
@@ -235,22 +235,35 @@ bool CompositingManager::isCanHwdec()
return m_bCanHwdec;
}

-QString CompositingManager::libPath(const QString &sLib)
+QString CompositingManager::libPath(const QString &strlib)
{
- QDir dir;
- QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
- dir.setPath(path);
- QStringList list = dir.entryList(QStringList() << (sLib + "*"), QDir::NoDotAndDotDot | QDir::Files); //filter name with strlib
- if (list.contains(sLib)) {
- return (path+ QDir::separator() + sLib);
- } else {
- list.sort();
+ QDir dir;
+ QStringList environment = QProcess::systemEnvironment();
+ QString str, t_str;
+ foreach (str, environment) {
+ if (str.startsWith("LD_LIBRARY_PATH=")) {
+ t_str = str;
+ break;
+ }
}
-
- if(list.size() > 0)
- return (path + QDir::separator() + list.last());
- else
+ if (t_str.isEmpty()) {
return QString();
+ }
+ qDebug() << t_str;
+ QStringList liststr = t_str.split("=").at(1).split(":");
+ QStringList t_list;
+ QString t_libPath;
+ for (size_t i = 0; i < liststr.count() ; i++) {
+ QString path = liststr.at(i);
+ dir.setPath(path);
+ QStringList list = dir.entryList(QStringList() << (strlib + "*"), QDir::NoDotAndDotDot | QDir::Files); //filter name with strlib
+ if (!list.isEmpty()) {
+ t_libPath = path + "/" + list.first();
+ break;
+ }
+ }
+ qDebug() << t_libPath;
+ return t_libPath;
}

void CompositingManager::setCanHwdec(bool bCanHwdec)
Empty file added patches/series
Empty file.
14 changes: 3 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -99,22 +98,15 @@ install(FILES ${PROJECT_SOURCE_DIR}/assets/resources/icons/logo-big.svg
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps
RENAME deepin-movie.svg)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/assets/deepin-movie DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-manual/manual-assets/application/)
install (FILES ${CMAKE_SOURCE_DIR}/com.deepin.movie.service DESTINATION /usr/share/dbus-1/services/)

#匹配mpris差异
execute_process(COMMAND dpkg -s libmpris-qt5-1 COMMAND grep -i version COMMAND cut -d\ -f2 OUTPUT_VARIABLE libmprisVersion)
message(${libmprisVersion})
if( ${libmprisVersion} MATCHES "0.1.0-" )
add_definitions(-D_LIBMPR_)
endif()
install (FILES ${CMAKE_SOURCE_DIR}/com.deepin.movie.service DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services/)

# 加速编译优化参数
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64")
SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi -Wl,--as-need -fPIE -z noexecstack")
SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi -Wl,--as-needed -fPIE -z noexecstack")
SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi -z noexecstack")
SET(CMAKE_EXE_LINKER_FLAGS "-pie")
else()
SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 -O3 -DNDEBUG -fPIC -Wl,--as-need -fPIE")
SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 -O3 -DNDEBUG -fPIC -Wl,--as-needed -fPIE")
SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 -O3 -DNDEBUG -fPIC")
SET(CMAKE_EXE_LINKER_FLAGS "-pie")
endif()
Expand Down
2 changes: 0 additions & 2 deletions src/accessibility/ac-deepin-movie-define.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (C) 2020 UOS Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
Loading

0 comments on commit 4fec7e4

Please sign in to comment.