[packages/link-grammar] - updated to 5.6.0 (new soname, LGPL licensed; BSD-licensed 4.x left on link-grammar-4 branch) - rem

qboosh qboosh at pld-linux.org
Tue Apr 30 22:14:04 CEST 2019


commit 46e7b9ff0bc3449028cfaa7b26b498d8833030b8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Apr 30 22:14:26 2019 +0200

    - updated to 5.6.0 (new soname, LGPL licensed; BSD-licensed 4.x left on link-grammar-4 branch)
    - removed obsolete format-security patch
    - added modules patch (use -avoid-version for perl/python modules)
    - package java/perl/python2/python3 bindings

 format-security.patch      |  11 ---
 link-grammar-modules.patch |  33 +++++++++
 link-grammar.spec          | 163 +++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 184 insertions(+), 23 deletions(-)
---
diff --git a/link-grammar.spec b/link-grammar.spec
index 835e279..07881a9 100644
--- a/link-grammar.spec
+++ b/link-grammar.spec
@@ -1,15 +1,40 @@
+#
+# Conditional build:
+%bcond_without	java	# Java bindings
+%bcond_without	perl	# Perl bindings
+%bcond_without	python	# Python bindings
+
 Summary:	Link Grammar - a syntactic parser of English
 Summary(pl.UTF-8):	Link Grammar - składniowy analizator języka angielskiego
 Name:		link-grammar
-Version:	4.2.2
-Release:	4
-License:	BSD
+Version:	5.6.0
+Release:	1
+License:	LGPL v2.1
 Group:		Libraries
 Source0:	http://www.abisource.com/downloads/link-grammar/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	798c165b7d7f26e60925c30515c45782
-Patch0:		format-security.patch
+# Source0-md5:	513e0d0de4ab4e95bb0052afbc4217dc
+Patch0:		%{name}-modules.patch
 URL:		http://www.link.cs.cmu.edu/link/
+BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
+BuildRequires:	gcc >= 6:4.7
+%{?with_java:BuildRequires:	jdk}
+BuildRequires:	hunspell-devel
+BuildRequires:	libedit-devel
+BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	libtool >= 2:2
+BuildRequires:	pcre2-8-devel
+%{?with_perl:BuildRequires:	perl-devel}
+BuildRequires:	pkgconfig
+%{?with_perl:BuildRequires:	swig-perl >= 2.0.0}
+%if %{with python}
+BuildRequires:	swig-python >= 2.0.0
+BuildRequires:	python-devel >= 1:2.6
+BuildRequires:	python3-devel >= 1:3.4
+%endif
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	sqlite3-devel >= 3.0.0
+BuildRequires:	zlib-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -52,22 +77,102 @@ Static link-grammar library.
 %description static -l pl.UTF-8
 Statyczna biblioteka link-grammar.
 
+%package -n java-link-grammar
+Summary:	Java binding for link-grammar library
+Summary(pl.UTF-8):	Wiązanie Javy do biblioteki link-grammar
+Group:		Libraries/Java
+Requires:	%{name} = %{version}-%{release}
+
+%description -n java-link-grammar
+Java binding for link-grammar library.
+
+%description -n java-link-grammar -l pl.UTF-8
+Wiązanie Javy do biblioteki link-grammar.
+
+%package -n perl-linkgrammar
+Summary:	Perl binding for link-grammar library
+Summary(pl.UTF-8):	Wiązanie Perla do biblioteki link-grammar
+Group:		Development/Languages/Perl
+Requires:	%{name} = %{version}-%{release}
+
+%description -n perl-linkgrammar
+Perl binding for link-grammar library.
+
+%description -n perl-linkgrammar -l pl.UTF-8
+Wiązanie Perla do biblioteki link-grammar.
+
+%package -n python-linkgrammar
+Summary:	Python 2 binding for link-grammar library
+Summary(pl.UTF-8):	Wiązanie Pythona 2 do biblioteki link-grammar
+Group:		Libraries/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	python-libs >= 1:2.6
+
+%description -n python-linkgrammar
+Python 2 binding for link-grammar library.
+
+%description -n python-linkgrammar -l pl.UTF-8
+Wiązanie Pythona 2 do biblioteki link-grammar.
+
+%package -n python3-linkgrammar
+Summary:	Python 3 binding for link-grammar library
+Summary(pl.UTF-8):	Wiązanie Pythona 3 do biblioteki link-grammar
+Group:		Libraries/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	python3-libs >= 1:3.4
+
+%description -n python3-linkgrammar
+Python 3 binding for link-grammar library.
+
+%description -n python3-linkgrammar -l pl.UTF-8
+Wiązanie Pythona 3 do biblioteki link-grammar.
+
 %prep
 %setup -q
 %patch0 -p1
 
 %build
