[packages/python-linkgrammar] - linkgrammar binding taken from link-grammar 5.7.0 (last version supporting python2)
qboosh
qboosh at pld-linux.org
Fri Jun 2 19:18:26 CEST 2023
commit 149f8f5a990fa64337077525d672ae68b3b961f2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jun 2 19:20:54 2023 +0200
- linkgrammar binding taken from link-grammar 5.7.0 (last version supporting python2)
link-grammar-modules.patch | 33 ++++++++++++++++
python-linkgrammar-system-lib.patch | 19 ++++++++++
python-linkgrammar.spec | 75 +++++++++++++++++++++++++++++++++++++
3 files changed, 127 insertions(+)
---
diff --git a/python-linkgrammar.spec b/python-linkgrammar.spec
new file mode 100644
index 0000000..8d71cb0
--- /dev/null
+++ b/python-linkgrammar.spec
@@ -0,0 +1,75 @@
+Summary: Python 2 binding for link-grammar library
+Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki link-grammar
+Name: python-linkgrammar
+Version: 5.7.0
+Release: 1
+License: LGPL v2.1
+Group: Libraries/Python
+Source0: http://www.nl.abisource.com/downloads/link-grammar/%{version}/link-grammar-%{version}.tar.gz
+# Source0-md5: 69c51be8cba7a23bbea5b80e41b51891
+Patch0: link-grammar-modules.patch
+Patch1: %{name}-system-lib.patch
+URL: http://www.link.cs.cmu.edu/link/
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake
+BuildRequires: gcc >= 6:4.7
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libtool >= 2:2
+BuildRequires: link-grammar-devel >= 5.7.0
+BuildRequires: pcre2-8-devel
+BuildRequires: pkgconfig
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: sqlite3-devel >= 3.0.0
+BuildRequires: swig-python >= 2.0.0
+Requires: link-grammar >= 5.7.0
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python 2 binding for link-grammar library.
+
+%description -l pl.UTF-8
+Wiązanie Pythona 2 do biblioteki link-grammar.
+
+%prep
+%setup -q -n link-grammar-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__automake}
+%configure \
+ --disable-aspell \
+ --disable-binreloc \
+ --disable-editline \
+ --disable-hunspell \
+ --disable-java-bindings \
+ --enable-python-bindings=2 \
+ --disable-silent-rules
+
+%{__make} -C bindings/python \
+ python2dir=%{py_sitedir}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C bindings/python install \
+ DESTDIR=$RPM_BUILD_ROOT \
+ python2dir=%{py_sitedir}
+
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/linkgrammar/_clinkgrammar.la \
+ $RPM_BUILD_ROOT%{py_sitedir}/linkgrammar/_clinkgrammar.a
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%dir %{py_sitedir}/linkgrammar
+%attr(755,root,root) %{py_sitedir}/linkgrammar/_clinkgrammar.so
+%{py_sitedir}/linkgrammar/*.py[co]
diff --git a/link-grammar-modules.patch b/link-grammar-modules.patch
new file mode 100644
index 0000000..736c89b
--- /dev/null
+++ b/link-grammar-modules.patch
@@ -0,0 +1,33 @@
+--- link-grammar-5.6.0/bindings/perl/Makefile.am.orig 2017-01-03 21:43:00.000000000 +0100
++++ link-grammar-5.6.0/bindings/perl/Makefile.am 2019-04-30 20:31:23.973082432 +0200
+@@ -45,7 +45,7 @@
+ -I$(top_srcdir) \
+ -I$(top_builddir)
+
+-clinkgrammar_la_LDFLAGS = -version-info @VERSION_INFO@ $(PERL_LDFLAGS) -module -no-undefined
++clinkgrammar_la_LDFLAGS = -avoid-version $(PERL_LDFLAGS) -module -no-undefined
+ clinkgrammar_la_LIBADD = $(top_builddir)/link-grammar/liblink-grammar.la
+
+ if HAVE_HUNSPELL
+--- link-grammar-5.6.0/bindings/python/Makefile.am.orig 2018-12-29 07:17:26.000000000 +0100
++++ link-grammar-5.6.0/bindings/python/Makefile.am 2019-04-30 20:32:05.739522830 +0200
+@@ -72,7 +72,7 @@
+ endif
+ endif
+ _clinkgrammar_la_LDFLAGS = \
+- -version-info @VERSION_INFO@ $(AVOID_VERSION) \
++ -avoid-version \
+ $(PYTHON2_LDFLAGS) -module -no-undefined $(PYMODULE_EXT)
+ _clinkgrammar_la_LIBADD = \
+ $(top_builddir)/link-grammar/liblink-grammar.la $(PYTHON2_LIBS)
+--- link-grammar-5.6.0/bindings/python3/Makefile.am.orig 2018-12-29 07:17:26.000000000 +0100
++++ link-grammar-5.6.0/bindings/python3/Makefile.am 2019-04-30 20:32:25.162750939 +0200
+@@ -83,7 +83,7 @@
+ endif
+ endif
+ _clinkgrammar_la_LDFLAGS = \
+- -version-info @VERSION_INFO@ $(AVOID_VERSION) \
++ -avoid-version \
+ $(PYTHON2_LDFLAGS) -module -no-undefined $(PYMODULE_EXT)
+ _clinkgrammar_la_LIBADD = \
+ $(top_builddir)/link-grammar/liblink-grammar.la $(PYTHON3_LIBS)
diff --git a/python-linkgrammar-system-lib.patch b/python-linkgrammar-system-lib.patch
new file mode 100644
index 0000000..9ce933e
--- /dev/null
+++ b/python-linkgrammar-system-lib.patch
@@ -0,0 +1,19 @@
+--- link-grammar-5.7.0/bindings/python/Makefile.am.orig 2023-06-02 19:11:33.020036329 +0200
++++ link-grammar-5.7.0/bindings/python/Makefile.am 2023-06-02 19:11:35.733354963 +0200
+@@ -57,7 +57,6 @@ _clinkgrammar_la_SOURCES = $(built_c_sou
+ _clinkgrammar_la_CPPFLAGS = \
+ $(SWIG_PYTHON_CPPFLAGS) \
+ $(PYTHON2_CPPFLAGS) \
+- -I$(top_srcdir) \
+ -I$(top_builddir)
+
+ # On Cygwin and MinGW, a DLL with version is named name-major.EXT with no
+@@ -75,7 +74,7 @@ _clinkgrammar_la_LDFLAGS =
+ -avoid-version \
+ $(PYTHON2_LDFLAGS) -module -no-undefined $(PYMODULE_EXT)
+ _clinkgrammar_la_LIBADD = \
+- $(top_builddir)/link-grammar/liblink-grammar.la $(PYTHON2_LIBS)
++ -llink-grammar $(PYTHON2_LIBS)
+
+
+ EXTRA_DIST = \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-linkgrammar.git/commitdiff/149f8f5a990fa64337077525d672ae68b3b961f2
More information about the pld-cvs-commit
mailing list