Skip to content
This repository
Browse code

[ios] fixed buildside texturepacker for ios

  • Loading branch information...
commit 054a22726878475e9213e5ac47f36fed177b24ca 1 parent d248283
authored October 08, 2012
9  configure.in
@@ -589,13 +589,7 @@ case $host in
589 589
      use_dvdcss=no
590 590
      use_gles=yes
591 591
      use_cpu=cortex-a8
592  
-     check_sdl_arch=[`file /opt/local/lib/libSDL_image.dylib | awk '{V=7; print $V}'`]
593  
-     if test "x$check_sdl_arch" = "xi386"; then
594  
-       use_texturepacker_native=yes
595  
-       USE_TEXTUREPACKER_NATIVE_ROOT="/opt/local"
596  
-     else
597  
-       use_texturepacker=no
598  
-     fi
  592
+     use_texturepacker_native=yes
599 593
      ARCH="arm-osx"
600 594
      use_arch="arm"
601 595
      PYTHON_VERSION="2.6"
@@ -609,7 +603,6 @@ case $host in
609 603
      use_joystick=no
610 604
      use_vtbdecoder=no
611 605
      use_texturepacker_native=yes
612  
-     USE_TEXTUREPACKER_NATIVE_ROOT="$prefix"
613 606
      ARCH="x86-osx"
614 607
      AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
615 608
      ;;
3  tools/darwin/depends/Makefile.in
... ...
@@ -1,6 +1,9 @@
1 1
 include Makefile.include
2 2
 
3 3
 BUILDTOOLS = gas-preprocessor help2man m4 autoconf automake libtool pkg-config yasm cmake sed tar dpkg swig
  4
+ifeq ($(DARWIN), ios)
  5
+BUILDTOOLS+= liblzo2-native libjpeg-turbo-native libpng-native libtiff-native libsdl-native libsdl_image-native
  6
+endif
4 7
 
5 8
 SUBDIRS := \
6 9
 	Backrow pcre expat gettext readline sqlite3 \
46  tools/darwin/depends/libjpeg-turbo-native/Makefile
... ...
@@ -0,0 +1,46 @@
  1
+include ../Makefile.buildtools
  2
+export NASM=$(TOOLCHAIN)/bin/yasm
  3
+export CFLAGS=-I$(TOOLCHAIN)/include -fexceptions
  4
+export LDFLAGS=-L$(TOOLCHAIN)/lib
  5
+export CPPFLAGS=-I$(TOOLCHAIN)/include
  6
+export CXXFLAGS=-I$(TOOLCHAIN)/include
  7
+
  8
+# lib name, version
  9
+LIBNAME=libjpeg-turbo
  10
+VERSION=1.2.0
  11
+SOURCE=$(LIBNAME)-$(VERSION)
  12
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
  13
+
  14
+# configuration settings
  15
+CONFIGURE=./configure --prefix=$(TOOLCHAIN) \
  16
+  --with-jpeg8
  17
+
  18
+LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib
  19
+
  20
+CLEAN_FILES=$(ARCHIVE) $(SOURCE)
  21
+
  22
+all: $(LIBDYLIB) .installed
  23
+
  24
+$(TARBALLS_LOCATION)/$(ARCHIVE):
  25
+	$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
  26
+
  27
+$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
  28
+	rm -rf $(SOURCE)
  29
+	$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
  30
+	echo $(SOURCE) > .gitignore
  31
+	cd $(SOURCE); autoreconf -vif
  32
+	cd $(SOURCE); $(CONFIGURE)
  33
+
  34
+$(LIBDYLIB): $(SOURCE)
  35
+	make -j 1 -C $(SOURCE)
  36
+
  37
+.installed:
  38
+	make -C $(SOURCE) install
  39
+	touch $@
  40
+
  41
+clean:
  42
+	make -C $(SOURCE) clean
  43
+	rm -f .installed
  44
+
  45
+distclean::
  46
+	rm -rf $(SOURCE) .installed
42  tools/darwin/depends/liblzo2-native/Makefile
... ...
@@ -0,0 +1,42 @@
  1
+include ../Makefile.buildtools
  2
