From 969545301604df5cdf1267cd129ccae70ab778fb Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Wed, 17 Sep 2003 12:39:18 +0000 Subject: [PATCH] add optional X11 support for being able to use 'lefty' --- graphviz/graphviz.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/graphviz/graphviz.spec b/graphviz/graphviz.spec index 6d06b324fe..563a042534 100644 --- a/graphviz/graphviz.spec +++ b/graphviz/graphviz.spec @@ -33,7 +33,10 @@ Distribution: OpenPKG [BASE] Group: Graphics License: GPL Version: 1.10 -Release: 20030704 +Release: 20030917 + +# package options +%option with_x11 yes # list of sources Source0: http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-%{version}.tar.gz @@ -44,6 +47,10 @@ Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20020206, freetype, png, jpeg, gcc, make, flex, bison PreReq: OpenPKG, openpkg >= 20020206, freetype, png, jpeg +%if "%{with_x11}" == "yes" +BuildPreReq: X11 +PreReq: X11 +%endif AutoReq: no AutoReqProv: no @@ -74,7 +81,13 @@ AutoReqProv: no --with-jpeglibdir=%{l_prefix}/lib \ --without-tclsh \ --without-wish \ +%if "%{with_x11}" == "yes" + --with-x \ + --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \ + --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \ +%else --without-x \ +%endif --disable-shared \ --enable-static %{l_make} %{l_mflags} @@ -83,6 +96,9 @@ AutoReqProv: no rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib +%if "%{with_x11}" != "yes" + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/graphviz/lefty +%endif strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}