SHA256
1
0
forked from pool/graphviz

- Split off smyrna into its own package and spec file to eliminate

the dependency cycle for the graphviz package.
- Add libGLU and libGL as libraries to link to which was missing.

OBS-URL: https://build.opensuse.org/package/show/graphics/graphviz?expand=0&rev=70
This commit is contained in:
Philipp Thomas 2013-10-24 09:38:23 +00:00 committed by Git OBS Bridge
parent a650d5f300
commit c0eac2ac7c
7 changed files with 185 additions and 3 deletions

View File

@ -36,7 +36,6 @@ BuildRequires: automake
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: freeglut-devel
BuildRequires: freetype2-devel >= 2
BuildRequires: gcc-c++
BuildRequires: libXaw-devel

View File

@ -32,7 +32,6 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
BuildRequires: freeglut-devel
BuildRequires: freetype2-devel >= 2
BuildRequires: gcc-c++
BuildRequires: gd-devel

View File

@ -0,0 +1,17 @@
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: configure.ac
===================================================================
--- configure.ac.orig 2013-10-23 17:25:44.020188917 +0200
+++ configure.ac 2013-10-23 17:26:17.637411247 +0200
@@ -2811,7 +2811,7 @@ else
AC_CHECK_HEADER(GL/glut.h,
AC_CHECK_LIB(glut,main,
- [GLUT_LIBS="$GLUT_LIBS -lglut"
+ [GLUT_LIBS="$GLUT_LIBS -lglut $(pkg-config --libs glu)"
use_glut="Yes"
AC_DEFINE_UNQUOTED(HAVE_GLUT,1,[Define if you have the GLUT library])],
use_glut="No (missing libglut)"

8
graphviz-smyrna.changes Normal file
View File

@ -0,0 +1,8 @@
-------------------------------------------------------------------
Thu Oct 24 11:16:01 CEST 2013 - pth@suse.de
- Split off smyrna into its own package and spec file to eliminate
the dependency cycle for the graphviz package.
- Add libGLU and libGL as libraries to link to which was missing.

154
graphviz-smyrna.spec Normal file
View File

@ -0,0 +1,154 @@
#
# spec file for package graphviz-smyrna
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define mname graphviz
Name: graphviz-smyrna
Version: 2.34.0
Release: 0
Summary: Glut based graph viewer
License: IPL-1.0
Group: Productivity/Graphics/Visualization/Graph
Url: http://www.graphviz.org/
Source: http://www.graphviz.org/pub/graphviz/ARCHIVE/%{mname}-%{version}.tar.gz
Source2: graphviz-rpmlintrc
Patch2: graphviz-fix-pkgIndex.patch
#PATCH-FIX-UPSTREAM There are too many type-punnings in the vmalloc sources
Patch3: graphviz-no_strict_aliasing.patch
Patch4: graphviz-python3_version.patch
#PATCH-FIX-UPSTREAM add flags to also link against libGLU and libGL
Patch10: graphviz-smyrna-link_against_glu.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: freeglut-devel
BuildRequires: freetype2-devel >= 2
BuildRequires: gcc-c++
BuildRequires: libXaw-devel
BuildRequires: libexpat-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libqt4-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: zlib-devel
%ifnarch aarch64
%if 0%suse_version > 1220
BuildRequires: freeglut-devel
BuildRequires: glu-devel
BuildRequires: gtkglarea2-devel
BuildRequires: gtkglext-devel
BuildRequires: gts-devel
BuildRequires: libglade2-devel
%endif
%endif
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
Requires(pre): /bin/cat
Requires(pre): /bin/rm
Recommends: graphviz = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This is the graph editor included with graphviz, packaged
separately to avoid cycles in the build of the graphviz
package.
%prep
%setup -q -n %{mname}-%{version}
%patch2
%patch3
%patch4 -p1
%patch10
# Fix path in generated man pages
sed -e 's$@LIB_DIR@$%{_libdir}$g' tclpkg/gv/gv_doc_langs.tcl >tclpkg/gv/gv_doc_langs.tcl.new && mv tclpkg/gv/gv_doc_langs.tcl.new tclpkg/gv/gv_doc_langs.tcl
%build
autoreconf -fi
WARN_FLAGS="-W -Wall -Wno-unused-parameter -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith"
CFLAGS="%{optflags} $WARN_FLAGS"
%ifarch %ix86 x86_64
CFLAGS="$CFLAGS -ffast-math"
%endif
export CFLAGS="$CFLAGS"
export CPPFLAGS="%{optflags}"
%configure \
--with-x \
--with-mylibgd \
--disable-static \
--enable-ltdl-install=no \
--with-ipsepcola \
--without-ming \
--disable-io \
--disable-silent-rules \
--with-mylibgd=no \
--with-libgd=no \
--with-smyrna=yes
make %{?_smp_mflags} DESTDIR=%{buildroot}
%install
make install \
DESTDIR=%{buildroot} \
docdir=%{buildroot}%{_docdir}/%{mname} \
pkgconfigdir=%{_libdir}/pkgconfig
find %{buildroot} -type f -name "*.la" -print0 | xargs -0 rm -f
mkdir -p %{buildroot}/%{_docdir}
mkdir -p %{buildroot}%{_datadir}/%{mname}
rm -f %{buildroot}/%{_libdir}/%{mname}/pkgIndex.tcl
cp -a %{buildroot}%{_datadir}/%{mname}/doc __doc
rm -rf %{buildroot}%{_datadir}/%{mname}/doc
rm -rf %{buildroot}%{_libdir}
mv %{buildroot}/%{_mandir}/man1/smyrna.1 /tmp/smyrna.1
rm -f %{buildroot}/%{_mandir}/man1/*
rm -rf %{buildroot}/%{_mandir}/man[37]
mv /tmp/smyrna.1 %{buildroot}/%{_mandir}/man1/smyrna.1
mv %{buildroot}/%{_bindir}/smyrna /tmp/smyrna
rm -f %{buildroot}/%{_bindir}/*
mv /tmp/smyrna %{buildroot}/%{_bindir}/smyrna
rm -rf %{buildroot}%{_datadir}/%{mname}/graphs
rm -rf %{buildroot}%{_datadir}/%{mname}/examples
rm -rf %{buildroot}%{_datadir}/%{mname}/gvedit
rm -rf %{buildroot}%{_datadir}/%{mname}/gvpr
rm -rf %{buildroot}%{_datadir}/%{mname}/lefty
rm -rf %{buildroot}%{_includedir}/%{mname}
%files
%defattr(-,root,root)
%doc COPYING
%attr(755,root,root) %{_bindir}/smyrna
%dir %{_datadir}/%{mname}
%{_datadir}/%{mname}/smyrna
%doc %{_mandir}/man1/*.1*
%changelog

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 23 12:30:42 CEST 2013 - pth@suse.de
- Split off smyrna into its own package and spec to eliminate the
dependency cycle for graphiz.
-------------------------------------------------------------------
Mon Oct 14 14:06:03 CEST 2013 - pth@suse.de

View File

@ -38,7 +38,6 @@ BuildRequires: automake
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: freeglut-devel
BuildRequires: freetype2-devel >= 2
BuildRequires: gcc-c++
BuildRequires: libXaw-devel