[packages/btparse] - new
qboosh
qboosh at pld-linux.org
Sat May 25 06:51:03 CEST 2019
commit 5a243072ae21a6ac0061eb4db010ea72471426f9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 25 06:51:43 2019 +0200
- new
btparse-format.patch | 64 ++++++++++++++++++++++++++++++++
btparse.spec | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 165 insertions(+)
---
diff --git a/btparse.spec b/btparse.spec
new file mode 100644
index 0000000..747fb3e
--- /dev/null
+++ b/btparse.spec
@@ -0,0 +1,101 @@
+#
+# Conditional build:
+%bcond_without static_libs # don't build static libraries
+#
+Summary: C library to parse BibTeX files
+Summary(pl.UTF-8): Biblioteka C do analizy plików BibTeXa
+Name: btparse
+Version: 0.34
+Release: 1
+License: LGPL v2+
+Group: Libraries
+Source0: http://www.gerg.ca/software/btOOL/%{name}-%{version}.tar.gz
+# Source0-md5: 87d09ce6331c57cc2da30b5c83f545e0
+Patch0: %{name}-format.patch
+URL: http://www.gerg.ca/software/btOOL/
+BuildRequires: perl-tools-pod
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+btparse is the C component of btOOL, a pair of libraries for parsing
+and processing BibTeX files. Its primary use is as the back-end to
+Text::BibTeX library for Perl (the other half of btOOL), but there's
+nothing to prevent you from writing C programs using btparse - or from
+writing extensions to other high-level languages using btparse as a
+back-end.
+
+%description -l pl.UTF-8
+btparse to część C narzędzia btOOL - pary bibliotek do analizy i
+przetwarzania plików BibTeX. Głównym zastosowaniem jest backend dla
+biblioteki Text::BibTeX dla Perla (drugiej połówki narzędzia btOOL),
+ale nic nie stoi na przeszkodzie pisaniu programów w C
+wykorzystujących btparse albo rozszerzeń dla innych wysokopoziomowych
+języków z wykorzystaniem btparse jako backendu.
+
+%package devel
+Summary: Header files for btparse library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki btparse
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for btparse library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki btparse.
+
+%package static
+Summary: Static btparse library
+Summary(pl.UTF-8): Statyczna biblioteka btparse
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static btparse library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka btparse.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%configure \
+ %{!?with_static_libs:--disable-static}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# no external dependencies
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbtparse.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README TODO
+%attr(755,root,root) %{_bindir}/bibparse
+%attr(755,root,root) %{_libdir}/libbtparse.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbtparse.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libbtparse.so
+%{_includedir}/btparse.h
+%{_mandir}/man3/bt_*.3*
+%{_mandir}/man3/btparse.3*
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libbtparse.a
+%endif
diff --git a/btparse-format.patch b/btparse-format.patch
new file mode 100644
index 0000000..f44113b
--- /dev/null
+++ b/btparse-format.patch
@@ -0,0 +1,64 @@
+--- btparse-0.34/src/error.c.orig 1999-11-29 02:13:10.000000000 +0100
++++ btparse-0.34/src/error.c 2019-05-24 22:15:12.326349111 +0200
+@@ -88,7 +88,7 @@
+
+ if (err->filename)
+ {
+- fprintf (stderr, err->filename);
++ fputs (err->filename, stderr);
+ something_printed = TRUE;
+ }
+ if (err->line > 0) /* going to print a line number? */
+@@ -111,7 +111,7 @@
+ {
+ if (something_printed)
+ fprintf (stderr, ", ");
+- fprintf (stderr, name);
++ fputs (name, stderr);
+ something_printed = TRUE;
+ }
+
+--- btparse-0.34/src/bibtex_ast.c.orig 1999-11-29 02:13:10.000000000 +0100
++++ btparse-0.34/src/bibtex_ast.c 2019-05-24 22:16:12.902687608 +0200
+@@ -57,7 +57,7 @@
+ void dump_ast (char *msg, AST *root)
+ {
+ if (msg != NULL)
+- printf (msg);
++ fputs (msg, stdout);
+ dump (root, 0);
+ printf ("\n");
+ }
+--- btparse-0.34/progs/bibparse.c.orig 1998-03-14 17:39:16.000000000 +0100
++++ btparse-0.34/progs/bibparse.c 2019-05-24 22:17:33.802249337 +0200
+@@ -299,8 +299,8 @@
+ }
+ else
+ {
+- fprintf (stderr, Usage);
+- fprintf (stderr, Help);
++ fputs (Usage, stderr);
++ fputs (Help, stderr);
+ fprintf (stderr, "Not enough arguments\n");
+ exit (1);
+ }
+--- btparse-0.34/progs/dumpnames.c.orig 1999-11-29 03:14:14.000000000 +0100
++++ btparse-0.34/progs/dumpnames.c 2019-05-24 22:18:34.741919199 +0200
+@@ -15,6 +15,8 @@
+ -------------------------------------------------------------------------- */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include "btparse.h"
+
+ char *Usage = "usage: dumpnames file\n";
+@@ -139,7 +141,7 @@
+
+ if (argc != 2)
+ {
+- fprintf (stderr, Usage);
++ fputs (Usage, stderr);
+ fprintf (stderr, "Wrong number of arguments\n");
+ exit (1);
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/btparse.git/commitdiff/5a243072ae21a6ac0061eb4db010ea72471426f9
More information about the pld-cvs-commit
mailing list