blob: 2d5ab292783791b3242069d289993490957bca73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
%global major_minor 6.0
Name: gnuplot
Summary: a portable command-line driven graphing utility
Version: %{major_minor}.0
Release: 1
License: gnuplot and MIT
URL: http://www.gnuplot.info/
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch1: gnuplot-4.2.0-fonts.patch
Patch2: gnuplot-4.6.4-singlethread.patch
Patch3: gnuplot-5.0.0-lua_checkint.patch
Patch4: gnuplot-5.2.2-doc.patch
Patch5: gnuplot-config.patch
BuildRequires: cairo-devel latex2html emacs gd-devel giflib-devel libotf libpng-devel
BuildRequires: librsvg2 texinfo libX11-devel libXt-devel lua-devel m17n-lib tex-tex4ht
BuildRequires: tex(ecrm1000.tfm) tex(subfigure.sty) tex(cm-super-t1.enc)
BuildRequires: zlib-devel libjpeg-turbo-devel pango-devel qt5-linguist tex(latex)
BuildRequires: qt5-qtsvg-devel qt5-qtbase-devel /usr/bin/texi2dvi
Requires: tex-preview dejavu-sans-fonts
Requires: tex(latex) tex(cm-super-t1.enc) tex(ecrm1000.tfm) tex(utf8x.def)
Requires(post): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
Obsoletes: gnuplot-qt < 5.0.0-4
Obsoletes: %{name}-common < %{version}-%{release}
Provides: %{name}-common = %{version}-%{release}
Obsoletes: %{name}-minimal < %{version}-%{release}
Provides: %{name}-minimal = %{version}-%{release}
Obsoletes: %{name}-latex < %{version}-%{release}
Provides: %{name}-latex = %{version}-%{release}
Obsoletes: emacs-%{name} <= 5.0.0-3
Obsoletes: emacs-%{name}-el <= 5.0.0-3
%description
Gnuplot is a portable command-line driven graphing utility for Linux, OS/2, MS
Windows, OSX, VMS, and many other platforms. The source code is copyrighted but
freely distributed (i.e., you don't have to pay for it). It was originally
created to allow scientists and students to visualize mathematical functions and
data interactively, but has grown to support many non-interactive uses such as
web scripting. It is also used as a plotting engine by third-party applications
like Octave. Gnuplot has been supported and under active development since 1986.
%package_help
%prep
%autosetup -p1
rm -rf demo/lena*
sed -i -e 's:"/usr/lib/X11/app-defaults":"%{_datadir}/X11/app-defaults":' src/gplt_x11.c
chmod 644 src/getcolor.h
chmod 644 demo/html/webify.pl
chmod 644 demo/html/webify_svg.pl
chmod 644 demo/html/webify_canvas.pl
%build
rm -rf demo/plugin/*.so demo/plugin/*.o
%global configure_opts \\\
--with-readline=builtin \\\
--enable-history-file \\\
--with-texdir=/usr/share/texlive/texmf-dist/tex/latex/gnuplot
mkdir minimal
pushd minimal
cp -a ../configure .
%configure %{configure_opts} \
--disable-wxwidgets \
--without-qt
%make_build
popd
mkdir qt
pushd qt
cp -a ../configure .
%configure %{configure_opts} \
--disable-wxwidgets \
--enable-qt
%make_build
popd
%configure %{configure_opts}
ln -s ../minimal/src/%{name} src/
make -C docs info
export GNUPLOT_PS_DIR=../../term/PostScript
make -C docs/psdoc ps_symbols.ps ps_fontfile_doc.pdf
rm -rf docs/htmldocs/images.idx
%install
make -C qt install DESTDIR=%{buildroot} INSTALL='install -p'
mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-qt
install -p -m 755 minimal/src/%{name} %{buildroot}%{_bindir}/%{name}-minimal
make -C docs install-info DESTDIR=%{buildroot} INSTALL='install -p'
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
install -d %{buildroot}%{_datadir}/X11/app-defaults
mv %{buildroot}%{_datadir}/%{name}/%{major_minor}/app-defaults/Gnuplot %{buildroot}%{_datadir}/X11/app-defaults/Gnuplot
rm -rf $RPM_BUILD_ROOT%{_libdir}/
ln -s gnuplot.1 $RPM_BUILD_ROOT/%{_mandir}/man1/gnuplot-qt.1
touch %{buildroot}%{_bindir}/%{name}
%posttrans
%{_sbindir}/alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-qt 61
%{_sbindir}/alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-minimal 40
%post
[ -e %{_bindir}/texhash ] && %{_bindir}/texhash 2> /dev/null;
%preun
if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove %{name} %{_bindir}/%{name}-qt || :
%{_sbindir}/alternatives --remove %{name} %{_bindir}/%{name}-minimal || :
fi
%files
%ghost %attr(0755,-,-) %{_bindir}/%{name}
%{_bindir}/%{name}-qt
%{_libexecdir}/%{name}/%{major_minor}/%{name}_qt
%{_datadir}/%{name}/%{major_minor}/qt/
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/%{major_minor}
%dir %{_datadir}/%{name}/%{major_minor}/PostScript
%{_datadir}/%{name}/%{major_minor}/PostScript/*.ps
%{_datadir}/%{name}/%{major_minor}/PostScript/aglfn.txt
%dir %{_datadir}/%{name}/%{major_minor}/js
%{_datadir}/%{name}/%{major_minor}/js/*
%dir %{_datadir}/%{name}/%{major_minor}/lua/
%{_datadir}/%{name}/%{major_minor}/lua/%{name}-tikz.lua
%{_datadir}/%{name}/%{major_minor}/colors_*
%{_datadir}/%{name}/%{major_minor}/%{name}.gih
%{_datadir}/%{name}/%{major_minor}/%{name}rc
%dir %{_libexecdir}/%{name}
%dir %{_libexecdir}/%{name}/%{major_minor}
%{_libexecdir}/%{name}/%{major_minor}/%{name}_x11
%{_datadir}/X11/app-defaults/Gnuplot
%{_infodir}/%{name}.info*
%{_bindir}/%{name}-minimal
%{_datadir}/texlive/texmf-dist/tex/latex/%{name}/
%files help
%doc BUGS Copyright FAQ.pdf NEWS README RELEASE_NOTES
%{_mandir}/man1/gnuplot.1*
%{_mandir}/man1/gnuplot-qt.1*
%{_mandir}/ja/man1/gnuplot.1.gz
%doc docs/psdoc/ps_guide.ps
%doc docs/psdoc/ps_symbols.ps
%doc docs/psdoc/ps_file.doc demo
%doc docs/psdoc/ps_fontfile_doc.pdf
%changelog
* Sun Apr 28 2024 yaoxin <yao_xin001@hoperun.com> - 6.0.0-1
- Upgrade to 6.0.0
* Fri Apr 14 2023 liyanan <thistleslyn@163.com> - 5.4.5-1
- Update to 5.4.5
* Thu Feb 09 2023 Ge Wang <wangge20@h-partners.com> - 5.0.6-13
- Fix Missing texdir build failure due to texlive-base updated
* Mon Feb 17 2020 Tianfei <tianfei16@huawei.com> - 5.0.6-12
- Package init
|