summaryrefslogtreecommitdiff
path: root/media-libs/simage
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /media-libs/simage
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'media-libs/simage')
-rw-r--r--media-libs/simage/Manifest5
-rw-r--r--media-libs/simage/files/simage-1.7.1-disable-examples.patch44
-rw-r--r--media-libs/simage/files/simage-1.7.1-fix-examples-linking.patch22
-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.ebuild15
5 files changed, 111 insertions, 27 deletions
diff --git a/media-libs/simage/Manifest b/media-libs/simage/Manifest
index 09945a6676b4..256934103cb4 100644
--- a/media-libs/simage/Manifest
+++ b/media-libs/simage/Manifest
@@ -1,10 +1,11 @@
AUX simage-1.7.0-libpng15.patch 572 BLAKE2B 7f4eacdd5aac3e6634fd26824d0dfb7ec779fcf6be86e642f2870c62b1f0bd86b1ef767e19034e05fd62cba9904ef45e13a85be7657e00133febb67b0469c337 SHA512 0a867187b0dbc644182784e56dfd26b51f48c9355b01228fe3386fab05cee084e0066d4b18eb3f63110a25c0d2abf8f8b214d9b94e2e7dc7438e90308653e4e8
AUX simage-1.7.0-pkgconfig-partial.patch 467 BLAKE2B a2957c1d5fc6939df7ecb1bb15743253294142a87f98d4043368f189dc4f5ee302de16e84572a69e3ea5755124326fb075b2e45d3574a1759c899d9e96eaf828 SHA512 791db9c02fc0dc7526ed43b340ab6f92baea91a5bf9005099f6adf1550a7ab73ef36790d2e761f0b50b88098e9124f3035ff21149cca00d819c2262d8e180618
AUX simage-1.7.1-cmake-automagic-deps.patch 2730 BLAKE2B f4948226c05c123a92d7221d6e670e1d9bcbea326c34fcb7615e69493fab14707be47965ec68a0fa2d1ec71bfc08d74c772730acf78dd8da1062d833205eceb0 SHA512 81ad61d683915b803909729a69bf5496254920ab0d40ce1186fae838eadda831ef9d8cc1138624145f2e1e88dbfd75852f3c97da0316bc6a85cd23d55d5f1a5d
+AUX simage-1.7.1-disable-examples.patch 1803 BLAKE2B 93c4ef68fa3e2e1db406c7fd3fe67096e9a70692e1a8c35c0391e38be5335072aa87ae5fb41cc1a3b3b0fac06df9c525566d1b7efab3db1f4cde2ca7b3530d74 SHA512 5046fec14950e1cec25ac0576197208dad05cc862c8c59b405db38586c91fd5dbd1b2793551901f34312eabb4cd6dfb7a84f8620372a7d6aefafd6490f6a7847
AUX simage-1.7.1-disable-gif-quantize-buffer.patch 1054 BLAKE2B 15c0cf6c1ca78798e3c93034e7e4d17e1bf5ba5f9921f307e52b87f9d3e02babfac83e40eed401f98db8a225f404fa248957f41b03e360541e46bc62c893d099 SHA512 4a25f0f54a609c613e4f7baaf87a694e246b0c283cf85195e6d272826deb95dda9106125925188e785a2c64c2ed9633465ceb76b2b816e463cfa063ec16dffdc
-AUX simage-1.7.1-fix-examples-linking.patch 963 BLAKE2B e1f39f1bcf1d32d872a73304331fc0dcf88e7067b9086d48de6e0d239b805291be5b328b09c33a9d9f9d6b6278ab1d36cde261665789fd21b1742fef9dadeb43 SHA512 c586e6c760aa42b79f164af97d7a198ffeda6156fee94af6cd50eb61a76fc6c8d0c70ea4752486658be6a280cfab9d53327f1f653cd9dd8beb222e5ef9ab4843
+AUX simage-1.7.1-tests-conditional.patch 1757 BLAKE2B 59bb06980457f85c68670d02efdb3ddf149576d9f8728a33e7a0e97e736454b3858ba3eb123e6239f89006c836cb640b49238ffa733fe97ea65a5ca871712005 SHA512 3063e47ac6a7e90ce27f93d8046d897d203756b52008ed867061260378858b2b0c6b0cf6cb87a846f2f98cf2e595f2e4b4a468a32e34e9676d16848c387cd46e
DIST simage-1.7.0.tar.gz 752602 BLAKE2B feca31f8d41ae67271e43c9c664243d872985068ffc8496d43c9b59a47ae5c3067956acced3ff9abbdc5a360aec662e3972a93d8523a704a72ac9d12dd4cfaa0 SHA512 944ec009dd7041692073ddd9795fdd633fe3bc9101f1c1234e8be3746487a9431aecf52abde01563e719153fbe1ca7d29f9b64042e4a64ea08d6cb14666dd89f
DIST simage-1.7.1-src.zip 4145907 BLAKE2B 99f5f5f46530c2600d47ab0bb080d69281447ee96a2bb9b63ebe5a5c56e235f34ca8bd97b0d6adedf061fe221a61d144d4ccce00123941a9c74d72b1f190030d SHA512 b3c81fa363cd570b3512cd2984f154b83876353ec389dc35afcac4e4ddf8d301eef5b0f8df93c38b9caa6afd81fbe53d3943ad05e041b77734f03c26d2e12867
EBUILD simage-1.7.0-r1.ebuild 1774 BLAKE2B 672761903a9a91db1c92d6cd0248902b1c9c5612cc95bb8f7b543991672b9dfc761c29ea89f432f02c119170c8c7539830d00fa811dc06675ba19dd2d9cdb0d4 SHA512 609cdd06c38fab358d4f6aaa469dec35e14789a7ec2ab459f80f3065ca9341a9801d7c6e48490fd436d667f71dfda51396474f25fe4481dbadfca27928c3f394
-EBUILD simage-1.7.1-r1.ebuild 1808 BLAKE2B 243ac483497cb66689c41d792992ec0133042243118eacb37fee19791a1aa4f2b4359bf5fd8d7dc28c5107abc6c1617ed49d02f52189aac84fb07712404073fe SHA512 91bb1af84eeaf86fc14b583dad3cd236b0d0dbe5b1bbafddb916b43e2fe5d633111c5c7f8c4c1ded5ea485ed04eaa5b56013dbf00334d3148dfde4bb0a436c7b
+EBUILD simage-1.7.1-r1.ebuild 2175 BLAKE2B 78d7d95b1121df159983b79dfdd93182424c40c5a85010b408f789ca522abf9920a135245a4089ab360df3f7df33f8ae8a3a2c0283de2c69598bcb3fe5bea458 SHA512 b5ac712222fff11ce87dd3b2fdbe340ef8bfa49001f348a8c26b87f64c3e3d216af92107032aebaceff8de9980150ba7a64b331f544b8edf11ab64b2e64d77d9
MISC metadata.xml 298 BLAKE2B 312f7a48552438ce1231a58486f19aca02bbb281b72733645ffad42a3f82df778145bfc66a61c1216e47bd68e54668725fe08274482be7fb3997c99bf3089fdc SHA512 b72572413e5e40d55658049b4624de687dd1011553fc384deb0c837830b6f82d060b6356ad25e803f27d3be697b07a8c3fbc45932d20d89e4d9918ed6fecd84a
diff --git a/media-libs/simage/files/simage-1.7.1-disable-examples.patch b/media-libs/simage/files/simage-1.7.1-disable-examples.patch
new file mode 100644
index 000000000000..9e43e073ccd1
--- /dev/null
+++ b/media-libs/simage/files/simage-1.7.1-disable-examples.patch
@@ -0,0 +1,44 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5536922..07df95a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -482,23 +482,23 @@ endif()
+ # Build examples
+ # ############################################################################
+
+-set(SIMAGE_EXAMPLE_SOURCE
+- ${CMAKE_CURRENT_SOURCE_DIR}/examples/audio2raw.c
+- ${CMAKE_CURRENT_SOURCE_DIR}/examples/img2avi.c
++#set(SIMAGE_EXAMPLE_SOURCE
++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/audio2raw.c
++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/img2avi.c
+ # ${CMAKE_CURRENT_SOURCE_DIR}/examples/mpeg2enc.cpp # requires Coin to build
+- ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-convert.c
+- ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-read-line-test.c
+-)
+-
+-foreach(_source ${SIMAGE_EXAMPLE_SOURCE})
+- get_filename_component(_example ${_source} NAME_WE)
+- add_executable(${_example} ${_source})
+- target_compile_definitions(${_example} PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
+- target_link_libraries(${_example} simage)
+- if(UNIX)
+- target_link_libraries(${_example} m)
+- endif()
+-endforeach()
++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-convert.c
++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-read-line-test.c
++#)
++
++#foreach(_source ${SIMAGE_EXAMPLE_SOURCE})
++# get_filename_component(_example ${_source} NAME_WE)
++# add_executable(${_example} ${_source})
++# target_compile_definitions(${_example} PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
++# target_link_libraries(${_example} simage)
++# if(UNIX)
++# target_link_libraries(${_example} m)
++# endif()
++#endforeach()
+
+ # ############################################################################
+ # Build tests
diff --git a/media-libs/simage/files/simage-1.7.1-fix-examples-linking.patch b/media-libs/simage/files/simage-1.7.1-fix-examples-linking.patch
deleted file mode 100644
index 756ddea5c73f..000000000000
--- a/media-libs/simage/files/simage-1.7.1-fix-examples-linking.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8225dc4..de89fd0 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -494,7 +494,7 @@ foreach(_source ${SIMAGE_EXAMPLE_SOURCE})
- get_filename_component(_example ${_source} NAME_WE)
- add_executable(${_example} ${_source})
- target_compile_definitions(${_example} PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES)
-- target_link_libraries(${_example} simage)
-+ target_link_libraries(${_example} simage sndfile)
- if(UNIX)
- target_link_libraries(${_example} m)
- endif()
-@@ -507,7 +507,7 @@ endforeach()
- enable_testing()
-
- add_executable(loaders tests/loaders.c)
--target_link_libraries(loaders simage)
-+target_link_libraries(loaders simage sndfile)
- 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)
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 e6405b2179ab..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,14 +35,18 @@ RDEPEND="
"
DEPEND="
${RDEPEND}
- app-arch/unzip
+ test? ( media-libs/libsndfile )
"
S="${WORKDIR}/${PN}"
PATCHES=(
"${FILESDIR}/${P}-cmake-automagic-deps.patch"
- "${FILESDIR}/${P}-fix-examples-linking.patch"
+ # examples need to link against libsndfile unconditionally so either we could
+ # 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"
)
@@ -68,6 +76,7 @@ src_configure() {
-DSIMAGE_RGB_SUPPORT=ON
-DSIMAGE_TGA_SUPPORT=ON
-DSIMAGE_XWD_SUPPORT=ON
+ -DTESTS=$(usex test)
)
cmake-utils_src_configure