2006-11-30 21:10:34 +11:00
|
|
|
# Description: Cross-platform C++ GUI toolkit for Unix, Windows and Mac OS X.
|
2020-06-01 15:45:48 +00:00
|
|
|
# URL: https://www.fltk.org/
|
2014-11-10 23:28:07 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2019-08-18 16:31:15 +10:00
|
|
|
# Depends on: alsa-lib libjpeg-turbo mesa3d util-linux xorg-libxft xorg-libxinerama
|
2006-11-30 21:10:34 +11:00
|
|
|
|
|
|
|
name=fltk
|
2019-08-18 16:31:15 +10:00
|
|
|
version=1.3.5
|
2018-01-31 22:02:33 +11:00
|
|
|
release=1
|
2019-08-18 16:31:15 +10:00
|
|
|
source=(https://fltk.org/pub/$name/${version%-*}/$name-$version-source.tar.bz2
|
|
|
|
fltk-fix-lib-mess.patch)
|
2006-11-30 21:10:34 +11:00
|
|
|
|
|
|
|
build() {
|
2019-08-18 16:31:15 +10:00
|
|
|
# https://github.com/fltk/fltk/issues/20
|
2020-11-07 16:19:14 +00:00
|
|
|
patch -d $name-$version -p1 -i $SRC/fltk-fix-lib-mess.patch
|
2019-08-18 16:31:15 +10:00
|
|
|
|
2020-11-07 16:19:14 +00:00
|
|
|
cmake -S$name-$version -Bbuild \
|
2019-08-18 16:31:15 +10:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DFLTK_LIBDIR=/usr/lib \
|
2020-11-07 16:19:14 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
|
|
|
|
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
|
|
|
|
-Wno-dev \
|
2019-08-18 16:31:15 +10:00
|
|
|
-DOPTION_CREATE_LINKS=ON \
|
|
|
|
-DOPTION_BUILD_SHARED_LIBS=ON \
|
|
|
|
-DOpenGL_GL_PREFERENCE=GLVND \
|
|
|
|
-DOPTION_BUILD_HTML_DOCUMENTATION=OFF
|
2006-11-30 21:10:34 +11:00
|
|
|
|
2020-11-07 16:19:14 +00:00
|
|
|
cmake --build build
|
|
|
|
DESTDIR=$PKG cmake --install build
|
2016-04-01 16:53:42 +11:00
|
|
|
|
2019-08-18 16:31:15 +10:00
|
|
|
# example apps and integration files, that are not covered by make install
|
|
|
|
for app in {blocks,checkers,sudoku}; do
|
2020-11-07 16:19:14 +00:00
|
|
|
install -D -m 0755 -t "$PKG/usr/bin/" "$SRC/build/bin/examples/$app"
|
2019-08-18 16:31:15 +10:00
|
|
|
|
2020-11-07 16:19:14 +00:00
|
|
|
install -D -m 0644 "$name-$version/test/desktop/$app.desktop" \
|
2019-08-18 16:31:15 +10:00
|
|
|
-t "$PKG/usr/share/applications/"
|
|
|
|
|
2020-11-07 16:19:14 +00:00
|
|
|
install -D -m 0644 "$name-$version/test/desktop/$app-32.png" \
|
2019-08-18 16:31:15 +10:00
|
|
|
"$PKG/usr/share/icons/hicolor/32x32/apps/$app.png"
|
|
|
|
|
2020-11-07 16:19:14 +00:00
|
|
|
install -D -m 0644 "$name-$version/test/desktop/$app-128.png" \
|
2019-08-18 16:31:15 +10:00
|
|
|
"$PKG/usr/share/icons/hicolor/128x128/apps/$app.png"
|
|
|
|
done
|
2016-04-01 16:53:42 +11:00
|
|
|
|
2019-08-18 16:31:15 +10:00
|
|
|
rm $PKG/usr/include/FL/README.Xcode
|
2006-11-30 21:10:34 +11:00
|
|
|
}
|