ソースを参照

2015-05-07 Ryoichi INAGAKI <ryo1@toki.waseda.jp>

	* gnuplot: updated
	


git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9547 ec354946-7b23-47d6-9f5a-488ba84defc7
inagaki 10 年 前
コミット
4e4be27d03
1 ファイル変更142 行追加30 行削除
  1. 142 30
      g/gnuplot/gnuplot-vl.spec

+ 142 - 30
g/gnuplot/gnuplot-vl.spec

@@ -1,37 +1,60 @@
-%define gpmainver 4.6
-%define gpver %{gpmainver}.6
+%global major 5
+%global minor 0
+%global patchlevel 0
+
+%global x11_app_defaults_dir %{_datadir}/X11/app-defaults
 
 Summary: A program for plotting mathematical expressions and data.
 Summary(ja):  数学系の関数やデータのプロット・プログラム
 Name: gnuplot
-Version: %{gpver}
+Version: %{major}.%{minor}.%{patchlevel}
 Release: 1%{?_dist_release}
 
-License: gnuplot and GPLv2
+# MIT .. term/PostScript/aglfn.txt
+License: gnuplot and MIT
 Group: Applications/Engineering
-URL: http://gnuplot.sourceforge.net/
+URL: http://www.gnuplot.info/
 
-Source: http://prdownloads.sourceforge.net/gnuplot/gnuplot-%{version}.tar.gz
+Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 
-Patch0: gnuplot-4.6.4-font.patch
-# submitted upstream: http://sourceforge.net/tracker/?func=detail&aid=3558970&group_id=2055&atid=302055
-Patch1: gnuplot-4.6.1-xcopygc-sigsegv.patch
+Patch0: gnuplot-4.2.0-refers_to.patch
+#Patch1: gnuplot-4.2.0-fonts.patch
+# resolves: #812225
 # submitted upstream: http://sourceforge.net/tracker/?func=detail&aid=3558973&group_id=2055&atid=302055
-Patch2: gnuplot-4.6.1-plot-sigsegv.patch
+Patch3: gnuplot-4.6.1-plot-sigsegv.patch
+Patch4: gnuplot-4.6.4-singlethread.patch
+Patch5: gnuplot-5.0.0-lua_checkint.patch
 
+# Vine Patches (replaces Patch1)
+Patch70: gnuplot-5.0.0-fonts.patch
 
 BuildRoot: %{_tmppath}/%{name}-root
-BuildRequires: gd-devel >= 2.0.27, libpng-devel, zlib-devel
-BuildRequires: libX11-devel, libXt-devel, wxGTK-devel
-BuildRequires: readline-devel
-BuildRequires: lua-devel cairo-devel pango-devel
-BuildRequires: libXpm-devel libjpeg-turbo-devel
+#libedit-devel can not handle utf8, readline-devel is not legal with gnuplot, stick to builtin
+BuildRequires: cairo-devel
+BuildRequires: gd-devel >= 2.0.27
+BuildRequires: giflib-devel
+BuildRequires: libX11-devel
+BuildRequires: libXt-devel
+BuildRequires: libXpm-devel
+BuildRequires: libjpeg-turbo-devel
+BuildRequires: libpng-devel
+BuildRequires: lua-devel
+BuildRequires: m17n-lib
+BuildRequires: pango-devel
+BuildRequires: wxGTK-devel
+BuildRequires: zlib-devel
 
 BuildRequires: texlive
 BuildRequires: texlive-common
 BuildRequires: texlive-collection-latexextra
 BuildRequires: texlive-collection-htmlxml
 BuildRequires: texinfo
+BuildRequires: latex2html
+BuildRequires: emacs
+
+Requires: TrueType-dejavu
+Requires(post): install-info
+Requires(preun): install-info
 
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -55,18 +78,54 @@ Gnuplotは関数や座標データを同時にプロットしたり、3次元化
 科学データプレゼンテーション用のグラフィック・パッケージが必要な
 場合、gnuplotをインストールしてください。
 
+%package doc
+Summary: Documentation for the gnuplot main application
+Group: Applications/Documentation
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+The gnuplot-doc package contains the documentation related to gnuplot
+plotting tool
+
+%package latex
+Summary: Configuration for LaTeX typesetting using gnuplot
+Group: Applications/Engineering
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+Requires: texlive-collection-latexextra
+Requires: texlive-collection-fontsrecommended
+
+%description latex
+The gnuplot-latex package contains LaTeX configuration file related to gnuplot
+plotting tool.
+
+
 %prep
 %setup -q
-%patch0 -p1 -b .font
-%patch1 -p1 -b .xcopygc
-%patch2 -p1 -b .plot-sigsegv
+%patch0 -p1 -b .refto
+#patch1 -p1 -b .font
+%patch3 -p1 -b .plot-sigsegv
+%patch4 -p1 -b .isinglethread
+%patch5 -p1 -b .checkint
+sed -i -e 's:"/usr/lib/X11/app-defaults":"%{x11_app_defaults_dir}":' src/gplt_x11.c
+iconv -f windows-1252 -t utf-8 ChangeLog > ChangeLog.aux
+mv ChangeLog.aux ChangeLog
+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
+
+%patch70 -p1 -b .font
 
 %build
