diff --git a/ports/aom/aom-install.diff b/ports/aom/aom-install.diff deleted file mode 100644 index e24b8c536e..0000000000 --- a/ports/aom/aom-install.diff +++ /dev/null @@ -1,75 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 18190f647..f4b1b359d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -23,6 +23,9 @@ endif() - - project(AOM C CXX) - -+include(GNUInstallDirs) -+include(CMakePackageConfigHelpers) -+ - # GENERATED source property global visibility. - if(POLICY CMP0118) - cmake_policy(SET CMP0118 NEW) -@@ -302,6 +305,52 @@ if(BUILD_SHARED_LIBS) - set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_static) - endif() - -+set(PUBLIC_HEADERS -+ aom/aom.h -+ aom/aom_codec.h -+ aom/aom_decoder.h -+ aom/aom_encoder.h -+ aom/aom_frame_buffer.h -+ aom/aom_image.h -+ aom/aom_integer.h -+ aom/aomcx.h -+ aom/aomdx.h -+) -+ -+set_target_properties(aom PROPERTIES -+ PUBLIC_HEADER "${PUBLIC_HEADERS}") -+ -+ -+target_include_directories(aom -+ PUBLIC $ -+ $) -+ -+install(TARGETS aom -+ EXPORT unofficial-aom-targets -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aom") -+ -+install(EXPORT unofficial-aom-targets -+ FILE unofficial-aom-targets.cmake -+ NAMESPACE unofficial:: -+ DESTINATION lib/cmake/aom) -+ -+configure_package_config_file(cmake/aom-config.cmake.in -+ ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake -+ INSTALL_DESTINATION lib/cmake/aom -+ NO_SET_AND_CHECK_MACRO -+ NO_CHECK_REQUIRED_COMPONENTS_MACRO) -+ -+write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake -+ VERSION ${SO_FILE_VERSION} -+ COMPATIBILITY SameMajorVersion) -+ -+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake -+ ${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake -+ DESTINATION lib/cmake/aom) -+ - # Setup dependencies. - if(CONFIG_THREE_PASS) - setup_ivf_dec_targets() -diff --git a/cmake/aom-config.cmake.in b/cmake/aom-config.cmake.in -new file mode 100644 -index 000000000..91cac3b5b ---- /dev/null -+++ b/cmake/aom-config.cmake.in -@@ -0,0 +1,2 @@ -+@PACKAGE_INIT@ -+include(${CMAKE_CURRENT_LIST_DIR}/unofficial-aom-targets.cmake) diff --git a/ports/aom/export-config.diff b/ports/aom/export-config.diff new file mode 100644 index 0000000000..8e2f3ac976 --- /dev/null +++ b/ports/aom/export-config.diff @@ -0,0 +1,36 @@ +diff --git a/build/cmake/aom_install.cmake b/build/cmake/aom_install.cmake +index 2c263e9..fc9c2ca 100644 +--- a/build/cmake/aom_install.cmake ++++ b/build/cmake/aom_install.cmake +@@ -91,8 +91,31 @@ macro(setup_aom_install_targets) + install(FILES "${AOM_PKG_CONFIG_FILE}" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + install(TARGETS ${AOM_INSTALL_LIBS};${AOM_INSTALL_BINS} ++ EXPORT unofficial-aom-targets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ target_include_directories(aom PUBLIC $) ++ install(EXPORT unofficial-aom-targets ++ FILE unofficial-aom-targets.cmake ++ NAMESPACE unofficial:: ++ DESTINATION share/aom) ++ include(CMakePackageConfigHelpers) ++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake.in [[ ++@PACKAGE_INIT@ ++include(CMakeFindDependencyMacro) ++set(THREADS_PREFER_PTHREAD_FLAG ON) ++find_dependency(Threads) ++include("${CMAKE_CURRENT_LIST_DIR}/unofficial-aom-targets.cmake") ++]]) ++ configure_package_config_file(${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake ++ INSTALL_DESTINATION lib/cmake/aom ++ NO_SET_AND_CHECK_MACRO ++ NO_CHECK_REQUIRED_COMPONENTS_MACRO) ++ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake ++ VERSION ${SO_FILE_VERSION} ++ COMPATIBILITY SameMajorVersion) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake ++ DESTINATION share/aom) + endif() + endmacro() diff --git a/ports/aom/portfile.cmake b/ports/aom/portfile.cmake index 9bfad69108..b70e2ac986 100644 --- a/ports/aom/portfile.cmake +++ b/ports/aom/portfile.cmake @@ -1,24 +1,17 @@ -# NASM is required to build AOM -vcpkg_find_acquire_program(NASM) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -vcpkg_add_to_path(${NASM_EXE_PATH}) - -# Perl is required to build AOM -vcpkg_find_acquire_program(PERL) -get_filename_component(PERL_PATH ${PERL} DIRECTORY) -vcpkg_add_to_path(${PERL_PATH}) - vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL "https://aomedia.googlesource.com/aom" - REF bb6430482199eaefbeaaa396600935082bc43f66 + REF 8ad484f8a18ed1853c094e7d3a4e023b2a92df28 # v3.9.1 + HEAD_REF main PATCHES aom-rename-static.diff aom-uninitialized-pointer.diff - # Can be dropped when https://bugs.chromium.org/p/aomedia/issues/detail?id=3029 is merged into the upstream - aom-install.diff + export-config.diff ) +vcpkg_find_acquire_program(NASM) +vcpkg_find_acquire_program(PERL) + set(aom_target_cpu "") if(VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "^arm")) # UWP + aom's assembler files result in weirdness and build failures @@ -27,7 +20,7 @@ if(VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE endif() if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_TARGET_IS_LINUX) - set(aom_target_cpu "-DENABLE_NEON=OFF") + set(aom_target_cpu "-DENABLE_NEON=OFF") endif() vcpkg_cmake_configure( @@ -39,29 +32,26 @@ vcpkg_cmake_configure( -DENABLE_TESTDATA=OFF -DENABLE_TESTS=OFF -DENABLE_TOOLS=OFF + -DTHREADS_PREFER_PTHREAD_FLAGS=ON + "-DCMAKE_ASM_NASM_COMPILER=${NASM}" + "-DPERL_EXECUTABLE=${PERL}" ) vcpkg_cmake_install() - +vcpkg_cmake_config_fixup() vcpkg_copy_pdbs() - vcpkg_fixup_pkgconfig() -if(VCPKG_TARGET_IS_WINDOWS) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/aom.pc" " -lm" "") - if(NOT VCPKG_BUILD_TYPE) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/aom.pc" " -lm" "") - endif() +if(VCPKG_TARGET_IS_WINDOWS AND NOT VPCKG_TARGET_IS_MINGW) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/aom.pc" " -lm" "") + if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/aom.pc" " -lm" "") + endif() endif() -# Move cmake configs -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) -# Remove duplicate files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_fixup_pkgconfig() +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aom/vcpkg.json b/ports/aom/vcpkg.json index a3dcb6f607..4d29e3feef 100644 --- a/ports/aom/vcpkg.json +++ b/ports/aom/vcpkg.json @@ -1,7 +1,6 @@ { "name": "aom", - "version-semver": "3.8.1", - "port-version": 1, + "version-semver": "3.9.1", "description": "AV1 codec library", "homepage": "https://aomedia.googlesource.com/aom", "license": "BSD-2-Clause", diff --git a/versions/a-/aom.json b/versions/a-/aom.json index 0a8a2e292f..dc324ffece 100644 --- a/versions/a-/aom.json +++ b/versions/a-/aom.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "29d864e5f5c61978785ca554e8efcd1d9642010b", + "version-semver": "3.9.1", + "port-version": 0 + }, { "git-tree": "827f4b94a5792e8fadee085ce2542979d42436c9", "version-semver": "3.8.1", diff --git a/versions/baseline.json b/versions/baseline.json index 0e42895246..21662d7319 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -153,8 +153,8 @@ "port-version": 2 }, "aom": { - "baseline": "3.8.1", - "port-version": 1 + "baseline": "3.9.1", + "port-version": 0 }, "apache-datasketches": { "baseline": "5.0.2",