commit 82f2631556dd180ab15394a249fa6be362bf7870
Author: Jakub Bogusz <[email protected]>
Date:   Sat Mar 11 21:28:22 2023 +0100

    - new; patched to build shared library

 libtta-cpp-shared.patch |  44 ++++++++++++++++++++
 libtta-cpp.spec         | 104 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 148 insertions(+)
---
diff --git a/libtta-cpp.spec b/libtta-cpp.spec
new file mode 100644
index 0000000..b5d52fd
--- /dev/null
+++ b/libtta-cpp.spec
@@ -0,0 +1,104 @@
+#
+# Conditional build:
+%bcond_without static_libs     # static library
+#
+Summary:       The lossless True Audio codec C++ library
+Summary(pl.UTF-8):     Biblioteka C++ kodeka The lossless True Audio
+Name:          libtta-cpp
+Version:       2.3
+Release:       1
+License:       LGPL v3
+Group:         Libraries
+Source0:       https://downloads.sourceforge.net/tta/%{name}-%{version}.tar.gz
+# Source0-md5: c0b934e854fef32dc8578241e7b233b3
+Patch0:                %{name}-shared.patch
+URL:           https://sourceforge.net/projects/tta/
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:1.5
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This package contains a full-futured codec library for realtime
+encoding and decoding of True Audio (TTA) files.
+
+%description -l pl.UTF-8
+Ten pakiet zawiera w pełni funkcjonalną bibliotekę kodeka do
+kodowania i dekodowania plików True Audio (TTA) w czasie rzeczywistym.
+
+%package devel
+Summary:       Header files for TTA C++ library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki C++ TTA
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      libstdc++-devel
+
+%description devel
+Header files for TTA C++ library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki C++ TTA.
+
+%package static
+Summary:       Static TTA C++ library
+Summary(pl.UTF-8):     Statyczna biblioteka C++ TTA
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static TTA C++ library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka C++ TTA.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       %{!?with_static_libs:--disable-static}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -Dp libtta.h $RPM_BUILD_ROOT%{_includedir}/libtta.hpp
+
+# the same functionality already in libtta-c
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/tta
+
+# no external dependencies
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libtta++.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README
+%attr(755,root,root) %{_libdir}/libtta++.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtta++.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libtta++.so
+%{_includedir}/libtta.hpp
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libtta++.a
+%endif
diff --git a/libtta-cpp-shared.patch b/libtta-cpp-shared.patch
new file mode 100644
index 0000000..9473e3b
--- /dev/null
+++ b/libtta-cpp-shared.patch
@@ -0,0 +1,44 @@
+--- libtta-cpp-2.3/configure.ac.orig   2015-02-20 07:29:04.000000000 +0100
++++ libtta-cpp-2.3/configure.ac        2023-03-11 21:12:10.226979681 +0100
+@@ -6,10 +6,10 @@
+ AM_INIT_AUTOMAKE
+ 
+ # Initialize ranlib
+-AC_PROG_RANLIB
++AC_PROG_LIBTOOL
+ 
+ # Common compiler flags
+-CXXFLAGS="-Wall -O2 -funroll-loops -fomit-frame-pointer"
++CXXFLAGS="$CXXFLAGS -Wall"
+ 
+ # Determine CPU
+ AM_CONDITIONAL(CPU_X86, false)
+--- libtta-cpp-2.3/Makefile.am.orig    2015-02-20 07:26:08.000000000 +0100
++++ libtta-cpp-2.3/Makefile.am 2023-03-11 21:12:45.570121544 +0100
+@@ -1,13 +1,13 @@
+ AUTOMAKE_OPTIONS = no-dependencies foreign
+ 
+-lib_LIBRARIES = libtta++.a
++lib_LTLIBRARIES = libtta++.la
+ 
+-libtta___a_SOURCES = libtta.cpp libtta.h filter.h
++libtta___la_SOURCES = libtta.cpp libtta.h filter.h
+ 
+ if ENABLE_ASM
+ if CPU_ARM
+ EXTRA_libtta___a_SOURCES = filter_arm.S
+-libtta___a_LIBADD = filter_arm.o
++libtta___la_LIBADD = filter_arm.o
+ endif
+ endif
+ 
+--- libtta-cpp-2.3/console/Makefile.am.orig    2015-02-20 07:25:39.000000000 
+0100
++++ libtta-cpp-2.3/console/Makefile.am 2023-03-11 21:13:01.623367910 +0100
+@@ -4,6 +4,6 @@
+ 
+ tta_SOURCES = tta.cpp tta.h
+ 
+-tta_LDADD = $(top_builddir)/libtta++.a
++tta_LDADD = $(top_builddir)/libtta++.la
+ 
+ EXTRA_DIST = Makefile.mipsel console.sln console.vcxproj*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libtta-cpp.git/commitdiff/82f2631556dd180ab15394a249fa6be362bf7870

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to