2022-02-05 14:23:32 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2022-09-13 14:00:07 +00:00
|
|
|
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
PKG_NAME="glfw"
|
2022-09-13 14:00:07 +00:00
|
|
|
PKG_VERSION="6b57e08bb0078c9834889eab871bac2368198c15"
|
2022-09-13 14:28:32 +00:00
|
|
|
PKG_ARCH="any"
|
2022-09-13 14:00:07 +00:00
|
|
|
PKG_LICENSE="zlib"
|
2022-09-16 16:40:56 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain expat libdrm libxkbcommon libXrandr libXinerama libXcursor libXi Mako:host "
|
2022-09-13 14:00:07 +00:00
|
|
|
PKG_SITE="https://github.com/glfw/glfw"
|
|
|
|
PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz"
|
|
|
|
PKG_SHORTDESC="GLFW graphics library for wayland & x11"
|
|
|
|
PKG_TOOLCHAIN="cmake"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2022-09-13 14:00:07 +00:00
|
|
|
pre_configure_target() {
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_SHARED_LIBS=ON \
|
|
|
|
-DGLFW_BUILD_DOCS=OFF \
|
|
|
|
-DGLFW_BUILD_EXAMPLES=OFF \
|
|
|
|
-DGLFW_BUILD_TESTS=OFF \
|
|
|
|
-DGLFW_INSTALL=OFF"
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
|
|
|
PKG_DEPENDS_TARGET+=" xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr libglvnd"
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DGLFW_BUILD_X11=ON"
|
2022-02-05 14:23:32 +00:00
|
|
|
fi
|
|
|
|
|
2022-09-13 14:00:07 +00:00
|
|
|
if [ "${DISPLAYSERVER}" = "wl" ]; then
|
|
|
|
PKG_DEPENDS_TARGET+=" wayland wayland-protocols libglvnd"
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DGLFW_BUILD_WAYLAND=ON"
|
|
|
|
fi
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2022-09-13 14:28:32 +00:00
|
|
|
case ${ARCH} in
|
|
|
|
arm)
|
|
|
|
PKG_CMAKE_OPTS_TARGET+=" -DGLFW_BUILD_X11=OFF"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
makeinstall_target() {
|
2022-09-13 14:00:07 +00:00
|
|
|
mkdir -p $INSTALL/usr/lib/
|
|
|
|
cp $PKG_BUILD/.$TARGET_NAME/src/libglfw* $INSTALL/usr/lib/
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|