summaryrefslogtreecommitdiff
path: root/redland
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-05-13 20:17:05 +0300
committerTor Lillqvist <tml@iki.fi>2011-05-13 20:39:15 +0300
commita5203aefa57a7ef99534a28812f3b52c69ca03ed (patch)
tree29923b0f47381714bad6edb364ece4bd6410fae8 /redland
parent6fe70ff48cf520405938c3076e95504b9b90b146 (diff)
Cross-compile redland for iOS
Diffstat (limited to 'redland')
-rw-r--r--redland/raptor/makefile.mk19
-rw-r--r--redland/raptor/raptor-1.4.18.patch.cross23
-rw-r--r--redland/rasqal/makefile.mk13
-rw-r--r--redland/redland/makefile.mk12
4 files changed, 64 insertions, 3 deletions
diff --git a/redland/raptor/makefile.mk b/redland/raptor/makefile.mk
index bbedd36bec62..1ee2ae5ddbe3 100644
--- a/redland/raptor/makefile.mk
+++ b/redland/raptor/makefile.mk
@@ -59,6 +59,11 @@ OOO_PATCH_FILES= \
$(TARFILE_NAME).patch.win32 \
raptor-aix.patch
+.IF "$(CROSS_COMPILING)"!=""
+OOO_PATCH_FILES += \
+ $(TARFILE_NAME).patch.cross
+.ENDIF
+
PATCH_FILES=$(OOO_PATCH_FILES)
@@ -129,9 +134,18 @@ XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
.EXPORT: XSLTLIB
CONFIGURE_DIR=
+.IF "$(OS)"=="IOS"
+CONFIGURE_ACTION=autoconf; .$/configure
+CONFIGURE_FLAGS=--disable-shared
+.ELSE
CONFIGURE_ACTION=.$/configure
+CONFIGURE_FKAGS=--disable-static
+.ENDIF
# do not enable grddl parser (#i93768#)
-CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
+CONFIGURE_FLAGS+= --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
+.IF "$(CROSS_COMPILING)"!=""
+CONFIGURE_FLAGS+= --build="$(BUILD_PLATFORM)" --host="$(HOST_PLATFORM)"
+.ENDIF
BUILD_ACTION=$(GNUMAKE)
BUILD_FLAGS+= -j$(EXTMAXPROCESS)
BUILD_DIR=$(CONFIGURE_DIR)
@@ -143,6 +157,9 @@ OUT2INC+=src$/raptor.h
.IF "$(OS)"=="MACOSX"
OUT2LIB+=src$/.libs$/libraptor.$(RAPTOR_MAJOR).dylib src$/.libs$/libraptor.dylib
OUT2BIN+=src/raptor-config
+.ELIF "$(OS)"=="IOS"
+OUT2LIB+=src$/.libs$/libraptor.a
+OUT2BIN+=src/raptor-config
.ELIF "$(OS)"=="AIX"
OUT2LIB+=src$/.libs$/libraptor.so.$(RAPTOR_MAJOR) src$/.libs$/libraptor.so
OUT2BIN+=src/raptor-config
diff --git a/redland/raptor/raptor-1.4.18.patch.cross b/redland/raptor/raptor-1.4.18.patch.cross
new file mode 100644
index 000000000000..5262dc1b8bed
--- /dev/null
+++ b/redland/raptor/raptor-1.4.18.patch.cross
@@ -0,0 +1,23 @@
+--- misc/raptor-1.4.18/configure.ac
++++ misc/build/raptor-1.4.18/configure.ac
+@@ -295,7 +295,9 @@
+ return is_c99("1234567");
+ }], AC_MSG_RESULT(no),
+ AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [vsnprint has C99 compatible return value])
+- AC_MSG_RESULT(yes))
++ AC_MSG_RESULT(yes),
++ AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [vsnprint has C99 compatible return value])
++ AC_MSG_RESULT([guessing yes]))
+ fi
+
+ need_libm=no
+@@ -456,7 +458,8 @@
+ AC_DEFINE(EXPAT_UTF8_BOM_CRASH, 1, [does expat crash when it sees an initial UTF8 BOM?])
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(The available expat crashes on XML UTF-8 BOM in documents)
+- AC_MSG_WARN(Fix either by using libxml or expat 1.95.2+))
++ AC_MSG_WARN(Fix either by using libxml or expat 1.95.2+),
++ AC_MSG_RESULT(guessing yes))
+
+ else
+ AC_MSG_RESULT(no)
diff --git a/redland/rasqal/makefile.mk b/redland/rasqal/makefile.mk
index a4c2187d483c..9956dacd8835 100644
--- a/redland/rasqal/makefile.mk
+++ b/redland/rasqal/makefile.mk
@@ -127,7 +127,15 @@ XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
-CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
+.IF "$(OS)"=="IOS"
+CONFIGURE_FLAGS=--disable-shared
+.ELSE
+CONFIGURE_FLAGS=--disable-static
+.ENDIF
+CONFIGURE_FLAGS+= --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
+.IF "$(CROSS_COMPILING)"!=""
+CONFIGURE_FLAGS+= --build="$(BUILD_PLATFORM)" --host="$(HOST_PLATFORM)"
+.ENDIF
BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
BUILD_FLAGS+= -j$(EXTMAXPROCESS)
BUILD_DIR=$(CONFIGURE_DIR)
@@ -139,6 +147,9 @@ OUT2INC+=src$/rasqal.h
.IF "$(OS)"=="MACOSX"
OUT2LIB+=src$/.libs$/librasqal.$(RASQAL_MAJOR).dylib src$/.libs$/librasqal.dylib
OUT2BIN+=src/rasqal-config
+.ELIF "$(OS)"=="IOS"
+OUT2LIB+=src$/.libs$/librasqal.a
+OUT2BIN+=src/rasqal-config
.ELIF "$(OS)"=="WNT"
.IF "$(COM)"=="GCC"
OUT2LIB+=src$/.libs$/*.a
diff --git a/redland/redland/makefile.mk b/redland/redland/makefile.mk
index c8a04dce3b45..cbe9b4e001ff 100644
--- a/redland/redland/makefile.mk
+++ b/redland/redland/makefile.mk
@@ -131,7 +131,15 @@ XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
-CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --with-raptor=system --with-rasqual=system --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
+.IF "$(OS)"=="IOS"
+CONFIGURE_FLAGS=--disable-shared
+.ELSE
+CONFIGURE_FKAGS=--disable-static
+.ENDIF
+CONFIGURE_FLAGS+= --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --with-raptor=system --with-rasqual=system --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
+.IF "$(CROSS_COMPILING)"!=""
+CONFIGURE_FLAGS+= --build="$(BUILD_PLATFORM)" --host="$(HOST_PLATFORM)"
+.ENDIF
BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
BUILD_FLAGS+= -j$(EXTMAXPROCESS)
BUILD_DIR=$(CONFIGURE_DIR)
@@ -142,6 +150,8 @@ OUT2INC+=librdf$/*.h
.IF "$(OS)"=="MACOSX"
OUT2LIB+=librdf$/.libs$/librdf.$(REDLAND_MAJOR).dylib
+.ELIF "$(OS)"=="IOS"
+OUT2LIB+=librdf$/.libs$/librdf.a
.ELIF "$(OS)"=="WNT"
.IF "$(COM)"=="GCC"
OUT2LIB+=librdf$/.libs$/*.a