+export CFLAGS=-I$(TOOLCHAIN)/include
  3
+export LDFLAGS=-L$(TOOLCHAIN)/lib
  4
+export CPPFLAGS=-I$(TOOLCHAIN)/include
  5
+export CXXFLAGS=-I$(TOOLCHAIN)/include
  6
+
  7
+# lib name, version
  8
+LIBNAME=lzo
  9
+VERSION=2.06
  10
+SOURCE=$(LIBNAME)-$(VERSION)
  11
+ARCHIVE=$(SOURCE).tar.gz
  12
+
  13
+# configuration settings
  14
+CONFIGURE=./configure --prefix=$(TOOLCHAIN) \
  15
+  --enable-shared=yes
  16
+
  17
+LIBDYLIB=$(SOURCE)/src/.libs/lib$(LIBNAME)2.dylib
  18
+
  19
+all: $(LIBDYLIB) .installed
  20
+
  21
+$(TARBALLS_LOCATION)/$(ARCHIVE):
  22
+	$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
  23
+
  24
+$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
  25
+	rm -rf $(SOURCE)
  26
+	$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
  27
+	echo $(SOURCE) > .gitignore
  28
+	cd $(SOURCE); $(CONFIGURE)
  29
+
  30
+$(LIBDYLIB): $(SOURCE)
  31
+	make -j $(MAKE_JOBS) -C $(SOURCE)
  32
+
  33
+.installed:
  34
+	make -C $(SOURCE) install
  35
+	touch $@
  36
+
  37
+clean:
  38
+	make -C $(SOURCE) clean
  39
+	rm -f .installed
  40
+
  41
+distclean::
  42
+	rm -rf $(SOURCE) .installed
41  tools/darwin/depends/libpng-native/Makefile
... ...
@@ -0,0 +1,41 @@
  1
+include ../Makefile.buildtools
  2
+export CFLAGS=-I$(TOOLCHAIN)/include
  3
+export LDFLAGS=-L$(TOOLCHAIN)/lib
  4
+export CPPFLAGS=-I$(TOOLCHAIN)/include
  5
+export CXXFLAGS=-I$(TOOLCHAIN)/include
  6
+
  7
+# lib name, version
  8
+LIBNAME=libpng
  9
+VERSION=1.2.38
  10
+SOURCE=$(LIBNAME)-$(VERSION)
  11
+ARCHIVE=$(SOURCE).tar.gz
  12
+
  13
+# configuration settings
  14
+CONFIGURE=./configure --prefix=$(TOOLCHAIN)
  15
+
  16
+LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib
  17
+
  18
+all: $(LIBDYLIB) .installed
  19
+
  20
+$(TARBALLS_LOCATION)/$(ARCHIVE):
  21
+	$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
  22
+
  23
+$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
  24
+	rm -rf $(SOURCE)
  25
+	$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
  26
+	echo $(SOURCE) > .gitignore
  27
+	cd $(SOURCE); $(CONFIGURE)
  28
+
  29
+$(LIBDYLIB): $(SOURCE)
  30
+	make -j $(MAKE_JOBS) -C $(SOURCE)
  31
+
  32
+.installed:
  33
+	make -C $(SOURCE) install
  34
+	touch $@
  35
+
  36
+clean:
  37
+	make -C $(SOURCE) clean
  38
+	rm -f .installed
  39
+
  40
+distclean::
  41
+	rm -rf $(SOURCE) .installed
33  tools/darwin/depends/libsdl-native/01-SDL_SetWidthHeight.patch
... ...
@@ -0,0 +1,33 @@
  1
+Index: include/SDL_video.h
  2
+===================================================================
  3
+--- include/SDL_video.h	(revision 4116)
  4
++++ include/SDL_video.h	(working copy)
  5
+@@ -324,6 +324,11 @@
  6
+ extern DECLSPEC SDL_Rect ** SDLCALL SDL_ListModes(SDL_PixelFormat *format, Uint32 flags);
  7
+ 
  8
+ /**
  9
++* Alter the width and height of the current surface to the given sizes.
  10
++*/
  11
++extern DECLSPEC void SDLCALL SDL_SetWidthHeight(int width, int height);
  12
