1SUMMARY="Libraries to write tests in C, C++ and shell" 2DESCRIPTION="ATF, or Automated Testing Framework, is a collection of libraries \ 3to write test programs in C, C++ and POSIX shell. 4 5The ATF libraries offer a simple API. The API is orthogonal through \ 6the various bindings, allowing developers to quickly learn how to write \ 7test programs in different languages. 8 9ATF-based test programs offer a consistent end-user command-line interface to \ 10allow both humans and automation to run the tests. 11 12ATF-based test programs rely on an execution engine to be run and \ 13this execution engine is not shipped with ATF. Kyua is the engine of choice." 14HOMEPAGE="https://github.com/jmmv/atf" 15COPYRIGHT="2007-2012 The NetBSD Foundation, Inc. 16 2011, 2012, 2014 Google Inc." 17LICENSE="BSD (2-clause) 18 BSD (3-clause)" 19REVISION="2" 20SOURCE_URI="https://github.com/jmmv/atf/releases/download/atf-$portVersion/atf-$portVersion.tar.gz" 21CHECKSUM_SHA256="92bc64180135eea8fe84c91c9f894e678767764f6dbc8482021d4dde09857505" 22PATCHES="atf-$portVersion.patchset" 23 24ARCHITECTURES="all !x86_gcc2 ?x86" 25SECONDARY_ARCHITECTURES="x86" 26 27commandSuffix="$secondaryArchSuffix" 28if [ "$targetArchitecture" = x86_gcc2 ]; then 29 commandSuffix="" 30fi 31 32libVersion="1.0.0" 33libCppVersion="2.0.0" 34libVersionCompat="$libVersion compat >= ${libVersion%%.*}" 35libCppVersionCompat="$libCppVersion compat >= ${libCppVersion%%.*}" 36 37PROVIDES=" 38 atf$secondaryArchSuffix = $portVersion 39 cmd:atf_sh$secondaryArchSuffix = $portVersion 40 lib:libatf_c$secondaryArchSuffix = $libVersionCompat 41 lib:libatf_c++$secondaryArchSuffix = $libCppVersionCompat 42 " 43REQUIRES=" 44 haiku$secondaryArchSuffix 45 " 46 47PROVIDES_devel=" 48 atf${secondaryArchSuffix}_devel = $portVersion 49 devel:libatf_c$secondaryArchSuffix = $libVersionCompat 50 devel:libatf_c++$secondaryArchSuffix = $libCppVersionCompat 51 " 52REQUIRES_devel=" 53 atf$secondaryArchSuffix == $portVersion base 54 " 55 56BUILD_REQUIRES=" 57 haiku${secondaryArchSuffix}_devel 58 " 59BUILD_PREREQUIRES=" 60 cmd:autoconf 61 cmd:awk 62 cmd:g++$secondaryArchSuffix 63 cmd:gcc$secondaryArchSuffix 64 cmd:grep 65 cmd:make 66 cmd:sed 67 " 68 69TEST_REQUIRES=" 70 cmd:kyua$commandSuffix 71 " 72 73defineDebugInfoPackage atf$secondaryArchSuffix \ 74 "$binDir/atf-sh" \ 75 "$libDir/libatf-c.so.$libVersion" \ 76 "$libDir/libatf-c++.so.$libCppVersion" 77 78BUILD() 79{ 80 CPPFLAGS="-D_BSD_SOURCE" LIBS="-Wl,--as-needed -lbsd" \ 81 runConfigure --omit-dirs "libExecDir" ./configure \ 82 --libexecdir="$libExecDir/atf" \ 83 --disable-static \ 84 --enable-developer=no 85 make $jobArgs 86} 87 88INSTALL() 89{ 90 make install 91 92 rm "$docDir"/{COPYING,README} 93 94 rm -rf "$prefix/tests" 95 rm -f "$libDir"/*.la 96 97 prepareInstalledDevelLibs libatf-c++ libatf-c 98 fixPkgconfig 99 # Turns out their .pc files don't have ${prefix} 100 sed -e "s|\${prefix}|$prefix|g" -i "$developLibDir/pkgconfig"/*.pc 101 sed \ 102 -e "s|\${exec_prefix}/bin/atf-sh|$binDir/atf-sh|" \ 103 -i "$developLibDir/pkgconfig/atf-sh.pc" 104 packageEntries devel \ 105 "$developDir" \ 106 "$dataDir/aclocal" \ 107 "$manDir/man3"/atf-c* 108} 109 110TEST() 111{ 112 CPATH="$PWD" kyua test 113} 114