summaryrefslogtreecommitdiff
path: root/fltk/Pkgfile
blob: 937e84086f5869bfe7ef27eb43141d5115711284 (plain)
    1 # Description: Cross-platform C++ GUI toolkit for Unix, Windows and Mac OS X.
    2 # URL: https://www.fltk.org/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Depends on: alsa-lib libjpeg-turbo mesa3d util-linux xorg-libxft xorg-libxinerama
    5 
    6 name=fltk
    7 version=1.3.5
    8 release=1
    9 source=(https://fltk.org/pub/$name/${version%-*}/$name-$version-source.tar.bz2
   10 	fltk-fix-lib-mess.patch)
   11 
   12 build() {
   13 	# https://github.com/fltk/fltk/issues/20
   14 	patch -d $name-$version -p1 -i $SRC/fltk-fix-lib-mess.patch
   15 
   16 	# fltk currently has a problem with ninja that I don't want to investigate right now
   17 	#[[ -e /usr/bin/ninja ]] && PKGMK_FLTK+=' -G Ninja'
   18 	cmake -S $name-$version -B build $PKGMK_FLTK \
   19 		-D CMAKE_INSTALL_PREFIX=/usr \
   20 		-D FLTK_LIBDIR=/usr/lib \
   21 		-D CMAKE_BUILD_TYPE=Release \
   22 		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
   23 		-D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
   24 		-D OPTION_CREATE_LINKS=ON \
   25 		-D OPTION_BUILD_SHARED_LIBS=ON \
   26 		-D OpenGL_GL_PREFERENCE=GLVND \
   27 		-D OPTION_BUILD_HTML_DOCUMENTATION=OFF \
   28 		-Wno-dev
   29 
   30 	cmake --build build
   31 	DESTDIR=$PKG cmake --install build
   32 
   33 	# example apps and integration files, that are not covered by make install
   34 	for app in {blocks,checkers,sudoku}; do
   35 		install -D -m 0755 -t "$PKG/usr/bin/" "$SRC/build/bin/examples/$app"
   36 
   37 		install -D -m 0644 "$name-$version/test/desktop/$app.desktop" \
   38 			-t "$PKG/usr/share/applications/"
   39 
   40 		install -D -m 0644 "$name-$version/test/desktop/$app-32.png" \
   41 			"$PKG/usr/share/icons/hicolor/32x32/apps/$app.png"
   42 
   43 		install -D -m 0644 "$name-$version/test/desktop/$app-128.png" \
   44 			"$PKG/usr/share/icons/hicolor/128x128/apps/$app.png"
   45 	done
   46 
   47 	rm $PKG/usr/include/FL/README.Xcode
   48 }

Generated by cgit