DEB: update to standard TDE format, rename packages and remove patches

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 6 months ago
parent 45cbc717c7
commit 102f8c1e4f
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1,5 +1,5 @@
This Debian package for FBReader does not contain some hyphenation patterns due
to following license problems:
This Debian package for tde-ebook-reader does not contain some of the original
FBReader hyphenation patterns due to following license problems:
el.pattern: no license
fi.pattern: modification is not explicitly allowed

@ -0,0 +1,251 @@
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2003 Christopher L Cheney <ccheney@debian.org>
# Copyright © 2019 TDE Team
# Description: A class for TDE packages; sets TDE environment variables, etc
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
ifndef _cdbs_bootstrap
_cdbs_scripts_path ?= /usr/lib/cdbs
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
_cdbs_class_path ?= /usr/share/cdbs/1/class
endif
ifndef _cdbs_class_debian-qt-kde
_cdbs_class_debian-qt-kde := 1
# for dh_icons
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), debhelper (>= 5.0.7ubuntu4)
# Note: This _must_ be included before autotools.mk, or it won't work.
common-configure-arch common-configure-indep:: debian/stamp-cvs-make
debian/stamp-cvs-make:
ifndef _cdbs_class_cmake
cp -Rp /usr/share/aclocal/libtool.m4 admin/libtool.m4.in
ifneq "$(wildcard /usr/share/libtool/config/ltmain.sh)" ""
cp -Rp /usr/share/libtool/config/ltmain.sh admin/ltmain.sh
endif
ifneq "$(wildcard /usr/share/libtool/build-aux/ltmain.sh)" ""
cp -Rp /usr/share/libtool/build-aux/ltmain.sh admin/ltmain.sh
endif
$(MAKE) -C $(DEB_SRCDIR) -f admin/Makefile.common dist;
endif
touch debian/stamp-cvs-make
include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
ifdef _cdbs_tarball_dir
DEB_BUILDDIR = $(_cdbs_tarball_dir)/obj-$(DEB_BUILD_GNU_TYPE)
else
DEB_BUILDDIR = obj-$(DEB_BUILD_GNU_TYPE)
endif
ifndef _cdbs_class_cmake
include $(_cdbs_class_path)/autotools.mk$(_cdbs_makefile_suffix)
endif
ifdef _cdbs_class_cmake
ifneq "$(wildcard /usr/bin/ninja)" ""
MAKE = ninja -v
DEB_MAKE_ENVVARS += DESTDIR=$(DEB_DESTDIR)
DEB_MAKE_INSTALL_TARGET = install
DEB_CMAKE_NORMAL_ARGS += -GNinja
endif
endif
ifndef _cdbs_rules_patchsys_quilt
DEB_PATCHDIRS := debian/patches/common debian/patches
endif
export kde_cgidir = \$${libdir}/cgi-bin
export kde_confdir = \$${sysconfdir}/trinity
export kde_htmldir = \$${datadir}/doc/tde/HTML
DEB_KDE_ENABLE_FINAL := yes
DEB_INSTALL_DOCS_ALL :=
DEB_DH_MAKESHLIBS_ARGS_ALL := -V
DEB_SHLIBDEPS_INCLUDE = $(foreach p,$(PACKAGES_WITH_LIBS),debian/$(p)/usr/lib)
DEB_AC_AUX_DIR = $(DEB_SRCDIR)/admin
DEB_CONFIGURE_INCLUDEDIR = "\$${prefix}/include"
DEB_COMPRESS_EXCLUDE_ALL += .dcl .docbook -license .tag .sty .el
# The default gzip compressor has been changed in dpkg >= 1.17.0.
deb_default_compress = $(shell LANG=C dpkg-deb --version | head -n1 | \
sed -e "s|.*version ||" -e "s| .*||" | \
xargs -r dpkg --compare-versions 1.17.0 lt \
&& echo xz || echo gzip)
ifeq ($(deb_default_compress),gzip)
DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2)
endif
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
cdbs_treat_me_gently_arches := arm m68k alpha ppc64 armel armeb
ifeq (,$(filter $(DEB_HOST_ARCH_CPU),$(cdbs_treat_me_gently_arches)))
cdbs_kde_enable_final = $(if $(DEB_KDE_ENABLE_FINAL),--enable-final,)
else
cdbs_kde_enable_final =
endif
endif
ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
cdbs_kde_enable_final =
cdbs_kde_enable_debug = --enable-debug=yes
else
cdbs_kde_enable_debug = --disable-debug
endif
ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
cdbs_kde_enable_debug = --enable-debug=full
endif
DEB_BUILD_PARALLEL ?= true
cdbs_configure_flags += \
--with-qt-dir=/usr/share/qt3 \
--disable-rpath \
--with-xinerama \
$(cdbs_kde_enable_final) \
$(cdbs_kde_enable_debug)
# This is a convenience target for calling manually.
# It's not part of the build process.
buildprep: clean apply-patches
ifndef _cdbs_class_cmake
$(MAKE) -f admin/Makefile.common dist
endif
debian/rules clean
.tdepkginfo:
echo "# TDE package information" >.tdepkginfo
dpkg-parsechangelog | sed -n "s|^Source: |Name: |p" >>.tdepkginfo
dpkg-parsechangelog | sed -n "s|^Version: |Version: |p" >>.tdepkginfo
date +"DateTime: %m/%d/%Y %H:%M" -u -d "$$(dpkg-parsechangelog | sed -n 's|^Date: ||p')" >>.tdepkginfo
post-patches:: .tdepkginfo
common-build-arch:: debian/stamp-man-pages
debian/stamp-man-pages:
if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
for f in $$(find debian/man -name '*.sgml'); do \
docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
done
for f in $$(find debian/man -name '*.man'); do \
soelim -I debian/man $$f \
> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
done
touch debian/stamp-man-pages
common-binary-indep::
( set -e; \
tmpf=`mktemp debian/versions.XXXXXX`; \
perl debian/cdbs/versions.pl >$$tmpf; \
for p in $(DEB_INDEP_PACKAGES); do \
cat $$tmpf >>debian/$$p.substvars; \
done; \
rm -f $$tmpf )
common-binary-arch::
( set -e; \
tmpf=`mktemp debian/versions.XXXXXX`; \
perl debian/cdbs/versions.pl >$$tmpf; \
for p in $(DEB_ARCH_PACKAGES); do \
cat $$tmpf >>debian/$$p.substvars; \
done; \
rm -f $$tmpf )
# update multi-arch path in install files
ls -d debian/* | \
grep -E "(install|links)$$" | \
while read a; do \
[ -d $$a ] || [ -f $$a.arch ] || \
! grep -q "\$$(DEB_HOST_MULTIARCH)" $$a || \
sed -i.arch "s|\$$(DEB_HOST_MULTIARCH)|$(DEB_HOST_MULTIARCH)|g" $$a; \
done
clean::
rm -rf debian/man/out
-rmdir debian/man
rm -f debian/stamp-man-pages
rm -rf debian/shlibs-check
# revert multi-arch path in install files
ls -d debian/* | \
grep -E "(install|links)$$" | \
while read a; do \
[ ! -f $$a.arch ] || \
mv $$a.arch $$a; \
done
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
if test -x /usr/bin/dh_icons; then dh_icons -p$(cdbs_curpkg) $(DEB_DH_ICONCACHE_ARGS); fi
if test -x /usr/bin/dh_desktop; then dh_desktop -p$(cdbs_curpkg) $(DEB_DH_DESKTOP_ARGS); fi
if test -e debian/$(cdbs_curpkg).lintian; then \
install -p -D -m644 debian/$(cdbs_curpkg).lintian \
debian/$(cdbs_curpkg)/usr/share/lintian/overrides/$(cdbs_curpkg); \
fi
if test -e debian/$(cdbs_curpkg).presubj; then \
install -p -D -m644 debian/$(cdbs_curpkg).presubj \
debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/presubj; \
fi
if test -d debian/$(cdbs_curpkg)/opt/trinity/lib && \
test $$(find debian/$(cdbs_curpkg)/opt/trinity/lib -name "*.so" | wc -l) -gt 0; then \
echo "# Triggers added by cdbs/debian-tde.mk" >> debian/.debhelper/generated/$(cdbs_curpkg)/triggers; \
echo "activate-noawait ldconfig" >> debian/.debhelper/generated/$(cdbs_curpkg)/triggers; \
fi
binary-install/$(DEB_SOURCE_PACKAGE)-doc-html::
set -e; \
for doc in `cd $(DEB_DESTDIR)/opt/trinity/share/doc/tde/HTML/en; find . -name index.docbook`; do \
pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
echo Building $$pkg HTML docs...; \
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/opt/trinity/share/doc/tde/HTML/en/$$pkg; \
cd $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/opt/trinity/share/doc/tde/HTML/en/$$pkg; \
/opt/trinity/bin/meinproc $(DEB_DESTDIR)/opt/trinity/share/doc/tde/HTML/en/$$pkg/index.docbook; \
done
for pkg in $(DOC_HTML_PRUNE) ; do \
rm -rf debian/$(DEB_SOURCE_PACKAGE)-doc-html/opt/trinity/share/doc/tde/HTML/en/$$pkg; \
done
common-build-indep:: debian/stamp-kde-apidox
debian/stamp-kde-apidox:
$(if $(DEB_KDE_APIDOX),+$(DEB_MAKE_INVOKE) apidox)
touch $@
common-install-indep:: common-install-kde-apidox
common-install-kde-apidox::
$(if $(DEB_KDE_APIDOX),+DESTDIR=$(DEB_DESTDIR) $(DEB_MAKE_INVOKE) install-apidox)
cleanbuilddir::
-$(if $(call cdbs_streq,$(DEB_BUILDDIR),$(DEB_SRCDIR)),,rm -rf $(DEB_BUILDDIR))
clean::
ifndef _cdbs_class_cmake
if test -n "$(DEB_KDE_CVS_MAKE)" && test -d $(DEB_SRCDIR); then \
cd $(DEB_SRCDIR); \
find . -name Makefile.in -print | \
xargs --no-run-if-empty rm -f; \
rm -f Makefile.am acinclude.m4 aclocal.m4 config.h.in \
configure configure.files configure.in stamp-h.in \
subdirs; \
fi
endif
rm -f .tdepkginfo
rm -f debian/stamp-kde-apidox
rm -f debian/stamp-cvs-make
endif

@ -0,0 +1,19 @@
#!/usr/bin/env perl
use strict;
use warnings;
my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
($version2_next = $version2) =~ s/(?<=\.)(\d+)$/($1+1)/e;
print "TDE-Version3=$version3\n";
print "TDE-Version2=$version2\n";
print "TDE-Next-Version3=$version3_next\n";
print "TDE-Next-Version2=$version2_next\n";

6
debian/changelog vendored

@ -1,3 +1,9 @@
tde-ebook-reader (0.99.6-debian) testing; urgency=low
* Ported to TQt3 and package renaming
-- Michele Calgaro <michele.calgaro@yahoo.it> Sat, 11 May 2024 23:04:00 +0900
fbreader (0.99.4+dfsg-6) unstable; urgency=medium
* QA upload.

131
debian/control vendored

@ -1,40 +1,19 @@
Source: fbreader
Source: tde-ebook-reader
Section: text
Priority: optional
Maintainer: Debian QA Group <packages@qa.debian.org>
Maintainer: TDE Debian Team <team-debian@trinitydesktop.org>
XSBC-Original-Maintainer: Debian QA Group <packages@qa.debian.org>
Standards-Version: 4.7.0
Build-Depends: debhelper-compat (= 12),
dpkg-dev (>= 1.22.5),
libbz2-dev,
libcurl4-gnutls-dev,
libexpat1-dev,
libfribidi-dev,
libjpeg-dev,
libsqlite3-dev,
libunibreak-dev,
libz-dev,
pkgconf,
qtbase5-dev,
Homepage: http://www.fbreader.org/
Vcs-Browser: https://salsa.debian.org/debian/fbreader
Vcs-Git: https://salsa.debian.org/debian/fbreader.git
Build-Depends: cdbs, debhelper (>= 10~), quilt, tde-cmake, ninja-build, libtqtinterface-dev
libbz2-dev, libcurl4-gnutls-dev, libexpat1-dev, libfribidi-dev,
libjpeg-dev, libsqlite3-dev, libunibreak-dev, libz-dev, pkgconf
Package: fbreader
Package: tde-ebook-reader
Architecture: any
Replaces: fbreader-gtk,
fbreader-qt,
fbreader-qt4,
libzlui-gtk (<< 0.99),
libzlui-qt (<< 0.12),
Depends: ${misc:Depends},
${shlibs:Depends},
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: sensible-utils,
Breaks: libzlui-gtk (<< 0.99),
libzlui-maemo (<< 0.12),
libzlui-qt (<< 0.12),
libzlui-qt4 (<< 0.12),
Description: e-book reader
FBReader is an e-book reader.
Description: e-book reader for TDE
tde-ebook-reader is an e-book reader for TDE.
.
Main features:
* supports several open e-book formats: fb2, html, chm, plucker,
@ -51,99 +30,47 @@ Description: e-book reader
* searching and downloading books from www.feedbooks.com and www.litres.ru
* partial CSS support for epub files
Package: libzlcore0.13t64
Provides: ${t64:Provides},
Package: libzlcore-tqt
Section: libs
Architecture: any
Depends: libzlcore-data (>= ${source:Version}),
${misc:Depends},
${shlibs:Depends},
Breaks: libzlcore0.12,
libzlcore0.13 (<< ${source:Version}),
Replaces: libzlcore0.12,
libzlcore0.13,
Conflicts: fbreader-gtk,
fbreader-qt,
fbreader-qt4,
Description: ZLibrary cross-platform development library (shared library)
This is the core of ZLibrary, the library that the fbreader e-book reader
is based on.
.
ZLibrary is a cross-platform library to build applications running on desktop
Linux, Windows, different Linux-based PDAs using this library.
Depends: ${shlibs:Depends}, ${misc:Depends}, libzlcore-data-tqt
Description: ZLibrary TQt3-based development library (shared library)
This is the core of ZLibrary, the library that tde-ebook-reader is based on.
Package: libzlcore-data
Package: libzlcore-data-tqt
Section: libs
Architecture: all
Depends: ${misc:Depends},
Breaks: libzlcore (<< 0.8.17-12),
Replaces: libzlcore (<< 0.8.17-12),
Description: ZLibrary cross-platform development library (support files)
Description: ZLibrary TQt3-based development library (support files)
This package contains the support files for the core of ZLibrary, the library
that the fbreader e-book reader is based on.
.
ZLibrary is a cross-platform library to build applications running on desktop
Linux, Windows, different Linux-based PDAs using this library.
Package: libzltext0.13t64
Provides: ${t64:Provides},
Package: libzltext-tqt
Section: libs
Architecture: any
Depends: libzlcore0.13t64 (= ${binary:Version}),
libzltext-data (>= ${source:Version}),
${misc:Depends},
${shlibs:Depends},
Breaks: libzltext0.12,
libzltext0.13 (<< ${source:Version}),
Replaces: libzltext0.12,
libzltext0.13,
Description: ZLibrary text model/viewer part (shared library)
This package provides text model/viewer part of ZLibrary. See also
libzlcore0.10 package.
.
ZLibrary is a cross-platform library to build applications running on desktop
Linux, Windows, different Linux-based PDAs using this library.
Depends: ${shlibs:Depends}, ${misc:Depends}, libzlcore-tqt, libzltext-data-tqt
Description: ZLibrary TQt3-based text model/viewer part (shared library)
This package provides text model/viewer part of ZLibrary.
Package: libzltext-data
Package: libzltext-data-tqt
Section: libs
Architecture: all
Depends: ${misc:Depends},
Conflicts: libzltext,
libzltext0.9,
Replaces: libzltext,
libzltext0.9,
Description: ZLibrary text model/viewer part (support files)
Description: ZLibrary TQt3-based text model/viewer part (support files)
This package contains the support files for the text model/viewer part
of ZLibrary. See also libzltext0.13t64 package.
.
ZLibrary is a cross-platform library to build applications running on desktop
Linux, Windows, different Linux-based PDAs using this library.
of ZLibrary.
Package: libzlcore-dev
Package: libzlcore-tqt-dev
Section: libdevel
Architecture: any
Breaks: libzlcore0.13t64 (<< 0.99.4+dfsg-5),
Replaces: libzlcore0.13t64 (<< 0.99.4+dfsg-5),
Depends: libzlcore0.13t64 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: ZLibrary cross-platform development library (development files)
Depends: ${shlibs:Depends}, ${misc:Depends}, libzlcore-tqt
Description: ZLibrary TQt3-based development library (development files)
This package contains development files for the ZLibrary core.
.
ZLibrary is a cross-platform library to build applications running on desktop
Linux, Windows, different Linux-based PDAs using this library.
Package: libzltext-dev
Package: libzltext-tqt-dev
Section: libdevel
Architecture: any
Breaks: libzltext0.13t64 (<< 0.99.4+dfsg-5),
Replaces: libzltext0.13t64 (<< 0.99.4+dfsg-5),
Depends: libzltext0.13t64 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: ZLibrary text model/viewer part (development files)
Depends: ${shlibs:Depends}, ${misc:Depends}, libzltext-tqt
Description: ZLibrary TQt3-based text model/viewer part (development files)
This package contains development files for the ZLibrary text model/viewer
library.
.
ZLibrary is a cross-platform library to build applications running on desktop
Linux, Windows, different Linux-based PDAs using this library.

8
debian/copyright vendored

@ -1,3 +1,11 @@
This code was ported to TDE and packaged for Debian by:
Michele Calgaro <michele.calgaro@yahoo.it>
and is based on the code downloaded from Debian Snapshot Archive at:
https://snapshot.debian.org/package/fbreader/0.99.4+dfsg-6
Below is the original information from the Debian copyright file.
-----------------------------------------------------------------
This is the Debian prepackaged version of FBReader.
It was originally Debianised by Nikolay Pultsin <geometer@fbreader.org>, and

33
debian/dfsg-repack vendored

@ -1,33 +0,0 @@
#!/bin/sh
set -e
# This script removes non-dfsg files from upstream tarball.
# Requires package 'zip' to be installed
ORIG_TARBALL=$1
if [ -z $ORIG_TARBALL ]; then
echo "Usage: $0 <path to tarball>"
exit 1
fi
ZIP_FILE=zlibrary/text/data/hyphenationPatterns.zip
FORMAT_DATA_DIR=fbreader/data/formats
REPACK_DIR=./tmp-fbreader-repack
mkdir -p $REPACK_DIR
tar -C $REPACK_DIR -xzf $ORIG_TARBALL
UPSTREAM_DIR=`ls -1 $REPACK_DIR/`; \
(cd $REPACK_DIR && \
zip -d $UPSTREAM_DIR/$ZIP_FILE "el.pattern" "fi.pattern" "tr.pattern"; \
rm $UPSTREAM_DIR/$FORMAT_DATA_DIR/xhtml/*
rm $UPSTREAM_DIR/$FORMAT_DATA_DIR/docbook/*
mv $UPSTREAM_DIR ${UPSTREAM_DIR}.orig;
)
tar -C $REPACK_DIR -cf - ${UPSTREAM_DIR}.orig |
gzip --best -c > $ORIG_TARBALL+dfsg
rm -r $REPACK_DIR

@ -1,2 +0,0 @@
usr/bin/FBReader usr/bin/fbreader
usr/share/man/man1/FBReader.1.gz usr/share/man/man1/fbreader.1.gz

4
debian/gbp.conf vendored

@ -1,4 +0,0 @@
[DEFAULT]
debian-branch = debian/latest
upstream-branch = upstream/latest
pristine-tar = True

@ -0,0 +1 @@
#usr/share/zlibrary

@ -1 +0,0 @@
usr/share/zlibrary

@ -0,0 +1 @@
#usr/lib

@ -1 +0,0 @@
usr/lib

@ -1 +0,0 @@
libzlcore0.13t64: package-name-doesnt-match-sonames libzlcore0.99

@ -0,0 +1 @@
#usr/share/zlibrary

@ -1 +0,0 @@
usr/share/zlibrary

@ -0,0 +1 @@
#usr/lib

@ -1 +0,0 @@
usr/lib

@ -1 +0,0 @@
libzltext0.13t64: package-name-doesnt-match-sonames libzltext0.99

1
debian/manpages vendored

@ -1 +0,0 @@
fbreader/desktop/FBReader.1

@ -1,12 +0,0 @@
Origin: https://gitlab.archlinux.org/archlinux/packaging/packages/fbreader/-/blob/0.99.4-12/fbreader-0.99.4.patch
Subject: Fix invalid new-expression of abstract class type
---
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp 2013-02-21 13:30:31.000000000 +0700
@@ -49,3 +49,4 @@
path = replacement + path.substr(1);
}
+ ZLUnixFSManager::normalizeRealPath(path);
}

@ -1,503 +0,0 @@
Origin: https://gitlab.archlinux.org/archlinux/packaging/packages/fbreader/-/blob/0.99.4-12/fbreader-qt5.patch
Subject: Port to Qt5 and use $(PKG_CONFIG) over pkg-config
---
diff -r -U2 fbreader-0.99.4.orig/makefiles/arch/desktop.mk fbreader-0.99.4/makefiles/arch/desktop.mk
--- fbreader-0.99.4.orig/makefiles/arch/desktop.mk 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/makefiles/arch/desktop.mk 2018-01-11 22:18:40.119207269 +0700
@@ -15,27 +15,9 @@
CFLAGS = -pipe -fno-exceptions -Wall -Wno-ctor-dtor-privacy -W -DLIBICONV_PLUG
LDFLAGS =
-EXTERNAL_INCLUDE = $(shell pkg-config --cflags fribidi)
+EXTERNAL_INCLUDE = $(shell $(PKG_CONFIG) --cflags fribidi)
-ifeq "$(UI_TYPE)" "qt"
- MOC = moc-qt3
- QTINCLUDE = -I /usr/include/qt3
-else
- MOC = $(shell pkg-config QtCore --variable=moc_location)
- QTINCLUDE = -I $(shell pkg-config --cflags QtCore)
-endif
-
-GTKINCLUDE = $(shell pkg-config --cflags gtk+-2.0 libpng xft)
-
-ifeq "$(UI_TYPE)" "qt"
- UILIBS = -lqt-mt
-endif
-
-ifeq "$(UI_TYPE)" "qt4"
- UILIBS = $(shell pkg-config --libs QtCore QtGui QtNetwork)
-endif
-
-ifeq "$(UI_TYPE)" "gtk"
- UILIBS = $(shell pkg-config --libs gtk+-2.0 gio-2.0) -lpng -ljpeg
-endif
+MOC = "$(shell $(PKG_CONFIG) --variable=host_bins Qt5Core)/moc"
+QTINCLUDE = $(shell $(PKG_CONFIG) --cflags Qt5Gui Qt5Widgets Qt5Network)
+UILIBS = $(shell $(PKG_CONFIG) --libs Qt5Gui Qt5Widgets Qt5Network)
RM = rm -rvf
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/application/LineEditParameter.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/application/LineEditParameter.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/application/LineEditParameter.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/application/LineEditParameter.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,7 +18,7 @@
*/
-#include <QtGui/QBoxLayout>
-#include <QtGui/QLineEdit>
-#include <QtGui/QToolBar>
+#include <QtWidgets/QBoxLayout>
+#include <QtWidgets/QLineEdit>
+#include <QtWidgets/QToolBar>
#include <QtGui/QKeyEvent>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,15 +18,15 @@
*/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include <QtGui/QPixmap>
#include <QtGui/QImage>
#include <QtGui/QIcon>
-#include <QtGui/QToolBar>
-#include <QtGui/QMenuBar>
-#include <QtGui/QMenu>
-#include <QtGui/QToolButton>
-#include <QtGui/QLayout>
+#include <QtWidgets/QToolBar>
+#include <QtWidgets/QMenuBar>
+#include <QtWidgets/QMenu>
+#include <QtWidgets/QToolButton>
+#include <QtWidgets/QLayout>
#include <QtGui/QWheelEvent>
-#include <QtGui/QDockWidget>
+#include <QtWidgets/QDockWidget>
#include <QtCore/QObjectList>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.h fbreader-0.99.4/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.h 2018-01-11 22:18:40.120207269 +0700
@@ -23,6 +23,6 @@
#include <map>
-#include <QtGui/QMainWindow>
-#include <QtGui/QAction>
+#include <QtWidgets/QMainWindow>
+#include <QtWidgets/QAction>
#include <QtGui/QCursor>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,6 +18,6 @@
*/
-#include <QtGui/QApplication>
-#include <QtGui/QPushButton>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QPushButton>
#include <ZLDialogManager.h>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.h fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialog.h 2018-01-11 22:18:40.120207269 +0700
@@ -21,6 +21,6 @@
#define __ZLQTDIALOG_H__
-#include <QtGui/QDialog>
-#include <QtGui/QLayout>
+#include <QtWidgets/QDialog>
+#include <QtWidgets/QLayout>
#include <ZLDialog.h>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialogContent.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialogContent.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialogContent.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialogContent.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,8 +18,8 @@
*/
-#include <QtGui/QApplication>
-#include <QtGui/QDesktopWidget>
-#include <QtGui/QWidget>
-#include <QtGui/QLayout>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QDesktopWidget>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QLayout>
#include "ZLQtDialogContent.h"
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialogManager.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialogManager.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtDialogManager.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtDialogManager.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,9 +18,9 @@
*/
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
-#include <QtGui/QFileDialog>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
+#include <QtWidgets/QFileDialog>
#include <QtGui/QClipboard>
-#include <QtGui/QDesktopWidget>
+#include <QtWidgets/QDesktopWidget>
#include "ZLQtDialogManager.h"
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOpenFileDialog.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOpenFileDialog.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOpenFileDialog.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOpenFileDialog.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,5 +18,5 @@
*/
-#include <QtGui/QFileDialog>
+#include <QtWidgets/QFileDialog>
#include "ZLQtOpenFileDialog.h"
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOptionView.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOptionView.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOptionView.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOptionView.cpp 2018-01-11 22:18:40.121207269 +0700
@@ -20,14 +20,14 @@
#include <cctype>
-#include <QtGui/QCheckBox>
-#include <QtGui/QComboBox>
-#include <QtGui/QLabel>
-#include <QtGui/QGroupBox>
-#include <QtGui/QRadioButton>
-#include <QtGui/QPushButton>
-#include <QtGui/QSpinBox>
-#include <QtGui/QLineEdit>
-#include <QtGui/QSlider>
-#include <QtGui/QLayout>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QComboBox>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QGroupBox>
+#include <QtWidgets/QRadioButton>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QSpinBox>
+#include <QtWidgets/QLineEdit>
+#include <QtWidgets/QSlider>
+#include <QtWidgets/QLayout>
#include <ZLStringUtil.h>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.cpp 2018-01-11 22:18:40.121207269 +0700
@@ -18,9 +18,9 @@
*/
-#include <QtGui/QApplication>
-#include <QtGui/QDesktopWidget>
-#include <QtGui/QLayout>
-#include <QtGui/QPushButton>
-#include <QtGui/QButtonGroup>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QDesktopWidget>
+#include <QtWidgets/QLayout>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QButtonGroup>
#include <QtGui/QResizeEvent>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.h fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.h 2018-01-11 22:18:40.121207269 +0700
@@ -21,7 +21,7 @@
#define __ZLQTOPTIONSDIALOG_H__
-#include <QtGui/QWidget>
-#include <QtGui/QTabWidget>
-#include <QtGui/QDialog>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QTabWidget>
+#include <QtWidgets/QDialog>
#include "../../../../core/src/desktop/dialogs/ZLDesktopOptionsDialog.h"
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.cpp 2018-01-11 22:18:40.121207269 +0700
@@ -20,9 +20,9 @@
#include <unistd.h>
-#include <QtGui/QApplication>
-#include <QtGui/QDesktopWidget>
-#include <QtGui/QWidget>
-#include <QtGui/QLabel>
-#include <QtGui/QLayout>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QDesktopWidget>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QLayout>
#include <QtCore/QThreadPool>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.h fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.h 2018-01-11 22:18:40.121207269 +0700
@@ -23,9 +23,9 @@
#include <string>
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
#include <QtGui/QCursor>
-#include <QtGui/QDialog>
-#include <QtGui/QProgressBar>
-#include <QtGui/QLabel>
+#include <QtWidgets/QDialog>
+#include <QtWidgets/QProgressBar>
+#include <QtWidgets/QLabel>
#include <QtCore/QRunnable>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -20,10 +20,10 @@
#include <algorithm>
-#include <QtGui/QSplitter>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QScrollBar>
#include <QtGui/QResizeEvent>
#include <QtCore/QDebug>
+#include <QtWidgets/QSplitter>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QScrollBar>
#include <ZLFile.h>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.h fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/dialogs/ZLQtTreeDialog.h 2018-01-11 22:18:40.121207269 +0700
@@ -25,10 +25,10 @@
#include <QtCore/QMap>
-#include <QtGui/QDialog>
-#include <QtGui/QScrollArea>
-#include <QtGui/QPushButton>
-#include <QtGui/QLabel>
-#include <QtGui/QLineEdit>
-#include <QtGui/QWidget>
+#include <QtWidgets/QDialog>
+#include <QtWidgets/QScrollArea>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QLineEdit>
+#include <QtWidgets/QWidget>
#include <ZLTreeDialog.h>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/library/ZLQApplication.h fbreader-0.99.4/zlibrary/ui/src/qt4/library/ZLQApplication.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/library/ZLQApplication.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/library/ZLQApplication.h 2018-01-11 22:18:40.121207269 +0700
@@ -21,5 +21,5 @@
#define __ZLQAPPLICATION_H__
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
class ZLQApplication : public QApplication {
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/library/ZLibrary.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/library/ZLibrary.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/library/ZLibrary.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/library/ZLibrary.cpp 2018-01-11 22:18:40.121207269 +0700
@@ -20,5 +20,5 @@
#include <QtCore/QTextCodec>
#include <QtCore/QFile>
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include <QtGui/QFileOpenEvent>
@@ -73,5 +73,5 @@
new ZLQApplication(argc, argv);
- QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf-8"));
+ QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf-8"));
ZLibrary::parseArguments(argc, argv);
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/network/ZLQtNetworkManager.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/network/ZLQtNetworkManager.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/network/ZLQtNetworkManager.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/network/ZLQtNetworkManager.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -25,5 +25,7 @@
#include <QtCore/QList>
#include <QtCore/QTimer>
+#include <QtCore/QUrlQuery>
+#include <QtNetwork/QNetworkCookie>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
@@ -150,10 +152,10 @@
if (!scope.request->postParameters().empty()) {
QByteArray data;
- QUrl tmp;
+ QUrlQuery tmp;
typedef std::pair<std::string, std::string> string_pair;
foreach (const string_pair &pair, scope.request->postParameters()) {
tmp.addQueryItem(QString::fromStdString(pair.first), QString::fromStdString(pair.second));
}
- data = tmp.encodedQuery();
+ data = tmp.query(QUrl::FullyEncoded).toUtf8(); //encodedQuery();
reply = const_cast<QNetworkAccessManager&>(myManager).post(networkRequest, data);
} else {
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp 2018-01-11 22:13:39.639219906 +0700
@@ -87,5 +87,5 @@
void QtWaitingSpinner::setRoundness(qreal roundness) {
- myRoundness = std::max(0.0, std::min(100.0, roundness));
+ myRoundness = std::max(static_cast<qreal>(0.0), std::min(static_cast<qreal>(100.0), roundness));
}
@@ -149,5 +149,5 @@
qreal gradation = alphaDiff / (qreal)(distanceThreshold + 1);
qreal resultAlpha = color.alphaF() - gradation * distance;
- resultAlpha = std::min(1.0, std::max(0.0, resultAlpha)); //if alpha is out of bound, force it to bounds
+ resultAlpha = std::min(static_cast<qreal>(1.0), std::max(static_cast<qreal>(0.0), resultAlpha)); //if alpha is out of bound, force it to bounds
color.setAlphaF(resultAlpha);
return color;
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.h fbreader-0.99.4/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.h 2018-01-11 22:18:40.121207269 +0700
@@ -4,5 +4,5 @@
#include <QtCore/QTimer>
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
#include <QtGui/QColor>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,12 +18,12 @@
*/
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QHBoxLayout>
#include <QtGui/QPixmap>
#include <QtGui/QPalette>
#include <QtGui/QPainter>
#include <QtGui/QPaintEvent>
-#include <QtGui/QScrollBar>
#include <QtCore/QTimer>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QScrollBar>
#include <QtCore/QDebug>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.h fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtItemsListWidget.h 2018-01-11 22:18:40.120207269 +0700
@@ -21,10 +21,10 @@
#define __ZLQTITEMSLISTWIDGET_H__
-#include <QtGui/QWidget>
-#include <QtGui/QFrame>
-#include <QtGui/QPushButton>
-#include <QtGui/QLabel>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QScrollArea>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QFrame>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QScrollArea>
#include <ZLTreeTitledNode.h>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -18,8 +18,8 @@
*/
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QScrollBar>
-#include <QtGui/QGraphicsDropShadowEffect>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QScrollBar>
+#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QtCore/QDebug>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.h fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtPreviewWidget.h 2018-01-11 22:18:40.121207269 +0700
@@ -21,9 +21,9 @@
#define __ZLQTPREVIEWWIDGET_H__
-#include <QtGui/QWidget>
-#include <QtGui/QPushButton>
-#include <QtGui/QLabel>
-#include <QtGui/QScrollArea>
-#include <QtGui/QVBoxLayout>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QScrollArea>
+#include <QtWidgets/QVBoxLayout>
#include <QtCore/QSet>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtSearchField.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtSearchField.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtSearchField.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtSearchField.cpp 2018-01-11 22:18:40.120207269 +0700
@@ -19,7 +19,7 @@
#include <QtCore/QDebug>
-#include <QtGui/QStyle>
-#include <QtGui/QCompleter>
-#include <QtGui/QStringListModel>
+#include <QtCore/QStringListModel>
+#include <QtWidgets/QStyle>
+#include <QtWidgets/QCompleter>
#include <ZLibrary.h>
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtSearchField.h fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtSearchField.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/tree/ZLQtSearchField.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/tree/ZLQtSearchField.h 2018-01-11 22:18:40.121207269 +0700
@@ -22,6 +22,6 @@
#include <QtCore/QSet>
-#include <QtGui/QLabel>
-#include <QtGui/QLineEdit>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QLineEdit>
#include "QtWaitingSpinner.h"
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp fbreader-0.99.4/zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp 2018-01-11 22:18:40.121207269 +0700
@@ -20,6 +20,6 @@
#include <algorithm>
-#include <QtGui/QLayout>
-#include <QtGui/QScrollBar>
+#include <QtWidgets/QLayout>
+#include <QtWidgets/QScrollBar>
#include <QtGui/QPainter>
#include <QtGui/QPixmap>
@@ -186,9 +186,9 @@
void ZLQtViewWidget::setScrollbarEnabled(ZLView::Direction direction, bool enabled) {
if (direction == ZLView::VERTICAL) {
- myRightScrollBar->setShown(enabled && myShowScrollBarAtRight);
- myLeftScrollBar->setShown(enabled && !myShowScrollBarAtRight);
+ myRightScrollBar->setVisible(enabled && myShowScrollBarAtRight);
+ myLeftScrollBar->setVisible(enabled && !myShowScrollBarAtRight);
} else {
- myBottomScrollBar->setShown(enabled && myShowScrollBarAtBottom);
- myTopScrollBar->setShown(enabled && !myShowScrollBarAtBottom);
+ myBottomScrollBar->setVisible(enabled && myShowScrollBarAtBottom);
+ myTopScrollBar->setVisible(enabled && !myShowScrollBarAtBottom);
}
}
diff -r -U2 fbreader-0.99.4.orig/zlibrary/ui/src/qt4/view/ZLQtViewWidget.h fbreader-0.99.4/zlibrary/ui/src/qt4/view/ZLQtViewWidget.h
--- fbreader-0.99.4.orig/zlibrary/ui/src/qt4/view/ZLQtViewWidget.h 2012-11-30 19:41:25.000000000 +0700
+++ fbreader-0.99.4/zlibrary/ui/src/qt4/view/ZLQtViewWidget.h 2018-01-11 22:18:40.121207269 +0700
@@ -21,5 +21,5 @@
#define __ZLQTVIEWWIDGET_H__
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
#include "../../../../core/src/view/ZLViewWidget.h"

@ -1,14 +0,0 @@
Origin: https://gitlab.archlinux.org/archlinux/packaging/packages/fbreader/-/blob/0.99.4-12/fbreader-gcc6.patch
Subject: Fix build with gcc 6 or later
---
--- a/fbreader/src/formats/doc/OleStorage.cpp.orig 2012-11-30 13:41:25.000000000 +0100
+++ b/fbreader/src/formats/doc/OleStorage.cpp 2016-08-31 17:23:18.232536401 +0200
@@ -59,7 +59,7 @@
clear();
return false;
}
- static const char OLE_SIGN[] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1, 0};
+ static const char OLE_SIGN[] = {(char)0xD0, (char)0xCF, (char)0x11, (char)0xE0, (char)0xA1, (char)0xB1, (char)0x1A, (char)0xE1, 0};
if (std::strncmp(oleBuf, OLE_SIGN, 8) != 0) {
clear();
return false;

@ -1,23 +0,0 @@
Description: Prevent installing .so link in non-dev library pkgs
Author: Bastian Germann <bage@debian.org>
---
--- fbreader-0.99.4+dfsg.orig/zlibrary/core/Makefile
+++ fbreader-0.99.4+dfsg/zlibrary/core/Makefile
@@ -85,7 +85,6 @@ ifeq "$(ZLSHARED)" "yes"
@install -d $(DESTDIR)$(LIBDIR)
@install $(TARGET) $(DESTDIR)$(LIBDIR)
@ln -sf $(TARGET) $(DESTDIR)$(LIBDIR)/$(TARGET_SONAME)
- @ln -sf $(TARGET) $(DESTDIR)$(LIBDIR)/$(TARGET_SHORTNAME)
endif
do_install_dev:
--- fbreader-0.99.4+dfsg.orig/zlibrary/text/Makefile
+++ fbreader-0.99.4+dfsg/zlibrary/text/Makefile
@@ -52,7 +52,6 @@ ifeq "$(ZLSHARED)" "yes"
@install -d $(DESTDIR)$(LIBDIR)
@install $(TARGET) $(DESTDIR)$(LIBDIR)
@ln -sf $(TARGET) $(DESTDIR)$(LIBDIR)/$(TARGET_SONAME)
- @ln -sf $(TARGET) $(DESTDIR)$(LIBDIR)/$(TARGET_SHORTNAME)
endif
do_install_dev:

@ -1,102 +0,0 @@
From: "Eugene V. Lyubimkin" <jackyf@debian.org>
Date: Sat, 20 Feb 2016 18:20:25 +0100
Subject: 951-fix-calling-compiler
===================================================================
---
makefiles/arch/desktop.mk | 3 +--
makefiles/gtksubdir.mk | 8 ++------
makefiles/platforms.mk | 4 +---
makefiles/qsubdir.mk | 8 ++------
makefiles/subdir.mk | 9 +--------
5 files changed, 7 insertions(+), 25 deletions(-)
diff --git a/makefiles/arch/desktop.mk b/makefiles/arch/desktop.mk
index 357f2ce..78211a8 100644
--- a/makefiles/arch/desktop.mk
+++ b/makefiles/arch/desktop.mk
@@ -10,8 +10,7 @@ CC = gcc
AR = ar rsu
LD = g++
-CFLAGS = -pipe -fno-exceptions -Wall -Wno-ctor-dtor-privacy -W -DLIBICONV_PLUG
-LDFLAGS =
+CFLAGS += -pipe -fno-exceptions -Wall -Wno-ctor-dtor-privacy -W -DLIBICONV_PLUG
EXTERNAL_INCLUDE = $(shell $(PKG_CONFIG) --cflags fribidi)
MOC = "$(shell $(PKG_CONFIG) --variable=host_bins Qt5Core)/moc"
QTINCLUDE = $(shell $(PKG_CONFIG) --cflags Qt5Gui Qt5Widgets Qt5Network)
diff --git a/makefiles/gtksubdir.mk b/makefiles/gtksubdir.mk
index aed94f3..23f51da 100644
--- a/makefiles/gtksubdir.mk
+++ b/makefiles/gtksubdir.mk
@@ -11,14 +11,10 @@ OBJECTS += $(patsubst %.cpp, %.o, $(SOURCES))
.SUFFIXES: .c .cpp .o .h
.c.o:
- @echo -n 'Compiling $@ ...'
- @$(CC) -MMD -c $(CFLAGS) $(INCLUDE) $<
- @echo ' OK'
+ $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $<
.cpp.o:
- @echo -n 'Compiling $@ ...'
- @$(CC) -MMD -c $(CFLAGS) $(INCLUDE) $<
- @echo ' OK'
+ $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) $(INCLUDE) $<
all: $(OBJECTS)
diff --git a/makefiles/platforms.mk b/makefiles/platforms.mk
index df83885..129463b 100644
--- a/makefiles/platforms.mk
+++ b/makefiles/platforms.mk
@@ -10,6 +10,4 @@ ifeq "$(UI_TYPE)" ""
$(error UI_TYPE is not defined. Please edit $(ROOTDIR)/makefiles/target.mk)
endif
-ifeq "$(TARGET_STATUS)" ""
- TARGET_STATUS = release
-endif
+TARGET_STATUS = "" # Debian packaging always set flags itself
diff --git a/makefiles/qsubdir.mk b/makefiles/qsubdir.mk
index 14b4efc..f6ec87b 100644
--- a/makefiles/qsubdir.mk
+++ b/makefiles/qsubdir.mk
@@ -11,14 +11,10 @@ OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES))
.SUFFIXES: .cpp .moc.cpp .moc.o .o .h
.cpp.o:
- @echo -n 'Compiling $@ ...'
- @$(CC) -MMD -c $(CFLAGS) $(INCLUDE) $<
- @echo ' OK'
+ $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) $(INCLUDE) $<
.h.moc.cpp:
- @echo -n 'Generating $@ ...'
- @$(MOC) $< -o $@
- @echo ' OK'
+ $(MOC) $< -o $@
all: $(OBJECTS) $(OBJMOC)
diff --git a/makefiles/subdir.mk b/makefiles/subdir.mk
index b364211..63e66bf 100644
--- a/makefiles/subdir.mk
+++ b/makefiles/subdir.mk
@@ -11,14 +11,7 @@ OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES_CPP)) $(patsubst %.M, %.o, $(SOURCES_
.SUFFIXES: .cpp .M .m .o .h
.cpp.o:
- @echo -n 'Compiling $@ ...'
-ifdef CFLAGS_NOARCH
- @$(CC) -MM $(CFLAGS_PRE) $(INCLUDE) $< -o `basename $< .cpp`.d
- @$(CC) -c $(CFLAGS) $(INCLUDE) $<
-else
- @$(CC) -MMD -c $(CFLAGS) $(INCLUDE) $<
-endif
- @echo ' OK'
+ $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) $(INCLUDE) $<
.M.o:
@echo -n 'Compiling $@ ...'

@ -1,22 +0,0 @@
From: "Eugene V. Lyubimkin" <jackyf@debian.org>
Date: Sat, 20 Feb 2016 18:23:10 +0100
Subject: fbreader: Makefile: do not try to install empty formats/xhtml
directory
---
fbreader/Makefile | 2 --
1 file changed, 2 deletions(-)
diff --git a/fbreader/Makefile b/fbreader/Makefile
index 6efc10b..ba247b7 100644
--- a/fbreader/Makefile
+++ b/fbreader/Makefile
@@ -44,8 +44,6 @@ do_install:
@./scripts/install_help.sh $(VARIANT) $(FBSHAREDIR)/help
@install -d $(FBSHAREDIR)/formats/html
@install -m 0644 data/formats/html/html.ent $(FBSHAREDIR)/formats/html
- @install -d $(FBSHAREDIR)/formats/xhtml
- @install -m 0644 $(wildcard data/formats/xhtml/*.ent) $(FBSHAREDIR)/formats/xhtml
@install -d $(FBSHAREDIR)/formats/fb2
@sed "s/VERSION/$(VERSION)/" data/formats/fb2/FBReaderVersion.ent > $(FBSHAREDIR)/formats/fb2/FBReaderVersion.ent
@install -m 0644 data/formats/fb2/fb2genres.xml $(FBSHAREDIR)/formats/fb2

@ -1,32 +0,0 @@
From: "Eugene V. Lyubimkin" <jackyf@debian.org>
Date: Sun, 9 Dec 2018 16:31:45 +0100
Subject: zlibrary: unix: curl: avoid duplicate case in a switch
CURLE_SSL_CACERT was merged into CURLE_PEER_FAILED_VERIFICATION, see [1]
[1] https://github.com/curl/curl/commit/3f3b26d6feb0667714902e836af608094235fca2
---
zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp | 7 -------
1 file changed, 7 deletions(-)
diff --git a/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp b/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp
index a75d8bc..55865b6 100644
--- a/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp
+++ b/zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp
@@ -277,16 +277,9 @@ std::string ZLCurlNetworkManager::perform(const ZLExecutionData::Vector &dataLis
case CURLE_SSL_CONNECT_ERROR:
errors.insert(ZLStringUtil::printf(errorResource["sslConnectErrorMessage"].value(), curl_easy_strerror(CURLE_SSL_CONNECT_ERROR)));
break;
-#if LIBCURL_VERSION_NUM > 0x071100
case CURLE_PEER_FAILED_VERIFICATION:
-#else
- case CURLE_SSL_PEER_CERTIFICATE:
-#endif
errors.insert(ZLStringUtil::printf(errorResource["peerFailedVerificationMessage"].value(), ZLNetworkUtil::hostFromUrl(url)));
break;
- case CURLE_SSL_CACERT:
- errors.insert(ZLStringUtil::printf(errorResource["sslCertificateAuthorityMessage"].value(), ZLNetworkUtil::hostFromUrl(url)));
- break;
case CURLE_SSL_CACERT_BADFILE:
errors.insert(ZLStringUtil::printf(errorResource["sslBadCertificateFileMessage"].value(), request.sslCertificate().Path));
break;

@ -1,21 +0,0 @@
From: Ievgen Liubymkin <jackyf@debian.org>
Date: Sun, 1 Sep 2019 09:56:54 +0200
Subject: fbreader: Makefile: make linking order reproducible
---
fbreader/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fbreader/Makefile b/fbreader/Makefile
index ba247b7..90070bd 100644
--- a/fbreader/Makefile
+++ b/fbreader/Makefile
@@ -22,7 +22,7 @@ all: .resources
fi; \
done;
@echo -n 'Linking $(TARGET) ...'
- @$(LD) $(LDFLAGS) -o $(TARGET) `find src -name *.o` $(TEXT_LIBS) $(CORE_LIBS) $(ZLUI_LIB) -lsqlite3
+ @$(LD) $(LDFLAGS) -o $(TARGET) `find src -name *.o | LC_ALL=C sort` $(TEXT_LIBS) $(CORE_LIBS) $(ZLUI_LIB) -lsqlite3
@echo ' OK'
FBSHAREDIR = $(DESTDIR)$(SHAREDIR)/FBReader

@ -1,19 +0,0 @@
Description: Announce supported file tyes in XDG desktop entry.
This ensure desktop file browsers know when to propose to use
fbreader.
Author: Petter Reinholdtsen
Bug-Debian: https://bugs.debian.org/601605
Bug-Debian: https://bugs.debian.org/601609
Bug-Debian: https://bugs.debian.org/813768
Forwarded: no
Last-Update: 2024-05-10
---
diff --git a/fbreader/desktop/desktop b/fbreader/desktop/desktop
index bb35fe3..5d45cfd 100644
--- a/fbreader/desktop/desktop
+++ b/fbreader/desktop/desktop
@@ -21,3 +21,4 @@ Terminal=false
Type=Application
Icon=FBReader
Categories=Office;Viewer;Literature;
+MimeType=application/epub+zip;

@ -1,9 +0,0 @@
0001-ZLQtFSManager.cpp.patch
0002-Qt5.patch
0003-gcc-6.patch
0004-prevent-so-install.patch
0008-951-fix-calling-compiler.patch
0009-fbreader-Makefile-do-not-try-to-install-empty-format.patch
0011-zlibrary-unix-curl-avoid-duplicate-case-in-a-switch.patch
0013-fbreader-Makefile-make-linking-order-reproducible.patch
1014-desktop-mime-type.patch

57
debian/rules vendored

@ -1,44 +1,17 @@
#!/usr/bin/make -f
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
AUXMAKEFLAGS += -j$(NUMJOBS)
endif
DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
DEB_DIR = $(CURDIR)/debian
export PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
AUXMAKEFLAGS += 'LD=$$(CXX)'
%:
dh $@
override_dh_auto_build:
dh_auto_build -- $(AUXMAKEFLAGS) -C zlibrary/core TARGET_ARCH=desktop UI_TYPE=dummy
dh_auto_build -- $(AUXMAKEFLAGS) -C zlibrary/text TARGET_ARCH=desktop UI_TYPE=dummy
dh_auto_build -- $(AUXMAKEFLAGS) -C zlibrary/ui TARGET_ARCH=desktop UI_TYPE=qt4
dh_auto_build -- $(AUXMAKEFLAGS) -C fbreader TARGET_ARCH=desktop UI_TYPE=dummy
install-common:
$(MAKE) -C zlibrary/core TARGET_ARCH=desktop UI_TYPE=dummy DESTDIR=$(DEB_DIR)/tmp/zlcore do_install
$(MAKE) -C zlibrary/text TARGET_ARCH=desktop UI_TYPE=dummy DESTDIR=$(DEB_DIR)/tmp/zltext do_install
override_dh_auto_install-indep: install-common
mv $(DEB_DIR)/tmp/zlcore/usr/share/zlibrary $(DEB_DIR)/libzlcore-data/usr/share
mv $(DEB_DIR)/tmp/zltext/usr/share/zlibrary $(DEB_DIR)/libzltext-data/usr/share
override_dh_auto_install-arch: install-common
mv $(DEB_DIR)/tmp/zlcore/usr/lib $(DEB_DIR)/libzlcore0.13t64/usr
mv $(DEB_DIR)/tmp/zltext/usr/lib $(DEB_DIR)/libzltext0.13t64/usr
$(MAKE) -C zlibrary/core TARGET_ARCH=desktop UI_TYPE=dummy DESTDIR=$(DEB_DIR)/libzlcore-dev do_install_dev
$(MAKE) -C zlibrary/text TARGET_ARCH=desktop UI_TYPE=dummy DESTDIR=$(DEB_DIR)/libzltext-dev do_install_dev
$(MAKE) -C zlibrary/ui TARGET_ARCH=desktop UI_TYPE=qt4 DESTDIR=$(DEB_DIR)/fbreader do_install
$(MAKE) -C fbreader TARGET_ARCH=desktop UI_TYPE=dummy DESTDIR=$(DEB_DIR)/fbreader do_install
override_dh_makeshlibs:
dh_makeshlibs -plibzlcore0.13t64
dh_makeshlibs -plibzltext0.13t64
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
include debian/cdbs/debian-tde.mk
DEB_CMAKE_EXTRA_FLAGS := \
-DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
-DCMAKE_INSTALL_PREFIX="/opt/trinity" \
-DCONFIG_INSTALL_DIR="/etc/trinity" \
-DSYSCONF_INSTALL_DIR="/etc/trinity" \
-DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE="ON" \
-DCMAKE_SKIP_RPATH="OFF" \
-DBUILD_ALL="ON" \
-DWITH_ALL_OPTIONS="ON"

@ -0,0 +1,6 @@
# Use xz instead of gzip
compression = "xz"
compression-level = 9
# Don't run differences
diff-ignore = .*

@ -0,0 +1 @@
#usr/lib
Loading…
Cancel
Save