summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-08-06 12:21:54 +0000
committerCoprDistGit <infra@openeuler.org>2025-08-06 12:21:54 +0000
commit7ce9374948d79011224a28523a428ad4e6874c91 (patch)
tree5a017e3558108b1a78b3803fc6afa333978bd7d7
parent495c6a9d7a708b98fe40a23f4c39d1abe6904c99 (diff)
automatic import of gnuplotopeneuler25.03
-rw-r--r--.gitignore1
-rw-r--r--gnuplot-4.2.0-fonts.patch12
-rw-r--r--gnuplot-4.6.4-singlethread.patch15
-rw-r--r--gnuplot-5.0.0-lua_checkint.patch13
-rw-r--r--gnuplot-5.2.2-doc.patch27
-rw-r--r--gnuplot-config.patch13
-rw-r--r--gnuplot.spec165
-rw-r--r--sources1
8 files changed, 247 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..5f232c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gnuplot-6.0.0.tar.gz
diff --git a/gnuplot-4.2.0-fonts.patch b/gnuplot-4.2.0-fonts.patch
new file mode 100644
index 0000000..2b197a0
--- /dev/null
+++ b/gnuplot-4.2.0-fonts.patch
@@ -0,0 +1,12 @@
+diff -up gnuplot-4.4.0/term/gd.trm.pom gnuplot-4.4.0/term/gd.trm
+--- gnuplot-4.4.0/term/gd.trm.pom 2010-02-25 03:29:20.000000000 +0100
++++ gnuplot-4.4.0/term/gd.trm 2010-08-17 09:51:22.000000000 +0200
+@@ -978,7 +978,7 @@ PNG_options()
+ if (external_default)
+ png_state.ttffont = gp_strdup(external_default);
+ else /* Might as well try some plausible font; it's no worse than failing immediately */
+- png_state.ttffont = gp_strdup("arial");
++ png_state.ttffont = gp_strdup("/usr/share/fonts/dejavu/DejaVuSans.ttf");
+
+ free(png_state.default_ttffont);
+ png_state.default_ttffont = gp_strdup(png_state.ttffont);
diff --git a/gnuplot-4.6.4-singlethread.patch b/gnuplot-4.6.4-singlethread.patch
new file mode 100644
index 0000000..f492d50
--- /dev/null
+++ b/gnuplot-4.6.4-singlethread.patch
@@ -0,0 +1,15 @@
+diff -up wrk/src/wxterminal/wxt_gui.h.wrk wrk/src/wxterminal/wxt_gui.h
+--- wrk/src/wxterminal/wxt_gui.h.wrk 2014-04-15 17:45:55.184153975 +0200
++++ wrk/src/wxterminal/wxt_gui.h 2014-04-15 17:48:08.151643628 +0200
+@@ -155,8 +155,9 @@ extern "C" {
+ * already has its event loop, we may or may not be multithreaded */
+ #ifndef WXT_MONOTHREADED
+ #if defined(__WXGTK__)
+-# define WXT_MULTITHREADED
+-#elif defined(__WXMSW__) || defined(__WXMAC__)
++//avoid a crash when unlocking a not-locked mutex, do not use threads
++//# define WXT_MULTITHREADED
++//#elif defined(__WXMSW__) || defined(__WXMAC__)
+ # define WXT_MONOTHREADED
+ #else
+ # error "wxt does not know if this platform has to be single- or multi-threaded"
diff --git a/gnuplot-5.0.0-lua_checkint.patch b/gnuplot-5.0.0-lua_checkint.patch
new file mode 100644
index 0000000..d5d69a9
--- /dev/null
+++ b/gnuplot-5.0.0-lua_checkint.patch
@@ -0,0 +1,13 @@
+diff -up wrk/term/lua.trm.wrk wrk/term/lua.trm
+--- wrk/term/lua.trm.wrk 2015-01-26 18:36:53.242174908 +0100
++++ wrk/term/lua.trm 2015-01-26 18:38:44.674258427 +0100
+@@ -114,6 +114,9 @@ TERM_PUBLIC void LUA_boxed_text __PROTO(
+ #include <lualib.h>
+ #include <lauxlib.h>
+
++//luaL_checkint macro disappeared
++#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
++
+ static lua_State *L = NULL;
+
+ static char *LUA_script = NULL;
diff --git a/gnuplot-5.2.2-doc.patch b/gnuplot-5.2.2-doc.patch
new file mode 100644
index 0000000..33fd91e
--- /dev/null
+++ b/gnuplot-5.2.2-doc.patch
@@ -0,0 +1,27 @@
+diff -up gnuplot-5.2.4/docs/gnuplot.doc gnuplot-5.2.4/docs/gnuplot
+diff -up gnuplot-5.2.4/docs/gnuplot-ja.doc gnuplot-5.2.4/docs/gnuplot-ja
+diff -up gnuplot-5.2.4/docs/Makefile.am.doc gnuplot-5.2.4/docs/Makefile.am
+--- gnuplot-5.2.4/docs/Makefile.am.doc 2017-12-22 18:32:48.000000000 +0100
++++ gnuplot-5.2.4/docs/Makefile.am 2018-08-08 14:00:40.014932164 +0200
+@@ -322,7 +322,7 @@ ${ELCS}: gnuplot-eldoc.el
+ # that only appears to work with a non-generated texi file for input.
+
+ gnuplot.info: gnuplot.texi
+- $(AM_V_GEN) $(MAKEINFO) -I$(srcdir) $< --no-split --output=$@
++ $(AM_V_GEN) $(MAKEINFO) -I$(srcdir) $< --no-split --force --output=$@
+
+ install-info: gnuplot.info
+ $(AM_V_at) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
+diff -up gnuplot-5.2.4/docs/Makefile.in.doc gnuplot-5.2.4/docs/Makefile.in
+--- gnuplot-5.2.4/docs/Makefile.in.doc 2018-06-01 03:51:14.000000000 +0200
++++ gnuplot-5.2.4/docs/Makefile.in 2018-08-08 14:03:26.797479806 +0200
+@@ -1090,7 +1090,7 @@ ${ELCS}: gnuplot-eldoc.el
+ # that only appears to work with a non-generated texi file for input.
+
+ gnuplot.info: gnuplot.texi
+- $(AM_V_GEN) $(MAKEINFO) -I$(srcdir) $< --no-split --output=$@
++ $(AM_V_GEN) $(MAKEINFO) -I$(srcdir) $< --no-split --force --output=$@
+
+ install-info: gnuplot.info
+ $(AM_V_at) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
+diff -up gnuplot-5.2.4/docs/psdoc/ps_file.doc gnuplot-5.2.4/docs/psdoc/ps_file
diff --git a/gnuplot-config.patch b/gnuplot-config.patch
new file mode 100644
index 0000000..790ba46
--- /dev/null
+++ b/gnuplot-config.patch
@@ -0,0 +1,13 @@
+diff --git a/configure b/configure
+index f1046e4..e0c4f76 100755
+--- a/configure
++++ b/configure
+@@ -2092,7 +2092,7 @@ else
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char $2 ();
++__attribute__ ((used)) char $2 ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
diff --git a/gnuplot.spec b/gnuplot.spec
new file mode 100644
index 0000000..2d5ab29
--- /dev/null
+++ b/gnuplot.spec
@@ -0,0 +1,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
diff --git a/sources b/sources
new file mode 100644
index 0000000..2b7ad3b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+10246eb96bbf3a151d6eb9bbcc223e4e gnuplot-6.0.0.tar.gz