[packages/python-libgraphviz] - last version of graphviz with python2 module support, cut down to package just that module

qboosh qboosh at pld-linux.org
Fri Jul 26 07:09:19 CEST 2024


commit 1e7fd54f81cc0af1c02969ad281f75b7e1a1e688
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 26 05:43:09 2024 +0200

    - last version of graphviz with python2 module support, cut down to package just that module

 cppflags.patch          |  11 ++++
 python-libgraphviz.spec | 146 ++++++++++++++++++++++++++++++++++++++++++++++++
 python-paths.patch      |  17 ++++++
 3 files changed, 174 insertions(+)
---
diff --git a/python-libgraphviz.spec b/python-libgraphviz.spec
new file mode 100644
index 0000000..1c6aadc
--- /dev/null
+++ b/python-libgraphviz.spec
@@ -0,0 +1,146 @@
+Summary:	Python 2 binding for graphviz
+Summary(pl.UTF-8):	Wiązania Pythona 2 dla graphviza
+Name:		python-libgraphviz
+Version:	2.47.2
+Release:	7
+License:	EPL v1.0
+Group:		Libraries
+#Source0Download: https://graphviz.org/download/source/
+Source0:	https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/%{version}/graphviz-%{version}.tar.xz
+# Source0-md5:	4b60526ed7a6a43dfb23b5c175286cd8
+Patch14:	python-paths.patch
+Patch17:	cppflags.patch
+URL:		http://www.graphviz.org/
+BuildRequires:	ann-devel
+BuildRequires:	autoconf >= 2.61
+BuildRequires:	automake
+BuildRequires:	bison >= 3.0
+BuildRequires:	cairo-devel >= 1.0.0
+BuildRequires:	expat-devel >= 1.95
+BuildRequires:	flex >= 2.5.2
+BuildRequires:	fontconfig-devel
+BuildRequires:	freetype-devel >= 2.0.0
+BuildRequires:	gawk
+BuildRequires:	gcc >= 5:3.2
+BuildRequires:	gdk-pixbuf2-devel >= 2.0
+BuildRequires:	gettext-tools
+BuildRequires:	ghostscript-devel
+BuildRequires:	gtk+2-devel >= 2:2.8.0
+BuildRequires:	gts-devel
+BuildRequires:	libjpeg-devel
+BuildRequires:	libltdl-devel >= 2:2.2
+BuildRequires:	libpng-devel
+BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	libtool >= 2:2.2
+BuildRequires:	pango-devel >= 1:1.14.9
+BuildRequires:	pkgconfig
+BuildRequires:	python-devel >= 1:2.3
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 2.021
+BuildRequires:	sed >= 4.0
+BuildRequires:	swig >= 1.3
+BuildRequires:	swig-python >= 1.3
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xorg-lib-libX11-devel
+BuildRequires:	xorg-lib-libXaw-devel
+BuildRequires:	xorg-lib-libXpm-devel
+BuildRequires:	xz
+BuildRequires:	zlib-devel
+Requires:	graphviz-libs >= %{version}
+Obsoletes:	graphviz-python < 2.26.3-1
+Obsoletes:	python-graphviz < 2.44.1-10
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python 2 binding for graphviz.
+
+%description -l pl.UTF-8
+Wiązania Pythona 2 dla graphviza.
+
+%prep
+%setup -q -n graphviz-%{version}
+%patch14 -p1
+%patch17 -p1
+
+%{__sed} -i -e '1s,/usr/bin/python$,%{__python},' tclpkg/gv/demo/modgraph.py
+
+%build
+touch config/config.rpath
+%{__libtoolize} --ltdl
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+
+CPPFLAGS="%{rpmcppflags}"
+export CPPFLAGS
+
+%configure \
+%ifarch %{x8664} aarch64 ppc64 sparc64 s390x
+	LIBPOSTFIX="64" \
+%endif
+%ifarch x32
+	LIBPOSTFIX="x32" \
+%endif
+	ac_cv_lib_criterion_main=no \
+	--disable-go \
+	--disable-guile \
+	--disable-java \
+	--disable-ltdl-install \
+	--disable-lua \
+	--disable-ocaml \
+	--disable-perl \
+	--disable-php \
+	--disable-python \
+	--disable-python3 \
+	--disable-r \
+	--disable-ruby \
+	--disable-sharp \
+	--disable-tcl \
+	--disable-silent-rules \
+	--disable-static \
+	--without-devil \
+	--without-ghostscript \
+	--without-ipsepcola \
+	--without-lasi \
+	--without-libgd \
+	--without-poppler \
+	--without-qt \
+	--without-rsvg \
+	--without-smyrna \
+	--without-visio \
+	--without-webp
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -j1 install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%{__mv} $RPM_BUILD_ROOT%{_mandir}/man3/gv.3python $RPM_BUILD_ROOT%{_mandir}/man3/gv_python2.3
+
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/*
+%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/graphviz
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/graphviz/lib*
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/graphviz/python2/*.la
+%{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/lib*.pc
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/graphviz/{demo,doc,graphs,gvpr,lefty}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/*
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/{cdt,cgraph,expr,gvc,gvpr,pack,pathplan,xdot}.3
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/graphviz.7
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%dir %{_libdir}/graphviz/python2
+%attr(755,root,root) %{_libdir}/graphviz/python2/libgv_python2.so
+%attr(755,root,root) %{_libdir}/graphviz/python2/_gv.so
+%{_libdir}/graphviz/python2/gv.py
+%attr(755,root,root) %{py_sitedir}/_gv.so
+%{py_sitedir}/gv.py
+%{_mandir}/man3/gv_python2.3*
diff --git a/cppflags.patch b/cppflags.patch
new file mode 100644
index 0000000..3c456e8
--- /dev/null
+++ b/cppflags.patch
@@ -0,0 +1,11 @@
+--- graphviz-2.47.2/configure.ac.orig	2023-07-07 01:21:15.427742856 +0200
++++ graphviz-2.47.2/configure.ac	2023-07-07 01:49:04.518671957 +0200
+@@ -739,7 +739,7 @@
+ 			false)
+ 		])
+           ac_save_CFLAGS="$CFLAGS"
+-          ac_save_CPPFLAGS="$save_CPPFLAGS"
++          ac_save_CPPFLAGS="$CPPFLAGS"
+           CFLAGS="$CFLAGS $GUILE_INCLUDES"
+           CPPFLAGS="$CPPFLAGS $GUILE_INCLUDES"
+           AC_CHECK_HEADER(libguile.h,,[
diff --git a/python-paths.patch b/python-paths.patch
new file mode 100644
index 0000000..7faf48c
--- /dev/null
+++ b/python-paths.patch
@@ -0,0 +1,17 @@
+--- graphviz-2.47.2/config/config_python.py~	2014-04-13 22:40:25.000000000 +0200
++++ graphviz-2.47.2/config/config_python.py	2015-12-27 14:46:09.464163577 +0100
+@@ -2,10 +2,10 @@
+ from distutils import sysconfig
+ 
+ if sys.argv[1] == "archlib":
+-  print(sysconfig.get_python_lib(1,1))
++  print(sysconfig.get_python_lib(plat_specific=True, standard_lib=True, prefix='/usr'))
+ elif sys.argv[1] == "lib":
+-  print(sysconfig.get_python_lib(0,1))
++  print(sysconfig.get_python_lib(plat_specific=False, standard_lib=True, prefix='/usr'))
+ elif sys.argv[1] == "archsitelib":
+-  print(sysconfig.get_python_lib(1,0))
++  print(sysconfig.get_python_lib(plat_specific=True, standard_lib=False, prefix='/usr'))
+ elif sys.argv[1] == "sitelib":
+-  print(sysconfig.get_python_lib(0,0))
++  print(sysconfig.get_python_lib(plat_specific=False, standard_lib=False, prefix='/usr'))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-libgraphviz.git/commitdiff/1e7fd54f81cc0af1c02969ad281f75b7e1a1e688



More information about the pld-cvs-commit mailing list