summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2019-12-27 11:52:29 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2019-12-27 11:52:49 +0100
commit01bc8ce0c058cd799bcc5d2fb0730eb87eb8c59b (patch)
tree266d03702d8f86cdad6737f8cefa8c6003b499fc /media-libs/simage
parentx11-drivers/nvidia-drivers: Version 340.108 (diff)
downloadgentoo-01bc8ce0c058cd799bcc5d2fb0730eb87eb8c59b.tar.gz
gentoo-01bc8ce0c058cd799bcc5d2fb0730eb87eb8c59b.tar.bz2
gentoo-01bc8ce0c058cd799bcc5d2fb0730eb87eb8c59b.zip
media-libs/simage: fixed tests in 1.7.1-r1
1) fixed building tests 2) organized deps Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'media-libs/simage')
-rw-r--r--media-libs/simage/files/simage-1.7.1-tests-conditional.patch52
-rw-r--r--media-libs/simage/simage-1.7.1-r1.ebuild10
2 files changed, 60 insertions, 2 deletions
diff --git a/media-libs/simage/files/simage-1.7.1-tests-conditional.patch b/media-libs/simage/files/simage-1.7.1-tests-conditional.patch
new file mode 100644
index 000000000000..ced49159ba69
--- /dev/null
+++ b/media-libs/simage/files/simage-1.7.1-tests-conditional.patch
@@ -0,0 +1,52 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5536922..b6de403 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -504,25 +504,28 @@ endforeach()
+ # Build tests
+ # ############################################################################
+
+-enable_testing()
+-
+-add_executable(loaders tests/loaders.c)
+-target_link_libraries(loaders simage)
+-target_compile_definitions(loaders PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
+-if(UNIX)
+- target_link_libraries(loaders m)
+-endif()
+-
+-add_test(
+- loaders
+- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/loaders
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.gif
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.jpg
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.png
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.rgb
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tga
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tif
+-)
++if(TESTS)
++ enable_testing()
++
++ add_executable(loaders tests/loaders.c)
++ target_link_libraries(loaders simage)
++ target_compile_definitions(loaders PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
++ if(UNIX)
++ target_link_libraries(loaders m)
++ target_link_libraries(loaders sndfile)
++ endif()
++
++ add_test(
++ loaders
++ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/loaders
++ ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.gif
++ ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.jpg
++ ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.png
++ ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.rgb
++ ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tga
++ ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tif
++ )
++endif()
+
+ # Add a target to generate API documentation with Doxygen
+ if(SIMAGE_BUILD_DOCUMENTATION)
diff --git a/media-libs/simage/simage-1.7.1-r1.ebuild b/media-libs/simage/simage-1.7.1-r1.ebuild
index 5117be12735c..34859fa678e4 100644
--- a/media-libs/simage/simage-1.7.1-r1.ebuild
+++ b/media-libs/simage/simage-1.7.1-r1.ebuild
@@ -12,8 +12,12 @@ SRC_URI="https://bitbucket.org/Coin3D/simage/downloads/${P}-src.zip"
LICENSE="public-domain mpeg2enc"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
SLOT="0"
-IUSE="debug gif jpeg png qt5 sndfile tiff vorbis"
+IUSE="debug gif jpeg png qt5 sndfile test tiff vorbis"
+RESTRICT="!test? ( test )"
+BDEPEND="
+ app-arch/unzip
+"
RDEPEND="
gif? ( media-libs/giflib )
jpeg? ( virtual/jpeg:0= )
@@ -31,7 +35,7 @@ RDEPEND="
"
DEPEND="
${RDEPEND}
- app-arch/unzip
+ test? ( media-libs/libsndfile )
"
S="${WORKDIR}/${PN}"
@@ -42,6 +46,7 @@ PATCHES=(
# make the dep unconditional or not build the examples. i chose the latter way.
# btw, examples are not installed anyway, they are just compiled.
"${FILESDIR}/${P}-disable-examples.patch"
+ "${FILESDIR}/${P}-tests-conditional.patch"
"${FILESDIR}/${P}-disable-gif-quantize-buffer.patch"
)
@@ -71,6 +76,7 @@ src_configure() {
-DSIMAGE_RGB_SUPPORT=ON
-DSIMAGE_TGA_SUPPORT=ON
-DSIMAGE_XWD_SUPPORT=ON
+ -DTESTS=$(usex test)
)
cmake-utils_src_configure