From 8f7711145d08740c9758660df62a7ba62a5b1df93fbe9c4fc8a5eaaa3bcd6d12 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 9 Oct 2018 10:00:40 +0000 Subject: [PATCH] Detect libgd and its features as well OBS-URL: https://build.opensuse.org/package/show/Publishing/gnuplot?expand=0&rev=98 --- gnuplot-gd.patch | 20 ++++++++++++-------- gnuplot.spec | 11 ++++++++++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/gnuplot-gd.patch b/gnuplot-gd.patch index e0891df..ba4acde 100644 --- a/gnuplot-gd.patch +++ b/gnuplot-gd.patch @@ -1,13 +1,13 @@ Index: gnuplot-5.2.2/configure.ac =================================================================== --- - gnuplot-5.2.3/configure.ac | 62 ++++-------------------------------------- - gnuplot-5.2.3/src/Makefile.am | 2 - - 2 files changed, 7 insertions(+), 57 deletions(-) + gnuplot-5.2.5/configure.ac | 66 ++++++------------------------------------ + gnuplot-5.2.5/src/Makefile.am | 2 - + 2 files changed, 11 insertions(+), 57 deletions(-) ---- gnuplot-5.2.3/configure.ac -+++ gnuplot-5.2.3/configure.ac 2018-05-07 07:14:11.118955435 +0000 -@@ -577,63 +577,13 @@ AC_ARG_WITH(gd,dnl +--- gnuplot-5.2.5/configure.ac ++++ gnuplot-5.2.5/configure.ac 2018-10-09 09:38:56.700946180 +0000 +@@ -577,63 +577,17 @@ AC_ARG_WITH(gd,dnl with_gd=yes) if test "$with_gd" != no; then @@ -32,6 +32,10 @@ Index: gnuplot-5.2.2/configure.ac - AC_CHECK_LIB(gd,gdImageCreateTrueColor, - [dnl found gd library +PKG_CHECK_MODULES([GD], [gdlib], [ ++ ac_cv_lib_gd_gdImageJpeg=yes ++ ac_cv_lib_gd_gdImagePng=yes ++ ac_cv_lib_gd_gdImageGif=yes ++ ac_cv_lib_gd_gdImageGifAnimBegin=yes AC_DEFINE(HAVE_LIBGD,1,[ Define if you have gd library. ]) - AC_CHECK_HEADERS(gd.h,, - AC_MSG_WARN([please add path to gd.h to CPPFLAGS in Makefile])) @@ -77,8 +81,8 @@ Index: gnuplot-5.2.2/configure.ac fi dnl end gd ---- gnuplot-5.2.3/src/Makefile.am -+++ gnuplot-5.2.3/src/Makefile.am 2018-05-07 07:14:11.118955435 +0000 +--- gnuplot-5.2.5/src/Makefile.am ++++ gnuplot-5.2.5/src/Makefile.am 2018-10-09 09:36:58.135163622 +0000 @@ -58,7 +58,7 @@ tabulate.c tabulate.h \ template.h term_api.h term.c term.h time.c unset.c util.c util.h \ util3d.c util3d.h variable.c variable.h version.c version.h diff --git a/gnuplot.spec b/gnuplot.spec index d813a99..a09508b 100644 --- a/gnuplot.spec +++ b/gnuplot.spec @@ -35,6 +35,7 @@ BuildRequires: netpbm BuildRequires: pango-devel BuildRequires: readline-devel BuildRequires: pkgconfig(caca) +BuildRequires: pkgconfig(gdlib) BuildRequires: pkgconfig(x11) %if %qtver >= 5 BuildRequires: libqt5-linguist-devel @@ -165,6 +166,13 @@ autoreconf -fi export CXXFLAGS="$CFLAGS -fno-strict-aliasing" export LDFLAGS="-L%{_x11lib} -Wl,--as-needed" export ARCHLIB=%_lib +%if 0%{?suse_version} +%if !0%{?sle_version} + export CFLAGS="$CFLAGS -DDIST_CONTACT='https://bugs.opensuse.org/'" +%else + export CFLAGS="$CFLAGS -DDIST_CONTACT='https://bugzilla.suse.com/'" +%endif +%endif for f in docs/makefile*; do test -e $f || continue mv $f $f.bak @@ -181,8 +189,9 @@ autoreconf -fi # sed -i "s;LRELEASE=lrelease;LRELEASE=lrelease-qt5;g" ./configure %configure \ - --enable-stats \ + --enable-stats \ --with-x \ + --with-x-dcop \ --x-includes=%{_x11inc} \ --x-libraries=%{_x11lib}\ --with-x-app-defaultdir=%{_appdef}\