Re: git: 2c5855d64ff7 - main - graphics/libavif: Remove bundled libraries

From: Craig Leres <leres_at_freebsd.org>
Date: Thu, 20 Mar 2025 16:56:00 UTC
On 3/19/25 10:37, Craig Leres wrote:
> On 3/18/25 20:57, Po-Chuan Hsieh wrote:
>> The branch main has been updated by sunpoet:
>>
>> URL: https://cgit.FreeBSD.org/ports/commit/? 
>> id=2c5855d64ff7c8459a3bf90cb138f51a8e860803
>>
>> commit 2c5855d64ff7c8459a3bf90cb138f51a8e860803
>> Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
>> AuthorDate: 2025-03-19 03:37:02 +0000
>> Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
>> CommitDate: 2025-03-19 03:37:02 +0000
>>
>>      graphics/libavif: Remove bundled libraries
>> ---
>>   graphics/libavif/Makefile | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/graphics/libavif/Makefile b/graphics/libavif/Makefile
>> index aa8cb4860aa5..a44f1f1405a2 100644
>> --- a/graphics/libavif/Makefile
>> +++ b/graphics/libavif/Makefile
>> @@ -73,4 +73,8 @@ SVTAV1_CMAKE_OFF=    -DAVIF_CODEC_SVT:STRING=OFF
>>   SVTAV1_CMAKE_ON=    -DAVIF_CODEC_SVT:STRING=SYSTEM
>>   SVTAV1_LIB_DEPENDS=    libSvtAv1Enc.so:multimedia/svt-av1
>> +post-patch:
>> +# Clean up bundled libraries
>> +    @${RM} -r ${WRKSRC}/third_party/libyuv/
>> +
>>   .include <bsd.port.mk>
> 
> This change breaks configuring for me.
> 
>          Craig
> 
> CMake Error at CMakeLists.txt:434 (target_sources):
>    Cannot find source file:
> 
>      third_party/libyuv/source/scale.c
> 
>    Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
>    .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
>    .f95 .f03 .hip .ispc
> 
> 
> -- Generating done (0.1s)
> CMake Warning:
>    Manually-specified variables were not used by the project:
> 
>      CMAKE_COLOR_MAKEFILE
>      CMAKE_MODULE_LINKER_FLAGS
>      CMAKE_VERBOSE_MAKEFILE
> 
> 
> CMake Generate step failed.  Build files cannot be regenerated correctly.
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/ports/graphics/libavif
> 
> ===========================================================================
> # CMakeLists.txt:
> 
>      433 if(NOT AVIF_LIBYUV_ENABLED)
>      434     target_sources(
>      435         avif_obj
>      436         PRIVATE third_party/libyuv/source/scale.c third_party/ 
> libyuv/source/scale_common.c third_party/libyuv/
> source/scale_any.c
>      437                 third_party/libyuv/source/row_common.c 
> third_party/libyuv/source/planar_functions.c
>      438     )
>      439     if(DEFINED ANDROID_ABI OR DEFINED APPLE)
>      440         # When building third_party/libyuv/source/scale.c, some 
> functions use
>      441         # some of the parameters only inside an assert 
> statement. This causes
>      442         # unused parameter warnings when building for Android. 
> Suppress the
>      443         # warning in that case.
>      444         target_compile_options(avif_obj PRIVATE -Wno-unused- 
> parameter)
>      445     endif()
>      446 endif()
>

To be clear, the last change breaks building with LIBYUV off.

		Craig