File kdrill.spec of Package kdrill
#
# spec file for package kdrill
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: kdrill
Version: 6.5
Release: 0
Summary: Kanji Quiz and Japanese Dictionary for the X Window System
License: SUSE-Permissive
Group: Productivity/Office/Dictionary
URL: https://www.bolthole.com/kdrill/
Source: http://www.bolthole.com/kdrill/kdrill6.5.tar.gz
# PATCH-FIX-OPENSUSE change edict locations
Patch0: kdrill-edict-location.patch
Patch2: kdrill6.4-fclose.patch
# PATCH-FIX-UPSTERAM getline() is a standard function in stdio.h
# rename to getLine()
Patch3: kdrill-6.5-getline.patch
# PATCH-FIX-UPSTREAM isMapped(widget) is in utils.h
Patch4: kdrill-6.5-implicit-function-declaration.patch
Patch5: kdrill-6.5-gcc15.patch
BuildRequires: imake
BuildRequires: libX11-devel
BuildRequires: libXaw-devel
BuildRequires: libXt-devel
BuildRequires: xproto-devel
BuildRequires: fdupes
Requires: edict
Requires: xjdic-indices
%description
KDrill stands for Kanji Drill. It is a program to help people learn
kanji and kana (the Japanese charater set). It uses Jim Breen's EDICT
Japanese-English dictionary and also doubles as a dictionary lookup
program. Kdrill runs under the X Window System.
%prep
%setup -q -n %{name}%{version}
%patch -P 0 -p 1
%patch -P 2 -p 0
%patch -P 3 -p 1
%patch -P 4 -p 1
%patch -P 5 -p 1
%build
xmkmf
%make_build Makefiles
%make_build depend
%make_build CCOPTIONS="-Wno-error=incompatible-pointer-types %{optflags}"
%install
%make_install
make install.man MANSUFFIX=1 LIBMANSUFFIX=3 DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_mandir}/man1
mv %{buildroot}%{_prefix}/man/man1/* %{buildroot}%{_mandir}/man1/
rm -rf %{buildroot}%{_prefix}/man
%fdupes %{buildroot}
%files
%license LICENSE
%doc NOTES README TODO PATCHLIST OLD.PATCHLIST
%{_bindir}/kdrill
%{_mandir}/man1/kdrill.1%{ext_man}
%dir %{_sysconfdir}/X11/app-defaults
%{_prefix}/lib/X11/app-defaults
%{_sysconfdir}/X11/app-defaults/KDrill
%changelog