Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sdl3 recipe #29061

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
eaba0ea
Add sdl3 recipe
ymontmarin Feb 7, 2025
51fd9e5
Update meta.yaml
ymontmarin Feb 10, 2025
a87e394
No camera
ymontmarin Feb 10, 2025
0b17668
Update build.sh
ymontmarin Feb 10, 2025
34d208f
Update build.sh
ymontmarin Feb 10, 2025
46f18e3
Update build.sh
ymontmarin Feb 10, 2025
5200af9
Update build.sh
ymontmarin Feb 10, 2025
004c78b
Update build.sh
ymontmarin Feb 10, 2025
e580df7
Update build.sh
ymontmarin Feb 10, 2025
f31f2b2
Update build.sh
ymontmarin Feb 10, 2025
7a4aba0
Create conda_build_config.yaml
ymontmarin Feb 10, 2025
dd9e2d6
Update conda_build_config.yaml
ymontmarin Feb 10, 2025
d9ac6c2
Update build.sh
ymontmarin Feb 10, 2025
4c09299
Add windows recipe
ymontmarin Feb 11, 2025
2c94ca3
Clean osxs builds
ymontmarin Feb 11, 2025
515c9b8
10.13 deployment platform anyhow
ymontmarin Feb 11, 2025
1a90378
Final recipe clean up
ymontmarin Feb 11, 2025
c545796
Fix name of maintainer
ymontmarin Feb 11, 2025
eb2a4f6
Try discarding some cdts
Feb 11, 2025
f25b06f
Update host dependencies
Feb 11, 2025
e10823b
Test if this two cdts gives the right cmake
Feb 11, 2025
967fa97
Try without any cdt and only host dependency
Feb 11, 2025
377c9cf
Clean recipe
Feb 11, 2025
3910d58
Make the install
Feb 11, 2025
3d83a62
Add dependencies following wanted of SDL cmake for Linux
Feb 11, 2025
c9b1c1e
Update build.sh to follow cmake usage of SDL readme
ymontmarin Feb 11, 2025
be92fb3
Update meta.yaml with remaining deps
ymontmarin Feb 11, 2025
8dfe7cf
Update meta.yaml clean deps
ymontmarin Feb 11, 2025
6fcd279
Update bld.bat to follow cmake README of sdl
ymontmarin Feb 11, 2025
82408c8
Update meta.yaml
ymontmarin Feb 11, 2025
c50d031
Update meta.yaml with newer infos on SDL
ymontmarin Feb 11, 2025
d825e2e
Update conda_build_config.yaml
ymontmarin Feb 11, 2025
bf7da77
Small typo fix
ymontmarin Feb 11, 2025
fc746be
Update bld.bat
ymontmarin Feb 11, 2025
bbb99d4
Update bld.bat --> use Ninja in cmake
ymontmarin Feb 12, 2025
4246e1a
Update meta.yaml --> add ninja for build
ymontmarin Feb 12, 2025
802ae24
Update meta.yaml --> make is only not on win
ymontmarin Feb 12, 2025
7f0f9ae
Update conda_build_config.yaml to specify deployment target in concor…
ymontmarin Feb 12, 2025
d13a381
Update conda_build_config.yaml
ymontmarin Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions recipes/sdl3/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
setlocal EnableDelayedExpansion

:: Configure for Release (results in smaller .dll file)
set TARGET=Release

:: Set target back to None for 64-bits builds with VS2008 and VS2010
if %VS_MAJOR% LSS 14 (
if %ARCH% == 64 (
set TARGET=None
)
)

:: DirectX being integrated in the windows SDK and not being installed separately
:: confuses good old Visual Studio 2008, so disable DirectX detection durion compilation.
if "%VS_MAJOR%"=="9" (
set ADDITIONAL_OPTIONS="-SDL_DIRECTX=OFF"
)
if errorlevel 1 exit 1

:: Make a build folder and change to it.
mkdir build
cd build

:: Configure using the CMakeFiles
cmake .. -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE:STRING=!TARGET! ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
!ADDITIONAL_OPTIONS!
if errorlevel 1 exit 1

:: Build!
nmake
if errorlevel 1 exit 1

nmake install
if errorlevel 1 exit 1
28 changes: 28 additions & 0 deletions recipes/sdl3/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

if [[ ${HOST} =~ .*darwin.* ]]; then
# Adapt cflags for the sdk in use
export CFLAGS="${CFLAGS} -isysroot ${SDKROOT:-$CONDA_BUILD_SYSROOT}"

# Additional build option depending on target architecture
if [[ "${target_platform}" == "osx-arm64" ]]; then
export ADDITIONAL_OPTIONS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
fi
if [[ "${target_platform}" == "osx-x86_64" ]]; then
export ADDITIONAL_OPTIONS="-DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
fi
fi

mkdir build
cd build

cmake .. \
${CMAKE_ARGS} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
$ADDITIONAL_OPTIONS

make
make install
4 changes: 4 additions & 0 deletions recipes/sdl3/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# Both arm and x86_64 need 11.3 to build
MACOSX_SDK_VERSION: # [osx]
- "11.3" # [osx]
66 changes: 66 additions & 0 deletions recipes/sdl3/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{% set name = "sdl3" %}
{% set version = "3.2.4" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/libsdl-org/SDL/releases/download/release-{{ version }}/SDL3-{{ version }}.tar.gz
sha256: 2938328317301dfbe30176d79c251733aa5e7ec5c436c800b99ed4da7adcb0f0

build:
number: 0
run_exports:
- {{ pin_subpackage(name|lower, max_pin='x') }}

requirements:
build:
- cmake
- make
- {{ compiler('c') }}
- {{ stdlib("c") }}
- {{ compiler('cxx') }}
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
- {{ cdt('libx11-devel') }} # [linux]
- {{ cdt('libxext-devel') }} # [linux]
- {{ cdt('libxrender-devel') }} # [linux]
- {{ cdt('xorg-x11-proto-devel') }} # [linux]
ymontmarin marked this conversation as resolved.
Show resolved Hide resolved
- xorg-libx11 # [linux]
- xorg-libxext # [linux]
- pulseaudio # [linux]
host:
- xorg-libx11 # [linux]
- xorg-libxext # [linux]
- xorg-libxfixes # [linux]
- pulseaudio # [linux]
run:
- xorg-libx11 # [linux]
- xorg-libxext # [linux]

test:
requires:
- pkg-config
commands:
- test -f ${PREFIX}/include/SDL3/SDL.h # [not win]

about:
home: https://www.libsdl.org/index.php
summary: Low-level access to audio, keyboard, mouse, joystick, and graphics
description: |
Simple DirectMedia Layer is a cross-platform development library designed to
provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D.
license: Zlib
license_file: LICENSE.txt
doc_url: https://wiki.libsdl.org/FrontPage
dev_url: https://github.com/libsdl-org/SDL

extra:
recipe-maintainers:
- ymontmarin
- ManifoldFR