2023-07-15 13:39:22 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)
|
|
|
|
|
|
|
|
PKG_NAME="amiberry"
|
|
|
|
PKG_ARCH="aarch64"
|
2023-07-17 11:33:07 +00:00
|
|
|
PKG_VERSION="346d096d8478b1bc489bf36c25c18f2ddb1e8ba3"
|
2023-07-15 13:39:22 +00:00
|
|
|
PKG_LICENSE="GPLv3"
|
|
|
|
PKG_SITE="https://github.com/midwan/amiberry"
|
|
|
|
PKG_URL="${PKG_SITE}.git"
|
|
|
|
PKG_DEPENDS_TARGET="toolchain linux glibc bzip2 zlib SDL2 SDL2_image SDL2_ttf capsimg freetype libxml2 flac libogg mpg123 libpng libmpeg2 libserialport"
|
|
|
|
PKG_LONGDESC="Amiberry is an optimized Amiga emulator for ARM-based boards."
|
|
|
|
GET_HANDLER_SUPPORT="git"
|
|
|
|
PKG_TOOLCHAIN="make"
|
|
|
|
PKG_GIT_CLONE_BRANCH="master"
|
2023-07-17 11:33:07 +00:00
|
|
|
PKG_PATCH_DIRS+=" ${DEVICE}"
|
2023-07-15 13:39:22 +00:00
|
|
|
|
|
|
|
pre_configure_target() {
|
|
|
|
cd ${PKG_BUILD}
|
|
|
|
export SYSROOT_PREFIX=${SYSROOT_PREFIX}
|
|
|
|
AMIBERRY_PLATFORM="PLATFORM=${DEVICE}"
|
2023-07-17 11:33:07 +00:00
|
|
|
|
|
|
|
if [ ! "${OPENGL}" = "no" ]; then
|
|
|
|
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
|
|
|
|
SET_OPENGL="USE_OPENGL=1"
|
|
|
|
fi
|
2023-07-15 13:39:22 +00:00
|
|
|
|
|
|
|
sed -i "s|AS = as|AS \?= as|" Makefile
|
2023-07-17 11:33:07 +00:00
|
|
|
PKG_MAKE_OPTS_TARGET+="${AMIBERRY_PLATFORM} ${SET_OPENGL} all SDL_CONFIG=${SYSROOT_PREFIX}/usr/bin/sdl2-config"
|
2023-07-15 13:39:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
|
|
|
# Create directories
|
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
|
|
|
mkdir -p ${INSTALL}/usr/lib
|
|
|
|
mkdir -p ${INSTALL}/usr/config/amiberry
|
|
|
|
# mkdir -p ${INSTALL}/usr/config/amiberry/controller
|
|
|
|
|
|
|
|
# Copy ressources
|
|
|
|
cp -ra ${PKG_DIR}/config/* ${INSTALL}/usr/config/amiberry/
|
|
|
|
cp -a data ${INSTALL}/usr/config/amiberry/
|
|
|
|
cp -a savestates ${INSTALL}/usr/config/amiberry/
|
|
|
|
cp -a screenshots ${INSTALL}/usr/config/amiberry/
|
|
|
|
cp -a whdboot ${INSTALL}/usr/config/amiberry/
|
|
|
|
ln -s /storage/roms/bios ${INSTALL}/usr/config/amiberry/kickstarts
|
|
|
|
|
|
|
|
# Create links to Retroarch controller files
|
|
|
|
ln -s "/usr/share/libretro/autoconfig" "${INSTALL}/usr/config/amiberry/controller"
|
|
|
|
|
|
|
|
# Copy binary, scripts & link libcapsimg
|
|
|
|
cp -a amiberry* ${INSTALL}/usr/bin/amiberry
|
|
|
|
cp -a ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin
|
|
|
|
ln -sf /usr/lib/libcapsimage.so.5.1 ${INSTALL}/usr/config/amiberry/capsimg.so
|
|
|
|
}
|