[packages/bcunit] - updated to 5.3.26

qboosh qboosh at pld-linux.org
Tue Mar 5 18:58:54 CET 2024


commit 37becee225129efd493f3a4ab6fbd9b6a51087e3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Mar 5 18:36:27 2024 +0100

    - updated to 5.3.26

 bcunit-examples.patch |  6 +++---
 bcunit-ncurses.patch  | 46 ++++++++++++++++++++++++++++++++++++++++++++
 bcunit.spec           | 53 +++++++++++++++++++++++++++++++--------------------
 lib.patch             | 26 ++++++++++++++++---------
 4 files changed, 98 insertions(+), 33 deletions(-)
---
diff --git a/bcunit.spec b/bcunit.spec
index ccfb169..bb590af 100644
--- a/bcunit.spec
+++ b/bcunit.spec
@@ -5,18 +5,19 @@
 Summary:	Provide C programmers basic testing functionality
 Summary(pl.UTF-8):	Podstawowa funkcjonalność testów dla programistów C
 Name:		bcunit
-Version:	5.2.0
+Version:	5.3.26
 Release:	1
 License:	LGPL v2+
 Group:		Libraries
 #Source0Download: https://gitlab.linphone.org/BC/public/bcunit/tags
 Source0:	https://gitlab.linphone.org/BC/public/bcunit/-/archive/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5:	8c734804901d3d1caefc2e0827646d29
+# Source0-md5:	9d428059bc8b636d0ca41e1b443b2117
 Patch0:		lib.patch
 Patch1:		%{name}-examples.patch
 Patch2:		%{name}-format.patch
+Patch3:		%{name}-ncurses.patch
 URL:		https://linphone.org/
-BuildRequires:	cmake >= 3.1
+BuildRequires:	cmake >= 3.22
 BuildRequires:	ncurses-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -63,33 +64,44 @@ Statyczna biblioteka BCUnit.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 # sources contain "build" directory, so use alternative builddir
-install -d builddir
-cd builddir
-%cmake .. \
-	-DENABLE_AUTOMATED=ON \
-	-DENABLE_BASIC=ON \
-	-DENABLE_CONSOLE=ON \
-	-DENABLE_CURSES=ON \
-	-DENABLE_DOC=ON \
-	-DENABLE_EXAMPLES=ON \
-	%{!?with_static_libs:-DENABLE_STATIC=OFF}
-
-%{__make}
+%if %{with static_libs}
+%cmake -B builddir-static \
+	-DBUILD_SHARED_LIBS=OFF \
+	-DENABLE_BCUNIT_AUTOMATED=ON \
+	-DENABLE_BCUNIT_BASIC=ON \
+	-DENABLE_BCUNIT_CONSOLE=ON \
+	-DENABLE_BCUNIT_CURSES=ON
+
+%{__make} -C builddir-static
+%endif
+
+%cmake -B builddir \
+	-DENABLE_BCUNIT_AUTOMATED=ON \
+	-DENABLE_BCUNIT_BASIC=ON \
+	-DENABLE_BCUNIT_CONSOLE=ON \
+	-DENABLE_BCUNIT_CURSES=ON \
+	-DENABLE_BCUNIT_DOC=ON \
+	-DENABLE_BCUNIT_EXAMPLES=ON
+
+%{__make} -C builddir
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} -C builddir install \
+%if %{with static_libs}
+%{__make} -C builddir-static install \
 	DESTDIR=$RPM_BUILD_ROOT
+%endif
 
-# disable completeness check incompatible with split packaging
-%{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/BCunit/cmake/BcUnitTargets.cmake
+%{__make} -C builddir install \
+	DESTDIR=$RPM_BUILD_ROOT
 
 # packaged in includedir / as %doc
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/BCUnit
+#{__rm} -r $RPM_BUILD_ROOT%{_docdir}/BCUnit
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}
 %{__mv} $RPM_BUILD_ROOT%{_datadir}/BCUnit/Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
@@ -117,8 +129,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libbcunit.so
 %{_includedir}/BCUnit
 %{_pkgconfigdir}/bcunit.pc
-%dir %{_datadir}/BCunit
-%{_datadir}/BCunit/cmake
+%{_datadir}/BCUnit/cmake
 %{_examplesdir}/%{name}-%{version}
 %{_mandir}/man3/BCUnit.3*
 
diff --git a/bcunit-examples.patch b/bcunit-examples.patch
index c961aad..7016d5d 100644
--- a/bcunit-examples.patch
+++ b/bcunit-examples.patch
@@ -1,5 +1,5 @@
---- bcunit-74021cc7cb20a4e177748dd2948173e1f9c270ae/Examples/CMakeLists.txt.orig	2020-08-21 12:47:22.000000000 +0200
-+++ bcunit-74021cc7cb20a4e177748dd2948173e1f9c270ae/Examples/CMakeLists.txt	2020-09-25 20:59:41.522353756 +0200
+--- bcunit-5.3.26/Examples/CMakeLists.txt.orig	2024-03-04 21:56:31.251883864 +0100
++++ bcunit-5.3.26/Examples/CMakeLists.txt	2024-03-04 21:57:01.881717928 +0100
 @@ -22,7 +22,7 @@
  
  add_library(bcunitexamples STATIC ExampleTests.c)
@@ -7,5 +7,5 @@
 -include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/BCUnit/Headers ${CMAKE_SOURCE_DIR}/BCUnit/Headers)
  