-cp -f /usr/share/automake/config.* .
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__automake}
 %configure \
-	--disable-binreloc
+	--disable-binreloc \
+	%{!?with_java:--disable-java-bindings} \
+	%{?with_perl:--enable-perl-bindings} \
+	%{!?with_python:--disable-python-bindings} \
+	--disable-silent-rules
 
-%{__make} -j1
+%{__make} -j1 \
+	pkgperldir=%{perl_vendorarch} \
+	python2dir=%{py_sitedir} \
+	python3dir=%{py3_sitedir}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+	pkgperldir=%{perl_vendorarch} \
+	python2dir=%{py_sitedir} \
+	python3dir=%{py3_sitedir}
+
+%if %{with java}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblink-grammar-java.la \
+	$RPM_BUILD_ROOT%{_libdir}/liblink-grammar-java.a
+%endif
+%if %{with perl}
+%{__rm}	$RPM_BUILD_ROOT%{perl_vendorarch}/clinkgrammar.la \
+	$RPM_BUILD_ROOT%{perl_vendorarch}/clinkgrammar.a
+%endif
+%if %{with python}
+%{__rm}	$RPM_BUILD_ROOT%{py_sitedir}/linkgrammar/_clinkgrammar.la \
+	$RPM_BUILD_ROOT%{py_sitedir}/linkgrammar/_clinkgrammar.a
+%{__rm}	$RPM_BUILD_ROOT%{py3_sitedir}/linkgrammar/_clinkgrammar.la \
+	$RPM_BUILD_ROOT%{py3_sitedir}/linkgrammar/_clinkgrammar.a
+
+%py_postclean
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -77,11 +182,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc LICENSE README
-%attr(755,root,root) %{_bindir}/grammar-parse
+%doc AUTHORS ChangeLog LICENSE MAINTAINERS NEWS README.md TODO
+%attr(755,root,root) %{_bindir}/link-parser
 %attr(755,root,root) %{_libdir}/liblink-grammar.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/liblink-grammar.so.4
+%attr(755,root,root) %ghost %{_libdir}/liblink-grammar.so.5
 %{_datadir}/link-grammar
+%{_mandir}/man1/link-parser.1*
 
 %files devel
 %defattr(644,root,root,755)
@@ -93,3 +199,36 @@ rm -rf $RPM_BUILD_ROOT
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/liblink-grammar.a
+
+%if %{with java}
+%files -n java-link-grammar
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblink-grammar-java.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblink-grammar-java.so.5
+%attr(755,root,root) %{_libdir}/liblink-grammar-java.so
+%{_javadir}/linkgrammar-%{version}.jar
+%{_javadir}/linkgrammar.jar
+%endif
+
+%if %{with perl}
+%files -n perl-linkgrammar
+%defattr(644,root,root,755)
+%attr(755,root,root) %{perl_vendorarch}/clinkgrammar.so
+%{perl_vendorarch}/clinkgrammar.pm
+%endif
+
+%if %{with python}
+%files -n python-linkgrammar
+%defattr(644,root,root,755)
+%dir %{py_sitedir}/linkgrammar
+%attr(755,root,root) %{py_sitedir}/linkgrammar/_clinkgrammar.so
+%{py_sitedir}/linkgrammar/*.py[co]
+
+%files -n python3-linkgrammar
+%defattr(644,root,root,755)
+%{py3_sitedir}/linkgrammar.pth
+%dir %{py3_sitedir}/linkgrammar
+%attr(755,root,root) %{py3_sitedir}/linkgrammar/_clinkgrammar.so
+%{py3_sitedir}/linkgrammar/*.py
+%{py3_sitedir}/linkgrammar/__pycache__
+%endif
diff --git a/format-security.patch b/format-security.patch
deleted file mode 100644
index bc4aaf7..0000000
--- a/format-security.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- link-grammar-4.2.2/link-grammar/error.c.orig	2014-01-14 21:10:38.308618374 +0100
-+++ link-grammar-4.2.2/link-grammar/error.c	2014-01-14 21:11:13.655831668 +0100
-@@ -69,7 +69,7 @@ void error(char *fmt, ...) {
-     if (errno > 0) {
- 	perror(buf);
- 	fprintf(stderr, "errno=%d\n", errno);
--	fprintf(stderr, buf);
-+	fputs(buf, stderr);
- 	fprintf(stderr, "\n");
-     }
-     fflush(stdout);
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)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/link-grammar.git/commitdiff/46e7b9ff0bc3449028cfaa7b26b498d8833030b8



More information about the pld-cvs-commit mailing list