++
  13
++/**
  14
+  * Set up a video mode with the specified width, height and bits-per-pixel.
  15
+  *
  16
+  * If 'bpp' is 0, it is treated as the current display bits per pixel.
  17
+
  18
+Index: src/video/SDL_video.c
  19
+===================================================================
  20
+--- src/video/SDL_video.c	(revision 4116)
  21
++++ src/video/SDL_video.c	(working copy)
  22
+@@ -1956,3 +1956,11 @@
  23
+ 		return(0);
  24
+ 	}
  25
+ }
  26
++
  27
++void SDL_SetWidthHeight(int width, int height)
  28
++{
  29
++  if (current_video != NULL && current_video->screen != NULL) {
  30
++    current_video->screen->w = width;
  31
++    current_video->screen->h = height;
  32
++  }
  33
++}
12  tools/darwin/depends/libsdl-native/02-mmx.patch
... ...
@@ -0,0 +1,12 @@
  1
+--- src/video/mmx.h	Mon Feb 06 08:28:51 2006 +0000
  2
++++ src/video/mmx.h	Sun Jan 30 13:38:57 2011 -0800
  3
+@@ -355,7 +355,7 @@
  4
+ 
  5
+ #define	mmx_r2m(op, reg, mem) \
  6
+ 	__asm__ __volatile__ (#op " %%" #reg ", %0" \
  7
+-			      : "=X" (mem) \
  8
++			      : "=m" (mem) \
  9
+ 			      : /* nothing */ )
  10
+ 
  11
+ #define	mmx_r2r(op, regs, regd) \
  12
+
45  tools/darwin/depends/libsdl-native/Makefile
... ...
@@ -0,0 +1,45 @@
  1
+include ../Makefile.buildtools
  2
+export CFLAGS=-I$(TOOLCHAIN)/include
  3
+export LDFLAGS=-L$(TOOLCHAIN)/lib
  4
+export CPPFLAGS=-I$(TOOLCHAIN)/include
  5
+export CXXFLAGS=-I$(TOOLCHAIN)/include
  6
+
  7
+# lib name, version
  8
+LIBNAME=SDL
  9
+VERSION=1.2.14
  10
+SOURCE=$(LIBNAME)-$(VERSION)
  11
+ARCHIVE=$(SOURCE).tar.gz
  12
+
  13
+# configuration settings
  14
+CONFIGURE=./configure --prefix=$(TOOLCHAIN) \
  15
+  --without-x --disable-video-x11
  16
+
  17
+LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).dylib
  18
+
  19
+all: $(LIBDYLIB) .installed
  20
+
  21
+$(TARBALLS_LOCATION)/$(ARCHIVE):
  22
+	$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
  23
+	echo $(ARCHIVE) > .gitignore
  24
+
  25
+$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
  26
+	rm -rf $(SOURCE)
  27
+	$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
  28
+	echo $(SOURCE) > .gitignore
  29
+	cd $(SOURCE); patch -p0 < ../01-SDL_SetWidthHeight.patch
  30
+	cd $(SOURCE); patch -p0 < ../02-mmx.patch
  31
+	cd $(SOURCE); $(CONFIGURE)
  32
+
  33
+$(LIBDYLIB): $(SOURCE)
  34
+	make -j 1 -C $(SOURCE)
  35
+
  36
+.installed:
  37
+	make -C $(SOURCE) install
  38
+	touch $@
  39
+
  40
+clean:
  41
+	make -C $(SOURCE) clean
  42
+	rm -f .installed
  43
+
  44
+distclean::
  45
+	rm -rf $(SOURCE) .installed
42  tools/darwin/depends/libsdl_image-native/Makefile
... ...
@@ -0,0 +1,42 @@
  1
+include ../Makefile.buildtools
  2
+export CFLAGS=-I$(TOOLCHAIN)/include
  3
+export LDFLAGS=-L$(TOOLCHAIN)/lib
  4
+export CPPFLAGS=-I$(TOOLCHAIN)/include
  5
+export CXXFLAGS=-I$(TOOLCHAIN)/include
  6
+
  7
+# lib name, version
  8
