summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2012-08-04 20:35:41 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2012-08-04 20:35:41 +0100
commit3957886f78057c1b97ce45ccdabb71b0188f1ac8 (patch)
tree876d0b5ada7519022e35d48d1c91acf3e51a8deb
parent0adcea9d1c4384470f7e9c326961acd3d97b7685 (diff)
downloadtoolchains-3957886f78057c1b97ce45ccdabb71b0188f1ac8.tar.gz
toolchains-3957886f78057c1b97ce45ccdabb71b0188f1ac8.tar.bz2
Add libpbl
-rw-r--r--sdk/Makefile20
-rw-r--r--sdk/recipes/patches/libpbl/Makefile.p17
-rw-r--r--sdk/recipes/patches/libpbl/no-memory.h.p108
-rw-r--r--sdk/recipes/patches/libpbl/pbl.h.p12
4 files changed, 156 insertions, 1 deletions
diff --git a/sdk/Makefile b/sdk/Makefile
index 209a17b..f189ce9 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -24,6 +24,7 @@ VERSION_LIBMNG := 1.0.10
VERSION_LIBCARES := 1.9.1
VERSION_LIBCURL := 7.27.0
VERSION_LIBGNURX := 2.5.1
+VERSION_LIBPBL := 1_04
# Path
path__ := $(GCCSDK_INSTALL_CROSSBIN):$(PATH)
@@ -75,7 +76,7 @@ ifeq ($(TARGET),arm-unknown-riscos)
endif
ifeq ($(TARGET),ppc-amigaos)
- SDK_ITEMS := $(BUILDSTEPS)/libtre.d $(COMMON_SDK_ITEMS)
+ SDK_ITEMS := $(BUILDSTEPS)/libtre.d $(BUILDSTEPS)/libpbl.d $(COMMON_SDK_ITEMS)
EXTRAARGS_LIBCARES := --disable-shared
VERSION_LIBCURL := 7.21.3
endif
@@ -172,6 +173,23 @@ $(BUILDSTEPS)/libtre-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/tre-$(VERSION
$(SOURCEDIR)/tre-$(VERSION_LIBTRE).tar.bz2:
wget -q -O $@ http://laurikari.net/tre/$(subst $(SOURCEDIR)/,,$@)
+# libpbl
+$(BUILDSTEPS)/libpbl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libpbl-src.d
+ mkdir -p $(BUILDDIR)/libpbl
+ cd $(BUILDDIR)/libpbl && tar xzf $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz
+ for p in `ls $(RECIPES)/patches/libpbl/*.p` ; do patch -d $(BUILDDIR)/libpbl/pbl_$(VERSION_LIBPBL)_04 -p0 <$$p ; done
+ifneq ($(realpath $(RECIPES)/patches/libpbl/$(TARGET)),)
+ for p in `ls $(RECIPES)/patches/libpbl/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libpbl/pbl_$(VERSION_LIBPBL)_04 -p0 <$$p ; done
+endif
+ cd $(BUILDDIR)/libpbl/pbl_$(VERSION_LIBPBL)_04 && $(env) make install PREFIX=$(GCCSDK_INSTALL_ENV)
+ touch $@
+
+$(BUILDSTEPS)/libpbl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz
+ touch $@
+
+$(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz:
+ wget -q -O $@ http://www.mission-base.com/peter/source/$(subst $(SOURCEDIR)/,,$@)
+
# libXML2
$(BUILDSTEPS)/libxml2.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/libxml2-src.d
mkdir -p $(BUILDDIR)/libxml2
diff --git a/sdk/recipes/patches/libpbl/Makefile.p b/sdk/recipes/patches/libpbl/Makefile.p
new file mode 100644
index 0000000..eaef4e2
--- /dev/null
+++ b/sdk/recipes/patches/libpbl/Makefile.p
@@ -0,0 +1,17 @@
+--- Makefile.old 2012-08-04 20:05:38.000000000 +0100
++++ Makefile 2012-08-04 20:12:39.000000000 +0100
+@@ -0,0 +1,14 @@
++SOURCES := $(addprefix src/,pblPriorityQueue.c pblHeap.c pblMap.c pblSet.c pblList.c pblCollection.c pblIterator.c pblisam.c pblkf.c pblhash.c pbl.c)
++
++OBJECTS := $(subst .c,.o,$(SOURCES))
++
++install: libpbl.a
++ install -m 644 libpbl.a $(PREFIX)/lib
++ install -m 644 src/pbl.h $(PREFIX)/include
++
++libpbl.a: $(OBJECTS)
++ $(AR) rc $@ $(OBJECTS)
++
++%.o: %.c
++ $(CC) -c -Wall -O3 -o $@ $<
++
diff --git a/sdk/recipes/patches/libpbl/no-memory.h.p b/sdk/recipes/patches/libpbl/no-memory.h.p
new file mode 100644
index 0000000..0bd374d
--- /dev/null
+++ b/sdk/recipes/patches/libpbl/no-memory.h.p
@@ -0,0 +1,108 @@
+--- src/pbl.c.orig 2012-08-04 20:29:29.000000000 +0100
++++ src/pbl.c 2012-08-04 20:29:37.000000000 +0100
+@@ -49,7 +49,6 @@
+
+ #include <stdio.h>
+ #include <string.h>
+-#include <memory.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblCollection.c.orig 2012-08-04 20:27:49.000000000 +0100
++++ src/pblCollection.c 2012-08-04 20:28:00.000000000 +0100
+@@ -43,7 +43,7 @@
+ char* pblCollection_c_id = "$Id: pblCollection.c,v 1.13 2010/05/19 22:38:45 peter Exp $";
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblhash.c.orig 2012-08-04 20:29:03.000000000 +0100
++++ src/pblhash.c 2012-08-04 20:29:19.000000000 +0100
+@@ -64,7 +64,7 @@
+ char* pblhash_c_id = "$Id: pblhash.c,v 1.18 2010/05/30 20:06:45 peter Exp $";
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblHeap.c.orig 2012-08-04 20:25:40.000000000 +0100
++++ src/pblHeap.c 2012-08-04 20:25:52.000000000 +0100
+@@ -36,7 +36,7 @@
+ char* pblHeap_c_id = "$Id: pblHeap.c,v 1.5 2010/08/31 21:06:20 peter Exp $";
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblIterator.c.orig 2012-08-04 20:28:11.000000000 +0100
++++ src/pblIterator.c 2012-08-04 20:28:21.000000000 +0100
+@@ -48,7 +48,7 @@
+ char * PblIteratorMagic = "PblIteratorMagic";
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblkf.c.orig 2012-08-04 20:28:37.000000000 +0100
++++ src/pblkf.c 2012-08-04 20:28:47.000000000 +0100
+@@ -72,7 +72,6 @@
+ #include <sys/stat.h>
+
+ #include <fcntl.h>
+-#include <memory.h>
+ #include <string.h>
+
+
+--- src/pblList.c.orig 2012-08-04 20:27:23.000000000 +0100
++++ src/pblList.c 2012-08-04 20:27:35.000000000 +0100
+@@ -52,7 +52,7 @@
+ char * PblLinkedListMagic = "PblLinkedListMagic";
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblMap.c.orig 2012-08-04 20:26:15.000000000 +0100
++++ src/pblMap.c 2012-08-04 20:26:29.000000000 +0100
+@@ -54,7 +54,7 @@
+ char* pblMap_c_id = "$Id: pblMap.c,v 1.7 2010/05/30 20:06:45 peter Exp $";
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblPriorityQueue.c.orig 2012-08-04 20:22:41.000000000 +0100
++++ src/pblPriorityQueue.c 2012-08-04 20:22:56.000000000 +0100
+@@ -43,7 +43,7 @@
+ "$Id: pblPriorityQueue.c,v 1.12 2010/10/01 20:44:31 peter Exp $";
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
+--- src/pblSet.c.orig 2012-08-04 20:26:54.000000000 +0100
++++ src/pblSet.c 2012-08-04 20:27:07.000000000 +0100
+@@ -62,7 +62,7 @@
+
+
+ #include <stdio.h>
+-#include <memory.h>
++#include <string.h>
+
+ #ifndef __APPLE__
+ #include <malloc.h>
diff --git a/sdk/recipes/patches/libpbl/pbl.h.p b/sdk/recipes/patches/libpbl/pbl.h.p
new file mode 100644
index 0000000..f1dbf1f
--- /dev/null
+++ b/sdk/recipes/patches/libpbl/pbl.h.p
@@ -0,0 +1,12 @@
+--- src/pbl.h.orig 2012-08-04 20:24:02.000000000 +0100
++++ src/pbl.h 2012-08-04 20:24:50.000000000 +0100
+@@ -79,7 +79,7 @@
+ #include <io.h>
+ #include <string.h>
+ #else
+-#ifndef __CYGWIN__
++#if !defined(__CYGWIN__) && !defined(__AMIGA__)
+ #include <sys/dir.h>
+ #endif
+ #endif
+