gource + its deps (#1706)

* gource + its deps

Closes #590
Closes #562

* finish glew

* wip

* wip

* wip

* wip

* wip

* wip

* picpicpicpicpicpicpicpic

* wip

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
Max Howell 2023-05-23 00:04:40 -04:00 committed by GitHub
parent 2e66829458
commit 0b6fa9fea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 211 additions and 6 deletions

View file

@ -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:"

View file

@ -0,0 +1,6 @@
prefix=${pcfiledir}/../..
includedir=${prefix}/include
Name: GLM
Description: OpenGL Mathematics
Cflags: -I${includedir}

View file

@ -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.hpp>// 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

View file

@ -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

View file

@ -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 <SDL2/SDL_image.h>
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;
}

View file

@ -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
sdl2-config --version