diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2019-12-16 10:33:50 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2019-12-16 10:34:06 +0100 |
commit | 1e5e9468b40041e840c3018a2a930c0562018490 (patch) | |
tree | 4c11157ccdfd90ae43a33610fdb4c2d4987ef536 /media-libs/simage | |
parent | sys-apps/the_silver_searcher: add missing test dep (diff) | |
download | gentoo-1e5e9468b40041e840c3018a2a930c0562018490.tar.gz gentoo-1e5e9468b40041e840c3018a2a930c0562018490.tar.bz2 gentoo-1e5e9468b40041e840c3018a2a930c0562018490.zip |
media-libs/simage-1.7.1-r1: fixed examples linking
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.
Closes: https://bugs.gentoo.org/701030
Package-Manager: Portage-2.3.82, 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-disable-examples.patch | 44 | ||||
-rw-r--r-- | media-libs/simage/files/simage-1.7.1-fix-examples-linking.patch | 22 | ||||
-rw-r--r-- | media-libs/simage/simage-1.7.1-r1.ebuild | 5 |
3 files changed, 48 insertions, 23 deletions
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/simage-1.7.1-r1.ebuild b/media-libs/simage/simage-1.7.1-r1.ebuild index e6405b2179ab..5117be12735c 100644 --- a/media-libs/simage/simage-1.7.1-r1.ebuild +++ b/media-libs/simage/simage-1.7.1-r1.ebuild @@ -38,7 +38,10 @@ 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}-disable-gif-quantize-buffer.patch" ) |