Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions l/libclang/build_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"maintainer": "vinodk99",
"maintainer": "shivansh-ibm",
"package_name": "libclang",
"github_url": "https://github.com/sighingnow/libclang.git",
"version": "llvm-18.1.1",
Expand All @@ -11,6 +11,9 @@
"use_non_root_user": false,
"wheel_build" : true,
"*": {
"build_script": "libclang_ubi_9.3.sh"
"build_script": [
"libclang_ubi_9.3.sh",
"libclang_ubi_10.1.sh"
]
}
}
}
69 changes: 69 additions & 0 deletions l/libclang/libclang_ubi_10.1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : libclang
# Version : llvm-18.1.1
# Source repo : https://github.com/sighingnow/libclang.git
# Tested on : UBI:10.1
# Language : Python
# Ci-Check : True
# Script License : Apache License, Version 2 or later
# Maintainer : Shivansh Sharma <Shivansh.S1@ibm.com>
#
# Disclaimer : This script has been tested in root mode on given
# ========== platform using the mentioned version of the package.
# It may not work as expected with newer versions of the
# package and/or distribution. In such case, please
# contact "Maintainer" of this script.
#
# ---------------------------------------------------------------------------

# Variables
PACKAGE_NAME=libclang
PACKAGE_VERSION=${1:-llvm-18.1.1}
PACKAGE_URL=https://github.com/sighingnow/libclang.git
PACKAGE_DIR=libclang
CURRENT_DIR="${PWD}"

# Install necessary system dependencies
yum install -y git gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc-gfortran make wget llvm-devel clang-devel openssl-devel bzip2-devel libffi-devel zlib-devel python3.12-devel python3.12-pip cmake clang

source /opt/rh/gcc-toolset-15/enable
export PATH=/opt/rh/gcc-toolset-15/root/usr/bin:$PATH
export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-15/root/usr/lib64:$LD_LIBRARY_PATH

# Clone the repository
git clone $PACKAGE_URL
cd $PACKAGE_NAME
git checkout $PACKAGE_VERSION

# Check if Rust is installed
if ! command -v rustc &> /dev/null; then
echo "Rust not found. Installing Rust..."
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
else
echo "Rust is already installed."
fi

# Install additional Python dependencies
python3.12 -m pip install pytest setuptools tox wheel

# Install the package
if ! python3.12 -m pip install . ; then
echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
exit 1
fi

# Building wheel with script itself as the wheel need to create with ppc64le arch.
if ! python3.12 setup.py bdist_wheel --plat-name manylinux2014_ppc64le --dist-dir="$CURRENT_DIR"; then
echo "------------------$PACKAGE_NAME: Wheel Build Failed ---------------------"
exit 2
else
echo "------------------$PACKAGE_NAME: Wheel Build Success -------------------------"
exit 0
fi

# No tests to run for this package
Loading