Merge pull request #215238 from wineee/deepin-reader1
deepin.deepin-reader: init at 5.10.28
This commit is contained in:
commit
b1d83b3c79
3 changed files with 121 additions and 0 deletions
74
pkgs/desktops/deepin/apps/deepin-reader/default.nix
Normal file
74
pkgs/desktops/deepin/apps/deepin-reader/default.nix
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, qmake
|
||||||
|
, pkg-config
|
||||||
|
, qttools
|
||||||
|
, wrapQtAppsHook
|
||||||
|
, dtkwidget
|
||||||
|
, qt5integration
|
||||||
|
, qt5platform-plugins
|
||||||
|
, dde-qt-dbus-factory
|
||||||
|
, qtwebengine
|
||||||
|
, karchive
|
||||||
|
, poppler
|
||||||
|
, libchardet
|
||||||
|
, libspectre
|
||||||
|
, openjpeg
|
||||||
|
, djvulibre
|
||||||
|
, gtest
|
||||||
|
, qtbase
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "deepin-reader";
|
||||||
|
version = "5.10.28";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "linuxdeepin";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-0jHhsxEjBbu3ktvjX1eKnkZDwzRk9MrUSJSdYeOvWtI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [ ./use-pkg-config.diff ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace reader/{reader.pro,document/Model.cpp} htmltopdf/htmltopdf.pro 3rdparty/deepin-pdfium/src/src.pro \
|
||||||
|
--replace "/usr" "$out"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
qmake
|
||||||
|
pkg-config
|
||||||
|
qttools
|
||||||
|
wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
dtkwidget
|
||||||
|
qt5platform-plugins
|
||||||
|
dde-qt-dbus-factory
|
||||||
|
qtwebengine
|
||||||
|
karchive
|
||||||
|
poppler
|
||||||
|
libchardet
|
||||||
|
libspectre
|
||||||
|
djvulibre
|
||||||
|
openjpeg
|
||||||
|
gtest
|
||||||
|
];
|
||||||
|
|
||||||
|
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
|
||||||
|
qtWrapperArgs = [
|
||||||
|
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A simple memo software with texts and voice recordings";
|
||||||
|
homepage = "https://github.com/linuxdeepin/deepin-reader";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = teams.deepin.members;
|
||||||
|
};
|
||||||
|
}
|
46
pkgs/desktops/deepin/apps/deepin-reader/use-pkg-config.diff
Normal file
46
pkgs/desktops/deepin/apps/deepin-reader/use-pkg-config.diff
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
diff --git a/3rdparty/deepin-pdfium/src/3rdparty/pdfium/pdfium.pri b/3rdparty/deepin-pdfium/src/3rdparty/pdfium/pdfium.pri
|
||||||
|
index 3e04f340..894b0ac7 100755
|
||||||
|
--- a/3rdparty/deepin-pdfium/src/3rdparty/pdfium/pdfium.pri
|
||||||
|
+++ b/3rdparty/deepin-pdfium/src/3rdparty/pdfium/pdfium.pri
|
||||||
|
@@ -20,13 +20,8 @@ DEFINES += USE_SYSTEM_LIBJPEG \
|
||||||
|
USE_SYSTEM_LIBOPENJPEG2 \
|
||||||
|
USE_SYSTEM_FREETYPE
|
||||||
|
|
||||||
|
-INCLUDEPATH += /usr/include/openjpeg-2.3 \
|
||||||
|
- /usr/include/openjpeg-2.4 \
|
||||||
|
- /usr/include/freetype2 \
|
||||||
|
- /usr/include/freetype2/freetype \
|
||||||
|
- /usr/include/freetype2/freetype/config
|
||||||
|
-
|
||||||
|
-LIBS += -lopenjp2 -llcms2 -lfreetype
|
||||||
|
+CONFIG += link_pkgconfig
|
||||||
|
+PKGCONFIG += libopenjp2 lcms2 freetype2
|
||||||
|
|
||||||
|
#QMAKE_CXXFLAGS += "-Wc++11-narrowing" #is_clang
|
||||||
|
#QMAKE_CXXFLAGS += "-Wno-inconsistent-missing-override" #is_clang Suppress no override warning for overridden functions.
|
||||||
|
diff --git a/3rdparty/deepin-pdfium/src/src.pro b/3rdparty/deepin-pdfium/src/src.pro
|
||||||
|
index 196b91d3..bda71ff4 100755
|
||||||
|
--- a/3rdparty/deepin-pdfium/src/src.pro
|
||||||
|
+++ b/3rdparty/deepin-pdfium/src/src.pro
|
||||||
|
@@ -2,7 +2,9 @@ TARGET = $$PWD/../lib/deepin-pdfium
|
||||||
|
|
||||||
|
TEMPLATE = lib
|
||||||
|
|
||||||
|
-CONFIG += c++14
|
||||||
|
+CONFIG += c++14 link_pkgconfig
|
||||||
|
+
|
||||||
|
+PKGCONFIG += chardet
|
||||||
|
|
||||||
|
###安全漏洞检测
|
||||||
|
#QMAKE_CXX += -g -fsanitize=undefined,address -O2
|
||||||
|
@@ -28,10 +30,6 @@ include($$PWD/3rdparty/pdfium/pdfium.pri)
|
||||||
|
|
||||||
|
INCLUDEPATH += $$PWD/../include
|
||||||
|
|
||||||
|
-INCLUDEPATH += /usr/include/chardet
|
||||||
|
-
|
||||||
|
-LIBS += -lchardet
|
||||||
|
-
|
||||||
|
public_headers += \
|
||||||
|
$$PWD/../include/dpdfglobal.h \
|
||||||
|
$$PWD/../include/dpdfdoc.h \
|
|
@ -38,6 +38,7 @@ let
|
||||||
deepin-image-viewer = callPackage ./apps/deepin-image-viewer { };
|
deepin-image-viewer = callPackage ./apps/deepin-image-viewer { };
|
||||||
deepin-picker = callPackage ./apps/deepin-picker { };
|
deepin-picker = callPackage ./apps/deepin-picker { };
|
||||||
deepin-terminal = callPackage ./apps/deepin-terminal { };
|
deepin-terminal = callPackage ./apps/deepin-terminal { };
|
||||||
|
deepin-reader = callPackage ./apps/deepin-reader { };
|
||||||
|
|
||||||
#### Go Packages
|
#### Go Packages
|
||||||
go-lib = callPackage ./go-package/go-lib { inherit replaceAll; };
|
go-lib = callPackage ./go-package/go-lib { inherit replaceAll; };
|
||||||
|
|
Loading…
Reference in a new issue