F: package/enlightenment/
F: package/expedite/
F: package/iqvlinux/
+F: package/irrlicht/
F: package/liblinear/
F: package/lensfun/
F: package/libspatialindex/
source "package/gtksourceview/Config.in"
source "package/harfbuzz/Config.in"
source "package/ijs/Config.in"
+ source "package/irrlicht/Config.in"
source "package/imlib2/Config.in"
source "package/jasper/Config.in"
source "package/jpeg/Config.in"
--- /dev/null
+From 5c5e6d0f469c8b4384bbe5d6c8f78069c182daf0 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sun, 9 Apr 2017 19:56:55 +0200
+Subject: [PATCH] override CPPFLAGS, CXXFLAGS and CFLAGS in Makefile
+
+When CPPFLAGS is passed on the command line, include paths for the
+bundled libraries are lost. Since the hand written Makefile want
+to use them unconditionally, we need to use the key word "override"
+before CPPFLAGS.
+
+Do the same for CXXFLAGS and CFLAGS otherwise -fPIC is lost.
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ source/Irrlicht/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile
+index 0712b07..b334e9c 100644
+--- a/source/Irrlicht/Makefile
++++ b/source/Irrlicht/Makefile
+@@ -62,7 +62,7 @@ LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
+ ###############
+ #Compiler flags
+ CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
+-CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
++override CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
+ CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
+ ifndef NDEBUG
+ CXXFLAGS += -g -D_DEBUG
+@@ -74,8 +74,8 @@ CXXFLAGS += -pg
+ endif
+ CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
+
+-sharedlib sharedlib_osx: CXXFLAGS += -fPIC
+-sharedlib sharedlib_osx: CFLAGS += -fPIC
++sharedlib sharedlib_osx: override CXXFLAGS += -fPIC
++sharedlib sharedlib_osx: override CFLAGS += -fPIC
+
+ #multilib handling
+ ifeq ($(HOSTTYPE), x86_64)
+--
+2.9.3
+
--- /dev/null
+From 5382142d37730f6758753b758c91e257ffd5892c Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sun, 9 Apr 2017 22:20:19 +0200
+Subject: [PATCH] remove sys/sysctl.h
+
+With musl irrlicht doesn't build due to missing sys/sysctl.h
+
+fatal error: sys/sysctl.h: No such file or directory
+
+From [1]
+"sysctl does not work, and NEVER worked. using it is bogus.
+it was a bogus experimental syscall that was deprecated before
+it was ever used (basically, a broken binary version of
+/proc/sys, without any stability between kernel versions for
+what the binary constants meant)."
+
+[1] https://devsonacid.wordpress.com/tag/musl/
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ source/Irrlicht/COSOperator.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/source/Irrlicht/COSOperator.cpp b/source/Irrlicht/COSOperator.cpp
+index 0899d1d..ccf5ef5 100644
+--- a/source/Irrlicht/COSOperator.cpp
++++ b/source/Irrlicht/COSOperator.cpp
+@@ -13,7 +13,6 @@
+ #include <unistd.h>
+ #ifndef _IRR_SOLARIS_PLATFORM_
+ #include <sys/types.h>
+-#include <sys/sysctl.h>
+ #endif
+ #endif
+
+--
+2.9.3
+
--- /dev/null
+config BR2_PACKAGE_IRRLICHT
+ bool "irrlicht"
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_PACKAGE_XORG7
+ depends on BR2_PACKAGE_HAS_LIBGL # use GLX
+ select BR2_PACKAGE_XLIB_LIBXXF86VM # libXxf86vm
+ help
+ An open source high performance realtime 3D graphics engine.
+
+ http://irrlicht.sourceforge.net/
+
+comment "irrlicht needs a toolchain w/ C++"
+ depends on !BR2_INSTALL_LIBSTDCPP
+
+comment "irrlicht needs X11 and an OpenGL provider"
+ depends on !BR2_PACKAGE_HAS_LIBGL || !BR2_PACKAGE_XORG7
+ depends on BR2_INSTALL_LIBSTDCPP
--- /dev/null
+# From https://sourceforge.net/projects/irrlicht/files/Irrlicht%20SDK/1.8/1.8.4
+md5 9401cfff801395010b0912211f3cbb4f irrlicht-1.8.4.zip
+sha1 38bf0223fe868d243d6a39d0dc191c8df6e03b3b irrlicht-1.8.4.zip
+# locally calculated
+sha256 f42b280bc608e545b820206fe2a999c55f290de5c7509a02bdbeeccc1bf9e433 irrlicht-1.8.4.zip
--- /dev/null
+################################################################################
+#
+# irrlicht
+#
+################################################################################
+
+IRRLICHT_VERSION_MAJOR = 1.8
+IRRLICHT_VERSION = $(IRRLICHT_VERSION_MAJOR).4
+IRRLICHT_SOURCE = irrlicht-$(IRRLICHT_VERSION).zip
+IRRLICHT_SITE = https://downloads.sourceforge.net/project/irrlicht/Irrlicht%20SDK/$(IRRLICHT_VERSION_MAJOR)/$(IRRLICHT_VERSION)
+IRRLICHT_INSTALL_STAGING = YES
+
+# Bundled libraries: bzip2, libaesGladman, libpng, lzma, zlib,
+# The handcrafted Makefile can only use bundled libraries.
+IRRLICHT_LICENSE = Zlib (irrlicht), BSD-3-Clause (libaesGladman), bzip2-1.0.5 (bzip2), IJG (libjpeg), Libpng (libpng)
+IRRLICHT_LICENSE_FILES = \
+ doc/aesGladman.txt \
+ doc/bzip2-license.txt \
+ doc/irrlicht-license.txt \
+ doc/jpglib-license.txt \
+ doc/libpng-license.txt
+
+IRRLICHT_SUBDIR = source/Irrlicht
+
+IRRLICHT_DEPENDENCIES = libgl xlib_libXxf86vm
+
+define IRRLICHT_EXTRACT_CMDS
+ $(UNZIP) -d $(@D) $(DL_DIR)/$(IRRLICHT_SOURCE)
+ mv $(@D)/irrlicht-$(IRRLICHT_VERSION)/* $(@D)
+ $(RM) -r $(@D)/irrlicht-$(IRRLICHT_VERSION)
+endef
+
+IRRLICHT_CONF_OPTS = $(TARGET_CONFIGURE_OPTS)
+
+# Build a static library OR a shared library, otherwise we need to compile with -fPIC
+# "relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC"
+ifeq ($(BR2_STATIC_LIBS),)
+IRRLICHT_CONF_OPTS += sharedlib
+endif
+
+define IRRLICHT_BUILD_CMDS
+ $(TARGET_MAKE_ENV)
+ $(MAKE) -C $(@D)/$(IRRLICHT_SUBDIR) $(IRRLICHT_CONF_OPTS)
+endef
+
+define IRRLICHT_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) \
+ INSTALL_DIR=$(STAGING_DIR)/usr/lib \
+ -C $(@D)/$(IRRLICHT_SUBDIR) install
+endef
+
+define IRRLICHT_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) \
+ INSTALL_DIR=$(TARGET_DIR)/usr/lib \
+ -C $(@D)/$(IRRLICHT_SUBDIR) install
+endef
+
+$(eval $(generic-package))