ATARI: Packages

This commit is contained in:
Miro Kropacek
2025-12-04 12:43:31 +10:00
committed by Miro Kropáček
parent 3a49b1ad1a
commit efd960cd0f
13 changed files with 144 additions and 10 deletions
+24 -3
View File
@@ -5,6 +5,8 @@ m4_dnl Include Debian base preparation steps
m4_dnl This ensures all common steps are shared by all toolchains
m4_include(`debian-toolchain-base.m4')m4_dnl
COPY functions-platform.sh lib-helpers/
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bison \
@@ -16,6 +18,7 @@ RUN apt-get update && \
libmpc-dev \
libmpfr-dev \
patch \
subversion \
texinfo && \
rm -rf /var/lib/apt/lists/*
@@ -32,8 +35,26 @@ ENV \
def_binaries(`${HOST}-', `gcc, cpp, c++') \
CC=${HOST}-gcc \
def_aclocal(`${PREFIX}') \
def_pkg_config(`${PREFIX}') \
PATH=$PATH:${ATARITOOLCHAIN}/bin
# Disable because it doesn't support multilib
# def_pkg_config(`${PREFIX}')
# TODO: m68020-60, m5475
helpers_package(zlib)
COPY m68k-atari-mintelf-pkg-config ${ATARITOOLCHAIN}/bin
local_package(gemlib)
local_package(ldg)
local_package(usound)
helpers_package(zlib, --libdir=${PREFIX}/lib/m68020-60, CFLAGS="-O2 -fomit-frame-pointer -m68020-60")
helpers_package(zlib, --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(libpng1.6, --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(libjpeg-turbo, -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_SYSTEM_PROCESSOR=m68k -DWITH_SIMD=OFF -DCMAKE_INSTALL_BINDIR=${PREFIX}/bin/m5475 -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(giflib,, CFLAGS="-fno-PIC -O2 -fomit-frame-pointer -mcpu=5475" LIBDIR=${PREFIX}/lib/m5475)
helpers_package(libmad, --enable-speed --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(libogg, --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(libmikmod, --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(libvorbis, --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(libtheora, --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(freetype, --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
helpers_package(libsdl1.2, --disable-video-opengl --disable-threads --bindir=${PREFIX}/bin/m5475 --libdir=${PREFIX}/lib/m5475, CFLAGS="-O2 -fomit-frame-pointer -mcpu=5475")
+9
View File
@@ -0,0 +1,9 @@
do_svn_fetch () {
if [ -d "$1"*/ ]; then
rm -rf "$1"*/
fi
svn co "$2" "$1"
cd "$1"*/
svn up $3
do_patch
}
+36
View File
@@ -0,0 +1,36 @@
#!/bin/sh
#
# Wrapper script that calls the real pkg-config with the relocated
# sysroot location.
#
set -e
PLATFORM="m68k-atari-mintelf"
SYSROOT=$(${PLATFORM}-gcc -print-sysroot)
LIBDIR=${SYSROOT}/usr/lib/$(${PLATFORM}-gcc $CFLAGS $LDFLAGS -print-multi-directory)
# This adds additional directories to search for .pc files. It supplements the default
# search path rather than replacing it. Use this when you want to add extra locations
# (like /opt/custom/lib/pkgconfig) without losing the standard system paths.
#export PKG_CONFIG_PATH=
# This is an older variable that was used similarly to PKG_CONFIG_LIBDIR. It's deprecated
# in favor of PKG_CONFIG_LIBDIR, which has clearer semantics. You shouldn't use this in
# new projects.
export PKG_CONFIG_DIR=
if [ -z ${PKG_CONFIG_LIBDIR+x} ]
then
# This replaces the entire default search path. When set, pkg-config ignores its
# compiled-in defaults and only searches the directories you specify. This is primarily
# used for cross-compilation scenarios where you want to ensure you're only finding
# libraries for the target system, not the host.
export PKG_CONFIG_LIBDIR="${LIBDIR}/pkgconfig"
fi
# This prepends a prefix to all paths found in .pc files. If a .pc file contains prefix=/usr,
# and you set PKG_CONFIG_SYSROOT_DIR=/home/user/sysroot, then pkg-config will treat it as
# /home/user/sysroot/usr. This is essential for cross-compilation when your target system's
# libraries are installed in a staging directory on your build machine.
export PKG_CONFIG_SYSROOT_DIR=
exec pkg-config --static "$@"
+21
View File
@@ -0,0 +1,21 @@
#! /bin/sh
GEMLIB_VERSION=958583a
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
HELPERS_DIR=$PACKAGE_DIR/../..
. $HELPERS_DIR/functions.sh
do_make_bdir
do_http_fetch gemlib "https://github.com/freemint/gemlib/archive/${GEMLIB_VERSION}.tar.gz" 'tar xf'
do_make CROSS_TOOL=${HOST} DESTDIR=${PREFIX} PREFIX=""
do_make CROSS_TOOL=${HOST} DESTDIR=${PREFIX} PREFIX="" install
cd ..
do_clean_bdir
# Cleanup wget HSTS
rm -f $HOME/.wget-hsts
+27
View File
@@ -0,0 +1,27 @@
#! /bin/sh
LDG_VERSION=133
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
HELPERS_DIR=$PACKAGE_DIR/../..
. $HELPERS_DIR/functions.sh
do_make_bdir
do_svn_fetch ldg https://svn.code.sf.net/p/ldg/code/trunk/ldg -r"$LDG_VERSION"
cd src/devel
do_make -f gcc.mak CC=${HOST}-gcc AR=${HOST}-ar
do_make -f gccm68020-60.mak CC=${HOST}-gcc AR=${HOST}-ar
do_make -f gccm5475.mak CC=${HOST}-gcc AR=${HOST}-ar
cd -
cp -ra include ${PREFIX}
cp -ra lib/gcc/* ${PREFIX}/lib
cd ..
do_clean_bdir
# Cleanup wget HSTS
rm -f $HOME/.wget-hsts
+20
View File
@@ -0,0 +1,20 @@
#! /bin/sh
USOUND_VERSION=51307c0
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
HELPERS_DIR=$PACKAGE_DIR/../..
. $HELPERS_DIR/functions.sh
do_make_bdir
do_http_fetch usound "https://github.com/mikrosk/usound/archive/${USOUND_VERSION}.tar.gz" 'tar xf'
cp usound.h ${PREFIX}/include
cd ..
do_clean_bdir
# Cleanup wget HSTS
rm -f $HOME/.wget-hsts
+1 -1
View File
@@ -7,7 +7,7 @@ HELPERS_DIR=$PACKAGE_DIR/../..
do_make_bdir
do_pkg_fetch freetype
do_configure
do_configure "$@"
do_make
do_make install
@@ -8,7 +8,7 @@ do_make_bdir
do_pkg_fetch libmikmod
do_configure --disable-doc --disable-alldrv --disable-threads --disable-dl
do_configure --disable-doc --disable-alldrv --disable-threads --disable-dl "$@"
do_make
do_make install
+1 -1
View File
@@ -12,7 +12,7 @@ do_pkg_fetch libogg
sed -ie 's/^\(SUBDIRS.*\) doc/\1/' Makefile.am
autoreconf -fi
do_configure
do_configure "$@"
do_make
do_make install
+1 -1
View File
@@ -7,7 +7,7 @@ HELPERS_DIR=$PACKAGE_DIR/../..
do_make_bdir
do_pkg_fetch libpng1.6
do_configure
do_configure "$@"
do_make
# Don't install man pages and binaries
+1 -1
View File
@@ -10,7 +10,7 @@ do_make_bdir
do_http_fetch SDL "https://github.com/libsdl-org/SDL-1.2/archive/${SDL_VERSION}.tar.gz" 'tar xzf'
do_configure
do_configure "$@"
do_make
do_make install
@@ -15,7 +15,7 @@ sed -i -e '/CFLAGS/s:-mno-ieee-fp::' configure.ac
sed -i -e 's/^\(SUBDIRS.*\) doc/\1/' Makefile.am
autoreconf -fi -I m4
do_configure
do_configure "$@"
do_make
do_make install
+1 -1
View File
@@ -7,7 +7,7 @@ HELPERS_DIR=$PACKAGE_DIR/../..
do_make_bdir
do_pkg_fetch zlib
./configure --prefix=$PREFIX --static
./configure --prefix=$PREFIX --static "$@"
# Only build the library and not its samples
do_make libz.a