diff options
author | Vijay Marcel <vijaymarcel@outlook.com> | 2024-09-04 21:58:58 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-09-04 22:01:46 +0700 |
commit | 700da5873fad09a8d6373a8bf9e4c9d6f8f7e9a4 (patch) | |
tree | 908261bbc976e4829b1278744f218e5b87f6c785 /development/cunit | |
parent | 18222c767087a56eb8a5444d4d164e5c1d52868e (diff) |
development/cunit: New maintainer and patches.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/cunit')
-rw-r--r-- | development/cunit/README | 3 | ||||
-rw-r--r-- | development/cunit/cunit.SlackBuild | 41 | ||||
-rw-r--r-- | development/cunit/cunit.info | 4 | ||||
-rw-r--r-- | development/cunit/patches/0003-fix-warnings-in-man.patch | 70 | ||||
-rw-r--r-- | development/cunit/patches/0004-doc-intorduction-fix-links-to-headers-4K-in-size.patch | 44 | ||||
-rw-r--r-- | development/cunit/patches/curses_ftbfs.patch | 52 | ||||
-rw-r--r-- | development/cunit/patches/fix-string-format-errors-with-recent-ncu.patch | 50 | ||||
-rw-r--r-- | development/cunit/patches/series | 4 |
8 files changed, 249 insertions, 19 deletions
diff --git a/development/cunit/README b/development/cunit/README index ff4bbe0358272..5ee42f0abdb65 100644 --- a/development/cunit/README +++ b/development/cunit/README @@ -7,3 +7,6 @@ testing code. It uses a simple framework for building test structures, and provides a rich set of assertions for testing common data types. In addition, several different interfaces are provided for running tests and reporting results. + +The patches are from Debian Gnu/Linux you can view them here: +https://sources.debian.org/patches/cunit/2.1-3-dfsg-2.7/ diff --git a/development/cunit/cunit.SlackBuild b/development/cunit/cunit.SlackBuild index 5b0014d755533..90ab10c80f1e0 100644 --- a/development/cunit/cunit.SlackBuild +++ b/development/cunit/cunit.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for CUnit # Copyright 2013 Benjamin Trigona-Harany +# Copyright 2024 Vijay Marcel # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -30,7 +31,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=cunit SRCNAM=CUnit VERSION=${VERSION:-2.1_3} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -54,13 +55,13 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKCFLAGS="-march=i586 -mtune=i686 -pipe -O2 -fPIC" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-march=i686 -mtune=i686 -pipe -O2 -fPIC" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" @@ -68,6 +69,7 @@ else fi set -e +trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -82,41 +84,46 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ -libtoolize --force --copy -aclocal -autoheader -automake --add-missing --include-deps --copy -autoconf + +patch -p1 --verbose --unified < $CWD/patches/0003-fix-warnings-in-man.patch +patch -p1 --verbose --unified < $CWD/patches/0004-doc-intorduction-fix-links-to-headers-4K-in-size.patch +patch -p1 --verbose --unified < $CWD/patches/fix-string-format-errors-with-recent-ncu.patch +patch -p1 --verbose --unified < $CWD/patches/curses_ftbfs.patch + +autoreconf -fiv CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --build=$ARCH \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --enable-curses \ + --enable-examples \ + --enable-memtrace \ --enable-static=no \ + --with-gnu-ld \ --build=$ARCH-slackware-linux make make install DESTDIR=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + | cut -f 1 -d : | xargs strip --strip-unneeded --remove-section=.comment --remove-section=.note 2> /dev/null || true + +rm -vf $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la # Need to adjust mandir location mv $PKG/usr/share/man $PKG/usr/man find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -pv $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/doc/$SRCNAM $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING ChangeLog NEWS README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -av AUTHORS COPYING ChangeLog NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -rm -f $PKG/usr/lib*/*.la - -mkdir -p $PKG/install +mkdir -pv $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG diff --git a/development/cunit/cunit.info b/development/cunit/cunit.info index ad559b40d56c6..b95ff37237d8a 100644 --- a/development/cunit/cunit.info +++ b/development/cunit/cunit.info @@ -6,5 +6,5 @@ MD5SUM="b5f1a9f6093869c070c6e4a9450cc10c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Benjamin Trigona-Harany" -EMAIL="slackbuilds@jaxartes.net" +MAINTAINER="Vijay Marcel" +EMAIL="vijaymarcel@outlook.com" diff --git a/development/cunit/patches/0003-fix-warnings-in-man.patch b/development/cunit/patches/0003-fix-warnings-in-man.patch new file mode 100644 index 0000000000000..6125b4a4924d2 --- /dev/null +++ b/development/cunit/patches/0003-fix-warnings-in-man.patch @@ -0,0 +1,70 @@ +From 2e44434922f469eeb69f875f1168811f969d5902 Mon Sep 17 00:00:00 2001 +From: Azat Khuzhin <a3at.mail@gmail.com> +Date: Mon, 7 Sep 2015 10:33:28 +0300 +Subject: [PATCH] fix warnings in man + +--- + Man/man3/CUnit.3 | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/Man/man3/CUnit.3 b/Man/man3/CUnit.3 +index 6ea4e6d..ae50ddf 100644 +--- a/Man/man3/CUnit.3 ++++ b/Man/man3/CUnit.3 +@@ -473,7 +473,7 @@ dynamically. The following functions are provided for this purpose, and should + be used instead of directly setting the value of the data structure members. All + return CUE_SUCCESS on success, and the indicated error code on failure. + .P +-.TP5 ++.TP 5 + .B "CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName)" + .TP 5 + .B "CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName)" +@@ -481,7 +481,7 @@ These functions change the name of registered suites and tests. The current nam + are available as the + .B pSuite->pName</I> + and +-.BpTest->pName ++.B pTest->pName + data structure members. If the suite or test is NULL, then CUE_NOSUITE or CUE_NOTEST + is returned, respectively. If strNewName is NULL, then CUE_NO_SUITENAME or + CUE_NO_TESTNAME is returned, respectively. +@@ -518,13 +518,13 @@ nothing is known about the suite or test, the client will need to iterate the in + data structures to enumerate the suites and tests. This is not directly supported in + the client API. + .P +-.TP5 ++.TP 5 + .B "CU_pSuite CU_get_suite(const char* strName)" +-.TP5 ++.TP 5 + .B "CU_pSuite CU_get_suite_at_pos(unsigned int pos)" +-.TP5 ++.TP 5 + .B "unsigned int CU_get_suite_pos(CU_pSuite pSuite)" +-.TP5 ++.TP 5 + .B "unsigned int CU_get_suite_pos_by_name(const char* strName)" + </P> + These functions facilitate lookup of suites registered in the active test registry. +@@ -539,13 +539,13 @@ These return 0 if the suite cannot be found. In addition, all these functions s + CUnit error state to CUE_NOREGISTRY> if the registry is not initialized. As appropriate, + CUE_NO_SUITENAME is set if strName is NULL, and CUE_NOSUITE is set if pSuite is NULL. + .P +-.TP5 ++.TP 5 + .B "CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName)" +-.TP5 ++.TP 5 + .B "CU_pTest CU_get_test_at_pos<(CU_pSuite pSuite, unsigned int pos)" +-.TP5 ++.TP 5 + .B "unsigned int CU_get_test_pos<(CU_pSuite pSuite, CU_pTest pTest)" +-.TP5 ++.TP 5 + .B "unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName)" + These functions facilitate lookup of tests registered in suites. The first + 2 functions allow lookup of the test by name or position and return NULL if the +-- +2.5.1 + diff --git a/development/cunit/patches/0004-doc-intorduction-fix-links-to-headers-4K-in-size.patch b/development/cunit/patches/0004-doc-intorduction-fix-links-to-headers-4K-in-size.patch new file mode 100644 index 0000000000000..1c75c2b1d659e --- /dev/null +++ b/development/cunit/patches/0004-doc-intorduction-fix-links-to-headers-4K-in-size.patch @@ -0,0 +1,44 @@ +From ea23c9ae2eb733bc1f2033271beaa37bff96e320 Mon Sep 17 00:00:00 2001 +From: Azat Khuzhin <a3at.mail@gmail.com> +Date: Sun, 27 Dec 2015 00:42:41 +0300 +Subject: [PATCH] doc/introduction: fix links to headers >4K in size + +Reported-by: rhieber <rhieber@rohieb.name> +Debian-Bug-Id: #808614 +--- + doc/introduction.html | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/doc/introduction.html b/doc/introduction.html +index 326f64e..ba2eed0 100644 +--- a/doc/introduction.html ++++ b/doc/introduction.html +@@ -39,21 +39,21 @@ The data types and functions useful to the typical user are declared in the foll + <TH><U>Description</U></TH> + </TR> + <TR VALIGN="top"> +- <TD><B>#include <<A HREF="headers/CUnit.h">CUnit/CUnit.h</A>></B></TD> ++ <TD><B>#include <<A HREF="headers/CUnit.h.gz">CUnit/CUnit.h</A>></B></TD> + <TD>ASSERT macros for use in test cases, and includes other framework headers.</TD> + </TR> + <TR VALIGN="top"> +- <TD><B>#include <<A HREF="headers/CUError.h">CUnit/CUError.h</A>></B></TD> ++ <TD><B>#include <<A HREF="headers/CUError.h.gz">CUnit/CUError.h</A>></B></TD> + <TD>Error handing functions and data types. <I>Included automatically by CUnit.h.</I></TD> + </TR> + <TR VALIGN="top"> +- <TD><B>#include <<A HREF="headers/TestDB.h">CUnit/TestDB.h</A>></B></TD> ++ <TD><B>#include <<A HREF="headers/TestDB.h.gz">CUnit/TestDB.h</A>></B></TD> + <TD>Data type definitions and manipulation functions for the test registry, suites, and tests. + <I>Included automatically by CUnit.h.</I> + </TD> + </TR> + <TR VALIGN="top"> +- <TD><B>#include <<A HREF="headers/TestRun.h">CUnit/TestRun.h</A>></B></TD> ++ <TD><B>#include <<A HREF="headers/TestRun.h.gz">CUnit/TestRun.h</A>></B></TD> + <TD>Data type definitions and functions for running tests and retrieving results. + <I>Included automatically by CUnit.h.</I> + </TD> +-- +2.6.4 + diff --git a/development/cunit/patches/curses_ftbfs.patch b/development/cunit/patches/curses_ftbfs.patch new file mode 100644 index 0000000000000..bbeec1818097b --- /dev/null +++ b/development/cunit/patches/curses_ftbfs.patch @@ -0,0 +1,52 @@ +Description: Use getters for accessing fields of opaque type WINDOW in Curses.c +Author: Mate Kukri <mate.kukri@canonical.com> +Last-Update: 2024-01-04 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/CUnit/Sources/Curses/Curses.c ++++ b/CUnit/Sources/Curses/Curses.c +@@ -256,10 +256,10 @@ + + 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) - 1; ++ f_nHeight = getmaxy(application_windows.pMainWin) - 1; + + if (NULL == (application_windows.pTitleWin = newwin(3, f_nWidth, 0, 0))) { + goto title_fail; +@@ -358,10 +358,10 @@ + { + 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) - 1; ++ f_nHeight = getmaxy(application_windows.pMainWin) - 1; + + refresh_title_window(); + refresh_progress_window(); +@@ -907,10 +907,10 @@ + 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) - 3; ++ pPad->uiWinRows = getmaxy(application_windows.pDetailsWin) - 3; + + bStatus = true; + diff --git a/development/cunit/patches/fix-string-format-errors-with-recent-ncu.patch b/development/cunit/patches/fix-string-format-errors-with-recent-ncu.patch new file mode 100644 index 0000000000000..20e69f247c8e2 --- /dev/null +++ b/development/cunit/patches/fix-string-format-errors-with-recent-ncu.patch @@ -0,0 +1,50 @@ +From: Sven Joachim <svenjoac@gmx.de> +Date: Wed, 13 Oct 2021 19:23:18 +0200 +X-Dgit-Generated: 2.1-3-dfsg-3 74c029a14c5195c79122d44c3777a169d8cc535f +Subject: Fix string format errors with recent ncurses + + +--- + +--- cunit-2.1-3-dfsg.orig/CUnit/Sources/Curses/Curses.c ++++ cunit-2.1-3-dfsg/CUnit/Sources/Curses/Curses.c +@@ -952,11 +952,11 @@ static void show_suite_level_help(CU_pSu + + snprintf(szTemp, STRING_LENGTH, _("Commands: R - run all tests in suite %s"), + pSuite->pName); +- mvwprintw(details_pad.pPad, 0, 0, szTemp); ++ mvwprintw(details_pad.pPad, 0, 0, "%s", szTemp); + mvwprintw(details_pad.pPad, 1, 0, _(" S - Select and run a test")); + snprintf(szTemp, STRING_LENGTH, _(" L - List all tests registered in suite %s"), + pSuite->pName); +- mvwprintw(details_pad.pPad, 2, 0, szTemp); ++ mvwprintw(details_pad.pPad, 2, 0, "%s", szTemp); + mvwprintw(details_pad.pPad, 3, 0, _(" A - Activate or deactivate a test (toggle)")); + mvwprintw(details_pad.pPad, 4, 0, _(" F - Show failures from last test run")); + mvwprintw(details_pad.pPad, 5, 0, _(" M - Move up to main menu")); +@@ -1068,14 +1068,14 @@ static void list_tests(CU_pSuite pSuite) + } + + snprintf(szTemp, STRING_LENGTH, "%s: %s", _("Suite"), pSuite->pName); +- mvwprintw(details_pad.pPad, 0, 0, szTemp); ++ mvwprintw(details_pad.pPad, 0, 0, "%s", szTemp); + + snprintf(szTemp, STRING_LENGTH, + "%*s %-*s%*s", + width[0], _("#"), + width[1], _("Test Name"), + width[2], _("Active?")); +- mvwprintw(details_pad.pPad, 1, 0, szTemp); ++ mvwprintw(details_pad.pPad, 1, 0, "%s", szTemp); + + for (i = 0, pCurTest = pSuite->pTest ; + NULL != pCurTest ; +@@ -1158,7 +1158,7 @@ static STATUS curses_set_options_run(voi + + snprintf(szTemp, STRING_LENGTH, _(" 1 - Inactive suites/tests treated as runtime failures %s"), + (CU_FALSE != CU_get_fail_on_inactive()) ? _("Yes") : _("No ")); +- mvwprintw(details_pad.pPad, 2, 0, szTemp); ++ mvwprintw(details_pad.pPad, 2, 0, "%s", szTemp); + refresh_details_window(); + read_input_string(_("Enter number of option to change : "), szTemp, STRING_LENGTH); + option_num = atol(szTemp); diff --git a/development/cunit/patches/series b/development/cunit/patches/series new file mode 100644 index 0000000000000..e065752433a43 --- /dev/null +++ b/development/cunit/patches/series @@ -0,0 +1,4 @@ +0003-fix-warnings-in-man.patch +0004-doc-intorduction-fix-links-to-headers-4K-in-size.patch +fix-string-format-errors-with-recent-ncu.patch +curses_ftbfs.patch |