@@ -14,39 +14,39 @@ yum -y install gcc gcc-c++ autoconf openssl-devel libffi libffi-devel zlib-devel
1414 libxkbcommon-devel libXrandr libXrandr-devel libssh2 libs3 \
1515 extra-cmake-modules
1616
17- yum install -y fontconfig-devel freetype-devel libjpeg-turbo-devel libpng-devel \
17+ yum install -y fontconfig-devel libjpeg-turbo-devel libpng-devel \
1818 libuuid-devel librsvg2-devel \
1919 libX11-devel mesa-libEGL-devel mesa-libGLES-devel \
2020 wayland-devel wayland-protocols-devel \
2121 harfbuzz brotli-devel
2222
2323# GLFW
24- # if [[ "$BUILD_GLFW" == "1" ]]; then
25- curl -L -o glfw-3.4.zip https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip
26- unzip glfw-3.4.zip > /dev/null 2>&1
27- cd glfw-3.4
28- # https://github.com/glfw/glfw/issues/1988
29- sed -i ' 1i #define _POSIX_C_SOURCE 199309L' /project/glfw-3.4/src/posix_time.c
30- sed -i ' 1i #define _GNU_SOURCE' /project/glfw-3.4/src/posix_time.c
31-
32- sed -i ' 1i #define _POSIX_C_SOURCE 199309L' /project/glfw-3.4/src/wl_init.c
33- sed -i ' 1i #define _GNU_SOURCE' /project/glfw-3.4/src/wl_init.c
34-
35- # https://github.com/FlorianRhiem/pyGLFW/blob/master/Willy-JL-glfw-3.4.0-patch.diff
36- sed -i ' /^#include <linux\/input-event-codes.h>/d' /project/glfw-3.4/src/wl_window.c
37- sed -i ' 1i #define _XOPEN_SOURCE 700' /project/glfw-3.4/src/linux_joystick.c
38- sed -i ' 1i #define _GNU_SOURCE' /project/glfw-3.4/src/linux_joystick.c
39-
40- cmake -S . -B build && cd build && make
41- cp ./src/libglfw3.a /usr/local/lib && cp ./src/libglfw3.a /usr/local/lib/libglfw.a
42- cd ../ && ls
43- cp -rf include/GLFW /usr/local/include
44- ls /usr/local/include/
45- ls /usr/local/include/GLFW/
46- cd ../
47- # else
48- # yum install -y glfw-devel
49- # fi
24+ if [[ " $BUILD_GLFW " == " 1" ]]; then
25+ curl -L -o glfw-3.4.zip https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip
26+ unzip glfw-3.4.zip > /dev/null 2>&1
27+ cd glfw-3.4
28+ # https://github.com/glfw/glfw/issues/1988
29+ sed -i ' 1i #define _POSIX_C_SOURCE 199309L' /project/glfw-3.4/src/posix_time.c
30+ sed -i ' 1i #define _GNU_SOURCE' /project/glfw-3.4/src/posix_time.c
31+
32+ sed -i ' 1i #define _POSIX_C_SOURCE 199309L' /project/glfw-3.4/src/wl_init.c
33+ sed -i ' 1i #define _GNU_SOURCE' /project/glfw-3.4/src/wl_init.c
34+
35+ # https://github.com/FlorianRhiem/pyGLFW/blob/master/Willy-JL-glfw-3.4.0-patch.diff
36+ sed -i ' /^#include <linux\/input-event-codes.h>/d' /project/glfw-3.4/src/wl_window.c
37+ sed -i ' 1i #define _XOPEN_SOURCE 700' /project/glfw-3.4/src/linux_joystick.c
38+ sed -i ' 1i #define _GNU_SOURCE' /project/glfw-3.4/src/linux_joystick.c
39+
40+ cmake -S . -B build && cd build && make
41+ cp ./src/libglfw3.a /usr/local/lib && cp ./src/libglfw3.a /usr/local/lib/libglfw.a
42+ cd ../ && ls
43+ cp -rf include/GLFW /usr/local/include
44+ ls /usr/local/include/
45+ ls /usr/local/include/GLFW/
46+ cd ../
47+ else
48+ yum install -y glfw-devel
49+ fi
5050
5151# libdeflate
5252pwd
@@ -68,7 +68,11 @@ cd ../
6868
6969# freetype - build both static and shared
7070if [ -n " $BUILD_FREETYPE " ]; then
71- pwd
71+
72+ echo " Removing system FreeType packages..."
73+ yum remove -y freetype freetype-devel || true
74+ rm -f /usr/lib64/libfreetype.so* /lib64/libfreetype.so* || true
75+
7276 curl -L -o freetype.tar.xz https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz
7377 ls -lh
7478 tar -xvf freetype.tar.xz > /dev/null 2>&1 && rm freetype.tar.xz
@@ -86,6 +90,8 @@ if [ -n "$BUILD_FREETYPE" ]; then
8690 cp /usr/local/lib/libfreetype.a /usr/local/lib/
8791
8892 cd ../
93+ else
94+ yum install -y freetype-devel
8995fi
9096
9197pwd
0 commit comments