File goldendict-git.spec of Package goldendict-git
#
# spec file for package goldendict
#
# Copyright (c) 2012-2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2013 Tvangeste <i.4m.l33t@yandex.ru>
# Copyright 2011-2019 <opensuse.lietuviu.kalba@gmail.com>
# Copyright 2008-2009 Buschmann <buschmann23@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define qt_major_version 6
%define realname goldendict
Name: %{realname}-git
Summary: Dictionary Lookup Program
License: GPL-3.0-or-later
Group: Productivity/Office/Dictionary
Url: http://goldendict.org/
Version: 20241207T220853.b67923a8
Release: 0
Source0: goldendict-%{version}.tar.xz
#Patch: goldendict_MR1400.patch
Conflicts: %{realname}
BuildRequires: update-desktop-files
BuildRequires: desktop-file-utils
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: hunspell-devel >= 1.2.4
BuildRequires: libtiff-devel
BuildRequires: libvorbis-devel
BuildRequires: zlib-devel
BuildRequires: libbz2-devel
BuildRequires: lzo-devel
BuildRequires: pkgconfig(fmt)
BuildRequires: pkgconfig(libzip)
BuildRequires: pkgconfig(opencc)
BuildRequires: pkgconfig(tomlplusplus)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(vorbis)
BuildRequires: pkgconfig(xapian-core)
BuildRequires: pkgconfig(zlib)
BuildRequires: unzip
BuildRequires: xz-devel
# Qt
BuildRequires: cmake
BuildRequires: cmake(Qt%{qt_major_version}LinguistTools)
BuildRequires: pkgconfig(Qt%{qt_major_version}Core)
BuildRequires: pkgconfig(Qt%{qt_major_version}Concurrent)
BuildRequires: pkgconfig(Qt%{qt_major_version}Gui)
BuildRequires: pkgconfig(Qt%{qt_major_version}Help)
BuildRequires: pkgconfig(Qt%{qt_major_version}Multimedia)
BuildRequires: pkgconfig(Qt%{qt_major_version}Network)
BuildRequires: pkgconfig(Qt%{qt_major_version}PrintSupport)
BuildRequires: pkgconfig(Qt%{qt_major_version}Sql)
BuildRequires: pkgconfig(Qt%{qt_major_version}Svg)
BuildRequires: pkgconfig(Qt%{qt_major_version}Widgets)
BuildRequires: pkgconfig(Qt%{qt_major_version}Xml)
%if %{qt_major_version} >= 6
BuildRequires: pkgconfig(Qt%{qt_major_version}Core5Compat)
BuildRequires: pkgconfig(Qt%{qt_major_version}TextToSpeech)
%else
BuildRequires: pkgconfig(Qt%{qt_major_version}X11Extras)
BuildRequires: libqt%{qt_major_version}-qtmultimedia-private-headers-devel
%endif
# obsoleted
#BuildRequires: pkgconfig(Qt%{qt_major_version}WebKitWidgets)
# port unfinished
BuildRequires: pkgconfig(Qt%{qt_major_version}WebEngineWidgets)
#BuildRequires: qtsingleapplication-devel
# bzip2/bz2
BuildRequires: libbz2-devel
# AV
BuildRequires: libao-devel
BuildRequires: pkgconfig(libavformat)
#BuildRequires: libavutil-devel
BuildRequires: ffmpeg-devel
# eb-devel / libeb-dev for epwing.
BuildRequires: eb-devel
# Zstd compression required for optional ZIM format support
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(libzim)
%description
Feature-rich dictionary lookup program.
* Use of WebKit for an accurate articles' representation, complete with
all formatting, colors, images and links.
* Support of multiple dictionary file formats:
* Babylon .BGL files
* StarDict .ifo/.dict/.idx/.syn dictionaries
* Dictd .index/.dict(.dz) dictionary files
* ABBYY Lingvo .dsl source files
* ABBYY Lingvo .lsa/.dat audio archives
* Support for Wikipedia, Wiktionary or any other MediaWiki-based sites
* Scan popup functionality. A small window pops up with translation of a
word chosen from antoher application.
* Full-text search.
* And much more...
This is xiaoyifang fork which often breaks features without care.
%lang_package
%prep
%autosetup -p1 -n goldendict-%{version}
#patch -p1 -F3
git init
%build
export CFLAGS="%{optflags} -w -fPIC -O3 -fno-strict-aliasing"
%ifarch x86_64 %{?x86_64}
export CFLAGS="${CFLAGS} -march=x86-64-v2 -mtune=generic -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -mpclmul -ftree-parallelize-loops=4 -ftree-vectorize -fpredictive-commoning"
%endif
export CXXFLAGS="${CFLAGS}"
%cmake \
-DCMAKE_INSTALL_RPATH="" \
-DCMAKE_SKIP_RPATH=ON \
-DSKIP_BUILD_RPATH=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF \
%if %{qt_major_version} >= 6
-DWITH_TTS=ON \
%endif
-DUSE_SYSTEM_FMT=ON \
-DUSE_SYSTEM_TOML=ON
%cmake_build
%install
%cmake_install
%find_lang %{realname} --with-qt || echo "no translations found but whatever !"
%files
%license LICENSE.txt
%_bindir/%{realname}
%_datadir/%{realname}
%_datadir/applications/*.desktop
%_datadir/metainfo/*.xml
%_datadir/pixmaps/%{realname}.png
%exclude %{_datadir}/%{realname}/locale/
%files lang -f %{realname}.lang
%changelog