# Description: Cross-platform C++ GUI toolkit for Unix, Windows and Mac OS X. # URL: https://www.fltk.org/ # Maintainer: Danny Rawlins, crux at romster dot me # Depends on: alsa-lib libjpeg-turbo mesa3d util-linux xorg-libxft xorg-libxinerama name=fltk version=1.3.5 release=1 source=(https://fltk.org/pub/$name/${version%-*}/$name-$version-source.tar.bz2 fltk-fix-lib-mess.patch) build() { # https://github.com/fltk/fltk/issues/20 patch -d $name-$version -p1 -i $SRC/fltk-fix-lib-mess.patch # fltk currently has a problem with ninja that I don't want to investigate right now #[[ -e /usr/bin/ninja ]] && PKGMK_FLTK+=' -G Ninja' cmake -S $name-$version -B build $PKGMK_FLTK \ -D CMAKE_INSTALL_PREFIX=/usr \ -D FLTK_LIBDIR=/usr/lib \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \ -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \ -D OPTION_CREATE_LINKS=ON \ -D OPTION_BUILD_SHARED_LIBS=ON \ -D OpenGL_GL_PREFERENCE=GLVND \ -D OPTION_BUILD_HTML_DOCUMENTATION=OFF \ -Wno-dev cmake --build build DESTDIR=$PKG cmake --install build # example apps and integration files, that are not covered by make install for app in {blocks,checkers,sudoku}; do install -D -m 0755 -t "$PKG/usr/bin/" "$SRC/build/bin/examples/$app" install -D -m 0644 "$name-$version/test/desktop/$app.desktop" \ -t "$PKG/usr/share/applications/" install -D -m 0644 "$name-$version/test/desktop/$app-32.png" \ "$PKG/usr/share/icons/hicolor/32x32/apps/$app.png" install -D -m 0644 "$name-$version/test/desktop/$app-128.png" \ "$PKG/usr/share/icons/hicolor/128x128/apps/$app.png" done rm $PKG/usr/include/FL/README.Xcode }