From 7478a3262aa8cd98a3cebc7e06beca88fd945f86 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 23 Nov 2017 14:40:27 +0000 Subject: community/irrlicht: fix building with system libs --- community/irrlicht/APKBUILD | 22 ++++++-- community/irrlicht/irrlicht-1.8-optflags.patch | 75 ++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 community/irrlicht/irrlicht-1.8-optflags.patch (limited to 'community/irrlicht') diff --git a/community/irrlicht/APKBUILD b/community/irrlicht/APKBUILD index 29f2f5d348..6807499061 100644 --- a/community/irrlicht/APKBUILD +++ b/community/irrlicht/APKBUILD @@ -2,21 +2,33 @@ # Maintainer: Jeff Bilyk pkgname=irrlicht pkgver=1.8.4 -pkgrel=0 +pkgrel=1 pkgdesc="High performance realtime 3D engine written in C++" url="http://irrlicht.sourceforge.net" arch="all" license="ZLIB" depends="" -makedepends="mesa-dev jpeg-dev bzip2 libpng-dev zlib-dev" +makedepends="mesa-dev libjpeg-turbo-dev bzip2 libpng-dev zlib-dev bzip2-dev" subpackages="$pkgname-dev $pkgname-doc" source="http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip irrlicht-1.8.3-mesa-10.x.patch - irrlicht-1.8.3-config.patch irrlicht-1.8.3-sysctl.patch + irrlicht-1.8-optflags.patch " +#irrlicht-1.8.3-config.patch builddir="$srcdir"/$pkgname-$pkgver/ +prepare() { + default_prepare + cd "$builddir" + # use system libs + rm -r \ + source/Irrlicht/jpeglib \ + source/Irrlicht/libpng \ + source/Irrlicht/zlib \ + source/Irrlicht/bzip2 +} + build() { cd "$builddir"/source/Irrlicht/ export CXXFLAGS="$CXXFLAGS -std=gnu++98" @@ -49,5 +61,5 @@ package() { sha512sums="de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1 irrlicht-1.8.4.zip 44c16419c07597ba6d06d66057fbe2ab86e7b02b5dcdf458678b4ea87f6f721840da951ae4df59c983e1da83abdbe45f82e44a6a311bd42eb94d93dfd5aa437c irrlicht-1.8.3-mesa-10.x.patch -8bb80040b90bc3d4b8d3f9c5c3f39f3cc2d09fef663338e0994788bc1cd9254b9e7465ac2b344d4532a83c2dc27a8bed9ef5bc26824ef91e4e0159f6db2216e1 irrlicht-1.8.3-config.patch -a25887c46990620271168f3c1ff42e3ff7bd577d5e986803f067942b7f43d63428ebbbf29d3956765b3199da731b151a39d3ee6b8e5bdab189710ef8fb9595e5 irrlicht-1.8.3-sysctl.patch" +a25887c46990620271168f3c1ff42e3ff7bd577d5e986803f067942b7f43d63428ebbbf29d3956765b3199da731b151a39d3ee6b8e5bdab189710ef8fb9595e5 irrlicht-1.8.3-sysctl.patch +91d34f4a40301c4d24899e300c11e5dfbe04878ca6caf0fbceca907c9a45f71c79bd2b6f9ed9cfd996406c498dd2e47fb50b23eca929f22334c2bbd5426ce65c irrlicht-1.8-optflags.patch" diff --git a/community/irrlicht/irrlicht-1.8-optflags.patch b/community/irrlicht/irrlicht-1.8-optflags.patch new file mode 100644 index 0000000000..07cba6e03c --- /dev/null +++ b/community/irrlicht/irrlicht-1.8-optflags.patch @@ -0,0 +1,75 @@ +diff -up irrlicht-1.8/include/IrrCompileConfig.h.optflags irrlicht-1.8/include/IrrCompileConfig.h +--- irrlicht-1.8/include/IrrCompileConfig.h.optflags 2012-11-05 15:14:14.000000000 -0500 ++++ irrlicht-1.8/include/IrrCompileConfig.h 2012-11-13 12:45:47.316780394 -0500 +@@ -245,7 +245,7 @@ the engine will no longer read .jpeg ima + //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht. + /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system. + This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */ +-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_ ++// #define _IRR_USE_NON_SYSTEM_JPEG_LIB_ + #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ + #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_ + #endif +@@ -261,7 +261,7 @@ the engine will no longer read .png imag + //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht. + /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system. + This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */ +-#define _IRR_USE_NON_SYSTEM_LIB_PNG_ ++// #define _IRR_USE_NON_SYSTEM_LIB_PNG_ + #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_ + #undef _IRR_USE_NON_SYSTEM_LIB_PNG_ + #endif +@@ -598,7 +598,7 @@ ones. */ + /** If this is commented out, Irrlicht will try to compile using the zlib + installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is + defined. */ +-#define _IRR_USE_NON_SYSTEM_ZLIB_ ++// #define _IRR_USE_NON_SYSTEM_ZLIB_ + #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_ + #undef _IRR_USE_NON_SYSTEM_ZLIB_ + #endif +@@ -619,7 +619,7 @@ library. */ + /** If this is commented out, Irrlicht will try to compile using the bzlib + installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is + defined. */ +-#define _IRR_USE_NON_SYSTEM_BZLIB_ ++// #define _IRR_USE_NON_SYSTEM_BZLIB_ + #ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_ + #undef _IRR_USE_NON_SYSTEM_BZLIB_ + #endif +diff -up irrlicht-1.8/source/Irrlicht/Makefile.optflags irrlicht-1.8/source/Irrlicht/Makefile +--- irrlicht-1.8/source/Irrlicht/Makefile.optflags 2012-11-05 15:14:12.000000000 -0500 ++++ irrlicht-1.8/source/Irrlicht/Makefile 2012-11-13 12:46:35.660811963 -0500 +@@ -56,18 +56,17 @@ BZIP2OBJ = bzip2/blocksort.o bzip2/huffm + EXTRAOBJ = + LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \ + $(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \ +- $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \ +- $(BZIP2OBJ) $(EXTRAOBJ) ++ $(IRRGUIOBJ) $(EXTRAOBJ) + + ############### + #Compiler flags +-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng +-CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 +-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing ++CXXINCS = -I../../include `libpng-config --cflags` ++CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 $(RPM_OPT_FLAGS) ++CXXFLAGS += $(RPM_OPT_FLAGS) -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing + ifndef NDEBUG + CXXFLAGS += -g -D_DEBUG + else +-CXXFLAGS += -fexpensive-optimizations -O3 ++CXXFLAGS += -fexpensive-optimizations -O3 $(RPM_OPT_FLAGS) + endif + ifdef PROFILE + CXXFLAGS += -pg +@@ -88,7 +87,7 @@ STATIC_LIB = libIrrlicht.a + LIB_PATH = ../../lib/$(SYSTEM) + INSTALL_DIR = /usr/local/lib + sharedlib install: SHARED_LIB = libIrrlicht.so +-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm ++sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg `libpng-config --libs` -lbz2 + staticlib sharedlib: CXXINCS += -I/usr/X11R6/include + + #OSX specific options -- cgit v1.2.3