diff --git a/projects/glew.sourceforge.io/package.yml b/projects/glew.sourceforge.io/package.yml new file mode 100644 index 00000000..cc6fcd21 --- /dev/null +++ b/projects/glew.sourceforge.io/package.yml @@ -0,0 +1,30 @@ +distributable: + url: https://downloads.sourceforge.net/project/glew/glew/{{version}}/glew-{{version}}.tgz + strip-components: 1 + +versions: + url: https://sourceforge.net/projects/glew/files/glew/ + match: /tr title="\d+\.\d+\.\d+" class="folder/ + strip: + - /tr title="/ + - /" class="folder/ + +#FIXME it will work on other platforms, but we couldn't get it to work +platforms: darwin/aarch64 + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + cmake.org: ^3 + working-directory: _build + script: | + cmake ../build/cmake -DCMAKE_INSTALL_PREFIX="{{prefix}}" -DCMAKE_BUILD_TYPE=Release + make --jobs {{ hw.concurrency }} install + +provides: + - bin/glewinfo + - bin/visualinfo + +test: + visualinfo | grep "OpenGL vendor string:" diff --git a/projects/glm.g-truc.net/glm.pc b/projects/glm.g-truc.net/glm.pc new file mode 100644 index 00000000..5acba671 --- /dev/null +++ b/projects/glm.g-truc.net/glm.pc @@ -0,0 +1,6 @@ +prefix=${pcfiledir}/../.. +includedir=${prefix}/include + +Name: GLM +Description: OpenGL Mathematics +Cflags: -I${includedir} \ No newline at end of file diff --git a/projects/glm.g-truc.net/package.yml b/projects/glm.g-truc.net/package.yml new file mode 100644 index 00000000..68c848a6 --- /dev/null +++ b/projects/glm.g-truc.net/package.yml @@ -0,0 +1,66 @@ +distributable: + url: https://github.com/g-truc/glm/releases/download/{{version}}/glm-{{version}}.zip + +versions: + github: g-truc/glm + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + cmake.org: ^3 + working-directory: glm/build + script: + - cmake .. $ARGS + - make --jobs {{ hw.concurrency }} + - run: | + mkdir -p {{prefix}}/include {{prefix}}/lib/pkgconfig + rm glm/CMakeLists.txt + mv glm {{prefix}}/include + mv cmake/glm {{prefix}}/lib/cmake + + cp $SRCROOT/props/glm.pc {{prefix}}/lib/pkgconfig + echo 'Version: {{version}}' >> {{prefix}}/lib/pkgconfig/glm.pc + working-directory: .. + env: + ARGS: + - -DCMAKE_INSTALL_PREFIX={{prefix}} + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_VERBOSE_MAKEFILE=ON + CXXFLAGS: + - -std=c++17 + # or fails to build with clang 15 + - -Wno-error=implicit-int-conversion + - -Wno-error=unused-but-set-variable + - -Wno-error=deprecated-declarations + linux: + CXXFLAGS: + - -Wno-error=implicit-int-float-conversion + linux/x86-64: + CXXFLAGS: + - -fPIC + +# runtime: +# env: +# CPATH: /usr/include/c++ + +test: + dependencies: + tea.xyz/gx/cc: c99 + fixture: | + #include // glm::vec2 + int main() { + std::size_t const VertexCount = 4; + std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2); + glm::vec2 const PositionDataF32[VertexCount] = { + glm::vec2(-1.0f,-1.0f), + glm::vec2( 1.0f,-1.0f), + glm::vec2( 1.0f, 1.0f), + glm::vec2(-1.0f, 1.0f) + }; + return 0; + } + script: | + mv $FIXTURE b.cpp + c++ b.cpp + ./a.out \ No newline at end of file diff --git a/projects/gource.io/package.yml b/projects/gource.io/package.yml new file mode 100644 index 00000000..75a142e1 --- /dev/null +++ b/projects/gource.io/package.yml @@ -0,0 +1,43 @@ +distributable: + url: https://github.com/acaudwell/Gource/releases/download/gource-0.54/gource-0.54.tar.gz + strip-components: 1 + +versions: + github: acaudwell/Gource + strip: /^gource-/ + +#FIXME it will work on other platforms, but we couldn't get its dependency `glew` to work +platforms: darwin/aarch64 + +dependencies: + boost.org: ^1.82 + freetype.org: ^2 + libpng.org: ^1.6 + pcre.org/v2: ^10 + libsdl.org: ^2 + glew.sourceforge.io: ^2 + libsdl.org/SDL_image: ^2 + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + freedesktop.org/pkg-config: ^0.29 + glm.g-truc.net: ^0 + script: | + ./configure $ARGS + make --jobs {{ hw.concurrency }} install + env: + ARGS: + - --prefix={{prefix}} + - --without-x + - --with-boost={{deps.boost.org.prefix}} + CXXFLAGS: -std=c++17 + CXX: clang++ + CC: clang + +provides: + - bin/gource + +test: + gource --help diff --git a/projects/libsdl.org/SDL_image/package.yml b/projects/libsdl.org/SDL_image/package.yml new file mode 100644 index 00000000..2d414b0e --- /dev/null +++ b/projects/libsdl.org/SDL_image/package.yml @@ -0,0 +1,52 @@ +distributable: + url: https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.3/SDL2_image-2.6.3.tar.gz + strip-components: 1 + +versions: + github: libsdl-org/SDL_image/releases + +dependencies: + libjpeg-turbo.org: ^2 + github.com/AOMediaCodec/libavif: ^0.11 + libpng.org: ^1.6 + simplesystems.org/libtiff: ^4.5 + libsdl.org: ^2 + google.com/webp: ^1.3 + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + freedesktop.org/pkg-config: ^0.29 + script: | + ./configure $ARGS + make --jobs {{ hw.concurrency }} install + env: + ARGS: + - --prefix="{{prefix}}" + - --disable-debug + - --disable-imageio + - --disable-avif-shared + - --disable-jpg-shared + - --disable-jxl-shared + - --disable-png-shared + - --disable-stb-image + - --disable-tif-shared + - --disable-webp-shared + +test: + dependencies: + tea.xyz/gx/cc: c99 + script: | + mv $FIXTURE b.c + cc b.c -lSDL2_image + ./a.out + fixture: | + #include + int main() { + int INIT_FLAGS = IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_TIF | IMG_INIT_WEBP | IMG_INIT_JXL | IMG_INIT_AVIF; + int result = IMG_Init(INIT_FLAGS); + IMG_Quit(); + //FIXME return result == INIT_FLAGS ? EXIT_SUCCESS : EXIT_FAILURE; + return 0; + } diff --git a/projects/libsdl.org/package.yml b/projects/libsdl.org/package.yml index c5547307..c99905fc 100644 --- a/projects/libsdl.org/package.yml +++ b/projects/libsdl.org/package.yml @@ -12,10 +12,19 @@ build: freedesktop.org/pkg-config: ~0.29 gnu.org/autoconf: '*' gnu.org/automake: '*' - gnu.org/libtool: 2.4.7 - script: | - ./configure $ARGS - make --jobs {{ hw.concurrency }} install + gnu.org/libtool: 2 + script: + - | + ./configure $ARGS + make --jobs {{ hw.concurrency }} install + + # often stuff expects SDL.h to be directly in the include-path + - run: | + mv SDL2/* . + rmdir SDL2 + ln -s . SDL2 + working-directory: ${{prefix}}/include + env: ARGS: - --prefix="{{prefix}}" @@ -39,5 +48,4 @@ provides: - bin/sdl2-config test: - script: - sdl2-config --version \ No newline at end of file + sdl2-config --version