2024-06-13 05:32:20 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
|
|
URLS "https://sourceware.org/pub/elfutils/${VERSION}/elfutils-${VERSION}.tar.bz2"
|
|
|
|
"https://www.mirrorservice.org/sites/sourceware.org/pub/elfutils/${VERSION}/elfutils-${VERSION}.tar.bz2"
|
|
|
|
FILENAME "elfutils-${VERSION}.tar.bz2"
|
|
|
|
SHA512 e22d85f25317a79b36d370347e50284c9120c86f9830f08791b7b6a7b4ad89b9bf4c7c71129133b8d193a0edffb2a2c17987b7e48428b9670aff5ce918777e04
|
|
|
|
)
|
2020-12-02 06:03:02 +08:00
|
|
|
|
2024-06-13 05:32:20 +08:00
|
|
|
vcpkg_extract_source_archive(SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
|
|
|
PATCHES
|
|
|
|
disable-werror.diff
|
|
|
|
link-libs.diff
|
|
|
|
rpath-link.diff
|
|
|
|
static-tools.diff
|
2020-12-02 06:03:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_find_acquire_program(FLEX)
|
|
|
|
get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY )
|
|
|
|
vcpkg_add_to_path(PREPEND "${FLEX_DIR}")
|
|
|
|
vcpkg_find_acquire_program(BISON)
|
|
|
|
get_filename_component(BISON_DIR "${BISON}" DIRECTORY )
|
|
|
|
vcpkg_add_to_path(PREPEND "${BISON_DIR}")
|
|
|
|
|
2024-06-13 05:32:20 +08:00
|
|
|
set(options "")
|
|
|
|
|
|
|
|
if(NOT "libdebuginfod" IN_LIST FEATURES)
|
|
|
|
list(APPEND options "--enable-libdebuginfod=no")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("nls" IN_LIST FEATURES)
|
|
|
|
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
|
|
|
|
else()
|
|
|
|
set(ENV{AUTOPOINT} true) # the program
|
|
|
|
list(APPEND options "--enable-nls=no")
|
|
|
|
endif()
|
|
|
|
|
2020-12-02 06:03:02 +08:00
|
|
|
vcpkg_configure_make(
|
2024-06-13 05:32:20 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-12-02 06:03:02 +08:00
|
|
|
AUTOCONFIG
|
2024-06-13 05:32:20 +08:00
|
|
|
OPTIONS
|
|
|
|
${options}
|
|
|
|
--enable-debuginfod=no
|
|
|
|
--with-bzlib
|
|
|
|
--with-lzma
|
|
|
|
--with-zlib
|
|
|
|
--with-zstd
|
2020-12-02 06:03:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_make()
|
2024-06-13 05:32:20 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2020-12-02 06:03:02 +08:00
|
|
|
|
2024-06-13 05:32:20 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/etc"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/etc/debuginfod"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug"
|
|
|
|
)
|
2020-12-02 06:03:02 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2024-06-13 05:32:20 +08:00
|
|
|
set(wrong_suffix "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}")
|
2021-12-17 14:56:56 +08:00
|
|
|
else()
|
2024-06-13 05:32:20 +08:00
|
|
|
set(wrong_suffix "${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
|
2020-12-02 06:03:02 +08:00
|
|
|
endif()
|
2024-06-13 05:32:20 +08:00
|
|
|
file(GLOB wrong_libs
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/*${wrong_suffix}"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/*${wrong_suffix}.*"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/*${wrong_suffix}"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/*${wrong_suffix}.*"
|
|
|
|
)
|
|
|
|
file(REMOVE ${wrong_libs})
|
2020-12-02 06:03:02 +08:00
|
|
|
|
2024-06-13 05:32:20 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/eu-make-debug-archive" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../..")
|
|
|
|
if("libdebuginfod" IN_LIST FEATURES)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/etc/profile.d/debuginfod.sh" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../..")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/etc/profile.d/debuginfod.csh" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../..")
|
2020-12-02 06:03:02 +08:00
|
|
|
endif()
|
2024-06-13 05:32:20 +08:00
|
|
|
|
|
|
|
vcpkg_install_copyright(
|
|
|
|
COMMENT [[
|
|
|
|
The libraries are subject to LGPL-3.0-or-later OR GPL-2.0-or-later (cf. COPYING-LGPLV3, COPYING-GPLV2).
|
|
|
|
The tools are subject to GPL-3.0-or-later (cf. COPYING).
|
|
|
|
For additional terms, see the following source files:
|
|
|
|
- doc/readelf.1 (GFDL-NIV-1.3)
|
|
|
|
- lib/stdatomic-fbsd.h (BSD-2-Clause)
|
|
|
|
- libcpu/i386_parse.* (GPL-3+ with Bison exception)
|
|
|
|
- libelf/dl-hash.h (LGPL-2.1+)
|
|
|
|
- libelf/elf.h (LGPL-2.1+)
|
|
|
|
]]
|
|
|
|
FILE_LIST
|
|
|
|
"${SOURCE_PATH}/COPYING-LGPLV3"
|
|
|
|
"${SOURCE_PATH}/COPYING"
|
|
|
|
"${SOURCE_PATH}/COPYING-GPLV2"
|
|
|
|
)
|