Sync from SUSE:SLFO:Main cunit revision 6e3648594a4f3e026d31ec5c11de2387

This commit is contained in:
Adrian Schröter 2024-05-03 11:56:51 +02:00
commit 3d7e665c52
6 changed files with 324 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
CUnit-2.1-3.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

48
cunit-link-ncurses.diff Normal file
View File

@ -0,0 +1,48 @@
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2012-02-09 03:48:24.650731239 +0100
cunit uses ncurses, therefore, link with ncurses. Otherwise building
this can fail if e.g. -Wl,--no-undefined is used.
And for -lncurses to trickle down into libcunit.la, libcunit.la must
use the .la files as objects, not the .lo files.
---
CUnit/Sources/Curses/Makefile.am | 1 +
CUnit/Sources/Makefile.am | 15 +++++----------
2 files changed, 6 insertions(+), 10 deletions(-)
Index: cunit/CUnit/Sources/Curses/Makefile.am
===================================================================
--- cunit.orig/CUnit/Sources/Curses/Makefile.am
+++ cunit/CUnit/Sources/Curses/Makefile.am
@@ -3,3 +3,4 @@
noinst_LTLIBRARIES = libcunitcurses.la
libcunitcurses_la_SOURCES = \
Curses.c
+libcunitcurses_la_LIBADD = -lncurses
Index: cunit/CUnit/Sources/Makefile.am
===================================================================
--- cunit.orig/CUnit/Sources/Makefile.am
+++ cunit/CUnit/Sources/Makefile.am
@@ -1,15 +1,10 @@
## Process this file with automake to produce Makefile.in
-BASIC_OBJECTS_SHARED = Basic/Basic.lo
-AUTOMATED_OBJECTS_SHARED = Automated/Automated.lo
-CONSOLE_OBJECTS_SHARED = Console/Console.lo
-CURSES_OBJECTS_SHARED = Curses/Curses.lo
-FRAMEWORK_OBJECTS_SHARED = \
- Framework/CUError.lo \
- Framework/MyMem.lo \
- Framework/TestDB.lo \
- Framework/TestRun.lo \
- Framework/Util.lo
+BASIC_OBJECTS_SHARED = Basic/libcunitbasic.la
+AUTOMATED_OBJECTS_SHARED = Automated/libcunitautomated.la
+CONSOLE_OBJECTS_SHARED = Console/libcunitconsole.la
+CURSES_OBJECTS_SHARED = Curses/libcunitcurses.la
+FRAMEWORK_OBJECTS_SHARED = Framework/libcunitfmk.la
FRAMEWORK_OBJECT_FILES_SHARED = $(FRAMEWORK_OBJECTS_SHARED)
FRAMEWORK_COMPILE_DIRS = Framework

49
cunit-ncurses6.patch Normal file
View File

