2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2008-11-09 01:25:14 +00:00
|
|
|
|
2009-04-05 13:00:17 +01:00
|
|
|
PKG := fltk
|
2018-12-08 13:02:00 +00:00
|
|
|
$(PKG)_WEBSITE := https://www.fltk.org/
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_DESCR := FLTK
|
2009-09-20 13:36:46 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2020-05-31 19:37:39 +01:00
|
|
|
$(PKG)_VERSION := 1.3.5
|
|
|
|
$(PKG)_CHECKSUM := 8729b2a055f38c1636ba20f749de0853384c1d3e9d1a6b8d4d1305143e115702
|
2011-04-24 14:46:19 +01:00
|
|
|
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
|
2018-10-17 19:34:34 +01:00
|
|
|
$(PKG)_MAJOR := $(word 1,$(subst -, ,$($(PKG)_VERSION)))
|
2011-06-20 19:27:01 +01:00
|
|
|
$(PKG)_FILE := $($(PKG)_SUBDIR)-source.tar.gz
|
2018-12-08 13:02:00 +00:00
|
|
|
$(PKG)_URL := https://fltk.org/pub/fltk/$($(PKG)_MAJOR)/$($(PKG)_FILE)
|
2017-11-25 13:36:07 +00:00
|
|
|
$(PKG)_DEPS := cc jpeg libpng pthreads zlib
|
2008-11-09 01:25:14 +00:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2018-12-08 13:02:00 +00:00
|
|
|
$(WGET) -q -O- 'https://www.fltk.org/software.php' | \
|
2018-10-17 19:34:34 +01:00
|
|
|
$(SED) -n 's,.*>fltk-\([0-9]\+\([\.\-][0-9]\+\)\+\)-source\.tar\.gz<.*,\1,p' | \
|
2011-04-24 14:46:19 +01:00
|
|
|
grep -v '^1\.1\.' | \
|
2008-11-09 01:25:14 +00:00
|
|
|
head -1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2010-02-16 03:12:53 +00:00
|
|
|
$(SED) -i 's,\$$uname,MINGW,g' '$(1)/configure'
|
2008-11-09 01:25:14 +00:00
|
|
|
cd '$(1)' && ./configure \
|
2014-02-17 05:01:50 +00:00
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2008-11-09 01:25:14 +00:00
|
|
|
--enable-threads \
|
|
|
|
LIBS='-lws2_32'
|
2011-04-24 21:22:50 +01:00
|
|
|
# enable exceptions, because disabling them doesn't make any sense on PCs
|
2010-02-16 03:12:53 +00:00
|
|
|
$(SED) -i 's,-fno-exceptions,,' '$(1)/makeinclude'
|
2009-02-03 20:48:46 +00:00
|
|
|
$(MAKE) -C '$(1)' -j '$(JOBS)' install DIRS=src LIBCOMMAND='$(TARGET)-ar cr'
|
2011-08-15 11:40:35 +01:00
|
|
|
ln -sf '$(PREFIX)/$(TARGET)/bin/fltk-config' '$(PREFIX)/bin/$(TARGET)-fltk-config'
|
2012-03-27 12:29:57 +01:00
|
|
|
|
2011-05-24 13:38:13 +01:00
|
|
|
'$(TARGET)-g++' \
|
|
|
|
-W -Wall -Werror -pedantic -ansi \
|
2016-07-30 20:14:38 +01:00
|
|
|
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-fltk.exe' \
|
2014-02-17 05:01:50 +00:00
|
|
|
`$(TARGET)-fltk-config --cxxflags --ld$(if $(BUILD_STATIC),static)flags`
|
2008-11-09 01:25:14 +00:00
|
|
|
endef
|