530b794
%define _legacy_common_support 1
127ea55
Name:           MagicPoint
40af0b0
Version:        1.13a
b128a4b
Release:        38%{?dist}
127ea55
Summary:        X based presentation software
127ea55
License:        BSD
127ea55
URL:            http://member.wide.ad.jp/wg/mgp/
127ea55
Source0:        ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/magicpoint-%{version}.tar.gz
127ea55
Patch0:         magicpoint-1.11b-debian.patch
127ea55
Patch1:         magicpoint-1.11b-64bit.patch
40af0b0
Patch2:         magicpoint-1.11b-embed.patch
40af0b0
Patch3:         magicpoint-1.13a-gcc-warnings.patch
40af0b0
Patch4:         magicpoint-1.13a-xwintoppm.patch
4ca7b9a
Patch5:         magicpoint-1.13a-no-m17n-config.patch
fded00c
Patch6:         magicpoint-1.13a-mng.patch
75a7655
Patch7:         magicpoint-1.13a-honor-cflags-for-unimap.patch
78d8421
# giflib-5.x compatibility
78d8421
Patch8:         magicpoint-1.13a-giflib5.patch
78d8421
# libpng > 1.5.0 compatibility
78d8421
Patch9:         magicpoint-1.13a-libpng.patch
4ca7b9a
Patch10:        magicpoint-1.13a-libmng-lib64.patch
c4901d2
Patch11: MagicPoint-c99.patch
4ca7b9a
BuildRequires:  make gcc
8f3787d
BuildRequires:  giflib-devel libpng-devel libmng-devel fontconfig-devel 
4ca7b9a
BuildRequires:  libXmu-devel libXft-devel m17n-lib-devel
a449b71
BuildRequires:  imake bison flex perl-interpreter perl-generators sharutils
127ea55
Requires:       sharutils
127ea55
Obsoletes:      mgp < %{version}-%{release}, magicpoint < %{version}-%{release}
127ea55
Provides:       mgp = %{version}-%{release}, magicpoint = %{version}-%{release}
127ea55
127ea55
%description
127ea55
MagicPoint is an X11 based presentation tool. MagicPoint's
127ea55
presentation files (typically .mgp files) are plain text so you can
127ea55
create presentation files quickly with your favorite editor.
127ea55
127ea55
127ea55
%prep
4ca7b9a
%autosetup -p1 -n magicpoint-%{version}
127ea55
127ea55
127ea55
%build
75a7655
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-pointer-sign -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function -D_DEFAULT_SOURCE"
91b16b9
export CFLAGS="$RPM_OPT_FLAGS"
4ca7b9a
# Stop configure from checking for non-existing m17n-config shell script
4ca7b9a
export HAVE_M17NLIB="yes"
4ca7b9a
%configure --enable-locale --enable-xft2 --enable-gif --with-m17n-lib
127ea55
xmkmf -a
127ea55
# LIBDIR is used by the makefile to determine where to install data files
b128a4b
make CDEBUGFLAGS="$RPM_OPT_FLAGS" EXTRA_LDOPTIONS="$LDFLAGS" LIBDIR=%{_datadir}
127ea55
127ea55
127ea55
%install
127ea55
make install install.man DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_datadir}
127ea55
install -m 755 contrib/mgp2html.pl $RPM_BUILD_ROOT%{_bindir}/mgp2html
127ea55
install -m 755 contrib/mgp2latex.pl $RPM_BUILD_ROOT%{_bindir}/mgp2latex
40af0b0
# stop these from ending up in %%doc
127ea55
rm sample/.cvsignore sample/*akefile*
127ea55
127ea55
127ea55
%files
4ca7b9a
%doc README SYNTAX USAGE sample
4ca7b9a
%license COPYRIGHT
127ea55
%{_bindir}/*
127ea55
%{_datadir}/mgp
127ea55
%{_mandir}/*/*
127ea55
127ea55
127ea55
%changelog
b128a4b
* Mon Apr 22 2024 Hans de Goede <hdegoede@redhat.com> - 1.13a-38
b128a4b
- Fix binaries not being PIE
b128a4b
- Fix FTBFS
b128a4b
- Resolves: rhbz#2260962
b128a4b
9e985e4
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-37
9e985e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
9e985e4
97fd28b
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-36
97fd28b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
97fd28b
0b89a58
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-35
0b89a58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
0b89a58
c4901d2
* Tue Apr 11 2023 Florian Weimer <fweimer@redhat.com> - 1.13a-34
c4901d2
- Port to C99 (#2185873)
c4901d2
c92fe34
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-33
c92fe34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
c92fe34
7bc0e6a
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-32
7bc0e6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
7bc0e6a
77d54d1
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-31
77d54d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
77d54d1
c723282
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-30
c723282
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
c723282
4ca7b9a
* Mon Feb 15 2021 Hans de Goede <hdegoede@redhat.com> - 1.13a-29
4ca7b9a
- Fix FTBFS (rhbz1923401)
4ca7b9a
- Drop Imlib support, only works with obsolete Imlib1
4ca7b9a
- Fix m17n support
4ca7b9a
- Fix libmng support on lib64 using arches
4ca7b9a
fa96a3a
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-28
fa96a3a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
fa96a3a
0a6b570
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-27
0a6b570
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0a6b570
530b794
* Thu Jul 16 2020 Jeff Law <law@redhat.com> - 1.13a-26
530b794
- Enable legacy common support
530b794
0cf4b18
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-25
0cf4b18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0cf4b18
bc14c86
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-24
bc14c86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
bc14c86
866c407
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-23
866c407
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
866c407
ab352f5
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.13a-22
ab352f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ab352f5
4815190
* Wed Mar 07 2018 Adam Williamson <awilliam@redhat.com> - 1.13a-21
4815190
- Rebuild to fix GCC 8 mis-compilation
4815190
  See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64")
4815190
78d8421
* Sun Feb 11 2018 Sandro Mani <manisandro@gmail.com> - 1.13a-20
78d8421
- Rebuild (giflib)
78d8421
- Switch to imlib2