aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authoramet <amet.nospam@gmail.com>2013-10-12 22:47:16 +0400
committeramet <amet.nospam@gmail.com>2013-10-16 21:48:04 +0400
commit05856e19e73d42f6e671369b777164afa43cc9f7 (patch)
tree392ed6d28327f59a964137d1c7763b90f6767536 /tools
parentb2602a25b8068c03e024b60f6596cb8f858c56ef (diff)
[xcode5] fix libplist build
Diffstat (limited to 'tools')
-rw-r--r--tools/depends/target/libplist/0002-fixclang.diff57
-rw-r--r--tools/depends/target/libplist/Makefile1
2 files changed, 58 insertions, 0 deletions
diff --git a/tools/depends/target/libplist/0002-fixclang.diff b/tools/depends/target/libplist/0002-fixclang.diff
new file mode 100644
index 0000000000..b4dd32a20f
--- /dev/null
+++ b/tools/depends/target/libplist/0002-fixclang.diff
@@ -0,0 +1,57 @@
+--- /libcnary/node.c 2011-06-25 05:00:48.000000000 +0400
++++ /libcnary/node.c 2013-03-19 20:34:11.000000000 +0400
+@@ -95,16 +95,17 @@
+ }
+
+ int node_detach(node_t* parent, node_t* child) {
+- if (!parent || !child) return 0;
+- if (node_list_remove(parent->children, child) == 0) {
++ if (!parent || !child) return -1;
++ int index = node_list_remove(parent->children, child);
++ if (index >= 0) {
+ parent->count--;
+ }
+- return 0;
++ return index;
+ }
+
+ int node_insert(node_t* parent, unsigned int index, node_t* child)
+ {
+- if (!parent || !child) return;
++ if (!parent || !child) return -1;
+ child->isLeaf = TRUE;
+ child->isRoot = FALSE;
+ child->parent = parent;
+@@ -209,7 +210,7 @@
+ node_t* node_copy_deep(node_t* node, copy_func_t copy_func)
+ {
+ if (!node) return NULL;
+- void *data;
++ void *data = NULL;
+ if (copy_func) {
+ data = copy_func(node->data);
+ }
+
+--- /src/base64.c 2013-10-06 23:14:24.000000000 +0400
++++ /src/base64.c 2013-03-19 20:34:11.000000000 +0400
+@@ -104,9 +104,9 @@
+
+ unsigned char *base64decode(const char *buf, size_t *size)
+ {
+- if (!buf) return;
++ if (!buf) return NULL;
+ size_t len = strlen(buf);
+- if (len <= 0) return;
++ if (len <= 0) return NULL;
+ unsigned char *outbuf = (unsigned char*)malloc((len/4)*3+3);
+
+ unsigned char *line;
+@@ -114,7 +114,7 @@
+
+ line = (unsigned char*)strtok((char*)buf, "\r\n\t ");
+ while (line) {
+- p+=base64decode_block(outbuf+p, line, strlen((char*)line));
++ p+=base64decode_block(outbuf+p, (const char*)line, strlen((char*)line));
+
+ // get next line of base64 encoded block
+ line = (unsigned char*)strtok(NULL, "\r\n\t "); \ No newline at end of file
diff --git a/tools/depends/target/libplist/Makefile b/tools/depends/target/libplist/Makefile
index aa5a9b9fcc..62ba1cfe0e 100644
--- a/tools/depends/target/libplist/Makefile
+++ b/tools/depends/target/libplist/Makefile
@@ -18,6 +18,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p1 < ../0001-dontbuildswig.patch
+ cd $(PLATFORM); patch -p1 < ../0002-fixclang.diff
cd $(PLATFORM); sed -ie 's/TARGET_LINK_LIBRARIES( plist /TARGET_LINK_LIBRARIES( plist m z /' src/CMakeLists.txt
cd $(PLATFORM); rm -rf build; mkdir -p build
cd $(PLATFORM)/build; $(CMAKE) VERBOSE=1 -DCMAKE_C_FLAGS="$(CFLAGS)" -DCMAKE_LD_FLAGS="$(LDFLAGS)" ..