summaryrefslogtreecommitdiff
path: root/sdk
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2012-10-21 01:17:33 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2012-10-21 01:17:33 +0100
commit6f5bf6ae1dad368b56ad29a9e1f9faec15c70ffe (patch)
tree119b6f8c8c17e30af2043ace6b638d6e987a44ee /sdk
parentc496a0595bbef7cd3ad796b59d12189defda79a1 (diff)
downloadtoolchains-6f5bf6ae1dad368b56ad29a9e1f9faec15c70ffe.tar.gz
toolchains-6f5bf6ae1dad368b56ad29a9e1f9faec15c70ffe.tar.bz2
Add libiconv to ppc-amigaos SDK.
Diffstat (limited to 'sdk')
-rw-r--r--sdk/Makefile5
-rw-r--r--sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p29
-rw-r--r--sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p80
3 files changed, 113 insertions, 1 deletions
diff --git a/sdk/Makefile b/sdk/Makefile
index 40e5a27..9b5aba3 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -98,7 +98,7 @@ ifeq ($(TARGET),m5475-atari-mint)
endif
ifeq ($(TARGET),ppc-amigaos)
- SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libtre.d libpbl.d $(COMMON_SDK_ITEMS))
+ SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libtre.d libpbl.d $(COMMON_SDK_ITEMS))
EXTRAARGS_LIBCARES := --disable-shared
EXTRAARGS_LIBCURL := --disable-ntlm-wb
endif
@@ -159,6 +159,9 @@ $(BUILDSTEPS)/libiconv.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libiconv-src.d
mkdir -p $(BUILDDIR)/libiconv
cd $(BUILDDIR)/libiconv && tar xzf $(SOURCEDIR)/libiconv-$(VERSION_LIBICONV).tar.gz
for p in `ls $(RECIPES)/patches/libiconv/*.p` ; do patch -d $(BUILDDIR)/libiconv/libiconv-$(VERSION_LIBICONV) -p0 <$$p ; done
+ifneq ($(realpath $(RECIPES)/patches/libiconv/$(TARGET)),)
+ for p in `ls $(RECIPES)/patches/libiconv/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libiconv/libiconv-$(VERSION_LIBICONV) -p0 <$$p ; done
+endif
cd $(BUILDDIR)/libiconv/libiconv-$(VERSION_LIBICONV) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared
cd $(BUILDDIR)/libiconv/libiconv-$(VERSION_LIBICONV) && $(env) make install
touch $@
diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p
new file mode 100644
index 0000000..a55b06e
--- /dev/null
+++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.signal.in.h.p
@@ -0,0 +1,29 @@
+--- srclib/signal.in.h.old 2012-10-21 01:08:10.000000000 +0100
++++ srclib/signal.in.h 2012-10-21 01:10:19.000000000 +0100
+@@ -76,26 +76,6 @@
+ /* This code supports only 32 signals. */
+ typedef int verify_NSIG_constraint[2 * (NSIG <= 32) - 1];
+
+-/* A set or mask of signals. */
+-# if !@HAVE_SIGSET_T@
+-typedef unsigned int sigset_t;
+-# endif
+-
+-/* Test whether a given signal is contained in a signal set. */
+-extern int sigismember (const sigset_t *set, int sig);
+-
+-/* Initialize a signal set to the empty set. */
+-extern int sigemptyset (sigset_t *set);
+-
+-/* Add a signal to a signal set. */
+-extern int sigaddset (sigset_t *set, int sig);
+-
+-/* Remove a signal from a signal set. */
+-extern int sigdelset (sigset_t *set, int sig);
+-
+-/* Fill a signal set with all possible signals. */
+-extern int sigfillset (sigset_t *set);
+-
+ /* Return the set of those blocked signals that are pending. */
+ extern int sigpending (sigset_t *set);
+
diff --git a/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p
new file mode 100644
index 0000000..16c4410
--- /dev/null
+++ b/sdk/recipes/patches/libiconv/ppc-amigaos/srclib.sigprocmask.c.p
@@ -0,0 +1,80 @@
+--- srclib/sigprocmask.c.old 2012-10-21 01:14:40.000000000 +0100
++++ srclib/sigprocmask.c 2012-10-21 01:15:24.000000000 +0100
+@@ -83,77 +83,6 @@
+ # define signal ext_signal
+ #endif
+
+-int
+-sigismember (const sigset_t *set, int sig)
+-{
+- if (sig >= 0 && sig < NSIG)
+- {
+- #ifdef SIGABRT_COMPAT
+- if (sig == SIGABRT_COMPAT)
+- sig = SIGABRT;
+- #endif
+-
+- return (*set >> sig) & 1;
+- }
+- else
+- return 0;
+-}
+-
+-int
+-sigemptyset (sigset_t *set)
+-{
+- *set = 0;
+- return 0;
+-}
+-
+-int
+-sigaddset (sigset_t *set, int sig)
+-{
+- if (sig >= 0 && sig < NSIG)
+- {
+- #ifdef SIGABRT_COMPAT
+- if (sig == SIGABRT_COMPAT)
+- sig = SIGABRT;
+- #endif
+-
+- *set |= 1U << sig;
+- return 0;
+- }
+- else
+- {
+- errno = EINVAL;
+- return -1;
+- }
+-}
+-
+-int
+-sigdelset (sigset_t *set, int sig)
+-{
+- if (sig >= 0 && sig < NSIG)
+- {
+- #ifdef SIGABRT_COMPAT
+- if (sig == SIGABRT_COMPAT)
+- sig = SIGABRT;
+- #endif
+-
+- *set &= ~(1U << sig);
+- return 0;
+- }
+- else
+- {
+- errno = EINVAL;
+- return -1;
+- }
+-}
+-
+-
+-int
+-sigfillset (sigset_t *set)
+-{
+- *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK;
+- return 0;
+-}
+-
+ /* Set of currently blocked signals. */
+ static volatile sigset_t blocked_set /* = 0 */;
+