deepin-reader: init at 5.10.28

This commit is contained in:
rewine 2023-01-12 17:49:03 +08:00 committed by rewine
parent ef50e87310
commit 35b5c598f1
No known key found for this signature in database
GPG Key ID: AABB329787290824
3 changed files with 121 additions and 0 deletions

View 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;
};
}

View 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 \

View File

@ -29,6 +29,7 @@ let
deepin-image-viewer = callPackage ./apps/deepin-image-viewer { };
deepin-picker = callPackage ./apps/deepin-picker { };
deepin-terminal = callPackage ./apps/deepin-terminal { };
deepin-reader = callPackage ./apps/deepin-reader { };
#### ARTWORK
dde-account-faces = callPackage ./artwork/dde-account-faces { };