[packages/bcmatroska2] - updated to 5.2.1 - patched to fix static+shared library build and duplicate symbols in file helper
qboosh
qboosh at pld-linux.org
Sun Apr 9 20:38:50 CEST 2023
commit fcc0a6e93a682f098028ad11ad2018b438a8ce1c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Apr 9 20:41:23 2023 +0200
- updated to 5.2.1
- patched to fix static+shared library build and duplicate symbols in file helpers
bcmatroska2-link.patch | 20 ++++++++++++++++++++
bcmatroska2-static.patch | 27 +++++++++++++++++++++++++++
bcmatroska2.spec | 18 +++++++++++-------
3 files changed, 58 insertions(+), 7 deletions(-)
---
diff --git a/bcmatroska2.spec b/bcmatroska2.spec
index 12f0217..d6804e5 100644
--- a/bcmatroska2.spec
+++ b/bcmatroska2.spec
@@ -5,15 +5,17 @@
Summary: Matroska2 library for Belledonne Communications projects
Summary(pl.UTF-8): Biblioteka Matroska2 do projektów Belledonne Communications
Name: bcmatroska2
-Version: 0.23
-Release: 2
+Version: 5.2.1
+Release: 1
License: BSD
Group: Libraries
-# for future releases see https://gitlab.linphone.org/BC/public/bcmatroska2/-/tags
-Source0: https://linphone.org/releases/sources/bcmatroska2/%{name}-%{version}.tar.gz
-# Source0-md5: bc9d6dbdfb9790c10051294cc4293476
+#Source0Download: https://gitlab.linphone.org/BC/public/bcmatroska2/-/tags
+Source0: https://gitlab.linphone.org/BC/public/bcmatroska2/-/archive/%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5: dc8602f20ca33c6e3e6b08fd6b527abc
+Patch0: %{name}-static.patch
+Patch1: %{name}-link.patch
URL: https://linphone.org/
-BuildRequires: cmake >= 3.0
+BuildRequires: cmake >= 3.1
BuildRequires: rpmbuild(macros) >= 1.605
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -28,7 +30,7 @@ Summary: Header files for bcmatroska2 library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki bcmatroska2
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Obsoletes: matroska-foundation-devel
+Obsoletes: matroska-foundation-devel < 0.1
%description devel
Header files for bcmatroska2 library.
@@ -50,6 +52,8 @@ Statyczna biblioteka bcmatroska2.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%build
install -d build
diff --git a/bcmatroska2-link.patch b/bcmatroska2-link.patch
new file mode 100644
index 0000000..6b42f40
--- /dev/null
+++ b/bcmatroska2-link.patch
@@ -0,0 +1,20 @@
+--- bcmatroska2-5.2.1/corec/corec/CMakeLists.txt.orig 2022-11-29 11:25:07.000000000 +0100
++++ bcmatroska2-5.2.1/corec/corec/CMakeLists.txt 2023-04-09 20:33:31.565041475 +0200
+@@ -52,7 +52,6 @@ if(WIN32)
+ else()
+ list(APPEND COREC_SOURCES
+ helpers/date/date_libc.c
+- helpers/file/file_libc.c
+ helpers/file/file_bctbx.c
+ multithread/multithread_pthread.c
+ )
+--- bcmatroska2-5.2.1/libmatroska2/CMakeLists.txt.orig 2023-04-09 20:33:59.088225702 +0200
++++ bcmatroska2-5.2.1/libmatroska2/CMakeLists.txt 2023-04-09 20:39:07.949885788 +0200
+@@ -56,6 +56,7 @@ if(ENABLE_SHARED)
+ set_target_properties(bcmatroska2 PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
+ endif()
+ target_include_directories(bcmatroska2 PRIVATE ../libebml2 .)
++ target_link_libraries(bcmatroska2 bctoolbox)
+ if(LIBS)
+ target_link_libraries(bcmatroska2 ${LIBS})
+ endif()
diff --git a/bcmatroska2-static.patch b/bcmatroska2-static.patch
new file mode 100644
index 0000000..204a15c
--- /dev/null
+++ b/bcmatroska2-static.patch
@@ -0,0 +1,27 @@
+--- bcmatroska2-5.2.1/libmatroska2/CMakeLists.txt.orig 2022-11-29 11:25:07.000000000 +0100
++++ bcmatroska2-5.2.1/libmatroska2/CMakeLists.txt 2023-04-09 20:19:33.979579064 +0200
+@@ -33,17 +33,17 @@ endif()
+
+ string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
+ if(ENABLE_STATIC)
+- add_library(bcmatroska2 STATIC $<TARGET_OBJECTS:corec-objects> $<TARGET_OBJECTS:ebml2-objects> ${MATROSKA2_SOURCE_FILES})
+- set_target_properties(bcmatroska2 PROPERTIES OUTPUT_NAME bcmatroska2)
+- set_target_properties(bcmatroska2 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
++ add_library(bcmatroska2-static STATIC $<TARGET_OBJECTS:corec-objects> $<TARGET_OBJECTS:ebml2-objects> ${MATROSKA2_SOURCE_FILES})
++ set_target_properties(bcmatroska2-static PROPERTIES OUTPUT_NAME bcmatroska2)
++ set_target_properties(bcmatroska2-static PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+ if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
+- set_target_properties(bcmatroska2 PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
++ set_target_properties(bcmatroska2-static PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
+ endif()
+- target_include_directories(bcmatroska2 PRIVATE ../libebml2 .)
++ target_include_directories(bcmatroska2-static PRIVATE ../libebml2 .)
+ if(LIBS)
+- target_link_libraries(bcmatroska2 ${LIBS})
++ target_link_libraries(bcmatroska2-static ${LIBS})
+ endif()
+- install(TARGETS bcmatroska2 EXPORT BcMatroska2Targets
++ install(TARGETS bcmatroska2-static EXPORT BcMatroska2Targets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ )
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bcmatroska2.git/commitdiff/fcc0a6e93a682f098028ad11ad2018b438a8ce1c
More information about the pld-cvs-commit
mailing list