Skip to content

Commit

Permalink
Add libedit and swig for lldb
Browse files Browse the repository at this point in the history
  • Loading branch information
adonis0147 committed Apr 12, 2023
1 parent 58e4e1c commit 325d9a7
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
2 changes: 2 additions & 0 deletions devel/downloads/download_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ function main() {
download 'zstd' "${ZSTD_PACKAGE_URL}" "${ZSTD_PACKAGE_SHA256SUM}" "${ZSTD_PACKAGE_NAME}"
download 'cmake' "${CMAKE_PACKAGE_URL}" "${CMAKE_PACKAGE_SHA256SUM}" "${CMAKE_PACKAGE_NAME}"
download 'ccache' "${CCACHE_PACKAGE_URL}" "${CCACHE_PACKAGE_SHA256SUM}" "${CCACHE_PACKAGE_NAME}"
download 'libedit' "${LIBEDIT_PACKAGE_URL}" "${LIBEDIT_PACKAGE_SHA256SUM}" "${LIBEDIT_PACKAGE_NAME}"
download 'libxml2' "${LIBXML2_PACKAGE_URL}" "${LIBXML2_PACKAGE_SHA256SUM}" "${LIBXML2_PACKAGE_NAME}"
download 'swig' "${SWIG_PACKAGE_URL}" "${SWIG_PACKAGE_SHA256SUM}" "${SWIG_PACKAGE_NAME}"
download 'llvm' "${LLVM_PACKAGE_URL}" "${LLVM_PACKAGE_SHA256SUM}" "${LLVM_PACKAGE_NAME}"
}

Expand Down
10 changes: 10 additions & 0 deletions devel/downloads/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ LIBXML2_PACKAGE_SHA256SUM='3f9fb74bb02049f3454892c88d3e57a23e30a88a7d444a8006462
LIBXML2_PACKAGE_NAME='libxml2-2.10.3.tar.gz'
LIBXML2_PACKAGE_EXTRACTED_DIR='libxml2-2.10.3'

SWIG_PACKAGE_URL='https://downloads.sourceforge.net/project/swig/swig/swig-4.1.1/swig-4.1.1.tar.gz'
SWIG_PACKAGE_SHA256SUM='2af08aced8fcd65cdb5cc62426768914bedc735b1c250325203716f78e39ac9b'
SWIG_PACKAGE_NAME='swig-4.1.1.tar.gz'
SWIG_PACKAGE_EXTRACTED_DIR='swig-4.1.1'

LIBEDIT_PACKAGE_URL='https://www.thrysoee.dk/editline/libedit-20221030-3.1.tar.gz'
LIBEDIT_PACKAGE_SHA256SUM='f0925a5adf4b1bf116ee19766b7daa766917aec198747943b1c4edf67a4be2bb'
LIBEDIT_PACKAGE_NAME='libedit-20221030-3.1.tar.gz'
LIBEDIT_PACKAGE_EXTRACTED_DIR='libedit-20221030-3.1'

LLVM_PACKAGE_URL='https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.1/llvm-project-16.0.1.src.tar.xz'
LLVM_PACKAGE_SHA256SUM='ab7e3b95adb88fd5b669ca8c1d3c1e8d2a601c4478290d3ae31d8d70e96f2064'
LLVM_PACKAGE_NAME='llvm-project-16.0.1.src.tar.xz'
Expand Down
49 changes: 47 additions & 2 deletions devel/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ function install_xz() {
tar -zxvf "${XZ_PACKAGE_NAME}"

pushd "${XZ_PACKAGE_EXTRACTED_DIR}" >/dev/null
./configure --prefix="${DEVEL_HOME_PATH}/opt/${package}"
mkdir build
cd build
../configure --prefix="${DEVEL_HOME_PATH}/opt/${package}"
make -j "${NUM_CORES}"
make install
popd >/dev/null
Expand Down Expand Up @@ -558,14 +560,53 @@ function install_ccache() {
log_info 'Success!'
}

function install_libedit() {
local package='libedit'
log_info "Start to install ${package}."
rm -rf "${LIBEDIT_PACKAGE_EXTRACTED_DIR}"
tar -zxvf "${LIBEDIT_PACKAGE_NAME}"

pushd "${LIBEDIT_PACKAGE_EXTRACTED_DIR}" >/dev/null
mkdir build
cd build
CFLAGS="-I${DEVEL_HOME_PATH}/include/ncurses" \
../configure --prefix="${DEVEL_HOME_PATH}/opt/${package}"
make -j "${NUM_CORES}"
make install
popd >/dev/null
setup_package "${package}"

log_info 'Success!'
}

function install_libxml2() {
local package='libxml2'
log_info "Start to install ${package}."
rm -rf "${LIBXML2_PACKAGE_EXTRACTED_DIR}"
tar -zxvf "${LIBXML2_PACKAGE_NAME}"

pushd "${LIBXML2_PACKAGE_EXTRACTED_DIR}" >/dev/null
./autogen.sh --prefix="${DEVEL_HOME_PATH}/opt/${package}"
mkdir build
cd build
../autogen.sh --prefix="${DEVEL_HOME_PATH}/opt/${package}"
make -j "${NUM_CORES}"
make install
popd >/dev/null
setup_package "${package}"

log_info 'Success!'
}

function install_swig() {
local package='swig'
log_info "Start to install ${package}."
rm -rf "${SWIG_PACKAGE_EXTRACTED_DIR}"
tar -zxvf "${SWIG_PACKAGE_NAME}"

pushd "${SWIG_PACKAGE_EXTRACTED_DIR}" >/dev/null
mkdir build
cd build
../configure --prefix="${DEVEL_HOME_PATH}/opt/${package}" --without-pcre
make -j "${NUM_CORES}"
make install
popd >/dev/null
Expand Down Expand Up @@ -609,6 +650,8 @@ EOF
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
-DCOMPILER_RT_USE_LLVM_UNWINDER=ON \
-DTerminfo_LIBRARIES="${DEVEL_HOME_PATH}/lib/libtinfow.so" \
-DCURSES_NEED_WIDE=ON \
${disable_arc4random:+${disable_arc4random}} \
../llvm
make -j "${NUM_CORES}"
Expand Down Expand Up @@ -652,7 +695,9 @@ function install_packages() {
install_neovim
install_cmake
install_ccache
install_libedit
install_libxml2
install_swig
install_llvm
popd >/dev/null
}
Expand Down

0 comments on commit 325d9a7

Please sign in to comment.