<commit_before>macro(superbuild_package)
  cmake_parse_arguments(PKG  "" "STAGE_DIR;XDK" "SEARCHDIRS" ${ARGN} )

  if(APPLE)
    set(loader_program_names otool)
    set(LOADER_PROGRAM_ARGS "-l")
  else()
    set(loader_program_names objdump)
    set(LOADER_PROGRAM_ARGS "-p")
  endif()
  find_program(LOADER_PROGRAM "${loader_program_names}")
  if(NOT EXISTS ${LOADER_PROGRAM})
    message(FATAL_ERROR "${loader_program_names} not found. please check LOADER_PROGRAM variable is set correctly")
  endif()

  include(GetPrerequisites)

  #CMAKE_INSTALL_PREFIX -> SB_INSTALL_PREFIX
  #"${PKG_MXEROOT}/usr/x86_64-w64-mingw32.shared/bin")

  #a helper variable. rethink
  set(DEPENDENCIES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
  set(OTB_APPLICATIONS_DIR "${OTB_INSTALL_DIR}/lib/otb/applications")

  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/bin") #exe
  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib") #so
  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib/otb") #mvd so
  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib/otb/applications") #otb apps

  empty_package_staging_directory()

  file(WRITE
    ${CMAKE_BINARY_DIR}/make_symlinks
    "#!/bin/sh\n")

  set(PKG_PEFILES)
  #NOTE: VAR_IN_PKGSETUP_CONFIGURE is copied to linux_pkgsetup.in during configure_file
  set(VAR_IN_PKGSETUP_CONFIGURE)
  set(PKG_SO_FILES)
  configure_package()

  ############# install client configure script ################

  set(PKGSETUP_IN_FILENAME linux_pkgsetup.in)
  if(APPLE)
    set(PKGSETUP_IN_FILENAME osx_pkgsetup.in)
  endif()
  configure_file(${PACKAGE_SUPPORT_FILES_DIR}/${PKGSETUP_IN_FILENAME}
    ${CMAKE_BINARY_DIR}/pkgsetup @ONLY)

  install(FILES
    ${CMAKE_BINARY_DIR}/pkgsetup
    ${CMAKE_BINARY_DIR}/make_symlinks
    DESTINATION ${PKG_STAGE_DIR}
    PERMISSIONS
    OWNER_READ OWNER_WRITE OWNER_EXECUTE
    GROUP_READ GROUP_EXECUTE
    WORLD_READ WORLD_EXECUTE)

  ####################### install patchelf #####################
  install(FILES ${CMAKE_INSTALL_PREFIX}/tools/patchelf
    DESTINATION ${PKG_STAGE_DIR}/tools
    PERMISSIONS
    OWNER_EXECUTE OWNER_WRITE OWNER_READ
    GROUP_EXECUTE GROUP_READ)

  if(PKG_XDK)
    install_xdk_files()
  endif()

endmacro(superbuild_package)

function(process_deps infile)

  if(APPLE)
    if( "${infile}" MATCHES "@rpath")
      string(REGEX REPLACE "@rpath." "" infile "${infile}")
    endif()<commit_msg>PKG: skip installation of patchelf on osx<commit_after>macro(superbuild_package)
  cmake_parse_arguments(PKG  "" "STAGE_DIR;XDK" "SEARCHDIRS" ${ARGN} )

  if(APPLE)
    set(loader_program_names otool)
    set(LOADER_PROGRAM_ARGS "-l")
  else()
    set(loader_program_names objdump)
    set(LOADER_PROGRAM_ARGS "-p")
  endif()
  find_program(LOADER_PROGRAM "${loader_program_names}")
  if(NOT EXISTS ${LOADER_PROGRAM})
    message(FATAL_ERROR "${loader_program_names} not found. please check LOADER_PROGRAM variable is set correctly")
  endif()

  include(GetPrerequisites)

  #CMAKE_INSTALL_PREFIX -> SB_INSTALL_PREFIX
  #"${PKG_MXEROOT}/usr/x86_64-w64-mingw32.shared/bin")

  #a helper variable. rethink
  set(DEPENDENCIES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
  set(OTB_APPLICATIONS_DIR "${OTB_INSTALL_DIR}/lib/otb/applications")

  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/bin") #exe
  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib") #so
  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib/otb") #mvd so
  list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib/otb/applications") #otb apps

  empty_package_staging_directory()

  file(WRITE
    ${CMAKE_BINARY_DIR}/make_symlinks
    "#!/bin/sh\n")

  set(PKG_PEFILES)
  #NOTE: VAR_IN_PKGSETUP_CONFIGURE is copied to linux_pkgsetup.in during configure_file
  set(VAR_IN_PKGSETUP_CONFIGURE)
  set(PKG_SO_FILES)
  configure_package()

  ############# install client configure script ################

  set(PKGSETUP_IN_FILENAME linux_pkgsetup.in)
  if(APPLE)
    set(PKGSETUP_IN_FILENAME osx_pkgsetup.in)
  endif()
  configure_file(${PACKAGE_SUPPORT_FILES_DIR}/${PKGSETUP_IN_FILENAME}
    ${CMAKE_BINARY_DIR}/pkgsetup @ONLY)

  install(FILES
    ${CMAKE_BINARY_DIR}/pkgsetup
    ${CMAKE_BINARY_DIR}/make_symlinks
    DESTINATION ${PKG_STAGE_DIR}
    PERMISSIONS
    OWNER_READ OWNER_WRITE OWNER_EXECUTE
    GROUP_READ GROUP_EXECUTE
    WORLD_READ WORLD_EXECUTE)

  if(UNIX)
    if(NOT APPLE)
      ####################### install patchelf #####################
      install(FILES ${CMAKE_INSTALL_PREFIX}/tools/patchelf
        DESTINATION ${PKG_STAGE_DIR}/tools
        PERMISSIONS
        OWNER_EXECUTE OWNER_WRITE OWNER_READ
        GROUP_EXECUTE GROUP_READ)
    endif()
  endif()

  if(PKG_XDK)
    install_xdk_files()
  endif()

endmacro(superbuild_package)

function(process_deps infile)

  if(APPLE)
    if( "${infile}" MATCHES "@rpath")
      string(REGEX REPLACE "@rpath." "" infile "${infile}")
    endif()
{'fraction_non_alphanumeric': 0.13168134343641205, 'fraction_numerical': 0.0032766741757116525, 'mean_word_length': 5.3264248704663215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4134637', 'n_tokens_mistral': 1982, 'n_tokens_neox': 1802, 'n_words': 278}