+LIBNAME=SDL_image
  9
+VERSION=1.2.7
  10
+SOURCE=$(LIBNAME)-$(VERSION)
  11
+ARCHIVE=$(SOURCE).tar.gz
  12
+
  13
+# configuration settings
  14
+CONFIGURE=./configure --prefix=$(TOOLCHAIN) \
  15
+   --disable-jpg-shared --disable-png-shared --disable-tif-shared --disable-sdltest
  16
+
  17
+LIBDYLIB=$(SOURCE)/.libs/$(LIBNAME).a
  18
+
  19
+all: $(LIBDYLIB) .installed
  20
+
  21
+$(TARBALLS_LOCATION)/$(ARCHIVE):
  22
+	$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
  23
+
  24
+$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
  25
+	rm -rf $(SOURCE)
  26
+	$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
  27
+	echo $(SOURCE) > .gitignore
  28
+	cd $(SOURCE); $(CONFIGURE)
  29
+
  30
+$(LIBDYLIB): $(SOURCE)
  31
+	make -j $(MAKE_JOBS) -C $(SOURCE)
  32
+
  33
+.installed:
  34
+	make -C $(SOURCE) install
  35
+	touch $@
  36
+
  37
+clean:
  38
+	make -C $(SOURCE) clean
  39
+	rm -f .installed
  40
+
  41
+distclean::
  42
+	rm -rf $(SOURCE) .installed
41  tools/darwin/depends/libtiff-native/Makefile
... ...
@@ -0,0 +1,41 @@
  1
+include ../Makefile.buildtools
  2
+export CFLAGS=-I$(TOOLCHAIN)/include
  3
+export LDFLAGS=-L$(TOOLCHAIN)/lib
  4
+export CPPFLAGS=-I$(TOOLCHAIN)/include
  5
+export CXXFLAGS=-I$(TOOLCHAIN)/include
  6
+
  7
+# lib name, version
  8
+LIBNAME=tiff
  9
+VERSION=3.8.2
  10
+SOURCE=$(LIBNAME)-$(VERSION)
  11
+ARCHIVE=$(SOURCE).tar.gz
  12
+
  13
+# configuration settings
  14
+CONFIGURE=./configure --prefix=$(TOOLCHAIN)
  15
+
  16
+LIBDYLIB=$(SOURCE)/libtiff/.libs/lib$(LIBNAME).dylib
  17
+
  18
+all: $(LIBDYLIB) .installed
  19
+
  20
+$(TARBALLS_LOCATION)/$(ARCHIVE):
  21
+	$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
  22
+
  23
+$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
  24
+	rm -rf $(SOURCE)
  25
+	$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
  26
+	echo $(SOURCE) > .gitignore
  27
+	cd $(SOURCE); $(CONFIGURE)
  28
+
  29
+$(LIBDYLIB): $(SOURCE)
  30
+	make -j $(MAKE_JOBS) -C $(SOURCE)
  31
+
  32
+.installed:
  33
+	make -C $(SOURCE) install
  34
+	touch $@
  35
+
  36
+clean:
  37
+	make -C $(SOURCE) clean
  38
+	rm -f .installed
  39
+
  40
+distclean::
  41
+	rm -rf $(SOURCE) .installed
7  tools/darwin/depends/xbmc/Makefile
@@ -2,6 +2,13 @@ include ../Makefile.include
2 2
 
3 3
 SOURCE=../../../../
4 4
 
  5
+ifeq ($(DARWIN), ios)
  6
+include ../Makefile.buildtools
  7
+export USE_TEXTUREPACKER_NATIVE_ROOT=$(TOOLCHAIN)
  8
+else
  9
+export USE_TEXTUREPACKER_NATIVE_ROOT=$(PREFIX)
  10
+endif
  11
+
5 12
 # configuration settings
6 13
 export PATH:=$(TOOLCHAIN)/bin:$(PREFIX)/bin:$(PATH)
7 14
 CONFIGURE=./configure --prefix=$(PREFIX) \

1 note on commit 054a227

Memphiz
Owner

Ohh cool - you've learned that from droid? ^^

Please sign in to comment.
Something went wrong with that request. Please try again.