nixpkgs/pkgs/by-name/li/libaom/outputs.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

70 lines
3.4 KiB
Diff

diff --git a/build/cmake/aom_install.cmake b/build/cmake/aom_install.cmake
index 0bd2bf035..5cf5acea8 100644
--- a/build/cmake/aom_install.cmake
+++ b/build/cmake/aom_install.cmake
@@ -42,8 +42,8 @@ macro(setup_aom_install_targets)
-DAOM_ROOT=${AOM_ROOT}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}
- -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
+ -DCMAKE_INSTALL_FULL_INCLUDEDIR=${CMAKE_INSTALL_FULL_INCLUDEDIR}
+ -DCMAKE_INSTALL_FULL_LIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
-DCMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME}
-DCONFIG_MULTITHREAD=${CONFIG_MULTITHREAD}
-DCONFIG_TUNE_VMAF=${CONFIG_TUNE_VMAF}
@@ -84,12 +84,12 @@ macro(setup_aom_install_targets)
# Setup the install rules. install() will automatically prepend
# CMAKE_INSTALL_PREFIX to relative paths
install(FILES ${AOM_INSTALL_INCS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aom")
+ DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/aom")
install(FILES "${AOM_PKG_CONFIG_FILE}"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+ DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
install(TARGETS ${AOM_INSTALL_LIBS};${AOM_INSTALL_BINS}
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
endif()
endmacro()
diff --git a/build/cmake/pkg_config.cmake b/build/cmake/pkg_config.cmake
index e8fff2e77..b8a73aad4 100644
--- a/build/cmake/pkg_config.cmake
+++ b/build/cmake/pkg_config.cmake
@@ -11,8 +11,8 @@
cmake_minimum_required(VERSION 3.5)
set(REQUIRED_ARGS "AOM_ROOT" "AOM_CONFIG_DIR" "CMAKE_INSTALL_PREFIX"
- "CMAKE_INSTALL_BINDIR" "CMAKE_INSTALL_INCLUDEDIR"
- "CMAKE_INSTALL_LIBDIR" "CMAKE_PROJECT_NAME"
+ "CMAKE_INSTALL_BINDIR" "CMAKE_INSTALL_FULL_INCLUDEDIR"
+ "CMAKE_INSTALL_FULL_LIBDIR" "CMAKE_PROJECT_NAME"
"CONFIG_MULTITHREAD")
foreach(arg ${REQUIRED_ARGS})
@@ -35,15 +35,15 @@ else()
endif()
# Write pkg-config info.
-set(prefix "${CMAKE_INSTALL_PREFIX}")
-set(bindir "${CMAKE_INSTALL_BINDIR}")
-set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
-set(libdir "${CMAKE_INSTALL_LIBDIR}")
+get_filename_component(prefix "${CMAKE_INSTALL_FULL_INCLUDEDIR}" DIRECTORY)
+get_filename_component(exec_prefix "${CMAKE_INSTALL_FULL_LIBDIR}" DIRECTORY)
+get_filename_component(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}" NAME)
+get_filename_component(libdir "${CMAKE_INSTALL_FULL_LIBDIR}" NAME)
set(pkgconfig_file "${AOM_CONFIG_DIR}/aom.pc")
string(TOLOWER ${CMAKE_PROJECT_NAME} pkg_name)
file(WRITE "${pkgconfig_file}" "# libaom pkg-config.\n")
file(APPEND "${pkgconfig_file}" "prefix=${prefix}\n")
-file(APPEND "${pkgconfig_file}" "exec_prefix=\${prefix}\n")
+file(APPEND "${pkgconfig_file}" "exec_prefix=${exec_prefix}\n")
file(APPEND "${pkgconfig_file}" "includedir=\${prefix}/${includedir}\n")
file(APPEND "${pkgconfig_file}" "libdir=\${exec_prefix}/${libdir}\n\n")
file(APPEND "${pkgconfig_file}" "Name: ${pkg_name}\n")