[packages/libxseg] - new

qboosh qboosh at pld-linux.org
Sat Oct 24 11:55:15 CEST 2015


commit 3895c58a8a3ed6d8849e85b8dd68d158cfc2852d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 24 11:56:26 2015 +0200

    - new

 libxseg-archs.patch |  20 +++++++++
 libxseg.spec        | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+)
---
diff --git a/libxseg.spec b/libxseg.spec
new file mode 100644
index 0000000..978df1e
--- /dev/null
+++ b/libxseg.spec
@@ -0,0 +1,119 @@
+#
+# Conditional build:
+%bcond_without	doc		# Sphinx documentation
+#
+Summary:	The low-level communication library of Archipelago
+Summary(pl.UTF-8):	Niskopoziomowa biblioteka komunikacji dla Archipelago
+Name:		libxseg
+Version:	0.4.1
+Release:	1
+License:	GPL v3+
+Group:		Libraries
+Source0:	https://github.com/grnet/libxseg/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	75c4afa0ce0065ff594b48cdb7901baa
+Patch0:		%{name}-archs.patch
+URL:		https://github.com/grnet/libxseg
+BuildRequires:	cmake >= 2.8
+# h2xml, xml2py
+BuildRequires:	python-ctypeslib
+BuildRequires:	python-devel
+BuildRequires:	python-setuptools
+%if %{with doc}
+BuildRequires:	sphinx-pdg
+%endif
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Libxseg is a shared memory communication library. It is designed to
+provide fast inter-process communication between distinct processes.
+It is based on shared memory areas (segments) that each process (peer)
+can map on its own address space. It lays down endpoints (ports),
+messages (requests), and buffers over the shared segment. It also
+specifies an API to interact with the segment and pass messages
+between peers.
+
+Its primary use is to support Archipelago's modular architecture and
+provide low-latency message passing between different Archipelago
+peers.
+
+%description -l pl.UTF-8
+Libxseg to biblioteka komunikacji przez pamięć współdzieloną. Została
+zaprojektowana w celu szybkiej komunikacji międzyprocesowej między
+osobnymi procesami. Jest oparta na obszarach (segmentach) pamięci
+współdzielonej, które każdy proces (strona komunikacji) może
+odwzorować we własnej przestrzeni adresowej. Wewnątrz tych segmentów
+umieszcza zakończenia (porty), komunikaty (żądania) oraz bufory.
+Określa także API do współpracy z segmentami oraz przesyłaniem
+komunikatów między stronami.
+
+Głównym zastosowaniem jest wspardzie architektury modularnej
+Archipelago oraz zapewnienie szybkiego przekazywania komunikatów
+między różnymi stronami Archipelago.
+
+%package devel
+Summary:	Header files for xseg library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki xseg
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for xseg library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki xseg.
+
+%package doc
+Summary:	xseg documentation
+Summary(pl.UTF-8):	Dokumentacja biblioteki xseg
+Group:		Documentation
+
+%description doc
+Documentation for xseg library.
+
+%description doc -l pl.UTF-8
+Dokumentacja biblioteki xseg.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+install -d build
+cd build
+%cmake ..
+%{__make}
+cd ..
+
+%if %{with doc}
+%{__make} -C docs html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc COPYRIGHT Changelog README.md
+%attr(755,root,root) %{_bindir}/xseg
+%attr(755,root,root) %{_libdir}/libxseg.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libxseg.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libxseg.so
+%{_includedir}/xseg
+
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
diff --git a/libxseg-archs.patch b/libxseg-archs.patch
new file mode 100644
index 0000000..e8ebf16
--- /dev/null
+++ b/libxseg-archs.patch
@@ -0,0 +1,20 @@
+--- libxseg-0.4.1/src/include/xseg/xlock.h.orig	2015-07-17 17:47:32.000000000 +0200
++++ libxseg-0.4.1/src/include/xseg/xlock.h	2015-10-06 20:52:54.525395877 +0200
+@@ -129,16 +129,9 @@
+ 	}
+ }
+ 
+-/* x86_64 specific
+- * TODO: Move to an arch specific directory
+- */
+ static inline void * __get_pc()
+ {
+-	void * rip;
+-
+-	__asm__ volatile ("lea (%%rip, 1),  %0" : "=r"(rip));
+-
+-	return rip;
++	return __builtin_return_address(0);
+ }
+ 
+ __attribute__((always_inline)) static inline unsigned long xlock_acquire(struct xlock *lock)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libxseg.git/commitdiff/3895c58a8a3ed6d8849e85b8dd68d158cfc2852d



More information about the pld-cvs-commit mailing list