Skip to content

Commit

Permalink
cmocka-1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fd00 committed Dec 2, 2016
1 parent b6f9841 commit c53d8b8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 36 deletions.
38 changes: 21 additions & 17 deletions cmocka/README
Expand Up @@ -22,40 +22,41 @@ preferable.
This is the successor of Google's Cmockery.

Runtime requirements:
cygwin-1.7.35-1
libcmocka-devel-1.0.1-1bl1
libcmocka0-1.0.1-1bl1
libgcc1-4.9.2-3
libssp0-4.9.2-3
cygwin-2.6.0-1
libcmocka-devel-1.1.0-1bl1
libcmocka0-1.1.0-1bl1
libgcc1-5.4.0-1
libssp0-5.4.0-1
pkg-config-0.29.1-1

Build requirements:
(besides corresponding -devel packages)
binutils-2.25-1
cmake-3.1.2-1
cygport-0.18.1-1
gcc-core-4.9.2-3
make-4.1-1
binutils-2.25-4
cmake-3.6.2-1
cygport-0.23.0-1
gcc-core-5.4.0-1
make-4.2.1-1

Canonical website:
https://cmocka.org/

Canonical download:
https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz
https://cmocka.org/files/1.1/cmocka-1.1.0.tar.xz

-------------------------------------------

Build instructions:
1. unpack cmocka-1.0.1-X-src.tar.xz
1. unpack cmocka-1.1.0-X-src.tar.xz
2. if you use setup to install this src package,
it will be unpacked under /usr/src automatically
% cd /usr/src
% cygport ./cmocka-1.0.1-X.cygport all
% cygport ./cmocka-1.1.0-X.cygport all

This will create:
/usr/src/cmocka-1.0.1-X-src.tar.xz
/usr/src/cmocka-1.0.1-X.tar.xz
/usr/src/libcmocka0-1.0.1-X.tar.xz
/usr/src/libcmocka-devel-1.0.1-X.tar.xz
/usr/src/cmocka-1.1.0-X-src.tar.xz
/usr/src/cmocka-1.1.0-X.tar.xz
/usr/src/libcmocka0-1.1.0-X.tar.xz
/usr/src/libcmocka-devel-1.1.0-X.tar.xz

-------------------------------------------

Expand Down Expand Up @@ -83,6 +84,9 @@ Files included in the binary package:

Port Notes:

----- version 1.1.0-1bl1 -----
Version bump.

----- version 1.0.1-1bl1 -----
Version bump.

Expand Down
@@ -1,5 +1,5 @@
HOMEPAGE="https://cmocka.org/"
SRC_URI="https://cmocka.org/files/1.0/${P}.tar.xz"
SRC_URI="https://cmocka.org/files/${PV[1]}.${PV[2]}/${P}.tar.xz"

CATEGORY="Devel"
SUMMARY="Lightweight C unit testing library"
Expand Down
@@ -1,32 +1,37 @@
--- origsrc/cmocka-1.0.1/DefineOptions.cmake 2015-02-13 00:59:22.000000000 +0900
+++ src/cmocka-1.0.1/DefineOptions.cmake 2015-04-04 17:00:35.157118800 +0900
@@ -1,7 +1,3 @@
option(WITH_STATIC_LIB "Build with a static library" OFF)
--- origsrc/cmocka-1.1.0/DefineOptions.cmake 2015-02-13 00:59:22.000000000 +0900
+++ src/cmocka-1.1.0/DefineOptions.cmake 2016-12-02 15:35:38.975644900 +0900
@@ -2,6 +2,6 @@ option(WITH_STATIC_LIB "Build with a sta
option(WITH_CMOCKERY_SUPPORT "Install a cmockery header" OFF)
option(UNIT_TESTING "Build with unit testing" OFF)
-
-if (UNIT_TESTING)
- set(WITH_STATIC_LIB ON)
-endif()
--- origsrc/cmocka-1.0.1/cmake/Modules/DefineCompilerFlags.cmake 2015-02-11 15:57:11.000000000 +0900
+++ src/cmocka-1.0.1/cmake/Modules/DefineCompilerFlags.cmake 2015-04-04 16:54:12.403014700 +0900
@@ -16,10 +16,12 @@ if (UNIX AND NOT WIN32)
+if (UNIT_TESTING AND NOT CYGWIN)
set(WITH_STATIC_LIB ON)
endif()
--- origsrc/cmocka-1.1.0/cmake/Modules/DefineCompilerFlags.cmake 2015-02-11 15:57:11.000000000 +0900
+++ src/cmocka-1.1.0/cmake/Modules/DefineCompilerFlags.cmake 2016-12-02 15:36:20.174694200 +0900
@@ -16,11 +16,13 @@ if (UNIX AND NOT WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -Wundef")

# with -fPIC
- check_c_compiler_flag("-fPIC" WITH_FPIC)
- if (WITH_FPIC)
+ if (NOT CYGWIN)
check_c_compiler_flag("-fPIC" WITH_FPIC)
if (WITH_FPIC)
+ check_c_compiler_flag("-fPIC" WITH_FPIC)
+ if (WITH_FPIC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
endif (WITH_FPIC)
- endif (WITH_FPIC)
-
+ endif (WITH_FPIC)
+ endif()

+
check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR)
if (WITH_STACK_PROTECTOR)
--- origsrc/cmocka-1.0.1/tests/CMakeLists.txt 2015-02-13 03:07:57.000000000 +0900
+++ src/cmocka-1.0.1/tests/CMakeLists.txt 2015-04-04 17:00:27.917798900 +0900
@@ -19,14 +19,14 @@ set(CMOCKA_TESTS
test_setup_fail)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
--- origsrc/cmocka-1.1.0/tests/CMakeLists.txt 2016-09-21 22:31:28.000000000 +0900
+++ src/cmocka-1.1.0/tests/CMakeLists.txt 2016-12-02 15:36:42.096917600 +0900
@@ -25,14 +25,14 @@ set(CMOCKA_TESTS
test_returns_fail)

foreach(_CMOCKA_TEST ${CMOCKA_TESTS})
- add_cmocka_test(${_CMOCKA_TEST} ${_CMOCKA_TEST}.c ${CMOCKA_STATIC_LIBRARY})
Expand Down

0 comments on commit c53d8b8

Please sign in to comment.