- if(ENABLE_BASIC)
+ if(ENABLE_BCUNIT_BASIC)
  	add_subdirectory(BasicTest)
diff --git a/bcunit-ncurses.patch b/bcunit-ncurses.patch
new file mode 100644
index 0000000..97b7ba7
--- /dev/null
+++ b/bcunit-ncurses.patch
@@ -0,0 +1,46 @@
+WINDOW is now opaque struct.
+--- bcunit-5.3.26/BCUnit/Sources/Curses/Curses.c.orig	2024-03-04 22:27:22.825186363 +0100
++++ bcunit-5.3.26/BCUnit/Sources/Curses/Curses.c	2024-03-05 05:46:07.829238241 +0100
+@@ -256,10 +256,8 @@ static bool initialize_windows(void)
+ 
+   start_color();
+ 
+-  f_nLeft = application_windows.pMainWin->_begx;
+-  f_nTop = application_windows.pMainWin->_begy;
+-  f_nWidth = application_windows.pMainWin->_maxx;
+-  f_nHeight = application_windows.pMainWin->_maxy;
++  getbegyx(application_windows.pMainWin, f_nTop, f_nLeft);
++  getmaxyx(application_windows.pMainWin, f_nHeight, f_nWidth);
+ 
+   if (NULL == (application_windows.pTitleWin = newwin(3, f_nWidth, 0, 0))) {
+     goto title_fail;
+@@ -358,10 +356,8 @@ static void refresh_windows(void)
+ {
+   refresh();
+ 
+-  f_nLeft = application_windows.pMainWin->_begx;
+-  f_nTop = application_windows.pMainWin->_begy;
+-  f_nWidth = application_windows.pMainWin->_maxx;
+-  f_nHeight = application_windows.pMainWin->_maxy;
++  getbegyx(application_windows.pMainWin, f_nTop, f_nLeft);
++  getmaxyx(application_windows.pMainWin, f_nHeight, f_nWidth);
+ 
+   refresh_title_window();
+   refresh_progress_window();
+@@ -907,10 +903,12 @@ static bool create_pad(APPPAD* pPad, WIN
+   pPad->uiColumns = uiCols;
+   pPad->uiPadRow = 0;
+   pPad->uiPadCol = 0;
+-  pPad->uiWinLeft = application_windows.pDetailsWin->_begx + 1;
+-  pPad->uiWinTop = application_windows.pDetailsWin->_begy + 1;
+-  pPad->uiWinColumns = application_windows.pDetailsWin->_maxx - 2;
+-  pPad->uiWinRows = application_windows.pDetailsWin->_maxy - 2;
++  getbegyx(application_windows.pDetailsWin, pPad->uiWinTop, pPad->uiWinLeft);
++  getmaxyx(application_windows.pDetailsWin, pPad->uiWinRows, pPad->uiWinColumns);
++  pPad->uiWinLeft += 1;
++  pPad->uiWinTop += 1;
++  pPad->uiWinColumns -= 2;
++  pPad->uiWinRows -=2;
+ 
+   bStatus = true;
+ 
diff --git a/lib.patch b/lib.patch
index 7466d7a..cfa3ffd 100644
--- a/lib.patch
+++ b/lib.patch
@@ -1,10 +1,18 @@
---- BCunit-5.2.0/BCUnit/Sources/CMakeLists.txt~	2017-07-20 16:06:38.000000000 +0200
-+++ BCunit-5.2.0/BCUnit/Sources/CMakeLists.txt	2018-09-26 11:47:06.695729380 +0200
-@@ -176,6 +176,7 @@ if(ENABLE_STATIC)
+--- bcunit-5.3.26/BCUnit/Sources/CMakeLists.txt.orig	2024-03-04 21:49:07.017623821 +0100
++++ bcunit-5.3.26/BCUnit/Sources/CMakeLists.txt	2024-03-04 21:56:12.778650608 +0100
+@@ -161,13 +161,14 @@ target_include_directories(bcunit PUBLIC
+ 	$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/BCUnit/Headers>
+ 	$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/BCUnit/Headers>
+ )
++set_target_properties(bcunit PROPERTIES SOVERSION 1)
+ set_target_properties(bcunit PROPERTIES VERSION 1.0.1)
+ 
+ if(ANDROID)
+ 	target_link_libraries(bcunit PUBLIC "log")
  endif()
- if(ENABLE_SHARED)
- 	add_library(bcunit SHARED ${SOURCE_FILES})
-+	set_target_properties(bcunit PROPERTIES SOVERSION 1)
- 	set_target_properties(bcunit PROPERTIES VERSION 1.0.1)
- 	target_compile_definitions(bcunit INTERFACE "$<BUILD_INTERFACE:IN_BCUNIT_SOURCES>")
- 	target_include_directories(bcunit PUBLIC
+ if(CURSES_LIBRARIES)
+-	target_link_libraries(bcunit INTERFACE ${CURSES_LIBRARIES})
++	target_link_libraries(bcunit PRIVATE ${CURSES_LIBRARIES})
+ endif()
+ target_compile_definitions(bcunit INTERFACE "$<BUILD_INTERFACE:BCUNIT_USE_BUILD_INTERFACE>")
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bcunit.git/commitdiff/37becee225129efd493f3a4ab6fbd9b6a51087e3



More information about the pld-cvs-commit mailing list