@ -0,0 +1,49 @@
Index: CUnit-2.1-3/CUnit/Sources/Curses/Curses.c
===================================================================
--- CUnit-2.1-3.orig/CUnit/Sources/Curses/Curses.c
+++ CUnit-2.1-3/CUnit/Sources/Curses/Curses.c
@@ -256,10 +256,10 @@ 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;
+ f_nLeft = getbegx(application_windows.pMainWin);
+ f_nTop = getbegy(application_windows.pMainWin);
+ f_nWidth = getmaxx(application_windows.pMainWin);
+ f_nHeight = getmaxy(application_windows.pMainWin);
if (NULL == (application_windows.pTitleWin = newwin(3, f_nWidth, 0, 0))) {
goto title_fail;
@@ -358,10 +358,10 @@ 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;
+ f_nLeft = getbegx(application_windows.pMainWin);
+ f_nTop = getbegy(application_windows.pMainWin);
+ f_nWidth = getmaxx(application_windows.pMainWin);
+ f_nHeight = getmaxy(application_windows.pMainWin);
refresh_title_window();
refresh_progress_window();
@@ -907,10 +907,10 @@ 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;
+ pPad->uiWinLeft = getbegx(application_windows.pDetailsWin) + 1;
+ pPad->uiWinTop = getbegy(application_windows.pDetailsWin) + 1;
+ pPad->uiWinColumns = getmaxx(application_windows.pDetailsWin) - 2;
+ pPad->uiWinRows = getmaxy(application_windows.pDetailsWin) - 2;
bStatus = true;

67
cunit.changes Normal file
View File

@ -0,0 +1,67 @@
-------------------------------------------------------------------
Thu Oct 22 10:37:14 UTC 2015 - idonmez@suse.com
- Add cunit-ncurses6.patch to compile with ncurses6
-------------------------------------------------------------------
Tue May 26 16:00:55 UTC 2015 - ddiss@suse.com
- Don't tag Recommends on RHEL, it yields an "Unknown tag" error.
-------------------------------------------------------------------
Tue Aug 12 07:39:23 UTC 2014 - tchvatal@suse.com
- Use proper group for the library.
-------------------------------------------------------------------
Mon Aug 4 08:13:01 UTC 2014 - tchvatal@suse.com
- The license is actually LGPL
-------------------------------------------------------------------
Mon Aug 4 08:03:42 UTC 2014 - tchvatal@suse.com
- Update to release 2.1.3:
* prune the static-devel subpackage as it is pointless.
* Various upstream fixes with no changelog.
- Cleanup with spec-cleaner to have the spec pretty
-------------------------------------------------------------------
Thu Feb 9 02:39:58 UTC 2012 - jengelh@medozas.de
- Update to new upstream release 2.1.2
* modified dtd and xsl files to support inactive suites/tests
* Added ability to deactivate suite/tests dynamically
* Removed constraint that suite/test names be unique
- Remove redundant tags/sections
- Parallel build with %_smp_mflags
- Add autotools BuildRequires for factory/12.2
- Fix use of implicitly defined function in source
(do not declare that post-build-checks's output was wrong)
- Add missing DT_NEEDED entry on ncurses
-------------------------------------------------------------------
Tue Jun 8 18:12:46 UTC 2010 - andrea@opensuse.org
- fixed 'no-pkg-config-provides'
-------------------------------------------------------------------
Wed Apr 21 08:30:40 UTC 2010 - prusnak@suse.cz
- cleaned up spec, split devel-static subpackage
-------------------------------------------------------------------
Sat Mar 13 13:19:28 UTC 2010 - andrea@opensuse.org
- added CUnit-2.1-pkgconfig.patch to provide cunit.pc
-------------------------------------------------------------------
Wed Mar 3 20:56:11 UTC 2010 - andrea@opensuse.org
- split into 3 subpackages
-------------------------------------------------------------------
Tue Mar 2 15:45:52 UTC 2010 - andrea@opensuse.org
- New package

134
cunit.spec Normal file
View File

@ -0,0 +1,134 @@
#
# spec file for package cunit
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _name CUnit
%define _version 2.1-3
%define _libname libcunit1
Name: cunit
Version: 2.1.3
Release: 0
Summary: It provides C programmers a basic testing functionality
License: LGPL-2.0
Group: Development/Libraries/C and C++
Url: http://cunit.sourceforge.net/
Source0: http://download.sourceforge.net/cunit/%{_name}-%{_version}.tar.bz2
Patch0: cunit-link-ncurses.diff
Patch1: cunit-ncurses6.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
CUnit is a unit testing framework for C.
This package installs the CUnit static library,
headers, and documentation files.
%package devel
Summary: CUnit development files
Group: Development/Libraries/C and C++
Requires: %{_libname} = %{version}
Requires: ncurses-devel
Requires: pkg-config
%if 0%{?suse_version} || 0%{?fedora_version}
Recommends: %{name}-doc = %{version}
%endif
%description devel
CUnit is a unit testing framework for C.
This package installs the CUnit development files.
%package doc
Summary: CUnit documentation
Group: Documentation/Man
Requires: %{_libname} = %{version}
%description doc
CUnit is a unit testing framework for C.
This package installs the CUnit
documentation files.
%package -n %{_libname}
Summary: CUnit shared library
Group: System/Libraries
%description -n %{_libname}
CUnit is a unit testing framework for C.
This package installs the CUnit shared library.
%prep
%setup -q -n %{_name}-%{_version}
%patch0 -p1
%patch1 -p1
chmod -x AUTHORS ChangeLog COPYING NEWS README TODO doc/*.html doc/*.css
%build
autoreconf -fi
%configure \
--disable-static \
--enable-automated \
--enable-basic \
--enable-console \
--enable-curses \
--enable-examples \
--enable-test
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
rm -rf %{buildroot}%{_prefix}/doc
# arch dependent files
mkdir -p %{buildroot}%{_libdir}/CUnit/
mv %{buildroot}%{_datadir}/CUnit/Examples/ %{buildroot}%{_libdir}/CUnit/
mv %{buildroot}%{_datadir}/CUnit/Test/ %{buildroot}%{_libdir}/CUnit/
chmod -x doc/headers/*
rm doc/headers/Makefile*
rm doc/headers/Jamfile*
rm doc/Makefile*
rm doc/Jamfile*
%post -n %{_libname} -p /sbin/ldconfig
%postun -n %{_libname} -p /sbin/ldconfig
%files -n %{_libname}
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_libdir}/libcunit.so.*
%files doc
%defattr(-,root,root,-)
%doc doc/*
%dir %{_datadir}/CUnit
%{_datadir}/CUnit/*
%{_mandir}/man3/CUnit.3.gz
%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/CUnit
%{_includedir}/CUnit/*
%dir %{_libdir}/CUnit
%{_libdir}/CUnit/*
%{_libdir}/libcunit.so
%{_libdir}/pkgconfig/cunit.pc
%changelog