-#autoreconf -f -i
-%ifarch alpha
-%define optflags -O0
-%endif
-%configure --with-readline=gnu --with-png --without-linux-vga --enable-history-file --with-tutorial
+#remove binaries from source tarball
+rm -rf demo/plugin/*.so demo/plugin/*.o
+rm -rf docs_to_include
+mkdir -p docs_to_include
+cp -pr demo docs_to_include
+
+%configure --with-readline=builtin --without-linux-vga --enable-history-file --with-tutorial --without-qt
 
 make %{?_smp_mflags}
 
@@ -81,23 +140,76 @@ rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
 make -C docs install-info DESTDIR=%{buildroot} INSTALL='install -p'
 
-rm -f demo/Makefile* tutorial/Makefile*
+#rm -f demo/Makefile* tutorial/Makefile*
+#packaged by info package, updated by post-installation script, do not package here
+rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+
+mkdir -p $RPM_BUILD_ROOT%{x11_app_defaults_dir}
+mv $RPM_BUILD_ROOT%{_datadir}/gnuplot/%{major}.%{minor}/app-defaults/Gnuplot $RPM_BUILD_ROOT%{x11_app_defaults_dir}/Gnuplot
+rm -rf $RPM_BUILD_ROOT%{_libdir}/
+
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/ja/man1
+mv $RPM_BUILD_ROOT%{_mandir}/man1/gnuplot-ja.1 $RPM_BUILD_ROOT/%{_mandir}/ja/man1/gnuplot.1
 
 %clean
 rm -rf %{buildroot}
 
+
+%post
+if [ -f %{_infodir}/gnuplot.info* ]; then
+    /sbin/install-info %{_infodir}/gnuplot.info %{_infodir}/dir || :
+fi
+
+%preun
+if [ $1 = 0 ] ; then
+    if [ -f %{_infodir}/gnuplot.info* ]; then
+        /sbin/install-info --delete %{_infodir}/gnuplot.info %{_infodir}/dir || :
+    fi
+fi
+
+
 %files
 %defattr(-,root,root)
-%doc demo tutorial
-%doc README README.1ST INSTALL Copyright
-%doc PATCHLEVEL VERSION BUGS ChangeLog 
+%doc BUGS ChangeLog Copyright NEWS README
 %{_bindir}/gnuplot
-%{_libexecdir}/gnuplot/%{gpmainver}/*
-%{_datadir}/gnuplot/%{gpmainver}/*
-%{_datadir}/texmf/tex/latex/gnuplot
+%dir %{_libexecdir}/gnuplot/%{major}.%{minor}
+%{_libexecdir}/gnuplot/%{major}.%{minor}/gnuplot_x11
+%dir %{_datadir}/gnuplot/%{major}.%{minor}
+%dir %{_datadir}/gnuplot/%{major}.%{minor}/PostScript
+%dir %{_datadir}/gnuplot/%{major}.%{minor}/js
+%dir %{_datadir}/gnuplot/%{major}.%{minor}/lua
+%{_datadir}/gnuplot/%{major}.%{minor}/PostScript/*.ps
+%{_datadir}/gnuplot/%{major}.%{minor}/PostScript/aglfn.txt
+%{_datadir}/gnuplot/%{major}.%{minor}/js/*
+%{_datadir}/gnuplot/%{major}.%{minor}/lua/gnuplot-tikz.lua
+%{_datadir}/gnuplot/%{major}.%{minor}/colors_*
+%{_datadir}/gnuplot/%{major}.%{minor}/gnuplot.gih
+%{_datadir}/gnuplot/%{major}.%{minor}/gnuplotrc
+%{x11_app_defaults_dir}/Gnuplot
+%{_infodir}/gnuplot.info.gz
 %{_mandir}/man1/gnuplot.*
+%{_mandir}/ja/man1/gnuplot.*
+
+%files doc
+%defattr(-,root,root)
+%doc ChangeLog Copyright
+%doc docs/psdoc/ps_guide.ps docs/psdoc/ps_symbols.ps
+%doc tutorial/tutorial.dvi docs/psdoc/ps_file.doc
+%doc docs/psdoc/ps_fontfile_doc.pdf docs/htmldocs tutorial/eg7.eps
+%doc docs_to_include/demo
+
+%files latex
+%defattr(-,root,root)
+%doc ChangeLog Copyright
+%{_datadir}/texmf/tex/latex/gnuplot/
 
 %changelog
+* Thu May  7 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 5.0.0-1
+- new upstream release
+- libedit-devel can not handle utf8, readline-devel is not legal with gnuplot, stick to builtin
+  https://bugzilla.redhat.com/show_bug.cgi?id=1039102
+- split documents and latex-related files into subpackages
+
 * Sun Jan 25 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 4.6.6-1
 - update to 4.6.6