2022-02-05 14:23:32 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
|
|
|
|
|
|
|
|
PKG_NAME="lib32"
|
2023-04-28 12:16:27 +00:00
|
|
|
PKG_VERSION="$(date +%s)"
|
2023-03-04 19:15:34 +00:00
|
|
|
PKG_ARCH="aarch64 x86_64"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_LICENSE="GPLv2"
|
|
|
|
PKG_DEPENDS_TARGET="toolchain retroarch SDL2 libsndfile libmodplug"
|
|
|
|
PKG_SHORTDESC="ARM 32bit bundle for aarch64"
|
|
|
|
PKG_PRIORITY="optional"
|
|
|
|
PKG_TOOLCHAIN="manual"
|
|
|
|
|
|
|
|
makeinstall_target() {
|
2023-03-04 19:15:34 +00:00
|
|
|
|
|
|
|
case ${TARGET_ARCH} in
|
|
|
|
aarch64)
|
|
|
|
LIBARCH="arm"
|
|
|
|
LDSO="ld-linux-armhf.so.3"
|
|
|
|
;;
|
|
|
|
x86_64)
|
2023-03-05 01:50:26 +00:00
|
|
|
LIBARCH="i686"
|
2023-03-04 19:15:34 +00:00
|
|
|
LDSO="ld-linux.so.2"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
cd ${PKG_BUILD}
|
2023-03-04 19:15:34 +00:00
|
|
|
LIBROOT="${ROOT}/build.${DISTRO}-${DEVICE}.${LIBARCH}/image/system/"
|
|
|
|
mkdir -p ${INSTALL}/usr/lib32
|
|
|
|
rsync -al ${LIBROOT}/usr/lib/* ${INSTALL}/usr/lib32 >/dev/null 2>&1
|
|
|
|
chmod -f 0755 ${INSTALL}/usr/lib32/* || :
|
2022-02-05 14:23:32 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/lib
|
2023-03-04 19:15:34 +00:00
|
|
|
ln -s /usr/lib32/${LDSO} ${INSTALL}/usr/lib/${LDSO}
|
2022-07-30 23:34:43 +00:00
|
|
|
|
|
|
|
mkdir -p "${INSTALL}/etc/ld.so.conf.d"
|
2023-03-04 19:15:34 +00:00
|
|
|
echo "/usr/lib32" > "${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32.conf"
|
|
|
|
echo "/usr/lib32/pulseaudio" >"${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32-pulseaudio.conf"
|
|
|
|
|
2022-09-10 15:18:34 +00:00
|
|
|
if [ -d "${LIBROOT}/usr/lib/dri" ]
|
|
|
|
then
|
2023-03-04 19:15:34 +00:00
|
|
|
echo "/usr/lib32/dri" >"${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32-dri.conf"
|
2022-09-10 15:18:34 +00:00
|
|
|
fi
|
2023-03-03 22:30:22 +00:00
|
|
|
if [ -d "${LIBROOT}/usr/lib/gl4es" ]
|
|
|
|
then
|
2023-03-04 19:15:34 +00:00
|
|
|
echo "/usr/lib/gl4es" >"${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32-gl4es.conf"
|
2023-03-03 22:30:22 +00:00
|
|
|
fi
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|