Detect libgd and its features as well

OBS-URL: https://build.opensuse.org/package/show/Publishing/gnuplot?expand=0&rev=98
This commit is contained in:
Dr. Werner Fink 2018-10-09 10:00:40 +00:00 committed by Git OBS Bridge
parent e4a16a04cc
commit 8f7711145d
2 changed files with 22 additions and 9 deletions

View File

@ -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

View File

@ -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}\