126 lines
3.5 KiB
Plaintext
126 lines
3.5 KiB
Plaintext
On Arch Linux:
|
|
|
|
yay -S mingw-w64-environment mingw-w64-pkg-config mingw-w64-make mingw-w64-cmake mingw-w64-sdl3
|
|
|
|
PKGBUILD like this for mingw-w64-sdl3_ttf-git:
|
|
------------------------------------
|
|
pkgname=mingw-w64-sdl3_ttf-git
|
|
pkgver=r1011.582c695
|
|
pkgrel=1
|
|
pkgdesc="Support for TrueType (.ttf) font files with Simple Directmedia Layer (Version 3)"
|
|
arch=('any')
|
|
url="https://github.com/libsdl-org/SDL_ttf.git"
|
|
license=('Zlib')
|
|
depends=('mingw-w64-crt')
|
|
makedepends=('mingw-w64-cmake' 'ninja')
|
|
source=("git+https://github.com/libsdl-org/SDL_ttf")
|
|
sha256sums=('SKIP')
|
|
provides=('mingw-w64-sdl3_ttf')
|
|
conflicts=('mingw-w64-sdl3_ttf')
|
|
options=('!debug' '!buildflags' '!strip' 'staticlibs')
|
|
|
|
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
|
|
|
|
pkgver() {
|
|
cd "${srcdir}/SDL_ttf"
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/SDL_ttf"
|
|
cd external
|
|
./download.sh
|
|
cd ..
|
|
#cmake -B build -D SDLTTF_SAMPLES=OFF -D CMAKE_INSTALL_PREFIX=/usr
|
|
#cmake --build build
|
|
for _arch in ${_architectures}; do
|
|
BUILD_OPTS=("-DCMAKE_INSTALL_PREFIX=/usr/${_arch}"
|
|
'-DSDLTTF_SAMPLES=OFF'
|
|
'-DSDLTTF_VENDORED=ON')
|
|
|
|
${_arch}-cmake -B build/${_arch}-static -G Ninja \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
${BUILD_OPTS[@]}
|
|
|
|
${_arch}-cmake -B build/${_arch} -G Ninja \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
${BUILD_OPTS[@]}
|
|
|
|
cmake --build build/${_arch}-static
|
|
cmake --build build/${_arch}
|
|
done
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/SDL_ttf"
|
|
#DESTDIR="${pkgdir}" cmake --install build
|
|
for _arch in ${_architectures}; do
|
|
DESTDIR="${pkgdir}" cmake --install build/${_arch}-static
|
|
DESTDIR="${pkgdir}" cmake --install build/${_arch}
|
|
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
|
|
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
|
|
done
|
|
}
|
|
------------------------------------
|
|
|
|
|
|
|
|
PKGBUILD like tihs for mingw-w64-sdl3_image-git:
|
|
------------------------------------
|
|
pkgname=mingw-w64-sdl3_image-git
|
|
pkgver=r1563.0d418a2
|
|
pkgrel=1
|
|
pkgdesc="Image decoding for many popular formats for Simple Directmedia Layer (Version 3)"
|
|
arch=('any')
|
|
url="https://github.com/libsdl-org/SDL_image.git"
|
|
license=('Zlib')
|
|
depends=('mingw-w64-cmake' 'ninja' )
|
|
source=("git+https://github.com/libsdl-org/SDL_image")
|
|
sha256sums=('SKIP')
|
|
provides=('mingw-w64-sdl3_image')
|
|
conflicts=('mingw-w64-sdl3_image')
|
|
options=('!debug' '!buildflags' '!strip' 'staticlibs')
|
|
|
|
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
|
|
|
|
pkgver() {
|
|
cd "${srcdir}/SDL_image"
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/SDL_image"
|
|
#cmake -B build -D CMAKE_INSTALL_PREFIX=/usr
|
|
#cmake --build build
|
|
|
|
for _arch in ${_architectures}; do
|
|
BUILD_OPTS=("-DCMAKE_INSTALL_PREFIX=/usr/${_arch}")
|
|
|
|
${_arch}-cmake -B build/${_arch}-static -G Ninja \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
${BUILD_OPTS[@]}
|
|
|
|
${_arch}-cmake -B build/${_arch} -G Ninja \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
${BUILD_OPTS[@]}
|
|
|
|
cmake --build build/${_arch}-static
|
|
cmake --build build/${_arch}
|
|
done
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/SDL_image"
|
|
#DESTDIR="${pkgdir}" cmake --install build
|
|
for _arch in ${_architectures}; do
|
|
DESTDIR="${pkgdir}" cmake --install build/${_arch}-static
|
|
DESTDIR="${pkgdir}" cmake --install build/${_arch}
|
|
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
|
|
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
|
|
done
|
|
}
|
|
------------------------------------
|
|
|
|
x86_64-w64-mingw32-make -f Makefile.mingw
|
|
x86_64-w64-mingw32-strip Rousku.exe
|