Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
refactor system package function names in build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Feb 28, 2020
1 parent 4c86999 commit 6fc1ed0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions build/android-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ Cflags: -I\${includedir}
EOF
}

create_zlib_package_config() {
create_zlib_system_package_config() {
ZLIB_VERSION=$(grep '#define ZLIB_VERSION' ${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot/usr/include/zlib.h | grep -Eo '\".*\"' | sed -e 's/\"//g')

cat > "${INSTALL_PKG_CONFIG_DIR}/zlib.pc" << EOF
Expand Down Expand Up @@ -1033,7 +1033,7 @@ set_toolchain_clang_paths() {
fi

if [ ! -f ${ZLIB_PACKAGE_CONFIG_PATH} ]; then
create_zlib_package_config
create_zlib_system_package_config
fi

prepare_inline_sed
Expand Down
16 changes: 8 additions & 8 deletions build/ios-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ Cflags: -I\${includedir}
EOF
}

create_libiconv_package_config() {
create_libiconv_system_package_config() {
local LIB_ICONV_VERSION=$(grep '_LIBICONV_VERSION' ${SDK_PATH}/usr/include/iconv.h | grep -Eo '0x.*' | grep -Eo '.* ')

cat > "${INSTALL_PKG_CONFIG_DIR}/libiconv.pc" << EOF
Expand Down Expand Up @@ -811,7 +811,7 @@ Cflags: -I\${includedir}
EOF
}

create_uuid_system_package_config() {
create_libuuid_system_package_config() {
local UUID_VERSION="$1"

cat > "${INSTALL_PKG_CONFIG_DIR}/uuid.pc" << EOF
Expand Down Expand Up @@ -848,7 +848,7 @@ Cflags: -I\${includedir}
EOF
}

create_zlib_package_config() {
create_zlib_system_package_config() {
ZLIB_VERSION=$(grep '#define ZLIB_VERSION' ${SDK_PATH}/usr/include/zlib.h | grep -Eo '\".*\"' | sed -e 's/\"//g')

cat > "${INSTALL_PKG_CONFIG_DIR}/zlib.pc" << EOF
Expand All @@ -867,7 +867,7 @@ Cflags: -I\${includedir}
EOF
}

create_bzip2_package_config() {
create_bzip2_system_package_config() {
BZIP2_VERSION=$(grep -Eo 'version.*of' ${SDK_PATH}/usr/include/bzlib.h | sed -e 's/of//;s/version//g;s/\ //g')

cat > "${INSTALL_PKG_CONFIG_DIR}/bzip2.pc" << EOF
Expand Down Expand Up @@ -1082,19 +1082,19 @@ set_toolchain_clang_paths() {
fi

if [ ! -f ${ZLIB_PACKAGE_CONFIG_PATH} ]; then
create_zlib_package_config
create_zlib_system_package_config
fi

if [ ! -f ${LIB_ICONV_PACKAGE_CONFIG_PATH} ]; then
create_libiconv_package_config
create_libiconv_system_package_config
fi

if [ ! -f ${BZIP2_PACKAGE_CONFIG_PATH} ]; then
create_bzip2_package_config
create_bzip2_system_package_config
fi

if [ ! -f ${LIB_UUID_PACKAGE_CONFIG_PATH} ]; then
create_uuid_system_package_config
create_libuuid_system_package_config
fi

prepare_inline_sed
Expand Down
12 changes: 6 additions & 6 deletions build/tvos-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ Cflags: -I\${includedir}
EOF
}

create_libiconv_package_config() {
create_libiconv_system_package_config() {
local LIB_ICONV_VERSION=$(grep '_LIBICONV_VERSION' ${SDK_PATH}/usr/include/iconv.h | grep -Eo '0x.*' | grep -Eo '.* ')

cat > "${INSTALL_PKG_CONFIG_DIR}/libiconv.pc" << EOF
Expand Down Expand Up @@ -810,7 +810,7 @@ Cflags: -I\${includedir}
EOF
}

create_zlib_package_config() {
create_zlib_system_package_config() {
ZLIB_VERSION=$(grep '#define ZLIB_VERSION' ${SDK_PATH}/usr/include/zlib.h | grep -Eo '\".*\"' | sed -e 's/\"//g')

cat > "${INSTALL_PKG_CONFIG_DIR}/zlib.pc" << EOF
Expand All @@ -829,7 +829,7 @@ Cflags: -I\${includedir}
EOF
}

create_bzip2_package_config() {
create_bzip2_system_package_config() {
BZIP2_VERSION=$(grep -Eo 'version.*of' ${SDK_PATH}/usr/include/bzlib.h | sed -e 's/of//;s/version//g;s/\ //g')

cat > "${INSTALL_PKG_CONFIG_DIR}/bzip2.pc" << EOF
Expand Down Expand Up @@ -1036,15 +1036,15 @@ set_toolchain_clang_paths() {
fi

if [ ! -f ${ZLIB_PACKAGE_CONFIG_PATH} ]; then
create_zlib_package_config
create_zlib_system_package_config
fi

if [ ! -f ${LIB_ICONV_PACKAGE_CONFIG_PATH} ]; then
create_libiconv_package_config
create_libiconv_system_package_config
fi

if [ ! -f ${BZIP2_PACKAGE_CONFIG_PATH} ]; then
create_bzip2_package_config
create_bzip2_system_package_config
fi

prepare_inline_sed
Expand Down

0 comments on commit 6fc1ed0

Please sign in to comment.