From 5615c9def2bc50137790fcd5972317d066662f72 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Mon, 22 Jun 2026 00:56:41 +0200 Subject: [PATCH 01/27] Big rework of the kos-ports build system - Ports now use a recipe.mk, that more or less contain the same as the old Makefile scripts, except that all variables are prefixed with the package's name. - This is done so that all recipe scripts can be sourced at the same time without conflicting. This is needed so that all packages can be built in the same "make" instance without nesting instances. - As a result, kos-ports is now fully buildable in parallel, everything is handled properly. - The old scripts/* files are mostly gone; everything is in the top-level Makefile now. - Lots of simplifications. SVN clone dropped, GIT clone dropped, everything is downloaded from HTTPS. This uses the fact that both gitlab and github enable downloading tarballs from a git hash. - Downloading a tarball from a git branch is no more supported. This is because it would not allow reproductible builds. - Custom zlib / libpng / libjpeg code moved to their own packages. This allows using the upstream cmake/autotools scripts, which will install their files properly (e.g. including the cmake scripts and the pkgconfig .pc file). - Speaking about installing, everything is installed into a top-level sysroot/ folder. This means that regular Unix software will automatically find their dependencies through pkgconfig or cmake scripts, because the headers and libs are where they expect them to be. - Version check is gone. Assume that the users won't downgrade from a version of kos-ports to an older version. When a package is updated to a new version, the Makefile script will automatically build the new version. - Uninstall rule dropped. This was hacky at best. - Support for simpler packages that don't download anything - SHA256 hash is now stored in a variable in the recipe.mk Signed-off-by: Paul Cercueil --- .gitignore | 1 + Makefile | 141 ++++++++++++++++++ SDL/Makefile | 20 --- SDL/recipe.mk | 20 +++ SDL_ttf/Makefile | 31 ---- SDL_ttf/recipe.mk | 17 +++ TODO | 15 ++ cglm/Makefile | 31 ---- cglm/{files => patches}/cglm-1.0.0.patch | 0 cglm/recipe.mk | 17 +++ config.mk | 2 +- curl/Makefile | 52 ------- curl/distinfo | 2 - curl/recipe.mk | 32 ++++ expat/Makefile | 34 ----- expat/distinfo | 2 - expat/recipe.mk | 14 ++ freetype/Makefile | 38 ----- freetype/distinfo | 2 - freetype/recipe.mk | 20 +++ kos-jpeg/files/KOSMakefile.mk | 6 + {libjpeg => kos-jpeg}/files/kos_img.c | 4 +- {libjpeg => kos-jpeg}/files/kos_texture.c | 4 +- .../files/jpeg.h => kos-jpeg/files/kosjpeg.h | 8 +- kos-jpeg/pkg-descr | 4 + kos-jpeg/recipe.mk | 11 ++ kos-png/files/KOSMakefile.mk | 6 + {libpng => kos-png}/files/kos_img.c | 2 +- {libpng => kos-png}/files/kos_texture.c | 0 {libpng => kos-png}/files/kospng.h | 0 {libpng => kos-png}/files/readpng.c | 0 {libpng => kos-png}/files/readpng.h | 0 {libpng => kos-png}/files/writepng.c | 0 kos-png/pkg-descr | 4 + kos-png/recipe.mk | 12 ++ kos-zlib/files/KOSMakefile.mk | 6 + {zlib => kos-zlib}/files/kos_zlib.c | 0 kos-zlib/pkg-descr | 5 + kos-zlib/recipe.mk | 10 ++ libADX/Makefile | 20 --- libADX/files/KOSMakefile.mk | 6 + libADX/recipe.mk | 15 ++ libAL/Makefile | 22 --- libAL/files/KOSMakefile.mk | 7 - libAL/recipe.mk | 17 +++ libGL/Makefile | 28 ---- libGL/recipe.mk | 14 ++ libKGL/Makefile | 23 --- libKGL/files/KOSMakefile.mk | 6 +- libKGL/recipe.mk | 15 ++ libbearssl/Makefile | 25 ---- libbearssl/recipe.mk | 17 +++ libbz2/Makefile | 24 --- libbz2/distinfo | 2 - libbz2/files/CMakeLists.txt | 29 ++++ libbz2/files/KOSMakefile.mk | 7 - libbz2/files/bzip2.pc.in | 11 ++ libbz2/recipe.mk | 15 ++ libchipmunk/Makefile | 35 ----- libchipmunk/recipe.mk | 18 +++ libcmark/Makefile | 31 ---- libcmark/recipe.mk | 16 ++ libconio/Makefile | 23 --- libconio/files/KOSMakefile.mk | 3 +- libconio/recipe.mk | 15 ++ libdcplib/Makefile | 23 --- libdcplib/files/KOSMakefile.mk | 3 +- libdcplib/recipe.mk | 15 ++ libfastmem/Makefile | 21 --- libfastmem/files/KOSMakefile.mk | 3 +- libfastmem/recipe.mk | 15 ++ libimageload/Makefile | 22 --- libimageload/files/KOSMakefile.mk | 3 +- libimageload/patches/fix-build.patch | 13 ++ libimageload/recipe.mk | 17 +++ libjimtcl/Makefile | 19 --- libjimtcl/files/KOSMakefile.mk | 18 --- libjimtcl/recipe.mk | 16 ++ libjpeg/Makefile | 25 ---- libjpeg/distinfo | 2 - libjpeg/files/KOSMakefile.mk | 23 --- libjpeg/pkg-descr | 3 - libjpeg/recipe.mk | 13 ++ libkmg/Makefile | 23 --- libkmg/files/KOSMakefile.mk | 3 +- libkmg/recipe.mk | 15 ++ libkosh/Makefile | 22 --- libkosh/files/KOSMakefile.mk | 3 +- libkosh/recipe.mk | 17 +++ libmodplug/Makefile | 23 --- libmodplug/files/KOSMakefile.mk | 3 +- libmodplug/recipe.mk | 15 ++ libmp3/Makefile | 23 --- libmp3/files/KOSMakefile.mk | 5 +- libmp3/recipe.mk | 15 ++ libmpeg/Makefile | 24 --- libmpeg/distinfo | 2 - libmpeg/files/KOSMakefile.mk | 3 +- libmpeg/recipe.mk | 14 ++ libogg/Makefile | 31 ---- libogg/distinfo | 2 - libogg/recipe.mk | 14 ++ liboggvorbisplay/Makefile | 22 --- liboggvorbisplay/files/KOSMakefile.mk | 3 +- liboggvorbisplay/recipe.mk | 18 +++ libopusplay/Makefile | 25 ---- libopusplay/patches/fix-build.patch | 28 ++++ libopusplay/recipe.mk | 20 +++ libparallax/Makefile | 24 --- libparallax/files/KOSMakefile.mk | 3 +- libparallax/patches/fix-build.patch | 15 ++ libparallax/recipe.mk | 19 +++ libpcx/Makefile | 23 --- libpcx/files/KOSMakefile.mk | 3 +- libpcx/recipe.mk | 15 ++ libpng/Makefile | 23 --- libpng/distinfo | 2 - libpng/files/KOSMakefile.mk | 29 ---- libpng/pkg-descr | 3 - libpng/recipe.mk | 17 +++ libsmb2/Makefile | 25 ---- libsmb2/recipe.mk | 14 ++ libtga/Makefile | 23 --- libtga/files/KOSMakefile.mk | 3 +- libtga/recipe.mk | 15 ++ libtremor/Makefile | 24 --- libtremor/files/KOSMakefile.mk | 7 +- libtremor/recipe.mk | 15 ++ libtsunami/Makefile | 22 --- libtsunami/files/KOSMakefile.mk | 8 +- libtsunami/recipe.mk | 17 +++ libvldmail/Makefile | 27 ---- libvldmail/recipe.mk | 14 ++ libvorbis/Makefile | 23 --- libvorbis/distinfo | 2 - libvorbis/files/KOSMakefile.mk | 10 -- libvorbis/recipe.mk | 17 +++ libwav/Makefile | 22 --- libwav/files/KOSMakefile.mk | 3 +- libwav/recipe.mk | 15 ++ libyaml/Makefile | 34 ----- libyaml/distinfo | 2 - libyaml/recipe.mk | 14 ++ libzip/Makefile | 45 ------ libzip/distinfo | 2 - libzip/{files => patches}/libzip-1.0.1.patch | 0 libzip/recipe.mk | 20 +++ lua/Makefile | 24 --- lua/distinfo | 2 - lua/files/KOSMakefile.mk | 9 +- lua/recipe.mk | 16 ++ mbedtls/Makefile | 38 ----- mbedtls/recipe.mk | 15 ++ micropython/Makefile | 24 --- micropython/files/KOSMakefile.mk | 32 ++-- micropython/recipe.mk | 15 ++ miniaudio/Makefile | 20 --- miniaudio/recipe.mk | 18 +++ mruby/Makefile | 24 --- mruby/files/KOSMakefile.mk | 2 +- mruby/recipe.mk | 14 ++ opus/Makefile | 38 ----- opus/distinfo | 2 - opus/recipe.mk | 17 +++ opusfile/Makefile | 38 ----- opusfile/distinfo | 2 - opusfile/recipe.mk | 20 +++ polarssl/Makefile | 38 ----- polarssl/distinfo | 2 - .../{files => patches}/polarssl-1.3.9.patch | 0 polarssl/recipe.mk | 17 +++ raylib4dc/Makefile | 37 ----- raylib4dc/files/KOSMakefile.mk | 2 + .../{files => patches}/raylib4dc-5.5.0.patch | 0 raylib4dc/recipe.mk | 17 +++ scripts/build.mk | 113 -------------- scripts/clean.mk | 16 -- scripts/depends.mk | 29 ---- scripts/download.mk | 100 ------------- scripts/kos-ports.mk | 24 --- scripts/lib.mk | 7 +- scripts/portinfo.mk | 28 ---- scripts/precision.mk | 30 ---- scripts/setup.mk | 25 ---- scripts/uninstall.mk | 32 ---- scripts/unpack.mk | 36 ----- scripts/validate.mk | 13 -- scripts/validate_dist.py | 64 -------- scripts/vercmp.sh | 49 ------ scripts/version.mk | 24 --- sh4zam/Makefile | 17 --- sh4zam/recipe.mk | 12 ++ stb_image/Makefile | 46 ------ stb_image/distinfo | 0 stb_image/files/KOSMakefile.mk | 3 +- stb_image/recipe.mk | 16 ++ utils/build-all.sh | 41 ----- utils/calc_dist.py | 20 --- utils/clean-all.sh | 17 --- utils/uninstall-all.sh | 17 --- zlib/Makefile | 22 --- zlib/distinfo | 2 - zlib/files/KOSMakefile.mk | 7 - zlib/recipe.mk | 17 +++ 204 files changed, 1260 insertions(+), 2293 deletions(-) create mode 100644 Makefile delete mode 100644 SDL/Makefile create mode 100644 SDL/recipe.mk delete mode 100644 SDL_ttf/Makefile create mode 100644 SDL_ttf/recipe.mk create mode 100644 TODO delete mode 100644 cglm/Makefile rename cglm/{files => patches}/cglm-1.0.0.patch (100%) create mode 100644 cglm/recipe.mk delete mode 100644 curl/Makefile delete mode 100644 curl/distinfo create mode 100644 curl/recipe.mk delete mode 100644 expat/Makefile delete mode 100644 expat/distinfo create mode 100644 expat/recipe.mk delete mode 100644 freetype/Makefile delete mode 100644 freetype/distinfo create mode 100644 freetype/recipe.mk create mode 100644 kos-jpeg/files/KOSMakefile.mk rename {libjpeg => kos-jpeg}/files/kos_img.c (99%) rename {libjpeg => kos-jpeg}/files/kos_texture.c (99%) rename libjpeg/files/jpeg.h => kos-jpeg/files/kosjpeg.h (82%) create mode 100644 kos-jpeg/pkg-descr create mode 100644 kos-jpeg/recipe.mk create mode 100644 kos-png/files/KOSMakefile.mk rename {libpng => kos-png}/files/kos_img.c (99%) rename {libpng => kos-png}/files/kos_texture.c (100%) rename {libpng => kos-png}/files/kospng.h (100%) rename {libpng => kos-png}/files/readpng.c (100%) rename {libpng => kos-png}/files/readpng.h (100%) rename {libpng => kos-png}/files/writepng.c (100%) create mode 100644 kos-png/pkg-descr create mode 100644 kos-png/recipe.mk create mode 100644 kos-zlib/files/KOSMakefile.mk rename {zlib => kos-zlib}/files/kos_zlib.c (100%) create mode 100644 kos-zlib/pkg-descr create mode 100644 kos-zlib/recipe.mk delete mode 100644 libADX/Makefile create mode 100644 libADX/files/KOSMakefile.mk create mode 100644 libADX/recipe.mk delete mode 100644 libAL/Makefile delete mode 100644 libAL/files/KOSMakefile.mk create mode 100644 libAL/recipe.mk delete mode 100644 libGL/Makefile create mode 100644 libGL/recipe.mk delete mode 100644 libKGL/Makefile create mode 100644 libKGL/recipe.mk delete mode 100644 libbearssl/Makefile create mode 100644 libbearssl/recipe.mk delete mode 100644 libbz2/Makefile delete mode 100644 libbz2/distinfo create mode 100644 libbz2/files/CMakeLists.txt delete mode 100644 libbz2/files/KOSMakefile.mk create mode 100644 libbz2/files/bzip2.pc.in create mode 100644 libbz2/recipe.mk delete mode 100644 libchipmunk/Makefile create mode 100644 libchipmunk/recipe.mk delete mode 100644 libcmark/Makefile create mode 100644 libcmark/recipe.mk delete mode 100644 libconio/Makefile create mode 100644 libconio/recipe.mk delete mode 100644 libdcplib/Makefile create mode 100644 libdcplib/recipe.mk delete mode 100644 libfastmem/Makefile create mode 100644 libfastmem/recipe.mk delete mode 100644 libimageload/Makefile create mode 100644 libimageload/patches/fix-build.patch create mode 100644 libimageload/recipe.mk delete mode 100644 libjimtcl/Makefile delete mode 100644 libjimtcl/files/KOSMakefile.mk create mode 100644 libjimtcl/recipe.mk delete mode 100644 libjpeg/Makefile delete mode 100644 libjpeg/distinfo delete mode 100644 libjpeg/files/KOSMakefile.mk create mode 100644 libjpeg/recipe.mk delete mode 100644 libkmg/Makefile create mode 100644 libkmg/recipe.mk delete mode 100644 libkosh/Makefile create mode 100644 libkosh/recipe.mk delete mode 100644 libmodplug/Makefile create mode 100644 libmodplug/recipe.mk delete mode 100644 libmp3/Makefile create mode 100644 libmp3/recipe.mk delete mode 100644 libmpeg/Makefile delete mode 100644 libmpeg/distinfo create mode 100644 libmpeg/recipe.mk delete mode 100644 libogg/Makefile delete mode 100644 libogg/distinfo create mode 100644 libogg/recipe.mk delete mode 100644 liboggvorbisplay/Makefile create mode 100644 liboggvorbisplay/recipe.mk delete mode 100644 libopusplay/Makefile create mode 100644 libopusplay/patches/fix-build.patch create mode 100644 libopusplay/recipe.mk delete mode 100644 libparallax/Makefile create mode 100644 libparallax/patches/fix-build.patch create mode 100644 libparallax/recipe.mk delete mode 100644 libpcx/Makefile create mode 100644 libpcx/recipe.mk delete mode 100644 libpng/Makefile delete mode 100644 libpng/distinfo delete mode 100644 libpng/files/KOSMakefile.mk create mode 100644 libpng/recipe.mk delete mode 100644 libsmb2/Makefile create mode 100644 libsmb2/recipe.mk delete mode 100644 libtga/Makefile create mode 100644 libtga/recipe.mk delete mode 100644 libtremor/Makefile create mode 100644 libtremor/recipe.mk delete mode 100644 libtsunami/Makefile create mode 100644 libtsunami/recipe.mk delete mode 100644 libvldmail/Makefile create mode 100644 libvldmail/recipe.mk delete mode 100644 libvorbis/Makefile delete mode 100644 libvorbis/distinfo delete mode 100644 libvorbis/files/KOSMakefile.mk create mode 100644 libvorbis/recipe.mk delete mode 100644 libwav/Makefile create mode 100644 libwav/recipe.mk delete mode 100644 libyaml/Makefile delete mode 100644 libyaml/distinfo create mode 100644 libyaml/recipe.mk delete mode 100644 libzip/Makefile delete mode 100644 libzip/distinfo rename libzip/{files => patches}/libzip-1.0.1.patch (100%) create mode 100644 libzip/recipe.mk delete mode 100644 lua/Makefile delete mode 100644 lua/distinfo create mode 100644 lua/recipe.mk delete mode 100644 mbedtls/Makefile create mode 100644 mbedtls/recipe.mk delete mode 100644 micropython/Makefile create mode 100644 micropython/recipe.mk delete mode 100644 miniaudio/Makefile create mode 100644 miniaudio/recipe.mk delete mode 100644 mruby/Makefile create mode 100644 mruby/recipe.mk delete mode 100644 opus/Makefile delete mode 100644 opus/distinfo create mode 100644 opus/recipe.mk delete mode 100644 opusfile/Makefile delete mode 100644 opusfile/distinfo create mode 100644 opusfile/recipe.mk delete mode 100644 polarssl/Makefile delete mode 100644 polarssl/distinfo rename polarssl/{files => patches}/polarssl-1.3.9.patch (100%) create mode 100644 polarssl/recipe.mk delete mode 100644 raylib4dc/Makefile create mode 100644 raylib4dc/files/KOSMakefile.mk rename raylib4dc/{files => patches}/raylib4dc-5.5.0.patch (100%) create mode 100644 raylib4dc/recipe.mk delete mode 100644 scripts/build.mk delete mode 100644 scripts/clean.mk delete mode 100644 scripts/depends.mk delete mode 100644 scripts/download.mk delete mode 100644 scripts/kos-ports.mk delete mode 100644 scripts/portinfo.mk delete mode 100644 scripts/precision.mk delete mode 100644 scripts/setup.mk delete mode 100644 scripts/uninstall.mk delete mode 100644 scripts/unpack.mk delete mode 100644 scripts/validate.mk delete mode 100755 scripts/validate_dist.py delete mode 100755 scripts/vercmp.sh delete mode 100644 scripts/version.mk delete mode 100644 sh4zam/Makefile create mode 100644 sh4zam/recipe.mk delete mode 100644 stb_image/Makefile delete mode 100644 stb_image/distinfo create mode 100644 stb_image/recipe.mk delete mode 100755 utils/build-all.sh delete mode 100755 utils/calc_dist.py delete mode 100755 utils/clean-all.sh delete mode 100755 utils/uninstall-all.sh delete mode 100644 zlib/Makefile delete mode 100644 zlib/distinfo delete mode 100644 zlib/files/KOSMakefile.mk create mode 100644 zlib/recipe.mk diff --git a/.gitignore b/.gitignore index 0de3eed..fb76d0a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ examples/* inst .DS_Store ./config.* +sysroot diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..18477f2 --- /dev/null +++ b/Makefile @@ -0,0 +1,141 @@ +# KallistiOS ##version## +# +# KOS-ports Makefile +# Copyright (C) 2025 Paul Cercueil + +# Include the packages recipes +#include $(KOS_PORTS)/*/recipe.mk + +# Get a list of the sub-directories that contain a recipe.mk file +SUBDIRS := $(foreach each,$(wildcard ${KOS_PORTS}/*),$(if $(wildcard ${each}/recipe.mk),${each},) ) +PACKAGES := $(foreach p,${SUBDIRS},$(notdir $p)) + +# Get a list of the sub-directories that failed to build +FAILED_PACKAGES = $(sort $(foreach p,${PACKAGES},$(if $(wildcard ${KOS_PORTS}/${p}/build/${${p}_PORTVERSION}/.stamp_installed),,${p}))) + +.PHONY: all all_nested failed clean distclean + +all: + -$(MAKE) -k -C ${KOS_PORTS} all_nested + -@$(MAKE) --no-print-directory -C ${KOS_PORTS} failed + +all_nested: $(foreach s,${SUBDIRS},$(notdir ${s})) + +failed: + @echo "Failed packages: ${FAILED_PACKAGES}" + +clean: + -rm -rf $(foreach s,${SUBDIRS},${s}/build) + +distclean: clean + -rm -rf sysroot + +SYSROOT := ${KOS_PORTS}/sysroot +PKG_CONFIG_ENV := PKG_CONFIG_LIBDIR=${SYSROOT}/lib/pkgconfig:${SYSROOT}/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=${SYSROOT} +BUILD_ENV := CC=kos-cc RANLIB=kos-ranlib AR=kos-ar + +# Include the defaults +include ${KOS_PORTS}/config.mk + +# Include the recipes +include $(KOS_PORTS)/*/recipe.mk + +define BUILD_RULE + +# Default values +${2}_MAKE_TARGET ?= install +${2}_PORT_BUILD ?= manual +${2}_REQUIRES_ABI ?= any +${2}_KOS_MAKEFILE ?= KOSMakefile.mk +${2}_FETCH_CMD ?= ${FETCH_CMD} +${2}_UNPACK_CMD ?= ${UNPACK_CMD} + +${2}_DEP_STAMPS = $$(foreach dep,$${${2}_DEPENDENCIES},$(abspath ${KOS_PORTS}/$${dep}/build/$${$${dep}_PORTVERSION}/.stamp_installed)) +${2}_BUILD_DEPS = $${${2}_DEP_STAMPS} ${1}/.stamp_fetched ${1}/.stamp_abi_checked + +${2}_DISTFILE_DIR = ${1}/${2}-$${${2}_PORTVERSION} + +${1}/.stamp_abi_checked: +ifeq ($${${2}_REQUIRES_ABI},any) + @echo "${2} is compatible with any floating-point ABI." +else + @case " $${${2}_REQUIRES_ABI} " in *" $(KOS_SH4_PRECISION) "*) \ + echo "${2} is compatible with the ${KOS_SH4_PRECISION} floating-point ABI."; \ + ;; \ + *) \ + echo "${2} is not compatible with the ${KOS_SH4_PRECISION} floating-point ABI!"; \ + echo "Change the KOS_SH4_PRECISION setting in your environ.sh to one of the following: $${${2}_REQUIRES_ABI}"; \ + echo "Then rebuild KOS and try again."; \ + exit 1; \ + ;; \ + esac +endif + touch $$@ + +${1}/.stamp_downloaded: ${1}/$${${2}_DOWNLOAD_FILE} + @if [ -n "$${${2}_DOWNLOAD_SHA256}" -a "$${${2}_DOWNLOAD_SHA256}" != "$$(firstword $$(shell sha256sum $$<))" ] ; then \ + echo "Downloaded file $${${2}_DOWNLOAD_FILE} does not match our SHA256. Got $$(shell sha256sum $$<)" ; \ + exit 1 ; \ + fi ; \ + touch $$@ + +${1}/.stamp_nodownload: + mkdir -p $${${2}_DISTFILE_DIR} + touch $$@ + +${1}/$${${2}_DOWNLOAD_FILE}: + mkdir -p ${1} + @echo "Fetching $${${2}_DOWNLOAD_FILE} from $${${2}_DOWNLOAD_SITE} ..." ; \ + (cd ${1} ; $${${2}_FETCH_CMD} "$${${2}_DOWNLOAD_SITE}/$${${2}_DOWNLOAD_FILE}") + +${1}/.stamp_extracted: ${1}/$${${2}_DOWNLOAD_FILE} ${1}/.stamp_downloaded + mkdir -p $${${2}_DISTFILE_DIR} + (cd $${${2}_DISTFILE_DIR} ; $${${2}_UNPACK_CMD} $$< && touch $$@) + +${1}/.stamp_fetched: ${1}/.stamp_$$(if $${${2}_DOWNLOAD_SITE},extracted,nodownload) + if [ -d ${KOS_PORTS}/${2}/files ] ; then \ + cp ${KOS_PORTS}/${2}/files/* $${${2}_DISTFILE_DIR}/ ; \ + fi + cd $${${2}_DISTFILE_DIR} ; \ + for _patch in $(wildcard ${KOS_PORTS}/${2}/patches/*) ; do \ + patch -p1 < $$$${_patch} ; \ + done + touch $$@ + +${1}/.stamp_installed_autotools: $${${2}_BUILD_DEPS} + cd $${${2}_DISTFILE_DIR} ; \ + ${BUILD_ENV} ${PKG_CONFIG_ENV} ./configure $$(if $${${2}_CONFIGURE_NO_CACHE_FILE},,--cache-file=${KOS_PORTS}/config.${KOS_GCCVER}.cache) --prefix="" --host=${AUTOTOOLS_HOST} $${${2}_CONFIGURE_ARGS} && \ + DESTDIR=${SYSROOT} ${MAKE} $${${2}_MAKE_TARGET} && \ + touch $$@ + +${1}/.stamp_installed_cmake: $${${2}_BUILD_DEPS} + mkdir -p $${${2}_DISTFILE_DIR}/build + cd $${${2}_DISTFILE_DIR}/build ; \ + ${BUILD_ENV} kos-cmake -DCMAKE_INSTALL_PREFIX="" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib $${${2}_CMAKE_ARGS} .. && \ + DESTDIR=${SYSROOT} cmake --build . -t $${${2}_MAKE_TARGET} && \ + touch $$@ + +${1}/.stamp_installed_manual: $${${2}_BUILD_DEPS} + ${MAKE} -C $${${2}_DISTFILE_DIR} -f $${${2}_KOS_MAKEFILE} $${${2}_MAKE_TARGET} ${BUILD_ENV} + mkdir -p ${SYSROOT}/lib ${SYSROOT}/include/$${${2}_HDR_INSTDIR} + for each in $${${2}_TARGET} ; do \ + install -m 644 $${${2}_DISTFILE_DIR}/$$$${each} ${SYSROOT}/lib ; \ + done ; \ + if [ "$${${2}_HDR_DIRECTORY}" ] ; then \ + cp -r $${${2}_DISTFILE_DIR}/$${${2}_HDR_DIRECTORY}/* ${SYSROOT}/include/$${${2}_HDR_INSTDIR}/ ; \ + fi ; \ + for each in $${${2}_INSTALLED_HDRS} ; do \ + install -m 644 $${${2}_DISTFILE_DIR}/$$$${each} ${SYSROOT}/include/$${${2}_HDR_INSTDIR} ; \ + done ; \ + touch $$@ + +${1}/.stamp_installed: ${1}/.stamp_installed_$${${2}_PORT_BUILD} + touch $$@ + +.PHONY: ${2} + +${2}: ${1}/.stamp_installed + +endef + +$(foreach p,${PACKAGES},$(eval $(call BUILD_RULE,$(abspath ${KOS_PORTS}/${p}/build/${${p}_PORTVERSION}),${p}))) diff --git a/SDL/Makefile b/SDL/Makefile deleted file mode 100644 index 268b82f..0000000 --- a/SDL/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Port Metadata -PORTNAME = SDL - -MAINTAINER = Nobody -LICENSE = LGPLv2.1 -SHORT_DESC = Simple Directmedia Library - -# Required for OpenGL hardware acceleration -DEPENDENCIES = libGL - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/libsdl-org/SDL-1.2.git - -KOS_MAKEFILE = Makefile.dc - -TARGET = libSDL.a -HDR_DIRECTORY = include -HDR_INSTDIR = SDL - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/SDL/recipe.mk b/SDL/recipe.mk new file mode 100644 index 0000000..fe89be2 --- /dev/null +++ b/SDL/recipe.mk @@ -0,0 +1,20 @@ +# Port Metadata +SDL_PORTVERSION = 1.2.0 + +SDL_MAINTAINER = Nobody +SDL_LICENSE = LGPLv2.1 +SDL_SHORT_DESC = Simple Directmedia Library + +# Required for OpenGL hardware acceleration +SDL_DEPENDENCIES = libGL + +# What files we need to download, and where from. +SDL_GIT_HASH = 6648216ef09099d722623a155693fabee972380f +SDL_DOWNLOAD_SITE = https://github.com/libsdl-org/SDL-1.2/archive/ +SDL_DOWNLOAD_FILE = ${SDL_GIT_HASH}.tar.gz + +SDL_KOS_MAKEFILE = Makefile.dc + +SDL_TARGET = libSDL.a +SDL_HDR_DIRECTORY = include +SDL_HDR_INSTDIR = SDL diff --git a/SDL_ttf/Makefile b/SDL_ttf/Makefile deleted file mode 100644 index 8c32f6c..0000000 --- a/SDL_ttf/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Port Metadata -PORTNAME = SDL_ttf -PORTVERSION = 1.2 - -MAINTAINER = Donald Haase -LICENSE = zlib License - http://opensource.org/licenses/Zlib -SHORT_DESC = SDL TrueType font library - -# This port could use autotools, but it tries to build the glfont example which uses -# functionality currently unsupported by gldc.. -#PORT_AUTOTOOLS = 1 - -# No dependencies beyond the base system. -DEPENDENCIES = SDL libbz2 zlib libpng freetype - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/libsdl-org/SDL_ttf.git -GIT_BRANCH = SDL-1.2 - -TARGET = libSDL_ttf.a -#There's a problem here. Standard SDL_ttf will install SDL_ttf.h into the SDL folder. -#There's no option in the build scripts to copy into a different ports inst/include so -# instead I'm abusing the fact that INSTALLED_HDRS and HDR_DIRECTORY aren't mutually exclusive. -INSTALLED_HDRS = SDL_ttf.h -HDR_DIRECTORY = ../../../include/SDL -HDR_INSTDIR = SDL - -#KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/SDL_ttf/recipe.mk b/SDL_ttf/recipe.mk new file mode 100644 index 0000000..d372a8c --- /dev/null +++ b/SDL_ttf/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +SDL_ttf_PORTVERSION = 1.2 + +SDL_ttf_MAINTAINER = Donald Haase +SDL_ttf_LICENSE = zlib License - http://opensource.org/licenses/Zlib +SDL_ttf_SHORT_DESC = SDL TrueType font library + +SDL_ttf_DEPENDENCIES = SDL libbz2 zlib libpng freetype + +SDL_ttf_PORT_BUILD = autotools + +# What files we need to download, and where from. +SDL_ttf_GIT_HASH = 3c4233732b94ce08d5f6a868e597af39e13f8b23 +SDL_ttf_DOWNLOAD_SITE = https://github.com/libsdl-org/SDL_ttf/archive/ +SDL_ttf_DOWNLOAD_FILE = ${SDL_ttf_GIT_HASH}.tar.gz + +SDL_ttf_CONFIGURE_ARGS = SDL_CFLAGS="-I${KOS_PORTS}/sysroot/include/SDL" SDL_LIBS="-lSDL" diff --git a/TODO b/TODO new file mode 100644 index 0000000..9c61f3d --- /dev/null +++ b/TODO @@ -0,0 +1,15 @@ +cglm: Untested, ICE on GCC 17 +libbz2: does not install a pkg-config file, which causes freetype to not detect it +freetype: Does not pick libbz2 (but builds fine otherwise) +libAL: upstream CMake script needs an install() rule +libdcplib: Untested, ICE on GCC 17 +libGL: upstream CMake script needs an install() rule +libimageload: does not use the right includes for jpeg/PNG +libopusplay: Tries to include instead of +libparallax: Tries to include instead of +libtsunami: fails because of missing libparallax +micropython: Needs updating the package's Makefile +mruby: Needs updating the package's Makefile +raylib4dc: fails because of dependencies +SDL: Needs updating the package's Makefile, missing libGL dependency +SDL_ttf: Needs updating the package's Makefile, missing SDL dependency diff --git a/cglm/Makefile b/cglm/Makefile deleted file mode 100644 index 459b344..0000000 --- a/cglm/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Port Metadata -PORTNAME = cglm -PORTVERSION = 1.0.0 - -MAINTAINER = Donald Haase -LICENSE = MIT -SHORT_DESC = Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C` - -# This port uses CMake. -PORT_BUILD = cmake - -# Don't attempt to copy the target library, it will be in the inst dir already. -NOCOPY_TARGET = 1 - - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/recp/cglm.git -HDR_FULLDIR = cglm -TARGET = libcglm.a -EXAMPLES_DIR = test - -# cmake setup work. -CMAKE_ARGS = -DCGLM_STATIC=ON -Wno-dev -DCMAKE_C_FLAGS="-Wno-unused-parameter" -MAKE_TARGET = all install - -# Apply patch before build -PREBUILD = apply-patch - -include ${KOS_PORTS}/scripts/kos-ports.mk -apply-patch: - patch -p1 -d build/${PORTNAME}-${PORTVERSION} < files/cglm-1.0.0.patch \ No newline at end of file diff --git a/cglm/files/cglm-1.0.0.patch b/cglm/patches/cglm-1.0.0.patch similarity index 100% rename from cglm/files/cglm-1.0.0.patch rename to cglm/patches/cglm-1.0.0.patch diff --git a/cglm/recipe.mk b/cglm/recipe.mk new file mode 100644 index 0000000..4c257d2 --- /dev/null +++ b/cglm/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +cglm_PORTVERSION = 1.0.0 + +cglm_MAINTAINER = Donald Haase +cglm_LICENSE = MIT +cglm_SHORT_DESC = Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C` + +# This port uses CMake. +cglm_PORT_BUILD = cmake + +# What files we need to download, and where from. +cglm_GIT_HASH = 46f46e5dcb84bc5bfcc07675f026077272704f0c +cglm_DOWNLOAD_SITE = https://github.com/recp/cglm/archive/ +cglm_DOWNLOAD_FILE = ${cglm_GIT_HASH}.tar.gz + +# cmake setup work. +cglm_CMAKE_ARGS = -DCGLM_STATIC=ON -Wno-dev -DCMAKE_C_FLAGS="-Wno-unused-parameter" diff --git a/config.mk b/config.mk index 9bf6835..a94565c 100644 --- a/config.mk +++ b/config.mk @@ -6,7 +6,7 @@ FETCH_CMD = curl --progress-bar -O -L # Set the command that will be used for extracting archive files. Currently this # only must extract .tar.gz archives (although the default will handle more than # that, most likely). -UNPACK_CMD = tar xf +UNPACK_CMD = tar --strip-components=1 -xf # Select whether or not to automatically build library dependencies if they are # not already installed. If this is set to false, then the build system will diff --git a/curl/Makefile b/curl/Makefile deleted file mode 100644 index d618fc9..0000000 --- a/curl/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# Port Metadata -PORTNAME = curl -PORTVERSION = 8.18.0 - -MAINTAINER = Damian Parrino -LICENSE = custom -SHORT_DESC = A library for transferring data with URL syntax. - -# This port uses CMake. -PORT_BUILD = cmake - -# Provide SSL support library -DEPENDENCIES = zlib mbedtls - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://curl.se/download -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libcurl.a - -# attempt to install the headers locally. -HDR_DIRECTORY = include/curl - -# cmake build arguments -CMAKE_ARGS = -DCURL_USE_MBEDTLS=ON \ - -DMBEDTLS_INCLUDE_DIR=${KOS_PORTS}/include \ - -DMBEDTLS_LIBRARY=${KOS_PORTS}/lib/libmbedtls.a \ - -DMBEDX509_LIBRARY=${KOS_PORTS}/lib/libmbedx509.a \ - -DMBEDCRYPTO_LIBRARY=${KOS_PORTS}/lib/libmbedcrypto.a \ - -DZLIB_INCLUDE_DIR=${KOS_PORTS}/include/zlib \ - -DZLIB_LIBRARY=${KOS_PORTS}/lib/libz.a \ - -DUSE_UNIX_SOCKETS=OFF \ - -DENABLE_IPV6=OFF \ - -DENABLE_THREADED_RESOLVER=OFF \ - -DBUILD_CURL_EXE=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_STATIC_LIBS=ON \ - -DBUILD_TESTING=OFF \ - -DCURL_USE_LIBPSL=OFF \ - -DCURL_USE_LIBSSH2=OFF \ - -DCURL_BROTLI=OFF \ - -DCURL_ZSTD=OFF \ - -DUSE_NGHTTP2=OFF \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.7 \ - -DHAVE_SCHED_YIELD=0 - -# Add a pre-install target to get the built library where we expect it. -PREINSTALL = curl_preinstall -curl_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/lib/${TARGET} build/${PORTNAME}-${PORTVERSION} - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/curl/distinfo b/curl/distinfo deleted file mode 100644 index ed77b2b..0000000 --- a/curl/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (curl-8.18.0.tar.gz) = e9274a5f8ab5271c0e0e6762d2fce194d5f98acc568e4ce816845b2dcc0cf88f -SIZE (curl-8.18.0.tar.gz) = 4182005 diff --git a/curl/recipe.mk b/curl/recipe.mk new file mode 100644 index 0000000..1268e95 --- /dev/null +++ b/curl/recipe.mk @@ -0,0 +1,32 @@ +# Port Metadata +curl_PORTVERSION = 8.18.0 + +curl_MAINTAINER = Damian Parrino +curl_LICENSE = custom +curl_SHORT_DESC = A library for transferring data with URL syntax. + +# This port uses CMake. +curl_PORT_BUILD = cmake + +# Provide SSL support library +curl_DEPENDENCIES = zlib mbedtls + +# What files we need to download, and where from. +curl_DOWNLOAD_SITE = https://curl.se/download +curl_DOWNLOAD_FILE = curl-${curl_PORTVERSION}.tar.gz +curl_DOWNLOAD_SHA256 = e9274a5f8ab5271c0e0e6762d2fce194d5f98acc568e4ce816845b2dcc0cf88f + +# cmake build arguments +curl_CMAKE_ARGS = -DCURL_USE_MBEDTLS=ON \ + -DUSE_UNIX_SOCKETS=OFF \ + -DENABLE_IPV6=OFF \ + -DENABLE_THREADED_RESOLVER=OFF \ + -DBUILD_CURL_EXE=OFF \ + -DBUILD_TESTING=OFF \ + -DCURL_USE_LIBPSL=OFF \ + -DCURL_USE_LIBSSH2=OFF \ + -DCURL_BROTLI=OFF \ + -DCURL_ZSTD=OFF \ + -DUSE_NGHTTP2=OFF \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.7 \ + -DHAVE_SCHED_YIELD=0 diff --git a/expat/Makefile b/expat/Makefile deleted file mode 100644 index 6af25aa..0000000 --- a/expat/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# Port Metadata -PORTNAME = expat -PORTVERSION = 2.5.0 - -MAINTAINER = Lawrence Sebald -LICENSE = MIT (see COPYING in the source distribution) -SHORT_DESC = A C library for parsing XML - -# This port uses the autotools scripts that are included with the distfiles. -PORT_BUILD = autotools - -# Don't attempt to copy the target library, it will be in the inst dir already. -NOCOPY_TARGET = 1 - -# No external dependencies. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://github.com/libexpat/libexpat/releases/download/R_2_5_0 -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libexpat.a -HDR_INSTDIR = expat -DISTFILE_DIR = ${PORTNAME}-${PORTVERSION} - -# Autotools setup work. -CONFIGURE_ARGS = -CONFIGURE_DEFS = RANLIB=${KOS_RANLIB} AR=${KOS_AR} -MAKE_TARGET = all install - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/expat/distinfo b/expat/distinfo deleted file mode 100644 index bd13ebe..0000000 --- a/expat/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (expat-2.5.0.tar.gz) = 6b902ab103843592be5e99504f846ec109c1abb692e85347587f237a4ffa1033 -SIZE (expat-2.5.0.tar.gz) = 719235 diff --git a/expat/recipe.mk b/expat/recipe.mk new file mode 100644 index 0000000..f2042a6 --- /dev/null +++ b/expat/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +expat_PORTVERSION = 2.5.0 + +expat_MAINTAINER = Lawrence Sebald +expat_LICENSE = MIT (see COPYING in the source distribution) +expat_SHORT_DESC = A C library for parsing XML + +# This port uses the autotools scripts that are included with the distfiles. +expat_PORT_BUILD = autotools + +# What files we need to download, and where from. +expat_DOWNLOAD_SITE = https://github.com/libexpat/libexpat/releases/download/R_2_5_0 +expat_DOWNLOAD_FILE = expat-${expat_PORTVERSION}.tar.gz +expat_DOWNLOAD_SHA256 = 6b902ab103843592be5e99504f846ec109c1abb692e85347587f237a4ffa1033 diff --git a/freetype/Makefile b/freetype/Makefile deleted file mode 100644 index 90c4142..0000000 --- a/freetype/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Port Metadata -PORTNAME = freetype -PORTVERSION = 2.13.3 - -MAINTAINER = Lawrence Sebald -LICENSE = FreeType License or GPLv2 (see docs/LICENSE.TXT in the source distribution) -SHORT_DESC = Freely available software library to render fonts of various types. - -# This port uses the autotools scripts that are included with the distfiles. -PORT_BUILD = autotools - -# Don't attempt to copy the target library, it will be in the inst dir already. -NOCOPY_TARGET = 1 - -# FreeType optionally uses bz2lib, zlib, and libpng. Provide them. -DEPENDENCIES = libbz2 zlib libpng - -# What files we need to download, and where from. -DOWNLOAD_SITES = https://download.savannah.gnu.org/releases/freetype/ \ - https://sourceforge.net/projects/freetype/files/freetype2/2.13.3/ -DOWNLOAD_FILES = freetype-2.13.3.tar.gz - -TARGET = libfreetype.a -HDR_FULLDIR = freetype2 -DISTFILE_DIR = freetype-${PORTVERSION} - - -# Autotools setup work. -CONFIGURE_ARGS = --disable-mmap --with-brotli=no --with-harfbuzz=no -CONFIGURE_DEFS = ZLIB_CFLAGS=-I${KOS_PORTS}/include/zlib ZLIB_LIBS=-lz \ - BZIP2_CFLAGS=-I${KOS_PORTS}/include/bzlib BZIP2_LIBS=-lbz2 \ - LIBPNG_CFLAGS="-I${KOS_PORTS}/include/png -std=gnu11" LIBPNG_LIBS=-lpng -MAKE_TARGET = all install - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/freetype/distinfo b/freetype/distinfo deleted file mode 100644 index f1007ba..0000000 --- a/freetype/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (freetype-2.13.3.tar.gz) = 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 -SIZE (freetype-2.13.3.tar.gz) = 4063324 diff --git a/freetype/recipe.mk b/freetype/recipe.mk new file mode 100644 index 0000000..58e0336 --- /dev/null +++ b/freetype/recipe.mk @@ -0,0 +1,20 @@ +# Port Metadata +freetype_PORTVERSION = 2.13.3 + +freetype_MAINTAINER = Lawrence Sebald +freetype_LICENSE = FreeType License or GPLv2 (see docs/LICENSE.TXT in the source distribution) +freetype_SHORT_DESC = Freely available software library to render fonts of various types. + +# This port uses the autotools scripts that are included with the distfiles. +freetype_PORT_BUILD = autotools + +# FreeType optionally uses bz2lib, zlib, and libpng. Provide them. +freetype_DEPENDENCIES = libbz2 zlib libpng + +# What files we need to download, and where from. +freetype_DOWNLOAD_SITE = https://download.savannah.gnu.org/releases/freetype/ +freetype_DOWNLOAD_FILE = freetype-2.13.3.tar.gz +freetype_DOWNLOAD_SHA256 = 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 + +# Autotools setup work. +freetype_CONFIGURE_ARGS = --disable-mmap --with-brotli=no --with-harfbuzz=no diff --git a/kos-jpeg/files/KOSMakefile.mk b/kos-jpeg/files/KOSMakefile.mk new file mode 100644 index 0000000..ffd2351 --- /dev/null +++ b/kos-jpeg/files/KOSMakefile.mk @@ -0,0 +1,6 @@ +TARGET = libkos-jpeg.a +OBJS = kos_img.o kos_texture.o + +include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -I. diff --git a/libjpeg/files/kos_img.c b/kos-jpeg/files/kos_img.c similarity index 99% rename from libjpeg/files/kos_img.c rename to kos-jpeg/files/kos_img.c index e54c436..f137571 100644 --- a/libjpeg/files/kos_img.c +++ b/kos-jpeg/files/kos_img.c @@ -12,7 +12,9 @@ #include #include #include -#include "jpeglib.h" +#include + +#include "kosjpeg.h" #include #include diff --git a/libjpeg/files/kos_texture.c b/kos-jpeg/files/kos_texture.c similarity index 99% rename from libjpeg/files/kos_texture.c rename to kos-jpeg/files/kos_texture.c index eba48a2..8219e5f 100644 --- a/libjpeg/files/kos_texture.c +++ b/kos-jpeg/files/kos_texture.c @@ -1,6 +1,8 @@ /* Included from Andrew Kieschnick's Burritro */ #include -#include "jpeglib.h" +#include + +#include "kosjpeg.h" /* load n x n textures from jpegs */ diff --git a/libjpeg/files/jpeg.h b/kos-jpeg/files/kosjpeg.h similarity index 82% rename from libjpeg/files/jpeg.h rename to kos-jpeg/files/kosjpeg.h index 7a385ce..9478b3c 100644 --- a/libjpeg/files/jpeg.h +++ b/kos-jpeg/files/kosjpeg.h @@ -1,11 +1,11 @@ /* KallistiOS ##version## - jpeg.h + kosjpeg.h (c)2001 Megan Potter */ -#ifndef __JPEG_JPEG_H -#define __JPEG_JPEG_H +#ifndef __JPEG_KOSJPEG_H +#define __JPEG_KOSJPEG_H #include __BEGIN_DECLS @@ -24,5 +24,5 @@ int jpeg_to_img(const char *filename, int scale, kos_img_t *rv); __END_DECLS -#endif /* __JPEG_JPEG_H */ +#endif /* __JPEG_KOSJPEG_H */ diff --git a/kos-jpeg/pkg-descr b/kos-jpeg/pkg-descr new file mode 100644 index 0000000..2058eb3 --- /dev/null +++ b/kos-jpeg/pkg-descr @@ -0,0 +1,4 @@ +The kos-jpeg library includes a bit of additional functionality to directly +read JPEG images into textures or KOS platform-independent images. + +URL: http://ijg.org/ diff --git a/kos-jpeg/recipe.mk b/kos-jpeg/recipe.mk new file mode 100644 index 0000000..02f1b24 --- /dev/null +++ b/kos-jpeg/recipe.mk @@ -0,0 +1,11 @@ +# Port Metadata +kos-jpeg_PORTVERSION = 9.5 + +kos-jpeg_MAINTAINER = Lawrence Sebald +kos-jpeg_LICENSE = IJG license (see README in the source distribution!) +kos-jpeg_SHORT_DESC = Freely available lossy image compression library (with KOS additions) + +kos-jpeg_DEPENDENCIES = libjpeg + +kos-jpeg_TARGET = libkos-jpeg.a +kos-jpeg_INSTALLED_HDRS = kosjpeg.h diff --git a/kos-png/files/KOSMakefile.mk b/kos-png/files/KOSMakefile.mk new file mode 100644 index 0000000..ebc2502 --- /dev/null +++ b/kos-png/files/KOSMakefile.mk @@ -0,0 +1,6 @@ +TARGET = libkos-png.a +OBJS = kos_img.o kos_texture.o readpng.o writepng.o + +include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CFLAGS += -I. -I${KOS_PORTS}/sysroot/include/libpng16 diff --git a/libpng/files/kos_img.c b/kos-png/files/kos_img.c similarity index 99% rename from libpng/files/kos_img.c rename to kos-png/files/kos_img.c index 5e8e3f5..f358fcd 100644 --- a/libpng/files/kos_img.c +++ b/kos-png/files/kos_img.c @@ -10,7 +10,7 @@ #include #include -#include "png.h" +#include "kospng.h" #include "readpng.h" /* load an n x n texture from a png */ diff --git a/libpng/files/kos_texture.c b/kos-png/files/kos_texture.c similarity index 100% rename from libpng/files/kos_texture.c rename to kos-png/files/kos_texture.c diff --git a/libpng/files/kospng.h b/kos-png/files/kospng.h similarity index 100% rename from libpng/files/kospng.h rename to kos-png/files/kospng.h diff --git a/libpng/files/readpng.c b/kos-png/files/readpng.c similarity index 100% rename from libpng/files/readpng.c rename to kos-png/files/readpng.c diff --git a/libpng/files/readpng.h b/kos-png/files/readpng.h similarity index 100% rename from libpng/files/readpng.h rename to kos-png/files/readpng.h diff --git a/libpng/files/writepng.c b/kos-png/files/writepng.c similarity index 100% rename from libpng/files/writepng.c rename to kos-png/files/writepng.c diff --git a/kos-png/pkg-descr b/kos-png/pkg-descr new file mode 100644 index 0000000..f63ada7 --- /dev/null +++ b/kos-png/pkg-descr @@ -0,0 +1,4 @@ +The kos-png library includes a bit of additional functionality to directly +read PNG images into textures or KOS platform-independent images. + +URL: http://libpng.org/pub/png/libpng.html diff --git a/kos-png/recipe.mk b/kos-png/recipe.mk new file mode 100644 index 0000000..8113f99 --- /dev/null +++ b/kos-png/recipe.mk @@ -0,0 +1,12 @@ +# Port Metadata +kos-png_PORTVERSION = 1.6.38 + +kos-png_MAINTAINER = Lawrence Sebald +kos-png_LICENSE = zlib License - http://opensource.org/licenses/Zlib +kos-png_SHORT_DESC = Freely available lossless image compression library (with KOS additions) + +kos-png_DEPENDENCIES = libpng + +kos-png_TARGET = libkos-png.a +kos-png_INSTALLED_HDRS = kospng.h +kos-png_HDR_INSTDIR = libpng16 diff --git a/kos-zlib/files/KOSMakefile.mk b/kos-zlib/files/KOSMakefile.mk new file mode 100644 index 0000000..d878097 --- /dev/null +++ b/kos-zlib/files/KOSMakefile.mk @@ -0,0 +1,6 @@ +TARGET = libkos-zlib.a +OBJS = kos_zlib.o + +include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -DHAVE_UNISTD_H -DHAVE_STDARG_H diff --git a/zlib/files/kos_zlib.c b/kos-zlib/files/kos_zlib.c similarity index 100% rename from zlib/files/kos_zlib.c rename to kos-zlib/files/kos_zlib.c diff --git a/kos-zlib/pkg-descr b/kos-zlib/pkg-descr new file mode 100644 index 0000000..df6fab8 --- /dev/null +++ b/kos-zlib/pkg-descr @@ -0,0 +1,5 @@ +The kos-zlib library includes a bit of additional functionality to zlib, +with a function zlib_getlength() that returns the uncompressed length of +an archive. + +URL: http://zlib.net/ diff --git a/kos-zlib/recipe.mk b/kos-zlib/recipe.mk new file mode 100644 index 0000000..db78a4b --- /dev/null +++ b/kos-zlib/recipe.mk @@ -0,0 +1,10 @@ +# Port Metadata +kos-zlib_PORTVERSION = 1.3.2 + +kos-zlib_MAINTAINER = Lawrence Sebald +kos-zlib_LICENSE = zlib License - http://opensource.org/licenses/Zlib +kos-zlib_SHORT_DESC = Lossless data compression library + +kos-zlib_DEPENDENCIES = zlib + +kos-zlib_TARGET = libkos-zlib.a diff --git a/libADX/Makefile b/libADX/Makefile deleted file mode 100644 index c9703ae..0000000 --- a/libADX/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Port Metadata -PORTNAME = libADX -PORTVERSION = 1.0.1 - -MAINTAINER = SiZiOUS -LICENSE = BSD 2-Clause License -SHORT_DESC = Library for decoding ADX audio files - -KOS_MAKEFILE = Makefile - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/sega-dreamcast/libadx.git -GIT_BRANCH = master -GIT_TAG = v${PORTVERSION} - -TARGET = libADX.a -INSTALLED_HDRS = include/adx.h include/snddrv.h -HDR_INSTDIR = adx - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libADX/files/KOSMakefile.mk b/libADX/files/KOSMakefile.mk new file mode 100644 index 0000000..767fe2f --- /dev/null +++ b/libADX/files/KOSMakefile.mk @@ -0,0 +1,6 @@ +TARGET = libADX.a +OBJS = src/libadx.o src/snddrv.o + +include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libADX/recipe.mk b/libADX/recipe.mk new file mode 100644 index 0000000..d2168be --- /dev/null +++ b/libADX/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libADX_PORTVERSION = 1.0.1 + +libADX_MAINTAINER = SiZiOUS +libADX_LICENSE = BSD 2-Clause License +libADX_SHORT_DESC = Library for decoding ADX audio files + +# What files we need to download, and where from. +libADX_DOWNLOAD_SITE = https://github.com/sega-dreamcast/libADX/archive/ +libADX_DOWNLOAD_FILE = v${libADX_PORTVERSION}.tar.gz +libADX_DOWNLOAD_SHA256 = 7485a2b7d47431d5b66160c0a3769e79ce61ae9c0b317589363ef55f305e9ed1 + +libADX_TARGET = libADX.a +libADX_INSTALLED_HDRS = include/adx.h include/snddrv.h +libADX_HDR_INSTDIR = adx diff --git a/libAL/Makefile b/libAL/Makefile deleted file mode 100644 index f6779de..0000000 --- a/libAL/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Port Metadata -PORTNAME = libAL -PORTVERSION = 1.0.0 - -MAINTAINER = Luke Benstead -LICENSE = MIT License -SHORT_DESC = OpenAL implementation for KOS - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORY = https://gitlab.com/simulant/aldc.git - -TARGET = libAL.a -INSTALLED_HDRS = include/AL/al.h include/AL/alc.h include/AL/alut.h -HDR_COMDIR = AL - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libAL/files/KOSMakefile.mk b/libAL/files/KOSMakefile.mk deleted file mode 100644 index faae410..0000000 --- a/libAL/files/KOSMakefile.mk +++ /dev/null @@ -1,7 +0,0 @@ -TARGET = libAL.a -OBJS = src/alut.o src/buffer.o src/context.o src/core.o src/listener.o -OBJS += src/math.o src/platform.o src/source.o - -KOS_CFLAGS += -Iinclude -ffast-math -O3 - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/libAL/recipe.mk b/libAL/recipe.mk new file mode 100644 index 0000000..1065fe6 --- /dev/null +++ b/libAL/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +libAL_PORTVERSION = 1.0.0 + +libAL_MAINTAINER = Luke Benstead +libAL_LICENSE = MIT License +libAL_SHORT_DESC = OpenAL implementation for KOS + +libAL_DEPENDENCIES = libGL + +libAL_PORT_BUILD = cmake + +# What files we need to download, and where from. +libAL_GIT_HASH = 4716b658e05ee39387aca0639276e239b1cca188 +libAL_DOWNLOAD_SITE = https://gitlab.com/simulant/aldc/-/archive/${libAL_GIT_HASH}/ +libAL_DOWNLOAD_FILE = aldc-${libAL_GIT_HASH}.tar.gz + +libAL_CMAKE_ARGS = -DBUILD_SAMPLES=OFF diff --git a/libGL/Makefile b/libGL/Makefile deleted file mode 100644 index dcad81d..0000000 --- a/libGL/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# Port Metadata -PORTNAME = libGL -PORTVERSION = 1.1.1 - -MAINTAINER = Luke Benstead -LICENSE = 2-clause BSD (see LICENSE in the source distribution) -SHORT_DESC = GLdc, an OpenGL (tm) like graphics library for KOS - -PORT_BUILD = cmake - -GIT_REPOSITORY = https://gitlab.com/simulant/GLdc.git - -TARGET = libGL.a libGLU.a -INSTALLED_HDRS = include/GL/gl.h include/GL/glext.h include/GL/glkos.h include/GL/glu.h -HDR_COMDIR = GL -EXAMPLES_DIR = samples - -# -DCMAKE_BUILD_TYPE=Release forces GLdc to build with upstream's release optimization -# flags. Remove this argument to create a build without overriding $KOS_CFLAGS. -# Add -DBUILD_SAMPLES=OFF and/or -DBUILD_TESTS=OFF to speed up compilation by skipping -# the compilation of GLdc's samples and tests. -CMAKE_ARGS = -DCMAKE_BUILD_TYPE=Release - -PREINSTALL = move_samples - -include ${KOS_PORTS}/scripts/kos-ports.mk -move_samples: - @mv build/${PORTNAME}-${PORTVERSION}/*.elf build/${PORTNAME}-${PORTVERSION}/samples 2>/dev/null || true diff --git a/libGL/recipe.mk b/libGL/recipe.mk new file mode 100644 index 0000000..c683b35 --- /dev/null +++ b/libGL/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +libGL_PORTVERSION = 1.1.1 + +libGL_MAINTAINER = Luke Benstead +libGL_LICENSE = 2-clause BSD (see LICENSE in the source distribution) +libGL_SHORT_DESC = GLdc, an OpenGL (tm) like graphics library for KOS + +libGL_PORT_BUILD = cmake + +libGL_GIT_HASH = 5f374e7bfdb277f2c3cae61ad86118ce05e3c0d7 +libGL_DOWNLOAD_SITE = https://gitlab.com/pcercuei/GLdc/-/archive/${libGL_GIT_HASH}/ +libGL_DOWNLOAD_FILE = GLdc-${libGL_GIT_HASH}.tar.gz + +libGL_CMAKE_ARGS = -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF diff --git a/libKGL/Makefile b/libKGL/Makefile deleted file mode 100644 index 0c01da0..0000000 --- a/libKGL/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libKGL -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = KallistiGL, deprecated OpenGL (tm) like graphics library for KOS - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libgl \ - https://github.com/KallistiOS/libkgl.git - -TARGET = libKGL.a -INSTALLED_HDRS = include/gl.h include/glext.h include/glu.h include/glut.h -HDR_COMDIR = KGL - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libKGL/files/KOSMakefile.mk b/libKGL/files/KOSMakefile.mk index a644401..0841d9b 100644 --- a/libKGL/files/KOSMakefile.mk +++ b/libKGL/files/KOSMakefile.mk @@ -3,6 +3,8 @@ OBJS = gl-rgb.o gl-fog.o gl-sh4-light.o gl-light.o gl-clip.o gl-clip-arrays.o OBJS += gl-arrays.o gl-pvr.o gl-matrix.o gl-api.o gl-texture.o glu-texture.o OBJS += gl-framebuffer.o gl-cap.o gl-error.o -KOS_CFLAGS += -Iinclude -ffast-math -O3 -DBUILD_LIBGL - include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CFLAGS += -ffast-math -O3 + +$(OBJS): CPPFLAGS += -Iinclude -DBUILD_LIBGL diff --git a/libKGL/recipe.mk b/libKGL/recipe.mk new file mode 100644 index 0000000..04ba207 --- /dev/null +++ b/libKGL/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libKGL_PORTVERSION = 2.0.0 + +libKGL_MAINTAINER = Nobody +libKGL_LICENSE = KOS License +libKGL_SHORT_DESC = KallistiGL, deprecated OpenGL (tm) like graphics library for KOS + +# What files we need to download, and where from. +libKGL_GIT_HASH = 8374cbee6c350612f38aeedf9a0af541e83aae76 +libKGL_DOWNLOAD_SITE = https://github.com/KallistiOS/libkgl/archive/ +libKGL_DOWNLOAD_FILE = ${libKGL_GIT_HASH}.tar.gz + +libKGL_TARGET = libKGL.a +libKGL_INSTALLED_HDRS = include/gl.h include/glext.h include/glu.h include/glut.h +libKGL_HDR_INSTDIR = KGL diff --git a/libbearssl/Makefile b/libbearssl/Makefile deleted file mode 100644 index 08487f6..0000000 --- a/libbearssl/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Port Metadata -PORTNAME = libbearssl -PORTVERSION = 1.0.1 - -MAINTAINER = Donald Haase -LICENSE = MIT License -SHORT_DESC = BearSSL is an implementation of the SSL/TLS protocol (RFC 5246) written in C. - -KOS_MAKEFILE = Makefile - -# What files we need to download, and where from. -GIT_REPOSITORY = https://www.bearssl.org/git/BearSSL -TARGET = libbearssl.a -HDR_DIRECTORY = inc - -# Add a pre-install target to get the built library where we expect it. -PREINSTALL = bearssl_preinstall - -#bearssl directly uses CC in its makefile, so redirect it. Then only call -#the 'lib' target to avoid building tests and examples. -MAKE_TARGET = CC=kos-cc lib - -include ${KOS_PORTS}/scripts/kos-ports.mk -bearssl_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/build/${TARGET} build/${PORTNAME}-${PORTVERSION} diff --git a/libbearssl/recipe.mk b/libbearssl/recipe.mk new file mode 100644 index 0000000..9a603d1 --- /dev/null +++ b/libbearssl/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +libbearssl_PORTVERSION = 0.6 + +libbearssl_MAINTAINER = Donald Haase +libbearssl_LICENSE = MIT License +libbearssl_SHORT_DESC = BearSSL is an implementation of the SSL/TLS protocol (RFC 5246) written in C. + +# What files we need to download, and where from. +libbearssl_DOWNLOAD_SITE = https://www.bearssl.org/ +libbearssl_DOWNLOAD_FILE = bearssl-${libbearssl_PORTVERSION}.tar.gz +libbearssl_DOWNLOAD_SHA256 = 6705bba1714961b41a728dfc5debbe348d2966c117649392f8c8139efc83ff14 + +libbearssl_TARGET = build/libbearssl.a +libbearssl_HDR_DIRECTORY = inc + +libbearssl_KOS_MAKEFILE = Makefile +libbearssl_MAKE_TARGET = lib diff --git a/libbz2/Makefile b/libbz2/Makefile deleted file mode 100644 index 3177271..0000000 --- a/libbz2/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Port Metadata -PORTNAME = libbz2 -PORTVERSION = 1.0.8 - -MAINTAINER = Lawrence Sebald -LICENSE = BSD-like (see LICENSE in the source distribution) -SHORT_DESC = Block-sorting compression library - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = http://cdn-fastly.deb.debian.org/debian/pool/main/b/bzip2/ -DOWNLOAD_FILES = bzip2_1.0.8.orig.tar.gz - -TARGET = libbz2.a -INSTALLED_HDRS = bzlib.h -HDR_INSTDIR = bzlib -DISTFILE_DIR = bzip2-${PORTVERSION} - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libbz2/distinfo b/libbz2/distinfo deleted file mode 100644 index 4087833..0000000 --- a/libbz2/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (bzip2_1.0.8.orig.tar.gz) = ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 -SIZE (bzip2_1.0.8.orig.tar.gz) = 810029 diff --git a/libbz2/files/CMakeLists.txt b/libbz2/files/CMakeLists.txt new file mode 100644 index 0000000..1c63b36 --- /dev/null +++ b/libbz2/files/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.21) +project(bz2 VERSION ${BZIP2_VERSION} LANGUAGES C) + +add_library(bz2 STATIC + blocksort.c + huffman.c + crctable.c + randtable.c + compress.c + decompress.c + bzlib.c +) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set_target_properties(bz2 PROPERTIES + PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/bzlib.h +) + +include(GNUInstallDirs) + +install(TARGETS bz2 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +configure_file(bzip2.pc.in bzip2.pc @ONLY) +install(FILES ${CMAKE_BINARY_DIR}/bzip2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/libbz2/files/KOSMakefile.mk b/libbz2/files/KOSMakefile.mk deleted file mode 100644 index ddd7187..0000000 --- a/libbz2/files/KOSMakefile.mk +++ /dev/null @@ -1,7 +0,0 @@ -TARGET = libbz2.a -OBJS = blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o \ - bzlib.o - -KOS_CFLAGS += -I. - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/libbz2/files/bzip2.pc.in b/libbz2/files/bzip2.pc.in new file mode 100644 index 0000000..a89ad60 --- /dev/null +++ b/libbz2/files/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +bindir=${exec_prefix}/bin +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: bzip2 +Description: A file compression library +Version: @BZIP2_VERSION@ +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir} diff --git a/libbz2/recipe.mk b/libbz2/recipe.mk new file mode 100644 index 0000000..8bd2267 --- /dev/null +++ b/libbz2/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libbz2_PORTVERSION = 1.0.8 + +libbz2_MAINTAINER = Lawrence Sebald +libbz2_LICENSE = BSD-like (see LICENSE in the source distribution) +libbz2_SHORT_DESC = Block-sorting compression library + +libbz2_PORT_BUILD = cmake + +# What files we need to download, and where from. +libbz2_DOWNLOAD_SITE = http://cdn-fastly.deb.debian.org/debian/pool/main/b/bzip2/ +libbz2_DOWNLOAD_FILE = bzip2_1.0.8.orig.tar.gz +libbz2_DOWNLOAD_SHA256 = ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 + +CMAKE_ARGS = -DBZIP2_VERSION=${libbz2_PORTVERSION} diff --git a/libchipmunk/Makefile b/libchipmunk/Makefile deleted file mode 100644 index c4fc9e4..0000000 --- a/libchipmunk/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# Port Metadata -PORTNAME = libchipmunk -PORTVERSION = 7.0.3.1 - -MAINTAINER = Donald Haase -LICENSE = MIT -SHORT_DESC = A fast and lightweight 2D game physics library. - -# This port uses CMake. -PORT_BUILD = cmake - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/slembcke/Chipmunk2D.git -#Official Chipmunk 7.0.3 does not build, so building straight from master -#GIT_BRANCH = Chipmunk-$(PORTVERSION) -TARGET = libchipmunk.a - -# This is required because the built-in cmake doesn't support custom install -# of headers. It does support custom installation of the lib itself via -# -DINSTALL_STATIC=ON and -DLIB_INSTALL_DIR=${KOS_PORTS}/${PORTNAME}/inst/lib -# But that forces the attempt to install the headers locally. -HDR_DIRECTORY = include/chipmunk - -# If the header installation issue above is fixed then install_static can be changed -# Build_demos is reliant on a built-in library sokol that doesn't have a DC port -CMAKE_ARGS = -DBUILD_STATIC=ON -DBUILD_SHARED=OFF -DBUILD_DEMOS=OFF -DINSTALL_STATIC=OFF - -# Add a pre-install target to get the built library where we expect it. -# This, copied from opus, might be solvable by -# adding an equivalent to HDR_DIRECTORY for lib -PREINSTALL = chipmunk_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk -chipmunk_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/src/${TARGET} build/${PORTNAME}-${PORTVERSION} diff --git a/libchipmunk/recipe.mk b/libchipmunk/recipe.mk new file mode 100644 index 0000000..8f08d4f --- /dev/null +++ b/libchipmunk/recipe.mk @@ -0,0 +1,18 @@ +# Port Metadata +libchipmunk_PORTVERSION = 7.0.3.1 + +libchipmunk_MAINTAINER = Donald Haase +libchipmunk_LICENSE = MIT +libchipmunk_SHORT_DESC = A fast and lightweight 2D game physics library. + +# This port uses CMake. +libchipmunk_PORT_BUILD = cmake + +# What files we need to download, and where from. +#Official Chipmunk 7.0.3 does not build, so building straight from master +libchipmunk_GIT_HASH = f2f3d66220b8bb1568b8402c6d194d73d4e477d1 +libchipmunk_DOWNLOAD_SITE = https://github.com/slembcke/Chipmunk2D/archive/ +libchipmunk_DOWNLOAD_FILE = ${libchipmunk_GIT_HASH}.tar.gz + +# Build_demos is reliant on a built-in library sokol that doesn't have a DC port +libchipmunk_CMAKE_ARGS = -DBUILD_STATIC=ON -DBUILD_SHARED=OFF -DBUILD_DEMOS=OFF -DINSTALL_STATIC=ON diff --git a/libcmark/Makefile b/libcmark/Makefile deleted file mode 100644 index 8fe632e..0000000 --- a/libcmark/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Port Metadata -PORTNAME = libcmark -PORTVERSION = 0.31.2 - -MAINTAINER = Donald Haase -LICENSE = Custom (see the file COPYING provided with headers or at https://github.com/commonmark/cmark/blob/master/COPYING) -SHORT_DESC = CommonMark parsing and rendering library and program in C - -# This port uses CMake. -PORT_BUILD = cmake - -# This directs the behavior of creating a subdirectory 'build' and executing cmake at '..' -CMAKE_OUTSOURCE = 1 - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/commonmark/cmark.git -GIT_BRANCH = ${PORTVERSION} -TARGET = libcmark.a - -INSTALLED_HDRS = src/*.h COPYING - -CMAKE_ARGS = -DBUILD_SHARED_LIBS=NO -DBUILD_TESTING=NO - -# Add a pre-install target to get the built library where we expect it. -# This, copied from opus, might be solvable by -# adding an equivalent to HDR_DIRECTORY for lib -PREINSTALL = cmark_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk -cmark_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/build/src/${TARGET} build/${TARGET} diff --git a/libcmark/recipe.mk b/libcmark/recipe.mk new file mode 100644 index 0000000..0917e83 --- /dev/null +++ b/libcmark/recipe.mk @@ -0,0 +1,16 @@ +# Port Metadata +libcmark_PORTVERSION = 0.31.2 + +libcmark_MAINTAINER = Donald Haase +libcmark_LICENSE = Custom (see the file COPYING provided with headers or at https://github.com/commonmark/cmark/blob/master/COPYING) +libcmark_SHORT_DESC = CommonMark parsing and rendering library and program in C + +# This port uses CMake. +libcmark_PORT_BUILD = cmake + +# What files we need to download, and where from. +libcmark_DOWNLOAD_SITE = https://github.com/commonmark/cmark/archive/ +libcmark_DOWNLOAD_FILE = ${libcmark_PORTVERSION}.tar.gz +libcmark_DOWNLOAD_SHA256 = f9bc5ca38bcb0b727f0056100fac4d743e768872e3bacec7746de28f5700d697 + +libcmark_CMAKE_ARGS = -DBUILD_TESTING=NO diff --git a/libconio/Makefile b/libconio/Makefile deleted file mode 100644 index 0b7b588..0000000 --- a/libconio/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libconio -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = Console-like I/O library - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libconio \ - https://github.com/KallistiOS/libconio.git - -TARGET = libconio.a -INSTALLED_HDRS = include/conio.h include/draw.h include/input.h -HDR_INSTDIR = conio - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libconio/files/KOSMakefile.mk b/libconio/files/KOSMakefile.mk index 7a07880..1f12fd5 100644 --- a/libconio/files/KOSMakefile.mk +++ b/libconio/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libconio.a OBJS = conio.o draw.o input.o -KOS_CFLAGS += -Iinclude -DBUILD_LIBCONIO -DGFX include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CFLAGS += -Iinclude -DBUILD_LIBCONIO -DGFX diff --git a/libconio/recipe.mk b/libconio/recipe.mk new file mode 100644 index 0000000..0ebb1a1 --- /dev/null +++ b/libconio/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libconio_PORTVERSION = 2.0.0 + +libconio_MAINTAINER = Nobody +libconio_LICENSE = KOS License +libconio_SHORT_DESC = Console-like I/O library + +# What files we need to download, and where from. +libconio_GIT_HASH = 36c234b93c6ba44b58417c18b45828ec62b4d1c2 +libconio_DOWNLOAD_SITE = https://github.com/KallistiOS/libconio/archive/ +libconio_DOWNLOAD_FILE = ${libconio_GIT_HASH}.tar.gz + +libconio_TARGET = libconio.a +libconio_INSTALLED_HDRS = include/conio.h include/draw.h include/input.h +libconio_HDR_INSTDIR = conio diff --git a/libdcplib/Makefile b/libdcplib/Makefile deleted file mode 100644 index 9505421..0000000 --- a/libdcplib/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libdcplib -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = LGPLv2 (with embedded system exemption) -SHORT_DESC = A portable game programming library - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libdcplib \ - https://github.com/KallistiOS/libdcplib.git - -TARGET = libdcplib.a -INSTALLED_HDRS = include/fnt.h include/sg.h include/ul.h -HDR_INSTDIR = dcplib - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libdcplib/files/KOSMakefile.mk b/libdcplib/files/KOSMakefile.mk index 7890922..ede67a1 100644 --- a/libdcplib/files/KOSMakefile.mk +++ b/libdcplib/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libdcplib.a OBJS = ulError.o sg.o fnt.o fntTXF.o sgd.o sgIsect.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libdcplib/recipe.mk b/libdcplib/recipe.mk new file mode 100644 index 0000000..7ef9958 --- /dev/null +++ b/libdcplib/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libdcplib_PORTVERSION = 2.0.0 + +libdcplib_MAINTAINER = Nobody +libdcplib_LICENSE = LGPLv2 (with embedded system exemption) +libdcplib_SHORT_DESC = A portable game programming library + +# What files we need to download, and where from. +libdcplib_GIT_HASH = 0553d0f1e04e4349668912255d9cb1cf9dcdd3a5 +libdcplib_DOWNLOAD_SITE = https://github.com/KallistiOS/libdcplib/archive/ +libdcplib_DOWNLOAD_FILE = ${libdcplib_GIT_HASH}.tar.gz + +libdcplib_TARGET = libdcplib.a +libdcplib_INSTALLED_HDRS = include/fnt.h include/sg.h include/ul.h +libdcplib_HDR_INSTDIR = dcplib diff --git a/libfastmem/Makefile b/libfastmem/Makefile deleted file mode 100644 index 4b903e1..0000000 --- a/libfastmem/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Port Metadata -PORTNAME = libfastmem -PORTVERSION = 1.0.0 - -MAINTAINER = SiZiOUS -LICENSE = LGPLv2.1 -SHORT_DESC = Very optimized set of memory manipulation functions - -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/sega-dreamcast/libfastmem.git - -TARGET = libfastmem.a -INSTALLED_HDRS = include/fastmem.h -HDR_INSTDIR = fastmem - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libfastmem/files/KOSMakefile.mk b/libfastmem/files/KOSMakefile.mk index 7c4b493..3dedd48 100644 --- a/libfastmem/files/KOSMakefile.mk +++ b/libfastmem/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libfastmem.a OBJS = memcpy_fast.o memset_fast.o memmove_fast.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libfastmem/recipe.mk b/libfastmem/recipe.mk new file mode 100644 index 0000000..6d088cf --- /dev/null +++ b/libfastmem/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libfastmem_PORTVERSION = 1.0.0 + +libfastmem_MAINTAINER = SiZiOUS +libfastmem_LICENSE = LGPLv2.1 +libfastmem_SHORT_DESC = Very optimized set of memory manipulation functions + +# What files we need to download, and where from. +libfastmem_GIT_HASH = d63e367b89f41040f70614ed5df1f4e7ca43c506 +libfastmem_DOWNLOAD_SITE = https://github.com/sega-dreamcast/libfastmem/archive/ +libfastmem_DOWNLOAD_FILE = ${libfastmem_GIT_HASH}.tar.gz + +libfastmem_TARGET = libfastmem.a +libfastmem_INSTALLED_HDRS = include/fastmem.h +libfastmem_HDR_INSTDIR = fastmem diff --git a/libimageload/Makefile b/libimageload/Makefile deleted file mode 100644 index 168b6d6..0000000 --- a/libimageload/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Port Metadata -PORTNAME = libimageload -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = Library for decoding BMP, JPEG, and PCX images - -DEPENDENCIES = libjpeg - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libimageload \ - https://github.com/KallistiOS/libimageload.git - -TARGET = libimageload.a -INSTALLED_HDRS = include/imageload.h include/jitterdefs.h -HDR_INSTDIR = imageload - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libimageload/files/KOSMakefile.mk b/libimageload/files/KOSMakefile.mk index 859ce59..4a767c6 100644 --- a/libimageload/files/KOSMakefile.mk +++ b/libimageload/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libimageload.a OBJS = readpcx.o readbmp.o readjpeg.o imageload.o jitter.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libimageload/patches/fix-build.patch b/libimageload/patches/fix-build.patch new file mode 100644 index 0000000..96bbaa8 --- /dev/null +++ b/libimageload/patches/fix-build.patch @@ -0,0 +1,13 @@ +diff --git a/readjpeg.c b/readjpeg.c +index f15da3d..ab39d90 100644 +--- a/readjpeg.c ++++ b/readjpeg.c +@@ -2,7 +2,7 @@ + #include + #include + #include +-#include ++#include + + static struct jpeg_decompress_struct cinfo; + static struct jpeg_error_mgr jerr; diff --git a/libimageload/recipe.mk b/libimageload/recipe.mk new file mode 100644 index 0000000..6591212 --- /dev/null +++ b/libimageload/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +libimageload_PORTVERSION = 2.0.0 + +libimageload_MAINTAINER = Nobody +libimageload_LICENSE = KOS License +libimageload_SHORT_DESC = Library for decoding BMP, JPEG, and PCX images + +libimageload_DEPENDENCIES = libjpeg + +# What files we need to download, and where from. +libimageload_GIT_HASH = d77ceb46f196f1866515524ed6d814eb5108268a +libimageload_DOWNLOAD_SITE = https://github.com/KallistiOS/libimageload/archive/ +libimageload_DOWNLOAD_FILE = ${libimageload_GIT_HASH}.tar.gz + +libimageload_TARGET = libimageload.a +libimageload_INSTALLED_HDRS = include/imageload.h include/jitterdefs.h +libimageload_HDR_INSTDIR = imageload diff --git a/libjimtcl/Makefile b/libjimtcl/Makefile deleted file mode 100644 index 60573ae..0000000 --- a/libjimtcl/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Port Metadata -PORTNAME = libjimtcl -PORTVERSION = 1.0.0 - -MAINTAINER = Spencer (@spencerelliott) -LICENSE = FreeBSD -SHORT_DESC = An open-source, small footprint implementation of Tcl - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/msteveb/jimtcl.git - -TARGET = libjim.a -INSTALLED_HDRS = jim.h jim-win32compat.h jim-config.h -HDR_INSTDIR = jimtcl - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libjimtcl/files/KOSMakefile.mk b/libjimtcl/files/KOSMakefile.mk deleted file mode 100644 index 88362a9..0000000 --- a/libjimtcl/files/KOSMakefile.mk +++ /dev/null @@ -1,18 +0,0 @@ -PORTNAME = libjimtcl -CONFIGURE_ARGS = --without-ext="aio,zlib" -MAKE_TARGET = libjim.a -HDR_INSTDIR = jimtcl - -AUTOTOOLS_HOST = sh-elf - -all: build-libjim fix-jimh - -build-libjim: - CC=kos-cc ${CONFIGURE_DEFS} ./configure --prefix=${KOS_PORTS}/${PORTNAME}/inst --host=${AUTOTOOLS_HOST} ${CONFIGURE_ARGS} ; \ - $(MAKE) ${MAKE_TARGET} - -fix-jimh: - sed -i'' -e "s@#include @#include <${HDR_INSTDIR}/jim-win32compat.h>@g" jim.h - sed -i'' -e "s@#include @#include <${HDR_INSTDIR}/jim-config.h>@g" jim.h - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/libjimtcl/recipe.mk b/libjimtcl/recipe.mk new file mode 100644 index 0000000..2d086a6 --- /dev/null +++ b/libjimtcl/recipe.mk @@ -0,0 +1,16 @@ +# Port Metadata +libjimtcl_PORTVERSION = 1.0.0 + +libjimtcl_MAINTAINER = Spencer (@spencerelliott) +libjimtcl_LICENSE = FreeBSD +libjimtcl_SHORT_DESC = An open-source, small footprint implementation of Tcl + +libjimtcl_PORT_BUILD = autotools + +# What files we need to download, and where from. +libjimtcl_GIT_HASH = ac7c48b9ba841d6d0e90dda5dafaa174a3e02679 +libjimtcl_DOWNLOAD_SITE = https://github.com/msteveb/jimtcl/archive/ +libjimtcl_DOWNLOAD_FILE = ${libjimtcl_GIT_HASH}.tar.gz + +libjimtcl_CONFIGURE_ARGS = --without-ext="aio,zlib" +libjimtcl_CONFIGURE_NO_CACHE_FILE = 1 diff --git a/libjpeg/Makefile b/libjpeg/Makefile deleted file mode 100644 index 2437fc4..0000000 --- a/libjpeg/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Port Metadata -PORTNAME = libjpeg -PORTVERSION = 9.5 - -MAINTAINER = Lawrence Sebald -LICENSE = IJG license (see README in the source distribution!) -SHORT_DESC = Freely available lossy image compression library (with KOS additions) - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITES = http://ijg.org/files \ - https://sources.buildroot.net/libjpeg/ -DOWNLOAD_FILES = jpegsrc.v9e.tar.gz - -TARGET = libjpeg.a -INSTALLED_HDRS = jconfig.h jmorecfg.h jpeg.h jpeglib.h jpegint.h jerror.h -HDR_INSTDIR = jpeg -DISTFILE_DIR = jpeg-9e - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk kos_img.c kos_texture.c jpeg.h - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libjpeg/distinfo b/libjpeg/distinfo deleted file mode 100644 index 65a323a..0000000 --- a/libjpeg/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (jpegsrc.v9e.tar.gz) = 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d -SIZE (jpegsrc.v9e.tar.gz) = 1046935 diff --git a/libjpeg/files/KOSMakefile.mk b/libjpeg/files/KOSMakefile.mk deleted file mode 100644 index e623ed4..0000000 --- a/libjpeg/files/KOSMakefile.mk +++ /dev/null @@ -1,23 +0,0 @@ -TARGET = libjpeg.a - -COMOBJECTS = jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o -CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \ - jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \ - jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \ - jfdctflt.o jfdctint.o -DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \ - jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \ - jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \ - jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -KOSOBJECTS = kos_img.o kos_texture.o -OBJS = $(COMOBJECTS) $(CLIBOBJECTS) $(DLIBOBJECTS) $(KOSOBJECTS) - -KOS_CFLAGS += -I. - -defaultall: jconfig.h $(OBJS) subdirs linklib - -# Force the configuration file to be generated. -jconfig.h: jconfig.txt - cp $< $@ - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/libjpeg/pkg-descr b/libjpeg/pkg-descr index 2868999..a839605 100644 --- a/libjpeg/pkg-descr +++ b/libjpeg/pkg-descr @@ -2,7 +2,4 @@ libjpeg is a freely available library that implements the JPEG image compression and decompression algorithms. JPEG is a lossy image compression format that does not support alpha channels. -The KOS port of this library includes a bit of additional functionality to -directly read JPEG images into textures or KOS platform-independent images. - URL: http://ijg.org/ diff --git a/libjpeg/recipe.mk b/libjpeg/recipe.mk new file mode 100644 index 0000000..09f4043 --- /dev/null +++ b/libjpeg/recipe.mk @@ -0,0 +1,13 @@ +# Port Metadata +libjpeg_PORTVERSION = 9.5 + +libjpeg_MAINTAINER = Lawrence Sebald +libjpeg_LICENSE = IJG license (see README in the source distribution!) +libjpeg_SHORT_DESC = Freely available lossy image compression library (with KOS additions) + +libjpeg_PORT_BUILD = autotools + +# What files we need to download, and where from. +libjpeg_DOWNLOAD_SITE = https://ijg.org/files +libjpeg_DOWNLOAD_FILE = jpegsrc.v9e.tar.gz +libjpeg_DOWNLOAD_SHA256 = 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d diff --git a/libkmg/Makefile b/libkmg/Makefile deleted file mode 100644 index f5904fe..0000000 --- a/libkmg/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libkmg -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = Library for decoding KMG images - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libkmg \ - https://github.com/KallistiOS/libkmg.git - -TARGET = libkmg.a -INSTALLED_HDRS = include/kmg.h -HDR_INSTDIR = kmg - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libkmg/files/KOSMakefile.mk b/libkmg/files/KOSMakefile.mk index adbc4b0..a6dd0da 100644 --- a/libkmg/files/KOSMakefile.mk +++ b/libkmg/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libkmg.a OBJS = kmg.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libkmg/recipe.mk b/libkmg/recipe.mk new file mode 100644 index 0000000..3a6ef56 --- /dev/null +++ b/libkmg/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libkmg_PORTVERSION = 2.0.0 + +libkmg_MAINTAINER = Nobody +libkmg_LICENSE = KOS License +libkmg_SHORT_DESC = Library for decoding KMG images + +# What files we need to download, and where from. +libkmg_GIT_HASH = d3c82b9bc82bb27cc3b1bb0bfbbb421e4315b6cf +libkmg_DOWNLOAD_SITE = https://github.com/KallistiOS/libkmg/archive/ +libkmg_DOWNLOAD_FILE = ${libkmg_GIT_HASH}.tar.gz + +libkmg_TARGET = libkmg.a +libkmg_INSTALLED_HDRS = include/kmg.h +libkmg_HDR_INSTDIR = kmg diff --git a/libkosh/Makefile b/libkosh/Makefile deleted file mode 100644 index c1758ab..0000000 --- a/libkosh/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Port Metadata -PORTNAME = libkosh -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = The KallistiOS shell (library) - -DEPENDENCIES = libconio - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libkosh \ - https://github.com/KallistiOS/libkosh.git - -TARGET = libkosh.a -INSTALLED_HDRS = include/kosh.h -HDR_INSTDIR = kosh - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libkosh/files/KOSMakefile.mk b/libkosh/files/KOSMakefile.mk index 71d8420..ff51777 100644 --- a/libkosh/files/KOSMakefile.mk +++ b/libkosh/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libkosh.a OBJS = kosh.o builtin.o chdir.o input.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libkosh/recipe.mk b/libkosh/recipe.mk new file mode 100644 index 0000000..f3281af --- /dev/null +++ b/libkosh/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +libkosh_PORTVERSION = 2.0.0 + +libkosh_MAINTAINER = Nobody +libkosh_LICENSE = KOS License +libkosh_SHORT_DESC = The KallistiOS shell (library) + +libkosh_DEPENDENCIES = libconio + +# What files we need to download, and where from. +libkosh_GIT_HASH = 535a1f04c141aa61ae176dc2d11c373ab8b6c493 +libkosh_DOWNLOAD_SITE = https://github.com/KallistiOS/libkosh/archive/ +libkosh_DOWNLOAD_FILE = ${libkosh_GIT_HASH}.tar.gz + +libkosh_TARGET = libkosh.a +libkosh_INSTALLED_HDRS = include/kosh.h +libkosh_HDR_INSTDIR = kosh diff --git a/libmodplug/Makefile b/libmodplug/Makefile deleted file mode 100644 index 33eea53..0000000 --- a/libmodplug/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libmodplug -PORTVERSION = 0.7 - -MAINTAINER = Nobody -LICENSE = Public Domain -SHORT_DESC = A library for MOD-like tracker music formats - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libmodplug \ - https://github.com/KallistiOS/libmodplug.git - -TARGET = libmodplug.a -INSTALLED_HDRS = include/modplug.h include/sndfile.h include/stdafx.h -HDR_INSTDIR = modplug - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libmodplug/files/KOSMakefile.mk b/libmodplug/files/KOSMakefile.mk index 7bdc491..d5b0dae 100644 --- a/libmodplug/files/KOSMakefile.mk +++ b/libmodplug/files/KOSMakefile.mk @@ -1,5 +1,4 @@ TARGET = libmodplug.a -KOS_CFLAGS += -Iinclude -DMODPLUG_BASIC_SUPPORT -DFASTSOUNDLIB OBJS= tables.o \ sndmix.o \ sndfile.o \ @@ -35,3 +34,5 @@ OBJS= tables.o \ include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude -DMODPLUG_BASIC_SUPPORT -DFASTSOUNDLIB diff --git a/libmodplug/recipe.mk b/libmodplug/recipe.mk new file mode 100644 index 0000000..34dbd2b --- /dev/null +++ b/libmodplug/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libmodplug_PORTVERSION = 0.7 + +libmodplug_MAINTAINER = Nobody +libmodplug_LICENSE = Public Domain +libmodplug_SHORT_DESC = A library for MOD-like tracker music formats + +# What files we need to download, and where from. +libmodplug_GIT_HASH = 331710dcc362013080e621d51d826c05e880022a +libmodplug_DOWNLOAD_SITE = https://github.com/KallistiOS/libmodplug/archive/ +libmodplug_DOWNLOAD_FILE = ${libmodplug_GIT_HASH}.tar.gz + +libmodplug_TARGET = libmodplug.a +libmodplug_INSTALLED_HDRS = include/modplug.h include/sndfile.h include/stdafx.h +libmodplug_HDR_INSTDIR = modplug diff --git a/libmp3/Makefile b/libmp3/Makefile deleted file mode 100644 index 95ff633..0000000 --- a/libmp3/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libmp3 -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = GPLv2+ (XingMP3) and KOS License (KOS Glue) -SHORT_DESC = Library for decoding and streaming MP3 audio - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libmp3 \ - https://github.com/KallistiOS/libmp3.git - -TARGET = libmp3.a -INSTALLED_HDRS = include/sndmp3.h include/sndserver.h -HDR_INSTDIR = mp3 - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libmp3/files/KOSMakefile.mk b/libmp3/files/KOSMakefile.mk index e42107e..e530e07 100644 --- a/libmp3/files/KOSMakefile.mk +++ b/libmp3/files/KOSMakefile.mk @@ -1,6 +1,9 @@ TARGET = libmp3.a SUBDIRS = xingmp3 libmp3 LIB_OBJS = build/*.o -KOS_CFLAGS += -Iinclude -std=c17 include ${KOS_PORTS}/scripts/lib.mk + +$(LIB_OBJS): CPPFLAGS += -Iinclude + +$(LIB_OBJS): CFLAGS += -std=c17 diff --git a/libmp3/recipe.mk b/libmp3/recipe.mk new file mode 100644 index 0000000..46d89e1 --- /dev/null +++ b/libmp3/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libmp3_PORTVERSION = 2.0.0 + +libmp3_MAINTAINER = Nobody +libmp3_LICENSE = GPLv2+ (XingMP3) and KOS License (KOS Glue) +libmp3_SHORT_DESC = Library for decoding and streaming MP3 audio + +# What files we need to download, and where from. +libmp3_GIT_HASH = 1a1360238f98a8dc2d91e752c366ffb8d24e41ff +libmp3_DOWNLOAD_SITE = https://github.com/KallistiOS/libmp3/archive/ +libmp3_DOWNLOAD_FILE = ${libmp3_GIT_HASH}.tar.gz + +libmp3_TARGET = libmp3.a +libmp3_INSTALLED_HDRS = include/sndmp3.h include/sndserver.h +libmp3_HDR_INSTDIR = mp3 diff --git a/libmpeg/Makefile b/libmpeg/Makefile deleted file mode 100644 index 263617c..0000000 --- a/libmpeg/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Port Metadata -PORTNAME = libmpeg -PORTVERSION = 1.0.0 - -MAINTAINER = Andy Barajas -LICENSE = MIT -SHORT_DESC = Library for decoding MPEG1 Video, MP2 Audio using pl_mpeg - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://github.com/Dreamcast-Projects/pl_mpeg/archive/refs/tags -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libmpeg.a -INSTALLED_HDRS = mpeg.h -HDR_INSTDIR = mpeg -DISTFILE_DIR = pl_mpeg-${PORTNAME}-${PORTVERSION} - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libmpeg/distinfo b/libmpeg/distinfo deleted file mode 100644 index 3fb0b6e..0000000 --- a/libmpeg/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (libmpeg-1.0.0.tar.gz) = 914a67c7058550512d630fdf8158f3f20fa22e81248ba3db5518428084798129 -SIZE (libmpeg-1.0.0.tar.gz) = 4527455 diff --git a/libmpeg/files/KOSMakefile.mk b/libmpeg/files/KOSMakefile.mk index 4bd8307..45577de 100644 --- a/libmpeg/files/KOSMakefile.mk +++ b/libmpeg/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libmpeg.a OBJS = mpeg.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libmpeg/recipe.mk b/libmpeg/recipe.mk new file mode 100644 index 0000000..ad552f4 --- /dev/null +++ b/libmpeg/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +libmpeg_PORTVERSION = 2.0.1 + +libmpeg_MAINTAINER = Andy Barajas +libmpeg_LICENSE = MIT +libmpeg_SHORT_DESC = Library for decoding MPEG1 Video, MP2 Audio using pl_mpeg + +# What files we need to download, and where from. +libmpeg_DOWNLOAD_SITE = https://github.com/Dreamcast-Projects/pl_mpeg/archive/ +libmpeg_DOWNLOAD_FILE = v${libmpeg_PORTVERSION}.tar.gz + +libmpeg_TARGET = libmpeg.a +libmpeg_INSTALLED_HDRS = mpeg.h +libmpeg_HDR_INSTDIR = mpeg diff --git a/libogg/Makefile b/libogg/Makefile deleted file mode 100644 index ccd3b7e..0000000 --- a/libogg/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Port Metadata -PORTNAME = libogg -PORTVERSION = 1.3.5 - -MAINTAINER = Lawrence Sebald -LICENSE = 3-clause BSD (see COPYING in the source distribution) -SHORT_DESC = Multimedia container format access library - -# This port uses the autotools scripts that are included with the distfiles. -PORT_BUILD = autotools - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/ogg -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libogg.a -INSTALLED_HDRS = include/ogg/ogg.h include/ogg/os_types.h \ - include/ogg/config_types.h -HDR_INSTDIR = ogg - -# Add a pre-install target to get the built library where we expect it. -# This, copied from opus, might be solvable by -# adding an equivalent to HDR_DIRECTORY for lib -PREINSTALL = ogg_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk -ogg_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/src/.libs/${TARGET} build/${PORTNAME}-${PORTVERSION} diff --git a/libogg/distinfo b/libogg/distinfo deleted file mode 100644 index 6f3ef78..0000000 --- a/libogg/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (libogg-1.3.5.tar.gz) = 0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664 -SIZE (libogg-1.3.5.tar.gz) = 593071 diff --git a/libogg/recipe.mk b/libogg/recipe.mk new file mode 100644 index 0000000..8ea13f5 --- /dev/null +++ b/libogg/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +libogg_PORTVERSION = 1.3.5 + +libogg_MAINTAINER = Lawrence Sebald +libogg_LICENSE = 3-clause BSD (see COPYING in the source distribution) +libogg_SHORT_DESC = Multimedia container format access library + +# This port uses the autotools scripts that are included with the distfiles. +libogg_PORT_BUILD = autotools + +# What files we need to download, and where from. +libogg_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/ogg +libogg_DOWNLOAD_FILE = libogg-${libogg_PORTVERSION}.tar.gz +libogg_DOWNLOAD_SHA256 = 0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664 diff --git a/liboggvorbisplay/Makefile b/liboggvorbisplay/Makefile deleted file mode 100644 index 4b6832b..0000000 --- a/liboggvorbisplay/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Port Metadata -PORTNAME = liboggvorbisplay -PORTVERSION = 2.0.0 - -MAINTAINER = Lawrence Sebald -LICENSE = KOS License -SHORT_DESC = Ogg Vorbis audio streaming library - -DEPENDENCIES = libvorbis - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/liboggvorbis \ - https://github.com/KallistiOS/liboggvorbisplay.git - -TARGET = liboggvorbisplay.a -INSTALLED_HDRS = include/oggvorbis/sndoggvorbis.h -HDR_INSTDIR = oggvorbis - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/liboggvorbisplay/files/KOSMakefile.mk b/liboggvorbisplay/files/KOSMakefile.mk index d6bdeaf..9af734a 100644 --- a/liboggvorbisplay/files/KOSMakefile.mk +++ b/liboggvorbisplay/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = liboggvorbisplay.a OBJS = liboggvorbisplay/main.o liboggvorbisplay/sndoggvorbis.o -KOS_CFLAGS += -Iinclude -Iliboggvorbisplay include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude -Iliboggvorbisplay diff --git a/liboggvorbisplay/recipe.mk b/liboggvorbisplay/recipe.mk new file mode 100644 index 0000000..5c40ca7 --- /dev/null +++ b/liboggvorbisplay/recipe.mk @@ -0,0 +1,18 @@ +# Port Metadata +liboggvorbisplay_PORTVERSION = 2.0.0 + +liboggvorbisplay_MAINTAINER = Lawrence Sebald +liboggvorbisplay_LICENSE = KOS License +liboggvorbisplay_SHORT_DESC = Ogg Vorbis audio streaming library + +# No dependencies beyond the base system. +liboggvorbisplay_DEPENDENCIES = libvorbis + +# What files we need to download, and where from. +liboggvorbisplay_GIT_HASH = 51b7bc8d225c9ef4bbbc7f556fd40a5092c40d94 +liboggvorbisplay_DOWNLOAD_SITE = https://github.com/KallistiOS/liboggvorbisplay/archive/ +liboggvorbisplay_DOWNLOAD_FILE = ${liboggvorbisplay_GIT_HASH}.tar.gz + +liboggvorbisplay_TARGET = liboggvorbisplay.a +liboggvorbisplay_INSTALLED_HDRS = include/oggvorbis/sndoggvorbis.h +liboggvorbisplay_HDR_INSTDIR = oggvorbis diff --git a/libopusplay/Makefile b/libopusplay/Makefile deleted file mode 100644 index a007f60..0000000 --- a/libopusplay/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Port Metadata -PORTNAME = libopusplay -PORTVERSION = 2.1.0 - -MAINTAINER = Lawrence Sebald -LICENSE = KOS License -SHORT_DESC = Opus audio playback library - -# Requires opusfile (which will pull in opus and libogg) -DEPENDENCIES = opusfile - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libopusplay \ - https://github.com/KallistiOS/libopusplay.git - -TARGET = libopusplay.a -INSTALLED_HDRS = opusplay.h -HDR_INSTDIR = opusplay - -KOS_MAKEFILE = Makefile - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libopusplay/patches/fix-build.patch b/libopusplay/patches/fix-build.patch new file mode 100644 index 0000000..d16c734 --- /dev/null +++ b/libopusplay/patches/fix-build.patch @@ -0,0 +1,28 @@ +diff --git a/Makefile b/Makefile +index e40c3b0..a0fe4cc 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,8 @@ + TARGET = libopusplay.a + OBJS = opusplay.o main.o + +-KOS_CFLAGS += -I$(KOS_PORTS)/include/opus -Wextra +- + include ${KOS_PORTS}/scripts/lib.mk ++ ++$(OBJS): CPPFLAGS += -I ${KOS_PORTS}/sysroot/include/opus ++ ++$(OBJS): CFLAGS += -Wextra +diff --git a/opusplay.c b/opusplay.c +index 7a8b77b..a0b2d36 100644 +--- a/opusplay.c ++++ b/opusplay.c +@@ -21,7 +21,7 @@ + #include + #include + +-#include ++#include + + /* Thread-state related defines */ + #define STATUS_INIT 0 diff --git a/libopusplay/recipe.mk b/libopusplay/recipe.mk new file mode 100644 index 0000000..60d4c90 --- /dev/null +++ b/libopusplay/recipe.mk @@ -0,0 +1,20 @@ +# Port Metadata +libopusplay_PORTVERSION = 2.1.0 + +libopusplay_MAINTAINER = Lawrence Sebald +libopusplay_LICENSE = KOS License +libopusplay_SHORT_DESC = Opus audio playback library + +# Requires opusfile (which will pull in opus and libogg) +libopusplay_DEPENDENCIES = opusfile + +# What files we need to download, and where from. +libopusplay_GIT_HASH = 1f8eaf7e3855d9c93c1e80095ea37364e5ccb7a3 +libopusplay_DOWNLOAD_SITE = https://github.com/KallistiOS/libopusplay/archive/ +libopusplay_DOWNLOAD_FILE = ${libopusplay_GIT_HASH}.tar.gz + +libopusplay_TARGET = libopusplay.a +libopusplay_INSTALLED_HDRS = opusplay.h +libopusplay_HDR_INSTDIR = opus + +libopusplay_KOS_MAKEFILE = Makefile diff --git a/libparallax/Makefile b/libparallax/Makefile deleted file mode 100644 index 5c79d5b..0000000 --- a/libparallax/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Port Metadata -PORTNAME = libparallax -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = Simple (mostly 2D) game API library - -DEPENDENCIES = libpng libjpeg libkmg - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libparallax \ - https://github.com/KallistiOS/libparallax.git - -TARGET = libparallax.a -INSTALLED_HDRS = include/color.h include/context.h include/dr.h \ - include/font.h include/list.h include/matrix.h \ - include/prim.h include/sprite.h include/texture.h -HDR_INSTDIR = plx - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libparallax/files/KOSMakefile.mk b/libparallax/files/KOSMakefile.mk index 23152e9..aa1a224 100644 --- a/libparallax/files/KOSMakefile.mk +++ b/libparallax/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libparallax.a OBJS := $(patsubst %.c,%.o,$(wildcard src/*.c)) -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude -I ${KOS_PORTS}/sysroot/include/libpng16 diff --git a/libparallax/patches/fix-build.patch b/libparallax/patches/fix-build.patch new file mode 100644 index 0000000..34ad40c --- /dev/null +++ b/libparallax/patches/fix-build.patch @@ -0,0 +1,15 @@ +diff --git a/src/texture.c b/src/texture.c +index efc60c1..50f4b30 100644 +--- a/src/texture.c ++++ b/src/texture.c +@@ -13,8 +13,8 @@ + #include + + #include "texture.h" +-#include +-#include ++#include ++#include + #include + + /* See the header file for all comments and documentation */ diff --git a/libparallax/recipe.mk b/libparallax/recipe.mk new file mode 100644 index 0000000..977f2c9 --- /dev/null +++ b/libparallax/recipe.mk @@ -0,0 +1,19 @@ +# Port Metadata +libparallax_PORTVERSION = 2.0.0 + +libparallax_MAINTAINER = Nobody +libparallax_LICENSE = KOS License +libparallax_SHORT_DESC = Simple (mostly 2D) game API library + +libparallax_DEPENDENCIES = kos-png kos-jpeg libkmg + +# What files we need to download, and where from. +libparallax_GIT_HASH = a7591bb0d6065e6c5b7663741054c51a5aeb1ea2 +libparallax_DOWNLOAD_SITE = https://github.com/KallistiOS/libparallax/archive/ +libparallax_DOWNLOAD_FILE = ${libparallax_GIT_HASH}.tar.gz + +libparallax_TARGET = libparallax.a +libparallax_INSTALLED_HDRS = include/color.h include/context.h include/dr.h \ + include/font.h include/list.h include/matrix.h \ + include/prim.h include/sprite.h include/texture.h +libparallax_HDR_INSTDIR = plx diff --git a/libpcx/Makefile b/libpcx/Makefile deleted file mode 100644 index 585235c..0000000 --- a/libpcx/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libpcx -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = Library for decoding PCX images - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libpcx \ - https://github.com/KallistiOS/libpcx.git - -TARGET = libpcx.a -INSTALLED_HDRS = include/pcx.h -HDR_INSTDIR = pcx - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libpcx/files/KOSMakefile.mk b/libpcx/files/KOSMakefile.mk index bb8efcc..140aad1 100644 --- a/libpcx/files/KOSMakefile.mk +++ b/libpcx/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libpcx.a OBJS = pcx.o pcx_texture.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libpcx/recipe.mk b/libpcx/recipe.mk new file mode 100644 index 0000000..ffa0e12 --- /dev/null +++ b/libpcx/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libpcx_PORTVERSION = 2.0.0 + +libpcx_MAINTAINER = Nobody +libpcx_LICENSE = KOS License +libpcx_SHORT_DESC = Library for decoding PCX images + +# What files we need to download, and where from. +libpcx_GIT_HASH = aa03fe15107bec480e0dcad0a6d40933e740f8b4 +libpcx_DOWNLOAD_SITE = https://github.com/KallistiOS/libpcx/archive/ +libpcx_DOWNLOAD_FILE = ${libpcx_GIT_HASH}.tar.gz + +libpcx_TARGET = libpcx.a +libpcx_INSTALLED_HDRS = include/pcx.h +libpcx_HDR_INSTDIR = pcx diff --git a/libpng/Makefile b/libpng/Makefile deleted file mode 100644 index 6c8b67c..0000000 --- a/libpng/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libpng -PORTVERSION = 1.6.37 - -MAINTAINER = Lawrence Sebald -LICENSE = zlib License - http://opensource.org/licenses/Zlib -SHORT_DESC = Freely available lossless image compression library (with KOS additions) - -DEPENDENCIES = zlib - -# What files we need to download, and where from. -DOWNLOAD_SITES = https://download.sourceforge.net/libpng -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libpng.a -INSTALLED_HDRS = png.h pngconf.h readpng.h kospng.h pnglibconf.h -HDR_INSTDIR = png - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk kos_texture.c kos_img.c readpng.h kospng.h \ - readpng.c writepng.c - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libpng/distinfo b/libpng/distinfo deleted file mode 100644 index b624b91..0000000 --- a/libpng/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (libpng-1.6.37.tar.gz) = daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4 -SIZE (libpng-1.6.37.tar.gz) = 1495748 diff --git a/libpng/files/KOSMakefile.mk b/libpng/files/KOSMakefile.mk deleted file mode 100644 index 2181847..0000000 --- a/libpng/files/KOSMakefile.mk +++ /dev/null @@ -1,29 +0,0 @@ -TARGET = libpng.a -OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ - pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ - pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o \ - kos_img.o kos_texture.o readpng.o writepng.o - -KOS_CFLAGS += -I. \ - -I$(KOS_PORTS)/include/zlib \ - -DPNG_NO_MNG_FEATURES \ - -DPNG_NO_READ_sCAL -DPNG_NO_WRITE_sCAL \ - -DPNG_NO_SETJMP_SUPPORTED \ - -DPNG_NO_WRITE_tIME \ - -DBUILD_LIBPNG - -defaultall: pnglibconf.h fix-pngh $(OBJS) subdirs linklib - -# Avoid ICE with some GCC versions -pngwrite.o: CFLAGS += -O2 - -# Force the configuration file to be generated. -pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp $< $@ - -fix-pngh: - @echo "Patching png.h for compatibility with KOS..." - @echo "/* Compatibility with previous KOS code... */" >> png.h - @echo "#include \"kospng.h\"" >> png.h - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/libpng/pkg-descr b/libpng/pkg-descr index 4f389e7..5092285 100644 --- a/libpng/pkg-descr +++ b/libpng/pkg-descr @@ -2,7 +2,4 @@ libpng is the official reference library for the Portable Network Graphic image file format. It supports almost all of the features defined by the format and is extensible to support additional features as needed. -The KOS port of this library includes a bit of additional functionality to -directly read PNG images into textures or KOS platform-independent images. - URL: http://libpng.org/pub/png/libpng.html diff --git a/libpng/recipe.mk b/libpng/recipe.mk new file mode 100644 index 0000000..034dfe7 --- /dev/null +++ b/libpng/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +libpng_PORTVERSION = 1.6.38 + +libpng_MAINTAINER = Lawrence Sebald +libpng_LICENSE = zlib License - http://opensource.org/licenses/Zlib +libpng_SHORT_DESC = Freely available lossless image compression library (with KOS additions) + +libpng_DEPENDENCIES = zlib + +libpng_PORT_BUILD = cmake + +# What files we need to download, and where from. +libpng_DOWNLOAD_SITE = https://download.sourceforge.net/libpng +libpng_DOWNLOAD_FILE = libpng-${libpng_PORTVERSION}.tar.xz +libpng_DOWNLOAD_SHA256 = b3683e8b8111ebf6f1ac004ebb6b0c975cd310ec469d98364388e9cedbfa68be + +libpng_CMAKE_ARGS = -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DPNG_EXECUTABLES=OFF -DPNG_SHARED=OFF -DPNG_TESTS=OFF diff --git a/libsmb2/Makefile b/libsmb2/Makefile deleted file mode 100644 index 264c289..0000000 --- a/libsmb2/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Port Metadata -PORTNAME = libsmb2 -PORTVERSION = 6.2 - -MAINTAINER = Ronnie Sahlberg -LICENSE = LGPLv2.1 -SHORT_DESC = SMB2/3 userspace client - -# This port uses the autotools scripts that are included with the distfiles. -PORT_BUILD = cmake - -# Don't attempt to copy the target library, it will be in the inst dir already. -NOCOPY_TARGET = 1 - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/sahlberg/libsmb2.git -TARGET = libsmb2.a -EXAMPLES_DIR = examples - -# cmake setup work. -CMAKE_ARGS = -DINSTALL_INC_DIR=${KOS_PORTS}/${PORTNAME}/inst/include/ \ - -DCMAKE_INSTALL_PREFIX=${KOS_PORTS}/${PORTNAME}/inst/ -MAKE_TARGET = all install - -include ${KOS_PORTS}/scripts/kos-ports.mk \ No newline at end of file diff --git a/libsmb2/recipe.mk b/libsmb2/recipe.mk new file mode 100644 index 0000000..fd1ea85 --- /dev/null +++ b/libsmb2/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +libsmb2_PORTVERSION = 6.2 + +libsmb2_MAINTAINER = Ronnie Sahlberg +libsmb2_LICENSE = LGPLv2.1 +libsmb2_SHORT_DESC = SMB2/3 userspace client + +# This port uses the autotools scripts that are included with the distfiles. +libsmb2_PORT_BUILD = cmake + +# What files we need to download, and where from. +libsmb2_GIT_HASH = 14fbe119b95032bd1ea8def8e6a7d75a26bd3809 +libsmb2_DOWNLOAD_SITE = https://github.com/sahlberg/libsmb2/archive/ +libsmb2_DOWNLOAD_FILE = ${libsmb2_GIT_HASH}.tar.gz diff --git a/libtga/Makefile b/libtga/Makefile deleted file mode 100644 index 486d97d..0000000 --- a/libtga/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libtga -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = Library for decoding TGA images - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libtga \ - https://github.com/KallistiOS/libtga.git - -TARGET = libtga.a -INSTALLED_HDRS = include/tga.h -HDR_INSTDIR = tga - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libtga/files/KOSMakefile.mk b/libtga/files/KOSMakefile.mk index 8b9e664..8a220da 100644 --- a/libtga/files/KOSMakefile.mk +++ b/libtga/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libtga.a OBJS = tga.o tga_texture.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libtga/recipe.mk b/libtga/recipe.mk new file mode 100644 index 0000000..838c992 --- /dev/null +++ b/libtga/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libtga_PORTVERSION = 2.0.0 + +libtga_MAINTAINER = Nobody +libtga_LICENSE = KOS License +libtga_SHORT_DESC = Library for decoding TGA images + +# What files we need to download, and where from. +libtga_GIT_HASH = 3217cbb3bd871cf8174fa705642dff9b08220022 +libtga_DOWNLOAD_SITE = https://github.com/KallistiOS/libtga/archive/ +libtga_DOWNLOAD_FILE = ${libtga_GIT_HASH}.tar.gz + +libtga_TARGET = libtga.a +libtga_INSTALLED_HDRS = include/tga.h +libtga_HDR_INSTDIR = tga diff --git a/libtremor/Makefile b/libtremor/Makefile deleted file mode 100644 index 91416b4..0000000 --- a/libtremor/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Port Metadata -PORTNAME = libtremor -PORTVERSION = 19480 - -MAINTAINER = Lawrence Sebald -LICENSE = 3-clause BSD (see COPYING in the source distribution) -SHORT_DESC = Vorbis audio decoder library (integer version) - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORY = https://gitlab.xiph.org/xiph/tremor.git -GIT_BRANCH = lowmem - -TARGET = libtremor.a -INSTALLED_HDRS = ivorbiscodec.h ivorbisfile.h sndoggvorbis.h -HDR_INSTDIR = vorbis - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk sndoggvorbis.h sndoggvorbis.c main.c \ - sndvorbisfile.h - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libtremor/files/KOSMakefile.mk b/libtremor/files/KOSMakefile.mk index b06b7b1..623a369 100644 --- a/libtremor/files/KOSMakefile.mk +++ b/libtremor/files/KOSMakefile.mk @@ -3,7 +3,8 @@ OBJS = mdct.o dsp.o info.o misc.o floor1.o floor0.o vorbisfile.o res012.o \ mapping0.o codebook.o framing.o bitwise.o floor_lookup.o main.o \ sndoggvorbis.o -KOS_CFLAGS += -DPACKAGE="libvorbisidec" -DVERSION="1.3.0" \ - -DHAVE_DLFCN_H=1 -I. -fsigned-char -D_REENTRANT -ffast-math - include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -DPACKAGE="libvorbisidec" -DVERSION="1.3.0" -DHAVE_DLFCN_H=1 -I. -D_REENTRANT + +$(OBJS): CFLAGS += -fsigned-char -ffast-math diff --git a/libtremor/recipe.mk b/libtremor/recipe.mk new file mode 100644 index 0000000..94617ad --- /dev/null +++ b/libtremor/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libtremor_PORTVERSION = 19480 + +libtremor_MAINTAINER = Lawrence Sebald +libtremor_LICENSE = 3-clause BSD (see COPYING in the source distribution) +libtremor_SHORT_DESC = Vorbis audio decoder library (integer version) + +# What files we need to download, and where from. +libtremor_GIT_HASH = 89a7534bf2e70112e0354452b17a78675ca92dbf +libtremor_DOWNLOAD_SITE = https://gitlab.xiph.org/xiph/tremor/-/archive/${libtremor_GIT_HASH}/ +libtremor_DOWNLOAD_FILE = tremor-${libtremor_GIT_HASH}.tar.gz + +libtremor_TARGET = libtremor.a +libtremor_INSTALLED_HDRS = ivorbiscodec.h ivorbisfile.h sndoggvorbis.h +libtremor_HDR_INSTDIR = vorbis diff --git a/libtsunami/Makefile b/libtsunami/Makefile deleted file mode 100644 index ee0e7bc..0000000 --- a/libtsunami/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Port Metadata -PORTNAME = libtsunami -PORTVERSION = 2.0.0 - -MAINTAINER = Nobody -LICENSE = KOS License -SHORT_DESC = C++ "scene graph" wrapper around libparallax - -DEPENDENCIES = libparallax - -# What files we need to download, and where from. -GIT_REPOSITORIES = git://git.code.sf.net/p/cadcdev/libtsunami \ - https://github.com/KallistiOS/libtsunami.git - -TARGET = libtsunami.a -HDR_DIRECTORY = include -HDR_INSTDIR = tsu - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libtsunami/files/KOSMakefile.mk b/libtsunami/files/KOSMakefile.mk index 21de8d3..7b6e84a 100644 --- a/libtsunami/files/KOSMakefile.mk +++ b/libtsunami/files/KOSMakefile.mk @@ -5,8 +5,10 @@ OBJS_ANIMS := $(patsubst %.cpp,%.o,$(wildcard src/anims/*.cpp)) OBJS_TRIGS := $(patsubst %.cpp,%.o,$(wildcard src/triggers/*.cpp)) OBJS := $(OBJS_MAIN) $(OBJS_DRW) $(OBJS_ANIMS) $(OBJS_TRIGS) +include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude + # GCC versions prior to 11.0 have incomplete C++17 support and need # to be forced to use the GNU dialect for std::filesystem support -KOS_CPPFLAGS += -Iinclude -std=gnu++17 - -include ${KOS_PORTS}/scripts/lib.mk +$(OBJS): CXXFLAGS += -std=gnu++17 diff --git a/libtsunami/recipe.mk b/libtsunami/recipe.mk new file mode 100644 index 0000000..ce89574 --- /dev/null +++ b/libtsunami/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +libtsunami_PORTVERSION = 2.0.0 + +libtsunami_MAINTAINER = Nobody +libtsunami_LICENSE = KOS License +libtsunami_SHORT_DESC = C++ "scene graph" wrapper around libparallax + +libtsunami_DEPENDENCIES = libparallax + +# What files we need to download, and where from. +libtsunami_GIT_HASH = f1fa63b1b64b38ffdbf107037b446388c91b4e72 +libtsunami_DOWNLOAD_SITE = https://github.com/KallistiOS/libtsunami/archive/ +libtsunami_DOWNLOAD_FILE = ${libtsunami_GIT_HASH}.tar.gz + +libtsunami_TARGET = libtsunami.a +libtsunami_HDR_DIRECTORY = include +libtsunami_HDR_INSTDIR = tsu diff --git a/libvldmail/Makefile b/libvldmail/Makefile deleted file mode 100644 index 731b5f2..0000000 --- a/libvldmail/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# Port Metadata -PORTNAME = libvldmail -PORTVERSION = 1.2.1 - -MAINTAINER = Donald Haase -LICENSE = MIT-0 -SHORT_DESC = An e-mail address validation library. - -# This port uses CMake. -PORT_BUILD = cmake -CMAKE_OUTSOURCE = 1 -NOCOPY_TARGET = 1 - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/dertuxmalwieder/libvldmail.git -GIT_BRANCH = master -GIT_TAG = release-${PORTVERSION} - -TARGET = libvldmail.a -INSTALLED_HDRS = src/vldmail.h - -PREINSTALL = vldmail_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk - -vldmail_preinstall: - mkdir -p inst/lib ; cp build/$(PORTNAME)-$(PORTVERSION)/build/$(TARGET) inst/lib; \ diff --git a/libvldmail/recipe.mk b/libvldmail/recipe.mk new file mode 100644 index 0000000..847a98f --- /dev/null +++ b/libvldmail/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +libvldmail_PORTVERSION = 1.2.1 + +libvldmail_MAINTAINER = Donald Haase +libvldmail_LICENSE = MIT-0 +libvldmail_SHORT_DESC = An e-mail address validation library. + +# This port uses CMake. +libvldmail_PORT_BUILD = cmake + +# What files we need to download, and where from. +libvldmail_GIT_HASH = release-${libvldmail_PORTVERSION} +libvldmail_DOWNLOAD_SITE = https://github.com/dertuxmalwieder/libvldmail/archive/ +libvldmail_DOWNLOAD_FILE = ${libvldmail_GIT_HASH}.tar.gz diff --git a/libvorbis/Makefile b/libvorbis/Makefile deleted file mode 100644 index 49f315f..0000000 --- a/libvorbis/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Port Metadata -PORTNAME = libvorbis -PORTVERSION = 1.3.7 - -MAINTAINER = Lawrence Sebald -LICENSE = 3-clause BSD (see COPYING in the source distribution) -SHORT_DESC = Vorbis audio codec library (floating-point version) - -DEPENDENCIES = libogg - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/vorbis -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libvorbis.a -INSTALLED_HDRS = include/vorbis/codec.h include/vorbis/vorbisenc.h \ - include/vorbis/vorbisfile.h -HDR_INSTDIR = vorbis - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libvorbis/distinfo b/libvorbis/distinfo deleted file mode 100644 index c401354..0000000 --- a/libvorbis/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (libvorbis-1.3.7.tar.gz) = 0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab -SIZE (libvorbis-1.3.7.tar.gz) = 1658963 \ No newline at end of file diff --git a/libvorbis/files/KOSMakefile.mk b/libvorbis/files/KOSMakefile.mk deleted file mode 100644 index 834bfef..0000000 --- a/libvorbis/files/KOSMakefile.mk +++ /dev/null @@ -1,10 +0,0 @@ -TARGET = libvorbis.a -OBJS = lib/mdct.o lib/smallft.o lib/block.o lib/envelope.o lib/window.o \ - lib/lsp.o lib/lpc.o lib/analysis.o lib/synthesis.o lib/psy.o lib/info.o \ - lib/floor1.o lib/floor0.o lib/res0.o lib/mapping0.o lib/registry.o \ - lib/codebook.o lib/sharedbook.o lib/lookup.o lib/bitrate.o \ - lib/vorbisfile.o - -KOS_CFLAGS += -Iinclude -fsigned-char -ffast-math - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/libvorbis/recipe.mk b/libvorbis/recipe.mk new file mode 100644 index 0000000..1d118fc --- /dev/null +++ b/libvorbis/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +libvorbis_PORTVERSION = 1.3.7 + +libvorbis_MAINTAINER = Lawrence Sebald +libvorbis_LICENSE = 3-clause BSD (see COPYING in the source distribution) +libvorbis_SHORT_DESC = Vorbis audio codec library (floating-point version) + +libvorbis_DEPENDENCIES = libogg + +libvorbis_PORT_BUILD = cmake + +# What files we need to download, and where from. +libvorbis_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/vorbis +libvorbis_DOWNLOAD_FILE = libvorbis-${libvorbis_PORTVERSION}.tar.gz +libvorbis_DOWNLOAD_SHA256 = 0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab + +libvorbis_CMAKE_ARGS = -DCMAKE_POLICY_VERSION_MINIMUM=3.5 diff --git a/libwav/Makefile b/libwav/Makefile deleted file mode 100644 index 454424c..0000000 --- a/libwav/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Port Metadata -PORTNAME = libwav -PORTVERSION = 1.0.0 - -MAINTAINER = Andy Barajas -LICENSE = Public Domain -SHORT_DESC = Library for decoding WAV file headers - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/Dreamcast-Projects/libwav.git - -TARGET = libwav.a -INSTALLED_HDRS = sndwav.h -HDR_INSTDIR = wav - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libwav/files/KOSMakefile.mk b/libwav/files/KOSMakefile.mk index 1d33cfe..bfb1bd1 100644 --- a/libwav/files/KOSMakefile.mk +++ b/libwav/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libwav.a OBJS = libwav.o sndwav.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/libwav/recipe.mk b/libwav/recipe.mk new file mode 100644 index 0000000..608739f --- /dev/null +++ b/libwav/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +libwav_PORTVERSION = 1.0.0 + +libwav_MAINTAINER = Andy Barajas +libwav_LICENSE = Public Domain +libwav_SHORT_DESC = Library for decoding WAV file headers + +# What files we need to download, and where from. +libwav_GIT_HASH = d6f1a89b7f6d50c1e429c10a6f43379f89b8e161 +libwav_DOWNLOAD_SITE = https://github.com/Dreamcast-Projects/libwav/archive/ +libwav_DOWNLOAD_FILE = ${libwav_GIT_HASH}.tar.gz + +libwav_TARGET = libwav.a +libwav_INSTALLED_HDRS = sndwav.h +libwav_HDR_INSTDIR = wav diff --git a/libyaml/Makefile b/libyaml/Makefile deleted file mode 100644 index e7314e7..0000000 --- a/libyaml/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# Port Metadata -PORTNAME = libyaml -PORTVERSION = 0.2.5 - -MAINTAINER = Lawrence Sebald -LICENSE = MIT (see License in the source distribution) -SHORT_DESC = A C library for parsing and emitting YAML - -# This port uses the autotools scripts that are included with the distfiles. -PORT_BUILD = autotools - -# Don't attempt to copy the target library, it will be in the inst dir already. -NOCOPY_TARGET = 1 - -# No external dependencies. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://github.com/yaml/libyaml/releases/download/${PORTVERSION} -DOWNLOAD_FILES = yaml-${PORTVERSION}.tar.gz - -TARGET = libyaml.a -HDR_INSTDIR = yaml -DISTFILE_DIR = yaml-${PORTVERSION} - -# Autotools setup work. -CONFIGURE_ARGS = -CONFIGURE_DEFS = RANLIB=${KOS_RANLIB} AR=${KOS_AR} -MAKE_TARGET = all install - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/libyaml/distinfo b/libyaml/distinfo deleted file mode 100644 index c6cc9d2..0000000 --- a/libyaml/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (yaml-0.2.5.tar.gz) = c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4 -SIZE (yaml-0.2.5.tar.gz) = 609454 diff --git a/libyaml/recipe.mk b/libyaml/recipe.mk new file mode 100644 index 0000000..4d39da7 --- /dev/null +++ b/libyaml/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +libyaml_PORTVERSION = 0.2.5 + +libyaml_MAINTAINER = Lawrence Sebald +libyaml_LICENSE = MIT (see License in the source distribution) +libyaml_SHORT_DESC = A C library for parsing and emitting YAML + +# This port uses the autotools scripts that are included with the distfiles. +libyaml_PORT_BUILD = autotools + +# What files we need to download, and where from. +libyaml_DOWNLOAD_SITE = https://github.com/yaml/libyaml/releases/download/${libyaml_PORTVERSION} +libyaml_DOWNLOAD_FILE = yaml-${libyaml_PORTVERSION}.tar.gz +libyaml_DOWNLOAD_SHA256 = c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4 diff --git a/libzip/Makefile b/libzip/Makefile deleted file mode 100644 index 57e21ec..0000000 --- a/libzip/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# Port Metadata -PORTNAME = libzip -PORTVERSION = 1.0.1 - -MAINTAINER = Damian Parrino -LICENSE = 3-clause BSD license -SHORT_DESC = libzip is a C library for reading, creating, and modifying zip archives. - -# This port uses CMake. -PORT_BUILD = cmake - -# This port requires zlib -DEPENDENCIES = zlib - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://libzip.org/download -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libzip.a - -# Set cmake options -CMAKE_ARGS = -Wno-dev -DCMAKE_INSTALL_PREFIX=../../inst \ - -DCMAKE_C_FLAGS="-I{$KOS_PORTS}/include/zlib" \ - -DZLIB_INCLUDE_DIR="${KOS_PORTS}/include/zlib" \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - -MAKE_TARGET = zip - -# Adjust the source code -PREBUILD = libzip_prebuild - -# Add a pre-install target to get the built library where we expect it. -# Copy the header files manually -PREINSTALL = libzip_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk -libzip_prebuild: - cd "build/${PORTNAME}-${PORTVERSION}" && \ - patch -p1 < ../../files/${PORTNAME}-${PORTVERSION}.patch || { exit 1; } - -libzip_preinstall: - cp "build/${PORTNAME}-${PORTVERSION}/lib/libzip.a" "build/${PORTNAME}-${PORTVERSION}" - mkdir -p inst/include - cp "build/${PORTNAME}-${PORTVERSION}/lib/zip.h" inst/include - cp "build/${PORTNAME}-${PORTVERSION}/zipconf.h" inst/include diff --git a/libzip/distinfo b/libzip/distinfo deleted file mode 100644 index b0bb49f..0000000 --- a/libzip/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (libzip-1.0.1.tar.gz) = 0cef914d8f5105ccac44484f61413daa08d7204758e77240a4d20ebf967f3d49 -SIZE (libzip-1.0.1.tar.gz) = 659452 diff --git a/libzip/files/libzip-1.0.1.patch b/libzip/patches/libzip-1.0.1.patch similarity index 100% rename from libzip/files/libzip-1.0.1.patch rename to libzip/patches/libzip-1.0.1.patch diff --git a/libzip/recipe.mk b/libzip/recipe.mk new file mode 100644 index 0000000..6366a88 --- /dev/null +++ b/libzip/recipe.mk @@ -0,0 +1,20 @@ +# Port Metadata +libzip_PORTVERSION = 1.0.1 + +libzip_MAINTAINER = Damian Parrino +libzip_LICENSE = 3-clause BSD license +libzip_SHORT_DESC = libzip is a C library for reading, creating, and modifying zip archives. + +# This port uses CMake. +libzip_PORT_BUILD = cmake + +# This port requires zlib +libzip_DEPENDENCIES = zlib + +# What files we need to download, and where from. +libzip_DOWNLOAD_SITE = https://libzip.org/download +libzip_DOWNLOAD_FILE = libzip-${libzip_PORTVERSION}.tar.gz +libzip_DOWNLOAD_SHA256 = 0cef914d8f5105ccac44484f61413daa08d7204758e77240a4d20ebf967f3d49 + +# Set cmake options +libzip_CMAKE_ARGS = -Wno-dev -DCMAKE_POLICY_VERSION_MINIMUM=3.5 diff --git a/lua/Makefile b/lua/Makefile deleted file mode 100644 index b88d73e..0000000 --- a/lua/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Port Metadata -PORTNAME = lua -PORTVERSION = 5.5.0 - -MAINTAINER = Falco Girgis (GyroVorbis) -LICENSE = MIT -SHORT_DESC = Lightweight, embeddable, extensible scripting language - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = http://www.lua.org/ftp -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = liblua.a -INSTALLED_HDRS = src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h \ - src/llimits.h src/lua.hpp -HDR_INSTDIR = lua - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/lua/distinfo b/lua/distinfo deleted file mode 100644 index 41a9693..0000000 --- a/lua/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (lua-5.5.0.tar.gz) = 57ccc32bbbd005cab75bcc52444052535af691789dba2b9016d5c50640d68b3d -SIZE (lua-5.5.0.tar.gz) = 396950 diff --git a/lua/files/KOSMakefile.mk b/lua/files/KOSMakefile.mk index 4bd0f24..1ea38ee 100644 --- a/lua/files/KOSMakefile.mk +++ b/lua/files/KOSMakefile.mk @@ -8,11 +8,12 @@ OBJS = src/lapi.o src/lauxlib.o src/lbaselib.o src/lcode.o \ src/ltable.o src/ltablib.o src/ltm.o src/lundump.o \ src/lutf8lib.o src/lvm.o src/lzio.o -defaultall: fixconf $(OBJS) subdirs linklib +include ${KOS_PORTS}/scripts/lib.mk -fixconf: +.stamp_fixconf: sed -e 's/\/\*[[:space:]+]#define LUA_32BITS[[:space:]+]\*\//#define LUA_32BITS/' -ibak src/luaconf.h + touch $@ -KOS_CFLAGS += -Isrc +$(OBJS): .stamp_fixconf -include ${KOS_PORTS}/scripts/lib.mk +$(OBJS): CPPFLAGS += -Isrc diff --git a/lua/recipe.mk b/lua/recipe.mk new file mode 100644 index 0000000..547df3b --- /dev/null +++ b/lua/recipe.mk @@ -0,0 +1,16 @@ +# Port Metadata +lua_PORTVERSION = 5.5.0 + +lua_MAINTAINER = Falco Girgis (GyroVorbis) +lua_LICENSE = MIT +lua_SHORT_DESC = Lightweight, embeddable, extensible scripting language + +# What files we need to download, and where from. +lua_DOWNLOAD_SITE = https://www.lua.org/ftp +lua_DOWNLOAD_FILE = lua-${lua_PORTVERSION}.tar.gz +lua_DOWNLOAD_SHA256 = 57ccc32bbbd005cab75bcc52444052535af691789dba2b9016d5c50640d68b3d + +lua_TARGET = liblua.a +lua_INSTALLED_HDRS = src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h \ + src/llimits.h src/lua.hpp +lua_HDR_INSTDIR = lua diff --git a/mbedtls/Makefile b/mbedtls/Makefile deleted file mode 100644 index 3e26415..0000000 --- a/mbedtls/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Port Metadata -PORTNAME = mbedtls -PORTVERSION = 3.6.6 - -MAINTAINER = Donald Haase -LICENSE = Apache 2.0 OR GPL 2.0 or later -SHORT_DESC = An open source TLS library. - -PORT_BUILD = cmake - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/Mbed-TLS/mbedtls.git -GIT_BRANCH = v$(PORTVERSION) -TARGET = lib$(PORTNAME).a libmbedx509.a libmbedcrypto.a - -HDR_DIRECTORY = include/mbedtls - -NOCOPY_TARGET = 1 - -CMAKE_ARGS = -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF - -PREBUILD = mbedtls_prebuild -PREINSTALL = mbedtls_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk - -# Copy in custom config file, then do the submodule updating -mbedtls_prebuild: - cp files/mbedtls_config.h build/$(PORTNAME)-$(PORTVERSION)/include/mbedtls/; \ - cd build/$(PORTNAME)-$(PORTVERSION)/; git submodule update --init; cd ../../; - -# Copy all lib files, link extras, and install psa/ headers (TF-PSA-Crypto submodule) -mbedtls_preinstall: - mkdir -p inst/lib ; cp build/$(PORTNAME)-$(PORTVERSION)/library/*.a inst/lib; \ - mkdir -p inst/include/psa ; \ - cp build/$(PORTNAME)-$(PORTVERSION)/include/psa/*.h inst/include/psa/ ; \ - rm -f ${KOS_PORTS}/include/psa ; \ - ln -s ${KOS_PORTS}/${PORTNAME}/inst/include/psa ${KOS_PORTS}/include/psa \ No newline at end of file diff --git a/mbedtls/recipe.mk b/mbedtls/recipe.mk new file mode 100644 index 0000000..c6c37ab --- /dev/null +++ b/mbedtls/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +mbedtls_PORTVERSION = 3.6.6 + +mbedtls_MAINTAINER = Donald Haase +mbedtls_LICENSE = Apache 2.0 OR GPL 2.0 or later +mbedtls_SHORT_DESC = An open source TLS library. + +mbedtls_PORT_BUILD = cmake + +# What files we need to download, and where from. +mbedtls_DOWNLOAD_SITE = https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${mbedtls_PORTVERSION} +mbedtls_DOWNLOAD_FILE = mbedtls-${mbedtls_PORTVERSION}.tar.bz2 +mbedtls_DOWNLOAD_SHA256 = 8fb65fae8dcae5840f793c0a334860a411f884cc537ea290ce1c52bb64ca007a + +mbedtls_CMAKE_ARGS = -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF -DMBEDTLS_FATAL_WARNINGS=OFF -DMBEDTLS_CONFIG_FILE=${KOS_PORTS}/mbedtls/files/mbedtls_config.h diff --git a/micropython/Makefile b/micropython/Makefile deleted file mode 100644 index 4b884db..0000000 --- a/micropython/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Port Metadata -PORTNAME = micropython -PORTVERSION = 1.26.0 - -MAINTAINER = Aaron Glazer -LICENSE = MIT -SHORT_DESC = A lean and efficient Python implementation - -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/micropython/micropython.git -GIT_BRANCH = master -GIT_TAG = v${PORTVERSION} - -TARGET = libmicropython.a -HDR_DIRECTORY = micropython_embed -INSTALLED_HDRS = mpconfigport.h -HDR_INSTDIR = micropython - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk mpconfigport.h - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/micropython/files/KOSMakefile.mk b/micropython/files/KOSMakefile.mk index 1728b19..5358541 100644 --- a/micropython/files/KOSMakefile.mk +++ b/micropython/files/KOSMakefile.mk @@ -110,10 +110,7 @@ OBJS = $(MP_PORT_DIR)/embed_util.o \ $(MP_PY_DIR)/warning.o \ $(MP_RT_DIR)/gchelper_generic.o -CFLAGS += -DMICROPY_GCREGS_SETJMP -DNDEBUG -CFLAGS += -I$(CURDIR) -CFLAGS += -I$(MP_EMBED_DIR) -CFLAGS += -I$(MP_PORT_DIR) +$(OBJS): CPPFLAGS += -DMICROPY_GCREGS_SETJMP -DNDEBUG -I$(CURDIR) -I$(MP_EMBED_DIR) -I$(MP_PORT_DIR) # Windows specific ifeq ($(OS),Windows_NT) @@ -132,28 +129,33 @@ ifeq ($(OS),Windows_NT) SED_FLAGS = >/dev/null 2>&1 endif -defaultall: | generatemp $(OBJS) subdirs linklib fixincludes cleanupbeforeinstall +include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): .stamp_generatemp .stamp_fixincludes + +install: .stamp_cleanupbeforeinstall # Generate MicroPython (with verbose option set to "no") -generatemp: export MICROPYTHON_TOP = $(CURDIR) -generatemp: +.stamp_generatemp: export MICROPYTHON_TOP = $(CURDIR) +.stamp_generatemp: $(MAKE) -f ports/embed/embed.mk V=0 $(MP_EMBED_FLAGS) + touch $@ # Alter header files and replace #include "{variable}" with #include # This will fixes some other headers as well. -fixincludes: +.stamp_fixincludes: .stamp_generatemp @echo "Updating includes before installation..." - @for _file in $(MP_PORT_DIR)/*.h $(MP_PY_DIR)/*.h $(MP_RT_DIR)/*.h; do \ + for _file in $(MP_PORT_DIR)/*.h $(MP_PY_DIR)/*.h $(MP_RT_DIR)/*.h; do \ sed -ri -e 's/#include "([^[:space:]]+)"/#include /g' $$_file $(SED_FLAGS); \ done - @sed -i -e 's///' mpconfigport.h $(SED_FLAGS) - @sed -i -e 's///' $(MP_PY_DIR)/mpconfig.h $(SED_FLAGS) + sed -i -e 's///' mpconfigport.h $(SED_FLAGS) + sed -i -e 's///' $(MP_PY_DIR)/mpconfig.h $(SED_FLAGS) + touch $@ # Remove source files (*.c/*.o) before installing the MicroPython port -cleanupbeforeinstall: +.stamp_cleanupbeforeinstall: @echo "Performing final clean-up before installation..." @for _file in $(MP_PORT_DIR)/*.c $(MP_PY_DIR)/*.c $(MP_RT_DIR)/*.c $(MP_PORT_DIR)/*.o $(MP_PY_DIR)/*.o $(MP_RT_DIR)/*.o; do \ rm $$_file; \ - done - -include ${KOS_PORTS}/scripts/lib.mk + done ; \ + touch $@ diff --git a/micropython/recipe.mk b/micropython/recipe.mk new file mode 100644 index 0000000..37b475d --- /dev/null +++ b/micropython/recipe.mk @@ -0,0 +1,15 @@ +# Port Metadata +micropython_PORTVERSION = 1.28.0 + +micropython_MAINTAINER = Aaron Glazer +micropython_LICENSE = MIT +micropython_SHORT_DESC = A lean and efficient Python implementation + +# What files we need to download, and where from. +micropython_DOWNLOAD_SITE = https://github.com/micropython/micropython/archive/refs/tags/ +micropython_DOWNLOAD_FILE = v${micropython_PORTVERSION}.tar.gz + +micropython_TARGET = libmicropython.a +micropython_HDR_DIRECTORY = micropython_embed +micropython_INSTALLED_HDRS = mpconfigport.h +micropython_HDR_INSTDIR = micropython diff --git a/miniaudio/Makefile b/miniaudio/Makefile deleted file mode 100644 index a89b4bb..0000000 --- a/miniaudio/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Port Metadata -PORTNAME = miniaudio -PORTVERSION = dev-0.12 - -MAINTAINER = mackron -LICENSE = Public Domain/MIT No Attribution -SHORT_DESC = Audio playback and capture library written in C, in a single source file. - -REQUIRES_ABI = -m4-single - -PORT_BUILD = cmake - -GIT_REPOSITORY = https://github.com/mackron/miniaudio.git -GIT_BRANCH = dev-0.12 - -TARGET = libminiaudio.a -MAKE_TARGET = miniaudio -INSTALLED_HDRS = miniaudio.h - -include ${KOS_PORTS}/scripts/kos-ports.mk \ No newline at end of file diff --git a/miniaudio/recipe.mk b/miniaudio/recipe.mk new file mode 100644 index 0000000..de0cf0f --- /dev/null +++ b/miniaudio/recipe.mk @@ -0,0 +1,18 @@ +# Port Metadata +miniaudio_PORTVERSION = dev-0.12 + +miniaudio_MAINTAINER = mackron +miniaudio_LICENSE = Public Domain/MIT No Attribution +miniaudio_SHORT_DESC = Audio playback and capture library written in C, in a single source file. + +miniaudio_REQUIRES_ABI = -m4-single + +miniaudio_PORT_BUILD = cmake + +miniaudio_DEPENDENCIES = opusfile + +miniaudio_GIT_HASH = a55d2e7eb8c251aa8e2277eb0c380a393140a270 +miniaudio_DOWNLOAD_SITE = https://github.com/mackron/miniaudio/archive/ +miniaudio_DOWNLOAD_FILE = ${miniaudio_GIT_HASH}.tar.gz + +miniaudio_CMAKE_ARGS = -DMINIAUDIO_ENABLE_DREAMCAST=ON diff --git a/mruby/Makefile b/mruby/Makefile deleted file mode 100644 index 5684873..0000000 --- a/mruby/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Port Metadata -PORTNAME = mruby -PORTVERSION = 3.3.0 - -MAINTAINER = SiZiOUS -LICENSE = MIT -SHORT_DESC = Lightweight Ruby - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/mruby/mruby.git -GIT_BRANCH = master -GIT_TAG = ${PORTVERSION} - -TARGET = libmruby.a -HDR_DIRECTORY = build/$(KOS_ARCH)/include -HDR_INSTDIR = mruby - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/mruby/files/KOSMakefile.mk b/mruby/files/KOSMakefile.mk index 6440672..baf1fd7 100644 --- a/mruby/files/KOSMakefile.mk +++ b/mruby/files/KOSMakefile.mk @@ -53,7 +53,7 @@ endif # mruby compiler executable (mrbc) (with extension if necessary) MRUBY_COMPILER_BIN = $(MRUBY_COMPILER)$(EXECUTABLEEXTENSION) -defaultall: | prepare generatemruby fixincludes copylib installmrbc +install: | prepare generatemruby fixincludes copylib installmrbc # Preparing the location where the mruby compiler executable (mrbc) will be installed prepare: diff --git a/mruby/recipe.mk b/mruby/recipe.mk new file mode 100644 index 0000000..fe6db8a --- /dev/null +++ b/mruby/recipe.mk @@ -0,0 +1,14 @@ +# Port Metadata +mruby_PORTVERSION = 3.3.0 + +mruby_MAINTAINER = SiZiOUS +mruby_LICENSE = MIT +mruby_SHORT_DESC = Lightweight Ruby + +# What files we need to download, and where from. +mruby_DOWNLOAD_SITE = https://github.com/mruby/mruby/archive/refs/tags/ +mruby_DOWNLOAD_FILE = ${mruby_PORTVERSION}.tar.gz + +mruby_TARGET = libmruby.a +mruby_HDR_DIRECTORY = build/$(KOS_ARCH)/include +mruby_HDR_INSTDIR = mruby diff --git a/opus/Makefile b/opus/Makefile deleted file mode 100644 index ba8a7bd..0000000 --- a/opus/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Port Metadata -PORTNAME = opus -PORTVERSION = 1.3.1 - -MAINTAINER = Lawrence Sebald -LICENSE = 3-clause BSD (see COPYING in the source distribution) -SHORT_DESC = Opus audio codec library - -# This port uses the autotools scripts that are included with the distfiles. -PORT_BUILD = autotools - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/opus -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libopus.a -INSTALLED_HDRS = include/opus.h include/opus_defines.h include/opus_types.h \ - include/opus_custom.h include/opus_multistream.h -HDR_INSTDIR = opus - -# Autotools setup work. -CONFIGURE_ARGS = --enable-fixed-point --disable-extra-programs --disable-doc \ - --prefix=$(KOS_PORTS)/opus/inst -CONFIGURE_DEFS = -MAKE_TARGET = libopus.la - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = - -# Add a pre-install target to get the built library where we expect it. -PREINSTALL = opus_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk -opus_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/.libs/${TARGET} build/${PORTNAME}-${PORTVERSION} diff --git a/opus/distinfo b/opus/distinfo deleted file mode 100644 index 067b9c9..0000000 --- a/opus/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (opus-1.3.1.tar.gz) = 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d -SIZE (opus-1.3.1.tar.gz) = 1040054 diff --git a/opus/recipe.mk b/opus/recipe.mk new file mode 100644 index 0000000..0f69d42 --- /dev/null +++ b/opus/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +opus_PORTVERSION = 1.3.1 + +opus_MAINTAINER = Lawrence Sebald +opus_LICENSE = 3-clause BSD (see COPYING in the source distribution) +opus_SHORT_DESC = Opus audio codec library + +# This port uses the autotools scripts that are included with the distfiles. +opus_PORT_BUILD = autotools + +# What files we need to download, and where from. +opus_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/opus +opus_DOWNLOAD_FILE = opus-${opus_PORTVERSION}.tar.gz +opus_DOWNLOAD_SHA256 = 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d + +# Autotools setup work. +opus_CONFIGURE_ARGS = --enable-fixed-point --disable-extra-programs --disable-doc diff --git a/opusfile/Makefile b/opusfile/Makefile deleted file mode 100644 index 13a2252..0000000 --- a/opusfile/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Port Metadata -PORTNAME = opusfile -PORTVERSION = 0.11 - -MAINTAINER = Lawrence Sebald -LICENSE = 3-clause BSD (see COPYING in the source distribution) -SHORT_DESC = Opus audio codec library high-level file access library - -# This port uses the autotools scripts that are included with the distfiles. -PORT_BUILD = autotools - -# This port requires opus and libogg -DEPENDENCIES = opus libogg - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/opus -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libopusfile.a -INSTALLED_HDRS = include/opusfile.h -HDR_INSTDIR = opusfile - -# Autotools setup work. -CONFIGURE_ARGS = --enable-fixed-point --disable-http --disable-doc \ - --prefix=$(KOS_PORTS)/opusfile/inst -CONFIGURE_DEFS = DEPS_CFLAGS="-I$(KOS_PORTS)/include -I$(KOS_PORTS)/include/opus" \ - DEPS_LIBS="-lopus -logg" -MAKE_TARGET = libopusfile.la - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = - -# Add a pre-install target to get the built library where we expect it. -PREINSTALL = opusfile_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk -opusfile_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/.libs/${TARGET} build/${PORTNAME}-${PORTVERSION} diff --git a/opusfile/distinfo b/opusfile/distinfo deleted file mode 100644 index c83ffc5..0000000 --- a/opusfile/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (opusfile-0.11.tar.gz) = 74ce9b6cf4da103133e7b5c95df810ceb7195471e1162ed57af415fabf5603bf -SIZE (opusfile-0.11.tar.gz) = 467420 diff --git a/opusfile/recipe.mk b/opusfile/recipe.mk new file mode 100644 index 0000000..91ad39d --- /dev/null +++ b/opusfile/recipe.mk @@ -0,0 +1,20 @@ +# Port Metadata +opusfile_PORTVERSION = 0.11 + +opusfile_MAINTAINER = Lawrence Sebald +opusfile_LICENSE = 3-clause BSD (see COPYING in the source distribution) +opusfile_SHORT_DESC = Opus audio codec library high-level file access library + +# This port uses the autotools scripts that are included with the distfiles. +opusfile_PORT_BUILD = autotools + +# This port requires opus and libogg +opusfile_DEPENDENCIES = opus libogg + +# What files we need to download, and where from. +opusfile_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/opus +opusfile_DOWNLOAD_FILE = opusfile-${opusfile_PORTVERSION}.tar.gz +opusfile_DOWNLOAD_SHA256 = 74ce9b6cf4da103133e7b5c95df810ceb7195471e1162ed57af415fabf5603bf + +# Autotools setup work. +opusfile_CONFIGURE_ARGS = --enable-fixed-point --disable-http --disable-doc diff --git a/polarssl/Makefile b/polarssl/Makefile deleted file mode 100644 index d729852..0000000 --- a/polarssl/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Port Metadata -PORTNAME = polarssl -PORTVERSION = 1.3.9 - -MAINTAINER = Damian Parrino -LICENSE = GPL2 -SHORT_DESC = A Secure Socket Layer library. - -# This port uses CMake. -PORT_BUILD = cmake - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://src.fedoraproject.org/repo/pkgs/polarssl/polarssl-1.3.9-gpl.tgz/48af7d1f0d5de512cbd6dacf5407884c -DOWNLOAD_FILES = polarssl-1.3.9-gpl.tgz - -TARGET = libpolarssl.a - -# Library headers -HDR_DIRECTORY = include/polarssl - -# Set cmake build settings -CMAKE_ARGS = -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=FALSE -DENABLE_PROGRAMS=FALSE -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - -# Minor adjustments before building the source code -PREBUILD = polarssl_prebuild - -# Add a pre-install target to get the built library where we expect it. -# This, copied from opus, might be solvable by -# adding an equivalent to HDR_DIRECTORY for lib -PREINSTALL = polarssl_preinstall - -include ${KOS_PORTS}/scripts/kos-ports.mk -polarssl_prebuild: - cd "build/${PORTNAME}-${PORTVERSION}" && \ - patch -p1 < ../../files/${PORTNAME}-${PORTVERSION}.patch || { exit 1; } - -polarssl_preinstall: - cp build/${PORTNAME}-${PORTVERSION}/library/${TARGET} build/${PORTNAME}-${PORTVERSION} diff --git a/polarssl/distinfo b/polarssl/distinfo deleted file mode 100644 index 3abc9d6..0000000 --- a/polarssl/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (polarssl-1.3.9-gpl.tgz) = d3605afc28ed4b7d1d9e3142d72e42855e4a23c07c951bbb0299556b02d36755 -SIZE (polarssl-1.3.9-gpl.tgz) = 1741396 diff --git a/polarssl/files/polarssl-1.3.9.patch b/polarssl/patches/polarssl-1.3.9.patch similarity index 100% rename from polarssl/files/polarssl-1.3.9.patch rename to polarssl/patches/polarssl-1.3.9.patch diff --git a/polarssl/recipe.mk b/polarssl/recipe.mk new file mode 100644 index 0000000..40642f4 --- /dev/null +++ b/polarssl/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +polarssl_PORTVERSION = 1.3.9 + +polarssl_MAINTAINER = Damian Parrino +polarssl_LICENSE = GPL2 +polarssl_SHORT_DESC = A Secure Socket Layer library. + +# This port uses CMake. +polarssl_PORT_BUILD = cmake + +# What files we need to download, and where from. +polarssl_DOWNLOAD_SITE = https://src.fedoraproject.org/repo/pkgs/polarssl/polarssl-1.3.9-gpl.tgz/48af7d1f0d5de512cbd6dacf5407884c +polarssl_DOWNLOAD_FILE = polarssl-1.3.9-gpl.tgz +polarssl_DOWNLOAD_SHA256 = d3605afc28ed4b7d1d9e3142d72e42855e4a23c07c951bbb0299556b02d36755 + +# Set cmake build settings +polarssl_CMAKE_ARGS = -DENABLE_TESTING=FALSE -DENABLE_PROGRAMS=FALSE -DCMAKE_POLICY_VERSION_MINIMUM=3.5 diff --git a/raylib4dc/Makefile b/raylib4dc/Makefile deleted file mode 100644 index 351cbd5..0000000 --- a/raylib4dc/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Port Metadata -PORTNAME = raylib4dc -PORTVERSION = 5.5.0 - -MAINTAINER = Andress Barajas -LICENSE = zlib License - http://opensource.org/licenses/Zlib -SHORT_DESC = raylib is a simple and easy-to-use library to enjoy videogames programming. - -DEPENDENCIES = libGL -NOCOPY_TARGET = 1 - -# What files we need to download, and where from. -GIT_REPOSITORY = https://github.com/raylib4Consoles/raylib -GIT_BRANCH = raylib4Consoles - -TARGET = libraylib.a -HDRS = raylib.h raymath.h rlgl.h -HDR_INSTDIR = raylib -DISTFILE_DIR = ${PORTNAME}-${PORTVERSION}/src - -KOS_MAKEFILE = Makefile - -PREINSTALL = raylib_preinstall - -# Apply patch before build -PREBUILD = apply-patch - -include ${KOS_PORTS}/scripts/kos-ports.mk -apply-patch: - patch -p1 -d build/${PORTNAME}-${PORTVERSION} < files/raylib4dc-5.5.0.patch - -raylib_preinstall: - @mkdir -p inst/lib inst/include - @cp build/${DISTFILE_DIR}/${TARGET} inst/lib - @for hdr in ${HDRS}; do \ - cp build/${DISTFILE_DIR}/$$hdr inst/include; \ - done diff --git a/raylib4dc/files/KOSMakefile.mk b/raylib4dc/files/KOSMakefile.mk new file mode 100644 index 0000000..7a241d5 --- /dev/null +++ b/raylib4dc/files/KOSMakefile.mk @@ -0,0 +1,2 @@ +install: + $(MAKE) -C src raylib diff --git a/raylib4dc/files/raylib4dc-5.5.0.patch b/raylib4dc/patches/raylib4dc-5.5.0.patch similarity index 100% rename from raylib4dc/files/raylib4dc-5.5.0.patch rename to raylib4dc/patches/raylib4dc-5.5.0.patch diff --git a/raylib4dc/recipe.mk b/raylib4dc/recipe.mk new file mode 100644 index 0000000..6479d4c --- /dev/null +++ b/raylib4dc/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +raylib4dc_PORTVERSION = 5.5.0 + +raylib4dc_MAINTAINER = Andress Barajas +raylib4dc_LICENSE = zlib License - http://opensource.org/licenses/Zlib +raylib4dc_SHORT_DESC = raylib is a simple and easy-to-use library to enjoy videogames programming. + +raylib4dc_DEPENDENCIES = libGL + +# What files we need to download, and where from. +raylib4dc_GIT_HASH = f1cfd6da839f521e5a6fd84c9783540f8403b203 +raylib4dc_DOWNLOAD_SITE = https://github.com/raylib4Consoles/raylib/archive/ +raylib4dc_DOWNLOAD_FILE = ${raylib4dc_GIT_HASH}.tar.gz + +raylib4dc_TARGET = src/libraylib.a +raylib4dc_INSTALLED_HDRS = src/raylib.h src/raymath.h src/rlgl.h +raylib4dc_HDR_INSTDIR = raylib diff --git a/scripts/build.mk b/scripts/build.mk deleted file mode 100644 index 3f77e5d..0000000 --- a/scripts/build.mk +++ /dev/null @@ -1,113 +0,0 @@ -# kos-ports ##version## -# -# scripts/build.mk -# Copyright (C) 2015 Lawrence Sebald -# - -KOS_MAKEFILE ?= KOSMakefile.mk - -build-stamp: fetch validate-dist unpack copy-kos-files $(PREBUILD) -ifeq ($(PORT_BUILD), autotools) - @if [ -z "${DISTFILE_DIR}" ] ; then \ - cd build/${PORTNAME}-${PORTVERSION} ; \ - else \ - cd build/${DISTFILE_DIR} ; \ - fi ; \ - CC=kos-cc ${CONFIGURE_DEFS} ./configure --cache-file=${KOS_PORTS}/config.${KOS_GCCVER}.cache --prefix=${KOS_PORTS}/${PORTNAME}/inst --host=${AUTOTOOLS_HOST} ${CONFIGURE_ARGS} ; \ - $(MAKE) ${MAKE_TARGET} ; -else ifeq ($(PORT_BUILD), cmake) - @if [ -z "${DISTFILE_DIR}" ] ; then \ - cd build/${PORTNAME}-${PORTVERSION} ; \ - else \ - cd build/${DISTFILE_DIR} ; \ - fi ; \ - if [ -z "${CMAKE_OUTSOURCE}" ] ; then \ - p=. ; \ - else \ - mkdir build ; cd build ; \ - p=.. ; \ - fi ; \ - kos-cmake -DCMAKE_INSTALL_INCLUDEDIR=${KOS_PORTS}/${PORTNAME}/inst/include \ - -DCMAKE_INSTALL_LIBDIR=${KOS_PORTS}/${PORTNAME}/inst/lib $$p ${CMAKE_ARGS} ; \ - cmake --build . -t $(or ${MAKE_TARGET},all) ; -else - @if [ -z "${DISTFILE_DIR}" ] ; then \ - $(MAKE) -C build/${PORTNAME}-${PORTVERSION} -f ${KOS_MAKEFILE} ${MAKE_TARGET} ; \ - else \ - $(MAKE) -C build/${DISTFILE_DIR} -f ${KOS_MAKEFILE} ${MAKE_TARGET} ; \ - fi -endif - touch build-stamp - -install: setup-check version-check abi-check depends-check force-install - -force-install: build-stamp $(PREINSTALL) - @if [ ! -d "inst" ] ; then \ - mkdir inst ; \ - fi - - @cd inst ; \ - if [ ! -d "lib" ] ; then \ - mkdir lib ; \ - fi ; \ - if [ ! -d "include" ] ; then \ - mkdir include ; \ - fi - - @echo "Installing..." - @cd build ; \ - if [ -z "${DISTFILE_DIR}" ] ; then \ - cd ${PORTNAME}-${PORTVERSION} ; \ - else \ - cd ${DISTFILE_DIR} ; \ - fi ; \ - if [ -z "${CMAKE_OUTSOURCE}" ] ; then \ - p=. ; \ - else \ - p=.. ; \ - fi ; \ - if [ -z "${NOCOPY_TARGET}" ] ; then \ - for target in ${TARGET}; do \ - cp $$p/$$target ../../inst/lib ; \ - done ; \ - fi ; \ - for _file in ${INSTALLED_HDRS}; do \ - cp $$_file ../../inst/include ; \ - done ; \ - if [ -n "${HDR_DIRECTORY}" ] ; then \ - cp -R ${HDR_DIRECTORY}/. ../../inst/include ; \ - fi ; \ - if [ -n "${EXAMPLES_DIR}" ] ; then \ - cp -R ${EXAMPLES_DIR}/. ../../inst/examples ; \ - fi - - @if [ -n "${HDR_COMDIR}" ] ; then \ - mkdir -p ${KOS_PORTS}/include/${HDR_COMDIR} ; \ - for _file in ${KOS_PORTS}/${PORTNAME}/inst/include/*; do \ - rm -f ${KOS_PORTS}/include/${HDR_COMDIR}/`basename $$_file` ; \ - ln -s $$_file ${KOS_PORTS}/include/${HDR_COMDIR} ; \ - done ; \ - elif [ -n "${HDR_INSTDIR}" ] ; then \ - rm -f ${KOS_PORTS}/include/${HDR_INSTDIR} ; \ - ln -s ${KOS_PORTS}/${PORTNAME}/inst/include ${KOS_PORTS}/include/${HDR_INSTDIR} ; \ - elif [ -n "${HDR_FULLDIR}" ] ; then \ - rm -f ${KOS_PORTS}/include/${HDR_FULLDIR} ; \ - ln -s ${KOS_PORTS}/${PORTNAME}/inst/include/${HDR_FULLDIR} ${KOS_PORTS}/include/${HDR_FULLDIR} ; \ - else \ - rm -f ${KOS_PORTS}/include/${PORTNAME} ; \ - ln -s ${KOS_PORTS}/${PORTNAME}/inst/include ${KOS_PORTS}/include/${PORTNAME} ; \ - fi - - @for target in $(TARGET); do \ - rm -f ${KOS_PORTS}/lib/$$target ; \ - ln -s ${KOS_PORTS}/${PORTNAME}/inst/lib/$$target ${KOS_PORTS}/lib/$$target ; \ - done - - @rm -f ${KOS_PORTS}/examples/${PORTNAME} - - @if [ -n "${EXAMPLES_DIR}" ] ; then \ - ln -s ${KOS_PORTS}/${PORTNAME}/inst/examples ${KOS_PORTS}/examples/${PORTNAME} ; \ - fi - - @echo "Marking ${PORTNAME} ${PORTVERSION} as installed." - @echo "${PORTVERSION}" > "${KOS_PORTS}/lib/.kos-ports/${PORTNAME}" diff --git a/scripts/clean.mk b/scripts/clean.mk deleted file mode 100644 index eaf7843..0000000 --- a/scripts/clean.mk +++ /dev/null @@ -1,16 +0,0 @@ -# kos-ports ##version## -# -# scripts/clean.mk -# Copyright (C) 2015 Lawrence Sebald -# - -clean-dist: - @echo "Cleaning up dist files ..." - -@rm -rf dist - -clean-build: - @echo "Cleaning up build directories ..." - -@rm -rf build - -@rm -f build-stamp - -clean: clean-build clean-dist diff --git a/scripts/depends.mk b/scripts/depends.mk deleted file mode 100644 index 4cbf9aa..0000000 --- a/scripts/depends.mk +++ /dev/null @@ -1,29 +0,0 @@ -# kos-ports ##version## -# -# scripts/depends.mk -# Copyright (C) 2015 Lawrence Sebald -# - -DEPENDENCIES ?= - -depends-check: -ifeq (${BUILD_DEPENDS},false) - @for _dep in ${DEPENDENCIES}; do \ - if [ ! -f "${KOS_PORTS}/lib/.kos-ports/$$_dep" ] ; then \ - echo "${PORTNAME} requires $$_dep to be installed. Please install the $$_dep port." ; \ - echo "Exiting." ; \ - exit 1 ; \ - fi ; \ - done -else ifeq (${BUILD_DEPENDS},true) - @for _dep in ${DEPENDENCIES}; do \ - if [ ! -f "${KOS_PORTS}/lib/.kos-ports/$$_dep" ] ; then \ - echo "${PORTNAME} requires $$_dep to be installed. Building..." ; \ - ${MAKE} -C "${KOS_PORTS}/$$_dep" install clean || exit 1 ; \ - fi ; \ - done - @echo "Finished processing dependencies for ${PORTNAME}." -else - @echo "BUILD_DEPENDS is not set in config.mk. Please correct your configuration." - exit 1 -endif diff --git a/scripts/download.mk b/scripts/download.mk deleted file mode 100644 index e0d0e59..0000000 --- a/scripts/download.mk +++ /dev/null @@ -1,100 +0,0 @@ -# kos-ports ##version## -# -# scripts/download.mk -# Copyright (C) 2015, 2023 Lawrence Sebald -# - -fetch: - @if [ ! -d "dist" ] ; then \ - mkdir dist ; \ - fi - - @cd dist ; \ - for _file in ${DOWNLOAD_FILES}; do \ - if [ ! -f "$$_file" ] ; then \ - if [ -n "${DOWNLOAD_SITES}" ] ; then \ - for _site in ${DOWNLOAD_SITES}; do \ - echo "Fetching $$_file from $$_site ..." ; \ - file="$$_site/$$_file" ; \ - ${FETCH_CMD} $$file ; \ - if [ "$$?" -eq 0 ] ; then \ - break; \ - fi ; \ - done ; \ - else \ - echo "Fetching $$_file from ${DOWNLOAD_SITE} ..." ; \ - file="${DOWNLOAD_SITE}/$$_file" ; \ - ${FETCH_CMD} $$file ; \ - fi ; \ - fi ; \ - done - - @if [ -z "${DOWNLOAD_FILES}" ] ; then \ - cd dist ; \ - if [ -n "${GIT_REPOSITORY}" ] ; then \ - _repos="${GIT_REPOSITORY}" ; \ - elif [ -n "${GIT_REPOSITORIES}" ] ; then \ - _repos="${GIT_REPOSITORIES}" ; \ - fi ; \ - if [ -n "$$_repos" ] ; then \ - if [ ! -d "${PORTNAME}-${PORTVERSION}" ] ; then \ - for _repo in $$_repos; do \ - echo "Fetching ${PORTNAME} from $$_repo ..." ; \ - if [ -n "${GIT_TAG}" ] ; then \ - git clone --filter=tree:0 $$_repo --branch ${GIT_TAG} --single-branch --depth 1 ${PORTNAME}-${PORTVERSION} ; \ - if [ "$$?" -eq 0 ] ; then \ - break; \ - else \ - rm -rf ${PORTNAME}-${PORTVERSION} ; \ - fi ; \ - elif [ -n "${GIT_BRANCH}" ] ; then \ - git clone --filter=tree:0 $$_repo --branch ${GIT_BRANCH} --single-branch ${PORTNAME}-${PORTVERSION} ; \ - if [ "$$?" -eq 0 ] ; then \ - break; \ - else \ - rm -rf ${PORTNAME}-${PORTVERSION} ; \ - fi ; \ - else \ - git clone --filter=tree:0 $$_repo ${PORTNAME}-${PORTVERSION} ; \ - if [ "$$?" -eq 0 ] ; then \ - break; \ - else \ - rm -rf ${PORTNAME}-${PORTVERSION} ; \ - fi ; \ - fi ; \ - done ; \ - if [ ! -d "${PORTNAME}-${PORTVERSION}" ] ; then \ - echo "Failed to clone Git repository!" ; \ - exit 127 ; \ - fi ; \ - elif [ -z "${GIT_TAG}" ] ; then \ - echo "Updating ${PORTNAME} from Git ..." ; \ - cd ${PORTNAME}-${PORTVERSION} ; \ - git pull ; \ - cd .. ; \ - fi ; \ - if [ -z "${GIT_TAG}" -a -n "${GIT_CHANGESET}" ] ; then \ - echo "Resetting to changeset ${GIT_CHANGESET}" ; \ - cd ${PORTNAME}-${PORTVERSION} ; \ - git reset --hard ${GIT_CHANGESET} ; \ - cd .. ; \ - fi ; \ - elif [ -n "${SVN_REPOSITORY}" ] ; then \ - if [ ! -d "${PORTNAME}-${PORTVERSION}" ] ; then \ - echo "Fetching ${PORTNAME} from ${SVN_REPOSITORY} ..." ; \ - if [ -n "${SVN_REVISION}" ] ; then \ - svn checkout ${SVN_REPOSITORY} -r ${SVN_REVISION} ${PORTNAME}-${PORTVERSION} ; \ - else \ - svn checkout ${SVN_REPOSITORY} ${PORTNAME}-${PORTVERSION} ; \ - fi ; \ - else \ - echo "Updating ${PORTNAME} from ${SVN_REPOSITORY} ..." ; \ - cd ${PORTNAME}-${PORTVERSION} ; \ - if [ -n "${SVN_REVISION}" ] ; then \ - svn update -r "${SVN_REVISION}" ; \ - else \ - svn update ; \ - fi ; \ - fi ; \ - fi ; \ - fi diff --git a/scripts/kos-ports.mk b/scripts/kos-ports.mk deleted file mode 100644 index c01b86f..0000000 --- a/scripts/kos-ports.mk +++ /dev/null @@ -1,24 +0,0 @@ -# kos-ports ##version## -# -# scripts/kos-ports.mk -# Copyright (C) 2015 Lawrence Sebald -# - -# Grand central station for all the various sub-Makefiles. - -all: - @echo "Please build your port with 'make install clean'." - -include ${KOS_PORTS}/config.mk - -include ${KOS_PORTS}/scripts/setup.mk -include ${KOS_PORTS}/scripts/download.mk -include ${KOS_PORTS}/scripts/unpack.mk -include ${KOS_PORTS}/scripts/clean.mk -include ${KOS_PORTS}/scripts/build.mk -include ${KOS_PORTS}/scripts/version.mk -include ${KOS_PORTS}/scripts/precision.mk -include ${KOS_PORTS}/scripts/depends.mk -include ${KOS_PORTS}/scripts/uninstall.mk -include ${KOS_PORTS}/scripts/portinfo.mk -include ${KOS_PORTS}/scripts/validate.mk diff --git a/scripts/lib.mk b/scripts/lib.mk index 1b266bd..6b19408 100644 --- a/scripts/lib.mk +++ b/scripts/lib.mk @@ -13,11 +13,10 @@ # something like build/*.o. You'll also want to define LOCAL_CLEAN to # clean your build dir. -defaultall: $(OBJS) subdirs linklib +install: subdirs $(TARGET) -linklib: - rm -f ${TARGET} - ${KOS_AR} rcs ${TARGET} $(OBJS) $(LIB_OBJS) +$(TARGET): $(OBJS) + ${KOS_AR} rcs $@ $^ $(LIB_OBJS) clean: -rm -f $(OBJS) $(LIB_OBJS) $(TARGET) diff --git a/scripts/portinfo.mk b/scripts/portinfo.mk deleted file mode 100644 index b932e8c..0000000 --- a/scripts/portinfo.mk +++ /dev/null @@ -1,28 +0,0 @@ -# kos-ports ##version## -# -# scripts/portinfo.mk -# Copyright (C) 2015 Lawrence Sebald -# - -MAINTAINER ?= -LICENSE ?= -SHORT_DESC ?= - -portinfo: - @echo "$(PORTNAME) $(PORTVERSION)" -ifdef SHORT_DESC - @echo "$(SHORT_DESC)" -endif - @echo "---------------------------------------------------" -ifdef MAINTAINER - @echo "KOS Port maintainer: $(MAINTAINER)" -endif -ifdef LICENSE - @echo "License: $(LICENSE)" -else - @echo "License: Unknown" -endif - @if [ -f "pkg-descr" ] ; then \ - echo "" ; \ - cat pkg-descr ; \ - fi diff --git a/scripts/precision.mk b/scripts/precision.mk deleted file mode 100644 index ac1215e..0000000 --- a/scripts/precision.mk +++ /dev/null @@ -1,30 +0,0 @@ -# kos-ports ##version## -# -# scripts/precision.mk -# Copyright (C) 2024 Eric Fradella -# - -REQUIRES_ABI ?= any - -abi-check: -ifeq (${CHECK_PRECISION},true) - ifeq (${REQUIRES_ABI},any) - @echo "${PORTNAME} is compatible with any floating-point ABI." - else - @case " $(REQUIRES_ABI) " in *" $(KOS_SH4_PRECISION) "*) \ - echo "${PORTNAME} is compatible with the ${KOS_SH4_PRECISION} floating-point ABI."; \ - ;; \ - *) \ - echo "${PORTNAME} is not compatible with the ${KOS_SH4_PRECISION} floating-point ABI!"; \ - echo "Change the KOS_SH4_PRECISION setting in your environ.sh to one of the following: ${REQUIRES_ABI}"; \ - echo "Then rebuild KOS and try again."; \ - exit 1; \ - ;; \ - esac - endif -else ifeq (${CHECK_PRECISION},false) - @echo "CHECK_PRECISION is disabled in config.mk. Skipping ABI compatibility check." -else - @echo "CHECK_PRECISION is not set in config.mk. Please correct your configuration." - exit 1 -endif diff --git a/scripts/setup.mk b/scripts/setup.mk deleted file mode 100644 index 61fc0b1..0000000 --- a/scripts/setup.mk +++ /dev/null @@ -1,25 +0,0 @@ -# kos-ports ##version## -# -# scripts/setup.mk -# Copyright (C) 2015 Lawrence Sebald -# - -setup-check: - @cd ${KOS_PORTS} ; \ - if [ ! -d "lib" ] ; then \ - mkdir lib ; \ - fi ; \ - if [ ! -d "lib/.kos-ports" ] ; then \ - mkdir lib/.kos-ports ; \ - echo "Do not modify any of the files in this directory." >> lib/.kos-ports/README ; \ - echo "" >> lib/.kos-ports/README ; \ - echo "All files in this directory are for record-keeping purposes and maintain the" >> lib/.kos-ports/README ; \ - echo "state of the ports collection. Modifying or deleting files in this directory" >> lib/.kos-ports/README ; \ - echo "will probably break the entire ports collection, so don't do it." >> lib/.kos-ports/README ;\ - fi ; \ - if [ ! -d "include" ] ; then \ - mkdir include ; \ - fi ; \ - if [ ! -d "examples" ] ; then \ - mkdir examples ; \ - fi || exit 1 diff --git a/scripts/uninstall.mk b/scripts/uninstall.mk deleted file mode 100644 index ca02a67..0000000 --- a/scripts/uninstall.mk +++ /dev/null @@ -1,32 +0,0 @@ -# kos-ports ##version## -# -# scripts/uninstall.mk -# Copyright (C) 2015 Lawrence Sebald -# - -uninstall: - @if [ -f ${KOS_PORTS}/lib/.kos-ports/${PORTNAME} ] ; then \ - echo "Uninstalling ${PORTNAME}..." ; \ - rm -f ${KOS_PORTS}/lib/.kos-ports/${PORTNAME} ; \ - rm -f ${KOS_PORTS}/lib/${TARGET} ; \ - if [ -n "${HDR_COMDIR}" ] ; then \ - for _file in ${KOS_PORTS}/${PORTNAME}/inst/include/*; do \ - rm -f ${KOS_PORTS}/include/${HDR_COMDIR}/`basename $$_file` ; \ - done ; \ - if [ -z "$$(ls -A ${KOS_PORTS}/include/${HDR_COMDIR})" ] ; then \ - rm -rf ${KOS_PORTS}/include/${HDR_COMDIR} ; \ - fi ; \ - elif [ -n "${HDR_INSTDIR}" ] ; then \ - rm -f ${KOS_PORTS}/include/${HDR_INSTDIR} ; \ - elif [ -n "${HDR_FULLDIR}" ] ; then \ - rm -f ${KOS_PORTS}/include/${HDR_FULLDIR} ; \ - else \ - rm -f ${KOS_PORTS}/include/${PORTNAME} ; \ - fi ; \ - rm -fr inst ; \ - echo "Uninstalled ${PORTNAME}." ; \ - echo "WARNING: Dependency checking not done, any dependent ports will be broken." ; \ - else \ - echo "${PORTNAME} does not appear to be installed." ; \ - exit 1 ; \ - fi diff --git a/scripts/unpack.mk b/scripts/unpack.mk deleted file mode 100644 index 364fa92..0000000 --- a/scripts/unpack.mk +++ /dev/null @@ -1,36 +0,0 @@ -# kos-ports ##version## -# -# scripts/unpack.mk -# Copyright (C) 2015 Lawrence Sebald -# - -unpack: fetch - @if [ -d "build" ] ; then \ - rm -rf build ; \ - fi - - @mkdir build - - @if [ -n "${DOWNLOAD_FILES}" ]; then \ - cd build ; \ - for _file in "${DOWNLOAD_FILES}"; do \ - echo "Unpacking $$_file ..." ; \ - ${UNPACK_CMD} "../dist/$$_file" ; \ - done ; \ - else \ - cd build ; \ - echo "Copying SCM checkout of ${PORTNAME} ..." ; \ - cp -r ../dist/${PORTNAME}-${PORTVERSION} . ; \ - fi - -copy-kos-files: - @echo "Copying KOS files..." - @cd build ; \ - if [ -z "${DISTFILE_DIR}" ] ; then \ - cd ${PORTNAME}-${PORTVERSION} ; \ - else \ - cd ${DISTFILE_DIR} ; \ - fi ; \ - for _file in ${KOS_DISTFILES}; do \ - cp "../../files/$$_file" . ; \ - done diff --git a/scripts/validate.mk b/scripts/validate.mk deleted file mode 100644 index ed3ab9d..0000000 --- a/scripts/validate.mk +++ /dev/null @@ -1,13 +0,0 @@ -# kos-ports ##version## -# -# scripts/validate.mk -# Copyright (C) 2015 Lawrence Sebald -# - -validate-dist: -ifeq (${VALIDATE_DISTFILES},true) - @[ "${PYTHON_CMD}" ] || ( echo "PYTHON_CMD is not set in config.mk"; exit 1 ) - @if [ -f "distinfo" ] ; then \ - ${PYTHON_CMD} ${KOS_PORTS}/scripts/validate_dist.py || exit 1 ; \ - fi -endif diff --git a/scripts/validate_dist.py b/scripts/validate_dist.py deleted file mode 100755 index 97ba32c..0000000 --- a/scripts/validate_dist.py +++ /dev/null @@ -1,64 +0,0 @@ -# kos-ports ##version## -# -# scripts/validate_dist.py -# Copyright (C) 2015 Lawrence Sebald -# - -import sys -import os -import hashlib - -def calc_sha256(fn): - h = hashlib.sha256() - with open('dist/' + fn, 'rb') as f: - buf = f.read(1024*1024) - while len(buf) > 0: - h.update(buf) - buf = f.read(1024*1024) - return h.hexdigest() - return None - -def file_size(fn): - try: - return os.path.getsize('dist/' + fn) - except: - return None - -# Script entry point. -with open('distinfo', 'r') as f: - lines = f.readlines() - for l1, l2 in zip(lines[::2], lines[1::2]): - # Remove newlines and any trailing whitespace... - l1.rstrip() - l2.rstrip() - - # Split each string into tokens and validate that they look sane. - l1t = l1.split() - l2t = l2.split() - - if l1t[0] != 'SHA256' or l1t[2] != '=' or l2t[0] != 'SIZE' or l2t[2] != '=' or l1t[1] != l2t[1]: - sys.exit('Invalid distinfo') - if not l1t[1].startswith('(') or not l1t[1].endswith(')'): - sys.exit('Invalid distinfo') - - fn = l1t[1].lstrip('(').rstrip(')') - - # Validate that everything matches the distinfo for this file. - size = file_size(fn) - - if size == None: - sys.exit('File not found: %s' % (fn,)) - - if size != int(l2t[3]): - sys.exit('File "%s" has an incorrect size %d (expected %d)' % (fn, size, int(l2t[3]))) - - sha = calc_sha256(fn) - - if sha == None: - sys.exit('File not found: %s' % (fn, )) - - if sha != l1t[3]: - sys.exit('File "%s" has an incorrect sha %s (expected %s). It may be corrupt!' % (fn, sha, l1t[3])) - - print('File "%s" is ok.' % (fn, )) -sys.exit(0) diff --git a/scripts/vercmp.sh b/scripts/vercmp.sh deleted file mode 100755 index 184b40d..0000000 --- a/scripts/vercmp.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) 2010 Dennis Willamson -# License: CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/) -# Obtained from: -# http://stackoverflow.com/questions/4023830/bash-how-compare-two-strings-in-version-format - -# The only modifications made were to remove the test code and to add the bit at -# the bottom to return back to the calling shell -# Returns 0 if the version numbers are identical, 1 if the first is greater than -# the second, 2 if the second is greater than the first. - -# An additional change checks if no version is set at all, in which case it's considered higher. -vercomp () { - if [ "$2" = '' ]; - then - return 2 - fi - if [[ $1 == $2 ]] - then - return 0 - fi - local IFS=. - local i ver1=($1) ver2=($2) - # fill empty fields in ver1 with zeros - for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)) - do - ver1[i]=0 - done - for ((i=0; i<${#ver1[@]}; i++)) - do - if [[ -z ${ver2[i]} ]] - then - # fill empty fields in ver2 with zeros - ver2[i]=0 - fi - if ((10#${ver1[i]} > 10#${ver2[i]})) - then - return 1 - fi - if ((10#${ver1[i]} < 10#${ver2[i]})) - then - return 2 - fi - done - return 0 -} - -vercomp $1 $2 -exit $? diff --git a/scripts/version.mk b/scripts/version.mk deleted file mode 100644 index a261e51..0000000 --- a/scripts/version.mk +++ /dev/null @@ -1,24 +0,0 @@ -# kos-ports ##version## -# -# scripts/version.mk -# Copyright (C) 2015 Lawrence Sebald -# - -version-check: - @if [ -f ${KOS_PORTS}/lib/.kos-ports/${PORTNAME} ] ; then \ - a=`cat ${KOS_PORTS}/lib/.kos-ports/${PORTNAME}` ; \ - ${KOS_PORTS}/scripts/vercmp.sh $$a ${PORTVERSION} ; \ - res=$$? ; \ - if [ "$$res" -eq "0" ] ; then \ - echo "${PORTNAME} is already installed and is latest version. Exiting." ; \ - exit 1 ; \ - elif [ "$$res" -eq "1" ] ; then \ - echo "${PORTNAME} is already installed and is newer than latest version!" ; \ - echo "Ports collection out of sync. Please update! Exiting." ; \ - exit 255 ; \ - else \ - echo "${PORTNAME} $$a installed. Update to ${PORTVERSION}." ; \ - fi ; \ - else \ - echo "${PORTNAME} is not currently installed." ; \ - fi diff --git a/sh4zam/Makefile b/sh4zam/Makefile deleted file mode 100644 index 9d65d89..0000000 --- a/sh4zam/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# Port Metadata -PORTNAME = sh4zam - -MAINTAINER = Falco Girgis -LICENSE = MIT -SHORT_DESC = Fast math library, optimized for the SH4. - -PORT_BUILD = cmake - -GIT_REPOSITORY = https://github.com/gyrovorbis/sh4zam.git - -TARGET = libsh4zam.a -HDR_DIRECTORY = include/sh4zam -HDR_INSTDIR = sh4zam -EXAMPLES_DIR = example - -include ${KOS_PORTS}/scripts/kos-ports.mk \ No newline at end of file diff --git a/sh4zam/recipe.mk b/sh4zam/recipe.mk new file mode 100644 index 0000000..8f6dea5 --- /dev/null +++ b/sh4zam/recipe.mk @@ -0,0 +1,12 @@ +# Port Metadata +sh4zam_PORTVERSION = 1.0.0 + +sh4zam_MAINTAINER = Falco Girgis +sh4zam_LICENSE = MIT +sh4zam_SHORT_DESC = Fast math library, optimized for the SH4. + +sh4zam_PORT_BUILD = cmake + +sh4zam_GIT_HASH = a17755714930fca95c228ad715873afe9ff50d78 +sh4zam_DOWNLOAD_SITE = https://github.com/gyrovorbis/sh4zam/archive/ +sh4zam_DOWNLOAD_FILE = ${sh4zam_GIT_HASH}.tar.gz diff --git a/stb_image/Makefile b/stb_image/Makefile deleted file mode 100644 index 67108f9..0000000 --- a/stb_image/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# Port Metadata -PORTNAME = stb_image -PORTVERSION = 2.29 - -MAINTAINER = Jason Rost (OniEnzeru) -LICENSE = Public Domain -SHORT_DESC = Single header library for image loading supporting many common formats. - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = https://raw.githubusercontent.com/nothings/stb/master/ -# Format KOS-PORTS wants to work with -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz -# Actual downloaded file into dist ( we will package and tar this for compat ) -DOWNLOAD_FILESB = stb_image.h - -TARGET = libstb_image.a -INSTALLED_HDRS = stb_image.h -HDR_INSTDIR = stb_image - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk stb_image.cpp - -include ${KOS_PORTS}/scripts/kos-ports.mk - -fetch: - @if [ ! -d "dist" ]; then \ - mkdir dist ; \ - fi - - @cd dist ; \ - for _file in ${DOWNLOAD_FILESB}; do \ - if [ ! -f "$$_file" ] ; then \ - echo "fetchB"; \ - echo "Fetching $$_file from ${DOWNLOAD_SITE} ..." ; \ - file="${DOWNLOAD_SITE}/$$_file" ; \ - ${FETCH_CMD} $$file ; \ - fi ; \ - mkdir -p ${PORTNAME}-${PORTVERSION}; \ - mv ${DOWNLOAD_FILESB} ${PORTNAME}-${PORTVERSION}/ ; \ - tar -czvf ${PORTNAME}-${PORTVERSION}.tar.gz ${PORTNAME}-${PORTVERSION} ; \ - done -# Create proper directory structure for the .tar.gz and move header inside -# Tar the downloaded file so that KOS flags know what to do with the single header diff --git a/stb_image/distinfo b/stb_image/distinfo deleted file mode 100644 index e69de29..0000000 diff --git a/stb_image/files/KOSMakefile.mk b/stb_image/files/KOSMakefile.mk index bd1ecdd..839d40c 100644 --- a/stb_image/files/KOSMakefile.mk +++ b/stb_image/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = libstb_image.a OBJS = stb_image.o -KOS_CFLAGS += -Iinclude include ${KOS_PORTS}/scripts/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude diff --git a/stb_image/recipe.mk b/stb_image/recipe.mk new file mode 100644 index 0000000..81cdc4d --- /dev/null +++ b/stb_image/recipe.mk @@ -0,0 +1,16 @@ +# Port Metadata +stb_image_PORTVERSION = 2.29 + +stb_image_MAINTAINER = Jason Rost (OniEnzeru) +stb_image_LICENSE = Public Domain +stb_image_SHORT_DESC = Single header library for image loading supporting many common formats. + +# What files we need to download, and where from. +stb_image_DOWNLOAD_SITE = https://raw.githubusercontent.com/nothings/stb/master/ +stb_image_DOWNLOAD_FILE = stb_image.h + +stb_image_TARGET = libstb_image.a +stb_image_INSTALLED_HDRS = stb_image.h +stb_image_HDR_INSTDIR = stb_image + +stb_image_UNPACK_CMD = install -m 0644 -D -t ${KOS_PORTS}/stb_image/build/${stb_image_PORTVERSION}/stb_image-${stb_image_PORTVERSION} diff --git a/utils/build-all.sh b/utils/build-all.sh deleted file mode 100755 index ed3fcd0..0000000 --- a/utils/build-all.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# kos-ports ##version## -# -# utils/build-all.sh -# Copyright (C) 2015 Lawrence Sebald -# Copyright (C) 2024 Andy Barajas -# - -cd ${KOS_PORTS} -errors="" -error_count=0 - -for _dir in ${KOS_PORTS}/* ; do - if [ -d "${_dir}" ] ; then - if [ -f "${_dir}/Makefile" ] ; then - echo "Checking if ${_dir} is installed and up-to-date..." - ${KOS_MAKE} -C "${_dir}" version-check > /dev/null 2>&1 - rv=$? - if [ "$rv" -eq 0 ] ; then - echo "Building ${_dir}..." - ${KOS_MAKE} -C "${_dir}" install clean - rv=$? - echo $rv - if [ "$rv" -ne 0 ] ; then - echo "Error building ${_dir}." - errors="${errors}${_dir}: Build failed with return code ${rv}\n" - error_count=$((error_count + 1)) - fi - else - echo "${_dir} is already installed and up-to-date. Skipping." - fi - fi - fi -done - -if [ -n "$errors" ]; then - echo "\n-------------------------------------------------" - echo "$error_count error(s) occurred during the build process:" - echo "$errors" -fi -exit $error_count diff --git a/utils/calc_dist.py b/utils/calc_dist.py deleted file mode 100755 index 6473b70..0000000 --- a/utils/calc_dist.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -# kos-ports ##version## -# -# utils/calc_dist.py -# Copyright (C) 2015 Lawrence Sebald -# - -import os -import sys -import hashlib - -for arg in sys.argv[1:]: - h = hashlib.sha256() - with open(arg, 'rb') as f: - buf = f.read(1024*1024) - while len(buf) > 0: - h.update(buf) - buf = f.read(1024*1024) - print("SHA256 (%s) = %s" % (arg, h.hexdigest())) - print("SIZE (%s) = %d" % (arg, os.path.getsize(arg))) diff --git a/utils/clean-all.sh b/utils/clean-all.sh deleted file mode 100755 index d798b10..0000000 --- a/utils/clean-all.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# kos-ports ##version## -# -# utils/clean-all.sh -# Copyright (C) 2015 Lawrence Sebald -# - -cd ${KOS_PORTS} - -for _dir in ${KOS_PORTS}/* ; do - if [ -d "${_dir}" ] ; then - if [ -f "${_dir}/Makefile" ] ; then - echo "Cleaning in ${_dir}..." - ${KOS_MAKE} -C "${_dir}" clean - fi - fi -done diff --git a/utils/uninstall-all.sh b/utils/uninstall-all.sh deleted file mode 100755 index 79dd988..0000000 --- a/utils/uninstall-all.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# kos-ports ##version## -# -# utils/uninstall-all.sh -# Copyright (C) 2015 Lawrence Sebald -# - -cd ${KOS_PORTS} - -for _dir in ${KOS_PORTS}/* ; do - if [ -d "${_dir}" ] ; then - if [ -f "${_dir}/Makefile" ] ; then - echo "Uninstalling in ${_dir}..." - ${KOS_MAKE} -C "${_dir}" uninstall - fi - fi -done diff --git a/zlib/Makefile b/zlib/Makefile deleted file mode 100644 index ec678c6..0000000 --- a/zlib/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Port Metadata -PORTNAME = zlib -PORTVERSION = 1.3.2 - -MAINTAINER = Lawrence Sebald -LICENSE = zlib License - http://opensource.org/licenses/Zlib -SHORT_DESC = Lossless data compression library - -# No dependencies beyond the base system. -DEPENDENCIES = - -# What files we need to download, and where from. -DOWNLOAD_SITE = http://zlib.net -DOWNLOAD_FILES = ${PORTNAME}-${PORTVERSION}.tar.gz - -TARGET = libz.a -INSTALLED_HDRS = zlib.h zconf.h - -# KOS Distributed extras (to be copied into the build tree) -KOS_DISTFILES = KOSMakefile.mk kos_zlib.c - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/zlib/distinfo b/zlib/distinfo deleted file mode 100644 index 44d630f..0000000 --- a/zlib/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (zlib-1.3.2.tar.gz) = bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16 -SIZE (zlib-1.3.2.tar.gz) = 1502830 diff --git a/zlib/files/KOSMakefile.mk b/zlib/files/KOSMakefile.mk deleted file mode 100644 index 85bae71..0000000 --- a/zlib/files/KOSMakefile.mk +++ /dev/null @@ -1,7 +0,0 @@ -TARGET = libz.a -OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o \ - infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o kos_zlib.o - -KOS_CFLAGS += -I. -DHAVE_UNISTD_H -DHAVE_STDARG_H - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/zlib/recipe.mk b/zlib/recipe.mk new file mode 100644 index 0000000..eca49b2 --- /dev/null +++ b/zlib/recipe.mk @@ -0,0 +1,17 @@ +# Port Metadata +zlib_PORTVERSION = 1.3.2 + +zlib_MAINTAINER = Lawrence Sebald +zlib_LICENSE = zlib License - http://opensource.org/licenses/Zlib +zlib_SHORT_DESC = Lossless data compression library + +zlib_PORT_BUILD = cmake + +# What files we need to download, and where from. +# Note: we use a github mirror as zlib.net often fails +#zlib_DOWNLOAD_SITE = http://zlib.net +zlib_DOWNLOAD_SITE = https://github.com/madler/zlib/releases/download/v${zlib_PORTVERSION}/ +zlib_DOWNLOAD_FILE = zlib-${zlib_PORTVERSION}.tar.gz +zlib_DOWNLOAD_SHA256 = bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16 + +zlib_CMAKE_ARGS = -DZLIB_BUILD_TESTING=OFF -DZLIB_BUILD_SHARED=OFF From 4199ef9ffbd8a34dfbbb484795d52f92cc9111c4 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 24 Jun 2026 15:56:28 +0200 Subject: [PATCH 02/27] Add CI Add a CI script that will create a matrix of jobs, one per package. This will use the latest KallistiOS master along with the stable toolchain. This is extra helpful to quickly see what packages are failing and what packages build fine. Signed-off-by: Paul Cercueil --- .github/list-packages.sh | 5 +++ .github/workflows/autobuild.yml | 64 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100755 .github/list-packages.sh create mode 100644 .github/workflows/autobuild.yml diff --git a/.github/list-packages.sh b/.github/list-packages.sh new file mode 100755 index 0000000..ef591d2 --- /dev/null +++ b/.github/list-packages.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cd `dirname $0`/.. + +ls -1 */recipe.mk |awk -F'/' '{gsub(/\.mk$/, "", $2); print "{\"package\":\""$1"\"}"}' | jq -R -s -c 'split("\n")[:-1]' diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml new file mode 100644 index 0000000..2887a09 --- /dev/null +++ b/.github/workflows/autobuild.yml @@ -0,0 +1,64 @@ +name: Linux build + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + matrix: + if: github.repository == 'KallistiOS/kos-ports' + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.setup-matrix.outputs.matrix }} + + steps: + - uses: actions/checkout@v7 + + - name: Setup matrix + id: setup-matrix + run: | + echo "matrix=$($GITHUB_WORKSPACE/.github/list-packages.sh)" >> $GITHUB_OUTPUT + + build: + needs: matrix + if: github.repository == 'KallistiOS/kos-ports' + runs-on: ubuntu-latest + container: + image: docker://pcercuei/dreamcast-toolchain:stable + strategy: + fail-fast: false + matrix: + package: ${{ fromJSON(needs.matrix.outputs.matrix) }} + env: + package: ${{ fromJSON(matrix.package).package }} + + steps: + - uses: actions/checkout@v7 + + - uses: actions/checkout@v7 + with: + repository: pcercuei/KallistiOS + ref: kos-ports-ng + path: KallistiOS + + - name: add-dependencies + run: | + apk --update add cmake + + - name: build-kallistios + run: | + ln -s $GITHUB_WORKSPACE/KallistiOS /opt/toolchains/dc/kos + ln -s $GITHUB_WORKSPACE /opt/toolchains/dc/kos-ports + . $GITHUB_WORKSPACE/KallistiOS/doc/environ.sh.sample + make -C $GITHUB_WORKSPACE/KallistiOS + + - name: build-port + run: | + ln -s $GITHUB_WORKSPACE/KallistiOS /opt/toolchains/dc/kos + ln -s $GITHUB_WORKSPACE /opt/toolchains/dc/kos-ports + . $GITHUB_WORKSPACE/KallistiOS/doc/environ.sh.sample + make $package From ea8cd4b3eae8df40612bb46395b2e87e3b745245 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 26 Jun 2026 01:31:16 +0200 Subject: [PATCH 03/27] mruby: Fix build and bump version Update to the version 4.0.0. The mruby package needs host tools, so CC/RANLIB/AR are now overriden to the host compiler's tools. It also needs "rake", so install it on the CI. Drop the code to "fix" the includes. Since we use a proper sysroot now, mruby will install properly where it should be. Signed-off-by: Paul Cercueil --- .github/workflows/autobuild.yml | 2 +- Makefile | 2 +- mruby/files/KOSMakefile.mk | 23 +---------------------- mruby/recipe.mk | 7 +++++-- 4 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 2887a09..6b500b2 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -47,7 +47,7 @@ jobs: - name: add-dependencies run: | - apk --update add cmake + apk --update add cmake ruby-rake - name: build-kallistios run: | diff --git a/Makefile b/Makefile index 18477f2..b7805f8 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ ${1}/.stamp_installed_cmake: $${${2}_BUILD_DEPS} touch $$@ ${1}/.stamp_installed_manual: $${${2}_BUILD_DEPS} - ${MAKE} -C $${${2}_DISTFILE_DIR} -f $${${2}_KOS_MAKEFILE} $${${2}_MAKE_TARGET} ${BUILD_ENV} + ${MAKE} -C $${${2}_DISTFILE_DIR} -f $${${2}_KOS_MAKEFILE} $${${2}_MAKE_TARGET} ${BUILD_ENV} $${${2}_BUILD_ENV} mkdir -p ${SYSROOT}/lib ${SYSROOT}/include/$${${2}_HDR_INSTDIR} for each in $${${2}_TARGET} ; do \ install -m 644 $${${2}_DISTFILE_DIR}/$$$${each} ${SYSROOT}/lib ; \ diff --git a/mruby/files/KOSMakefile.mk b/mruby/files/KOSMakefile.mk index baf1fd7..9d779b1 100644 --- a/mruby/files/KOSMakefile.mk +++ b/mruby/files/KOSMakefile.mk @@ -4,11 +4,6 @@ TARGET = libmruby.a MRUBY_BUILD_DIR = $(CURDIR)/build MRUBY_BUILD_KOS_ARCH_DIR = $(MRUBY_BUILD_DIR)/$(KOS_ARCH) -# Definition of headers directory (as we will need to alter the relations) -MRUBY_INCLUDE_DIR = $(MRUBY_BUILD_KOS_ARCH_DIR)/include -MRUBY_INCLUDE_MRUBY_DIR = $(MRUBY_INCLUDE_DIR)/mruby -MRUBY_INCLUDE_PRESYM_DIR = $(MRUBY_INCLUDE_MRUBY_DIR)/presym - # Handling mruby compiler executable (mrbc) # This compiler is necessary to transpile Ruby sources into a C source file MRUBY_COMPILER = mrbc @@ -53,7 +48,7 @@ endif # mruby compiler executable (mrbc) (with extension if necessary) MRUBY_COMPILER_BIN = $(MRUBY_COMPILER)$(EXECUTABLEEXTENSION) -install: | prepare generatemruby fixincludes copylib installmrbc +install: | prepare generatemruby copylib installmrbc # Preparing the location where the mruby compiler executable (mrbc) will be installed prepare: @@ -81,19 +76,3 @@ installmrbc: @echo "Installing $(MRUBY_COMPILER) to $(MRUBY_INSTALL_DIR)..." @cp $(MRUBY_BUILD_DIR)/host/bin/$(MRUBY_COMPILER_BIN) $(MRUBY_INSTALL_DIR) @strip $(MRUBY_INSTALL_DIR)/$(MRUBY_COMPILER_BIN) - -# Alter header files and alter #include directives -# #include "{variable}" => #include -# #include "" => #include -# #include "mrbconf.h" => #include (in "mruby.h") -fixincludes: - @echo "Updating includes before installation..." - @for _file in $(MRUBY_INCLUDE_DIR)/*.h $(MRUBY_INCLUDE_MRUBY_DIR)/*.h $(MRUBY_INCLUDE_PRESYM_DIR)/*.h; do \ - sed -ri -e 's/#include "([^[:space:]]+)"/#include /g;s/#include <(mruby[^[:space:]]+)>/#include /g' $$_file $(SED_FLAGS); \ - done - @for _file in $(MRUBY_INCLUDE_DIR)/*.h; do \ - sed -i -e 's/#include /#include /g' $$_file $(SED_FLAGS); \ - done - @for _file in $(MRUBY_INCLUDE_DIR)/*.h $(MRUBY_INCLUDE_MRUBY_DIR)/*.h $(MRUBY_INCLUDE_PRESYM_DIR)/*.h; do \ - sed -i -e 's/#include mruby_LICENSE = MIT @@ -8,7 +8,10 @@ mruby_SHORT_DESC = Lightweight Ruby # What files we need to download, and where from. mruby_DOWNLOAD_SITE = https://github.com/mruby/mruby/archive/refs/tags/ mruby_DOWNLOAD_FILE = ${mruby_PORTVERSION}.tar.gz +mruby_DOWNLOAD_SHA256 = e2ea271dbed14e9f2b33df773ae447b747dbc242ce2675022c0a57efea85a7b4 + +# Override the CC/RANLIB/AR variables set to the target tools in the Makefile +mruby_BUILD_ENV = CC=cc RANLIB=ranlib AR=ar mruby_TARGET = libmruby.a mruby_HDR_DIRECTORY = build/$(KOS_ARCH)/include -mruby_HDR_INSTDIR = mruby From ff164b520cbe486ecb06e5308c6fca7810b537ac Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 26 Jun 2026 12:19:12 +0200 Subject: [PATCH 04/27] SDL: Install a .pc file And bump SDL_PORTVERSION, as autotools will typically verify the package's version against a minimal version supported. Signed-off-by: Paul Cercueil --- SDL/files/KOSMakefile.mk | 6 ++++++ SDL/files/sdl.pc.in | 11 +++++++++++ SDL/recipe.mk | 6 +++--- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 SDL/files/KOSMakefile.mk create mode 100644 SDL/files/sdl.pc.in diff --git a/SDL/files/KOSMakefile.mk b/SDL/files/KOSMakefile.mk new file mode 100644 index 0000000..b007ac6 --- /dev/null +++ b/SDL/files/KOSMakefile.mk @@ -0,0 +1,6 @@ +.PHONY: install + +install: + $(MAKE) -f Makefile.dc install + mkdir -p ${SDL_PC_PATH} + sed "s/@SDL_VERSION@/${SDL_VERSION}/" sdl.pc.in > ${SDL_PC_PATH}/sdl.pc diff --git a/SDL/files/sdl.pc.in b/SDL/files/sdl.pc.in new file mode 100644 index 0000000..25d2839 --- /dev/null +++ b/SDL/files/sdl.pc.in @@ -0,0 +1,11 @@ +prefix= +exec_prefix=${prefix} +bindir=${exec_prefix}/bin +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: SDL +Description: The SDL library +Version: @SDL_VERSION@ +Libs: -L${libdir} -lSDL -lGL +Cflags: -I${includedir}/SDL diff --git a/SDL/recipe.mk b/SDL/recipe.mk index fe89be2..d6ce733 100644 --- a/SDL/recipe.mk +++ b/SDL/recipe.mk @@ -1,5 +1,5 @@ # Port Metadata -SDL_PORTVERSION = 1.2.0 +SDL_PORTVERSION = 1.2.15 SDL_MAINTAINER = Nobody SDL_LICENSE = LGPLv2.1 @@ -13,8 +13,8 @@ SDL_GIT_HASH = 6648216ef09099d722623a155693fabee972380f SDL_DOWNLOAD_SITE = https://github.com/libsdl-org/SDL-1.2/archive/ SDL_DOWNLOAD_FILE = ${SDL_GIT_HASH}.tar.gz -SDL_KOS_MAKEFILE = Makefile.dc - SDL_TARGET = libSDL.a SDL_HDR_DIRECTORY = include SDL_HDR_INSTDIR = SDL + +SDL_BUILD_ENV = SDL_VERSION=${SDL_PORTVERSION} SDL_PC_PATH=${KOS_PORTS}/sysroot/lib/pkgconfig/ From 55488ba192f77f6e80c255e68a3c13a41dc64b55 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 26 Jun 2026 12:20:37 +0200 Subject: [PATCH 05/27] SDL_ttf: Discover SDL using pkg-config Now that SDL installs a .pc file, it is auto-discovered by SDL_ttf. Signed-off-by: Paul Cercueil --- SDL_ttf/files/KOSMakefile.mk | 10 ---------- SDL_ttf/patches/without-opengl.patch | 13 +++++++++++++ SDL_ttf/recipe.mk | 2 -- 3 files changed, 13 insertions(+), 12 deletions(-) delete mode 100644 SDL_ttf/files/KOSMakefile.mk create mode 100644 SDL_ttf/patches/without-opengl.patch diff --git a/SDL_ttf/files/KOSMakefile.mk b/SDL_ttf/files/KOSMakefile.mk deleted file mode 100644 index b8cc8b8..0000000 --- a/SDL_ttf/files/KOSMakefile.mk +++ /dev/null @@ -1,10 +0,0 @@ -TARGET = libSDL_ttf.a -OBJS = SDL_ttf.o - -KOS_CFLAGS += -I. \ - -I${KOS_PORTS}/include/SDL -lSDL \ - -I${KOS_PORTS}/include/zlib -I${KOS_PORTS}/include/bzlib \ - -I${KOS_PORTS}/include/png -I${KOS_PORTS}/include/freetype2 \ - -lfreetype -lz -lbz2 -lpng - -include ${KOS_PORTS}/scripts/lib.mk diff --git a/SDL_ttf/patches/without-opengl.patch b/SDL_ttf/patches/without-opengl.patch new file mode 100644 index 0000000..6c0fa09 --- /dev/null +++ b/SDL_ttf/patches/without-opengl.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 009db79..6fd6526 100755 +--- a/configure ++++ b/configure +@@ -13808,7 +13808,7 @@ rm -f core conftest.err conftest.$ac_objext \ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengl" >&5 + $as_echo "$have_opengl" >&6; } + LIBS="$save_LIBS" +-if test x$have_opengl = xyes; then ++if test x$have_opengl = xopengl_is_disabled; then + CFLAGS="$CFLAGS -DHAVE_OPENGL" + GL_LIBS="$SYS_GL_LIBS" + else diff --git a/SDL_ttf/recipe.mk b/SDL_ttf/recipe.mk index d372a8c..057711c 100644 --- a/SDL_ttf/recipe.mk +++ b/SDL_ttf/recipe.mk @@ -13,5 +13,3 @@ SDL_ttf_PORT_BUILD = autotools SDL_ttf_GIT_HASH = 3c4233732b94ce08d5f6a868e597af39e13f8b23 SDL_ttf_DOWNLOAD_SITE = https://github.com/libsdl-org/SDL_ttf/archive/ SDL_ttf_DOWNLOAD_FILE = ${SDL_ttf_GIT_HASH}.tar.gz - -SDL_ttf_CONFIGURE_ARGS = SDL_CFLAGS="-I${KOS_PORTS}/sysroot/include/SDL" SDL_LIBS="-lSDL" From 639e40969a1bf7efa0173084b2211a15212eb015 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 26 Jun 2026 12:53:38 +0200 Subject: [PATCH 06/27] jimtcl: Disable building of jimsh We don't need it, it fails linking on CI for some strange reason (complains about the LTO version of some objects), and it ICEs on recent toolchains. Signed-off-by: Paul Cercueil --- libjimtcl/patches/no-jimsh.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 libjimtcl/patches/no-jimsh.patch diff --git a/libjimtcl/patches/no-jimsh.patch b/libjimtcl/patches/no-jimsh.patch new file mode 100644 index 0000000..5c8d778 --- /dev/null +++ b/libjimtcl/patches/no-jimsh.patch @@ -0,0 +1,22 @@ +diff --git a/Makefile.in b/Makefile.in +index 3e97e6d..7ee7ee6 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -86,7 +86,7 @@ INSTALL_DATA ?= cp + INSTALL_PROGRAM ?= cp + @endif + +-all: $(JIMSH) @C_EXT_SHOBJS@ ++all: $(LIBJIM) @C_EXT_SHOBJS@ + + # Create C extensions from pure Tcl extensions + .SUFFIXES: .tcl +@@ -105,7 +105,7 @@ $(JIMSH): $(LIBJIM) jimsh.o initjimsh.o + $(Q)$(JIMSH_CC) @SH_LINKRPATH_FLAGS@ @SH_LINKFLAGS@ $(LDFLAGS) -o $@ jimsh.o initjimsh.o $(LIBJIM) $(LDLIBS) $(LIBS) + + @if JIM_INSTALL +-install: all @TCL_EXTS@ install-exec install-docs ++install: all @TCL_EXTS@ install-docs + $(INSTALL_DATA_DIR) $(DESTDIR)@libdir@/jim + $(INSTALL_DATA) $(LIBJIM) $(DESTDIR)@libdir@ + @if !JIM_STATICLIB From 0e82baed770df33bc58370c88cb573e4b60873ca Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 26 Jun 2026 02:38:25 +0200 Subject: [PATCH 07/27] micropython: Fix build and install of headers Don't patch include headers, we want them to be installed where they are supposed to. One weird issue was occuring with the previous KOSMakefile.mk, is that the first object file listed in OBJS, embed_util.o, was never actually compiled but still listed as the object files to be packed in the library, causing a linking error. Address this issue by specifying that the source files, and not the object files, are generated by the embed.mk script. Signed-off-by: Paul Cercueil --- micropython/files/KOSMakefile.mk | 231 ++++++++++++++----------------- micropython/recipe.mk | 3 +- 2 files changed, 107 insertions(+), 127 deletions(-) diff --git a/micropython/files/KOSMakefile.mk b/micropython/files/KOSMakefile.mk index 5358541..df2a3f0 100644 --- a/micropython/files/KOSMakefile.mk +++ b/micropython/files/KOSMakefile.mk @@ -6,109 +6,111 @@ MP_PORT_DIR = $(MP_EMBED_DIR)/port MP_PY_DIR = $(MP_EMBED_DIR)/py MP_RT_DIR = $(MP_EMBED_DIR)/shared/runtime -OBJS = $(MP_PORT_DIR)/embed_util.o \ - $(MP_PORT_DIR)/mphalport.o \ - $(MP_PY_DIR)/argcheck.o \ - $(MP_PY_DIR)/asmbase.o \ - $(MP_PY_DIR)/bc.o \ - $(MP_PY_DIR)/binary.o \ - $(MP_PY_DIR)/builtinevex.o \ - $(MP_PY_DIR)/builtinhelp.o \ - $(MP_PY_DIR)/builtinimport.o \ - $(MP_PY_DIR)/compile.o \ - $(MP_PY_DIR)/emitbc.o \ - $(MP_PY_DIR)/emitcommon.o \ - $(MP_PY_DIR)/emitglue.o \ - $(MP_PY_DIR)/emitnative.o \ - $(MP_PY_DIR)/formatfloat.o \ - $(MP_PY_DIR)/frozenmod.o \ - $(MP_PY_DIR)/gc.o \ - $(MP_PY_DIR)/lexer.o \ - $(MP_PY_DIR)/malloc.o \ - $(MP_PY_DIR)/map.o \ - $(MP_PY_DIR)/modarray.o \ - $(MP_PY_DIR)/modbuiltins.o \ - $(MP_PY_DIR)/modcmath.o \ - $(MP_PY_DIR)/modcollections.o \ - $(MP_PY_DIR)/moderrno.o \ - $(MP_PY_DIR)/modgc.o \ - $(MP_PY_DIR)/modio.o \ - $(MP_PY_DIR)/modmath.o \ - $(MP_PY_DIR)/modmicropython.o \ - $(MP_PY_DIR)/modstruct.o \ - $(MP_PY_DIR)/modsys.o \ - $(MP_PY_DIR)/modthread.o \ - $(MP_PY_DIR)/mpprint.o \ - $(MP_PY_DIR)/mpstate.o \ - $(MP_PY_DIR)/mpz.o \ - $(MP_PY_DIR)/nativeglue.o \ - $(MP_PY_DIR)/nlr.o \ - $(MP_PY_DIR)/nlrsetjmp.o \ - $(MP_PY_DIR)/objarray.o \ - $(MP_PY_DIR)/objattrtuple.o \ - $(MP_PY_DIR)/objbool.o \ - $(MP_PY_DIR)/objboundmeth.o \ - $(MP_PY_DIR)/obj.o \ - $(MP_PY_DIR)/objcell.o \ - $(MP_PY_DIR)/objclosure.o \ - $(MP_PY_DIR)/objcomplex.o \ - $(MP_PY_DIR)/objdeque.o \ - $(MP_PY_DIR)/objdict.o \ - $(MP_PY_DIR)/objenumerate.o \ - $(MP_PY_DIR)/objexcept.o \ - $(MP_PY_DIR)/objfilter.o \ - $(MP_PY_DIR)/objfloat.o \ - $(MP_PY_DIR)/objfun.o \ - $(MP_PY_DIR)/objgenerator.o \ - $(MP_PY_DIR)/objgetitemiter.o \ - $(MP_PY_DIR)/objint.o \ - $(MP_PY_DIR)/objint_longlong.o \ - $(MP_PY_DIR)/objint_mpz.o \ - $(MP_PY_DIR)/objlist.o \ - $(MP_PY_DIR)/objmap.o \ - $(MP_PY_DIR)/objmodule.o \ - $(MP_PY_DIR)/objnamedtuple.o \ - $(MP_PY_DIR)/objnone.o \ - $(MP_PY_DIR)/objobject.o \ - $(MP_PY_DIR)/objpolyiter.o \ - $(MP_PY_DIR)/objproperty.o \ - $(MP_PY_DIR)/objrange.o \ - $(MP_PY_DIR)/objreversed.o \ - $(MP_PY_DIR)/objset.o \ - $(MP_PY_DIR)/objsingleton.o \ - $(MP_PY_DIR)/objslice.o \ - $(MP_PY_DIR)/objstr.o \ - $(MP_PY_DIR)/objstringio.o \ - $(MP_PY_DIR)/objstrunicode.o \ - $(MP_PY_DIR)/objtuple.o \ - $(MP_PY_DIR)/objtype.o \ - $(MP_PY_DIR)/objzip.o \ - $(MP_PY_DIR)/opmethods.o \ - $(MP_PY_DIR)/pairheap.o \ - $(MP_PY_DIR)/parse.o \ - $(MP_PY_DIR)/parsenumbase.o \ - $(MP_PY_DIR)/parsenum.o \ - $(MP_PY_DIR)/persistentcode.o \ - $(MP_PY_DIR)/profile.o \ - $(MP_PY_DIR)/pystack.o \ - $(MP_PY_DIR)/qstr.o \ - $(MP_PY_DIR)/reader.o \ - $(MP_PY_DIR)/repl.o \ - $(MP_PY_DIR)/ringbuf.o \ - $(MP_PY_DIR)/runtime.o \ - $(MP_PY_DIR)/runtime_utils.o \ - $(MP_PY_DIR)/scheduler.o \ - $(MP_PY_DIR)/scope.o \ - $(MP_PY_DIR)/sequence.o \ - $(MP_PY_DIR)/showbc.o \ - $(MP_PY_DIR)/smallint.o \ - $(MP_PY_DIR)/stackctrl.o \ - $(MP_PY_DIR)/stream.o \ - $(MP_PY_DIR)/unicode.o \ - $(MP_PY_DIR)/vm.o \ - $(MP_PY_DIR)/vstr.o \ - $(MP_PY_DIR)/warning.o \ - $(MP_RT_DIR)/gchelper_generic.o +SOURCES = $(MP_PORT_DIR)/embed_util.c \ + $(MP_PORT_DIR)/mphalport.c \ + $(MP_PY_DIR)/argcheck.c \ + $(MP_PY_DIR)/asmbase.c \ + $(MP_PY_DIR)/bc.c \ + $(MP_PY_DIR)/binary.c \ + $(MP_PY_DIR)/builtinevex.c \ + $(MP_PY_DIR)/builtinhelp.c \ + $(MP_PY_DIR)/builtinimport.c \ + $(MP_PY_DIR)/compile.c \ + $(MP_PY_DIR)/emitbc.c \ + $(MP_PY_DIR)/emitcommon.c \ + $(MP_PY_DIR)/emitglue.c \ + $(MP_PY_DIR)/emitnative.c \ + $(MP_PY_DIR)/formatfloat.c \ + $(MP_PY_DIR)/frozenmod.c \ + $(MP_PY_DIR)/gc.c \ + $(MP_PY_DIR)/lexer.c \ + $(MP_PY_DIR)/malloc.c \ + $(MP_PY_DIR)/map.c \ + $(MP_PY_DIR)/modarray.c \ + $(MP_PY_DIR)/modbuiltins.c \ + $(MP_PY_DIR)/modcmath.c \ + $(MP_PY_DIR)/modcollections.c \ + $(MP_PY_DIR)/moderrno.c \ + $(MP_PY_DIR)/modgc.c \ + $(MP_PY_DIR)/modio.c \ + $(MP_PY_DIR)/modmath.c \ + $(MP_PY_DIR)/modmicropython.c \ + $(MP_PY_DIR)/modstruct.c \ + $(MP_PY_DIR)/modsys.c \ + $(MP_PY_DIR)/modthread.c \ + $(MP_PY_DIR)/mpprint.c \ + $(MP_PY_DIR)/mpstate.c \ + $(MP_PY_DIR)/mpz.c \ + $(MP_PY_DIR)/nativeglue.c \ + $(MP_PY_DIR)/nlr.c \ + $(MP_PY_DIR)/nlrsetjmp.c \ + $(MP_PY_DIR)/objarray.c \ + $(MP_PY_DIR)/objattrtuple.c \ + $(MP_PY_DIR)/objbool.c \ + $(MP_PY_DIR)/objboundmeth.c \ + $(MP_PY_DIR)/obj.c \ + $(MP_PY_DIR)/objcell.c \ + $(MP_PY_DIR)/objclosure.c \ + $(MP_PY_DIR)/objcomplex.c \ + $(MP_PY_DIR)/objdeque.c \ + $(MP_PY_DIR)/objdict.c \ + $(MP_PY_DIR)/objenumerate.c \ + $(MP_PY_DIR)/objexcept.c \ + $(MP_PY_DIR)/objfilter.c \ + $(MP_PY_DIR)/objfloat.c \ + $(MP_PY_DIR)/objfun.c \ + $(MP_PY_DIR)/objgenerator.c \ + $(MP_PY_DIR)/objgetitemiter.c \ + $(MP_PY_DIR)/objint.c \ + $(MP_PY_DIR)/objint_longlong.c \ + $(MP_PY_DIR)/objint_mpz.c \ + $(MP_PY_DIR)/objlist.c \ + $(MP_PY_DIR)/objmap.c \ + $(MP_PY_DIR)/objmodule.c \ + $(MP_PY_DIR)/objnamedtuple.c \ + $(MP_PY_DIR)/objnone.c \ + $(MP_PY_DIR)/objobject.c \ + $(MP_PY_DIR)/objpolyiter.c \ + $(MP_PY_DIR)/objproperty.c \ + $(MP_PY_DIR)/objrange.c \ + $(MP_PY_DIR)/objreversed.c \ + $(MP_PY_DIR)/objset.c \ + $(MP_PY_DIR)/objsingleton.c \ + $(MP_PY_DIR)/objslice.c \ + $(MP_PY_DIR)/objstr.c \ + $(MP_PY_DIR)/objstringio.c \ + $(MP_PY_DIR)/objstrunicode.c \ + $(MP_PY_DIR)/objtuple.c \ + $(MP_PY_DIR)/objtype.c \ + $(MP_PY_DIR)/objzip.c \ + $(MP_PY_DIR)/opmethods.c \ + $(MP_PY_DIR)/pairheap.c \ + $(MP_PY_DIR)/parse.c \ + $(MP_PY_DIR)/parsenumbase.c \ + $(MP_PY_DIR)/parsenum.c \ + $(MP_PY_DIR)/persistentcode.c \ + $(MP_PY_DIR)/profile.c \ + $(MP_PY_DIR)/pystack.c \ + $(MP_PY_DIR)/qstr.c \ + $(MP_PY_DIR)/reader.c \ + $(MP_PY_DIR)/repl.c \ + $(MP_PY_DIR)/ringbuf.c \ + $(MP_PY_DIR)/runtime.c \ + $(MP_PY_DIR)/runtime_utils.c \ + $(MP_PY_DIR)/scheduler.c \ + $(MP_PY_DIR)/scope.c \ + $(MP_PY_DIR)/sequence.c \ + $(MP_PY_DIR)/showbc.c \ + $(MP_PY_DIR)/smallint.c \ + $(MP_PY_DIR)/stackctrl.c \ + $(MP_PY_DIR)/stream.c \ + $(MP_PY_DIR)/unicode.c \ + $(MP_PY_DIR)/vm.c \ + $(MP_PY_DIR)/vstr.c \ + $(MP_PY_DIR)/warning.c \ + $(MP_RT_DIR)/gchelper_generic.c + +OBJS = $(SOURCES:.c=.o) $(OBJS): CPPFLAGS += -DMICROPY_GCREGS_SETJMP -DNDEBUG -I$(CURDIR) -I$(MP_EMBED_DIR) -I$(MP_PORT_DIR) @@ -131,31 +133,10 @@ endif include ${KOS_PORTS}/scripts/lib.mk -$(OBJS): .stamp_generatemp .stamp_fixincludes - -install: .stamp_cleanupbeforeinstall +$(SOURCES): .stamp_generatemp # Generate MicroPython (with verbose option set to "no") .stamp_generatemp: export MICROPYTHON_TOP = $(CURDIR) .stamp_generatemp: $(MAKE) -f ports/embed/embed.mk V=0 $(MP_EMBED_FLAGS) touch $@ - -# Alter header files and replace #include "{variable}" with #include -# This will fixes some other headers as well. -.stamp_fixincludes: .stamp_generatemp - @echo "Updating includes before installation..." - for _file in $(MP_PORT_DIR)/*.h $(MP_PY_DIR)/*.h $(MP_RT_DIR)/*.h; do \ - sed -ri -e 's/#include "([^[:space:]]+)"/#include /g' $$_file $(SED_FLAGS); \ - done - sed -i -e 's///' mpconfigport.h $(SED_FLAGS) - sed -i -e 's///' $(MP_PY_DIR)/mpconfig.h $(SED_FLAGS) - touch $@ - -# Remove source files (*.c/*.o) before installing the MicroPython port -.stamp_cleanupbeforeinstall: - @echo "Performing final clean-up before installation..." - @for _file in $(MP_PORT_DIR)/*.c $(MP_PY_DIR)/*.c $(MP_RT_DIR)/*.c $(MP_PORT_DIR)/*.o $(MP_PY_DIR)/*.o $(MP_RT_DIR)/*.o; do \ - rm $$_file; \ - done ; \ - touch $@ diff --git a/micropython/recipe.mk b/micropython/recipe.mk index 37b475d..69462f8 100644 --- a/micropython/recipe.mk +++ b/micropython/recipe.mk @@ -1,5 +1,5 @@ # Port Metadata -micropython_PORTVERSION = 1.28.0 +micropython_PORTVERSION = 1.26.0 micropython_MAINTAINER = Aaron Glazer micropython_LICENSE = MIT @@ -12,4 +12,3 @@ micropython_DOWNLOAD_FILE = v${micropython_PORTVERSION}.tar.gz micropython_TARGET = libmicropython.a micropython_HDR_DIRECTORY = micropython_embed micropython_INSTALLED_HDRS = mpconfigport.h -micropython_HDR_INSTDIR = micropython From 803bf6922246f83d7c6afdad97529c347efb48c3 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 26 Jun 2026 15:48:36 +0200 Subject: [PATCH 08/27] mruby: Fix parallel build The rules in the KOSMakefile.mk did not have proper dependencies while in practice they depend on each other. Signed-off-by: Paul Cercueil --- mruby/files/KOSMakefile.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mruby/files/KOSMakefile.mk b/mruby/files/KOSMakefile.mk index 9d779b1..a364323 100644 --- a/mruby/files/KOSMakefile.mk +++ b/mruby/files/KOSMakefile.mk @@ -63,16 +63,16 @@ prepare: fi # Generate mruby -generatemruby: +generatemruby: prepare @echo "Generating mruby..." $(MRUBY_BUILD_CMD) MRUBY_CONFIG=dreamcast_shelf $(DREAMSDK_USE_WRAPPERS) # Copy final library file into the root directory -copylib: +copylib: generatemruby @cp $(MRUBY_BUILD_KOS_ARCH_DIR)/lib/$(TARGET) $(CURDIR) # Install mruby compiler executable (mrbc) -installmrbc: +installmrbc: copylib @echo "Installing $(MRUBY_COMPILER) to $(MRUBY_INSTALL_DIR)..." @cp $(MRUBY_BUILD_DIR)/host/bin/$(MRUBY_COMPILER_BIN) $(MRUBY_INSTALL_DIR) @strip $(MRUBY_INSTALL_DIR)/$(MRUBY_COMPILER_BIN) From 1e9e74ea3170ab724f6aaf96ad3a6df111af2b3a Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 16:16:40 +0200 Subject: [PATCH 09/27] libmp3: Fix parallel build The custom KOSMakefile.mk as well as the "$(LIB_OBJS)" mechanism were not working properly when building in parallel. Address this issue by adding a dependency on $(OBJS) to the "subdirs" rule, and populate $(OBJS) with actual object files instead of a wildcard, which cannot be evaluated before the subdirs are processed. Also remove the custom CFLAGS / CPPFLAGS. Since those were applied to object files compiled by different Makefiles in sub-folders, they were not doing anything. Signed-off-by: Paul Cercueil --- libmp3/files/KOSMakefile.mk | 10 +++++----- scripts/lib.mk | 13 ++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/libmp3/files/KOSMakefile.mk b/libmp3/files/KOSMakefile.mk index e530e07..6ad413d 100644 --- a/libmp3/files/KOSMakefile.mk +++ b/libmp3/files/KOSMakefile.mk @@ -1,9 +1,9 @@ TARGET = libmp3.a SUBDIRS = xingmp3 libmp3 -LIB_OBJS = build/*.o +LIB_OBJS = cdct.o csbt.o cupl3.o cup.o cwinm.o dec8.o hwin.o icdct.o isbt.o \ + iup.o iwinm.o l3dq.o l3init.o main.o mdct.o mhead.o msis.o \ + sndmp3.o uph.o upsf.o -include ${KOS_PORTS}/scripts/lib.mk - -$(LIB_OBJS): CPPFLAGS += -Iinclude +OBJS = $(addprefix build/,${LIB_OBJS}) -$(LIB_OBJS): CFLAGS += -std=c17 +include ${KOS_PORTS}/scripts/lib.mk diff --git a/scripts/lib.mk b/scripts/lib.mk index 6b19408..208f6e3 100644 --- a/scripts/lib.mk +++ b/scripts/lib.mk @@ -8,17 +8,16 @@ # # Define "TARGET", "SUBDIRS" and "OBJS", and then include this file; # it will handle a lot of your build process. Everything in "OBJS" is -# built by the compiler. If you build everything in subdirs and want to -# just link at the end with this makefile, then define LIB_OBJS as -# something like build/*.o. You'll also want to define LOCAL_CLEAN to -# clean your build dir. +# built by the compiler. -install: subdirs $(TARGET) +install: $(TARGET) $(TARGET): $(OBJS) - ${KOS_AR} rcs $@ $^ $(LIB_OBJS) + ${KOS_AR} rcs $@ $^ + +$(OBJS): subdirs clean: - -rm -f $(OBJS) $(LIB_OBJS) $(TARGET) + -rm -f $(OBJS) $(TARGET) include ${KOS_BASE}/Makefile.rules From bedfe4f1013fd2c2fc1d1dce4423a48aaf1e1b46 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 16:03:13 +0200 Subject: [PATCH 10/27] Inherit sysroot path from KallistiOS Newer KallistiOS provides the ${KOS_SYSROOT} variable, use it directly. Drop the "distclean" rule, as the sysroot is no more in kos-ports, we delegate the responsibility to KallistiOS' scripts instead. Signed-off-by: Paul Cercueil --- Makefile | 29 +++++++++++------------------ SDL/recipe.mk | 2 +- libopusplay/patches/fix-build.patch | 2 +- libparallax/files/KOSMakefile.mk | 2 +- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index b7805f8..9081999 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # KallistiOS ##version## # # KOS-ports Makefile -# Copyright (C) 2025 Paul Cercueil +# Copyright (C) 2026 Paul Cercueil -# Include the packages recipes -#include $(KOS_PORTS)/*/recipe.mk +# Include the defaults +include ${KOS_PORTS}/config.mk # Get a list of the sub-directories that contain a recipe.mk file SUBDIRS := $(foreach each,$(wildcard ${KOS_PORTS}/*),$(if $(wildcard ${each}/recipe.mk),${each},) ) @@ -13,7 +13,7 @@ PACKAGES := $(foreach p,${SUBDIRS},$(notdir $p)) # Get a list of the sub-directories that failed to build FAILED_PACKAGES = $(sort $(foreach p,${PACKAGES},$(if $(wildcard ${KOS_PORTS}/${p}/build/${${p}_PORTVERSION}/.stamp_installed),,${p}))) -.PHONY: all all_nested failed clean distclean +.PHONY: all all_nested failed clean all: -$(MAKE) -k -C ${KOS_PORTS} all_nested @@ -27,16 +27,9 @@ failed: clean: -rm -rf $(foreach s,${SUBDIRS},${s}/build) -distclean: clean - -rm -rf sysroot - -SYSROOT := ${KOS_PORTS}/sysroot -PKG_CONFIG_ENV := PKG_CONFIG_LIBDIR=${SYSROOT}/lib/pkgconfig:${SYSROOT}/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=${SYSROOT} +PKG_CONFIG_ENV := PKG_CONFIG_LIBDIR=${KOS_SYSROOT}/lib/pkgconfig:${KOS_SYSROOT}/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=${KOS_SYSROOT} BUILD_ENV := CC=kos-cc RANLIB=kos-ranlib AR=kos-ar -# Include the defaults -include ${KOS_PORTS}/config.mk - # Include the recipes include $(KOS_PORTS)/*/recipe.mk @@ -105,27 +98,27 @@ ${1}/.stamp_fetched: ${1}/.stamp_$$(if $${${2}_DOWNLOAD_SITE},extracted,nodownlo ${1}/.stamp_installed_autotools: $${${2}_BUILD_DEPS} cd $${${2}_DISTFILE_DIR} ; \ ${BUILD_ENV} ${PKG_CONFIG_ENV} ./configure $$(if $${${2}_CONFIGURE_NO_CACHE_FILE},,--cache-file=${KOS_PORTS}/config.${KOS_GCCVER}.cache) --prefix="" --host=${AUTOTOOLS_HOST} $${${2}_CONFIGURE_ARGS} && \ - DESTDIR=${SYSROOT} ${MAKE} $${${2}_MAKE_TARGET} && \ + DESTDIR=${KOS_SYSROOT} ${MAKE} $${${2}_MAKE_TARGET} && \ touch $$@ ${1}/.stamp_installed_cmake: $${${2}_BUILD_DEPS} mkdir -p $${${2}_DISTFILE_DIR}/build cd $${${2}_DISTFILE_DIR}/build ; \ ${BUILD_ENV} kos-cmake -DCMAKE_INSTALL_PREFIX="" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib $${${2}_CMAKE_ARGS} .. && \ - DESTDIR=${SYSROOT} cmake --build . -t $${${2}_MAKE_TARGET} && \ + DESTDIR=${KOS_SYSROOT} cmake --build . -t $${${2}_MAKE_TARGET} && \ touch $$@ ${1}/.stamp_installed_manual: $${${2}_BUILD_DEPS} ${MAKE} -C $${${2}_DISTFILE_DIR} -f $${${2}_KOS_MAKEFILE} $${${2}_MAKE_TARGET} ${BUILD_ENV} $${${2}_BUILD_ENV} - mkdir -p ${SYSROOT}/lib ${SYSROOT}/include/$${${2}_HDR_INSTDIR} + mkdir -p ${KOS_SYSROOT}/lib ${KOS_SYSROOT}/include/$${${2}_HDR_INSTDIR} for each in $${${2}_TARGET} ; do \ - install -m 644 $${${2}_DISTFILE_DIR}/$$$${each} ${SYSROOT}/lib ; \ + install -m 644 $${${2}_DISTFILE_DIR}/$$$${each} ${KOS_SYSROOT}/lib ; \ done ; \ if [ "$${${2}_HDR_DIRECTORY}" ] ; then \ - cp -r $${${2}_DISTFILE_DIR}/$${${2}_HDR_DIRECTORY}/* ${SYSROOT}/include/$${${2}_HDR_INSTDIR}/ ; \ + cp -r $${${2}_DISTFILE_DIR}/$${${2}_HDR_DIRECTORY}/* ${KOS_SYSROOT}/include/$${${2}_HDR_INSTDIR}/ ; \ fi ; \ for each in $${${2}_INSTALLED_HDRS} ; do \ - install -m 644 $${${2}_DISTFILE_DIR}/$$$${each} ${SYSROOT}/include/$${${2}_HDR_INSTDIR} ; \ + install -m 644 $${${2}_DISTFILE_DIR}/$$$${each} ${KOS_SYSROOT}/include/$${${2}_HDR_INSTDIR} ; \ done ; \ touch $$@ diff --git a/SDL/recipe.mk b/SDL/recipe.mk index d6ce733..0ee623d 100644 --- a/SDL/recipe.mk +++ b/SDL/recipe.mk @@ -17,4 +17,4 @@ SDL_TARGET = libSDL.a SDL_HDR_DIRECTORY = include SDL_HDR_INSTDIR = SDL -SDL_BUILD_ENV = SDL_VERSION=${SDL_PORTVERSION} SDL_PC_PATH=${KOS_PORTS}/sysroot/lib/pkgconfig/ +SDL_BUILD_ENV = SDL_VERSION=${SDL_PORTVERSION} SDL_PC_PATH=${KOS_SYSROOT}/lib/pkgconfig/ diff --git a/libopusplay/patches/fix-build.patch b/libopusplay/patches/fix-build.patch index d16c734..08a9845 100644 --- a/libopusplay/patches/fix-build.patch +++ b/libopusplay/patches/fix-build.patch @@ -10,7 +10,7 @@ index e40c3b0..a0fe4cc 100644 - include ${KOS_PORTS}/scripts/lib.mk + -+$(OBJS): CPPFLAGS += -I ${KOS_PORTS}/sysroot/include/opus ++$(OBJS): CPPFLAGS += -I ${KOS_SYSROOT}/include/opus + +$(OBJS): CFLAGS += -Wextra diff --git a/opusplay.c b/opusplay.c diff --git a/libparallax/files/KOSMakefile.mk b/libparallax/files/KOSMakefile.mk index aa1a224..bb57074 100644 --- a/libparallax/files/KOSMakefile.mk +++ b/libparallax/files/KOSMakefile.mk @@ -3,4 +3,4 @@ OBJS := $(patsubst %.c,%.o,$(wildcard src/*.c)) include ${KOS_PORTS}/scripts/lib.mk -$(OBJS): CPPFLAGS += -Iinclude -I ${KOS_PORTS}/sysroot/include/libpng16 +$(OBJS): CPPFLAGS += -Iinclude -I ${KOS_SYSROOT}/include/libpng16 From 2ea536fb26e46859cc7f264acaeb8ef7ba19be45 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 17:28:21 +0200 Subject: [PATCH 11/27] Use per-arch build directories Add the KOS arch (e.g. "dreamcast") as a suffix to the build folder. This will later permit building kos-ports for more than one platform without having to clean everything first. Signed-off-by: Paul Cercueil --- Makefile | 8 ++++---- stb_image/recipe.mk | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9081999..eed68ad 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ SUBDIRS := $(foreach each,$(wildcard ${KOS_PORTS}/*),$(if $(wildcard ${each}/rec PACKAGES := $(foreach p,${SUBDIRS},$(notdir $p)) # Get a list of the sub-directories that failed to build -FAILED_PACKAGES = $(sort $(foreach p,${PACKAGES},$(if $(wildcard ${KOS_PORTS}/${p}/build/${${p}_PORTVERSION}/.stamp_installed),,${p}))) +FAILED_PACKAGES = $(sort $(foreach p,${PACKAGES},$(if $(wildcard ${KOS_PORTS}/${p}/build-${KOS_ARCH}/${${p}_PORTVERSION}/.stamp_installed),,${p}))) .PHONY: all all_nested failed clean @@ -25,7 +25,7 @@ failed: @echo "Failed packages: ${FAILED_PACKAGES}" clean: - -rm -rf $(foreach s,${SUBDIRS},${s}/build) + -rm -rf $(foreach s,${SUBDIRS},${s}/build-${KOS_ARCH}) PKG_CONFIG_ENV := PKG_CONFIG_LIBDIR=${KOS_SYSROOT}/lib/pkgconfig:${KOS_SYSROOT}/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=${KOS_SYSROOT} BUILD_ENV := CC=kos-cc RANLIB=kos-ranlib AR=kos-ar @@ -43,7 +43,7 @@ ${2}_KOS_MAKEFILE ?= KOSMakefile.mk ${2}_FETCH_CMD ?= ${FETCH_CMD} ${2}_UNPACK_CMD ?= ${UNPACK_CMD} -${2}_DEP_STAMPS = $$(foreach dep,$${${2}_DEPENDENCIES},$(abspath ${KOS_PORTS}/$${dep}/build/$${$${dep}_PORTVERSION}/.stamp_installed)) +${2}_DEP_STAMPS = $$(foreach dep,$${${2}_DEPENDENCIES},$(abspath ${KOS_PORTS}/$${dep}/build-${KOS_ARCH}/$${$${dep}_PORTVERSION}/.stamp_installed)) ${2}_BUILD_DEPS = $${${2}_DEP_STAMPS} ${1}/.stamp_fetched ${1}/.stamp_abi_checked ${2}_DISTFILE_DIR = ${1}/${2}-$${${2}_PORTVERSION} @@ -131,4 +131,4 @@ ${2}: ${1}/.stamp_installed endef -$(foreach p,${PACKAGES},$(eval $(call BUILD_RULE,$(abspath ${KOS_PORTS}/${p}/build/${${p}_PORTVERSION}),${p}))) +$(foreach p,${PACKAGES},$(eval $(call BUILD_RULE,$(abspath ${KOS_PORTS}/${p}/build-${KOS_ARCH}/${${p}_PORTVERSION}),${p}))) diff --git a/stb_image/recipe.mk b/stb_image/recipe.mk index 81cdc4d..08d7690 100644 --- a/stb_image/recipe.mk +++ b/stb_image/recipe.mk @@ -13,4 +13,4 @@ stb_image_TARGET = libstb_image.a stb_image_INSTALLED_HDRS = stb_image.h stb_image_HDR_INSTDIR = stb_image -stb_image_UNPACK_CMD = install -m 0644 -D -t ${KOS_PORTS}/stb_image/build/${stb_image_PORTVERSION}/stb_image-${stb_image_PORTVERSION} +stb_image_UNPACK_CMD = install -m 0644 -D -t ${KOS_PORTS}/stb_image/build-${KOS_ARCH}/${stb_image_PORTVERSION}/stb_image-${stb_image_PORTVERSION} From 7152aa5c46d7207a195e1b0cfba80f7dd5d264aa Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 18:07:22 +0200 Subject: [PATCH 12/27] Support arch-specific packages The packages setting the "_ARCHS" variable in their recipe.mk will only be built when one of the strings in that variable will match the current value of $KOS_ARCH. Signed-off-by: Paul Cercueil --- Makefile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index eed68ad..3d1a37b 100644 --- a/Makefile +++ b/Makefile @@ -10,20 +10,12 @@ include ${KOS_PORTS}/config.mk SUBDIRS := $(foreach each,$(wildcard ${KOS_PORTS}/*),$(if $(wildcard ${each}/recipe.mk),${each},) ) PACKAGES := $(foreach p,${SUBDIRS},$(notdir $p)) -# Get a list of the sub-directories that failed to build -FAILED_PACKAGES = $(sort $(foreach p,${PACKAGES},$(if $(wildcard ${KOS_PORTS}/${p}/build-${KOS_ARCH}/${${p}_PORTVERSION}/.stamp_installed),,${p}))) - .PHONY: all all_nested failed clean all: -$(MAKE) -k -C ${KOS_PORTS} all_nested -@$(MAKE) --no-print-directory -C ${KOS_PORTS} failed -all_nested: $(foreach s,${SUBDIRS},$(notdir ${s})) - -failed: - @echo "Failed packages: ${FAILED_PACKAGES}" - clean: -rm -rf $(foreach s,${SUBDIRS},${s}/build-${KOS_ARCH}) @@ -48,6 +40,8 @@ ${2}_BUILD_DEPS = $${${2}_DEP_STAMPS} ${1}/.stamp_fetched ${1}/.stamp_abi_checke ${2}_DISTFILE_DIR = ${1}/${2}-$${${2}_PORTVERSION} +${2}_ARCH_SUPPORTED = $$(if $${${2}_ARCHS},$$(if $$(findstring ${KOS_ARCH},$${${2}_ARCHS}),${2}),${2}) + ${1}/.stamp_abi_checked: ifeq ($${${2}_REQUIRES_ABI},any) @echo "${2} is compatible with any floating-point ABI." @@ -127,8 +121,20 @@ ${1}/.stamp_installed: ${1}/.stamp_installed_$${${2}_PORT_BUILD} .PHONY: ${2} -${2}: ${1}/.stamp_installed +${2}: $$(if $${${2}_ARCH_SUPPORTED},${1}/.stamp_installed) + $$(if $${${2}_ARCH_SUPPORTED},,@echo "${2} is not supported for this platform - skipping.") endef $(foreach p,${PACKAGES},$(eval $(call BUILD_RULE,$(abspath ${KOS_PORTS}/${p}/build-${KOS_ARCH}/${${p}_PORTVERSION}),${p}))) + +# Get a list of the packages that are valid for our arch +ARCH_PACKAGES := $(foreach p,${PACKAGES},${${p}_ARCH_SUPPORTED}) + +# Get a list of the sub-directories that failed to build +FAILED_PACKAGES = $(sort $(foreach p,${ARCH_PACKAGES},$(if $(wildcard ${KOS_PORTS}/${p}/build-${KOS_ARCH}/${${p}_PORTVERSION}/.stamp_installed),,${p}))) + +all_nested: ${ARCH_PACKAGES} + +failed: + @echo "Failed packages: ${FAILED_PACKAGES}" From e7cdbcf9c3782f53147229040f7198c332b75064 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 18:09:34 +0200 Subject: [PATCH 13/27] Update .gitignore Signed-off-by: Paul Cercueil --- .gitignore | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index fb76d0a..e5703e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,6 @@ .*.swp *~ *.tmp -build-stamp -build/ -dist/ -include/* -lib/* -examples/* -inst +build-* .DS_Store -./config.* -sysroot +config.*.cache From 2594ac784501fe730ba01db3eaa73c1e9bd2e26d Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 19:20:08 +0200 Subject: [PATCH 14/27] Drop unused variables from config.mk Signed-off-by: Paul Cercueil --- Makefile | 2 +- config.mk | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 3d1a37b..9103b0a 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,7 @@ ${1}/.stamp_fetched: ${1}/.stamp_$$(if $${${2}_DOWNLOAD_SITE},extracted,nodownlo ${1}/.stamp_installed_autotools: $${${2}_BUILD_DEPS} cd $${${2}_DISTFILE_DIR} ; \ - ${BUILD_ENV} ${PKG_CONFIG_ENV} ./configure $$(if $${${2}_CONFIGURE_NO_CACHE_FILE},,--cache-file=${KOS_PORTS}/config.${KOS_GCCVER}.cache) --prefix="" --host=${AUTOTOOLS_HOST} $${${2}_CONFIGURE_ARGS} && \ + ${BUILD_ENV} ${PKG_CONFIG_ENV} ./configure $$(if $${${2}_CONFIGURE_NO_CACHE_FILE},,--cache-file=${KOS_PORTS}/config.${KOS_GCCVER}.cache) --prefix="" --host=${KOS_CC_PREFIX} $${${2}_CONFIGURE_ARGS} && \ DESTDIR=${KOS_SYSROOT} ${MAKE} $${${2}_MAKE_TARGET} && \ touch $$@ diff --git a/config.mk b/config.mk index a94565c..a2536fc 100644 --- a/config.mk +++ b/config.mk @@ -7,24 +7,3 @@ FETCH_CMD = curl --progress-bar -O -L # only must extract .tar.gz archives (although the default will handle more than # that, most likely). UNPACK_CMD = tar --strip-components=1 -xf - -# Select whether or not to automatically build library dependencies if they are -# not already installed. If this is set to false, then the build system will -# simply output an error message if a dependency is not met. If set to true, -# then the build system will automatically try to build any unmet dependencies -# recursively. -BUILD_DEPENDS = true - -# Select whether or not to check if a port is compatible with KOS's current -# floating-point precision ABI setting (KOS_SH4_PRECISION) before building. -CHECK_PRECISION = true - -# Select whether or not to validate each file downloaded before unpacking them. -# This requires Python to be installed. -VALIDATE_DISTFILES = true - -# Autotools host triple. This should generally be the same as the KOS host. -AUTOTOOLS_HOST = $(KOS_CC_PREFIX) - -# Command to run python -PYTHON_CMD = python3 From 6278044aec92df43dfe6e83e47f0d76a7a8f015d Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 19:44:31 +0200 Subject: [PATCH 15/27] Add clean- and rebuild- rules These rules can be used to clean an individual package (remove its build folder), or rebuild a package. Signed-off-by: Paul Cercueil --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9103b0a..cd89c1e 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,6 @@ all: -$(MAKE) -k -C ${KOS_PORTS} all_nested -@$(MAKE) --no-print-directory -C ${KOS_PORTS} failed -clean: - -rm -rf $(foreach s,${SUBDIRS},${s}/build-${KOS_ARCH}) - PKG_CONFIG_ENV := PKG_CONFIG_LIBDIR=${KOS_SYSROOT}/lib/pkgconfig:${KOS_SYSROOT}/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=${KOS_SYSROOT} BUILD_ENV := CC=kos-cc RANLIB=kos-ranlib AR=kos-ar @@ -119,11 +116,18 @@ ${1}/.stamp_installed_manual: $${${2}_BUILD_DEPS} ${1}/.stamp_installed: ${1}/.stamp_installed_$${${2}_PORT_BUILD} touch $$@ -.PHONY: ${2} +.PHONY: ${2} clean-${2} rebuild-${2} ${2}: $$(if $${${2}_ARCH_SUPPORTED},${1}/.stamp_installed) $$(if $${${2}_ARCH_SUPPORTED},,@echo "${2} is not supported for this platform - skipping.") +clean-${2}: + -rm -rf ${KOS_PORTS}/${2}/build-${KOS_ARCH} + +rebuild-${2}: clean-${2} ${2} + +.NOTPARALLEL: rebuild-${2} + endef $(foreach p,${PACKAGES},$(eval $(call BUILD_RULE,$(abspath ${KOS_PORTS}/${p}/build-${KOS_ARCH}/${${p}_PORTVERSION}),${p}))) @@ -138,3 +142,5 @@ all_nested: ${ARCH_PACKAGES} failed: @echo "Failed packages: ${FAILED_PACKAGES}" + +clean: $(foreach p,${ARCH_PACKAGES},clean-${p}) From 91677bb86f0a48c53c168232c1a199e839a30374 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 21:52:47 +0200 Subject: [PATCH 16/27] Add error message when KOS_BASE/KOS_SYSROOT aren't defined Signed-off-by: Paul Cercueil --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index cd89c1e..9c0ec50 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ # KOS-ports Makefile # Copyright (C) 2026 Paul Cercueil +$(if ${KOS_BASE},,$(error KallistiOS environment not found. Did you source environ.sh?)) +$(if ${KOS_SYSROOT},,$(error KallistiOS sysroot not found. Make sure you are using v2.2.3 or newer.)) + # Include the defaults include ${KOS_PORTS}/config.mk From 0c8f55f157b4ad08f44d7821d3b7534dadecbe2e Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 27 Jun 2026 23:43:37 +0200 Subject: [PATCH 17/27] libGL: Switch to simulant repo The CMake changes were merged there. Signed-off-by: Paul Cercueil --- libGL/recipe.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libGL/recipe.mk b/libGL/recipe.mk index c683b35..1ae5fd2 100644 --- a/libGL/recipe.mk +++ b/libGL/recipe.mk @@ -7,8 +7,8 @@ libGL_SHORT_DESC = GLdc, an OpenGL (tm) like graphics library for KOS libGL_PORT_BUILD = cmake -libGL_GIT_HASH = 5f374e7bfdb277f2c3cae61ad86118ce05e3c0d7 -libGL_DOWNLOAD_SITE = https://gitlab.com/pcercuei/GLdc/-/archive/${libGL_GIT_HASH}/ +libGL_GIT_HASH = 488968ce6118e421221c97211ccdcb02729ec33a +libGL_DOWNLOAD_SITE = https://gitlab.com/simulant/GLdc/-/archive/${libGL_GIT_HASH}/ libGL_DOWNLOAD_FILE = GLdc-${libGL_GIT_HASH}.tar.gz libGL_CMAKE_ARGS = -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF From 8c17a24606191841888d00bfbb1c2a82d2f56765 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sun, 28 Jun 2026 20:59:49 +0200 Subject: [PATCH 18/27] Move scripts/lib.mk to top folder It was the only script remaining inside the scripts/ folder. Signed-off-by: Paul Cercueil --- kos-jpeg/files/KOSMakefile.mk | 2 +- kos-png/files/KOSMakefile.mk | 2 +- kos-zlib/files/KOSMakefile.mk | 2 +- scripts/lib.mk => lib.mk | 0 libADX/files/KOSMakefile.mk | 2 +- libKGL/files/KOSMakefile.mk | 2 +- libconio/files/KOSMakefile.mk | 2 +- libdcplib/files/KOSMakefile.mk | 2 +- libfastmem/files/KOSMakefile.mk | 2 +- libimageload/files/KOSMakefile.mk | 2 +- libkmg/files/KOSMakefile.mk | 2 +- libkosh/files/KOSMakefile.mk | 2 +- libmodplug/files/KOSMakefile.mk | 2 +- libmp3/files/KOSMakefile.mk | 2 +- libmpeg/files/KOSMakefile.mk | 2 +- liboggvorbisplay/files/KOSMakefile.mk | 2 +- libopusplay/patches/fix-build.patch | 3 ++- libparallax/files/KOSMakefile.mk | 2 +- libpcx/files/KOSMakefile.mk | 2 +- libtga/files/KOSMakefile.mk | 2 +- libtremor/files/KOSMakefile.mk | 2 +- libtsunami/files/KOSMakefile.mk | 2 +- libwav/files/KOSMakefile.mk | 2 +- lua/files/KOSMakefile.mk | 2 +- micropython/files/KOSMakefile.mk | 2 +- stb_image/files/KOSMakefile.mk | 2 +- 26 files changed, 26 insertions(+), 25 deletions(-) rename scripts/lib.mk => lib.mk (100%) diff --git a/kos-jpeg/files/KOSMakefile.mk b/kos-jpeg/files/KOSMakefile.mk index ffd2351..a91e043 100644 --- a/kos-jpeg/files/KOSMakefile.mk +++ b/kos-jpeg/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libkos-jpeg.a OBJS = kos_img.o kos_texture.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -I. diff --git a/kos-png/files/KOSMakefile.mk b/kos-png/files/KOSMakefile.mk index ebc2502..2c90bb4 100644 --- a/kos-png/files/KOSMakefile.mk +++ b/kos-png/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libkos-png.a OBJS = kos_img.o kos_texture.o readpng.o writepng.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CFLAGS += -I. -I${KOS_PORTS}/sysroot/include/libpng16 diff --git a/kos-zlib/files/KOSMakefile.mk b/kos-zlib/files/KOSMakefile.mk index d878097..d1c8be7 100644 --- a/kos-zlib/files/KOSMakefile.mk +++ b/kos-zlib/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libkos-zlib.a OBJS = kos_zlib.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -DHAVE_UNISTD_H -DHAVE_STDARG_H diff --git a/scripts/lib.mk b/lib.mk similarity index 100% rename from scripts/lib.mk rename to lib.mk diff --git a/libADX/files/KOSMakefile.mk b/libADX/files/KOSMakefile.mk index 767fe2f..c7ca194 100644 --- a/libADX/files/KOSMakefile.mk +++ b/libADX/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libADX.a OBJS = src/libadx.o src/snddrv.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libKGL/files/KOSMakefile.mk b/libKGL/files/KOSMakefile.mk index 0841d9b..6b4ddb1 100644 --- a/libKGL/files/KOSMakefile.mk +++ b/libKGL/files/KOSMakefile.mk @@ -3,7 +3,7 @@ OBJS = gl-rgb.o gl-fog.o gl-sh4-light.o gl-light.o gl-clip.o gl-clip-arrays.o OBJS += gl-arrays.o gl-pvr.o gl-matrix.o gl-api.o gl-texture.o glu-texture.o OBJS += gl-framebuffer.o gl-cap.o gl-error.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CFLAGS += -ffast-math -O3 diff --git a/libconio/files/KOSMakefile.mk b/libconio/files/KOSMakefile.mk index 1f12fd5..f0f1172 100644 --- a/libconio/files/KOSMakefile.mk +++ b/libconio/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libconio.a OBJS = conio.o draw.o input.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CFLAGS += -Iinclude -DBUILD_LIBCONIO -DGFX diff --git a/libdcplib/files/KOSMakefile.mk b/libdcplib/files/KOSMakefile.mk index ede67a1..9f92ed3 100644 --- a/libdcplib/files/KOSMakefile.mk +++ b/libdcplib/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libdcplib.a OBJS = ulError.o sg.o fnt.o fntTXF.o sgd.o sgIsect.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libfastmem/files/KOSMakefile.mk b/libfastmem/files/KOSMakefile.mk index 3dedd48..51760c1 100644 --- a/libfastmem/files/KOSMakefile.mk +++ b/libfastmem/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libfastmem.a OBJS = memcpy_fast.o memset_fast.o memmove_fast.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libimageload/files/KOSMakefile.mk b/libimageload/files/KOSMakefile.mk index 4a767c6..0c50ac2 100644 --- a/libimageload/files/KOSMakefile.mk +++ b/libimageload/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libimageload.a OBJS = readpcx.o readbmp.o readjpeg.o imageload.o jitter.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libkmg/files/KOSMakefile.mk b/libkmg/files/KOSMakefile.mk index a6dd0da..9e963c1 100644 --- a/libkmg/files/KOSMakefile.mk +++ b/libkmg/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libkmg.a OBJS = kmg.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libkosh/files/KOSMakefile.mk b/libkosh/files/KOSMakefile.mk index ff51777..b750241 100644 --- a/libkosh/files/KOSMakefile.mk +++ b/libkosh/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libkosh.a OBJS = kosh.o builtin.o chdir.o input.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libmodplug/files/KOSMakefile.mk b/libmodplug/files/KOSMakefile.mk index d5b0dae..f892f63 100644 --- a/libmodplug/files/KOSMakefile.mk +++ b/libmodplug/files/KOSMakefile.mk @@ -33,6 +33,6 @@ OBJS= tables.o \ # load_psm.o \ -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude -DMODPLUG_BASIC_SUPPORT -DFASTSOUNDLIB diff --git a/libmp3/files/KOSMakefile.mk b/libmp3/files/KOSMakefile.mk index 6ad413d..3994e10 100644 --- a/libmp3/files/KOSMakefile.mk +++ b/libmp3/files/KOSMakefile.mk @@ -6,4 +6,4 @@ LIB_OBJS = cdct.o csbt.o cupl3.o cup.o cwinm.o dec8.o hwin.o icdct.o isbt.o \ OBJS = $(addprefix build/,${LIB_OBJS}) -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk diff --git a/libmpeg/files/KOSMakefile.mk b/libmpeg/files/KOSMakefile.mk index 45577de..9eb055e 100644 --- a/libmpeg/files/KOSMakefile.mk +++ b/libmpeg/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libmpeg.a OBJS = mpeg.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/liboggvorbisplay/files/KOSMakefile.mk b/liboggvorbisplay/files/KOSMakefile.mk index 9af734a..0915593 100644 --- a/liboggvorbisplay/files/KOSMakefile.mk +++ b/liboggvorbisplay/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = liboggvorbisplay.a OBJS = liboggvorbisplay/main.o liboggvorbisplay/sndoggvorbis.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude -Iliboggvorbisplay diff --git a/libopusplay/patches/fix-build.patch b/libopusplay/patches/fix-build.patch index 08a9845..c683341 100644 --- a/libopusplay/patches/fix-build.patch +++ b/libopusplay/patches/fix-build.patch @@ -8,7 +8,8 @@ index e40c3b0..a0fe4cc 100644 -KOS_CFLAGS += -I$(KOS_PORTS)/include/opus -Wextra - - include ${KOS_PORTS}/scripts/lib.mk +-include ${KOS_PORTS}/scripts/lib.mk ++include ${KOS_PORTS}/lib.mk + +$(OBJS): CPPFLAGS += -I ${KOS_SYSROOT}/include/opus + diff --git a/libparallax/files/KOSMakefile.mk b/libparallax/files/KOSMakefile.mk index bb57074..5fa03b5 100644 --- a/libparallax/files/KOSMakefile.mk +++ b/libparallax/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libparallax.a OBJS := $(patsubst %.c,%.o,$(wildcard src/*.c)) -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude -I ${KOS_SYSROOT}/include/libpng16 diff --git a/libpcx/files/KOSMakefile.mk b/libpcx/files/KOSMakefile.mk index 140aad1..aac916f 100644 --- a/libpcx/files/KOSMakefile.mk +++ b/libpcx/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libpcx.a OBJS = pcx.o pcx_texture.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libtga/files/KOSMakefile.mk b/libtga/files/KOSMakefile.mk index 8a220da..44f34e7 100644 --- a/libtga/files/KOSMakefile.mk +++ b/libtga/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libtga.a OBJS = tga.o tga_texture.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libtremor/files/KOSMakefile.mk b/libtremor/files/KOSMakefile.mk index 623a369..c2e2cc3 100644 --- a/libtremor/files/KOSMakefile.mk +++ b/libtremor/files/KOSMakefile.mk @@ -3,7 +3,7 @@ OBJS = mdct.o dsp.o info.o misc.o floor1.o floor0.o vorbisfile.o res012.o \ mapping0.o codebook.o framing.o bitwise.o floor_lookup.o main.o \ sndoggvorbis.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -DPACKAGE="libvorbisidec" -DVERSION="1.3.0" -DHAVE_DLFCN_H=1 -I. -D_REENTRANT diff --git a/libtsunami/files/KOSMakefile.mk b/libtsunami/files/KOSMakefile.mk index 7b6e84a..ba0413c 100644 --- a/libtsunami/files/KOSMakefile.mk +++ b/libtsunami/files/KOSMakefile.mk @@ -5,7 +5,7 @@ OBJS_ANIMS := $(patsubst %.cpp,%.o,$(wildcard src/anims/*.cpp)) OBJS_TRIGS := $(patsubst %.cpp,%.o,$(wildcard src/triggers/*.cpp)) OBJS := $(OBJS_MAIN) $(OBJS_DRW) $(OBJS_ANIMS) $(OBJS_TRIGS) -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/libwav/files/KOSMakefile.mk b/libwav/files/KOSMakefile.mk index bfb1bd1..1fadf56 100644 --- a/libwav/files/KOSMakefile.mk +++ b/libwav/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libwav.a OBJS = libwav.o sndwav.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude diff --git a/lua/files/KOSMakefile.mk b/lua/files/KOSMakefile.mk index 1ea38ee..d804ce1 100644 --- a/lua/files/KOSMakefile.mk +++ b/lua/files/KOSMakefile.mk @@ -8,7 +8,7 @@ OBJS = src/lapi.o src/lauxlib.o src/lbaselib.o src/lcode.o \ src/ltable.o src/ltablib.o src/ltm.o src/lundump.o \ src/lutf8lib.o src/lvm.o src/lzio.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk .stamp_fixconf: sed -e 's/\/\*[[:space:]+]#define LUA_32BITS[[:space:]+]\*\//#define LUA_32BITS/' -ibak src/luaconf.h diff --git a/micropython/files/KOSMakefile.mk b/micropython/files/KOSMakefile.mk index df2a3f0..8c884e9 100644 --- a/micropython/files/KOSMakefile.mk +++ b/micropython/files/KOSMakefile.mk @@ -131,7 +131,7 @@ ifeq ($(OS),Windows_NT) SED_FLAGS = >/dev/null 2>&1 endif -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(SOURCES): .stamp_generatemp diff --git a/stb_image/files/KOSMakefile.mk b/stb_image/files/KOSMakefile.mk index 839d40c..c6fbf6c 100644 --- a/stb_image/files/KOSMakefile.mk +++ b/stb_image/files/KOSMakefile.mk @@ -1,6 +1,6 @@ TARGET = libstb_image.a OBJS = stb_image.o -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk $(OBJS): CPPFLAGS += -Iinclude From 530d927a84e526c94e1892488212f86e3e41f0e1 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 3 Jul 2026 14:15:18 +0200 Subject: [PATCH 19/27] Use _DOWNLOAD_URL instead of having SITE + FILE Make the recipes only declare _DOWNLOAD_URL to keep them as simple as possible. The Makefile can then get the tarball name from the URL variable. Signed-off-by: Paul Cercueil --- Makefile | 8 +++++--- SDL/recipe.mk | 3 +-- SDL_ttf/recipe.mk | 3 +-- cglm/recipe.mk | 3 +-- curl/recipe.mk | 3 +-- expat/recipe.mk | 3 +-- freetype/recipe.mk | 3 +-- libADX/recipe.mk | 3 +-- libAL/recipe.mk | 3 +-- libGL/recipe.mk | 3 +-- libKGL/recipe.mk | 3 +-- libbearssl/recipe.mk | 3 +-- libbz2/recipe.mk | 3 +-- libchipmunk/recipe.mk | 3 +-- libcmark/recipe.mk | 3 +-- libconio/recipe.mk | 3 +-- libdcplib/recipe.mk | 3 +-- libfastmem/recipe.mk | 3 +-- libimageload/recipe.mk | 3 +-- libjimtcl/recipe.mk | 3 +-- libjpeg/recipe.mk | 3 +-- libkmg/recipe.mk | 3 +-- libkosh/recipe.mk | 3 +-- libmodplug/recipe.mk | 3 +-- libmp3/recipe.mk | 3 +-- libmpeg/recipe.mk | 3 +-- libogg/recipe.mk | 3 +-- liboggvorbisplay/recipe.mk | 3 +-- libopusplay/recipe.mk | 3 +-- libparallax/recipe.mk | 3 +-- libpcx/recipe.mk | 3 +-- libpng/recipe.mk | 3 +-- libsmb2/recipe.mk | 3 +-- libtga/recipe.mk | 3 +-- libtremor/recipe.mk | 3 +-- libtsunami/recipe.mk | 3 +-- libvldmail/recipe.mk | 3 +-- libvorbis/recipe.mk | 3 +-- libwav/recipe.mk | 3 +-- libyaml/recipe.mk | 3 +-- libzip/recipe.mk | 3 +-- lua/recipe.mk | 3 +-- mbedtls/recipe.mk | 3 +-- micropython/recipe.mk | 3 +-- miniaudio/recipe.mk | 3 +-- mruby/recipe.mk | 3 +-- opus/recipe.mk | 3 +-- opusfile/recipe.mk | 3 +-- polarssl/recipe.mk | 3 +-- raylib4dc/recipe.mk | 3 +-- sh4zam/recipe.mk | 3 +-- stb_image/recipe.mk | 3 +-- zlib/recipe.mk | 5 ++--- 53 files changed, 58 insertions(+), 108 deletions(-) diff --git a/Makefile b/Makefile index 9c0ec50..bf6e8e0 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,8 @@ ${2}_DISTFILE_DIR = ${1}/${2}-$${${2}_PORTVERSION} ${2}_ARCH_SUPPORTED = $$(if $${${2}_ARCHS},$$(if $$(findstring ${KOS_ARCH},$${${2}_ARCHS}),${2}),${2}) +${2}_DOWNLOAD_FILE := $(notdir ${${2}_DOWNLOAD_URL}) + ${1}/.stamp_abi_checked: ifeq ($${${2}_REQUIRES_ABI},any) @echo "${2} is compatible with any floating-point ABI." @@ -72,14 +74,14 @@ ${1}/.stamp_nodownload: ${1}/$${${2}_DOWNLOAD_FILE}: mkdir -p ${1} - @echo "Fetching $${${2}_DOWNLOAD_FILE} from $${${2}_DOWNLOAD_SITE} ..." ; \ - (cd ${1} ; $${${2}_FETCH_CMD} "$${${2}_DOWNLOAD_SITE}/$${${2}_DOWNLOAD_FILE}") + @echo "Fetching $${${2}_DOWNLOAD_URL} ..." ; \ + (cd ${1} ; $${${2}_FETCH_CMD} "$${${2}_DOWNLOAD_URL}") ${1}/.stamp_extracted: ${1}/$${${2}_DOWNLOAD_FILE} ${1}/.stamp_downloaded mkdir -p $${${2}_DISTFILE_DIR} (cd $${${2}_DISTFILE_DIR} ; $${${2}_UNPACK_CMD} $$< && touch $$@) -${1}/.stamp_fetched: ${1}/.stamp_$$(if $${${2}_DOWNLOAD_SITE},extracted,nodownload) +${1}/.stamp_fetched: ${1}/.stamp_$$(if $${${2}_DOWNLOAD_URL},extracted,nodownload) if [ -d ${KOS_PORTS}/${2}/files ] ; then \ cp ${KOS_PORTS}/${2}/files/* $${${2}_DISTFILE_DIR}/ ; \ fi diff --git a/SDL/recipe.mk b/SDL/recipe.mk index 0ee623d..aa469b2 100644 --- a/SDL/recipe.mk +++ b/SDL/recipe.mk @@ -10,8 +10,7 @@ SDL_DEPENDENCIES = libGL # What files we need to download, and where from. SDL_GIT_HASH = 6648216ef09099d722623a155693fabee972380f -SDL_DOWNLOAD_SITE = https://github.com/libsdl-org/SDL-1.2/archive/ -SDL_DOWNLOAD_FILE = ${SDL_GIT_HASH}.tar.gz +SDL_DOWNLOAD_URL = https://github.com/libsdl-org/SDL-1.2/archive/${SDL_GIT_HASH}.tar.gz SDL_TARGET = libSDL.a SDL_HDR_DIRECTORY = include diff --git a/SDL_ttf/recipe.mk b/SDL_ttf/recipe.mk index 057711c..b4b4f47 100644 --- a/SDL_ttf/recipe.mk +++ b/SDL_ttf/recipe.mk @@ -11,5 +11,4 @@ SDL_ttf_PORT_BUILD = autotools # What files we need to download, and where from. SDL_ttf_GIT_HASH = 3c4233732b94ce08d5f6a868e597af39e13f8b23 -SDL_ttf_DOWNLOAD_SITE = https://github.com/libsdl-org/SDL_ttf/archive/ -SDL_ttf_DOWNLOAD_FILE = ${SDL_ttf_GIT_HASH}.tar.gz +SDL_ttf_DOWNLOAD_URL = https://github.com/libsdl-org/SDL_ttf/archive/${SDL_ttf_GIT_HASH}.tar.gz diff --git a/cglm/recipe.mk b/cglm/recipe.mk index 4c257d2..b6c9b53 100644 --- a/cglm/recipe.mk +++ b/cglm/recipe.mk @@ -10,8 +10,7 @@ cglm_PORT_BUILD = cmake # What files we need to download, and where from. cglm_GIT_HASH = 46f46e5dcb84bc5bfcc07675f026077272704f0c -cglm_DOWNLOAD_SITE = https://github.com/recp/cglm/archive/ -cglm_DOWNLOAD_FILE = ${cglm_GIT_HASH}.tar.gz +cglm_DOWNLOAD_URL = https://github.com/recp/cglm/archive/${cglm_GIT_HASH}.tar.gz # cmake setup work. cglm_CMAKE_ARGS = -DCGLM_STATIC=ON -Wno-dev -DCMAKE_C_FLAGS="-Wno-unused-parameter" diff --git a/curl/recipe.mk b/curl/recipe.mk index 1268e95..a8de064 100644 --- a/curl/recipe.mk +++ b/curl/recipe.mk @@ -12,8 +12,7 @@ curl_PORT_BUILD = cmake curl_DEPENDENCIES = zlib mbedtls # What files we need to download, and where from. -curl_DOWNLOAD_SITE = https://curl.se/download -curl_DOWNLOAD_FILE = curl-${curl_PORTVERSION}.tar.gz +curl_DOWNLOAD_URL = https://curl.se/download/curl-${curl_PORTVERSION}.tar.gz curl_DOWNLOAD_SHA256 = e9274a5f8ab5271c0e0e6762d2fce194d5f98acc568e4ce816845b2dcc0cf88f # cmake build arguments diff --git a/expat/recipe.mk b/expat/recipe.mk index f2042a6..fa10f01 100644 --- a/expat/recipe.mk +++ b/expat/recipe.mk @@ -9,6 +9,5 @@ expat_SHORT_DESC = A C library for parsing XML expat_PORT_BUILD = autotools # What files we need to download, and where from. -expat_DOWNLOAD_SITE = https://github.com/libexpat/libexpat/releases/download/R_2_5_0 -expat_DOWNLOAD_FILE = expat-${expat_PORTVERSION}.tar.gz +expat_DOWNLOAD_URL = https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-${expat_PORTVERSION}.tar.gz expat_DOWNLOAD_SHA256 = 6b902ab103843592be5e99504f846ec109c1abb692e85347587f237a4ffa1033 diff --git a/freetype/recipe.mk b/freetype/recipe.mk index 58e0336..83782a1 100644 --- a/freetype/recipe.mk +++ b/freetype/recipe.mk @@ -12,8 +12,7 @@ freetype_PORT_BUILD = autotools freetype_DEPENDENCIES = libbz2 zlib libpng # What files we need to download, and where from. -freetype_DOWNLOAD_SITE = https://download.savannah.gnu.org/releases/freetype/ -freetype_DOWNLOAD_FILE = freetype-2.13.3.tar.gz +freetype_DOWNLOAD_URL = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.gz freetype_DOWNLOAD_SHA256 = 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 # Autotools setup work. diff --git a/libADX/recipe.mk b/libADX/recipe.mk index d2168be..ce4eea8 100644 --- a/libADX/recipe.mk +++ b/libADX/recipe.mk @@ -6,8 +6,7 @@ libADX_LICENSE = BSD 2-Clause License libADX_SHORT_DESC = Library for decoding ADX audio files # What files we need to download, and where from. -libADX_DOWNLOAD_SITE = https://github.com/sega-dreamcast/libADX/archive/ -libADX_DOWNLOAD_FILE = v${libADX_PORTVERSION}.tar.gz +libADX_DOWNLOAD_URL = https://github.com/sega-dreamcast/libADX/archive/v${libADX_PORTVERSION}.tar.gz libADX_DOWNLOAD_SHA256 = 7485a2b7d47431d5b66160c0a3769e79ce61ae9c0b317589363ef55f305e9ed1 libADX_TARGET = libADX.a diff --git a/libAL/recipe.mk b/libAL/recipe.mk index 1065fe6..ae6ee69 100644 --- a/libAL/recipe.mk +++ b/libAL/recipe.mk @@ -11,7 +11,6 @@ libAL_PORT_BUILD = cmake # What files we need to download, and where from. libAL_GIT_HASH = 4716b658e05ee39387aca0639276e239b1cca188 -libAL_DOWNLOAD_SITE = https://gitlab.com/simulant/aldc/-/archive/${libAL_GIT_HASH}/ -libAL_DOWNLOAD_FILE = aldc-${libAL_GIT_HASH}.tar.gz +libAL_DOWNLOAD_URL = https://gitlab.com/simulant/aldc/-/archive/${libAL_GIT_HASH}/aldc-${libAL_GIT_HASH}.tar.gz libAL_CMAKE_ARGS = -DBUILD_SAMPLES=OFF diff --git a/libGL/recipe.mk b/libGL/recipe.mk index 1ae5fd2..036ad0e 100644 --- a/libGL/recipe.mk +++ b/libGL/recipe.mk @@ -8,7 +8,6 @@ libGL_SHORT_DESC = GLdc, an OpenGL (tm) like graphics library for KOS libGL_PORT_BUILD = cmake libGL_GIT_HASH = 488968ce6118e421221c97211ccdcb02729ec33a -libGL_DOWNLOAD_SITE = https://gitlab.com/simulant/GLdc/-/archive/${libGL_GIT_HASH}/ -libGL_DOWNLOAD_FILE = GLdc-${libGL_GIT_HASH}.tar.gz +libGL_DOWNLOAD_URL = https://gitlab.com/simulant/GLdc/-/archive/${libGL_GIT_HASH}/GLdc-${libGL_GIT_HASH}.tar.gz libGL_CMAKE_ARGS = -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF diff --git a/libKGL/recipe.mk b/libKGL/recipe.mk index 04ba207..713008e 100644 --- a/libKGL/recipe.mk +++ b/libKGL/recipe.mk @@ -7,8 +7,7 @@ libKGL_SHORT_DESC = KallistiGL, deprecated OpenGL (tm) like graphics libr # What files we need to download, and where from. libKGL_GIT_HASH = 8374cbee6c350612f38aeedf9a0af541e83aae76 -libKGL_DOWNLOAD_SITE = https://github.com/KallistiOS/libkgl/archive/ -libKGL_DOWNLOAD_FILE = ${libKGL_GIT_HASH}.tar.gz +libKGL_DOWNLOAD_URL = https://github.com/KallistiOS/libkgl/archive/${libKGL_GIT_HASH}.tar.gz libKGL_TARGET = libKGL.a libKGL_INSTALLED_HDRS = include/gl.h include/glext.h include/glu.h include/glut.h diff --git a/libbearssl/recipe.mk b/libbearssl/recipe.mk index 9a603d1..9553c80 100644 --- a/libbearssl/recipe.mk +++ b/libbearssl/recipe.mk @@ -6,8 +6,7 @@ libbearssl_LICENSE = MIT License libbearssl_SHORT_DESC = BearSSL is an implementation of the SSL/TLS protocol (RFC 5246) written in C. # What files we need to download, and where from. -libbearssl_DOWNLOAD_SITE = https://www.bearssl.org/ -libbearssl_DOWNLOAD_FILE = bearssl-${libbearssl_PORTVERSION}.tar.gz +libbearssl_DOWNLOAD_URL = https://www.bearssl.org/bearssl-${libbearssl_PORTVERSION}.tar.gz libbearssl_DOWNLOAD_SHA256 = 6705bba1714961b41a728dfc5debbe348d2966c117649392f8c8139efc83ff14 libbearssl_TARGET = build/libbearssl.a diff --git a/libbz2/recipe.mk b/libbz2/recipe.mk index 8bd2267..da0398c 100644 --- a/libbz2/recipe.mk +++ b/libbz2/recipe.mk @@ -8,8 +8,7 @@ libbz2_SHORT_DESC = Block-sorting compression library libbz2_PORT_BUILD = cmake # What files we need to download, and where from. -libbz2_DOWNLOAD_SITE = http://cdn-fastly.deb.debian.org/debian/pool/main/b/bzip2/ -libbz2_DOWNLOAD_FILE = bzip2_1.0.8.orig.tar.gz +libbz2_DOWNLOAD_URL = http://cdn-fastly.deb.debian.org/debian/pool/main/b/bzip2/bzip2_${libbz2_PORTVERSION}.orig.tar.gz libbz2_DOWNLOAD_SHA256 = ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 CMAKE_ARGS = -DBZIP2_VERSION=${libbz2_PORTVERSION} diff --git a/libchipmunk/recipe.mk b/libchipmunk/recipe.mk index 8f08d4f..b0fc47d 100644 --- a/libchipmunk/recipe.mk +++ b/libchipmunk/recipe.mk @@ -11,8 +11,7 @@ libchipmunk_PORT_BUILD = cmake # What files we need to download, and where from. #Official Chipmunk 7.0.3 does not build, so building straight from master libchipmunk_GIT_HASH = f2f3d66220b8bb1568b8402c6d194d73d4e477d1 -libchipmunk_DOWNLOAD_SITE = https://github.com/slembcke/Chipmunk2D/archive/ -libchipmunk_DOWNLOAD_FILE = ${libchipmunk_GIT_HASH}.tar.gz +libchipmunk_DOWNLOAD_URL = https://github.com/slembcke/Chipmunk2D/archive/${libchipmunk_GIT_HASH}.tar.gz # Build_demos is reliant on a built-in library sokol that doesn't have a DC port libchipmunk_CMAKE_ARGS = -DBUILD_STATIC=ON -DBUILD_SHARED=OFF -DBUILD_DEMOS=OFF -DINSTALL_STATIC=ON diff --git a/libcmark/recipe.mk b/libcmark/recipe.mk index 0917e83..8561850 100644 --- a/libcmark/recipe.mk +++ b/libcmark/recipe.mk @@ -9,8 +9,7 @@ libcmark_SHORT_DESC = CommonMark parsing and rendering library and progra libcmark_PORT_BUILD = cmake # What files we need to download, and where from. -libcmark_DOWNLOAD_SITE = https://github.com/commonmark/cmark/archive/ -libcmark_DOWNLOAD_FILE = ${libcmark_PORTVERSION}.tar.gz +libcmark_DOWNLOAD_URL = https://github.com/commonmark/cmark/archive/${libcmark_PORTVERSION}.tar.gz libcmark_DOWNLOAD_SHA256 = f9bc5ca38bcb0b727f0056100fac4d743e768872e3bacec7746de28f5700d697 libcmark_CMAKE_ARGS = -DBUILD_TESTING=NO diff --git a/libconio/recipe.mk b/libconio/recipe.mk index 0ebb1a1..4d7c521 100644 --- a/libconio/recipe.mk +++ b/libconio/recipe.mk @@ -7,8 +7,7 @@ libconio_SHORT_DESC = Console-like I/O library # What files we need to download, and where from. libconio_GIT_HASH = 36c234b93c6ba44b58417c18b45828ec62b4d1c2 -libconio_DOWNLOAD_SITE = https://github.com/KallistiOS/libconio/archive/ -libconio_DOWNLOAD_FILE = ${libconio_GIT_HASH}.tar.gz +libconio_DOWNLOAD_URL = https://github.com/KallistiOS/libconio/archive/${libconio_GIT_HASH}.tar.gz libconio_TARGET = libconio.a libconio_INSTALLED_HDRS = include/conio.h include/draw.h include/input.h diff --git a/libdcplib/recipe.mk b/libdcplib/recipe.mk index 7ef9958..d63c51a 100644 --- a/libdcplib/recipe.mk +++ b/libdcplib/recipe.mk @@ -7,8 +7,7 @@ libdcplib_SHORT_DESC = A portable game programming library # What files we need to download, and where from. libdcplib_GIT_HASH = 0553d0f1e04e4349668912255d9cb1cf9dcdd3a5 -libdcplib_DOWNLOAD_SITE = https://github.com/KallistiOS/libdcplib/archive/ -libdcplib_DOWNLOAD_FILE = ${libdcplib_GIT_HASH}.tar.gz +libdcplib_DOWNLOAD_URL = https://github.com/KallistiOS/libdcplib/archive/${libdcplib_GIT_HASH}.tar.gz libdcplib_TARGET = libdcplib.a libdcplib_INSTALLED_HDRS = include/fnt.h include/sg.h include/ul.h diff --git a/libfastmem/recipe.mk b/libfastmem/recipe.mk index 6d088cf..cd322f9 100644 --- a/libfastmem/recipe.mk +++ b/libfastmem/recipe.mk @@ -7,8 +7,7 @@ libfastmem_SHORT_DESC = Very optimized set of memory manipulation functio # What files we need to download, and where from. libfastmem_GIT_HASH = d63e367b89f41040f70614ed5df1f4e7ca43c506 -libfastmem_DOWNLOAD_SITE = https://github.com/sega-dreamcast/libfastmem/archive/ -libfastmem_DOWNLOAD_FILE = ${libfastmem_GIT_HASH}.tar.gz +libfastmem_DOWNLOAD_URL = https://github.com/sega-dreamcast/libfastmem/archive/${libfastmem_GIT_HASH}.tar.gz libfastmem_TARGET = libfastmem.a libfastmem_INSTALLED_HDRS = include/fastmem.h diff --git a/libimageload/recipe.mk b/libimageload/recipe.mk index 6591212..eb11796 100644 --- a/libimageload/recipe.mk +++ b/libimageload/recipe.mk @@ -9,8 +9,7 @@ libimageload_DEPENDENCIES = libjpeg # What files we need to download, and where from. libimageload_GIT_HASH = d77ceb46f196f1866515524ed6d814eb5108268a -libimageload_DOWNLOAD_SITE = https://github.com/KallistiOS/libimageload/archive/ -libimageload_DOWNLOAD_FILE = ${libimageload_GIT_HASH}.tar.gz +libimageload_DOWNLOAD_URL = https://github.com/KallistiOS/libimageload/archive/${libimageload_GIT_HASH}.tar.gz libimageload_TARGET = libimageload.a libimageload_INSTALLED_HDRS = include/imageload.h include/jitterdefs.h diff --git a/libjimtcl/recipe.mk b/libjimtcl/recipe.mk index 2d086a6..6216664 100644 --- a/libjimtcl/recipe.mk +++ b/libjimtcl/recipe.mk @@ -9,8 +9,7 @@ libjimtcl_PORT_BUILD = autotools # What files we need to download, and where from. libjimtcl_GIT_HASH = ac7c48b9ba841d6d0e90dda5dafaa174a3e02679 -libjimtcl_DOWNLOAD_SITE = https://github.com/msteveb/jimtcl/archive/ -libjimtcl_DOWNLOAD_FILE = ${libjimtcl_GIT_HASH}.tar.gz +libjimtcl_DOWNLOAD_URL = https://github.com/msteveb/jimtcl/archive/${libjimtcl_GIT_HASH}.tar.gz libjimtcl_CONFIGURE_ARGS = --without-ext="aio,zlib" libjimtcl_CONFIGURE_NO_CACHE_FILE = 1 diff --git a/libjpeg/recipe.mk b/libjpeg/recipe.mk index 09f4043..33490c0 100644 --- a/libjpeg/recipe.mk +++ b/libjpeg/recipe.mk @@ -8,6 +8,5 @@ libjpeg_SHORT_DESC = Freely available lossy image compression library (wi libjpeg_PORT_BUILD = autotools # What files we need to download, and where from. -libjpeg_DOWNLOAD_SITE = https://ijg.org/files -libjpeg_DOWNLOAD_FILE = jpegsrc.v9e.tar.gz +libjpeg_DOWNLOAD_URL = https://ijg.org/files/jpegsrc.v9e.tar.gz libjpeg_DOWNLOAD_SHA256 = 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d diff --git a/libkmg/recipe.mk b/libkmg/recipe.mk index 3a6ef56..39f4c2d 100644 --- a/libkmg/recipe.mk +++ b/libkmg/recipe.mk @@ -7,8 +7,7 @@ libkmg_SHORT_DESC = Library for decoding KMG images # What files we need to download, and where from. libkmg_GIT_HASH = d3c82b9bc82bb27cc3b1bb0bfbbb421e4315b6cf -libkmg_DOWNLOAD_SITE = https://github.com/KallistiOS/libkmg/archive/ -libkmg_DOWNLOAD_FILE = ${libkmg_GIT_HASH}.tar.gz +libkmg_DOWNLOAD_URL = https://github.com/KallistiOS/libkmg/archive/${libkmg_GIT_HASH}.tar.gz libkmg_TARGET = libkmg.a libkmg_INSTALLED_HDRS = include/kmg.h diff --git a/libkosh/recipe.mk b/libkosh/recipe.mk index f3281af..a49ce33 100644 --- a/libkosh/recipe.mk +++ b/libkosh/recipe.mk @@ -9,8 +9,7 @@ libkosh_DEPENDENCIES = libconio # What files we need to download, and where from. libkosh_GIT_HASH = 535a1f04c141aa61ae176dc2d11c373ab8b6c493 -libkosh_DOWNLOAD_SITE = https://github.com/KallistiOS/libkosh/archive/ -libkosh_DOWNLOAD_FILE = ${libkosh_GIT_HASH}.tar.gz +libkosh_DOWNLOAD_URL = https://github.com/KallistiOS/libkosh/archive/${libkosh_GIT_HASH}.tar.gz libkosh_TARGET = libkosh.a libkosh_INSTALLED_HDRS = include/kosh.h diff --git a/libmodplug/recipe.mk b/libmodplug/recipe.mk index 34dbd2b..16c1b25 100644 --- a/libmodplug/recipe.mk +++ b/libmodplug/recipe.mk @@ -7,8 +7,7 @@ libmodplug_SHORT_DESC = A library for MOD-like tracker music formats # What files we need to download, and where from. libmodplug_GIT_HASH = 331710dcc362013080e621d51d826c05e880022a -libmodplug_DOWNLOAD_SITE = https://github.com/KallistiOS/libmodplug/archive/ -libmodplug_DOWNLOAD_FILE = ${libmodplug_GIT_HASH}.tar.gz +libmodplug_DOWNLOAD_URL = https://github.com/KallistiOS/libmodplug/archive/${libmodplug_GIT_HASH}.tar.gz libmodplug_TARGET = libmodplug.a libmodplug_INSTALLED_HDRS = include/modplug.h include/sndfile.h include/stdafx.h diff --git a/libmp3/recipe.mk b/libmp3/recipe.mk index 46d89e1..9742142 100644 --- a/libmp3/recipe.mk +++ b/libmp3/recipe.mk @@ -7,8 +7,7 @@ libmp3_SHORT_DESC = Library for decoding and streaming MP3 audio # What files we need to download, and where from. libmp3_GIT_HASH = 1a1360238f98a8dc2d91e752c366ffb8d24e41ff -libmp3_DOWNLOAD_SITE = https://github.com/KallistiOS/libmp3/archive/ -libmp3_DOWNLOAD_FILE = ${libmp3_GIT_HASH}.tar.gz +libmp3_DOWNLOAD_URL = https://github.com/KallistiOS/libmp3/archive/${libmp3_GIT_HASH}.tar.gz libmp3_TARGET = libmp3.a libmp3_INSTALLED_HDRS = include/sndmp3.h include/sndserver.h diff --git a/libmpeg/recipe.mk b/libmpeg/recipe.mk index ad552f4..4b28a72 100644 --- a/libmpeg/recipe.mk +++ b/libmpeg/recipe.mk @@ -6,8 +6,7 @@ libmpeg_LICENSE = MIT libmpeg_SHORT_DESC = Library for decoding MPEG1 Video, MP2 Audio using pl_mpeg # What files we need to download, and where from. -libmpeg_DOWNLOAD_SITE = https://github.com/Dreamcast-Projects/pl_mpeg/archive/ -libmpeg_DOWNLOAD_FILE = v${libmpeg_PORTVERSION}.tar.gz +libmpeg_DOWNLOAD_URL = https://github.com/Dreamcast-Projects/pl_mpeg/archive/v${libmpeg_PORTVERSION}.tar.gz libmpeg_TARGET = libmpeg.a libmpeg_INSTALLED_HDRS = mpeg.h diff --git a/libogg/recipe.mk b/libogg/recipe.mk index 8ea13f5..65f7463 100644 --- a/libogg/recipe.mk +++ b/libogg/recipe.mk @@ -9,6 +9,5 @@ libogg_SHORT_DESC = Multimedia container format access library libogg_PORT_BUILD = autotools # What files we need to download, and where from. -libogg_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/ogg -libogg_DOWNLOAD_FILE = libogg-${libogg_PORTVERSION}.tar.gz +libogg_DOWNLOAD_URL = https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-${libogg_PORTVERSION}.tar.gz libogg_DOWNLOAD_SHA256 = 0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664 diff --git a/liboggvorbisplay/recipe.mk b/liboggvorbisplay/recipe.mk index 5c40ca7..2c28484 100644 --- a/liboggvorbisplay/recipe.mk +++ b/liboggvorbisplay/recipe.mk @@ -10,8 +10,7 @@ liboggvorbisplay_DEPENDENCIES = libvorbis # What files we need to download, and where from. liboggvorbisplay_GIT_HASH = 51b7bc8d225c9ef4bbbc7f556fd40a5092c40d94 -liboggvorbisplay_DOWNLOAD_SITE = https://github.com/KallistiOS/liboggvorbisplay/archive/ -liboggvorbisplay_DOWNLOAD_FILE = ${liboggvorbisplay_GIT_HASH}.tar.gz +liboggvorbisplay_DOWNLOAD_URL = https://github.com/KallistiOS/liboggvorbisplay/archive/${liboggvorbisplay_GIT_HASH}.tar.gz liboggvorbisplay_TARGET = liboggvorbisplay.a liboggvorbisplay_INSTALLED_HDRS = include/oggvorbis/sndoggvorbis.h diff --git a/libopusplay/recipe.mk b/libopusplay/recipe.mk index 60d4c90..53c4c03 100644 --- a/libopusplay/recipe.mk +++ b/libopusplay/recipe.mk @@ -10,8 +10,7 @@ libopusplay_DEPENDENCIES = opusfile # What files we need to download, and where from. libopusplay_GIT_HASH = 1f8eaf7e3855d9c93c1e80095ea37364e5ccb7a3 -libopusplay_DOWNLOAD_SITE = https://github.com/KallistiOS/libopusplay/archive/ -libopusplay_DOWNLOAD_FILE = ${libopusplay_GIT_HASH}.tar.gz +libopusplay_DOWNLOAD_URL = https://github.com/KallistiOS/libopusplay/archive/${libopusplay_GIT_HASH}.tar.gz libopusplay_TARGET = libopusplay.a libopusplay_INSTALLED_HDRS = opusplay.h diff --git a/libparallax/recipe.mk b/libparallax/recipe.mk index 977f2c9..c061a1a 100644 --- a/libparallax/recipe.mk +++ b/libparallax/recipe.mk @@ -9,8 +9,7 @@ libparallax_DEPENDENCIES = kos-png kos-jpeg libkmg # What files we need to download, and where from. libparallax_GIT_HASH = a7591bb0d6065e6c5b7663741054c51a5aeb1ea2 -libparallax_DOWNLOAD_SITE = https://github.com/KallistiOS/libparallax/archive/ -libparallax_DOWNLOAD_FILE = ${libparallax_GIT_HASH}.tar.gz +libparallax_DOWNLOAD_URL = https://github.com/KallistiOS/libparallax/archive/${libparallax_GIT_HASH}.tar.gz libparallax_TARGET = libparallax.a libparallax_INSTALLED_HDRS = include/color.h include/context.h include/dr.h \ diff --git a/libpcx/recipe.mk b/libpcx/recipe.mk index ffa0e12..d97faec 100644 --- a/libpcx/recipe.mk +++ b/libpcx/recipe.mk @@ -7,8 +7,7 @@ libpcx_SHORT_DESC = Library for decoding PCX images # What files we need to download, and where from. libpcx_GIT_HASH = aa03fe15107bec480e0dcad0a6d40933e740f8b4 -libpcx_DOWNLOAD_SITE = https://github.com/KallistiOS/libpcx/archive/ -libpcx_DOWNLOAD_FILE = ${libpcx_GIT_HASH}.tar.gz +libpcx_DOWNLOAD_URL = https://github.com/KallistiOS/libpcx/archive/${libpcx_GIT_HASH}.tar.gz libpcx_TARGET = libpcx.a libpcx_INSTALLED_HDRS = include/pcx.h diff --git a/libpng/recipe.mk b/libpng/recipe.mk index 034dfe7..b2f2dd9 100644 --- a/libpng/recipe.mk +++ b/libpng/recipe.mk @@ -10,8 +10,7 @@ libpng_DEPENDENCIES = zlib libpng_PORT_BUILD = cmake # What files we need to download, and where from. -libpng_DOWNLOAD_SITE = https://download.sourceforge.net/libpng -libpng_DOWNLOAD_FILE = libpng-${libpng_PORTVERSION}.tar.xz +libpng_DOWNLOAD_URL = https://download.sourceforge.net/libpng/libpng-${libpng_PORTVERSION}.tar.xz libpng_DOWNLOAD_SHA256 = b3683e8b8111ebf6f1ac004ebb6b0c975cd310ec469d98364388e9cedbfa68be libpng_CMAKE_ARGS = -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DPNG_EXECUTABLES=OFF -DPNG_SHARED=OFF -DPNG_TESTS=OFF diff --git a/libsmb2/recipe.mk b/libsmb2/recipe.mk index fd1ea85..9e5fee5 100644 --- a/libsmb2/recipe.mk +++ b/libsmb2/recipe.mk @@ -10,5 +10,4 @@ libsmb2_PORT_BUILD = cmake # What files we need to download, and where from. libsmb2_GIT_HASH = 14fbe119b95032bd1ea8def8e6a7d75a26bd3809 -libsmb2_DOWNLOAD_SITE = https://github.com/sahlberg/libsmb2/archive/ -libsmb2_DOWNLOAD_FILE = ${libsmb2_GIT_HASH}.tar.gz +libsmb2_DOWNLOAD_URL = https://github.com/sahlberg/libsmb2/archive/${libsmb2_GIT_HASH}.tar.gz diff --git a/libtga/recipe.mk b/libtga/recipe.mk index 838c992..e508802 100644 --- a/libtga/recipe.mk +++ b/libtga/recipe.mk @@ -7,8 +7,7 @@ libtga_SHORT_DESC = Library for decoding TGA images # What files we need to download, and where from. libtga_GIT_HASH = 3217cbb3bd871cf8174fa705642dff9b08220022 -libtga_DOWNLOAD_SITE = https://github.com/KallistiOS/libtga/archive/ -libtga_DOWNLOAD_FILE = ${libtga_GIT_HASH}.tar.gz +libtga_DOWNLOAD_URL = https://github.com/KallistiOS/libtga/archive/${libtga_GIT_HASH}.tar.gz libtga_TARGET = libtga.a libtga_INSTALLED_HDRS = include/tga.h diff --git a/libtremor/recipe.mk b/libtremor/recipe.mk index 94617ad..d6bcf08 100644 --- a/libtremor/recipe.mk +++ b/libtremor/recipe.mk @@ -7,8 +7,7 @@ libtremor_SHORT_DESC = Vorbis audio decoder library (integer version) # What files we need to download, and where from. libtremor_GIT_HASH = 89a7534bf2e70112e0354452b17a78675ca92dbf -libtremor_DOWNLOAD_SITE = https://gitlab.xiph.org/xiph/tremor/-/archive/${libtremor_GIT_HASH}/ -libtremor_DOWNLOAD_FILE = tremor-${libtremor_GIT_HASH}.tar.gz +libtremor_DOWNLOAD_URL = https://gitlab.xiph.org/xiph/tremor/-/archive/${libtremor_GIT_HASH}/tremor-${libtremor_GIT_HASH}.tar.gz libtremor_TARGET = libtremor.a libtremor_INSTALLED_HDRS = ivorbiscodec.h ivorbisfile.h sndoggvorbis.h diff --git a/libtsunami/recipe.mk b/libtsunami/recipe.mk index ce89574..3dee8e4 100644 --- a/libtsunami/recipe.mk +++ b/libtsunami/recipe.mk @@ -9,8 +9,7 @@ libtsunami_DEPENDENCIES = libparallax # What files we need to download, and where from. libtsunami_GIT_HASH = f1fa63b1b64b38ffdbf107037b446388c91b4e72 -libtsunami_DOWNLOAD_SITE = https://github.com/KallistiOS/libtsunami/archive/ -libtsunami_DOWNLOAD_FILE = ${libtsunami_GIT_HASH}.tar.gz +libtsunami_DOWNLOAD_URL = https://github.com/KallistiOS/libtsunami/archive/${libtsunami_GIT_HASH}.tar.gz libtsunami_TARGET = libtsunami.a libtsunami_HDR_DIRECTORY = include diff --git a/libvldmail/recipe.mk b/libvldmail/recipe.mk index 847a98f..b27c729 100644 --- a/libvldmail/recipe.mk +++ b/libvldmail/recipe.mk @@ -10,5 +10,4 @@ libvldmail_PORT_BUILD = cmake # What files we need to download, and where from. libvldmail_GIT_HASH = release-${libvldmail_PORTVERSION} -libvldmail_DOWNLOAD_SITE = https://github.com/dertuxmalwieder/libvldmail/archive/ -libvldmail_DOWNLOAD_FILE = ${libvldmail_GIT_HASH}.tar.gz +libvldmail_DOWNLOAD_URL = https://github.com/dertuxmalwieder/libvldmail/archive/${libvldmail_GIT_HASH}.tar.gz diff --git a/libvorbis/recipe.mk b/libvorbis/recipe.mk index 1d118fc..472d775 100644 --- a/libvorbis/recipe.mk +++ b/libvorbis/recipe.mk @@ -10,8 +10,7 @@ libvorbis_DEPENDENCIES = libogg libvorbis_PORT_BUILD = cmake # What files we need to download, and where from. -libvorbis_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/vorbis -libvorbis_DOWNLOAD_FILE = libvorbis-${libvorbis_PORTVERSION}.tar.gz +libvorbis_DOWNLOAD_URL = https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-${libvorbis_PORTVERSION}.tar.gz libvorbis_DOWNLOAD_SHA256 = 0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab libvorbis_CMAKE_ARGS = -DCMAKE_POLICY_VERSION_MINIMUM=3.5 diff --git a/libwav/recipe.mk b/libwav/recipe.mk index 608739f..fe4792e 100644 --- a/libwav/recipe.mk +++ b/libwav/recipe.mk @@ -7,8 +7,7 @@ libwav_SHORT_DESC = Library for decoding WAV file headers # What files we need to download, and where from. libwav_GIT_HASH = d6f1a89b7f6d50c1e429c10a6f43379f89b8e161 -libwav_DOWNLOAD_SITE = https://github.com/Dreamcast-Projects/libwav/archive/ -libwav_DOWNLOAD_FILE = ${libwav_GIT_HASH}.tar.gz +libwav_DOWNLOAD_URL = https://github.com/Dreamcast-Projects/libwav/archive/${libwav_GIT_HASH}.tar.gz libwav_TARGET = libwav.a libwav_INSTALLED_HDRS = sndwav.h diff --git a/libyaml/recipe.mk b/libyaml/recipe.mk index 4d39da7..aebffab 100644 --- a/libyaml/recipe.mk +++ b/libyaml/recipe.mk @@ -9,6 +9,5 @@ libyaml_SHORT_DESC = A C library for parsing and emitting YAML libyaml_PORT_BUILD = autotools # What files we need to download, and where from. -libyaml_DOWNLOAD_SITE = https://github.com/yaml/libyaml/releases/download/${libyaml_PORTVERSION} -libyaml_DOWNLOAD_FILE = yaml-${libyaml_PORTVERSION}.tar.gz +libyaml_DOWNLOAD_URL = https://github.com/yaml/libyaml/releases/download/${libyaml_PORTVERSION}/yaml-${libyaml_PORTVERSION}.tar.gz libyaml_DOWNLOAD_SHA256 = c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4 diff --git a/libzip/recipe.mk b/libzip/recipe.mk index 6366a88..f8f38fc 100644 --- a/libzip/recipe.mk +++ b/libzip/recipe.mk @@ -12,8 +12,7 @@ libzip_PORT_BUILD = cmake libzip_DEPENDENCIES = zlib # What files we need to download, and where from. -libzip_DOWNLOAD_SITE = https://libzip.org/download -libzip_DOWNLOAD_FILE = libzip-${libzip_PORTVERSION}.tar.gz +libzip_DOWNLOAD_URL = https://libzip.org/download/libzip-${libzip_PORTVERSION}.tar.gz libzip_DOWNLOAD_SHA256 = 0cef914d8f5105ccac44484f61413daa08d7204758e77240a4d20ebf967f3d49 # Set cmake options diff --git a/lua/recipe.mk b/lua/recipe.mk index 547df3b..758a45d 100644 --- a/lua/recipe.mk +++ b/lua/recipe.mk @@ -6,8 +6,7 @@ lua_LICENSE = MIT lua_SHORT_DESC = Lightweight, embeddable, extensible scripting language # What files we need to download, and where from. -lua_DOWNLOAD_SITE = https://www.lua.org/ftp -lua_DOWNLOAD_FILE = lua-${lua_PORTVERSION}.tar.gz +lua_DOWNLOAD_URL = https://www.lua.org/ftp/lua-${lua_PORTVERSION}.tar.gz lua_DOWNLOAD_SHA256 = 57ccc32bbbd005cab75bcc52444052535af691789dba2b9016d5c50640d68b3d lua_TARGET = liblua.a diff --git a/mbedtls/recipe.mk b/mbedtls/recipe.mk index c6c37ab..a6dd59e 100644 --- a/mbedtls/recipe.mk +++ b/mbedtls/recipe.mk @@ -8,8 +8,7 @@ mbedtls_SHORT_DESC = An open source TLS library. mbedtls_PORT_BUILD = cmake # What files we need to download, and where from. -mbedtls_DOWNLOAD_SITE = https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${mbedtls_PORTVERSION} -mbedtls_DOWNLOAD_FILE = mbedtls-${mbedtls_PORTVERSION}.tar.bz2 +mbedtls_DOWNLOAD_URL = https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${mbedtls_PORTVERSION}/mbedtls-${mbedtls_PORTVERSION}.tar.bz2 mbedtls_DOWNLOAD_SHA256 = 8fb65fae8dcae5840f793c0a334860a411f884cc537ea290ce1c52bb64ca007a mbedtls_CMAKE_ARGS = -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF -DMBEDTLS_FATAL_WARNINGS=OFF -DMBEDTLS_CONFIG_FILE=${KOS_PORTS}/mbedtls/files/mbedtls_config.h diff --git a/micropython/recipe.mk b/micropython/recipe.mk index 69462f8..e120747 100644 --- a/micropython/recipe.mk +++ b/micropython/recipe.mk @@ -6,8 +6,7 @@ micropython_LICENSE = MIT micropython_SHORT_DESC = A lean and efficient Python implementation # What files we need to download, and where from. -micropython_DOWNLOAD_SITE = https://github.com/micropython/micropython/archive/refs/tags/ -micropython_DOWNLOAD_FILE = v${micropython_PORTVERSION}.tar.gz +micropython_DOWNLOAD_URL = https://github.com/micropython/micropython/archive/refs/tags/v${micropython_PORTVERSION}.tar.gz micropython_TARGET = libmicropython.a micropython_HDR_DIRECTORY = micropython_embed diff --git a/miniaudio/recipe.mk b/miniaudio/recipe.mk index de0cf0f..e9fa2c9 100644 --- a/miniaudio/recipe.mk +++ b/miniaudio/recipe.mk @@ -12,7 +12,6 @@ miniaudio_PORT_BUILD = cmake miniaudio_DEPENDENCIES = opusfile miniaudio_GIT_HASH = a55d2e7eb8c251aa8e2277eb0c380a393140a270 -miniaudio_DOWNLOAD_SITE = https://github.com/mackron/miniaudio/archive/ -miniaudio_DOWNLOAD_FILE = ${miniaudio_GIT_HASH}.tar.gz +miniaudio_DOWNLOAD_URL = https://github.com/mackron/miniaudio/archive/${miniaudio_GIT_HASH}.tar.gz miniaudio_CMAKE_ARGS = -DMINIAUDIO_ENABLE_DREAMCAST=ON diff --git a/mruby/recipe.mk b/mruby/recipe.mk index 44ab62f..ea024f4 100644 --- a/mruby/recipe.mk +++ b/mruby/recipe.mk @@ -6,8 +6,7 @@ mruby_LICENSE = MIT mruby_SHORT_DESC = Lightweight Ruby # What files we need to download, and where from. -mruby_DOWNLOAD_SITE = https://github.com/mruby/mruby/archive/refs/tags/ -mruby_DOWNLOAD_FILE = ${mruby_PORTVERSION}.tar.gz +mruby_DOWNLOAD_URL = https://github.com/mruby/mruby/archive/refs/tags/${mruby_PORTVERSION}.tar.gz mruby_DOWNLOAD_SHA256 = e2ea271dbed14e9f2b33df773ae447b747dbc242ce2675022c0a57efea85a7b4 # Override the CC/RANLIB/AR variables set to the target tools in the Makefile diff --git a/opus/recipe.mk b/opus/recipe.mk index 0f69d42..ecb7fbe 100644 --- a/opus/recipe.mk +++ b/opus/recipe.mk @@ -9,8 +9,7 @@ opus_SHORT_DESC = Opus audio codec library opus_PORT_BUILD = autotools # What files we need to download, and where from. -opus_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/opus -opus_DOWNLOAD_FILE = opus-${opus_PORTVERSION}.tar.gz +opus_DOWNLOAD_URL = https://ftp.osuosl.org/pub/xiph/releases/opus/opus-${opus_PORTVERSION}.tar.gz opus_DOWNLOAD_SHA256 = 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d # Autotools setup work. diff --git a/opusfile/recipe.mk b/opusfile/recipe.mk index 91ad39d..cddcea0 100644 --- a/opusfile/recipe.mk +++ b/opusfile/recipe.mk @@ -12,8 +12,7 @@ opusfile_PORT_BUILD = autotools opusfile_DEPENDENCIES = opus libogg # What files we need to download, and where from. -opusfile_DOWNLOAD_SITE = https://ftp.osuosl.org/pub/xiph/releases/opus -opusfile_DOWNLOAD_FILE = opusfile-${opusfile_PORTVERSION}.tar.gz +opusfile_DOWNLOAD_URL = https://ftp.osuosl.org/pub/xiph/releases/opus/opusfile-${opusfile_PORTVERSION}.tar.gz opusfile_DOWNLOAD_SHA256 = 74ce9b6cf4da103133e7b5c95df810ceb7195471e1162ed57af415fabf5603bf # Autotools setup work. diff --git a/polarssl/recipe.mk b/polarssl/recipe.mk index 40642f4..908b8aa 100644 --- a/polarssl/recipe.mk +++ b/polarssl/recipe.mk @@ -9,8 +9,7 @@ polarssl_SHORT_DESC = A Secure Socket Layer library. polarssl_PORT_BUILD = cmake # What files we need to download, and where from. -polarssl_DOWNLOAD_SITE = https://src.fedoraproject.org/repo/pkgs/polarssl/polarssl-1.3.9-gpl.tgz/48af7d1f0d5de512cbd6dacf5407884c -polarssl_DOWNLOAD_FILE = polarssl-1.3.9-gpl.tgz +polarssl_DOWNLOAD_URL = https://src.fedoraproject.org/repo/pkgs/polarssl/polarssl-1.3.9-gpl.tgz/48af7d1f0d5de512cbd6dacf5407884c/polarssl-1.3.9-gpl.tgz polarssl_DOWNLOAD_SHA256 = d3605afc28ed4b7d1d9e3142d72e42855e4a23c07c951bbb0299556b02d36755 # Set cmake build settings diff --git a/raylib4dc/recipe.mk b/raylib4dc/recipe.mk index 6479d4c..37eb10d 100644 --- a/raylib4dc/recipe.mk +++ b/raylib4dc/recipe.mk @@ -9,8 +9,7 @@ raylib4dc_DEPENDENCIES = libGL # What files we need to download, and where from. raylib4dc_GIT_HASH = f1cfd6da839f521e5a6fd84c9783540f8403b203 -raylib4dc_DOWNLOAD_SITE = https://github.com/raylib4Consoles/raylib/archive/ -raylib4dc_DOWNLOAD_FILE = ${raylib4dc_GIT_HASH}.tar.gz +raylib4dc_DOWNLOAD_URL = https://github.com/raylib4Consoles/raylib/archive/${raylib4dc_GIT_HASH}.tar.gz raylib4dc_TARGET = src/libraylib.a raylib4dc_INSTALLED_HDRS = src/raylib.h src/raymath.h src/rlgl.h diff --git a/sh4zam/recipe.mk b/sh4zam/recipe.mk index 8f6dea5..f0df74c 100644 --- a/sh4zam/recipe.mk +++ b/sh4zam/recipe.mk @@ -8,5 +8,4 @@ sh4zam_SHORT_DESC = Fast math library, optimized for the SH4. sh4zam_PORT_BUILD = cmake sh4zam_GIT_HASH = a17755714930fca95c228ad715873afe9ff50d78 -sh4zam_DOWNLOAD_SITE = https://github.com/gyrovorbis/sh4zam/archive/ -sh4zam_DOWNLOAD_FILE = ${sh4zam_GIT_HASH}.tar.gz +sh4zam_DOWNLOAD_URL = https://github.com/gyrovorbis/sh4zam/archive/${sh4zam_GIT_HASH}.tar.gz diff --git a/stb_image/recipe.mk b/stb_image/recipe.mk index 08d7690..1221d51 100644 --- a/stb_image/recipe.mk +++ b/stb_image/recipe.mk @@ -6,8 +6,7 @@ stb_image_LICENSE = Public Domain stb_image_SHORT_DESC = Single header library for image loading supporting many common formats. # What files we need to download, and where from. -stb_image_DOWNLOAD_SITE = https://raw.githubusercontent.com/nothings/stb/master/ -stb_image_DOWNLOAD_FILE = stb_image.h +stb_image_DOWNLOAD_URL = https://raw.githubusercontent.com/nothings/stb/master/stb_image.h stb_image_TARGET = libstb_image.a stb_image_INSTALLED_HDRS = stb_image.h diff --git a/zlib/recipe.mk b/zlib/recipe.mk index eca49b2..ec32e0c 100644 --- a/zlib/recipe.mk +++ b/zlib/recipe.mk @@ -9,9 +9,8 @@ zlib_PORT_BUILD = cmake # What files we need to download, and where from. # Note: we use a github mirror as zlib.net often fails -#zlib_DOWNLOAD_SITE = http://zlib.net -zlib_DOWNLOAD_SITE = https://github.com/madler/zlib/releases/download/v${zlib_PORTVERSION}/ -zlib_DOWNLOAD_FILE = zlib-${zlib_PORTVERSION}.tar.gz +#zlib_DOWNLOAD_URL = http://zlib.net/zlib-${zlib_PORTVERSION}.tar.gz +zlib_DOWNLOAD_URL = https://github.com/madler/zlib/releases/download/v${zlib_PORTVERSION}/zlib-${zlib_PORTVERSION}.tar.gz zlib_DOWNLOAD_SHA256 = bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16 zlib_CMAKE_ARGS = -DZLIB_BUILD_TESTING=OFF -DZLIB_BUILD_SHARED=OFF From 47d103fdcbe164b47736f15ce9d1dcc9b2549b6e Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 4 Jul 2026 12:33:52 +0200 Subject: [PATCH 20/27] Add git repo URLs to recipe files These repo URLs will later be used to monitor for upstream changes, so that the packages can automatically be updated to the latest version when building. Signed-off-by: Paul Cercueil --- SDL/recipe.mk | 3 ++- SDL_ttf/recipe.mk | 4 +++- cglm/recipe.mk | 3 ++- libAL/recipe.mk | 3 ++- libGL/recipe.mk | 3 ++- libKGL/recipe.mk | 3 ++- libchipmunk/recipe.mk | 3 ++- libconio/recipe.mk | 3 ++- libdcplib/recipe.mk | 3 ++- libfastmem/recipe.mk | 3 ++- libimageload/recipe.mk | 3 ++- libjimtcl/recipe.mk | 3 ++- libkmg/recipe.mk | 3 ++- libkosh/recipe.mk | 3 ++- libmodplug/recipe.mk | 3 ++- libmp3/recipe.mk | 3 ++- liboggvorbisplay/recipe.mk | 3 ++- libopusplay/recipe.mk | 3 ++- libparallax/recipe.mk | 3 ++- libpcx/recipe.mk | 3 ++- libsmb2/recipe.mk | 3 ++- libtga/recipe.mk | 3 ++- libtremor/recipe.mk | 4 +++- libtsunami/recipe.mk | 3 ++- libvldmail/recipe.mk | 3 ++- libwav/recipe.mk | 3 ++- miniaudio/recipe.mk | 3 ++- raylib4dc/recipe.mk | 3 ++- sh4zam/recipe.mk | 3 ++- 29 files changed, 60 insertions(+), 29 deletions(-) diff --git a/SDL/recipe.mk b/SDL/recipe.mk index aa469b2..05526b0 100644 --- a/SDL/recipe.mk +++ b/SDL/recipe.mk @@ -9,8 +9,9 @@ SDL_SHORT_DESC = Simple Directmedia Library SDL_DEPENDENCIES = libGL # What files we need to download, and where from. +SDL_GIT_REPO = https://github.com/libsdl-org/SDL-1.2 SDL_GIT_HASH = 6648216ef09099d722623a155693fabee972380f -SDL_DOWNLOAD_URL = https://github.com/libsdl-org/SDL-1.2/archive/${SDL_GIT_HASH}.tar.gz +SDL_DOWNLOAD_URL = ${SDL_GIT_REPO}/archive/${SDL_GIT_HASH}.tar.gz SDL_TARGET = libSDL.a SDL_HDR_DIRECTORY = include diff --git a/SDL_ttf/recipe.mk b/SDL_ttf/recipe.mk index b4b4f47..36130c0 100644 --- a/SDL_ttf/recipe.mk +++ b/SDL_ttf/recipe.mk @@ -10,5 +10,7 @@ SDL_ttf_DEPENDENCIES = SDL libbz2 zlib libpng freetype SDL_ttf_PORT_BUILD = autotools # What files we need to download, and where from. +SDL_ttf_GIT_REPO = https://github.com/libsdl-org/SDL_ttf +SDL_ttf_GIT_BRANCH = SDL-1.2 SDL_ttf_GIT_HASH = 3c4233732b94ce08d5f6a868e597af39e13f8b23 -SDL_ttf_DOWNLOAD_URL = https://github.com/libsdl-org/SDL_ttf/archive/${SDL_ttf_GIT_HASH}.tar.gz +SDL_ttf_DOWNLOAD_URL = ${SDL_ttf_GIT_REPO}/archive/${SDL_ttf_GIT_HASH}.tar.gz diff --git a/cglm/recipe.mk b/cglm/recipe.mk index b6c9b53..b6a16c8 100644 --- a/cglm/recipe.mk +++ b/cglm/recipe.mk @@ -9,8 +9,9 @@ cglm_SHORT_DESC = Highly optimized 2D|3D math library, also known as Open cglm_PORT_BUILD = cmake # What files we need to download, and where from. +cglm_GIT_REPO = https://github.com/recp/cglm cglm_GIT_HASH = 46f46e5dcb84bc5bfcc07675f026077272704f0c -cglm_DOWNLOAD_URL = https://github.com/recp/cglm/archive/${cglm_GIT_HASH}.tar.gz +cglm_DOWNLOAD_URL = ${cglm_GIT_REPO}/archive/${cglm_GIT_HASH}.tar.gz # cmake setup work. cglm_CMAKE_ARGS = -DCGLM_STATIC=ON -Wno-dev -DCMAKE_C_FLAGS="-Wno-unused-parameter" diff --git a/libAL/recipe.mk b/libAL/recipe.mk index ae6ee69..820b0ad 100644 --- a/libAL/recipe.mk +++ b/libAL/recipe.mk @@ -10,7 +10,8 @@ libAL_DEPENDENCIES = libGL libAL_PORT_BUILD = cmake # What files we need to download, and where from. +libAL_GIT_REPO = https://gitlab.com/simulant/aldc libAL_GIT_HASH = 4716b658e05ee39387aca0639276e239b1cca188 -libAL_DOWNLOAD_URL = https://gitlab.com/simulant/aldc/-/archive/${libAL_GIT_HASH}/aldc-${libAL_GIT_HASH}.tar.gz +libAL_DOWNLOAD_URL = ${libAL_GIT_REPO}/-/archive/${libAL_GIT_HASH}/aldc-${libAL_GIT_HASH}.tar.gz libAL_CMAKE_ARGS = -DBUILD_SAMPLES=OFF diff --git a/libGL/recipe.mk b/libGL/recipe.mk index 036ad0e..3900b02 100644 --- a/libGL/recipe.mk +++ b/libGL/recipe.mk @@ -7,7 +7,8 @@ libGL_SHORT_DESC = GLdc, an OpenGL (tm) like graphics library for KOS libGL_PORT_BUILD = cmake +libGL_GIT_REPO = https://gitlab.com/simulant/GLdc libGL_GIT_HASH = 488968ce6118e421221c97211ccdcb02729ec33a -libGL_DOWNLOAD_URL = https://gitlab.com/simulant/GLdc/-/archive/${libGL_GIT_HASH}/GLdc-${libGL_GIT_HASH}.tar.gz +libGL_DOWNLOAD_URL = ${libGL_GIT_REPO}/-/archive/${libGL_GIT_HASH}/GLdc-${libGL_GIT_HASH}.tar.gz libGL_CMAKE_ARGS = -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF diff --git a/libKGL/recipe.mk b/libKGL/recipe.mk index 713008e..70b64a1 100644 --- a/libKGL/recipe.mk +++ b/libKGL/recipe.mk @@ -6,8 +6,9 @@ libKGL_LICENSE = KOS License libKGL_SHORT_DESC = KallistiGL, deprecated OpenGL (tm) like graphics library for KOS # What files we need to download, and where from. +libKGL_GIT_REPO = https://github.com/KallistiOS/libkgl libKGL_GIT_HASH = 8374cbee6c350612f38aeedf9a0af541e83aae76 -libKGL_DOWNLOAD_URL = https://github.com/KallistiOS/libkgl/archive/${libKGL_GIT_HASH}.tar.gz +libKGL_DOWNLOAD_URL = ${libKGL_GIT_REPO}/archive/${libKGL_GIT_HASH}.tar.gz libKGL_TARGET = libKGL.a libKGL_INSTALLED_HDRS = include/gl.h include/glext.h include/glu.h include/glut.h diff --git a/libchipmunk/recipe.mk b/libchipmunk/recipe.mk index b0fc47d..e05a871 100644 --- a/libchipmunk/recipe.mk +++ b/libchipmunk/recipe.mk @@ -10,8 +10,9 @@ libchipmunk_PORT_BUILD = cmake # What files we need to download, and where from. #Official Chipmunk 7.0.3 does not build, so building straight from master +libchipmunk_GIT_REPO = https://github.com/slembcke/Chipmunk2D libchipmunk_GIT_HASH = f2f3d66220b8bb1568b8402c6d194d73d4e477d1 -libchipmunk_DOWNLOAD_URL = https://github.com/slembcke/Chipmunk2D/archive/${libchipmunk_GIT_HASH}.tar.gz +libchipmunk_DOWNLOAD_URL = ${libchipmunk_GIT_REPO}/archive/${libchipmunk_GIT_HASH}.tar.gz # Build_demos is reliant on a built-in library sokol that doesn't have a DC port libchipmunk_CMAKE_ARGS = -DBUILD_STATIC=ON -DBUILD_SHARED=OFF -DBUILD_DEMOS=OFF -DINSTALL_STATIC=ON diff --git a/libconio/recipe.mk b/libconio/recipe.mk index 4d7c521..8ae2692 100644 --- a/libconio/recipe.mk +++ b/libconio/recipe.mk @@ -6,8 +6,9 @@ libconio_LICENSE = KOS License libconio_SHORT_DESC = Console-like I/O library # What files we need to download, and where from. +libconio_GIT_REPO = https://github.com/KallistiOS/libconio libconio_GIT_HASH = 36c234b93c6ba44b58417c18b45828ec62b4d1c2 -libconio_DOWNLOAD_URL = https://github.com/KallistiOS/libconio/archive/${libconio_GIT_HASH}.tar.gz +libconio_DOWNLOAD_URL = ${libconio_GIT_REPO}/archive/${libconio_GIT_HASH}.tar.gz libconio_TARGET = libconio.a libconio_INSTALLED_HDRS = include/conio.h include/draw.h include/input.h diff --git a/libdcplib/recipe.mk b/libdcplib/recipe.mk index d63c51a..fa158fc 100644 --- a/libdcplib/recipe.mk +++ b/libdcplib/recipe.mk @@ -6,8 +6,9 @@ libdcplib_LICENSE = LGPLv2 (with embedded system exemption) libdcplib_SHORT_DESC = A portable game programming library # What files we need to download, and where from. +libdcplib_GIT_REPO = https://github.com/KallistiOS/libdcplib libdcplib_GIT_HASH = 0553d0f1e04e4349668912255d9cb1cf9dcdd3a5 -libdcplib_DOWNLOAD_URL = https://github.com/KallistiOS/libdcplib/archive/${libdcplib_GIT_HASH}.tar.gz +libdcplib_DOWNLOAD_URL = ${libdcplib_GIT_REPO}/archive/${libdcplib_GIT_HASH}.tar.gz libdcplib_TARGET = libdcplib.a libdcplib_INSTALLED_HDRS = include/fnt.h include/sg.h include/ul.h diff --git a/libfastmem/recipe.mk b/libfastmem/recipe.mk index cd322f9..5298f07 100644 --- a/libfastmem/recipe.mk +++ b/libfastmem/recipe.mk @@ -6,8 +6,9 @@ libfastmem_LICENSE = LGPLv2.1 libfastmem_SHORT_DESC = Very optimized set of memory manipulation functions # What files we need to download, and where from. +libfastmem_GIT_REPO = https://github.com/sega-dreamcast/libfastmem libfastmem_GIT_HASH = d63e367b89f41040f70614ed5df1f4e7ca43c506 -libfastmem_DOWNLOAD_URL = https://github.com/sega-dreamcast/libfastmem/archive/${libfastmem_GIT_HASH}.tar.gz +libfastmem_DOWNLOAD_URL = ${libfastmem_GIT_REPO}/archive/${libfastmem_GIT_HASH}.tar.gz libfastmem_TARGET = libfastmem.a libfastmem_INSTALLED_HDRS = include/fastmem.h diff --git a/libimageload/recipe.mk b/libimageload/recipe.mk index eb11796..d373964 100644 --- a/libimageload/recipe.mk +++ b/libimageload/recipe.mk @@ -8,8 +8,9 @@ libimageload_SHORT_DESC = Library for decoding BMP, JPEG, and PCX images libimageload_DEPENDENCIES = libjpeg # What files we need to download, and where from. +libimageload_GIT_REPO = https://github.com/KallistiOS/libimageload libimageload_GIT_HASH = d77ceb46f196f1866515524ed6d814eb5108268a -libimageload_DOWNLOAD_URL = https://github.com/KallistiOS/libimageload/archive/${libimageload_GIT_HASH}.tar.gz +libimageload_DOWNLOAD_URL = ${libimageload_GIT_REPO}/archive/${libimageload_GIT_HASH}.tar.gz libimageload_TARGET = libimageload.a libimageload_INSTALLED_HDRS = include/imageload.h include/jitterdefs.h diff --git a/libjimtcl/recipe.mk b/libjimtcl/recipe.mk index 6216664..4d025ba 100644 --- a/libjimtcl/recipe.mk +++ b/libjimtcl/recipe.mk @@ -8,8 +8,9 @@ libjimtcl_SHORT_DESC = An open-source, small footprint implementation of libjimtcl_PORT_BUILD = autotools # What files we need to download, and where from. +libjimtcl_GIT_REPO = https://github.com/msteveb/jimtcl libjimtcl_GIT_HASH = ac7c48b9ba841d6d0e90dda5dafaa174a3e02679 -libjimtcl_DOWNLOAD_URL = https://github.com/msteveb/jimtcl/archive/${libjimtcl_GIT_HASH}.tar.gz +libjimtcl_DOWNLOAD_URL = ${libjimtcl_GIT_REPO}/archive/${libjimtcl_GIT_HASH}.tar.gz libjimtcl_CONFIGURE_ARGS = --without-ext="aio,zlib" libjimtcl_CONFIGURE_NO_CACHE_FILE = 1 diff --git a/libkmg/recipe.mk b/libkmg/recipe.mk index 39f4c2d..5164745 100644 --- a/libkmg/recipe.mk +++ b/libkmg/recipe.mk @@ -6,8 +6,9 @@ libkmg_LICENSE = KOS License libkmg_SHORT_DESC = Library for decoding KMG images # What files we need to download, and where from. +libkmg_GIT_REPO = https://github.com/KallistiOS/libkmg libkmg_GIT_HASH = d3c82b9bc82bb27cc3b1bb0bfbbb421e4315b6cf -libkmg_DOWNLOAD_URL = https://github.com/KallistiOS/libkmg/archive/${libkmg_GIT_HASH}.tar.gz +libkmg_DOWNLOAD_URL = ${libkmg_GIT_REPO}/archive/${libkmg_GIT_HASH}.tar.gz libkmg_TARGET = libkmg.a libkmg_INSTALLED_HDRS = include/kmg.h diff --git a/libkosh/recipe.mk b/libkosh/recipe.mk index a49ce33..3214cd4 100644 --- a/libkosh/recipe.mk +++ b/libkosh/recipe.mk @@ -8,8 +8,9 @@ libkosh_SHORT_DESC = The KallistiOS shell (library) libkosh_DEPENDENCIES = libconio # What files we need to download, and where from. +libkosh_GIT_REPO = https://github.com/KallistiOS/libkosh libkosh_GIT_HASH = 535a1f04c141aa61ae176dc2d11c373ab8b6c493 -libkosh_DOWNLOAD_URL = https://github.com/KallistiOS/libkosh/archive/${libkosh_GIT_HASH}.tar.gz +libkosh_DOWNLOAD_URL = ${libkosh_GIT_REPO}/archive/${libkosh_GIT_HASH}.tar.gz libkosh_TARGET = libkosh.a libkosh_INSTALLED_HDRS = include/kosh.h diff --git a/libmodplug/recipe.mk b/libmodplug/recipe.mk index 16c1b25..5eec209 100644 --- a/libmodplug/recipe.mk +++ b/libmodplug/recipe.mk @@ -6,8 +6,9 @@ libmodplug_LICENSE = Public Domain libmodplug_SHORT_DESC = A library for MOD-like tracker music formats # What files we need to download, and where from. +libmodplug_GIT_REPO = https://github.com/KallistiOS/libmodplug libmodplug_GIT_HASH = 331710dcc362013080e621d51d826c05e880022a -libmodplug_DOWNLOAD_URL = https://github.com/KallistiOS/libmodplug/archive/${libmodplug_GIT_HASH}.tar.gz +libmodplug_DOWNLOAD_URL = ${libmodplug_GIT_REPO}/archive/${libmodplug_GIT_HASH}.tar.gz libmodplug_TARGET = libmodplug.a libmodplug_INSTALLED_HDRS = include/modplug.h include/sndfile.h include/stdafx.h diff --git a/libmp3/recipe.mk b/libmp3/recipe.mk index 9742142..4e3970a 100644 --- a/libmp3/recipe.mk +++ b/libmp3/recipe.mk @@ -6,8 +6,9 @@ libmp3_LICENSE = GPLv2+ (XingMP3) and KOS License (KOS Glue) libmp3_SHORT_DESC = Library for decoding and streaming MP3 audio # What files we need to download, and where from. +libmp3_GIT_REPO = https://github.com/KallistiOS/libmp3 libmp3_GIT_HASH = 1a1360238f98a8dc2d91e752c366ffb8d24e41ff -libmp3_DOWNLOAD_URL = https://github.com/KallistiOS/libmp3/archive/${libmp3_GIT_HASH}.tar.gz +libmp3_DOWNLOAD_URL = ${libmp3_GIT_REPO}/archive/${libmp3_GIT_HASH}.tar.gz libmp3_TARGET = libmp3.a libmp3_INSTALLED_HDRS = include/sndmp3.h include/sndserver.h diff --git a/liboggvorbisplay/recipe.mk b/liboggvorbisplay/recipe.mk index 2c28484..ef40189 100644 --- a/liboggvorbisplay/recipe.mk +++ b/liboggvorbisplay/recipe.mk @@ -9,8 +9,9 @@ liboggvorbisplay_SHORT_DESC = Ogg Vorbis audio streaming library liboggvorbisplay_DEPENDENCIES = libvorbis # What files we need to download, and where from. +liboggvorbisplay_GIT_REPO = https://github.com/KallistiOS/liboggvorbisplay liboggvorbisplay_GIT_HASH = 51b7bc8d225c9ef4bbbc7f556fd40a5092c40d94 -liboggvorbisplay_DOWNLOAD_URL = https://github.com/KallistiOS/liboggvorbisplay/archive/${liboggvorbisplay_GIT_HASH}.tar.gz +liboggvorbisplay_DOWNLOAD_URL = ${liboggvorbisplay_GIT_REPO}/archive/${liboggvorbisplay_GIT_HASH}.tar.gz liboggvorbisplay_TARGET = liboggvorbisplay.a liboggvorbisplay_INSTALLED_HDRS = include/oggvorbis/sndoggvorbis.h diff --git a/libopusplay/recipe.mk b/libopusplay/recipe.mk index 53c4c03..805e922 100644 --- a/libopusplay/recipe.mk +++ b/libopusplay/recipe.mk @@ -9,8 +9,9 @@ libopusplay_SHORT_DESC = Opus audio playback library libopusplay_DEPENDENCIES = opusfile # What files we need to download, and where from. +libopusplay_GIT_REPO = https://github.com/KallistiOS/libopusplay libopusplay_GIT_HASH = 1f8eaf7e3855d9c93c1e80095ea37364e5ccb7a3 -libopusplay_DOWNLOAD_URL = https://github.com/KallistiOS/libopusplay/archive/${libopusplay_GIT_HASH}.tar.gz +libopusplay_DOWNLOAD_URL = ${libopusplay_GIT_REPO}/archive/${libopusplay_GIT_HASH}.tar.gz libopusplay_TARGET = libopusplay.a libopusplay_INSTALLED_HDRS = opusplay.h diff --git a/libparallax/recipe.mk b/libparallax/recipe.mk index c061a1a..848cbe0 100644 --- a/libparallax/recipe.mk +++ b/libparallax/recipe.mk @@ -8,8 +8,9 @@ libparallax_SHORT_DESC = Simple (mostly 2D) game API library libparallax_DEPENDENCIES = kos-png kos-jpeg libkmg # What files we need to download, and where from. +libparallax_GIT_REPO = https://github.com/KallistiOS/libparallax libparallax_GIT_HASH = a7591bb0d6065e6c5b7663741054c51a5aeb1ea2 -libparallax_DOWNLOAD_URL = https://github.com/KallistiOS/libparallax/archive/${libparallax_GIT_HASH}.tar.gz +libparallax_DOWNLOAD_URL = ${libparallax_GIT_REPO}/archive/${libparallax_GIT_HASH}.tar.gz libparallax_TARGET = libparallax.a libparallax_INSTALLED_HDRS = include/color.h include/context.h include/dr.h \ diff --git a/libpcx/recipe.mk b/libpcx/recipe.mk index d97faec..480bdfd 100644 --- a/libpcx/recipe.mk +++ b/libpcx/recipe.mk @@ -6,8 +6,9 @@ libpcx_LICENSE = KOS License libpcx_SHORT_DESC = Library for decoding PCX images # What files we need to download, and where from. +libpcx_GIT_REPO = https://github.com/KallistiOS/libpcx libpcx_GIT_HASH = aa03fe15107bec480e0dcad0a6d40933e740f8b4 -libpcx_DOWNLOAD_URL = https://github.com/KallistiOS/libpcx/archive/${libpcx_GIT_HASH}.tar.gz +libpcx_DOWNLOAD_URL = ${libpcx_GIT_REPO}/archive/${libpcx_GIT_HASH}.tar.gz libpcx_TARGET = libpcx.a libpcx_INSTALLED_HDRS = include/pcx.h diff --git a/libsmb2/recipe.mk b/libsmb2/recipe.mk index 9e5fee5..1807b11 100644 --- a/libsmb2/recipe.mk +++ b/libsmb2/recipe.mk @@ -9,5 +9,6 @@ libsmb2_SHORT_DESC = SMB2/3 userspace client libsmb2_PORT_BUILD = cmake # What files we need to download, and where from. +libsmb2_GIT_REPO = https://github.com/sahlberg/libsmb2 libsmb2_GIT_HASH = 14fbe119b95032bd1ea8def8e6a7d75a26bd3809 -libsmb2_DOWNLOAD_URL = https://github.com/sahlberg/libsmb2/archive/${libsmb2_GIT_HASH}.tar.gz +libsmb2_DOWNLOAD_URL = ${libsmb2_GIT_REPO}/archive/${libsmb2_GIT_HASH}.tar.gz diff --git a/libtga/recipe.mk b/libtga/recipe.mk index e508802..4dfc75f 100644 --- a/libtga/recipe.mk +++ b/libtga/recipe.mk @@ -6,8 +6,9 @@ libtga_LICENSE = KOS License libtga_SHORT_DESC = Library for decoding TGA images # What files we need to download, and where from. +libtga_GIT_REPO = https://github.com/KallistiOS/libtga libtga_GIT_HASH = 3217cbb3bd871cf8174fa705642dff9b08220022 -libtga_DOWNLOAD_URL = https://github.com/KallistiOS/libtga/archive/${libtga_GIT_HASH}.tar.gz +libtga_DOWNLOAD_URL = ${libtga_GIT_REPO}/archive/${libtga_GIT_HASH}.tar.gz libtga_TARGET = libtga.a libtga_INSTALLED_HDRS = include/tga.h diff --git a/libtremor/recipe.mk b/libtremor/recipe.mk index d6bcf08..76cbf33 100644 --- a/libtremor/recipe.mk +++ b/libtremor/recipe.mk @@ -6,8 +6,10 @@ libtremor_LICENSE = 3-clause BSD (see COPYING in the source distributi libtremor_SHORT_DESC = Vorbis audio decoder library (integer version) # What files we need to download, and where from. +libtremor_GIT_REPO = https://gitlab.xiph.org/xiph/tremor +libtremor_GIT_BRANCH = lowmem libtremor_GIT_HASH = 89a7534bf2e70112e0354452b17a78675ca92dbf -libtremor_DOWNLOAD_URL = https://gitlab.xiph.org/xiph/tremor/-/archive/${libtremor_GIT_HASH}/tremor-${libtremor_GIT_HASH}.tar.gz +libtremor_DOWNLOAD_URL = ${libtremor_GIT_REPO}/-/archive/${libtremor_GIT_HASH}/tremor-${libtremor_GIT_HASH}.tar.gz libtremor_TARGET = libtremor.a libtremor_INSTALLED_HDRS = ivorbiscodec.h ivorbisfile.h sndoggvorbis.h diff --git a/libtsunami/recipe.mk b/libtsunami/recipe.mk index 3dee8e4..d2847f7 100644 --- a/libtsunami/recipe.mk +++ b/libtsunami/recipe.mk @@ -8,8 +8,9 @@ libtsunami_SHORT_DESC = C++ "scene graph" wrapper around libparallax libtsunami_DEPENDENCIES = libparallax # What files we need to download, and where from. +libtsunami_GIT_REPO = https://github.com/KallistiOS/libtsunami libtsunami_GIT_HASH = f1fa63b1b64b38ffdbf107037b446388c91b4e72 -libtsunami_DOWNLOAD_URL = https://github.com/KallistiOS/libtsunami/archive/${libtsunami_GIT_HASH}.tar.gz +libtsunami_DOWNLOAD_URL = ${libtsunami_GIT_REPO}/archive/${libtsunami_GIT_HASH}.tar.gz libtsunami_TARGET = libtsunami.a libtsunami_HDR_DIRECTORY = include diff --git a/libvldmail/recipe.mk b/libvldmail/recipe.mk index b27c729..369f709 100644 --- a/libvldmail/recipe.mk +++ b/libvldmail/recipe.mk @@ -9,5 +9,6 @@ libvldmail_SHORT_DESC = An e-mail address validation library. libvldmail_PORT_BUILD = cmake # What files we need to download, and where from. +libvldmail_GIT_REPO = https://github.com/dertuxmalwieder/libvldmail libvldmail_GIT_HASH = release-${libvldmail_PORTVERSION} -libvldmail_DOWNLOAD_URL = https://github.com/dertuxmalwieder/libvldmail/archive/${libvldmail_GIT_HASH}.tar.gz +libvldmail_DOWNLOAD_URL = ${libvldmail_GIT_REPO}/archive/${libvldmail_GIT_HASH}.tar.gz diff --git a/libwav/recipe.mk b/libwav/recipe.mk index fe4792e..82c6cc1 100644 --- a/libwav/recipe.mk +++ b/libwav/recipe.mk @@ -6,8 +6,9 @@ libwav_LICENSE = Public Domain libwav_SHORT_DESC = Library for decoding WAV file headers # What files we need to download, and where from. +libwav_GIT_REPO = https://github.com/Dreamcast-Projects/libwav libwav_GIT_HASH = d6f1a89b7f6d50c1e429c10a6f43379f89b8e161 -libwav_DOWNLOAD_URL = https://github.com/Dreamcast-Projects/libwav/archive/${libwav_GIT_HASH}.tar.gz +libwav_DOWNLOAD_URL = ${libwav_GIT_REPO}/archive/${libwav_GIT_HASH}.tar.gz libwav_TARGET = libwav.a libwav_INSTALLED_HDRS = sndwav.h diff --git a/miniaudio/recipe.mk b/miniaudio/recipe.mk index e9fa2c9..bda157b 100644 --- a/miniaudio/recipe.mk +++ b/miniaudio/recipe.mk @@ -11,7 +11,8 @@ miniaudio_PORT_BUILD = cmake miniaudio_DEPENDENCIES = opusfile +miniaudio_GIT_REPO = https://github.com/mackron/miniaudio miniaudio_GIT_HASH = a55d2e7eb8c251aa8e2277eb0c380a393140a270 -miniaudio_DOWNLOAD_URL = https://github.com/mackron/miniaudio/archive/${miniaudio_GIT_HASH}.tar.gz +miniaudio_DOWNLOAD_URL = ${miniaudio_GIT_REPO}/archive/${miniaudio_GIT_HASH}.tar.gz miniaudio_CMAKE_ARGS = -DMINIAUDIO_ENABLE_DREAMCAST=ON diff --git a/raylib4dc/recipe.mk b/raylib4dc/recipe.mk index 37eb10d..743dcf6 100644 --- a/raylib4dc/recipe.mk +++ b/raylib4dc/recipe.mk @@ -8,8 +8,9 @@ raylib4dc_SHORT_DESC = raylib is a simple and easy-to-use library to enjo raylib4dc_DEPENDENCIES = libGL # What files we need to download, and where from. +raylib4dc_GIT_REPO = https://github.com/raylib4Consoles/raylib raylib4dc_GIT_HASH = f1cfd6da839f521e5a6fd84c9783540f8403b203 -raylib4dc_DOWNLOAD_URL = https://github.com/raylib4Consoles/raylib/archive/${raylib4dc_GIT_HASH}.tar.gz +raylib4dc_DOWNLOAD_URL = ${raylib4dc_GIT_REPO}/archive/${raylib4dc_GIT_HASH}.tar.gz raylib4dc_TARGET = src/libraylib.a raylib4dc_INSTALLED_HDRS = src/raylib.h src/raymath.h src/rlgl.h diff --git a/sh4zam/recipe.mk b/sh4zam/recipe.mk index f0df74c..2bee3ca 100644 --- a/sh4zam/recipe.mk +++ b/sh4zam/recipe.mk @@ -7,5 +7,6 @@ sh4zam_SHORT_DESC = Fast math library, optimized for the SH4. sh4zam_PORT_BUILD = cmake +sh4zam_GIT_REPO = https://github.com/gyrovorbis/sh4zam sh4zam_GIT_HASH = a17755714930fca95c228ad715873afe9ff50d78 -sh4zam_DOWNLOAD_URL = https://github.com/gyrovorbis/sh4zam/archive/${sh4zam_GIT_HASH}.tar.gz +sh4zam_DOWNLOAD_URL = ${sh4zam_GIT_REPO}/archive/${sh4zam_GIT_HASH}.tar.gz From 8fe419db849de9797b81649872c642147d34345a Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 3 Jul 2026 14:38:09 +0200 Subject: [PATCH 21/27] Add 'update' and 'update-' rules When running 'make update-', if this package is associated with a git repository, the Makefile script will fetch the commit ID of the latest version available, and will append it to the version_override.mk file present on the top directory. The 'make update' does the same but for all packages associated with a git repository. The Makefile will then source the version_override.mk file if present, to override the version information set in the recipes. Signed-off-by: Paul Cercueil --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bf6e8e0..bf9439f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ include ${KOS_PORTS}/config.mk SUBDIRS := $(foreach each,$(wildcard ${KOS_PORTS}/*),$(if $(wildcard ${each}/recipe.mk),${each},) ) PACKAGES := $(foreach p,${SUBDIRS},$(notdir $p)) -.PHONY: all all_nested failed clean +.PHONY: all all_nested failed clean distclean update all: -$(MAKE) -k -C ${KOS_PORTS} all_nested @@ -25,6 +25,8 @@ BUILD_ENV := CC=kos-cc RANLIB=kos-ranlib AR=kos-ar # Include the recipes include $(KOS_PORTS)/*/recipe.mk +$(if $(wildcard ${KOS_PORTS}/version_override.mk),$(eval include ${KOS_PORTS}/version_override.mk)) + define BUILD_RULE # Default values @@ -121,7 +123,7 @@ ${1}/.stamp_installed_manual: $${${2}_BUILD_DEPS} ${1}/.stamp_installed: ${1}/.stamp_installed_$${${2}_PORT_BUILD} touch $$@ -.PHONY: ${2} clean-${2} rebuild-${2} +.PHONY: ${2} clean-${2} rebuild-${2} update-${2} ${2}: $$(if $${${2}_ARCH_SUPPORTED},${1}/.stamp_installed) $$(if $${${2}_ARCH_SUPPORTED},,@echo "${2} is not supported for this platform - skipping.") @@ -133,6 +135,14 @@ rebuild-${2}: clean-${2} ${2} .NOTPARALLEL: rebuild-${2} +update-${2}: + $$(if ${${2}_GIT_REPO},,$$(error ${2} package is not updatable.)) + $$(eval LATEST:=$$(firstword $$(shell git ls-remote ${${2}_GIT_REPO}.git $$(or ${${2}_GIT_BRANCH},HEAD)))) + @echo ${2} $$(if $$(findstring ${${2}_GIT_HASH},$${LATEST}),is up to date.,updated to $${LATEST}) + @if [ "${${2}_GIT_HASH}" != "$${LATEST}" ] ; then \ + echo "${2}_GIT_HASH = $${LATEST}" >> ${KOS_PORTS}/version_override.mk ; \ + fi + endef $(foreach p,${PACKAGES},$(eval $(call BUILD_RULE,$(abspath ${KOS_PORTS}/${p}/build-${KOS_ARCH}/${${p}_PORTVERSION}),${p}))) @@ -149,3 +159,8 @@ failed: @echo "Failed packages: ${FAILED_PACKAGES}" clean: $(foreach p,${ARCH_PACKAGES},clean-${p}) + +distclean: clean + -rm -f ${KOS_PORTS}/version_override.mk + +update: $(foreach p,${PACKAGES},$(if ${${p}_GIT_REPO},update-${p})) From 6c7861b02ff46643d63f2d23a29f44afa9dd66ba Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Tue, 7 Jul 2026 22:11:37 +0200 Subject: [PATCH 22/27] Auto-update packages in default build rule When running "make" or "make all", auto-update all the packages tracking a git repository to the latest commit from these repositories. Running "make stable" will instead build all the packages without updating them to the latest version available, and instead using the known-good commit hash specified in the package's recipe. Signed-off-by: Paul Cercueil --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bf9439f..28056ca 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,13 @@ include ${KOS_PORTS}/config.mk SUBDIRS := $(foreach each,$(wildcard ${KOS_PORTS}/*),$(if $(wildcard ${each}/recipe.mk),${each},) ) PACKAGES := $(foreach p,${SUBDIRS},$(notdir $p)) -.PHONY: all all_nested failed clean distclean update +.PHONY: all stable all_nested failed clean distclean update -all: +all: update stable + +.NOTPARALLEL: all + +stable: -$(MAKE) -k -C ${KOS_PORTS} all_nested -@$(MAKE) --no-print-directory -C ${KOS_PORTS} failed From 86bf4af4ba31652294d6087acbfb94784cb6680c Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 8 Jul 2026 11:05:31 +0200 Subject: [PATCH 23/27] Remove config.*.cache in distclean rule When the set of parameters passed to ./configure changes, which can happen when kos-ports is updated, and a cache file is used, autotool can fail. Therefore it makes sense to add the cache file to the list of the files removed in the 'distclean' rule. Signed-off-by: Paul Cercueil --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 28056ca..21c03a6 100644 --- a/Makefile +++ b/Makefile @@ -166,5 +166,6 @@ clean: $(foreach p,${ARCH_PACKAGES},clean-${p}) distclean: clean -rm -f ${KOS_PORTS}/version_override.mk + -rm -f ${KOS_PORTS}/config.*.cache update: $(foreach p,${PACKAGES},$(if ${${p}_GIT_REPO},update-${p})) From c1eee46de89e0c9ed25469210de43fc844f3524e Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 8 Jul 2026 12:26:36 +0200 Subject: [PATCH 24/27] Drop override of CMAKE_INSTALL_LIBDIR, set BUILD_SHARED_LIBS=OFF CMAKE_INSTALL_LIBDIR=lib is already the default so it does not need to be overriden. Set BUILD_SHARED_LIBS to OFF since we never want to generate shared libraries. Signed-off-by: Paul Cercueil --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 21c03a6..6121978 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ ${1}/.stamp_installed_autotools: $${${2}_BUILD_DEPS} ${1}/.stamp_installed_cmake: $${${2}_BUILD_DEPS} mkdir -p $${${2}_DISTFILE_DIR}/build cd $${${2}_DISTFILE_DIR}/build ; \ - ${BUILD_ENV} kos-cmake -DCMAKE_INSTALL_PREFIX="" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib $${${2}_CMAKE_ARGS} .. && \ + ${BUILD_ENV} kos-cmake -DCMAKE_INSTALL_PREFIX="" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF $${${2}_CMAKE_ARGS} .. && \ DESTDIR=${KOS_SYSROOT} cmake --build . -t $${${2}_MAKE_TARGET} && \ touch $$@ From 7aa09c841b817a9f60d4eda00b99cb3b927aa787 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 8 Jul 2026 12:23:30 +0200 Subject: [PATCH 25/27] modplug: Fix headers install and add pkg-config .pc file libmodplug expects the headers to be included as , so the HDR_INSTDIR variable in the recipe was wrong. Build and install a pkg-config .pc file, so that client applications can find libmodplug. Signed-off-by: Paul Cercueil --- libmodplug/files/KOSMakefile.mk | 3 +++ libmodplug/files/modplug.pc.in | 11 +++++++++++ libmodplug/recipe.mk | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 libmodplug/files/modplug.pc.in diff --git a/libmodplug/files/KOSMakefile.mk b/libmodplug/files/KOSMakefile.mk index f892f63..9e29562 100644 --- a/libmodplug/files/KOSMakefile.mk +++ b/libmodplug/files/KOSMakefile.mk @@ -32,6 +32,9 @@ OBJS= tables.o \ # load_mt2.o \ # load_psm.o \ +install: $(TARGET) + mkdir -p ${MODPLUG_PC_PATH} + sed "s/@MODPLUG_VERSION@/${MODPLUG_VERSION}/" modplug.pc.in > ${MODPLUG_PC_PATH}/modplug.pc include ${KOS_PORTS}/lib.mk diff --git a/libmodplug/files/modplug.pc.in b/libmodplug/files/modplug.pc.in new file mode 100644 index 0000000..f9e23a2 --- /dev/null +++ b/libmodplug/files/modplug.pc.in @@ -0,0 +1,11 @@ +prefix= +exec_prefix=${prefix} +bindir=${exec_prefix}/bin +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: modplug +Description: MOD-like music tracker library +Version: @MODPLUG_VERSION@ +Libs: -L${libdir} -lmodplug +Cflags: -I${includedir} diff --git a/libmodplug/recipe.mk b/libmodplug/recipe.mk index 5eec209..6dd7a9f 100644 --- a/libmodplug/recipe.mk +++ b/libmodplug/recipe.mk @@ -12,4 +12,6 @@ libmodplug_DOWNLOAD_URL = ${libmodplug_GIT_REPO}/archive/${libmodplug_GIT_H libmodplug_TARGET = libmodplug.a libmodplug_INSTALLED_HDRS = include/modplug.h include/sndfile.h include/stdafx.h -libmodplug_HDR_INSTDIR = modplug +libmodplug_HDR_INSTDIR = libmodplug + +libmodplug_BUILD_ENV = MODPLUG_VERSION=${libmodplug_PORTVERSION} MODPLUG_PC_PATH=${KOS_SYSROOT}/lib/pkgconfig/ From ed971848efe5ed57e7ab2fe6c569d8695ee4fda5 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 8 Jul 2026 13:58:15 +0200 Subject: [PATCH 26/27] miniaudio: Build from the correct branch miniaudio_GIT_BRANCH was not set properly to the branch that was tracked in the old kos-ports. Signed-off-by: Paul Cercueil --- miniaudio/recipe.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miniaudio/recipe.mk b/miniaudio/recipe.mk index bda157b..a347383 100644 --- a/miniaudio/recipe.mk +++ b/miniaudio/recipe.mk @@ -12,7 +12,8 @@ miniaudio_PORT_BUILD = cmake miniaudio_DEPENDENCIES = opusfile miniaudio_GIT_REPO = https://github.com/mackron/miniaudio -miniaudio_GIT_HASH = a55d2e7eb8c251aa8e2277eb0c380a393140a270 +miniaudio_GIT_HASH = 04429abf58dfd79b161e70fbd01e62d7a61cc760 +miniaudio_GIT_BRANCH = ${miniaudio_PORTVERSION} miniaudio_DOWNLOAD_URL = ${miniaudio_GIT_REPO}/archive/${miniaudio_GIT_HASH}.tar.gz miniaudio_CMAKE_ARGS = -DMINIAUDIO_ENABLE_DREAMCAST=ON From 7c0ec8c4c12fc0dcf3f280f2511a01dfe2f94b00 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 15 Jul 2026 23:38:50 +0200 Subject: [PATCH 27/27] lftpd: Convert to recipe file Convert the newly added lftpd package to the recipe file used with the new version of kos-ports. Signed-off-by: Paul Cercueil --- lftpd/Makefile | 21 --------------------- lftpd/files/KOSMakefile.mk | 5 +++-- lftpd/recipe.mk | 13 +++++++++++++ 3 files changed, 16 insertions(+), 23 deletions(-) delete mode 100644 lftpd/Makefile create mode 100644 lftpd/recipe.mk diff --git a/lftpd/Makefile b/lftpd/Makefile deleted file mode 100644 index 0ce3ffb..0000000 --- a/lftpd/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Port Metadata -PORTNAME = lftpd -PORTVERSION = 1.0.0 - -MAINTAINER = Andy Barajas -LICENSE = MIT -SHORT_DESC = Small embeddable FTP server library - -DEPENDENCIES = - -# Upstream source. -GIT_REPOSITORIES = https://github.com/Dreamcast-Projects/lftpd.git - -TARGET = liblftpd.a -INSTALLED_HDRS = include/lftpd.h -HDR_INSTDIR = lftpd - -# KOS build file copied into the fetched source tree. -KOS_DISTFILES = KOSMakefile.mk - -include ${KOS_PORTS}/scripts/kos-ports.mk diff --git a/lftpd/files/KOSMakefile.mk b/lftpd/files/KOSMakefile.mk index 09ca2ce..645833e 100644 --- a/lftpd/files/KOSMakefile.mk +++ b/lftpd/files/KOSMakefile.mk @@ -1,5 +1,6 @@ TARGET = liblftpd.a OBJS = lftpd.o lftpd_inet.o lftpd_io.o lftpd_log.o lftpd_string.o -KOS_CFLAGS += -Iinclude -I. -include ${KOS_PORTS}/scripts/lib.mk +include ${KOS_PORTS}/lib.mk + +$(OBJS): CPPFLAGS += -Iinclude -I. diff --git a/lftpd/recipe.mk b/lftpd/recipe.mk new file mode 100644 index 0000000..7fdb278 --- /dev/null +++ b/lftpd/recipe.mk @@ -0,0 +1,13 @@ +lftpd_PORTVERSION = 1.0.0 + +lftpd_MAINTAINER = Andy Barajas +lftpd_LICENSE = MIT +lftpd_SHORT_DESC = Small embeddable FTP server library + +# Upstream source. +lftpd_GIT_REPO = https://github.com/Dreamcast-Projects/lftpd +lftpd_GIT_HASH = 81af50cae823e3fb8204d1cec732871723da1693 +lftpd_DOWNLOAD_URL = ${lftpd_GIT_REPO}/archive/${lftpd_GIT_HASH}.tar.gz + +lftpd_TARGET = liblftpd.a +lftpd_INSTALLED_HDRS = include/lftpd.h