File texcad.spec of Package texcad

#
# spec file for package texcad
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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:           texcad
Provides:       texcad12
Provides:       xtexcad
Version:        2.4.1
Release:        0
Summary:        Drawing program for LaTeX pictures
License:        MIT-CMU
Group:          Productivity/Publishing/TeX/Utilities
URL:            https://www.ctan.org/tex-archive/graphics/xtexcad
Source:         xtexcad-2.4.1.tar.gz
Patch0:         xtexcad-2.4-flex.patch
Patch1:         xtexcad-2.4.diff
Patch2:         xtexcad-2.4-getcwd.patch
Patch3:         xtexcad-2.4-gcc14.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  flex
BuildRequires:  groff
BuildRequires:  groff-full
BuildRequires:  imake
BuildRequires:  libICE-devel
BuildRequires:  libSM-devel
BuildRequires:  libX11-devel
BuildRequires:  libXau-devel
BuildRequires:  libXaw-devel
BuildRequires:  libXext-devel
BuildRequires:  libXmu-devel
BuildRequires:  libXpm-devel
BuildRequires:  libXt-devel
BuildRequires:  libxcb-devel
BuildRequires:  xmessage
%define _x11data    %{_datadir}/X11
%define _appdefdir  %{_x11data}/app-defaults

%description
A really nice drawing program which is especially useful in cooperation
with LaTeX. Note the documentation and COPYRIGHT file in
/usr/share/doc/packages/texcad.



Authors:
--------
    Klaus Zitzmann <zitzmann@infko.uni-koblenz.de>
    J.K.Wight <J.K.Wight@newcastle.ac.uk>
    Byron  Rakitzis <byron@netapp.com>
    Johannes Sixt <Johannes.Sixt@eudaptics.co.at>
    Notker Amann <amann@isr.uni-stuttgart.de>

%prep
%setup -n xtexcad-2.4.1
%patch -P0 -p0
%patch -P1 -p1
%patch -P2 -p0
%patch -P3 -p0

%build
touch resources.h
xmkmf -a
rm -f resources.h
make CCOPTIONS="$RPM_OPT_FLAGS --std=gnu99" \
	MANPATH=%{_mandir} XAPPLOADDIR=%{_appdefdir}
$(grog -Tpdf xtexcad.man) > XTeXcad.pdf

%install
rm -rf %{buildroot}
make install      DESTDIR=%{buildroot} \
	MANPATH=%{_mandir} XAPPLOADDIR=%{_appdefdir}
make install.man  DESTDIR=%{buildroot} \
	MANPATH=%{_mandir} XAPPLOADDIR=%{_appdefdir}
ln -sf xtexcad %{buildroot}%{_bindir}/texcad
rm -rf %{buildroot}/etc
rm -rf %{buildroot}/usr/lib/X11/app-defaults

%files
%defattr(-,root,root)
%doc COPYRIGHT HISTORY MANIFEST README XTeXcad.pdf
%{_bindir}/texcad
%{_bindir}/xtexcad
%config %{_appdefdir}//XTeXcad
%doc %{_mandir}/man1/xtexcad.1x.gz

%changelog
openSUSE Build Service is sponsored by