aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-11-23 14:40:27 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-23 14:40:27 +0000
commit7478a3262aa8cd98a3cebc7e06beca88fd945f86 (patch)
tree219f2f497be9e9fac6df30c63084889fb18e450b
parent7b9c1bb343522f4d7294803fc3efc7c34d179204 (diff)
downloadalpine_aports-7478a3262aa8cd98a3cebc7e06beca88fd945f86.tar.bz2
alpine_aports-7478a3262aa8cd98a3cebc7e06beca88fd945f86.tar.xz
alpine_aports-7478a3262aa8cd98a3cebc7e06beca88fd945f86.zip
community/irrlicht: fix building with system libs
-rw-r--r--community/irrlicht/APKBUILD22
-rw-r--r--community/irrlicht/irrlicht-1.8-optflags.patch75
2 files changed, 92 insertions, 5 deletions
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 @@
2# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org> 2# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org>
3pkgname=irrlicht 3pkgname=irrlicht
4pkgver=1.8.4 4pkgver=1.8.4
5pkgrel=0 5pkgrel=1
6pkgdesc="High performance realtime 3D engine written in C++" 6pkgdesc="High performance realtime 3D engine written in C++"
7url="http://irrlicht.sourceforge.net" 7url="http://irrlicht.sourceforge.net"
8arch="all" 8arch="all"
9license="ZLIB" 9license="ZLIB"
10depends="" 10depends=""
11makedepends="mesa-dev jpeg-dev bzip2 libpng-dev zlib-dev" 11makedepends="mesa-dev libjpeg-turbo-dev bzip2 libpng-dev zlib-dev bzip2-dev"
12subpackages="$pkgname-dev $pkgname-doc" 12subpackages="$pkgname-dev $pkgname-doc"
13source="http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip 13source="http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip
14 irrlicht-1.8.3-mesa-10.x.patch 14 irrlicht-1.8.3-mesa-10.x.patch
15 irrlicht-1.8.3-config.patch
16 irrlicht-1.8.3-sysctl.patch 15 irrlicht-1.8.3-sysctl.patch
16 irrlicht-1.8-optflags.patch
17 " 17 "
18 18
19#irrlicht-1.8.3-config.patch
19builddir="$srcdir"/$pkgname-$pkgver/ 20builddir="$srcdir"/$pkgname-$pkgver/
21prepare() {
22 default_prepare
23 cd "$builddir"
24 # use system libs
25 rm -r \
26 source/Irrlicht/jpeglib \
27 source/Irrlicht/libpng \
28 source/Irrlicht/zlib \
29 source/Irrlicht/bzip2
30}
31
20build() { 32build() {
21 cd "$builddir"/source/Irrlicht/ 33 cd "$builddir"/source/Irrlicht/
22 export CXXFLAGS="$CXXFLAGS -std=gnu++98" 34 export CXXFLAGS="$CXXFLAGS -std=gnu++98"
@@ -49,5 +61,5 @@ package() {
49 61
50sha512sums="de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1 irrlicht-1.8.4.zip 62sha512sums="de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1 irrlicht-1.8.4.zip
5144c16419c07597ba6d06d66057fbe2ab86e7b02b5dcdf458678b4ea87f6f721840da951ae4df59c983e1da83abdbe45f82e44a6a311bd42eb94d93dfd5aa437c irrlicht-1.8.3-mesa-10.x.patch 6344c16419c07597ba6d06d66057fbe2ab86e7b02b5dcdf458678b4ea87f6f721840da951ae4df59c983e1da83abdbe45f82e44a6a311bd42eb94d93dfd5aa437c irrlicht-1.8.3-mesa-10.x.patch
528bb80040b90bc3d4b8d3f9c5c3f39f3cc2d09fef663338e0994788bc1cd9254b9e7465ac2b344d4532a83c2dc27a8bed9ef5bc26824ef91e4e0159f6db2216e1 irrlicht-1.8.3-config.patch 64a25887c46990620271168f3c1ff42e3ff7bd577d5e986803f067942b7f43d63428ebbbf29d3956765b3199da731b151a39d3ee6b8e5bdab189710ef8fb9595e5 irrlicht-1.8.3-sysctl.patch
53a25887c46990620271168f3c1ff42e3ff7bd577d5e986803f067942b7f43d63428ebbbf29d3956765b3199da731b151a39d3ee6b8e5bdab189710ef8fb9595e5 irrlicht-1.8.3-sysctl.patch" 6591d34f4a40301c4d24899e300c11e5dfbe04878ca6caf0fbceca907c9a45f71c79bd2b6f9ed9cfd996406c498dd2e47fb50b23eca929f22334c2bbd5426ce65c 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 @@
1diff -up irrlicht-1.8/include/IrrCompileConfig.h.optflags irrlicht-1.8/include/IrrCompileConfig.h
2--- irrlicht-1.8/include/IrrCompileConfig.h.optflags 2012-11-05 15:14:14.000000000 -0500
3+++ irrlicht-1.8/include/IrrCompileConfig.h 2012-11-13 12:45:47.316780394 -0500
4@@ -245,7 +245,7 @@ the engine will no longer read .jpeg ima
5 //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
6 /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
7 This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
8-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
9+// #define _IRR_USE_NON_SYSTEM_JPEG_LIB_
10 #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
11 #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
12 #endif
13@@ -261,7 +261,7 @@ the engine will no longer read .png imag
14 //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
15 /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
16 This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
17-#define _IRR_USE_NON_SYSTEM_LIB_PNG_
18+// #define _IRR_USE_NON_SYSTEM_LIB_PNG_
19 #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_
20 #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
21 #endif
22@@ -598,7 +598,7 @@ ones. */
23 /** If this is commented out, Irrlicht will try to compile using the zlib
24 installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
25 defined. */
26-#define _IRR_USE_NON_SYSTEM_ZLIB_
27+// #define _IRR_USE_NON_SYSTEM_ZLIB_
28 #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_
29 #undef _IRR_USE_NON_SYSTEM_ZLIB_
30 #endif
31@@ -619,7 +619,7 @@ library. */
32 /** If this is commented out, Irrlicht will try to compile using the bzlib
33 installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is
34 defined. */
35-#define _IRR_USE_NON_SYSTEM_BZLIB_
36+// #define _IRR_USE_NON_SYSTEM_BZLIB_
37 #ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_
38 #undef _IRR_USE_NON_SYSTEM_BZLIB_
39 #endif
40diff -up irrlicht-1.8/source/Irrlicht/Makefile.optflags irrlicht-1.8/source/Irrlicht/Makefile
41--- irrlicht-1.8/source/Irrlicht/Makefile.optflags 2012-11-05 15:14:12.000000000 -0500
42+++ irrlicht-1.8/source/Irrlicht/Makefile 2012-11-13 12:46:35.660811963 -0500
43@@ -56,18 +56,17 @@ BZIP2OBJ = bzip2/blocksort.o bzip2/huffm
44 EXTRAOBJ =
45 LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
46 $(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
47- $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \
48- $(BZIP2OBJ) $(EXTRAOBJ)
49+ $(IRRGUIOBJ) $(EXTRAOBJ)
50
51 ###############
52 #Compiler flags
53-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
54-CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
55-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
56+CXXINCS = -I../../include `libpng-config --cflags`
57+CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 $(RPM_OPT_FLAGS)
58+CXXFLAGS += $(RPM_OPT_FLAGS) -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
59 ifndef NDEBUG
60 CXXFLAGS += -g -D_DEBUG
61 else
62-CXXFLAGS += -fexpensive-optimizations -O3
63+CXXFLAGS += -fexpensive-optimizations -O3 $(RPM_OPT_FLAGS)
64 endif
65 ifdef PROFILE
66 CXXFLAGS += -pg
67@@ -88,7 +87,7 @@ STATIC_LIB = libIrrlicht.a
68 LIB_PATH = ../../lib/$(SYSTEM)
69 INSTALL_DIR = /usr/local/lib
70 sharedlib install: SHARED_LIB = libIrrlicht.so
71-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
72+sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg `libpng-config --libs` -lbz2
73 staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
74
75 #OSX specific options